TOML for Modern C++
std::string
(#189) (by @muggenhor)CMAKE_CXX_STANDARD
in CMakeLists (#202)strerror_r
on macos (#231, #233) (by @Esonhugh)[error]
prefix (#187) (by @ken-matsui)strerror
, instead of std
(#226)Fixed many corner-cases.
not
in README by !
(#172) (@estshorter)TOML11_PRESERVE_COMMENTS_BY_DEFAULT
find_or(value, key1, key2, ..., keyN, opt)
(#156)TOML11_DEFINE_CONVERSION_NON_INTRUSIVE
(#139)-Wshadow
(#158)toml::get/find
(#159)<filesystem>
with MinGW (@chronoxor) (#136)string::back
on an empty string (#141)TOML11_DISABLE_STD_FILESYSTEM
to disable <filesystem>
manually (related to: #150)u8"..."_toml
literal in C++20 mode (#104).0
value (#128).std::forward_list
TOML11_UNRELEASED_FEATURES
because all of them are released in v1.0.0-rc1std::filesystem::path
in C++17 (#113)TOML11_VERSION_(MAJOR|MINOR|PATCH)
macros to toml.hpp
(#114)-Wrange-loop-analysis
. (#98) (@jwillikers )
-Wundef
. (#99) (@jwillikers )
# The following examples are copied from the official TOML spec.
str4 = """Here are two quotation marks: "". Simple enough."""
# str5 = """Here are three quotation marks: """.""" # INVALID
str5 = """Here are three quotation marks: ""\"."""
str6 = """Here are fifteen quotation marks: ""\"""\"""\"""\"""\"."""
# "This," she said, "is just a pointless statement."
str7 = """"This," she said, "is just a pointless statement.""""
quot15 = '''Here are fifteen quotation marks: """""""""""""""'''
# apos15 = '''Here are fifteen apostrophes: '''''''''''''''''' # INVALID
apos15 = "Here are fifteen apostrophes: '''''''''''''''"
# 'That's still pointless', she said.
str = ''''That's still pointless', she said.'''
find<T>(value, "array", 1)
(#79 )find<UserDefined>(value, "user-defined")
when UserDefined
struct has a constructor from toml::value
.toml::value::size()
for array, table, and string values.toml::value::push_back(value)
, toml::value::emplace_back(Ts...)
for array values.toml::value::count(key)
, toml::value::contains(key)
for table values.-Wall
and -Wextra
-Wall
and -Wextra
on CI build-Werror
on CI build