tomlplusplus: C++20 MSVC Syntax Error [CMake]
Environment
Compiler:
MSVC
C++ standard mode (e.g. 17, 20, ‘latest’):
C++20
Target arch (e.g. x64):
x64
Exceptions enabled:
I am using the default (/EHsc) Exceptions
Relevant toml++ configuration customizations:
No overrides are used
Relevant compilation flags:
None
Describe the bug
Syntax/Unknown-Type/Traits errors.
toml.hpp(8103): error C2589: '(': illegal token on right side of '::'
toml.hpp(8612): note: see reference to function template instantiation 'int64_t toml::impl::abi_impl_noex::parser::parse_integer<16>(void) noexcept' being compiled
toml.hpp(8103): error C2062: type 'unknown-type' unexpected
toml.hpp(8103): error C2144: syntax error: 'unknown-type' should be preceded by '('
toml.hpp(8103): error C2059: syntax error: ')'
toml.hpp(8104): error C2143: syntax error: missing ';' before '{'
toml.hpp(8104): error C2059: syntax error: ','
toml.hpp(8104): error C2059: syntax error: ')'
toml.hpp(8104): error C2059: syntax error: 'return'
toml.hpp(8104): error C2059: syntax error: '}'
toml.hpp(8108): error C2059: syntax error: 'if'
toml.hpp(8108): error C2653: 'traits': is not a class or namespace name
toml.hpp(8110): error C2059: syntax error: 'else'
toml.hpp(8112): error C2059: syntax error: '}'
toml.hpp(8112): error C2143: syntax error: missing ';' before '}'
Steps to reproduce (or a small repro code sample)
Include it in any source file.
Additional information
Screenshots of the compiler error:

About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 23 (11 by maintainers)
Ah well, thank you for the quick replies. I’ll be closing it now, thanks for the great library and I apologise for the inconveniences 🤗