quicknir/wise_enum

Visual C++ limits macro arguments to 127

Closed this issue · 7 comments

Both examples fail to compile on Visual C++ 16.0 P1 because macro arguments are limited to 127:

> cl /std:c++latest /permissive- example.x.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.20.27027.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

example.x.cpp
wise_enum_generated.h(30): fatal error C1112: compiler limit: 
    '258' too many macro arguments, only '127' allowed
Dynad commented

I'm getting the same error with Visual Studio 2017 Release x64.

Also getting this. Tried using the Python script to generate a wise_enum_generated.h with fewer arguments but it still seems to break :-/

@OOPMan how many fewer arguments? That's pretty odd

I tried 127 and then also 125 when 127 failed with an error about the macro taking 129 argument. The new errors seemed to be something about mismatched braces.

As with the others, this is VS2017

@OOPMan hi oopman, do you have resolved the problem?

@frank-amy I think I ended up not using wise_enum

Hey all, I'm going to close this in favor of #31. I'd suggest posting the actual compilation error there. If someone has an MSVC environment setup and is willing to help, would be greatly appreciated as I do not.