Is there a way to alias preprocessor directives or create macro shortcuts for #include and #define in C++20/C++23?
01:25 20 Jun 2026

I'm trying to make an alias for #include and #define.

I've tried:

#define imp(x) #include x 

but apparently #include will become "include" (because of stringify #) and for define I tried

constexpr auto

which just won't behave like #define. What's the fix?

c++ macros language-lawyer c++20 preprocessor