Giter VIP home page Giter VIP logo

Comments (6)

xiayip avatar xiayip commented on July 26, 2024 1

I add an MSVC compile flag to reslove this problem:

    if (MSVC)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:preprocessor")
    endif ()

Here is more info about MSVC compile limit.

from better-enums.

aantron avatar aantron commented on July 26, 2024

Indeed, this is a known limit of MSVC (e.g., see bottom of this page). I don't know of a way to work around it, except maybe to use gcc -E to preprocess your enum separately using CPP, for example. That doesn't sound practical to me, however.

from better-enums.

aantron avatar aantron commented on July 26, 2024

Preprocessing or compiling using clang-cl may also work.

Closing this issue, as it's not a problem with Better Enums, and I don't think we can work around it in Better Enums.

from better-enums.

Roman-Bober avatar Roman-Bober commented on July 26, 2024

Any updates on this bug?
got also in VS2015

fatal error C1112: compiler limit
after running and using generated enum_macros.h:

make_macros.py" 256 64 > "C:\work\GitLab\imageinjecttools\src\ImageInjectLib\enum_macros.h"

from better-enums.

aantron avatar aantron commented on July 26, 2024

AFAIK this is a limitation in MSVC. If you are able to use a newer version, perhaps you can try to see if they have increased the limit.

from better-enums.

aantron avatar aantron commented on July 26, 2024

Thank you @xiayip!

from better-enums.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.