Having a C++ hell problem.
-
Having a C++ hell problem.
There's a namespace named "vendor", containing a class named "ClassName", containing an enum named "Status", containing a value named "Success".
There's code that compiles on Windows with MSVC and on MacOS with Clang. But on Linux with GCC, it fails; if I say vendor::ClassName::Success it says "expected unqualified-id before numeric constant" on Success and if I say "vendor::ClassName::Status::Success" it says "expected unqualified-id before 'int'" on Status.
(1/2)
-
Having a C++ hell problem.
There's a namespace named "vendor", containing a class named "ClassName", containing an enum named "Status", containing a value named "Success".
There's code that compiles on Windows with MSVC and on MacOS with Clang. But on Linux with GCC, it fails; if I say vendor::ClassName::Success it says "expected unqualified-id before numeric constant" on Success and if I say "vendor::ClassName::Status::Success" it says "expected unqualified-id before 'int'" on Status.
(1/2)
set(CMAKE_CXX_STANDARD 17) is set in CMake. Oh, and I believe this same code compiled on GCC before, implying something changed with headers or header order.
My questions, I think, are:
1. This smells to me like a #define somewhere doing something weird. Does it smell like that to you too, or could something else be happening?
2. Can I induce CMake to spit out the gcc -E output so I can see what the preprocessor is turning this code into?
(2/2)
-
set(CMAKE_CXX_STANDARD 17) is set in CMake. Oh, and I believe this same code compiled on GCC before, implying something changed with headers or header order.
My questions, I think, are:
1. This smells to me like a #define somewhere doing something weird. Does it smell like that to you too, or could something else be happening?
2. Can I induce CMake to spit out the gcc -E output so I can see what the preprocessor is turning this code into?
(2/2)
-
@mcc C++ needs a "ignore all previous instructions" command
-
undefined oblomov@sociale.network shared this topic on