Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Defining an alias to _has_include fails

Open
#260 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
compilers

Research direction

Start by running the minimal C++ example with wave and compare its behavior with a direct __has_include() use. Then trace wave's preprocessing of macro expansion around the __has_include operator; done means the alias form processes successfully, including the googletest pattern linked in the issue.

Written by the indexing model from the issue text.

Description

Preprocessing code which creates an alias to _has_include() via #define FOO _has_include cannot be processed with wave.
A real world example for this is googletest, see here: https://github.com/google/googletest/blob/52eb8108c5bdec04579160ae17225d66034bd723/googletest/include/gtest/internal/gtest-port.h#L277-L281

A minimal test case for this is

#define HAS_INCLUDE __has_include
#if HAS_INCLUDE(<header>)
#endif
Dominant language
C++
Stars
29
Forks
55
Avg merge
4d 13h
Merged PRs (30d)
1

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/wave

All issues in boostorg/wave

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.