I suggest you ...

Support GCC's __INCLUDE_LEVEL__ preprocessor macro

GCC's __INCLUDE_LEVEL__ macro gives you the current nesting level of the include file you're in.

In my project, I have internal header files intended only to be included in source files and not in any header files so I'm using:

#if __INCLUDE_LEVEL__ != 1
#error Don't include this file in a header file
#endif

as a sanity check. It would be nice if MSVC supported this.

20 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Derp McDerp shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base