Releases: ToruNiina/toml11
version 3.0.0
A major update including a number of breaking changes.
TL;DR
toml::value
becomes customizable- unify typenames into
snake_case
Overview
To support comments in a better way and to enable to change containers used inside of toml::value
, toml::basic_value<Comment, Map, Array>
has been introduced. Due to this, the return value of toml::parse
has also been changed from toml::table
to toml::value
that contains a table and a comment (if any). Since toml::value
and toml::parse
are the most important functionalities, an alias to the default configuration has also been introduced to reduce the work to upgrade codes.
Since now toml::parse
returns toml::value
and the map class underlying toml::table
can be configurable, some overloads for toml::table
that makes overload resolution difficult has been dropped.
Type names that appear in enum class value_t
, toml::value::(is|as)_xxx
and toml::typename
are unified into snake_case
because that were confusing.
Breaking Changes
See README for details.
toml::parse
now returns atoml::value
, nottoml::table
.toml::value
is now an alias oftoml::basic_value<discard_comment, std::vector, std::unordered_map>
.- The elements of
toml::value_t
are renamed assnake_case
. - Supports for the CamelCaseNames are dropped.
(is|as)_float
has been removed to make the function names consistent with others.- An overload of
toml::find
fortoml::table
has been dropped. Usetoml::value
version instead. - An overload of
operator<<
andtoml::format
fortoml::table
s are dropped. - Interface around comments.
- An ancient
from_toml/into_toml
has been removed. Use arbitrary type conversion support.
version 2.4.0
Fixed
- Fix sign-compare warning (@khoitd1997 )
- Allow to install toml11 by CMake (@KerstinKeller )
- Fix definition of
_toml
operator - Compare table values correctly
Changed
- Throw
toml::type_error
fromas_xxx
- Add
as_xxx(std::nothrow) noexcept
overload - Show hints when it encounters a syntax error
Deprecated
- Deprecate
(is|as)_float
. Use(is|as)_floating
instead.- To make it consistent with
snake_case
typenames
- To make it consistent with
version 2.3.1
- Fix MSVC 2019 Warnings (@chronoxor )
- consider rvalue-reference in
as_*
member function - increase the performance of the parser a bit
version 2.3.0
- add
toml::value::as_*
functions for convenience - enable to get comments related to a value
- support
std::string_view
if C++17 is enabled
BREAKING
- remove deprecated
toml::get_or(toml::value, toml::key, T default)
- use
toml::find_or(value, key, defalt)
instead toml::get_or<T>(value, default)
is still available
- use
version 2.2.3
- fix error message format for
""_toml
literals
version 2.2.2
- fix
operator ""_toml
literal- resolve ambiguity in
"[1]"_toml;
- resolve ambiguity in
- suppress warnings on MSVC (@wbenny )
- improve runtime efficiency
- remove needless error message generations
- guess type of value before matching it
- improve error messages
- show "missing curly brace" for multiline inline table
- fix typo in error message from
parse_offset_datetime
version 2.2.1
- optimization of the parser (~60x faster for 50k lines of files)
- suppress warnings
version 2.2.0
- support conversion into/from arbitrary types
- add
""_toml
literal - add
find_or
- fix
toml::format
for table not to make top-level table inline - fix format of duplicate sign in timezone
- fix add missing const specifier to a overload of
get
- fix overload resolution and type deduction of
get_or
- consider invalid utf-8 sequences as a syntax error
- remove deprecated
to_toml
- mark
get_or(table, key, fallback)
deprecated becausefind_or
is more clearget_or(value, fallback)
is not deprecated
version 2.1.3
- fix a bug in the serializer
- remove a null character at the end of floating-point number
version 2.1.2
- fix the serialization of floating point number to make it locale-free
- run test codes with more compilers on Travis CI
- mark
to_toml
as deprecated- because now constructors of
toml::value
support the feature - It will be removed in
v2.2.0
.
- because now constructors of