Closed Toni500github closed 5 months ago
I forgot that I had a toml.cpp where TOML_IMPLEMENTATION
and TOML_HEADER_ONLY
are defined, and so I added these 3 defines (TOML_LANG_UNRELEASED, TOML_ENABLE_UNRELEASED_FEATURES, TOML_UNRELEASED_FEATURES
) to the file, recompile and now it works.
Closing and you can delete this issue if it's useless
Great :)
FYI, the only one of those you should actually need to override is TOML_ENABLE_UNRELEASED_FEATURES
. The other two are internal/deprecated.
ah ok, just wanted to make it sure lol
Environment
toml++ version and/or commit hash: 3.4.0
Compiler: GCC 14.1.1 20240507
C++ standard mode: 20
Target arch: x64
Library configuration overrides: TOML_LANG_UNRELEASED=1, TOML_ENABLE_UNRELEASED_FEATURES=1, TOML_UNRELEASED_FEATURES=1, TOML_ENABLE_FORMATTERS=0
Relevant compilation flags:
Describe the bug
I want to parse a file, and when ever I try to parse a string, inside of an array, with the escape code '\e', so that I could print on screen the bash colors, it gives the error:
Error while parsing string: escape sequence '\e' is not supported in TOML 1.0.0 and earlier
Looking through the header toml.hpp, I saw there was some macros to define for enabling un-released toml features,
TOML_LANG_UNRELEASED, TOML_ENABLE_UNRELEASED_FEATURES, TOML_UNRELEASED_FEATURES
.I tried to
#define
all of those on a global header and even adding-DTOML_LANG_UNRELEASED=1 DTOML_ENABLE_UNRELEASED_FEATURES=1 -DTOML_UNRELEASED_FEATURES=1
to the compile flags, but nothing worksSteps to reproduce (or a small repo code sample)
So it seems I can't reproduce it with a simple string so i'll post a snippet of my code that produces the error
here's the config
Additional information