-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Hello,
The MSVC team recently added flatbuffers as part of RWC testing to detect compiler regressions. And we found a lot of errors when building flatbuffers with '/std:c++latest'. Can you help look? It seems to be related to macros.
https://github.com/google/flatbuffers/blob/master/tests/test.cpp#L3431
https://github.com/google/flatbuffers/blob/master/include/flatbuffers/stl_emulation.h#L39
Repro steps:
- open VS2019 x64 tools command
- git clone https://github.com/google/flatbuffers flatbuffers
- cd flatbuffers
- mkdir build_amd64 && cd build_amd64
- set CL=/std:c++latest
- cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Release ..
- msbuild /m /p:Configuration=Release;Platform=x64 FlatBuffers.sln
Build log: Flatbuffers_build.log
Error info:
F:\gitP\google\flatbuffers\tests\test.cpp(3431,22): error C3083: 'internal': the symbol to the left of a '::' must be a type
F:\gitP\google\flatbuffers\tests\test.cpp(3431,32): error C2039: 'is_span_convertable': is not a member of 'flatbuffers'
F:\gitP\google\flatbuffers\tests\native_type_test_impl.h(28): note: see declaration of 'flatbuffers'
F:\gitP\google\flatbuffers\tests\test.cpp(3431,3): error C2873: 'is_span_convertable': symbol cannot be used in a using-declaration
F:\gitP\google\flatbuffers\tests\test.cpp(3432,44): error C2653: 'is_span_convertable': is not a class or namespace name
F:\gitP\google\flatbuffers\tests\test.cpp(3432,9): error C2903: 'is_span_convertable': symbol is neither a class template nor a function template
F:\gitP\google\flatbuffers\tests\test.cpp(3432,46): error C3861: 'type': identifier not found
F:\gitP\google\flatbuffers\tests\test.cpp(3433,50): error C2653: 'is_span_convertable': is not a class or namespace name
F:\gitP\google\flatbuffers\tests\test.cpp(3433,9): error C2903: 'is_span_convertable': symbol is neither a class template nor a function template
F:\gitP\google\flatbuffers\tests\test.cpp(3433,52): error C3861: 'type': identifier not found
F:\gitP\google\flatbuffers\tests\test.cpp(3434,58): error C2653: 'is_span_convertable': is not a class or namespace name
F:\gitP\google\flatbuffers\tests\test.cpp(3434,9): error C2903: 'is_span_convertable': symbol is neither a class template nor a function template
F:\gitP\google\flatbuffers\tests\test.cpp(3434,60): error C3861: 'type': identifier not found
F:\gitP\google\flatbuffers\tests\test.cpp(3435,60): error C2653: 'is_span_convertable': is not a class or namespace name
F:\gitP\google\flatbuffers\tests\test.cpp(3435,9): error C2903: 'is_span_convertable': symbol is neither a class template nor a function template
F:\gitP\google\flatbuffers\tests\test.cpp(3435,62): error C3861: 'type': identifier not found
F:\gitP\google\flatbuffers\tests\test.cpp(3436,56): error C2653: 'is_span_convertable': is not a class or namespace name