diff --git a/index.html b/index.html
index ce069c9..52d6dd5 100644
--- a/index.html
+++ b/index.html
@@ -100,57 +100,60 @@
Header-only (optional!) Supports the latest TOML release (v1.0.0 ), plus optional support for some unreleased TOML features Passes all tests in the toml-test suite Supports serializing to JSON and YAML Proper UTF-8 handling (incl. BOM) C++17 (plus some C++20 features where available, e.g. experimental support for char8_t strings) Doesn't require RTTI Works with or without exceptions Tested on Clang (8+), GCC (8+) and MSVC (VS2019) Tested on x64, x86 and ARM You're looking at it! Browse the docs using the links at the top of the page. You can search from anywhere by pressing the TAB key.
Call toml:: parse_file() and work with the toml:: table you get back, or handle any toml:: parse_error that gets thrown:
#include <iostream>
#include <toml++/toml.hpp>
-int main ( int argc , char ** argv )
+int main ( int argc , char \ * \ * argv )
{
- toml :: table tbl ;
- try
- {
- tbl = toml :: parse_file ( argv [ 1 ]);
- std :: cout << tbl << " \n " ;
- }
- catch ( const toml :: parse_error & err )
- {
- std :: cerr << "Parsing failed: \n " << err << " \n " ;
- return 1 ;
- }
+toml :: table tbl ;
+try
+{
+tbl = toml :: parse_file ( argv [ 1 ]);
+std :: cout << tbl << " \n " ;
+}
+catch ( const toml :: parse_error & err )
+{
+std :: cerr << "Parsing failed: \n " << err << " \n " ;
+return 1 ;
+}
return 0 ;
-} Call toml:: parse() and work with the toml:: table you get back, or handle any toml:: parse_error that gets thrown:
Try this code on Compiler Explorer
#include <iostream>
+
+} Call toml:: parse() and work with the toml:: table you get back, or handle any toml:: parse_error that gets thrown:
Try this code on Compiler Explorer
#include <iostream>
#include <sstream>
#include <toml++/toml.hpp>
using namespace std :: string_view_literals ;
int main ()
{
- static constexpr std :: string_view some_toml = R " (
- [library]
- name = "toml++"
- authors = ["Mark Gillard <mark.gillard@outlook.com.au>"]
- cpp = 17
- ) "sv ;
+static constexpr std :: string_view some_toml = R " (
+[library]
+name = "toml++"
+authors = ["Mark Gillard <mark.gillard@outlook.com.au>"]
+cpp = 17
+) "sv ;
try
{
- // parse directly from a string view:
- {
- toml :: table tbl = toml :: parse ( some_toml );
- std :: cout << tbl << " \n " ;
- }
- // parse from a string stream:
- {
- std :: stringstream ss { std :: string { some_toml } };
- toml :: table tbl = toml :: parse ( ss );
- std :: cout << tbl << " \n " ;
- }
- }
- catch ( const toml :: parse_error & err )
- {
- std :: cerr << "Parsing failed: \n " << err << " \n " ;
- return 1 ;
- }
+// parse directly from a string view:
+{
+toml :: table tbl = toml :: parse ( some_toml );
+std :: cout << tbl << " \n " ;
+}
+
+// parse from a string stream:
+{
+std :: stringstream ss { std :: string { some_toml } };
+toml :: table tbl = toml :: parse ( ss );
+std :: cout << tbl << " \n " ;
+}
+}
+catch ( const toml :: parse_error & err )
+{
+std :: cerr << "Parsing failed: \n " << err << " \n " ;
+return 1 ;
+}
return 0 ;
+
} [library]
authors = [ 'Mark Gillard <mark.gillard@outlook.com.au>' ]
cpp = 17
@@ -159,52 +162,53 @@
[library]
authors = [ 'Mark Gillard <mark.gillard@outlook.com.au>' ]
cpp = 17
-name = 'toml++' Can't (or won't) use exceptions? That's fine too. You can disable exceptions in your compiler flags and/or explicitly disable the library's use of them by setting the option TOML_ EXCEPTIONS to 0. In either case, the parsing functions return a toml:: parse_result instead of a toml:: table :
#include <iostream>
+name = 'toml++' Can't (or won't) use exceptions? That's fine too. You can disable exceptions in your compiler flags and/or explicitly disable the library's use of them by setting the option TOML_ EXCEPTIONS to 0. In either case, the parsing functions return a toml:: parse_result instead of a toml:: table :
#include <iostream>
#define TOML_EXCEPTIONS 0 // only necessary if you've left them enabled in your compiler
#include <toml++/toml.hpp>
int main ()
{
- toml :: parse_result result = toml :: parse_file ( "configuration.toml" );
- if ( ! result )
- {
- std :: cerr << "Parsing failed: \n " << result . error () << " \n " ;
- return 1 ;
- }
+toml :: parse_result result = toml :: parse_file ( "configuration.toml" );
+if ( ! result )
+{
+std :: cerr << "Parsing failed: \n " << result . error () << " \n " ;
+return 1 ;
+}
do_stuff_with_your_config ( std :: move ( result ). table ()); // 'steal' the table from the result
return 0 ;
+
} The examples above use an overloaded operator<< with ostreams to print basic error messages, and look like this:
Error while parsing key: expected bare key starting character or string delimiter, saw '?'
- (error occurred at line 2, column 5) The library doesn't natively support error colouring in TTY environments, but instead provides the requisite information for you to build that and any other custom error handling yourself if necessary via toml:: parse_error 's source() and description() members:
toml :: table tbl ;
+(error occurred at line 2, column 5) The library doesn't natively support error colouring in TTY environments, but instead provides the requisite information for you to build that and any other custom error handling yourself if necessary via toml:: parse_error 's source() and description() members:
toml :: table tbl ;
try
{
- tbl = toml :: parse_file ( "configuration.toml" );
+tbl = toml :: parse_file ( "configuration.toml" );
}
catch ( const toml :: parse_error & err )
{
- std :: cerr
- << "Error parsing file '" << * err . source (). path
- << "': \n " << err . description ()
- << " \n (" << err . source (). begin << ") \n " ;
- return 1 ;
-} A TOML document is a tree of values, arrays and tables, represented as the toml:: value , toml:: array and toml:: table , respectively. All three inherit from toml:: node , and can be easily accessed via the toml:: node_view :
Try this code on Compiler Explorer
#include <iostream>
+std :: cerr
+<< "Error parsing file '" << \ * err . source (). path
+<< "': \n " << err . description ()
+<< " \n (" << err . source (). begin << ") \n " ;
+return 1 ;
+} A TOML document is a tree of values, arrays and tables, represented as the toml:: value , toml:: array and toml:: table , respectively. All three inherit from toml:: node , and can be easily accessed via the toml:: node_view :
Try this code on Compiler Explorer
#include <iostream>
#include <toml++/toml.hpp>
using namespace std :: string_view_literals ;
int main ()
{
- static constexpr auto source = R " (
- str = "hello world"
+static constexpr auto source = R " (
+str = "hello world"
- numbers = [ 1, 2, 3, "four", 5.0 ]
- vegetables = [ "tomato", "onion", "mushroom", "lettuce" ]
- minerals = [ "quartz", "iron", "copper", "diamond" ]
+numbers = [ 1, 2, 3, "four", 5.0 ]
+vegetables = [ "tomato", "onion", "mushroom", "lettuce" ]
+minerals = [ "quartz", "iron", "copper", "diamond" ]
- [animals]
- cats = [ "tiger", "lion", "puma" ]
- birds = [ "macaw", "pigeon", "canary" ]
- fish = [ "salmon", "trout", "carp" ]
+[animals]
+cats = [ "tiger", "lion", "puma" ]
+birds = [ "macaw", "pigeon", "canary" ]
+fish = [ "salmon", "trout", "carp" ]
) "sv ;
toml :: table tbl = toml :: parse ( source );
@@ -238,11 +242,11 @@
el = "five"sv ;
});
- // arrays are very similar to std::vector
- arr -> push_back ( 7 );
- arr -> emplace_back < toml :: array > ( 8 , 9 );
- std :: cout << "numbers: " << numbers << " \n " ;
- }
+// arrays are very similar to std::vector
+arr -> push_back ( 7 );
+arr -> emplace_back < toml :: array > ( 8 , 9 );
+std :: cout << "numbers: " << numbers << " \n " ;
+}
// node-views can be chained to quickly query deeper
std :: cout << "cats: " << tbl [ "animals" ][ "cats" ] << " \n " ;
@@ -256,6 +260,7 @@
std :: cout << "dinosaurs: " << tbl [ "animals" ][ "dinosaurs" ] << " \n " ; //no dinosaurs :(
return 0 ;
+
} hello world
hello world
hello world
@@ -266,23 +271,23 @@
numbers: [ 2, 3, 4, 'five', 6.0, 7, [ 8, 9 ] ]
cats: [ 'tiger', 'lion', 'puma' ]
fish[1]: 'trout'
-dinosaurs: All toml++ data types have overloaded operator<< for ostreams, so 'serializing' a set of TOML data to actual TOML is done just by printing it to an ostream. Converting it to JSON and YAML is done in much the same way, but via a toml:: json_formatter and toml:: yaml_formatter .
Try this code on Compiler Explorer
#include <iostream>
+dinosaurs: All toml++ data types have overloaded operator<< for ostreams, so 'serializing' a set of TOML data to actual TOML is done just by printing it to an ostream. Converting it to JSON and YAML is done in much the same way, but via a toml:: json_formatter and toml:: yaml_formatter .
Try this code on Compiler Explorer
#include <iostream>
#include <toml++/toml.hpp>
int main ()
{
- auto tbl = toml :: table {
- { "lib" , "toml++" },
- { "cpp" , toml :: array { 17 , 20 , "and beyond" } },
- { "toml" , toml :: array { "1.0.0" , "and beyond" } },
- { "repo" , "https://github.com/marzer/tomlplusplus/" },
- { "author" , toml :: table {
- { "name" , "Mark Gillard" },
- { "github" , "https://github.com/marzer" },
- { "twitter" , "https://twitter.com/marzer8789" }
- }
- },
- };
+auto tbl = toml :: table {
+{ "lib" , "toml++" },
+{ "cpp" , toml :: array { 17 , 20 , "and beyond" } },
+{ "toml" , toml :: array { "1.0.0" , "and beyond" } },
+{ "repo" , "https://github.com/marzer/tomlplusplus/" },
+{ "author" , toml :: table {
+{ "name" , "Mark Gillard" },
+{ "github" , "https://github.com/marzer" },
+{ "twitter" , "https://twitter.com/marzer8789" }
+}
+},
+};
// serializing as TOML
std :: cout << "###### TOML ######" << " \n\n " ;
@@ -297,7 +302,8 @@
std :: cout << toml :: yaml_formatter { tbl } << " \n\n " ;
return 0 ;
-} # ##### TOML ######
+
+} # ##### TOML
cpp = [ 17, 20, 'and beyond' ]
lib = 'toml++'
@@ -309,64 +315,65 @@
name = 'Mark Gillard'
twitter = 'https://twitter.com/marzer8789'
-# ##### JSON ######
+# ##### JSON
{
- "author" : {
- "github" : "https://github.com/marzer",
- "name" : "Mark Gillard",
- "twitter" : "https://twitter.com/marzer8789"
- },
- "cpp" : [
- 17,
- 20,
- "and beyond"
- ],
- "lib" : "toml++",
- "repo" : "https://github.com/marzer/tomlplusplus/",
- "toml" : [
- "1.0.0",
- "and beyond"
- ]
+"author" : {
+"github" : "https://github.com/marzer",
+"name" : "Mark Gillard",
+"twitter" : "https://twitter.com/marzer8789"
+},
+"cpp" : [
+17,
+20,
+"and beyond"
+],
+"lib" : "toml++",
+"repo" : "https://github.com/marzer/tomlplusplus/",
+"toml" : [
+"1.0.0",
+"and beyond"
+]
}
-# ##### YAML ######
+# ##### YAML
author:
- github: 'https://github.com/marzer'
- name: 'Mark Gillard'
- twitter: 'https://twitter.com/marzer8789'
+github: 'https://github.com/marzer'
+name: 'Mark Gillard'
+twitter: 'https://twitter.com/marzer8789'
cpp:
- - 17
- - 20
- - 'and beyond'
-lib: 'toml++'
-repo: 'https://github.com/marzer/tomlplusplus/'
-toml:
- - '1.0.0'
- - 'and beyond' Because toml++ is a header-only library of nontrivial size you might find that compilation times noticeably increase after you add it to your project, especially if you add the library's header somewhere that's visible from a large number of translation units. You can counter this by disabling header-only mode and explicitly controlling where the library's implementation is compiled.
Step 1: Set TOML_ HEADER_ ONLY to 0 before including toml++
This must be the same everywhere, so either set it as a global #define in your build system, or do it manually before including toml++ in some global header that's used everywhere in your project:
// global_header_that_includes_toml++.h
+
+- 17
+- 20
+- 'and beyond'
+ lib: 'toml++'
+ repo: 'https://github.com/marzer/tomlplusplus/'
+ toml:
+- '1.0.0'
+- 'and beyond' Because toml++ is a header-only library of nontrivial size you might find that compilation times noticeably increase after you add it to your project, especially if you add the library's header somewhere that's visible from a large number of translation units. You can counter this by disabling header-only mode and explicitly controlling where the library's implementation is compiled.
Step 1: Set TOML_ HEADER_ ONLY to 0 before including toml++
This must be the same everywhere, so either set it as a global #define in your build system, or do it manually before including toml++ in some global header that's used everywhere in your project:
// global_header_that_includes_toml++.h
#define TOML_HEADER_ONLY 0
#include <toml.hpp> Step 2: Define TOML_ IMPLEMENTATION before including toml++ in one specific translation unit
// some_code_file.cpp
#define TOML_IMPLEMENTATION
-#include "global_header_that_includes_toml++.h" Bonus Step: Disable any library features you don't need
Some library features can be disabled wholesale so you can avoid paying their the compilation cost if you don't need them. For example, if all you need to do is serialize some code-generated TOML and don't actually need the parser at all you, can set TOML_ ENABLE_ PARSER to 0 to disable the parser altogether. This can yield fairly significant compilation speedups since the parser accounts for a good chunk of the library's code.
The library comes in two flavours, 🍦️ Single-header and 🍨️ Regular. The API is the same for both.
🍦️ Single-header flavour Drop toml.hpp wherever you like in your source tree There is no step two 🍨️ Regular flavour Clone the repository from GitHub Add tomlplusplus/include to your include paths #include <toml++/toml.hpp>Add tomlplusplus/3.3.0 to your conanfile.
Add tomlpp to your package.json5, e.g.:
depends : [
- 'tomlpp^3.3.0' ,
+#include "global_header_that_includes_toml++.hpp" Bonus Step: Disable any library features you don't need
Some library features can be disabled wholesale so you can avoid paying their the compilation cost if you don't need them. For example, if all you need to do is serialize some code-generated TOML and don't actually need the parser at all you, can set TOML_ ENABLE_ PARSER to 0 to disable the parser altogether. This can yield fairly significant compilation speedups since the parser accounts for a good chunk of the library's code.
The library comes in two flavours, 🍦️ Single-header and 🍨️ Regular. The API is the same for both.
🍦️ Single-header flavour Drop toml.hpp wherever you like in your source tree There is no step two 🍨️ Regular flavour Clone the repository from GitHub Add tomlplusplus/include to your include paths #include <toml++/toml.hpp>Add tomlplusplus/3.4.0 to your conanfile.
Add tomlpp to your package.json5, e.g.:
depends : [
+'tomlpp^3.4.0' ,
] You can install the wrap with:
meson wrap install tomlplusplus After that, you can use it like a regular dependency:
tomlplusplus_dep = dependency ( 'tomlplusplus' ) You can also add it as a subproject directly.
tomlplusplus can be easily used in tipi.build projects by adding the following entry to your .tipi/deps:
{
- "marzer/tomlplusplus" : { }
+"marzer/tomlplusplus" : { }
} vcpkg install tomlplusplus include ( FetchContent )
FetchContent_Declare (
- tomlplusplus
- GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
- GIT_TAG v3.3.0
+tomlplusplus
+GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
+GIT_TAG v3.4.0
)
FetchContent_MakeAvailable ( tomlplusplus ) git submodule add --depth 1 https://github.com/marzer/tomlplusplus.git tomlplusplus The C++ tooling ecosystem is a fractal nightmare of unbridled chaos so naturally I'm not up-to-speed with all of the available packaging and integration options. I'm always happy to see new ones supported, though! If there's some integration you'd like to see and have the technical know-how to make it happen, feel free to make a pull request.
There exists a python wrapper library built around toml++ called pytomlpp which is, at the time of writing, one of only two natively-compiled TOML libraries available for python, and thus one of the fastest options available:
Parsing data.toml 5000 times:
- pytomlpp: 0.694 s
- rtoml: 0.871 s ( 1.25x)
- tomli: 2.625 s ( 3.78x)
- toml: 5.642 s ( 8.12x)
- qtoml: 7.760 s (11.17x)
- tomlkit: 32.708 s (47.09x) Install it using pip:
pip install pytomlpp Note that I'm not the owner of that project, so if you wish to report a bug relating to the python implementation please do so at their repository, not on the main toml++ one.
The library exposes a number of configuration options in the form of compiler #defines. Things like changing the optional<T> type, disabling header-only mode, et cetera. The full list of configurables can be found on the Library Configuration page.
Contributions are very welcome! Either by reporting issues or submitting pull requests. If you wish to submit a pull request, please see CONTRIBUTING for all the details you need to get going.
toml++ is licensed under the terms of the MIT license - see LICENSE .
If you're using the single-header version of the library you don't need to explicitly distribute the license file; it is embedded in the preamble at the top of the header.
For bug reports and feature requests please use the Github Issues system. For anything else you're welcome to reach out via other means. In order of likely response speed:
+pytomlpp: 0.694 s
+rtoml: 0.871 s ( 1.25x)
+tomli: 2.625 s ( 3.78x)
+toml: 5.642 s ( 8.12x)
+qtoml: 7.760 s (11.17x)
+tomlkit: 32.708 s (47.09x)
Install it using pip:
pip install pytomlpp Note that I'm not the owner of that project, so if you wish to report a bug relating to the python implementation please do so at their repository, not on the main toml++ one.
The library exposes a number of configuration options in the form of compiler #defines. Things like changing the optional<T> type, disabling header-only mode, et cetera. The full list of configurables can be found on the Library Configuration page.
Contributions are very welcome! Either by reporting issues or submitting pull requests. If you wish to submit a pull request, please see CONTRIBUTING for all the details you need to get going.
toml++ is licensed under the terms of the MIT license - see LICENSE .
If you're using the single-header version of the library you don't need to explicitly distribute the license file; it is embedded in the preamble at the top of the header.
For bug reports and feature requests please use the Github Issues system. For anything else you're welcome to reach out via other means. In order of likely response speed:
diff --git a/poxy_changelog.html b/poxy_changelog.html
index e6ed658..0bf0b52 100644
--- a/poxy_changelog.html
+++ b/poxy_changelog.html
@@ -64,7 +64,7 @@
Contents
-Fixes Additions improved support for using enums with value_or() Changes: renamed header files to have .hpp extension (toml.h is still present for backwards-compatibility) Build system: fixed meson builds with -Ddefault_library=static having hidden symbols on GNU compilers (#201 ) (@vlad0x00 ) Released 2023-01-29
Fixes: fixed null pointer dereference in parser when exceptions are disabled (#169 ) (@ncaklovic ) fixed spurious warnings in MSVC 19.34 fixed toml:: parse_file() on windows for non-ASCII paths fixed a spurious table redefinition error (#187 ) (@jorisvr ) fixed UB edge-case in integer parsing (#188 ) (@jorisvr ) fixed some build issues with Apple-flavoured Clang (#189 ) (@eddelbuettel ) Additions: Removals: Build system: Released 2022-08-29
Fixes: Additions: Changes: relaxed cvref requirements of is_homogeneous(), emplace(), emplace_back(), emplace_hint() relaxed mantissa and digits10 requirements of extended float support Released 2022-04-22
Fixes: fixed potential segfault when calling at_path() with an empty string fixed UB in internal unicode machinery (#144 ) (@kchalmer ) fixed a number of spurious warnings with Clang 10 (#145 , #146 ) (@chronoxor ) Additions: added toml:: array:: for_each() added toml:: table:: for_each() added config options TOML_EXPORTED_CLASS, TOML_EXPORTED_MEMBER_FUNCTION, TOML_EXPORTED_STATIC_FUNCTION & TOML_EXPORTED_FREE_FUNCTION added support for escape sequence \e when using TOML_ENABLE_UNRELEASED_FEATURES (toml/ 790 ) added support for more unicode in bare keys when using TOML_ENABLE_UNRELEASED_FEATURES (toml/ 891 ) Removals/Deprecations: deprecated old TOML_API option in favour new TOML_EXPORTED_X options (it will continue to work as it did before if none of the new function export options are defined) Build system: meson: added compile_library option (@Tachi107 ) meson: added ubsan_tests and ubsan_examples options meson: use system dependencies where available when building tests (@Tachi107 ) Released 2022-01-13
This is a single-bugfix release to fix an ODR issue for people using header-only mode in multiple translation units. If you aren't seeing linker errors because of toml::array::insert_at(), this release holds nothing of value over v3.0.0.
Fixes: fixed erroneous use of TOML_API causing ODR issue (#136 ) (@Azarael ) Released 2022-01-11
This release will be a major version bump, so it's ABI breaks all around. Any changes that are likely to cause migration issues (API changes, build system breakage, etc.) are indicated with ⚠️.
Fixes: ⚠️ fixed toml:: table init-list constructor requiring double-brackets ⚠️ fixed TOML_API + extern templates causing linker errors in some circumstances ⚠️ fixed incorrect noexcept specifications on many functions ⚠️ fixed missing TOML_API on some interfaces fixed toml:: json_formatter not formatting inf and nan incorrectly fixed a number of spec conformance issues (#127 , #128 , #129 , #130 , #131 , #132 , #135 ) (@moorereason ) fixed an illegal table redefinition edge case (#112 ) (@python36 ) fixed documentation issues fixed GCC bug causing memory leak during parse failures (#123 , #124 ) (@rsmmr , @ronalabraham ) fixed incorrect handling of vertical whitespace in keys when printing TOML to streams fixed incorrect source position in redefinition error messages fixed missing includes <initializer_list>, <utility> fixed parser not correctly round-tripping the format of binary and octal integers in some cases fixed some incorrect unicode scalar sequence transformations (#125 ) fixed strong exception guarantee edge-cases in toml:: table and toml:: array Additions: Changes: ⚠️ toml:: format_flags is now backed by uint64_t (was previously uint8_t ) ⚠️ toml:: source_index is now an alias for uint32_t unconditionally (was previously dependent on TOML_LARGE_FILES) ⚠️ toml:: table now uses toml:: key as the key type (was previously std:: string ) ⚠️ toml:: value_flags is now backed by uint16_t (was previously uint8_t ) ⚠️ made all overloaded operators 'hidden friends' where possible ⚠️ renamed toml:: default_formatter to toml:: toml_formatter (toml:: default_formatter is now an alias) ⚠️ renamed TOML_PARSER option to TOML_ENABLE_PARSER (TOML_PARSER will continue to work but is deprecated) ⚠️ renamed TOML_UNRELEASED_FEATURES to TOML_ENABLE_UNRELEASED_FEATURES (TOML_UNRELEASED_FEATURES will continue to work but is deprecated) ⚠️ renamed TOML_WINDOWS_COMPAT to TOML_ENABLE_WINDOWS_COMPAT (TOML_WINDOWS_COMPAT will continue to work but is deprecated) applied clang-format to all the things 🎉️ exposed TOML_NAMESPACE_START and TOML_NAMESPACE_END macros to help with ADL specialization scenarios improved performance of parser made date/time constructors accept any integral types moved all implementation headers to /impl renamed all implementation headers to .h and 'source' headers to .inl updated conformance tests Removals: ⚠️ removed toml::format_flags::allow_value_format_flags ⚠️ removed TOML_LARGE_FILES (it is now default - explicitly setting TOML_LARGE_FILES to 0 will invoke an #error) ⚠️ removed unnecessary template machinery (esp. where ostreams were involved) removed unnecessary uses of final Build system: ⚠️ increased minimum required meson version to 0.54.0 disabled 'install' path when being used as a meson subproject (#114 ) (@Tachi107 ) fixed builds failing with meson 0.6.0 (#117 ) (@Tachi107 ) general meson improvements and fixes (#115 ) (@Tachi107 ) used override_dependency where supported (#116 ) (@Tachi107 ) Released 2021-07-11
Fixes: fixed linkage error with windows compat mode fixed TOML_CONSTEVAL broken in MSVC (again) fixed minor documentation bugs fixed cmake project version being incorrect (#110 ) (@GiulioRomualdi ) Additions: added support for lowercase 't' and 'z' in datetimes (per spec) added natvis file to cmake install (#106 ) (@Ryan-rsm-McKenzie ) added VS cpp.hint file to cmake install added metafunctions is_container, is_chronological, is_value, is_node, inserted_type_of Changes: improved debug code size by removing unnecessary std::forwards and std::moves modernized the CMake build files (#102 , #103 , #105 ) (@friendlyanon ) updated conformance tests Released 2021-05-19
Fixes: fixed node::value() not retrieving inf and nan correctly fixed dotted kvps being unable to add subtables (#61 ) (@Validark ) fixed linker error on linux ICC (#83 ) (@blackwer ) fixed segfault JSON-formatting a failed parse_result (#96 ) (@proydakov ) fixed spurious newline after JSON formatting a table fixed VS intellisense not detecting TOML_COMPILER_EXCEPTIONS correctly fixed crash with pathologically-nested inputs (#100 ) (@geeknik ) fixed parse_result natvis fixed false-positive char8_t support detection on older compilers fixed unnecessary #include <Windows.h> Windows builds (@BeastLe9enD ) fixed TOML_CONSTEVAL breaking on VS 16.10.0pre2 fixed spurious warnings with MSVC /Wall fixed missing blank lines between consecutive empty tables/A-o-T fixed unnecessary TOML_API declarations fixed many small documentation issues Additions: Removals: removed explicit #include <fstream> requirement for parse_file() Released 2020-12-29
Fixes: fixed compiler errors caused by <charconv> with Apple-flavoured clang fixed array and table iterators missing iterator_category (#77 ) (@HazardyKnusperkeks ) fixed Wuseless-cast warnings on GCC 10 (#75 ) (@HazardyKnusperkeks ) fixed formatter not correctly line wrapping in some rare circumstances (#73 ) (@89z ) fixed an unnecessary global compiler flag breaking builds when used as a meson subproject (#72 ) (@jamabr ) fixed link error caused by <charconv> on emscripten (#71 ) (@suy ) fixed ambiguity with the toml:: literals inline namespace (#69 ) (@std-any-emplace ) fixed formatter emitting superfluous newlines after printing tables (#68 ) (@std-any-emplace ) fixed array and table iterators not converting between const and non-const versions of themselves (#67 ) (@std-any-emplace ) fixed some parser crashes when given pathologically-malformed UTF-8 (#65 ) (@sneves ) Released 2020-08-09
Fixes: fixed some issues building with VS2017 (#55 ) (@sobczyk ) fixed _Float16 erroneously detected as supported on g++ (#57 ) (@sobczyk ) fixed <Windows.h> causing compilation failure on mingw (#63 ) (@rezahousseini ) fixed CMake and pkg-config files not being installed into architecture-agnostic directories (#59 ) (@tambry ) fixed memory leak during parsing (#64 ) (@sneves ) fixed ambiguous operator== error on MSVC (#56 ) (@HellsingDarge ) Additions: added additional node_view constructors added ability to specify serialization format of integer values added integer value serialization format round trip (e.g. hex in, hex out) Changes: updated conformance tests TOML version bump to v1.0.0-rc.3 refactors and cleanups based on feedback given here Build system: renamed build options to snake_case tests, examples and cmake config now explicitly disabled when used as a subproject removed small_binaries (it's now implicit when building as release) bumped minimum meson version to 0.53 Released 2020-07-11
Fixes: fixed inconsistent emission of leading/trailing newlines when writing a table to an ostream (#48 ) (@levicki ) fixed Wcast-align warning spam on ARM fixed array::insert not working correctly in some cases fixed node::value_or() not having the same semantics as node::value() (#50 ) (@whiterabbit963 ) fixed 'misleading assignment' of rvalue node_views (#52 ) (@Reedbeta ) fixed some issues handling infinities and NaNs (#51 ) (@Reedbeta ) fixed some minor documentation issues Additions: added support for __fp16 , _Float16 , __float128 , __int128_t and __uint128_t added copy construction/assignment for arrays, tables and values added insert, emplace, push_back etc. compatibility with node_views added node::is_homogenous added table::is_homogenous added value::is_homogenous (just for generic code's sake) added is_homogenous overload for identifying failure-causing element added implicit conversion operator from node to node_view (#52 ) (@Reedbeta ) Changes: renamed TOML_ALL_INLINE to TOML_HEADER_ONLY (the old name will still work, but is no longer documented) general cleanup Released 2020-07-20
This release contains a fairly significant number of 'quality of life' improvements, yay! But also necessitates an ABI break (hence the version number bump). Changes that might block a migration are annotated with ⚠️.
Fixes: fixed infinity and NaN-related code breaking when using -ffast-math and friends fixed narrowing conversion warnings when constructing int values from unsigned fixed Visual Studio debugger native visualizations for date, time, time_offset , date_time fixed some static assert messages being badly formatted on clang fixed internal macro assert_or_assume leaking out of toml_parser.hpp Additions: added additional types allowed in node::value() and node::value_or() (see value() dox for examples ) added additional types allowed in node_view ::value() and node_view ::value_or() added node::value_exact() and node_view ::value_exact() added support for interop with wide strings on Windows:added wide-string path arg overloads of parse() and parse_file() added wide-string support to all relevant table and array ops added wide-string support to node::value(), node::value_or() added wide-string support to node_view ::value(), node_view ::value_or() added wide-string support to value<string> constructor added wide-string overloads of node_view ::operator[] added source_region ::wide_path() added TOML_WINDOWS_COMPAT switch for explicitly enabling/disabling this stuff added emission of 'literal' strings to the TOML serializer added lots of minor documentation fixes and improvements added Visual Studio debugger native visualizations for table, array, parse_result , and parse_error (#46 ) (@Reedbeta ) added non-template version of array::is_homogeneous() added explicit instantiations of more template types when !TOML_ALL_INLINE Changes: ⚠️ deprecated parse_result ::get() in favour of parse_result ::table() ⚠️ deprecated node_view ::get() in favour of node_view ::node() ⚠️ simplified internal ABI namespaces improved the quality of many static_assert error messages Removals: ⚠️ renamed date_time ::time_offset to just 'offset' ⚠️ removed TOML_CHAR_8_STRINGS since it no longer makes sense Released 2020-06-29
Fixes: fixed some minor TOML spec conformance bugs fixed BOM check causing EOF on very short iostream inputs fixed std:: numeric_limits:: max() getting broken by macros in some environments fixed 'unknown pragma' warning spam in older versions of GCC fixed a few minor documentation issues Additions: added rvalue overload of array::flatten added conformance tests from BurntSushi/toml-test and iarna/toml-spec-tests added toml:: inserter as a workaround for nested construction of single-element toml::arrays performing move-construction instead added license boilerplate to test files Changes: refactored the parser to reduce binary size Released 2020-06-19
Fixes: fixed single-digit negative integers parsing as positive fixed parse failure when parsing an empty file fixed multi-line strings being allowed in keys fixed overflow for very long binary integer literals Changes: improved the performance of toml:: parse_file improved the performance of printing to streams for deepy-nested TOML data Released 2020-06-02
Fixes: fixed formatter::print_inline() causing compilation failures in DLL builds fixed BOMs occasionally causing overflow/crash in char8 mode fixed some spurious warnings in GCC 10 fixed clang static analyzer warning in BOM handling code Additions: added table_iterator::operator -> added array::resize() and array::truncate() added array::capacity(), array::shrink_to_fit(), array::max_size() added non-const -> const conversion for table and array iterators Changes: renamed table iterator proxy pair members to first and second to match STL Released 2020-04-24
Fixes: fixed some multi-line string parsing issues fixed pedantic warnings on gcc 10 and clang 11 fixed is_unicode_XXXXXX functions being wrong in some cases fixed TOML_LIKELY not being correct on older versions of gcc and clang fixed minor documentation issues (#26 , #38 ) (@prince-chrismc ) Additions: added additional error message cases to the parser added error_printer example added toml_generator example Changes: improved unicode-related codegen Released 2020-04-11
Fixes: fixed printing of inf and nan fixed parser not handling floats with leading '.' characters fixed pedantic vtable warnings on clang with -Weverything fixed a number of documentation bugs fixed TOML_UNRELEASED_FEATURES default being 1 (it should have been 0) Additions: added TOML_PARSER configuration option added TOML_LIB_SINGLE_HEADER indicator added doxygen page for the configuration options added SPDX-License-Identifiers around the place Changes: split some header files up to make future maintenance easier refactored and greatly simplified parser Released 2020-04-07
Fixes: fixed some parsing and printing ops being locale-dependent fixed some parsing errors at EOF when TOML_EXCEPTIONS = 0 fixed some unreferenced variable warnings on older compilers fixed some 'maybe-uninitialized' false-positives on GCC9 fixed pkgconfig subdir being wrong Additions: added support for implementations without <charconv> added cmake package config generator (#22 ) (@GiulioRomualdi ) added build config feature option GENERATE_CMAKE_CONFIG added many new tests Released 2020-04-03
Fixes: fixed some parser error paths not returning early enough TOML_EXCEPTIONS=0 fixed a number of minor documentation issues Additions: added support for TOML 1.0.0-rc.1 🎉 added operator[], begin(), end() to toml:: parse_result for TOML_EXCEPTIONS=0 added additional compilation speed improvements for TOML_ALL_INLINE=0 added more specific error messages for parsing errors relating to prohibited codepoints added a large number of additional tests added support for installation with meson (#16 ) (@ximion ) added the array and table iterators to the toml namespace Released 2020-03-28
Fixes: fixed minor documentation issues Changes: refactoring of ABI-based inline namespaces Released 2020-03-24
Fixes: fixed minor preprocessor/macro issues fixed minor documentation issues Additions: added <cassert> include directly in 'debug' builds when TOML_ASSERT isn't defined added Clang's [[trivial_abi]] attribute to date, time, time_offset Released 2020-03-18
Fixes: fixed crash when reaching EOF while parsing a string when exceptions are disabled fixed some attribute warnings in GCC fixed build with GCC 8.2.0 (#15 ) (@shdnx ) fixed exception mode detection sometimes being incorrect on MSVC fixed compilation on older implementations without std:: launder fixed json_formatter type deduction on older compilers Additions: added support for Unicode 13.0 added support for \xHH escape sequences (toml/ pull/ 796 ) added short-form license preamble to all source files added build configuration option for compiling examples Released 2020-03-10
Fixes: fixed ICE in VS2019 when using /std:c++17 instead of /std:c++latest Additions: added #error when TOML_EXCEPTIONS is set to 1 but compiler exceptions were disabled Changes: parsing performance improvements Released 2020-03-05
Fixes: fixed parse_file() failing to compile with plain string literals fixed tests being built when used as a meson subproject (#14 ) (@shdnx ) Additions: added support for compiling into DLLs on windows (TOML_API) added support for explicitly setting the TOML_EXCEPTION mode added TOML_OPTIONAL_TYPE customization point added node::ref() and node_view ::ref() Released 2020-03-01
Fixes: fixed some pedantic clang warnings fixed some minor documentation errors Additions: added node::value() and node::value_or() added node_view ::value() added relops for the date/time classes added TOML_ALL_INLINE and TOML_IMPLEMENTATION options added preliminary support for ICC Removals: removed <cmath> dependency Released 2020-02-26
Fixes: fixed minor printing bug in operator<<(ostream, source_position ) fixed minor documentation issues Additions: Changes: improved quality of error messages for boolean and inf/nan parsing Released 2020-02-23
Fixes: fixed truncation of floating-point values when using ostreams fixed missing value deduction guides for dates and times fixed potential ODR issues relating to exception mode handling etc. fixed some documentation issues Additions: added serialization round-trip tests added node::is_number() added node_view ::is_number() added node_view ::value_or() added hexfloat parsing support for all implementations (not just <charconv> ones) Released 2020-02-20
First public release, yay! 🎉️
+Fixes Additions added support for using enums with value_or() Changes: renamed header files to have .hpp extension (toml.h is still present for backwards-compatibility) Build system: fixed meson builds with -Ddefault_library=static having hidden symbols on GNU compilers (#201 ) (@vlad0x00 ) Released 2023-01-29
Fixes: fixed null pointer dereference in parser when exceptions are disabled (#169 ) (@ncaklovic ) fixed spurious warnings in MSVC 19.34 fixed toml:: parse_file() on windows for non-ASCII paths fixed a spurious table redefinition error (#187 ) (@jorisvr ) fixed UB edge-case in integer parsing (#188 ) (@jorisvr ) fixed some build issues with Apple-flavoured Clang (#189 ) (@eddelbuettel ) Additions: Removals: Build system: Released 2022-08-29
Fixes: Additions: Changes: relaxed cvref requirements of is_homogeneous(), emplace(), emplace_back(), emplace_hint() relaxed mantissa and digits10 requirements of extended float support Released 2022-04-22
Fixes: fixed potential segfault when calling at_path() with an empty string fixed UB in internal unicode machinery (#144 ) (@kchalmer ) fixed a number of spurious warnings with Clang 10 (#145 , #146 ) (@chronoxor ) Additions: added toml:: array:: for_each() added toml:: table:: for_each() added config options TOML_EXPORTED_CLASS, TOML_EXPORTED_MEMBER_FUNCTION, TOML_EXPORTED_STATIC_FUNCTION & TOML_EXPORTED_FREE_FUNCTION added support for escape sequence \e when using TOML_ENABLE_UNRELEASED_FEATURES (toml/ 790 ) added support for more unicode in bare keys when using TOML_ENABLE_UNRELEASED_FEATURES (toml/ 891 ) Removals/Deprecations: deprecated old TOML_API option in favour new TOML_EXPORTED_X options (it will continue to work as it did before if none of the new function export options are defined) Build system: meson: added compile_library option (@Tachi107 ) meson: added ubsan_tests and ubsan_examples options meson: use system dependencies where available when building tests (@Tachi107 ) Released 2022-01-13
This is a single-bugfix release to fix an ODR issue for people using header-only mode in multiple translation units. If you aren't seeing linker errors because of toml::array::insert_at(), this release holds nothing of value over v3.0.0.
Fixes: fixed erroneous use of TOML_API causing ODR issue (#136 ) (@Azarael ) Released 2022-01-11
This release will be a major version bump, so it's ABI breaks all around. Any changes that are likely to cause migration issues (API changes, build system breakage, etc.) are indicated with ⚠️.
Fixes: ⚠️ fixed toml:: table init-list constructor requiring double-brackets ⚠️ fixed TOML_API + extern templates causing linker errors in some circumstances ⚠️ fixed incorrect noexcept specifications on many functions ⚠️ fixed missing TOML_API on some interfaces fixed toml:: json_formatter not formatting inf and nan incorrectly fixed a number of spec conformance issues (#127 , #128 , #129 , #130 , #131 , #132 , #135 ) (@moorereason ) fixed an illegal table redefinition edge case (#112 ) (@python36 ) fixed documentation issues fixed GCC bug causing memory leak during parse failures (#123 , #124 ) (@rsmmr , @ronalabraham ) fixed incorrect handling of vertical whitespace in keys when printing TOML to streams fixed incorrect source position in redefinition error messages fixed missing includes <initializer_list>, <utility> fixed parser not correctly round-tripping the format of binary and octal integers in some cases fixed some incorrect unicode scalar sequence transformations (#125 ) fixed strong exception guarantee edge-cases in toml:: table and toml:: array Additions: Changes: ⚠️ toml:: format_flags is now backed by uint64_t (was previously uint8_t ) ⚠️ toml:: source_index is now an alias for uint32_t unconditionally (was previously dependent on TOML_LARGE_FILES) ⚠️ toml:: table now uses toml:: key as the key type (was previously std:: string ) ⚠️ toml:: value_flags is now backed by uint16_t (was previously uint8_t ) ⚠️ made all overloaded operators 'hidden friends' where possible ⚠️ renamed toml:: default_formatter to toml:: toml_formatter (toml:: default_formatter is now an alias) ⚠️ renamed TOML_PARSER option to TOML_ENABLE_PARSER (TOML_PARSER will continue to work but is deprecated) ⚠️ renamed TOML_UNRELEASED_FEATURES to TOML_ENABLE_UNRELEASED_FEATURES (TOML_UNRELEASED_FEATURES will continue to work but is deprecated) ⚠️ renamed TOML_WINDOWS_COMPAT to TOML_ENABLE_WINDOWS_COMPAT (TOML_WINDOWS_COMPAT will continue to work but is deprecated) applied clang-format to all the things 🎉️ exposed TOML_NAMESPACE_START and TOML_NAMESPACE_END macros to help with ADL specialization scenarios improved performance of parser made date/time constructors accept any integral types moved all implementation headers to /impl renamed all implementation headers to .h and 'source' headers to .inl updated conformance tests Removals: ⚠️ removed toml::format_flags::allow_value_format_flags ⚠️ removed TOML_LARGE_FILES (it is now default - explicitly setting TOML_LARGE_FILES to 0 will invoke an #error) ⚠️ removed unnecessary template machinery (esp. where ostreams were involved) removed unnecessary uses of final Build system: ⚠️ increased minimum required meson version to 0.54.0 disabled 'install' path when being used as a meson subproject (#114 ) (@Tachi107 ) fixed builds failing with meson 0.6.0 (#117 ) (@Tachi107 ) general meson improvements and fixes (#115 ) (@Tachi107 ) used override_dependency where supported (#116 ) (@Tachi107 ) Released 2021-07-11
Fixes: fixed linkage error with windows compat mode fixed TOML_CONSTEVAL broken in MSVC (again) fixed minor documentation bugs fixed cmake project version being incorrect (#110 ) (@GiulioRomualdi ) Additions: added support for lowercase 't' and 'z' in datetimes (per spec) added natvis file to cmake install (#106 ) (@Ryan-rsm-McKenzie ) added VS cpp.hint file to cmake install added metafunctions is_container, is_chronological, is_value, is_node, inserted_type_of Changes: improved debug code size by removing unnecessary std::forwards and std::moves modernized the CMake build files (#102 , #103 , #105 ) (@friendlyanon ) updated conformance tests Released 2021-05-19
Fixes: fixed node::value() not retrieving inf and nan correctly fixed dotted kvps being unable to add subtables (#61 ) (@Validark ) fixed linker error on linux ICC (#83 ) (@blackwer ) fixed segfault JSON-formatting a failed parse_result (#96 ) (@proydakov ) fixed spurious newline after JSON formatting a table fixed VS intellisense not detecting TOML_COMPILER_EXCEPTIONS correctly fixed crash with pathologically-nested inputs (#100 ) (@geeknik ) fixed parse_result natvis fixed false-positive char8_t support detection on older compilers fixed unnecessary #include <Windows.h> Windows builds (@BeastLe9enD ) fixed TOML_CONSTEVAL breaking on VS 16.10.0pre2 fixed spurious warnings with MSVC /Wall fixed missing blank lines between consecutive empty tables/A-o-T fixed unnecessary TOML_API declarations fixed many small documentation issues Additions: Removals: removed explicit #include <fstream> requirement for parse_file() Released 2020-12-29
Fixes: fixed compiler errors caused by <charconv> with Apple-flavoured clang fixed array and table iterators missing iterator_category (#77 ) (@HazardyKnusperkeks ) fixed Wuseless-cast warnings on GCC 10 (#75 ) (@HazardyKnusperkeks ) fixed formatter not correctly line wrapping in some rare circumstances (#73 ) (@89z ) fixed an unnecessary global compiler flag breaking builds when used as a meson subproject (#72 ) (@jamabr ) fixed link error caused by <charconv> on emscripten (#71 ) (@suy ) fixed ambiguity with the toml:: literals inline namespace (#69 ) (@std-any-emplace ) fixed formatter emitting superfluous newlines after printing tables (#68 ) (@std-any-emplace ) fixed array and table iterators not converting between const and non-const versions of themselves (#67 ) (@std-any-emplace ) fixed some parser crashes when given pathologically-malformed UTF-8 (#65 ) (@sneves ) Released 2020-08-09
Fixes: fixed some issues building with VS2017 (#55 ) (@sobczyk ) fixed _Float16 erroneously detected as supported on g++ (#57 ) (@sobczyk ) fixed <Windows.h> causing compilation failure on mingw (#63 ) (@rezahousseini ) fixed CMake and pkg-config files not being installed into architecture-agnostic directories (#59 ) (@tambry ) fixed memory leak during parsing (#64 ) (@sneves ) fixed ambiguous operator== error on MSVC (#56 ) (@HellsingDarge ) Additions: added additional node_view constructors added ability to specify serialization format of integer values added integer value serialization format round trip (e.g. hex in, hex out) Changes: updated conformance tests TOML version bump to v1.0.0-rc.3 refactors and cleanups based on feedback given here Build system: renamed build options to snake_case tests, examples and cmake config now explicitly disabled when used as a subproject removed small_binaries (it's now implicit when building as release) bumped minimum meson version to 0.53 Released 2020-07-11
Fixes: fixed inconsistent emission of leading/trailing newlines when writing a table to an ostream (#48 ) (@levicki ) fixed Wcast-align warning spam on ARM fixed array::insert not working correctly in some cases fixed node::value_or() not having the same semantics as node::value() (#50 ) (@whiterabbit963 ) fixed 'misleading assignment' of rvalue node_views (#52 ) (@Reedbeta ) fixed some issues handling infinities and NaNs (#51 ) (@Reedbeta ) fixed some minor documentation issues Additions: added support for __fp16 , _Float16 , __float128 , __int128_t and __uint128_t added copy construction/assignment for arrays, tables and values added insert, emplace, push_back etc. compatibility with node_views added node::is_homogenous added table::is_homogenous added value::is_homogenous (just for generic code's sake) added is_homogenous overload for identifying failure-causing element added implicit conversion operator from node to node_view (#52 ) (@Reedbeta ) Changes: renamed TOML_ALL_INLINE to TOML_HEADER_ONLY (the old name will still work, but is no longer documented) general cleanup Released 2020-07-20
This release contains a fairly significant number of 'quality of life' improvements, yay! But also necessitates an ABI break (hence the version number bump). Changes that might block a migration are annotated with ⚠️.
Fixes: fixed infinity and NaN-related code breaking when using -ffast-math and friends fixed narrowing conversion warnings when constructing int values from unsigned fixed Visual Studio debugger native visualizations for date, time, time_offset , date_time fixed some static assert messages being badly formatted on clang fixed internal macro assert_or_assume leaking out of toml_parser.hpp Additions: added additional types allowed in node::value() and node::value_or() (see value() dox for examples ) added additional types allowed in node_view ::value() and node_view ::value_or() added node::value_exact() and node_view ::value_exact() added support for interop with wide strings on Windows:added wide-string path arg overloads of parse() and parse_file() added wide-string support to all relevant table and array ops added wide-string support to node::value(), node::value_or() added wide-string support to node_view ::value(), node_view ::value_or() added wide-string support to value<string> constructor added wide-string overloads of node_view ::operator[] added source_region ::wide_path() added TOML_WINDOWS_COMPAT switch for explicitly enabling/disabling this stuff added emission of 'literal' strings to the TOML serializer added lots of minor documentation fixes and improvements added Visual Studio debugger native visualizations for table, array, parse_result , and parse_error (#46 ) (@Reedbeta ) added non-template version of array::is_homogeneous() added explicit instantiations of more template types when !TOML_ALL_INLINE Changes: ⚠️ deprecated parse_result ::get() in favour of parse_result ::table() ⚠️ deprecated node_view ::get() in favour of node_view ::node() ⚠️ simplified internal ABI namespaces improved the quality of many static_assert error messages Removals: ⚠️ renamed date_time ::time_offset to just 'offset' ⚠️ removed TOML_CHAR_8_STRINGS since it no longer makes sense Released 2020-06-29
Fixes: fixed some minor TOML spec conformance bugs fixed BOM check causing EOF on very short iostream inputs fixed std:: numeric_limits:: max() getting broken by macros in some environments fixed 'unknown pragma' warning spam in older versions of GCC fixed a few minor documentation issues Additions: added rvalue overload of array::flatten added conformance tests from BurntSushi/toml-test and iarna/toml-spec-tests added toml:: inserter as a workaround for nested construction of single-element toml::arrays performing move-construction instead added license boilerplate to test files Changes: refactored the parser to reduce binary size Released 2020-06-19
Fixes: fixed single-digit negative integers parsing as positive fixed parse failure when parsing an empty file fixed multi-line strings being allowed in keys fixed overflow for very long binary integer literals Changes: improved the performance of toml:: parse_file improved the performance of printing to streams for deepy-nested TOML data Released 2020-06-02
Fixes: fixed formatter::print_inline() causing compilation failures in DLL builds fixed BOMs occasionally causing overflow/crash in char8 mode fixed some spurious warnings in GCC 10 fixed clang static analyzer warning in BOM handling code Additions: added table_iterator::operator -> added array::resize() and array::truncate() added array::capacity(), array::shrink_to_fit(), array::max_size() added non-const -> const conversion for table and array iterators Changes: renamed table iterator proxy pair members to first and second to match STL Released 2020-04-24
Fixes: fixed some multi-line string parsing issues fixed pedantic warnings on gcc 10 and clang 11 fixed is_unicode_XXXXXX functions being wrong in some cases fixed TOML_LIKELY not being correct on older versions of gcc and clang fixed minor documentation issues (#26 , #38 ) (@prince-chrismc ) Additions: added additional error message cases to the parser added error_printer example added toml_generator example Changes: improved unicode-related codegen Released 2020-04-11
Fixes: fixed printing of inf and nan fixed parser not handling floats with leading '.' characters fixed pedantic vtable warnings on clang with -Weverything fixed a number of documentation bugs fixed TOML_UNRELEASED_FEATURES default being 1 (it should have been 0) Additions: added TOML_PARSER configuration option added TOML_LIB_SINGLE_HEADER indicator added doxygen page for the configuration options added SPDX-License-Identifiers around the place Changes: split some header files up to make future maintenance easier refactored and greatly simplified parser Released 2020-04-07
Fixes: fixed some parsing and printing ops being locale-dependent fixed some parsing errors at EOF when TOML_EXCEPTIONS = 0 fixed some unreferenced variable warnings on older compilers fixed some 'maybe-uninitialized' false-positives on GCC9 fixed pkgconfig subdir being wrong Additions: added support for implementations without <charconv> added cmake package config generator (#22 ) (@GiulioRomualdi ) added build config feature option GENERATE_CMAKE_CONFIG added many new tests Released 2020-04-03
Fixes: fixed some parser error paths not returning early enough TOML_EXCEPTIONS=0 fixed a number of minor documentation issues Additions: added support for TOML 1.0.0-rc.1 🎉 added operator[], begin(), end() to toml:: parse_result for TOML_EXCEPTIONS=0 added additional compilation speed improvements for TOML_ALL_INLINE=0 added more specific error messages for parsing errors relating to prohibited codepoints added a large number of additional tests added support for installation with meson (#16 ) (@ximion ) added the array and table iterators to the toml namespace Released 2020-03-28
Fixes: fixed minor documentation issues Changes: refactoring of ABI-based inline namespaces Released 2020-03-24
Fixes: fixed minor preprocessor/macro issues fixed minor documentation issues Additions: added <cassert> include directly in 'debug' builds when TOML_ASSERT isn't defined added Clang's [[trivial_abi]] attribute to date, time, time_offset Released 2020-03-18
Fixes: fixed crash when reaching EOF while parsing a string when exceptions are disabled fixed some attribute warnings in GCC fixed build with GCC 8.2.0 (#15 ) (@shdnx ) fixed exception mode detection sometimes being incorrect on MSVC fixed compilation on older implementations without std:: launder fixed json_formatter type deduction on older compilers Additions: added support for Unicode 13.0 added support for \xHH escape sequences (toml/ pull/ 796 ) added short-form license preamble to all source files added build configuration option for compiling examples Released 2020-03-10
Fixes: fixed ICE in VS2019 when using /std:c++17 instead of /std:c++latest Additions: added #error when TOML_EXCEPTIONS is set to 1 but compiler exceptions were disabled Changes: parsing performance improvements Released 2020-03-05
Fixes: fixed parse_file() failing to compile with plain string literals fixed tests being built when used as a meson subproject (#14 ) (@shdnx ) Additions: added support for compiling into DLLs on windows (TOML_API) added support for explicitly setting the TOML_EXCEPTION mode added TOML_OPTIONAL_TYPE customization point added node::ref() and node_view ::ref() Released 2020-03-01
Fixes: fixed some pedantic clang warnings fixed some minor documentation errors Additions: added node::value() and node::value_or() added node_view ::value() added relops for the date/time classes added TOML_ALL_INLINE and TOML_IMPLEMENTATION options added preliminary support for ICC Removals: removed <cmath> dependency Released 2020-02-26
Fixes: fixed minor printing bug in operator<<(ostream, source_position ) fixed minor documentation issues Additions: Changes: improved quality of error messages for boolean and inf/nan parsing Released 2020-02-23
Fixes: fixed truncation of floating-point values when using ostreams fixed missing value deduction guides for dates and times fixed potential ODR issues relating to exception mode handling etc. fixed some documentation issues Additions: added serialization round-trip tests added node::is_number() added node_view ::is_number() added node_view ::value_or() added hexfloat parsing support for all implementations (not just <charconv> ones) Released 2020-02-20
First public release, yay! 🎉️