Closed SpriteOvO closed 7 months ago
Hello @SpriteOvO,
thanks for reporting this issue. Macros are, well, difficult. I assume some of the matchers does not work here. In general macros do work. In your case, a workaround is to wrap BETTER_ENUM(Word, int, Hello, World)
in a namespace:
namespace test {
BETTER_ENUM(Word, int, Hello, World)
}
Then it gets expanded.
And is there a way to directly include an online url like Godbold? So that users no longer need to add library code manually. No this doesn't work in C++ Insights. You're welcome to send me a PR.
❤️ Thank you for the great site! My pleasure.
Andreas
Issue example: https://cppinsights.io/s/8931a54c
Input:
Output:
I'm exploring a library better-enums and I'd like to see what the
BETTER_ENUM
macro looks like when it expanded for the compiler, but Cppinsights' macro expansion doesn't work for it, although it works fine forARR_SIZE
macro.I guess because the
BETTER_ENUM
macro is too complex, will there be plans to support complex macro expansion?And is there a way to directly include an online url like Godbold? So that users no longer need to add library code manually.
:heart: Thank you for the great site!