diff --git a/CHANGELOG.md b/CHANGELOG.md index ff3a7e4..e36ce9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,14 @@ template: - fixed error in README (#195) (@andrewkcorcoran) - fixed compiler error when using NVCC (#198) (@thompsonnoahe) +#### 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) +

## v3.3.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f117016..f8b241f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,21 +3,21 @@ Contributions are very welcome! Either by [reporting issues] or submitting pull requests. If you wish to submit a PR, please be aware that: -- The single-header file `toml.hpp` is generated by a script; make your changes in the files in - `include`, **not** in `toml.hpp`. +- The single-header `toml.hpp` at the repository root is generated by a script, so don't change it directly; make your + changes in the files in `include`. - Your changes should compile warning-free on at least one of: - GCC 8 or higher - Clang 8 or higher - MSVC 19.2X (Visual Studio 2019) or higher -- You should regenerate the single-header file as part of your PR (a CI check will fail if you don't). +- You should regenerate the single-header version of `toml.hpp` as part of your PR (a CI check will fail if you don't).
-## Regenerating toml.hpp +## Regenerating the single-header toml.hpp 1. Make your changes as necessary - If you've added a new header file that isn't going to be transitively included by one of the - others, add an include directive to `include/toml++/toml.h` + others, add an include directive to `include/toml++/toml.hpp` 2. Install the prerequisite python packages: `pip3 install -r tools/requirements.txt` 3. Run `tools/generate_single_header.py` diff --git a/README.md b/README.md index 4fa63f7..b66d140 100644 --- a/README.md +++ b/README.md @@ -19,23 +19,23 @@ ## Library features -- 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](https://github.com/BurntSushi/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 (6+), GCC (7+) and MSVC (VS2019) -- Tested on x64, x86 and ARM +- 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](https://github.com/BurntSushi/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 (6+), GCC (7+) and MSVC (VS2019) +- Tested on x64, x86 and ARM
## Basic usage -> ℹ️ _The following example favours brevity. If you'd prefer full API documentation and lots of specific code snippets -instead, visit the project [homepage]_ +> ℹ️ _The following example favours brevity. If you'd prefer full API documentation and lots of specific code +> snippets instead, visit the project [homepage]_ Given a [TOML] file `configuration.toml` containing the following: @@ -98,7 +98,7 @@ You'll find some more code examples in the `examples` directory, and plenty more ## Adding toml++ to your project -`toml++` comes in two flavours: Single-header and Regular. The API is the same for both. +`toml++` comes in two flavours: Single-header and Regular. The API is the same for both. ### 🍦️ Single-header flavour @@ -109,7 +109,7 @@ You'll find some more code examples in the `examples` directory, and plenty more 1. Clone the repository 2. Add `tomlplusplus/include` to your include paths -3. `#include ` +3. `#include ` ### Conan @@ -133,7 +133,7 @@ depends: [ ```json { - "marzer/tomlplusplus": { } + "marzer/tomlplusplus": {} } ``` @@ -199,29 +199,29 @@ See [CONTRIBUTING] for information. A number of configurable options are exposed in the form of preprocessor `#defines` Most likely you won't need to mess with these at all, but if you do, set them before including toml++. -| Option | Type | Description | Default | -|-----------------------------------|:--------------:|----------------------------------------------------------------------------------------------------------|------------------------| -| `TOML_ASSERT(expr)` | function macro | Sets the assert function used by the library. | `assert()` | -| `TOML_CALLCONV` | define | Calling convention to apply to exported free/static functions. | undefined | -| `TOML_CONFIG_HEADER` | string literal | Includes the given header file before the rest of the library. | undefined | -| `TOML_ENABLE_FORMATTERS` | boolean | Enables the formatters. Set to `0` if you don't need them to improve compile times and binary size. | `1` | -| `TOML_ENABLE_FLOAT16` | boolean | Enables support for the built-in `_Float16` type. | per compiler settings | -| `TOML_ENABLE_PARSER` | boolean | Enables the parser. Set to `0` if you don't need it to improve compile times and binary size. | `1` | -| `TOML_ENABLE_UNRELEASED_FEATURES` | boolean | Enables support for [unreleased TOML language features]. | `0` | -| `TOML_ENABLE_WINDOWS_COMPAT` | boolean | Enables support for transparent conversion between wide and narrow strings. | `1` on Windows | -| `TOML_EXCEPTIONS` | boolean | Sets whether the library uses exceptions. | per compiler settings | -| `TOML_EXPORTED_CLASS` | define | API export annotation to add to classes. | undefined | -| `TOML_EXPORTED_MEMBER_FUNCTION` | define | API export annotation to add to non-static class member functions. | undefined | -| `TOML_EXPORTED_FREE_FUNCTION` | define | API export annotation to add to free functions. | undefined | -| `TOML_EXPORTED_STATIC_FUNCTION` | define | API export annotation to add to static functions. | undefined | -| `TOML_HEADER_ONLY` | boolean | Disable this to explicitly control where toml++'s implementation is compiled (e.g. as part of a library).| `1` | -| `TOML_IMPLEMENTATION` | define | Define this to enable compilation of the library's implementation when `TOML_HEADER_ONLY` == `0`. | undefined | -| `TOML_OPTIONAL_TYPE` | type name | Overrides the `optional` type used by the library if you need [something better than std::optional]. | undefined | -| `TOML_SMALL_FLOAT_TYPE` | type name | If your codebase has a custom 'small float' type (e.g. half-precision), this tells toml++ about it. | undefined | -| `TOML_SMALL_INT_TYPE` | type name | If your codebase has a custom 'small integer' type (e.g. 24-bits), this tells toml++ about it. | undefined | +| Option | Type | Description | Default | +| --------------------------------- | :------------: | --------------------------------------------------------------------------------------------------------- | --------------------- | +| `TOML_ASSERT(expr)` | function macro | Sets the assert function used by the library. | `assert()` | +| `TOML_CALLCONV` | define | Calling convention to apply to exported free/static functions. | undefined | +| `TOML_CONFIG_HEADER` | string literal | Includes the given header file before the rest of the library. | undefined | +| `TOML_ENABLE_FORMATTERS` | boolean | Enables the formatters. Set to `0` if you don't need them to improve compile times and binary size. | `1` | +| `TOML_ENABLE_FLOAT16` | boolean | Enables support for the built-in `_Float16` type. | per compiler settings | +| `TOML_ENABLE_PARSER` | boolean | Enables the parser. Set to `0` if you don't need it to improve compile times and binary size. | `1` | +| `TOML_ENABLE_UNRELEASED_FEATURES` | boolean | Enables support for [unreleased TOML language features]. | `0` | +| `TOML_ENABLE_WINDOWS_COMPAT` | boolean | Enables support for transparent conversion between wide and narrow strings. | `1` on Windows | +| `TOML_EXCEPTIONS` | boolean | Sets whether the library uses exceptions. | per compiler settings | +| `TOML_EXPORTED_CLASS` | define | API export annotation to add to classes. | undefined | +| `TOML_EXPORTED_MEMBER_FUNCTION` | define | API export annotation to add to non-static class member functions. | undefined | +| `TOML_EXPORTED_FREE_FUNCTION` | define | API export annotation to add to free functions. | undefined | +| `TOML_EXPORTED_STATIC_FUNCTION` | define | API export annotation to add to static functions. | undefined | +| `TOML_HEADER_ONLY` | boolean | Disable this to explicitly control where toml++'s implementation is compiled (e.g. as part of a library). | `1` | +| `TOML_IMPLEMENTATION` | define | Define this to enable compilation of the library's implementation when `TOML_HEADER_ONLY` == `0`. | undefined | +| `TOML_OPTIONAL_TYPE` | type name | Overrides the `optional` type used by the library if you need [something better than std::optional]. | undefined | +| `TOML_SMALL_FLOAT_TYPE` | type name | If your codebase has a custom 'small float' type (e.g. half-precision), this tells toml++ about it. | undefined | +| `TOML_SMALL_INT_TYPE` | type name | If your codebase has a custom 'small integer' type (e.g. 24-bits), this tells toml++ about it. | undefined | > ℹ️ _A number of these have ABI implications; the library uses inline namespaces to prevent you from accidentally -linking incompatible combinations together._ +> linking incompatible combinations together._
@@ -236,14 +236,14 @@ defines `TOML_LANG_MAJOR`, `TOML_LANG_MINOR` and `TOML_LANG_PATCH`. ### **Unreleased language features:** -- [#516]: Allow newlines and trailing commas in inline tables -- [#562]: Allow hex floating-point values -- [#644]: Support `+` in key names -- [#671]: Local time of day format should support `09:30` as opposed to `09:30:00` -- [#687]: Relax bare key restrictions to allow additional unicode characters -- [#790]: Include an `\e` escape code sequence (shorthand for `\u001B`) -- [#796]: Include an `\xHH` escape code sequence -- [#891]: Allow non-English scripts for unquoted keys +- [#516]: Allow newlines and trailing commas in inline tables +- [#562]: Allow hex floating-point values +- [#644]: Support `+` in key names +- [#671]: Local time of day format should support `09:30` as opposed to `09:30:00` +- [#687]: Relax bare key restrictions to allow additional unicode characters +- [#790]: Include an `\e` escape code sequence (shorthand for `\u001B`) +- [#796]: Include an `\xHH` escape code sequence +- [#891]: Allow non-English scripts for unquoted keys > ℹ️ _`#define TOML_ENABLE_UNRELEASED_FEATURES 1` to enable these features (see [Configuration](#Configuration))._ @@ -251,11 +251,11 @@ defines `TOML_LANG_MAJOR`, `TOML_LANG_MINOR` and `TOML_LANG_PATCH`. All features supported, including: -- [#356]: Allow leading zeros in the exponent part of a float -- [#567]: Control characters are not permitted in comments -- [#571]: Allow raw tabs inside strings -- [#665]: Make arrays heterogeneous -- [#766]: Allow comments before commas in arrays +- [#356]: Allow leading zeros in the exponent part of a float +- [#567]: Control characters are not permitted in comments +- [#571]: Allow raw tabs inside strings +- [#665]: Make arrays heterogeneous +- [#766]: Allow comments before commas in arrays ### 🔹️ **TOML v0.5.0:** @@ -278,30 +278,30 @@ UTF-8 decoding is performed using a state machine based on Bjoern Hoehrmann's '[ ### With thanks to: -- **[@beastle9end](https://github.com/beastle9end)** - Made Windows.h include bypass -- **[@bjadamson](https://github.com/bjadamson)** - Reported some bugs and helped design a new feature -- **[@bobfang1992](https://github.com/bobfang1992)** - Reported a bug and created a [wrapper in python](https://github.com/bobfang1992/pytomlpp) -- **[@GiulioRomualdi](https://github.com/GiulioRomualdi)** - Added cmake+meson support -- **[@jonestristand](https://github.com/jonestristand)** - Designed and implemented the `toml::path`s feature -- **[@kcsaul](https://github.com/kcsaul)** - Fixed a bug -- **[@levicki](https://github.com/levicki)** - Helped design some new features -- **[@moorereason](https://github.com/moorereason)** - Reported a whole bunch of bugs -- **[@mosra](https://github.com/mosra)** - Created the awesome [m.css] used to generate the API docs -- **[@ned14](https://github.com/ned14)** - Reported a bunch of bugs and helped design some new features -- **[@okureta](https://github.com/okureta)** - Reported a bug -- **[@prince-chrismc](https://github.com/prince-chrismc)** - Added toml++ to ConanCenter, and fixed some typos -- **[@rbrugo](https://github.com/rbrugo)** - Helped design a new feature -- **[@Reedbeta](https://github.com/Reedbeta)** - Fixed a bug and added additional Visual Studio debugger native visualizers -- **[@Ryan-rsm-McKenzie](https://github.com/Ryan-rsm-McKenzie)** - Add natvis file to cmake install script -- **[@shdnx](https://github.com/shdnx)** - Fixed a bug on GCC 8.2.0 and some meson config issues -- **[@sneves](https://github.com/sneves)** - Helped fix a number of parser bugs -- **[@sobczyk](https://github.com/sobczyk)** - Reported some bugs -- **[@std-any-emplace](https://github.com/std-any-emplace)** - Reported some bugs -- **[@Tachi107](https://github.com/Tachi107)** - Made some tweaks to meson.build, added compile_library build option -- **[@traversaro](https://github.com/traversaro)** - Added vcpkg support and reported a bunch of bugs -- **[@whiterabbit963](https://github.com/whiterabbit963)** - Fixed a bug with value_or conversions -- **[@ximion](https://github.com/ximion)** - Added support for installation with meson -- **[@a-is](https://github.com/a-is)** - Fixed a bug +- **[@beastle9end](https://github.com/beastle9end)** - Made Windows.h include bypass +- **[@bjadamson](https://github.com/bjadamson)** - Reported some bugs and helped design a new feature +- **[@bobfang1992](https://github.com/bobfang1992)** - Reported a bug and created a [wrapper in python](https://github.com/bobfang1992/pytomlpp) +- **[@GiulioRomualdi](https://github.com/GiulioRomualdi)** - Added cmake+meson support +- **[@jonestristand](https://github.com/jonestristand)** - Designed and implemented the `toml::path`s feature +- **[@kcsaul](https://github.com/kcsaul)** - Fixed a bug +- **[@levicki](https://github.com/levicki)** - Helped design some new features +- **[@moorereason](https://github.com/moorereason)** - Reported a whole bunch of bugs +- **[@mosra](https://github.com/mosra)** - Created the awesome [m.css] used to generate the API docs +- **[@ned14](https://github.com/ned14)** - Reported a bunch of bugs and helped design some new features +- **[@okureta](https://github.com/okureta)** - Reported a bug +- **[@prince-chrismc](https://github.com/prince-chrismc)** - Added toml++ to ConanCenter, and fixed some typos +- **[@rbrugo](https://github.com/rbrugo)** - Helped design a new feature +- **[@Reedbeta](https://github.com/Reedbeta)** - Fixed a bug and added additional Visual Studio debugger native visualizers +- **[@Ryan-rsm-McKenzie](https://github.com/Ryan-rsm-McKenzie)** - Add natvis file to cmake install script +- **[@shdnx](https://github.com/shdnx)** - Fixed a bug on GCC 8.2.0 and some meson config issues +- **[@sneves](https://github.com/sneves)** - Helped fix a number of parser bugs +- **[@sobczyk](https://github.com/sobczyk)** - Reported some bugs +- **[@std-any-emplace](https://github.com/std-any-emplace)** - Reported some bugs +- **[@Tachi107](https://github.com/Tachi107)** - Made some tweaks to meson.build, added compile_library build option +- **[@traversaro](https://github.com/traversaro)** - Added vcpkg support and reported a bunch of bugs +- **[@whiterabbit963](https://github.com/whiterabbit963)** - Fixed a bug with value_or conversions +- **[@ximion](https://github.com/ximion)** - Added support for installation with meson +- **[@a-is](https://github.com/a-is)** - Fixed a bug
@@ -310,11 +310,11 @@ UTF-8 decoding is performed using a state machine based on Bjoern Hoehrmann's '[ For bug reports and feature requests please consider using the [issues] system here on GitHub. For anything else though you're welcome to reach out via other means. In order of likely response time: -- Gitter: [marzer/tomlplusplus](https://gitter.im/marzer/tomlplusplus) ("Discord for repos") -- Twitter: [marzer8789](https://twitter.com/marzer8789) -- Email: [mark.gillard@outlook.com.au](mailto:mark.gillard@outlook.com.au) -- Facebook: [marzer](https://www.facebook.com/marzer) -- LinkedIn: [marzer](https://www.linkedin.com/in/marzer/) +- Gitter: [marzer/tomlplusplus](https://gitter.im/marzer/tomlplusplus) ("Discord for repos") +- Twitter: [marzer8789](https://twitter.com/marzer8789) +- Email: [mark.gillard@outlook.com.au](mailto:mark.gillard@outlook.com.au) +- Facebook: [marzer](https://www.facebook.com/marzer) +- LinkedIn: [marzer](https://www.linkedin.com/in/marzer/) [API documentation]: https://marzer.github.io/tomlplusplus/ [homepage]: https://marzer.github.io/tomlplusplus/ diff --git a/docs/pages/main_page.dox b/docs/pages/main_page.md similarity index 72% rename from docs/pages/main_page.dox rename to docs/pages/main_page.md index 184b36b..061fe8c 100644 --- a/docs/pages/main_page.dox +++ b/docs/pages/main_page.md @@ -1,12 +1,11 @@ -/*! +@mainpage toml++ +@image html banner.svg width=1280px +@tableofcontents -\mainpage toml++ -\image html banner.svg width=1280px -\tableofcontents + +@section mainpage-features Features - -\section mainpage-features Features - Header-only (optional!) - Supports the latest [TOML](https://toml.io/) release ([v1.0.0](https://toml.io/en/v1.0.0)), plus optional support for some unreleased TOML features @@ -19,24 +18,25 @@ - Tested on Clang (6+), GCC (7+) and MSVC (VS2019) - Tested on x64, x86 and ARM + +@section mainpage-api-documentation API documentation -\section mainpage-api-documentation API documentation 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. + +@section mainpage-example Basic examples -\section mainpage-example Basic examples + - - -\subsection mainpage-example-parsing-files Parsing files +@subsection mainpage-example-parsing-files Parsing files Call toml::parse_file() and work with the toml::table you get back, or handle any toml::parse_error that gets thrown: -\cpp +@cpp #include -#include +#include int main(int argc, char** argv) { @@ -55,25 +55,25 @@ int main(int argc, char** argv) return 0; } -\endcpp +@endcpp -\see +@see - toml::parse_file() - toml::table - toml::parse_error + - -\subsection mainpage-example-parsing-strings Parsing strings and iostreams +@subsection mainpage-example-parsing-strings Parsing strings and iostreams Call toml::parse() and work with the toml::table you get back, or handle any toml::parse_error that gets thrown: -\godbolt{NsR-xf} +@godbolt{NsR-xf} -\cpp +@cpp #include #include -#include +#include using namespace std::string_view_literals; int main() @@ -108,9 +108,9 @@ int main() return 0; } -\endcpp +@endcpp -\out +@out [library] authors = [ 'Mark Gillard ' ] cpp = 17 @@ -120,25 +120,26 @@ name = 'toml++' authors = [ 'Mark Gillard ' ] cpp = 17 name = 'toml++' -\endout +@endout -\see +@see - toml::parse_file() - toml::table - toml::parse_error + +@subsection mainpage-example-parsing-without-exceptions Handling errors without exceptions -\subsection mainpage-example-parsing-without-exceptions Handling errors without exceptions 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: -\cpp +@cpp #include #define TOML_EXCEPTIONS 0 // only necessary if you've left them enabled in your compiler -#include +#include int main() { @@ -152,22 +153,23 @@ int main() do_stuff_with_your_config(std::move(result).table()); // 'steal' the table from the result return 0; } -\endcpp +@endcpp + +@subsection mainpage-example-custom-error-formatting Custom error formatting -\subsection mainpage-example-custom-error-formatting Custom error formatting The examples above use an overloaded `operator<<` with ostreams to print basic error messages, and look like this: -\out +@out Error while parsing key: expected bare key starting character or string delimiter, saw '?' (error occurred at line 2, column 5) -\endout +@endout 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: -\cpp +@cpp toml::table tbl; try { @@ -181,25 +183,26 @@ catch (const toml::parse_error& err) << "\n (" << err.source().begin << ")\n"; return 1; } -\endcpp +@endcpp -\see +@see - toml::parse_error - toml::source_region - toml::source_position + +@subsection mainpage-example-manipulations Working with TOML data -\subsection mainpage-example-manipulations Working with TOML data 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: -\godbolt{TnevafTKd} +@godbolt{TnevafTKd} -\cpp +@cpp #include -#include +#include using namespace std::string_view_literals; int main() @@ -267,9 +270,9 @@ int main() return 0; } -\endcpp +@endcpp -\out +@out hello world hello world hello world @@ -281,27 +284,28 @@ numbers: [ 2, 3, 4, 'five', 6.0, 7, [ 8, 9 ] ] cats: [ 'tiger', 'lion', 'puma' ] fish[1]: 'trout' dinosaurs: -\endout +@endout -\see +@see - toml::node - toml::node_view - toml::value - toml::array - toml::table + +@subsection mainpage-example-serialization Serializing as TOML, JSON and YAML -\subsection mainpage-example-serialization Serializing as TOML, JSON and YAML 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. -\godbolt{srdfoWMq6} +@godbolt{srdfoWMq6} -\cpp +@cpp #include -#include +#include int main() { @@ -332,9 +336,9 @@ int main() return 0; } -\endcpp +@endcpp -\out +@out ###### TOML ###### cpp = [ 17, 20, 'and beyond' ] @@ -383,16 +387,17 @@ repo: 'https://github.com/marzer/tomlplusplus/' toml: - '1.0.0' - 'and beyond' -\endout +@endout -\see +@see - toml::toml_formatter - toml::json_formatter - toml::yaml_formatter + +@subsection mainpage-example-speed-up-compilation Speeding up compilation -\subsection mainpage-example-speed-up-compilation Speeding up compilation 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 @@ -402,21 +407,21 @@ where the library's implementation is compiled. 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: -\cpp +@cpp // global_header_that_includes_toml++.h #define TOML_HEADER_ONLY 0 #include -\endcpp +@endcpp Step 2: Define #TOML_IMPLEMENTATION before including toml++ in one specific translation unit -\cpp +@cpp // some_code_file.cpp #define TOML_IMPLEMENTATION #include "global_header_that_includes_toml++.h" -\endcpp +@endcpp Bonus Step: Disable any library features you don't need @@ -425,22 +430,21 @@ For example, if all you need to do is serialize some code-generated TOML and don 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. +@see @ref configuration -\see \ref configuration + +@section mainpage-adding-lib Adding toml++ to your project + -\section mainpage-adding-lib Adding toml++ to your project +@subsection mainpage-adding-lib-old-school "The old fashioned way" -\m_class{m-note m-default} +@m_class{m-note m-default} The library comes in two flavours, [emoji icecream] Single-header and [emoji sundae] Regular. The API is the same for both. - - -\subsection mainpage-adding-lib-old-school "The old fashioned way" -

[emoji icecream] Single-header flavour

1. Drop [toml.hpp](https://raw.githubusercontent.com/marzer/tomlplusplus/master/toml.hpp) wherever you like in your source tree 2. There is no step two @@ -448,61 +452,70 @@ and [emoji sundae] Regular. The API is the same for both.

[emoji sundae] Regular flavour

1. Clone \github{marzer/tomlplusplus, the repository} from GitHub 2. Add `tomlplusplus/include` to your include paths -3. `#include ` +3. `#include ` + + +@subsection mainpage-adding-lib-conan Conan -\subsection mainpage-adding-lib-conan Conan Add `tomlplusplus/3.3.0` to your conanfile. + - -\subsection mainpage-adding-lib-dds DDS +@subsection mainpage-adding-lib-dds DDS Add `tomlpp` to your `package.json5`, e.g.: -\json +@json depends: [ 'tomlpp^3.3.0', ] -\endjson +@endjson -\see [What is DDS?](https://dds.pizza/) +@see [What is DDS?](https://dds.pizza/) + - -\subsection mainpage-adding-lib-meson Meson +@subsection mainpage-adding-lib-meson Meson You can install the wrap with: -\shell +@shell meson wrap install tomlplusplus -\endshell +@endshell After that, you can use it like a regular dependency: -\meson +@meson tomlplusplus_dep = dependency('tomlplusplus') -\endmeson +@endmeson You can also add it as a subproject directly. -\subsection mainpage-adding-lib-tipi Tipi.build + + +@subsection mainpage-adding-lib-tipi Tipi.build `tomlplusplus` can be easily used in [tipi.build](https://tipi.build) projects by adding the following entry to your `.tipi/deps`: -\json +@json { "marzer/tomlplusplus": { } } -\endjson +@endjson -\subsection mainpage-adding-lib-vcpkg Vcpkg -\shell + + +@subsection mainpage-adding-lib-vcpkg Vcpkg + +@shell vcpkg install tomlplusplus -\endshell +@endshell + -\subsection mainpage-adding-lib-cmake-fetch-content CMake FetchContent -\cmake +@subsection mainpage-adding-lib-cmake-fetch-content CMake FetchContent + +@cmake include(FetchContent) FetchContent_Declare( tomlplusplus @@ -510,32 +523,34 @@ FetchContent_Declare( GIT_TAG v3.3.0 ) FetchContent_MakeAvailable(tomlplusplus) -\endcmake +@endcmake -\see [What is FetchContent?](https://cmake.org/cmake/help/latest/module/FetchContent.html) +@see [What is FetchContent?](https://cmake.org/cmake/help/latest/module/FetchContent.html) + - -\subsection mainpage-adding-lib-git-submodules Git submodules -\shell +@subsection mainpage-adding-lib-git-submodules Git submodules +@shell git submodule add --depth 1 https://github.com/marzer/tomlplusplus.git tomlplusplus -\endshell +@endshell + +@subsection mainpage-adding-lib-other Other environments and package managers -\subsection mainpage-adding-lib-other Other environments and package managers 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. + +@subsection mainpage-adding-lib-python Special mention: Python -\subsection mainpage-adding-lib-python Special mention: Python There exists a python wrapper library built around toml++ called \github{bobfang1992/pytomlpp, 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: -\out +@out Parsing data.toml 5000 times: pytomlpp: 0.694 s rtoml: 0.871 s ( 1.25x) @@ -543,53 +558,54 @@ Parsing data.toml 5000 times: toml: 5.642 s ( 8.12x) qtoml: 7.760 s (11.17x) tomlkit: 32.708 s (47.09x) -\endout +@endout Install it using `pip`: -\shell +@shell pip install pytomlpp -\endshell +@endshell 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. + +@section mainpage-configuration Library configuration options -\section mainpage-configuration Library configuration options The library exposes a number of configuration options in the form of compiler `#defines`. Things like changing the `optional` type, disabling header-only mode, et cetera. The full list of -configurables can be found on the \ref configuration page. +configurables can be found on the @ref configuration page. -\see \ref configuration +@see @ref configuration + +@section mainpage-contributing Contributing -\section mainpage-contributing Contributing Contributions are very welcome! Either by \github{marzer/tomlplusplus/issues, reporting issues} or submitting pull requests. If you wish to submit a pull request, please see \github{marzer/tomlplusplus/blob/master/CONTRIBUTING.md, CONTRIBUTING} for all the details you need to get going. + - -\section mainpage-license License +@section mainpage-license License toml++ is licensed under the terms of the MIT license - see [LICENSE](https://github.com/marzer/tomlplusplus/blob/master/LICENSE). -\m_class{m-note m-default} +@m_class{m-note m-default} 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. + +@section mainpage-contact Contacting the author -\section mainpage-contact Contacting the author For bug reports and feature requests please use the \github{marzer/tomlplusplus/issues, Github Issues} system. For anything else you're welcome to reach out via other means. In order of likely response speed: - Twitter: [marzer8789](https://twitter.com/marzer8789) - Gitter: [marzer/tomlplusplus](https://gitter.im/marzer/tomlplusplus) ("Discord for repos") - Email: [mark.gillard@outlook.com.au](mailto:mark.gillard@outlook.com.au) - -*/ diff --git a/docs/poxy.toml b/docs/poxy.toml index cfefecb..a310727 100644 --- a/docs/poxy.toml +++ b/docs/poxy.toml @@ -35,8 +35,8 @@ undocumented = true [sources] paths = [ 'pages' ] recursive_paths = [ '../include' ] -patterns = [ '*.h', '*.dox' ] -strip_paths = [ '../include' ] +patterns = [ '*.h', '*.hpp', '*.dox', '*.md' ] +strip_paths = [ '../include', 'pages' ] diff --git a/examples/error_printer.cpp b/examples/error_printer.cpp index 9c5430f..d8f9a52 100644 --- a/examples/error_printer.cpp +++ b/examples/error_printer.cpp @@ -6,8 +6,8 @@ // This example shows the error messages the library produces by forcing a set of specific parsing // failures and printing their results. -#include "examples.h" -#include +#include "examples.hpp" +#include using namespace std::string_view_literals; diff --git a/examples/error_printer.vcxproj b/examples/error_printer.vcxproj index a7ad5b6..d866aa5 100644 --- a/examples/error_printer.vcxproj +++ b/examples/error_printer.vcxproj @@ -55,7 +55,7 @@ - + \ No newline at end of file diff --git a/examples/examples.h b/examples/examples.hpp similarity index 100% rename from examples/examples.h rename to examples/examples.hpp diff --git a/examples/parse_benchmark.cpp b/examples/parse_benchmark.cpp index 6d97471..8c2b53d 100644 --- a/examples/parse_benchmark.cpp +++ b/examples/parse_benchmark.cpp @@ -5,8 +5,8 @@ // This example is just a short-n-shiny benchmark. -#include "examples.h" -#include +#include "examples.hpp" +#include using namespace std::string_view_literals; diff --git a/examples/parse_benchmark.vcxproj b/examples/parse_benchmark.vcxproj index 927aa4e..6beec67 100644 --- a/examples/parse_benchmark.vcxproj +++ b/examples/parse_benchmark.vcxproj @@ -56,7 +56,7 @@ - + - \ No newline at end of file + diff --git a/examples/simple_parser.cpp b/examples/simple_parser.cpp index ec77111..f45202e 100644 --- a/examples/simple_parser.cpp +++ b/examples/simple_parser.cpp @@ -5,8 +5,8 @@ // This example demonstrates how to parse TOML from a file or stdin and re-serialize it (print it out) to stdout. -#include "examples.h" -#include +#include "examples.hpp" +#include using namespace std::string_view_literals; diff --git a/examples/simple_parser.vcxproj b/examples/simple_parser.vcxproj index 14d2b0f..8b90d44 100644 --- a/examples/simple_parser.vcxproj +++ b/examples/simple_parser.vcxproj @@ -56,7 +56,7 @@ - + - \ No newline at end of file + diff --git a/examples/toml_generator.cpp b/examples/toml_generator.cpp index 5a51d77..c8230db 100644 --- a/examples/toml_generator.cpp +++ b/examples/toml_generator.cpp @@ -5,8 +5,8 @@ // This example demonstrates the use of some more advanced features to generate a tree of random TOML data. -#include "examples.h" -#include +#include "examples.hpp" +#include using namespace std::string_view_literals; diff --git a/examples/toml_generator.vcxproj b/examples/toml_generator.vcxproj index 3b4e0b2..4a7bdfe 100644 --- a/examples/toml_generator.vcxproj +++ b/examples/toml_generator.vcxproj @@ -56,7 +56,7 @@ - + - \ No newline at end of file + diff --git a/examples/toml_merger.cpp b/examples/toml_merger.cpp index 99bcde2..5835b81 100644 --- a/examples/toml_merger.cpp +++ b/examples/toml_merger.cpp @@ -5,8 +5,8 @@ // This example demonstrates a method of merging one TOML data tree into another. -#include "examples.h" -#include +#include "examples.hpp" +#include using namespace std::string_view_literals; diff --git a/examples/toml_merger.vcxproj b/examples/toml_merger.vcxproj index cb93dbb..13cb3c3 100644 --- a/examples/toml_merger.vcxproj +++ b/examples/toml_merger.vcxproj @@ -57,7 +57,7 @@ - + - \ No newline at end of file + diff --git a/examples/toml_to_json_transcoder.cpp b/examples/toml_to_json_transcoder.cpp index 881bcd5..f47143b 100644 --- a/examples/toml_to_json_transcoder.cpp +++ b/examples/toml_to_json_transcoder.cpp @@ -5,8 +5,8 @@ // This example demonstrates how to use the toml::json_formatter to re-serialize TOML data as JSON. -#include "examples.h" -#include +#include "examples.hpp" +#include using namespace std::string_view_literals; diff --git a/examples/toml_to_json_transcoder.vcxproj b/examples/toml_to_json_transcoder.vcxproj index 6ff8538..3faf4ba 100644 --- a/examples/toml_to_json_transcoder.vcxproj +++ b/examples/toml_to_json_transcoder.vcxproj @@ -56,7 +56,7 @@ - + - \ No newline at end of file + diff --git a/include/toml++/impl/array.h b/include/toml++/impl/array.hpp similarity index 99% rename from include/toml++/impl/array.h rename to include/toml++/impl/array.hpp index dd217c7..b7fd96a 100644 --- a/include/toml++/impl/array.h +++ b/include/toml++/impl/array.hpp @@ -4,12 +4,12 @@ // SPDX-License-Identifier: MIT #pragma once -#include "std_utility.h" -#include "std_vector.h" -#include "std_initializer_list.h" -#include "value.h" -#include "make_node.h" -#include "header_start.h" +#include "std_utility.hpp" +#include "std_vector.hpp" +#include "std_initializer_list.hpp" +#include "value.hpp" +#include "make_node.hpp" +#include "header_start.hpp" /// \cond TOML_IMPL_NAMESPACE_START @@ -1724,4 +1724,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/array.inl b/include/toml++/impl/array.inl index b35ca85..a3c6243 100644 --- a/include/toml++/impl/array.inl +++ b/include/toml++/impl/array.inl @@ -5,14 +5,14 @@ #pragma once //# {{ -#include "preprocessor.h" +#include "preprocessor.hpp" #if !TOML_IMPLEMENTATION #error This is an implementation-only header. #endif //# }} -#include "array.h" -#include "header_start.h" +#include "array.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -379,4 +379,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/at_path.h b/include/toml++/impl/at_path.hpp similarity index 98% rename from include/toml++/impl/at_path.h rename to include/toml++/impl/at_path.hpp index 349014b..e351e6b 100644 --- a/include/toml++/impl/at_path.h +++ b/include/toml++/impl/at_path.hpp @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "forward_declarations.h" +#include "forward_declarations.hpp" /// \cond TOML_IMPL_NAMESPACE_START diff --git a/include/toml++/impl/at_path.inl b/include/toml++/impl/at_path.inl index 189d115..976c813 100644 --- a/include/toml++/impl/at_path.inl +++ b/include/toml++/impl/at_path.inl @@ -5,15 +5,15 @@ #pragma once //# {{ -#include "preprocessor.h" +#include "preprocessor.hpp" #if !TOML_IMPLEMENTATION #error This is an implementation-only header. #endif //# }} -#include "at_path.h" -#include "array.h" -#include "table.h" +#include "at_path.hpp" +#include "array.hpp" +#include "table.hpp" TOML_DISABLE_WARNINGS; #if TOML_INT_CHARCONV #include @@ -21,7 +21,7 @@ TOML_DISABLE_WARNINGS; #include #endif TOML_ENABLE_WARNINGS; -#include "header_start.h" +#include "header_start.hpp" TOML_IMPL_NAMESPACE_START { @@ -287,4 +287,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/date_time.h b/include/toml++/impl/date_time.hpp similarity index 99% rename from include/toml++/impl/date_time.h rename to include/toml++/impl/date_time.hpp index 4bd1de7..8957ad3 100644 --- a/include/toml++/impl/date_time.h +++ b/include/toml++/impl/date_time.hpp @@ -4,9 +4,9 @@ // SPDX-License-Identifier: MIT #pragma once -#include "forward_declarations.h" -#include "print_to_stream.h" -#include "header_start.h" +#include "forward_declarations.hpp" +#include "print_to_stream.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -465,4 +465,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/formatter.h b/include/toml++/impl/formatter.hpp similarity index 96% rename from include/toml++/impl/formatter.h rename to include/toml++/impl/formatter.hpp index 20f3d5d..a4174d3 100644 --- a/include/toml++/impl/formatter.h +++ b/include/toml++/impl/formatter.hpp @@ -4,12 +4,12 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" #if TOML_ENABLE_FORMATTERS -#include "forward_declarations.h" -#include "print_to_stream.h" -#include "header_start.h" +#include "forward_declarations.hpp" +#include "print_to_stream.hpp" +#include "header_start.hpp" /// \cond TOML_IMPL_NAMESPACE_START @@ -187,5 +187,5 @@ TOML_IMPL_NAMESPACE_START TOML_IMPL_NAMESPACE_END; /// \endcond -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_ENABLE_FORMATTERS diff --git a/include/toml++/impl/formatter.inl b/include/toml++/impl/formatter.inl index 3603685..a9b6bfb 100644 --- a/include/toml++/impl/formatter.inl +++ b/include/toml++/impl/formatter.inl @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" //# {{ #if !TOML_IMPLEMENTATION #error This is an implementation-only header. @@ -12,14 +12,14 @@ //# }} #if TOML_ENABLE_FORMATTERS -#include "formatter.h" -#include "print_to_stream.h" -#include "value.h" -#include "table.h" -#include "array.h" -#include "unicode.h" -#include "parse_result.h" -#include "header_start.h" +#include "formatter.hpp" +#include "print_to_stream.hpp" +#include "value.hpp" +#include "table.hpp" +#include "array.hpp" +#include "unicode.hpp" +#include "parse_result.hpp" +#include "header_start.hpp" TOML_IMPL_NAMESPACE_START { @@ -509,5 +509,5 @@ TOML_IMPL_NAMESPACE_START } TOML_IMPL_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_ENABLE_FORMATTERS diff --git a/include/toml++/impl/forward_declarations.h b/include/toml++/impl/forward_declarations.hpp similarity index 99% rename from include/toml++/impl/forward_declarations.h rename to include/toml++/impl/forward_declarations.hpp index 7ffc99d..d9162ad 100644 --- a/include/toml++/impl/forward_declarations.h +++ b/include/toml++/impl/forward_declarations.hpp @@ -4,8 +4,8 @@ // SPDX-License-Identifier: MIT #pragma once -#include "std_string.h" -#include "std_new.h" +#include "std_string.hpp" +#include "std_new.hpp" TOML_DISABLE_WARNINGS; #include #include @@ -18,7 +18,7 @@ TOML_DISABLE_WARNINGS; #include #include TOML_ENABLE_WARNINGS; -#include "header_start.h" +#include "header_start.hpp" //#--------------------------------------------------------------------------------------------------------------------- //# ENVIRONMENT GROUND-TRUTHS @@ -119,7 +119,7 @@ TOML_IMPL_NAMESPACE_START class parser; TOML_ABI_NAMESPACE_END; // TOML_EXCEPTIONS - // clang-format off + // clang-format off inline constexpr std::string_view control_char_escapes[] = { @@ -203,7 +203,7 @@ TOML_NAMESPACE_START // abi namespace /// \detail This namespace exists so you can safely hoist the toml++ literal operators into another scope /// without dragging in everything from the toml namespace: \cpp /// - /// #include + /// #include /// using namespace toml::literals; /// /// int main() @@ -620,8 +620,8 @@ TOML_IMPL_NAMESPACE_START && digits <= 53 // DBL_MANT_DIG && digits10 <= 15; // DBL_DIG - static constexpr bool can_represent_native = digits >= 53 // DBL_MANT_DIG - && digits10 >= 15; // DBL_DIG + static constexpr bool can_represent_native = digits >= 53 // DBL_MANT_DIG + && digits10 >= 15; // DBL_DIG static constexpr bool can_partially_represent_native = digits > 0 && digits10 > 0; }; @@ -1055,4 +1055,4 @@ TOML_IMPL_NAMESPACE_START TOML_IMPL_NAMESPACE_END; /// \endcond -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/header_end.h b/include/toml++/impl/header_end.hpp similarity index 87% rename from include/toml++/impl/header_end.h rename to include/toml++/impl/header_end.hpp index 698d99d..ff0462d 100644 --- a/include/toml++/impl/header_end.h +++ b/include/toml++/impl/header_end.hpp @@ -1,6 +1,6 @@ //# {{ #ifdef __INTELLISENSE__ -#include "preprocessor.h" +#include "preprocessor.hpp" #endif //# }} #ifdef _MSC_VER diff --git a/include/toml++/impl/header_start.h b/include/toml++/impl/header_start.hpp similarity index 88% rename from include/toml++/impl/header_start.h rename to include/toml++/impl/header_start.hpp index 646c752..6e1bb41 100644 --- a/include/toml++/impl/header_start.h +++ b/include/toml++/impl/header_start.hpp @@ -1,6 +1,6 @@ //# {{ #ifdef __INTELLISENSE__ -#include "preprocessor.h" +#include "preprocessor.hpp" #endif //# }} TOML_PUSH_WARNINGS; diff --git a/include/toml++/impl/json_formatter.h b/include/toml++/impl/json_formatter.hpp similarity index 97% rename from include/toml++/impl/json_formatter.h rename to include/toml++/impl/json_formatter.hpp index f070194..ca3776a 100644 --- a/include/toml++/impl/json_formatter.h +++ b/include/toml++/impl/json_formatter.hpp @@ -4,11 +4,11 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" #if TOML_ENABLE_FORMATTERS -#include "formatter.h" -#include "header_start.h" +#include "formatter.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -138,5 +138,5 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_ENABLE_FORMATTERS diff --git a/include/toml++/impl/json_formatter.inl b/include/toml++/impl/json_formatter.inl index 156efb9..ceffbd4 100644 --- a/include/toml++/impl/json_formatter.inl +++ b/include/toml++/impl/json_formatter.inl @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" //# {{ #if !TOML_IMPLEMENTATION #error This is an implementation-only header. @@ -12,11 +12,11 @@ //# }} #if TOML_ENABLE_FORMATTERS -#include "json_formatter.h" -#include "print_to_stream.h" -#include "table.h" -#include "array.h" -#include "header_start.h" +#include "json_formatter.hpp" +#include "print_to_stream.hpp" +#include "table.hpp" +#include "array.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -117,5 +117,5 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_ENABLE_FORMATTERS diff --git a/include/toml++/impl/key.h b/include/toml++/impl/key.hpp similarity index 98% rename from include/toml++/impl/key.h rename to include/toml++/impl/key.hpp index d94d7e8..575017a 100644 --- a/include/toml++/impl/key.h +++ b/include/toml++/impl/key.hpp @@ -4,10 +4,10 @@ // SPDX-License-Identifier: MIT #pragma once -#include "source_region.h" -#include "std_utility.h" -#include "print_to_stream.h" -#include "header_start.h" +#include "source_region.hpp" +#include "std_utility.hpp" +#include "print_to_stream.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -332,4 +332,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/make_node.h b/include/toml++/impl/make_node.hpp similarity index 98% rename from include/toml++/impl/make_node.h rename to include/toml++/impl/make_node.hpp index 88199a5..c4a1210 100644 --- a/include/toml++/impl/make_node.h +++ b/include/toml++/impl/make_node.hpp @@ -4,8 +4,8 @@ // SPDX-License-Identifier: MIT #pragma once -#include "forward_declarations.h" -#include "header_start.h" +#include "forward_declarations.hpp" +#include "header_start.hpp" /// \cond TOML_IMPL_NAMESPACE_START @@ -179,4 +179,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/node.h b/include/toml++/impl/node.hpp similarity index 99% rename from include/toml++/impl/node.h rename to include/toml++/impl/node.hpp index 125ae5c..e4e316a 100644 --- a/include/toml++/impl/node.h +++ b/include/toml++/impl/node.hpp @@ -4,10 +4,10 @@ // SPDX-License-Identifier: MIT #pragma once -#include "std_utility.h" -#include "forward_declarations.h" -#include "source_region.h" -#include "header_start.h" +#include "std_utility.hpp" +#include "forward_declarations.hpp" +#include "source_region.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -1112,4 +1112,4 @@ TOML_IMPL_NAMESPACE_START TOML_IMPL_NAMESPACE_END; /// \endcond -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/node.inl b/include/toml++/impl/node.inl index e97356a..171e05d 100644 --- a/include/toml++/impl/node.inl +++ b/include/toml++/impl/node.inl @@ -5,19 +5,19 @@ #pragma once //# {{ -#include "preprocessor.h" +#include "preprocessor.hpp" #if !TOML_IMPLEMENTATION #error This is an implementation-only header. #endif //# }} -#include "node.h" -#include "node_view.h" -#include "at_path.h" -#include "table.h" -#include "array.h" -#include "value.h" -#include "header_start.h" +#include "node.hpp" +#include "node_view.hpp" +#include "at_path.hpp" +#include "table.hpp" +#include "array.hpp" +#include "value.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -138,4 +138,4 @@ TOML_IMPL_NAMESPACE_START } TOML_IMPL_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/node_view.h b/include/toml++/impl/node_view.hpp similarity index 99% rename from include/toml++/impl/node_view.h rename to include/toml++/impl/node_view.hpp index 8e07001..296ae53 100644 --- a/include/toml++/impl/node_view.h +++ b/include/toml++/impl/node_view.hpp @@ -4,11 +4,11 @@ // SPDX-License-Identifier: MIT #pragma once -#include "std_vector.h" -#include "std_initializer_list.h" -#include "print_to_stream.h" -#include "node.h" -#include "header_start.h" +#include "std_vector.hpp" +#include "std_initializer_list.hpp" +#include "print_to_stream.hpp" +#include "node.hpp" +#include "header_start.hpp" TOML_DISABLE_ARITHMETIC_WARNINGS; TOML_NAMESPACE_START @@ -836,4 +836,4 @@ TOML_NAMESPACE_START TOML_NAMESPACE_END; /// \endcond -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/parse_error.h b/include/toml++/impl/parse_error.hpp similarity index 95% rename from include/toml++/impl/parse_error.h rename to include/toml++/impl/parse_error.hpp index 0a6041e..05f2b6d 100644 --- a/include/toml++/impl/parse_error.h +++ b/include/toml++/impl/parse_error.hpp @@ -4,13 +4,13 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" #if TOML_ENABLE_PARSER -#include "std_except.h" -#include "source_region.h" -#include "print_to_stream.h" -#include "header_start.h" +#include "std_except.hpp" +#include "source_region.hpp" +#include "print_to_stream.hpp" +#include "header_start.hpp" #if TOML_DOXYGEN || !TOML_EXCEPTIONS #define TOML_PARSE_ERROR_BASE @@ -135,5 +135,5 @@ TOML_NAMESPACE_END; #undef TOML_PARSE_ERROR_BASE -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_ENABLE_PARSER diff --git a/include/toml++/impl/parse_result.h b/include/toml++/impl/parse_result.hpp similarity index 99% rename from include/toml++/impl/parse_result.h rename to include/toml++/impl/parse_result.hpp index 3292e8d..25743f4 100644 --- a/include/toml++/impl/parse_result.h +++ b/include/toml++/impl/parse_result.hpp @@ -4,12 +4,12 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" #if TOML_DOXYGEN || (TOML_ENABLE_PARSER && !TOML_EXCEPTIONS) -#include "table.h" -#include "parse_error.h" -#include "header_start.h" +#include "table.hpp" +#include "parse_error.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -495,5 +495,5 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_ENABLE_PARSER && !TOML_EXCEPTIONS diff --git a/include/toml++/impl/parser.h b/include/toml++/impl/parser.hpp similarity index 98% rename from include/toml++/impl/parser.h rename to include/toml++/impl/parser.hpp index 78b030b..fbdd65e 100644 --- a/include/toml++/impl/parser.h +++ b/include/toml++/impl/parser.hpp @@ -4,12 +4,12 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" #if TOML_ENABLE_PARSER -#include "table.h" -#include "parse_result.h" -#include "header_start.h" +#include "table.hpp" +#include "parse_result.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -386,5 +386,5 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_ENABLE_PARSER diff --git a/include/toml++/impl/parser.inl b/include/toml++/impl/parser.inl index ef9cfde..a5135d0 100644 --- a/include/toml++/impl/parser.inl +++ b/include/toml++/impl/parser.inl @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" //# {{ #if !TOML_IMPLEMENTATION #error This is an implementation-only header. @@ -12,15 +12,15 @@ //# }} #if TOML_ENABLE_PARSER -#include "parser.h" -#include "std_optional.h" -#include "source_region.h" -#include "parse_error.h" -#include "date_time.h" -#include "value.h" -#include "array.h" -#include "table.h" -#include "unicode.h" +#include "parser.hpp" +#include "std_optional.hpp" +#include "source_region.hpp" +#include "parse_error.hpp" +#include "date_time.hpp" +#include "value.hpp" +#include "array.hpp" +#include "table.hpp" +#include "unicode.hpp" TOML_DISABLE_WARNINGS; #include #include @@ -34,7 +34,7 @@ TOML_DISABLE_WARNINGS; #include #endif TOML_ENABLE_WARNINGS; -#include "header_start.h" +#include "header_start.hpp" //#--------------------------------------------------------------------------------------------------------------------- //# UTF8 STREAMS @@ -3913,5 +3913,5 @@ TOML_NAMESPACE_START TOML_NAMESPACE_END; #undef TOML_OVERALIGNED -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_ENABLE_PARSER diff --git a/include/toml++/impl/path.h b/include/toml++/impl/path.hpp similarity index 99% rename from include/toml++/impl/path.h rename to include/toml++/impl/path.hpp index 2a40cc7..5bd0ef3 100644 --- a/include/toml++/impl/path.h +++ b/include/toml++/impl/path.hpp @@ -4,9 +4,9 @@ // SPDX-License-Identifier: MIT #pragma once -#include "forward_declarations.h" -#include "std_vector.h" -#include "header_start.h" +#include "forward_declarations.hpp" +#include "std_vector.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -848,4 +848,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/path.inl b/include/toml++/impl/path.inl index 1c82c67..999d651 100644 --- a/include/toml++/impl/path.inl +++ b/include/toml++/impl/path.inl @@ -5,22 +5,22 @@ #pragma once //# {{ -#include "preprocessor.h" +#include "preprocessor.hpp" #if !TOML_IMPLEMENTATION #error This is an implementation-only header. #endif //# }} -#include "path.h" -#include "at_path.h" -#include "print_to_stream.h" +#include "path.hpp" +#include "at_path.hpp" +#include "print_to_stream.hpp" TOML_DISABLE_WARNINGS; #if TOML_INT_CHARCONV #include #endif #include TOML_ENABLE_WARNINGS; -#include "header_start.h" +#include "header_start.hpp" //#===================================================================================================================== //# toml::path_component @@ -520,4 +520,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/preprocessor.h b/include/toml++/impl/preprocessor.hpp similarity index 99% rename from include/toml++/impl/preprocessor.h rename to include/toml++/impl/preprocessor.hpp index 6336ac8..bd27f41 100644 --- a/include/toml++/impl/preprocessor.h +++ b/include/toml++/impl/preprocessor.hpp @@ -1131,7 +1131,7 @@ TOML_ENABLE_WARNINGS; //#==================================================================================================================== // clang-format off -#include "version.h" +#include "version.hpp" #define TOML_LIB_SINGLE_HEADER 0 diff --git a/include/toml++/impl/print_to_stream.h b/include/toml++/impl/print_to_stream.hpp similarity index 97% rename from include/toml++/impl/print_to_stream.h rename to include/toml++/impl/print_to_stream.hpp index f0ce700..b6a4895 100644 --- a/include/toml++/impl/print_to_stream.h +++ b/include/toml++/impl/print_to_stream.hpp @@ -4,9 +4,9 @@ // SPDX-License-Identifier: MIT #pragma once -#include "std_string.h" -#include "forward_declarations.h" -#include "header_start.h" +#include "std_string.hpp" +#include "forward_declarations.hpp" +#include "header_start.hpp" TOML_IMPL_NAMESPACE_START { @@ -126,4 +126,4 @@ TOML_IMPL_NAMESPACE_START } TOML_IMPL_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/print_to_stream.inl b/include/toml++/impl/print_to_stream.inl index 2a4b741..57dbf76 100644 --- a/include/toml++/impl/print_to_stream.inl +++ b/include/toml++/impl/print_to_stream.inl @@ -5,19 +5,19 @@ #pragma once //# {{ -#include "preprocessor.h" +#include "preprocessor.hpp" #if !TOML_IMPLEMENTATION #error This is an implementation-only header. #endif //# }} -#include "print_to_stream.h" -#include "source_region.h" -#include "date_time.h" -#include "toml_formatter.h" -#include "value.h" -#include "array.h" -#include "table.h" +#include "print_to_stream.hpp" +#include "source_region.hpp" +#include "date_time.hpp" +#include "toml_formatter.hpp" +#include "value.hpp" +#include "array.hpp" +#include "table.hpp" TOML_DISABLE_WARNINGS; #include #if TOML_INT_CHARCONV || TOML_FLOAT_CHARCONV @@ -30,7 +30,7 @@ TOML_DISABLE_WARNINGS; #include #endif TOML_ENABLE_WARNINGS; -#include "header_start.h" +#include "header_start.hpp" TOML_ANON_NAMESPACE_START { @@ -487,4 +487,4 @@ TOML_IMPL_NAMESPACE_START } TOML_IMPL_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/simd.h b/include/toml++/impl/simd.hpp similarity index 97% rename from include/toml++/impl/simd.h rename to include/toml++/impl/simd.hpp index c0fa57b..ef66d66 100644 --- a/include/toml++/impl/simd.h +++ b/include/toml++/impl/simd.hpp @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" #if TOML_ENABLE_SIMD #if defined(__SSE2__) \ diff --git a/include/toml++/impl/source_region.h b/include/toml++/impl/source_region.hpp similarity index 97% rename from include/toml++/impl/source_region.h rename to include/toml++/impl/source_region.hpp index 6c7bb15..82a6d4b 100644 --- a/include/toml++/impl/source_region.h +++ b/include/toml++/impl/source_region.hpp @@ -4,11 +4,11 @@ // SPDX-License-Identifier: MIT #pragma once -#include "std_optional.h" -#include "std_string.h" -#include "forward_declarations.h" -#include "print_to_stream.h" -#include "header_start.h" +#include "std_optional.hpp" +#include "std_string.hpp" +#include "forward_declarations.hpp" +#include "print_to_stream.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -220,4 +220,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/std_except.h b/include/toml++/impl/std_except.hpp similarity index 93% rename from include/toml++/impl/std_except.h rename to include/toml++/impl/std_except.hpp index b964f90..9ea1479 100644 --- a/include/toml++/impl/std_except.h +++ b/include/toml++/impl/std_except.hpp @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" TOML_DISABLE_WARNINGS; #if TOML_EXCEPTIONS #include diff --git a/include/toml++/impl/std_initializer_list.h b/include/toml++/impl/std_initializer_list.hpp similarity index 92% rename from include/toml++/impl/std_initializer_list.h rename to include/toml++/impl/std_initializer_list.hpp index 510d1fe..e1ba61d 100644 --- a/include/toml++/impl/std_initializer_list.h +++ b/include/toml++/impl/std_initializer_list.hpp @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" TOML_DISABLE_WARNINGS; #include TOML_ENABLE_WARNINGS; diff --git a/include/toml++/impl/std_map.h b/include/toml++/impl/std_map.hpp similarity index 92% rename from include/toml++/impl/std_map.h rename to include/toml++/impl/std_map.hpp index e01bdf8..8f97330 100644 --- a/include/toml++/impl/std_map.h +++ b/include/toml++/impl/std_map.hpp @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" TOML_DISABLE_WARNINGS; #include #include diff --git a/include/toml++/impl/std_new.h b/include/toml++/impl/std_new.hpp similarity index 95% rename from include/toml++/impl/std_new.h rename to include/toml++/impl/std_new.hpp index b0c8bce..c896a71 100644 --- a/include/toml++/impl/std_new.h +++ b/include/toml++/impl/std_new.hpp @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" TOML_DISABLE_WARNINGS; #include TOML_ENABLE_WARNINGS; diff --git a/include/toml++/impl/std_optional.h b/include/toml++/impl/std_optional.hpp similarity index 96% rename from include/toml++/impl/std_optional.h rename to include/toml++/impl/std_optional.hpp index 12c6bde..6760388 100644 --- a/include/toml++/impl/std_optional.h +++ b/include/toml++/impl/std_optional.hpp @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" TOML_DISABLE_WARNINGS; #if !TOML_HAS_CUSTOM_OPTIONAL_TYPE #include diff --git a/include/toml++/impl/std_string.h b/include/toml++/impl/std_string.hpp similarity index 97% rename from include/toml++/impl/std_string.h rename to include/toml++/impl/std_string.hpp index a45e344..b75afaf 100644 --- a/include/toml++/impl/std_string.h +++ b/include/toml++/impl/std_string.hpp @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" TOML_DISABLE_WARNINGS; #include #include diff --git a/include/toml++/impl/std_string.inl b/include/toml++/impl/std_string.inl index e288048..a20d662 100644 --- a/include/toml++/impl/std_string.inl +++ b/include/toml++/impl/std_string.inl @@ -5,14 +5,14 @@ #pragma once //# {{ -#include "preprocessor.h" +#include "preprocessor.hpp" #if !TOML_IMPLEMENTATION #error This is an implementation-only header. #endif //# }} #if TOML_WINDOWS -#include "std_string.h" +#include "std_string.hpp" #ifndef _WINDOWS_ #if TOML_INCLUDE_WINDOWS_H #include @@ -36,7 +36,7 @@ extern "C" __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int #endif // TOML_INCLUDE_WINDOWS_H #endif // _WINDOWS_ -#include "header_start.h" +#include "header_start.hpp" TOML_IMPL_NAMESPACE_START { @@ -95,5 +95,5 @@ TOML_IMPL_NAMESPACE_START } TOML_IMPL_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_WINDOWS diff --git a/include/toml++/impl/std_utility.h b/include/toml++/impl/std_utility.hpp similarity index 92% rename from include/toml++/impl/std_utility.h rename to include/toml++/impl/std_utility.hpp index e5771bb..aacb1d5 100644 --- a/include/toml++/impl/std_utility.h +++ b/include/toml++/impl/std_utility.hpp @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" TOML_DISABLE_WARNINGS; #include TOML_ENABLE_WARNINGS; diff --git a/include/toml++/impl/std_variant.h b/include/toml++/impl/std_variant.hpp similarity index 92% rename from include/toml++/impl/std_variant.h rename to include/toml++/impl/std_variant.hpp index bffdab5..14bf1b4 100644 --- a/include/toml++/impl/std_variant.h +++ b/include/toml++/impl/std_variant.hpp @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" TOML_DISABLE_WARNINGS; #include TOML_ENABLE_WARNINGS; diff --git a/include/toml++/impl/std_vector.h b/include/toml++/impl/std_vector.hpp similarity index 92% rename from include/toml++/impl/std_vector.h rename to include/toml++/impl/std_vector.hpp index 0d3c655..e0cbac4 100644 --- a/include/toml++/impl/std_vector.h +++ b/include/toml++/impl/std_vector.hpp @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" TOML_DISABLE_WARNINGS; #include #include diff --git a/include/toml++/impl/table.h b/include/toml++/impl/table.hpp similarity index 99% rename from include/toml++/impl/table.h rename to include/toml++/impl/table.hpp index 1ce1792..ca839b8 100644 --- a/include/toml++/impl/table.h +++ b/include/toml++/impl/table.hpp @@ -4,14 +4,14 @@ // SPDX-License-Identifier: MIT #pragma once -#include "forward_declarations.h" -#include "std_map.h" -#include "std_initializer_list.h" -#include "array.h" -#include "make_node.h" -#include "node_view.h" -#include "key.h" -#include "header_start.h" +#include "forward_declarations.hpp" +#include "std_map.hpp" +#include "std_initializer_list.hpp" +#include "array.hpp" +#include "make_node.hpp" +#include "node_view.hpp" +#include "key.hpp" +#include "header_start.hpp" /// \cond TOML_IMPL_NAMESPACE_START @@ -1958,4 +1958,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/table.inl b/include/toml++/impl/table.inl index d7c9aa1..01cba01 100644 --- a/include/toml++/impl/table.inl +++ b/include/toml++/impl/table.inl @@ -5,15 +5,15 @@ #pragma once //# {{ -#include "preprocessor.h" +#include "preprocessor.hpp" #if !TOML_IMPLEMENTATION #error This is an implementation-only header. #endif //# }} -#include "table.h" -#include "node_view.h" -#include "header_start.h" +#include "table.hpp" +#include "node_view.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -315,4 +315,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/toml_formatter.h b/include/toml++/impl/toml_formatter.hpp similarity index 97% rename from include/toml++/impl/toml_formatter.h rename to include/toml++/impl/toml_formatter.hpp index 5c81a5e..ffd6325 100644 --- a/include/toml++/impl/toml_formatter.h +++ b/include/toml++/impl/toml_formatter.hpp @@ -4,12 +4,12 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" #if TOML_ENABLE_FORMATTERS -#include "std_vector.h" -#include "formatter.h" -#include "header_start.h" +#include "std_vector.hpp" +#include "formatter.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -149,5 +149,5 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_ENABLE_FORMATTERS diff --git a/include/toml++/impl/toml_formatter.inl b/include/toml++/impl/toml_formatter.inl index f191342..b85d5ea 100644 --- a/include/toml++/impl/toml_formatter.inl +++ b/include/toml++/impl/toml_formatter.inl @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" //# {{ #if !TOML_IMPLEMENTATION #error This is an implementation-only header. @@ -12,13 +12,13 @@ //# }} #if TOML_ENABLE_FORMATTERS -#include "toml_formatter.h" -#include "print_to_stream.h" -#include "value.h" -#include "table.h" -#include "array.h" -#include "unicode.h" -#include "header_start.h" +#include "toml_formatter.hpp" +#include "print_to_stream.hpp" +#include "value.hpp" +#include "table.hpp" +#include "array.hpp" +#include "unicode.hpp" +#include "header_start.hpp" TOML_DISABLE_ARITHMETIC_WARNINGS; TOML_ANON_NAMESPACE_START @@ -401,5 +401,5 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_ENABLE_FORMATTERS diff --git a/include/toml++/impl/unicode.h b/include/toml++/impl/unicode.hpp similarity index 98% rename from include/toml++/impl/unicode.h rename to include/toml++/impl/unicode.hpp index 3f2b753..c5890a8 100644 --- a/include/toml++/impl/unicode.h +++ b/include/toml++/impl/unicode.hpp @@ -4,8 +4,8 @@ // SPDX-License-Identifier: MIT #pragma once -#include "unicode_autogenerated.h" -#include "header_start.h" +#include "unicode_autogenerated.hpp" +#include "header_start.hpp" /// \cond TOML_IMPL_NAMESPACE_START @@ -194,4 +194,4 @@ TOML_IMPL_NAMESPACE_START TOML_IMPL_NAMESPACE_END; /// \endcond -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/unicode.inl b/include/toml++/impl/unicode.inl index 8edc3c1..4064c58 100644 --- a/include/toml++/impl/unicode.inl +++ b/include/toml++/impl/unicode.inl @@ -5,15 +5,15 @@ #pragma once //# {{ -#include "preprocessor.h" +#include "preprocessor.hpp" #if !TOML_IMPLEMENTATION #error This is an implementation-only header. #endif //# }} -#include "unicode.h" -#include "simd.h" -#include "header_start.h" +#include "unicode.hpp" +#include "simd.hpp" +#include "header_start.hpp" TOML_IMPL_NAMESPACE_START { @@ -57,4 +57,4 @@ TOML_IMPL_NAMESPACE_START } TOML_IMPL_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/unicode_autogenerated.h b/include/toml++/impl/unicode_autogenerated.hpp similarity index 99% rename from include/toml++/impl/unicode_autogenerated.h rename to include/toml++/impl/unicode_autogenerated.hpp index c850065..cadd9e7 100644 --- a/include/toml++/impl/unicode_autogenerated.h +++ b/include/toml++/impl/unicode_autogenerated.hpp @@ -4,8 +4,8 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" -#include "header_start.h" +#include "preprocessor.hpp" +#include "header_start.hpp" /// \cond #if TOML_GCC && TOML_GCC < 9 @@ -179,4 +179,4 @@ TOML_IMPL_NAMESPACE_END; #endif /// \endcond -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/value.h b/include/toml++/impl/value.hpp similarity index 99% rename from include/toml++/impl/value.h rename to include/toml++/impl/value.hpp index a8ec51f..758c580 100644 --- a/include/toml++/impl/value.h +++ b/include/toml++/impl/value.hpp @@ -4,11 +4,11 @@ // SPDX-License-Identifier: MIT #pragma once -#include "date_time.h" -#include "node.h" -#include "print_to_stream.h" -#include "std_utility.h" -#include "header_start.h" +#include "date_time.hpp" +#include "node.hpp" +#include "print_to_stream.hpp" +#include "std_utility.hpp" +#include "header_start.hpp" TOML_DISABLE_ARITHMETIC_WARNINGS; /// \cond @@ -1267,4 +1267,4 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" diff --git a/include/toml++/impl/version.h b/include/toml++/impl/version.hpp similarity index 100% rename from include/toml++/impl/version.h rename to include/toml++/impl/version.hpp diff --git a/include/toml++/impl/yaml_formatter.h b/include/toml++/impl/yaml_formatter.hpp similarity index 97% rename from include/toml++/impl/yaml_formatter.h rename to include/toml++/impl/yaml_formatter.hpp index d9536de..1a3d24f 100644 --- a/include/toml++/impl/yaml_formatter.h +++ b/include/toml++/impl/yaml_formatter.hpp @@ -4,11 +4,11 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" #if TOML_ENABLE_FORMATTERS -#include "formatter.h" -#include "header_start.h" +#include "formatter.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -135,5 +135,5 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_ENABLE_FORMATTERS diff --git a/include/toml++/impl/yaml_formatter.inl b/include/toml++/impl/yaml_formatter.inl index 1031978..95cb08d 100644 --- a/include/toml++/impl/yaml_formatter.inl +++ b/include/toml++/impl/yaml_formatter.inl @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "preprocessor.h" +#include "preprocessor.hpp" //# {{ #if !TOML_IMPLEMENTATION #error This is an implementation-only header. @@ -12,11 +12,11 @@ //# }} #if TOML_ENABLE_FORMATTERS -#include "yaml_formatter.h" -#include "print_to_stream.h" -#include "table.h" -#include "array.h" -#include "header_start.h" +#include "yaml_formatter.hpp" +#include "print_to_stream.hpp" +#include "table.hpp" +#include "array.hpp" +#include "header_start.hpp" TOML_NAMESPACE_START { @@ -161,5 +161,5 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -#include "header_end.h" +#include "header_end.hpp" #endif // TOML_ENABLE_FORMATTERS diff --git a/include/toml++/toml.h b/include/toml++/toml.h index b76d6d1..5c28531 100644 --- a/include/toml++/toml.h +++ b/include/toml++/toml.h @@ -1,220 +1,7 @@ -//# This file is a part of toml++ and is subject to the the terms of the MIT license. -//# Copyright (c) Mark Gillard -//# See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. -// SPDX-License-Identifier: MIT +// this file is just for backwards compatibility. #ifndef TOMLPLUSPLUS_H #define TOMLPLUSPLUS_H -#define INCLUDE_TOMLPLUSPLUS_H // old guard name used pre-v3 +#include "toml.hpp" -#include "impl/preprocessor.h" - -TOML_PUSH_WARNINGS; -TOML_DISABLE_SPAM_WARNINGS; -TOML_DISABLE_SWITCH_WARNINGS; -TOML_DISABLE_SUGGEST_ATTR_WARNINGS; - -// misc warning false-positives -#if TOML_MSVC -#pragma warning(disable : 5031) // #pragma warning(pop): likely mismatch -#if TOML_SHARED_LIB -#pragma warning(disable : 4251) // dll exports for std lib types #endif -#elif TOML_CLANG -TOML_PRAGMA_CLANG(diagnostic ignored "-Wheader-hygiene") -#if TOML_CLANG >= 12 -TOML_PRAGMA_CLANG(diagnostic ignored "-Wc++20-extensions") -#endif -#if TOML_CLANG == 13 -TOML_PRAGMA_CLANG(diagnostic ignored "-Wreserved-identifier") -#endif -#endif - -#include "impl/std_new.h" -#include "impl/std_string.h" -#include "impl/std_optional.h" -#include "impl/forward_declarations.h" -#include "impl/print_to_stream.h" -#include "impl/source_region.h" -#include "impl/date_time.h" -#include "impl/at_path.h" -#include "impl/path.h" -#include "impl/node.h" -#include "impl/node_view.h" -#include "impl/value.h" -#include "impl/make_node.h" -#include "impl/array.h" -#include "impl/key.h" -#include "impl/table.h" -#include "impl/unicode_autogenerated.h" -#include "impl/unicode.h" -#include "impl/parse_error.h" -#include "impl/parse_result.h" -#include "impl/parser.h" -#include "impl/formatter.h" -#include "impl/toml_formatter.h" -#include "impl/json_formatter.h" -#include "impl/yaml_formatter.h" - -#if TOML_IMPLEMENTATION - -#include "impl/std_string.inl" -#include "impl/print_to_stream.inl" -#include "impl/node.inl" -#include "impl/at_path.inl" -#include "impl/path.inl" -#include "impl/array.inl" -#include "impl/table.inl" -#include "impl/unicode.inl" -#include "impl/parser.inl" -#include "impl/formatter.inl" -#include "impl/toml_formatter.inl" -#include "impl/json_formatter.inl" -#include "impl/yaml_formatter.inl" - -#endif // TOML_IMPLEMENTATION - -TOML_POP_WARNINGS; - -// macro hygiene -#if TOML_UNDEF_MACROS -#undef TOML_ABI_NAMESPACE_BOOL -#undef TOML_ABI_NAMESPACE_END -#undef TOML_ABI_NAMESPACE_START -#undef TOML_ABI_NAMESPACES -#undef TOML_ABSTRACT_INTERFACE -#undef TOML_ALWAYS_INLINE -#undef TOML_ANON_NAMESPACE -#undef TOML_ANON_NAMESPACE_END -#undef TOML_ANON_NAMESPACE_START -#undef TOML_ARCH_AMD64 -#undef TOML_ARCH_ARM -#undef TOML_ARCH_ARM32 -#undef TOML_ARCH_ARM64 -#undef TOML_ARCH_ITANIUM -#undef TOML_ARCH_X86 -#undef TOML_ASSERT -#undef TOML_ASSERT_ASSUME -#undef TOML_ASSUME -#undef TOML_ASYMMETRICAL_EQUALITY_OPS -#undef TOML_ATTR -#undef TOML_CLANG -#undef TOML_CLANG_VERSION -#undef TOML_CLOSED_ENUM -#undef TOML_CLOSED_FLAGS_ENUM -#undef TOML_COMPILER_HAS_EXCEPTIONS -#undef TOML_COMPILER_HAS_RTTI -#undef TOML_CONST -#undef TOML_CONST_GETTER -#undef TOML_CONST_INLINE_GETTER -#undef TOML_CONSTRAINED_TEMPLATE -#undef TOML_CPP -#undef TOML_DECLSPEC -#undef TOML_DELETE_DEFAULTS -#undef TOML_DISABLE_ARITHMETIC_WARNINGS -#undef TOML_DISABLE_CODE_ANALYSIS_WARNINGS -#undef TOML_DISABLE_SPAM_WARNINGS -#undef TOML_DISABLE_SPAM_WARNINGS_CLANG_10 -#undef TOML_DISABLE_SPAM_WARNINGS_CLANG_11 -#undef TOML_DISABLE_SUGGEST_ATTR_WARNINGS -#undef TOML_DISABLE_SWITCH_WARNINGS -#undef TOML_DISABLE_WARNINGS -#undef TOML_DOXYGEN -#undef TOML_EMPTY_BASES -#undef TOML_ENABLE_IF -#undef TOML_ENABLE_WARNINGS -#undef TOML_EVAL_BOOL_0 -#undef TOML_EVAL_BOOL_1 -#undef TOML_EXTERNAL_LINKAGE -#undef TOML_FLAGS_ENUM -#undef TOML_FLOAT_CHARCONV -#undef TOML_FLOAT128 -#undef TOML_FLOAT16_DIG -#undef TOML_FLOAT16_LIMITS_SET -#undef TOML_FLOAT16_MANT_DIG -#undef TOML_FLOAT16_MAX_10_EXP -#undef TOML_FLOAT16_MAX_EXP -#undef TOML_FLOAT16_MIN_10_EXP -#undef TOML_FLOAT16_MIN_EXP -#undef TOML_GCC -#undef TOML_HAS_ATTR -#undef TOML_HAS_BUILTIN -#undef TOML_HAS_CHAR8 -#undef TOML_HAS_CPP_ATTR -#undef TOML_HAS_CUSTOM_OPTIONAL_TYPE -#undef TOML_HAS_FEATURE -#undef TOML_HAS_INCLUDE -#undef TOML_HAS_SSE2 -#undef TOML_HAS_SSE4_1 -#undef TOML_HIDDEN_CONSTRAINT -#undef TOML_ICC -#undef TOML_ICC_CL -#undef TOML_IMPL_NAMESPACE_END -#undef TOML_IMPL_NAMESPACE_START -#undef TOML_IMPLEMENTATION -#undef TOML_INCLUDE_WINDOWS_H -#undef TOML_INT_CHARCONV -#undef TOML_INT128 -#undef TOML_INTELLISENSE -#undef TOML_INTERNAL_LINKAGE -#undef TOML_LANG_AT_LEAST -#undef TOML_LANG_EFFECTIVE_VERSION -#undef TOML_LANG_HIGHER_THAN -#undef TOML_LANG_UNRELEASED -#undef TOML_LAUNDER -#undef TOML_LIFETIME_HOOKS -#undef TOML_LIKELY -#undef TOML_LIKELY_CASE -#undef TOML_MAKE_FLAGS -#undef TOML_MAKE_FLAGS_ -#undef TOML_MAKE_FLAGS_1 -#undef TOML_MAKE_FLAGS_2 -#undef TOML_MAKE_STRING -#undef TOML_MAKE_STRING_1 -#undef TOML_MAKE_VERSION -#undef TOML_MSVC -#undef TOML_NAMESPACE -#undef TOML_NEVER_INLINE -#undef TOML_NODISCARD -#undef TOML_NODISCARD_CTOR -#undef TOML_OPEN_ENUM -#undef TOML_OPEN_FLAGS_ENUM -#undef TOML_PARSER_TYPENAME -#undef TOML_POP_WARNINGS -#undef TOML_PRAGMA_CLANG -#undef TOML_PRAGMA_CLANG_GE_10 -#undef TOML_PRAGMA_CLANG_GE_11 -#undef TOML_PRAGMA_CLANG_GE_9 -#undef TOML_PRAGMA_GCC -#undef TOML_PRAGMA_ICC -#undef TOML_PRAGMA_MSVC -#undef TOML_PURE -#undef TOML_PURE_GETTER -#undef TOML_PURE_INLINE_GETTER -#undef TOML_PUSH_WARNINGS -#undef TOML_REQUIRES -#undef TOML_SA_LIST_BEG -#undef TOML_SA_LIST_END -#undef TOML_SA_LIST_NEW -#undef TOML_SA_LIST_NXT -#undef TOML_SA_LIST_SEP -#undef TOML_SA_NATIVE_VALUE_TYPE_LIST -#undef TOML_SA_NEWLINE -#undef TOML_SA_NODE_TYPE_LIST -#undef TOML_SA_UNWRAPPED_NODE_TYPE_LIST -#undef TOML_SA_VALUE_EXACT_FUNC_MESSAGE -#undef TOML_SA_VALUE_FUNC_MESSAGE -#undef TOML_SA_VALUE_MESSAGE_CONST_CHAR8 -#undef TOML_SA_VALUE_MESSAGE_U8STRING_VIEW -#undef TOML_SA_VALUE_MESSAGE_WSTRING -#undef TOML_SIMPLE_STATIC_ASSERT_MESSAGES -#undef TOML_TRIVIAL_ABI -#undef TOML_UINT128 -#undef TOML_UNLIKELY -#undef TOML_UNLIKELY_CASE -#undef TOML_UNREACHABLE -#undef TOML_UNUSED -#undef TOML_WINDOWS -#endif - -#endif // TOMLPLUSPLUS_H diff --git a/include/toml++/toml.hpp b/include/toml++/toml.hpp new file mode 100644 index 0000000..18c8d2c --- /dev/null +++ b/include/toml++/toml.hpp @@ -0,0 +1,221 @@ +//# This file is a part of toml++ and is subject to the the terms of the MIT license. +//# Copyright (c) Mark Gillard +//# See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. +// SPDX-License-Identifier: MIT +#ifndef TOMLPLUSPLUS_HPP +#define TOMLPLUSPLUS_HPP + +#define INCLUDE_TOMLPLUSPLUS_H // old guard name used pre-v3 +#define TOMLPLUSPLUS_H // guard name used in the legacy toml.h + +#include "impl/preprocessor.hpp" + +TOML_PUSH_WARNINGS; +TOML_DISABLE_SPAM_WARNINGS; +TOML_DISABLE_SWITCH_WARNINGS; +TOML_DISABLE_SUGGEST_ATTR_WARNINGS; + +// misc warning false-positives +#if TOML_MSVC +#pragma warning(disable : 5031) // #pragma warning(pop): likely mismatch +#if TOML_SHARED_LIB +#pragma warning(disable : 4251) // dll exports for std lib types +#endif +#elif TOML_CLANG +TOML_PRAGMA_CLANG(diagnostic ignored "-Wheader-hygiene") +#if TOML_CLANG >= 12 +TOML_PRAGMA_CLANG(diagnostic ignored "-Wc++20-extensions") +#endif +#if TOML_CLANG == 13 +TOML_PRAGMA_CLANG(diagnostic ignored "-Wreserved-identifier") +#endif +#endif + +#include "impl/std_new.hpp" +#include "impl/std_string.hpp" +#include "impl/std_optional.hpp" +#include "impl/forward_declarations.hpp" +#include "impl/print_to_stream.hpp" +#include "impl/source_region.hpp" +#include "impl/date_time.hpp" +#include "impl/at_path.hpp" +#include "impl/path.hpp" +#include "impl/node.hpp" +#include "impl/node_view.hpp" +#include "impl/value.hpp" +#include "impl/make_node.hpp" +#include "impl/array.hpp" +#include "impl/key.hpp" +#include "impl/table.hpp" +#include "impl/unicode_autogenerated.hpp" +#include "impl/unicode.hpp" +#include "impl/parse_error.hpp" +#include "impl/parse_result.hpp" +#include "impl/parser.hpp" +#include "impl/formatter.hpp" +#include "impl/toml_formatter.hpp" +#include "impl/json_formatter.hpp" +#include "impl/yaml_formatter.hpp" + +#if TOML_IMPLEMENTATION + +#include "impl/std_string.inl" +#include "impl/print_to_stream.inl" +#include "impl/node.inl" +#include "impl/at_path.inl" +#include "impl/path.inl" +#include "impl/array.inl" +#include "impl/table.inl" +#include "impl/unicode.inl" +#include "impl/parser.inl" +#include "impl/formatter.inl" +#include "impl/toml_formatter.inl" +#include "impl/json_formatter.inl" +#include "impl/yaml_formatter.inl" + +#endif // TOML_IMPLEMENTATION + +TOML_POP_WARNINGS; + +// macro hygiene +#if TOML_UNDEF_MACROS +#undef TOML_ABI_NAMESPACE_BOOL +#undef TOML_ABI_NAMESPACE_END +#undef TOML_ABI_NAMESPACE_START +#undef TOML_ABI_NAMESPACES +#undef TOML_ABSTRACT_INTERFACE +#undef TOML_ALWAYS_INLINE +#undef TOML_ANON_NAMESPACE +#undef TOML_ANON_NAMESPACE_END +#undef TOML_ANON_NAMESPACE_START +#undef TOML_ARCH_AMD64 +#undef TOML_ARCH_ARM +#undef TOML_ARCH_ARM32 +#undef TOML_ARCH_ARM64 +#undef TOML_ARCH_ITANIUM +#undef TOML_ARCH_X86 +#undef TOML_ASSERT +#undef TOML_ASSERT_ASSUME +#undef TOML_ASSUME +#undef TOML_ASYMMETRICAL_EQUALITY_OPS +#undef TOML_ATTR +#undef TOML_CLANG +#undef TOML_CLANG_VERSION +#undef TOML_CLOSED_ENUM +#undef TOML_CLOSED_FLAGS_ENUM +#undef TOML_COMPILER_HAS_EXCEPTIONS +#undef TOML_COMPILER_HAS_RTTI +#undef TOML_CONST +#undef TOML_CONST_GETTER +#undef TOML_CONST_INLINE_GETTER +#undef TOML_CONSTRAINED_TEMPLATE +#undef TOML_CPP +#undef TOML_DECLSPEC +#undef TOML_DELETE_DEFAULTS +#undef TOML_DISABLE_ARITHMETIC_WARNINGS +#undef TOML_DISABLE_CODE_ANALYSIS_WARNINGS +#undef TOML_DISABLE_SPAM_WARNINGS +#undef TOML_DISABLE_SPAM_WARNINGS_CLANG_10 +#undef TOML_DISABLE_SPAM_WARNINGS_CLANG_11 +#undef TOML_DISABLE_SUGGEST_ATTR_WARNINGS +#undef TOML_DISABLE_SWITCH_WARNINGS +#undef TOML_DISABLE_WARNINGS +#undef TOML_DOXYGEN +#undef TOML_EMPTY_BASES +#undef TOML_ENABLE_IF +#undef TOML_ENABLE_WARNINGS +#undef TOML_EVAL_BOOL_0 +#undef TOML_EVAL_BOOL_1 +#undef TOML_EXTERNAL_LINKAGE +#undef TOML_FLAGS_ENUM +#undef TOML_FLOAT_CHARCONV +#undef TOML_FLOAT128 +#undef TOML_FLOAT16_DIG +#undef TOML_FLOAT16_LIMITS_SET +#undef TOML_FLOAT16_MANT_DIG +#undef TOML_FLOAT16_MAX_10_EXP +#undef TOML_FLOAT16_MAX_EXP +#undef TOML_FLOAT16_MIN_10_EXP +#undef TOML_FLOAT16_MIN_EXP +#undef TOML_GCC +#undef TOML_HAS_ATTR +#undef TOML_HAS_BUILTIN +#undef TOML_HAS_CHAR8 +#undef TOML_HAS_CPP_ATTR +#undef TOML_HAS_CUSTOM_OPTIONAL_TYPE +#undef TOML_HAS_FEATURE +#undef TOML_HAS_INCLUDE +#undef TOML_HAS_SSE2 +#undef TOML_HAS_SSE4_1 +#undef TOML_HIDDEN_CONSTRAINT +#undef TOML_ICC +#undef TOML_ICC_CL +#undef TOML_IMPL_NAMESPACE_END +#undef TOML_IMPL_NAMESPACE_START +#undef TOML_IMPLEMENTATION +#undef TOML_INCLUDE_WINDOWS_H +#undef TOML_INT_CHARCONV +#undef TOML_INT128 +#undef TOML_INTELLISENSE +#undef TOML_INTERNAL_LINKAGE +#undef TOML_LANG_AT_LEAST +#undef TOML_LANG_EFFECTIVE_VERSION +#undef TOML_LANG_HIGHER_THAN +#undef TOML_LANG_UNRELEASED +#undef TOML_LAUNDER +#undef TOML_LIFETIME_HOOKS +#undef TOML_LIKELY +#undef TOML_LIKELY_CASE +#undef TOML_MAKE_FLAGS +#undef TOML_MAKE_FLAGS_ +#undef TOML_MAKE_FLAGS_1 +#undef TOML_MAKE_FLAGS_2 +#undef TOML_MAKE_STRING +#undef TOML_MAKE_STRING_1 +#undef TOML_MAKE_VERSION +#undef TOML_MSVC +#undef TOML_NAMESPACE +#undef TOML_NEVER_INLINE +#undef TOML_NODISCARD +#undef TOML_NODISCARD_CTOR +#undef TOML_OPEN_ENUM +#undef TOML_OPEN_FLAGS_ENUM +#undef TOML_PARSER_TYPENAME +#undef TOML_POP_WARNINGS +#undef TOML_PRAGMA_CLANG +#undef TOML_PRAGMA_CLANG_GE_10 +#undef TOML_PRAGMA_CLANG_GE_11 +#undef TOML_PRAGMA_CLANG_GE_9 +#undef TOML_PRAGMA_GCC +#undef TOML_PRAGMA_ICC +#undef TOML_PRAGMA_MSVC +#undef TOML_PURE +#undef TOML_PURE_GETTER +#undef TOML_PURE_INLINE_GETTER +#undef TOML_PUSH_WARNINGS +#undef TOML_REQUIRES +#undef TOML_SA_LIST_BEG +#undef TOML_SA_LIST_END +#undef TOML_SA_LIST_NEW +#undef TOML_SA_LIST_NXT +#undef TOML_SA_LIST_SEP +#undef TOML_SA_NATIVE_VALUE_TYPE_LIST +#undef TOML_SA_NEWLINE +#undef TOML_SA_NODE_TYPE_LIST +#undef TOML_SA_UNWRAPPED_NODE_TYPE_LIST +#undef TOML_SA_VALUE_EXACT_FUNC_MESSAGE +#undef TOML_SA_VALUE_FUNC_MESSAGE +#undef TOML_SA_VALUE_MESSAGE_CONST_CHAR8 +#undef TOML_SA_VALUE_MESSAGE_U8STRING_VIEW +#undef TOML_SA_VALUE_MESSAGE_WSTRING +#undef TOML_SIMPLE_STATIC_ASSERT_MESSAGES +#undef TOML_TRIVIAL_ABI +#undef TOML_UINT128 +#undef TOML_UNLIKELY +#undef TOML_UNLIKELY_CASE +#undef TOML_UNREACHABLE +#undef TOML_UNUSED +#undef TOML_WINDOWS +#endif + +#endif // TOMLPLUSPLUS_HPP diff --git a/src/meson.build b/src/meson.build index a17e938..3b3b537 100644 --- a/src/meson.build +++ b/src/meson.build @@ -30,7 +30,7 @@ tomlplusplus_lib = library( meson.project_name(), files('toml.cpp'), cpp_args: lib_internal_args, - gnu_symbol_visibility: 'hidden', + gnu_symbol_visibility: get_option('default_library') == 'static' ? '' : 'hidden', include_directories: include_dir, install: not is_subproject, version: meson.project_version(), diff --git a/src/toml.cpp b/src/toml.cpp index 91f4feb..8cc1877 100644 --- a/src/toml.cpp +++ b/src/toml.cpp @@ -10,4 +10,4 @@ #define TOML_HEADER_ONLY 0 #endif -#include +#include diff --git a/tests/at_path.cpp b/tests/at_path.cpp index eab1f47..9d9d851 100644 --- a/tests/at_path.cpp +++ b/tests/at_path.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TOML_DISABLE_SPAM_WARNINGS; TEST_CASE("at_path") diff --git a/tests/conformance_burntsushi_invalid.cpp b/tests/conformance_burntsushi_invalid.cpp index 2428b14..8126437 100644 --- a/tests/conformance_burntsushi_invalid.cpp +++ b/tests/conformance_burntsushi_invalid.cpp @@ -5,7 +5,7 @@ //----- // this file was generated by generate_conformance_tests.py - do not modify it directly -#include "tests.h" +#include "tests.hpp" namespace { @@ -507,16 +507,16 @@ zyx = 42)"sv; zyx = 42)"sv; static constexpr auto table_quoted_no_close = R"(["where will it end] name = value)"sv; - static constexpr auto table_redefine = R"(# Define b as int, and try to use it as a table: error + static constexpr auto table_redefine = R"(# Define b as int, and try to use it as a table: error [a] b = 1 [a.b] c = 2)"sv; - static constexpr auto table_rrbrace = R"([[table] ])"sv; - static constexpr auto table_text_after_table = R"([error] this shouldn't be here)"sv; - static constexpr auto table_whitespace = R"([invalid key])"sv; - static constexpr auto table_with_pound = R"([key#group] + static constexpr auto table_rrbrace = R"([[table] ])"sv; + static constexpr auto table_text_after_table = R"([error] this shouldn't be here)"sv; + static constexpr auto table_whitespace = R"([invalid key])"sv; + static constexpr auto table_with_pound = R"([key#group] answer = 42)"sv; } diff --git a/tests/conformance_burntsushi_valid.cpp b/tests/conformance_burntsushi_valid.cpp index b4e16da..ac1ba9d 100644 --- a/tests/conformance_burntsushi_valid.cpp +++ b/tests/conformance_burntsushi_valid.cpp @@ -5,7 +5,7 @@ //----- // this file was generated by generate_conformance_tests.py - do not modify it directly -#include "tests.h" +#include "tests.hpp" namespace { @@ -51,6 +51,11 @@ mixed = [{k="a"}, "b", 1])"sv; static constexpr auto array_string_quote_comma = R"(title = [ "Client: \"XXXX\", Job: XXXX", "Code: XXXX" +])"sv; + static constexpr auto array_string_with_comma_2 = R"(title = [ +"""Client: XXXX, +Job: XXXX""", +"Code: XXXX" ])"sv; static constexpr auto array_string_with_comma = R"(title = [ "Client: XXXX, Job: XXXX", @@ -139,9 +144,9 @@ milliseconds = 10:32:00.555)"sv; static constexpr auto datetime_local = R"(local = 1987-07-05T17:45:00 milli = 1977-12-21T10:32:00.555 space = 1987-07-05 17:45:00)"sv; - static constexpr auto datetime_milliseconds = R"(utc1 = 1987-07-05T17:45:56.1234Z + static constexpr auto datetime_milliseconds = R"(utc1 = 1987-07-05T17:45:56.123Z utc2 = 1987-07-05T17:45:56.6Z -wita1 = 1987-07-05T17:45:56.1234+08:00 +wita1 = 1987-07-05T17:45:56.123+08:00 wita2 = 1987-07-05T17:45:56.6+08:00)"sv; static constexpr auto datetime_timezone = R"(utc = 1987-07-05T17:45:56Z pdt = 1987-07-05T17:45:56-05:00 @@ -1400,6 +1405,24 @@ TEST_CASE("conformance - burntsushi/valid") }); } + SECTION("array-string-with-comma-2") + { + parsing_should_succeed(FILE_LINE_ARGS, + array_string_with_comma_2, + [](toml::table&& tbl) // array-string-with-comma-2 + { + const auto expected = toml::table{ + { R"(title)"sv, + toml::array{ + R"(Client: XXXX, +Job: XXXX)"sv, + R"(Code: XXXX)"sv, + } }, + }; + REQUIRE(tbl == expected); + }); + } + SECTION("array-string-with-comma") { parsing_should_succeed(FILE_LINE_ARGS, @@ -1667,9 +1690,9 @@ TEST_CASE("conformance - burntsushi/valid") [](toml::table&& tbl) // datetime-milliseconds { const auto expected = toml::table{ - { R"(utc1)"sv, toml::date_time{ { 1987, 7, 5 }, { 17, 45, 56, 123400000 }, { 0, 0 } } }, + { R"(utc1)"sv, toml::date_time{ { 1987, 7, 5 }, { 17, 45, 56, 123000000 }, { 0, 0 } } }, { R"(utc2)"sv, toml::date_time{ { 1987, 7, 5 }, { 17, 45, 56, 600000000 }, { 0, 0 } } }, - { R"(wita1)"sv, toml::date_time{ { 1987, 7, 5 }, { 17, 45, 56, 123400000 }, { 8, 0 } } }, + { R"(wita1)"sv, toml::date_time{ { 1987, 7, 5 }, { 17, 45, 56, 123000000 }, { 8, 0 } } }, { R"(wita2)"sv, toml::date_time{ { 1987, 7, 5 }, { 17, 45, 56, 600000000 }, { 8, 0 } } }, }; REQUIRE(tbl == expected); diff --git a/tests/conformance_iarna_invalid.cpp b/tests/conformance_iarna_invalid.cpp index 3ac007c..28c32b3 100644 --- a/tests/conformance_iarna_invalid.cpp +++ b/tests/conformance_iarna_invalid.cpp @@ -5,7 +5,7 @@ //----- // this file was generated by generate_conformance_tests.py - do not modify it directly -#include "tests.h" +#include "tests.hpp" namespace { diff --git a/tests/conformance_iarna_valid.cpp b/tests/conformance_iarna_valid.cpp index 71a1522..8848906 100644 --- a/tests/conformance_iarna_valid.cpp +++ b/tests/conformance_iarna_valid.cpp @@ -5,7 +5,7 @@ //----- // this file was generated by generate_conformance_tests.py - do not modify it directly -#include "tests.h" +#include "tests.hpp" namespace { diff --git a/tests/for_each.cpp b/tests/for_each.cpp index c69ad1d..73e641f 100644 --- a/tests/for_each.cpp +++ b/tests/for_each.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TOML_DISABLE_SPAM_WARNINGS; TEST_CASE("array::for_each") diff --git a/tests/formatters.cpp b/tests/formatters.cpp index 3f9778e..a0cd35f 100644 --- a/tests/formatters.cpp +++ b/tests/formatters.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" namespace { diff --git a/tests/impl_toml.cpp b/tests/impl_toml.cpp index 95a8d92..bdf23a3 100644 --- a/tests/impl_toml.cpp +++ b/tests/impl_toml.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "settings.h" +#include "settings.hpp" #if !TOML_HEADER_ONLY && !TOML_SHARED_LIB #define TOML_IMPLEMENTATION #endif @@ -11,7 +11,7 @@ #if USE_SINGLE_HEADER #include "../toml.hpp" #else -#include "../include/toml++/toml.h" +#include "../include/toml++/toml.hpp" #endif namespace toml diff --git a/tests/leakproof.h b/tests/leakproof.hpp similarity index 100% rename from tests/leakproof.h rename to tests/leakproof.hpp diff --git a/tests/lib_catch2.h b/tests/lib_catch2.hpp similarity index 98% rename from tests/lib_catch2.h rename to tests/lib_catch2.hpp index 1646627..17e2da9 100644 --- a/tests/lib_catch2.h +++ b/tests/lib_catch2.hpp @@ -4,7 +4,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include "settings.h" +#include "settings.hpp" #ifdef __clang__ #pragma clang diagnostic push diff --git a/tests/main.cpp b/tests/main.cpp index 93a9975..67c98cc 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -10,7 +10,7 @@ #endif #define CATCH_CONFIG_RUNNER -#include "lib_catch2.h" +#include "lib_catch2.hpp" #include #if LEAK_TESTS @@ -18,7 +18,7 @@ #include #include #include -#include "leakproof.h" +#include "leakproof.hpp" using namespace std::string_view_literals; namespace leakproof diff --git a/tests/manipulating_arrays.cpp b/tests/manipulating_arrays.cpp index e08e6c0..32f8b8b 100644 --- a/tests/manipulating_arrays.cpp +++ b/tests/manipulating_arrays.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TEST_CASE("arrays - moving") { diff --git a/tests/manipulating_parse_result.cpp b/tests/manipulating_parse_result.cpp index dcb2cf5..c0ef4be 100644 --- a/tests/manipulating_parse_result.cpp +++ b/tests/manipulating_parse_result.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" #if !TOML_EXCEPTIONS diff --git a/tests/manipulating_tables.cpp b/tests/manipulating_tables.cpp index 82561b7..19c8e88 100644 --- a/tests/manipulating_tables.cpp +++ b/tests/manipulating_tables.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TEST_CASE("tables - moving") { diff --git a/tests/manipulating_values.cpp b/tests/manipulating_values.cpp index 9441189..20d6a3d 100644 --- a/tests/manipulating_values.cpp +++ b/tests/manipulating_values.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" #ifdef _WIN32 TOML_DISABLE_WARNINGS; diff --git a/tests/parsing_arrays.cpp b/tests/parsing_arrays.cpp index c991d43..fdd6ffa 100644 --- a/tests/parsing_arrays.cpp +++ b/tests/parsing_arrays.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TEST_CASE("parsing - arrays") { diff --git a/tests/parsing_booleans.cpp b/tests/parsing_booleans.cpp index 36536cd..c81cdf1 100644 --- a/tests/parsing_booleans.cpp +++ b/tests/parsing_booleans.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TEST_CASE("parsing - booleans") { diff --git a/tests/parsing_comments.cpp b/tests/parsing_comments.cpp index 279cff1..c6ed34a 100644 --- a/tests/parsing_comments.cpp +++ b/tests/parsing_comments.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TEST_CASE("parsing - comments") { diff --git a/tests/parsing_dates_and_times.cpp b/tests/parsing_dates_and_times.cpp index 3ef6b4b..eb336b8 100644 --- a/tests/parsing_dates_and_times.cpp +++ b/tests/parsing_dates_and_times.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TOML_DISABLE_SPAM_WARNINGS; TEST_CASE("parsing - dates and times") diff --git a/tests/parsing_floats.cpp b/tests/parsing_floats.cpp index 11e1f18..fceab80 100644 --- a/tests/parsing_floats.cpp +++ b/tests/parsing_floats.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TEST_CASE("parsing - floats") { diff --git a/tests/parsing_integers.cpp b/tests/parsing_integers.cpp index 582517e..c49858c 100644 --- a/tests/parsing_integers.cpp +++ b/tests/parsing_integers.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TEST_CASE("parsing - integers (decimal)") { diff --git a/tests/parsing_key_value_pairs.cpp b/tests/parsing_key_value_pairs.cpp index f11a134..b913203 100644 --- a/tests/parsing_key_value_pairs.cpp +++ b/tests/parsing_key_value_pairs.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TEST_CASE("parsing - key-value pairs") { diff --git a/tests/parsing_spec_example.cpp b/tests/parsing_spec_example.cpp index 71f6383..254bbd3 100644 --- a/tests/parsing_spec_example.cpp +++ b/tests/parsing_spec_example.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TOML_DISABLE_SPAM_WARNINGS; TEST_CASE("parsing - TOML spec example") diff --git a/tests/parsing_strings.cpp b/tests/parsing_strings.cpp index 4ecb58b..718fda0 100644 --- a/tests/parsing_strings.cpp +++ b/tests/parsing_strings.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TEST_CASE("parsing - strings") { diff --git a/tests/parsing_tables.cpp b/tests/parsing_tables.cpp index 8b95f8e..417427e 100644 --- a/tests/parsing_tables.cpp +++ b/tests/parsing_tables.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TEST_CASE("parsing - tables") { diff --git a/tests/path.cpp b/tests/path.cpp index e6d2127..be8131a 100644 --- a/tests/path.cpp +++ b/tests/path.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TOML_DISABLE_SPAM_WARNINGS; TEST_CASE("path - parsing") diff --git a/tests/settings.h b/tests/settings.hpp similarity index 100% rename from tests/settings.h rename to tests/settings.hpp diff --git a/tests/tests.cpp b/tests/tests.cpp index 088cc28..1ba8805 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" bool parsing_should_succeed(std::string_view test_file, uint32_t test_line, diff --git a/tests/tests.h b/tests/tests.hpp similarity index 99% rename from tests/tests.h rename to tests/tests.hpp index 5c48acc..de1b429 100644 --- a/tests/tests.h +++ b/tests/tests.hpp @@ -4,8 +4,8 @@ // SPDX-License-Identifier: MIT #pragma once -#include "settings.h" -#include +#include "settings.hpp" +#include #if TOML_COMPILER_HAS_EXCEPTIONS ^ SHOULD_HAVE_EXCEPTIONS #error TOML_COMPILER_HAS_EXCEPTIONS was not deduced correctly @@ -33,7 +33,7 @@ TOML_DISABLE_ARITHMETIC_WARNINGS; #endif TOML_DISABLE_WARNINGS; -#include "lib_catch2.h" +#include "lib_catch2.hpp" #include namespace toml { diff --git a/tests/user_feedback.cpp b/tests/user_feedback.cpp index b8fdbd4..33b7293 100644 --- a/tests/user_feedback.cpp +++ b/tests/user_feedback.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" // this file is about testing user misc. repros submitted via github issues, et cetera. diff --git a/tests/using_iterators.cpp b/tests/using_iterators.cpp index fa47a43..cbc4bbe 100644 --- a/tests/using_iterators.cpp +++ b/tests/using_iterators.cpp @@ -1,4 +1,4 @@ -#include "tests.h" +#include "tests.hpp" TOML_DISABLE_WARNINGS; #include diff --git a/tests/visit.cpp b/tests/visit.cpp index 0509838..efc3c5f 100644 --- a/tests/visit.cpp +++ b/tests/visit.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" TOML_DISABLE_SPAM_WARNINGS; TEST_CASE("node::visit") diff --git a/tests/vs/test_debug_x64.vcxproj b/tests/vs/test_debug_x64.vcxproj index 66562a7..388a575 100644 --- a/tests/vs/test_debug_x64.vcxproj +++ b/tests/vs/test_debug_x64.vcxproj @@ -1,146 +1,127 @@  - - - Debug - x64 - - - - 16.0 - {202DCF23-B4E4-5FB9-AFA8-CC9A718067FF} - 10.0 - x64 - - - - Application - true - v143 - MultiByte - - - Application - false - v143 - true - MultiByte - - - - - - - - - ..\tests;%(AdditionalIncludeDirectories) - Sync - Use - tests.h - TOML_ENABLE_UNRELEASED_FEATURES=0;%(PreprocessorDefinitions) - LEAK_TESTS=1;%(PreprocessorDefinitions) - _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) - SHOULD_HAVE_EXCEPTIONS=0;%(PreprocessorDefinitions) - SHOULD_HAVE_EXCEPTIONS=1;%(PreprocessorDefinitions) - stdcpp17 - true - EnableAllWarnings - %(DisableSpecificWarnings);4127 - - %(DisableSpecificWarnings);4324 - - %(DisableSpecificWarnings);4464 - - %(DisableSpecificWarnings);4505 - - %(DisableSpecificWarnings);4514 - - %(DisableSpecificWarnings);4577 - - %(DisableSpecificWarnings);4582 - - %(DisableSpecificWarnings);4623 - - %(DisableSpecificWarnings);4625 - - %(DisableSpecificWarnings);4626 - - %(DisableSpecificWarnings);4710 - - %(DisableSpecificWarnings);4711 - - %(DisableSpecificWarnings);4738 - - %(DisableSpecificWarnings);4820 - - %(DisableSpecificWarnings);4866 - - %(DisableSpecificWarnings);4868 - - %(DisableSpecificWarnings);4946 - - %(DisableSpecificWarnings);5026 - - %(DisableSpecificWarnings);5027 - - %(DisableSpecificWarnings);5039 - - %(DisableSpecificWarnings);5045 - - - - - $(ProjectDir)..\ - - - - - - - - - - - - NotUsing - - - NotUsing - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + Debug + x64 + + + + 16.0 + {202DCF23-B4E4-5FB9-AFA8-CC9A718067FF} + 10.0 + x64 + + + + Application + true + v143 + MultiByte + + + Application + false + v143 + true + MultiByte + + + + + + + + + ..\tests;%(AdditionalIncludeDirectories) + Sync + Use + tests.h + TOML_ENABLE_UNRELEASED_FEATURES=0;%(PreprocessorDefinitions) + LEAK_TESTS=1;%(PreprocessorDefinitions) + _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) + SHOULD_HAVE_EXCEPTIONS=0;%(PreprocessorDefinitions) + SHOULD_HAVE_EXCEPTIONS=1;%(PreprocessorDefinitions) + stdcpp17 + true + EnableAllWarnings + %(DisableSpecificWarnings);4127 + %(DisableSpecificWarnings);4324 + %(DisableSpecificWarnings);4464 + %(DisableSpecificWarnings);4505 + %(DisableSpecificWarnings);4514 + %(DisableSpecificWarnings);4577 + %(DisableSpecificWarnings);4582 + %(DisableSpecificWarnings);4623 + %(DisableSpecificWarnings);4625 + %(DisableSpecificWarnings);4626 + %(DisableSpecificWarnings);4710 + %(DisableSpecificWarnings);4711 + %(DisableSpecificWarnings);4738 + %(DisableSpecificWarnings);4820 + %(DisableSpecificWarnings);4866 + %(DisableSpecificWarnings);4868 + %(DisableSpecificWarnings);4946 + %(DisableSpecificWarnings);5026 + %(DisableSpecificWarnings);5027 + %(DisableSpecificWarnings);5039 + %(DisableSpecificWarnings);5045 + + + + $(ProjectDir)..\ + + + + + + + + + + + + NotUsing + + + NotUsing + + + + + + + + + + + + + + + + + Create + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/vs/test_debug_x64_cpplatest.vcxproj b/tests/vs/test_debug_x64_cpplatest.vcxproj index 87db1a9..3e9d9d6 100644 --- a/tests/vs/test_debug_x64_cpplatest.vcxproj +++ b/tests/vs/test_debug_x64_cpplatest.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x64_cpplatest_noexcept.vcxproj b/tests/vs/test_debug_x64_cpplatest_noexcept.vcxproj index 877b963..069cd85 100644 --- a/tests/vs/test_debug_x64_cpplatest_noexcept.vcxproj +++ b/tests/vs/test_debug_x64_cpplatest_noexcept.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x64_cpplatest_noexcept_unrel.vcxproj b/tests/vs/test_debug_x64_cpplatest_noexcept_unrel.vcxproj index b00f2cb..bee731f 100644 --- a/tests/vs/test_debug_x64_cpplatest_noexcept_unrel.vcxproj +++ b/tests/vs/test_debug_x64_cpplatest_noexcept_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x64_cpplatest_unrel.vcxproj b/tests/vs/test_debug_x64_cpplatest_unrel.vcxproj index 357571f..73273d6 100644 --- a/tests/vs/test_debug_x64_cpplatest_unrel.vcxproj +++ b/tests/vs/test_debug_x64_cpplatest_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x64_noexcept.vcxproj b/tests/vs/test_debug_x64_noexcept.vcxproj index 30becad..52182b7 100644 --- a/tests/vs/test_debug_x64_noexcept.vcxproj +++ b/tests/vs/test_debug_x64_noexcept.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x64_noexcept_unrel.vcxproj b/tests/vs/test_debug_x64_noexcept_unrel.vcxproj index 6077da6..df14238 100644 --- a/tests/vs/test_debug_x64_noexcept_unrel.vcxproj +++ b/tests/vs/test_debug_x64_noexcept_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x64_unrel.vcxproj b/tests/vs/test_debug_x64_unrel.vcxproj index 436d16f..762b11c 100644 --- a/tests/vs/test_debug_x64_unrel.vcxproj +++ b/tests/vs/test_debug_x64_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x86.vcxproj b/tests/vs/test_debug_x86.vcxproj index ca750d0..2596953 100644 --- a/tests/vs/test_debug_x86.vcxproj +++ b/tests/vs/test_debug_x86.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x86_cpplatest.vcxproj b/tests/vs/test_debug_x86_cpplatest.vcxproj index 57f96c9..ce607ea 100644 --- a/tests/vs/test_debug_x86_cpplatest.vcxproj +++ b/tests/vs/test_debug_x86_cpplatest.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x86_cpplatest_noexcept.vcxproj b/tests/vs/test_debug_x86_cpplatest_noexcept.vcxproj index dcd2b31..32b48e8 100644 --- a/tests/vs/test_debug_x86_cpplatest_noexcept.vcxproj +++ b/tests/vs/test_debug_x86_cpplatest_noexcept.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x86_cpplatest_noexcept_unrel.vcxproj b/tests/vs/test_debug_x86_cpplatest_noexcept_unrel.vcxproj index e8d869e..cbc9842 100644 --- a/tests/vs/test_debug_x86_cpplatest_noexcept_unrel.vcxproj +++ b/tests/vs/test_debug_x86_cpplatest_noexcept_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x86_cpplatest_unrel.vcxproj b/tests/vs/test_debug_x86_cpplatest_unrel.vcxproj index 543508c..2ab89a5 100644 --- a/tests/vs/test_debug_x86_cpplatest_unrel.vcxproj +++ b/tests/vs/test_debug_x86_cpplatest_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x86_noexcept.vcxproj b/tests/vs/test_debug_x86_noexcept.vcxproj index 56b5971..ea776ce 100644 --- a/tests/vs/test_debug_x86_noexcept.vcxproj +++ b/tests/vs/test_debug_x86_noexcept.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x86_noexcept_unrel.vcxproj b/tests/vs/test_debug_x86_noexcept_unrel.vcxproj index 9c3b0af..b56070a 100644 --- a/tests/vs/test_debug_x86_noexcept_unrel.vcxproj +++ b/tests/vs/test_debug_x86_noexcept_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_debug_x86_unrel.vcxproj b/tests/vs/test_debug_x86_unrel.vcxproj index 116ef9e..647ed22 100644 --- a/tests/vs/test_debug_x86_unrel.vcxproj +++ b/tests/vs/test_debug_x86_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x64.vcxproj b/tests/vs/test_release_x64.vcxproj index 8811130..2d35dfd 100644 --- a/tests/vs/test_release_x64.vcxproj +++ b/tests/vs/test_release_x64.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x64_cpplatest.vcxproj b/tests/vs/test_release_x64_cpplatest.vcxproj index da4ee62..3ebd21a 100644 --- a/tests/vs/test_release_x64_cpplatest.vcxproj +++ b/tests/vs/test_release_x64_cpplatest.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x64_cpplatest_noexcept.vcxproj b/tests/vs/test_release_x64_cpplatest_noexcept.vcxproj index a0c71a8..33502be 100644 --- a/tests/vs/test_release_x64_cpplatest_noexcept.vcxproj +++ b/tests/vs/test_release_x64_cpplatest_noexcept.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x64_cpplatest_noexcept_unrel.vcxproj b/tests/vs/test_release_x64_cpplatest_noexcept_unrel.vcxproj index 647cc47..a92bb3f 100644 --- a/tests/vs/test_release_x64_cpplatest_noexcept_unrel.vcxproj +++ b/tests/vs/test_release_x64_cpplatest_noexcept_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x64_cpplatest_unrel.vcxproj b/tests/vs/test_release_x64_cpplatest_unrel.vcxproj index 57409ac..1675090 100644 --- a/tests/vs/test_release_x64_cpplatest_unrel.vcxproj +++ b/tests/vs/test_release_x64_cpplatest_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x64_noexcept.vcxproj b/tests/vs/test_release_x64_noexcept.vcxproj index 745f3a0..0768535 100644 --- a/tests/vs/test_release_x64_noexcept.vcxproj +++ b/tests/vs/test_release_x64_noexcept.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x64_noexcept_unrel.vcxproj b/tests/vs/test_release_x64_noexcept_unrel.vcxproj index 8ead14e..4039988 100644 --- a/tests/vs/test_release_x64_noexcept_unrel.vcxproj +++ b/tests/vs/test_release_x64_noexcept_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x64_unrel.vcxproj b/tests/vs/test_release_x64_unrel.vcxproj index 1272813..61bf1fc 100644 --- a/tests/vs/test_release_x64_unrel.vcxproj +++ b/tests/vs/test_release_x64_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x86.vcxproj b/tests/vs/test_release_x86.vcxproj index 1723cc2..2d990b6 100644 --- a/tests/vs/test_release_x86.vcxproj +++ b/tests/vs/test_release_x86.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x86_cpplatest.vcxproj b/tests/vs/test_release_x86_cpplatest.vcxproj index 21e0762..368d297 100644 --- a/tests/vs/test_release_x86_cpplatest.vcxproj +++ b/tests/vs/test_release_x86_cpplatest.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x86_cpplatest_noexcept.vcxproj b/tests/vs/test_release_x86_cpplatest_noexcept.vcxproj index 6ac0205..f08c171 100644 --- a/tests/vs/test_release_x86_cpplatest_noexcept.vcxproj +++ b/tests/vs/test_release_x86_cpplatest_noexcept.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x86_cpplatest_noexcept_unrel.vcxproj b/tests/vs/test_release_x86_cpplatest_noexcept_unrel.vcxproj index 835c8e9..29505a0 100644 --- a/tests/vs/test_release_x86_cpplatest_noexcept_unrel.vcxproj +++ b/tests/vs/test_release_x86_cpplatest_noexcept_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x86_cpplatest_unrel.vcxproj b/tests/vs/test_release_x86_cpplatest_unrel.vcxproj index 43153cb..3f363c2 100644 --- a/tests/vs/test_release_x86_cpplatest_unrel.vcxproj +++ b/tests/vs/test_release_x86_cpplatest_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x86_noexcept.vcxproj b/tests/vs/test_release_x86_noexcept.vcxproj index daa2156..21816ce 100644 --- a/tests/vs/test_release_x86_noexcept.vcxproj +++ b/tests/vs/test_release_x86_noexcept.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x86_noexcept_unrel.vcxproj b/tests/vs/test_release_x86_noexcept_unrel.vcxproj index 6d0578e..688d576 100644 --- a/tests/vs/test_release_x86_noexcept_unrel.vcxproj +++ b/tests/vs/test_release_x86_noexcept_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/vs/test_release_x86_unrel.vcxproj b/tests/vs/test_release_x86_unrel.vcxproj index cfe32af..51b5ba3 100644 --- a/tests/vs/test_release_x86_unrel.vcxproj +++ b/tests/vs/test_release_x86_unrel.vcxproj @@ -113,11 +113,11 @@ - - - - - + + + + + diff --git a/tests/windows_compat.cpp b/tests/windows_compat.cpp index 11597c8..1d234cf 100644 --- a/tests/windows_compat.cpp +++ b/tests/windows_compat.cpp @@ -3,7 +3,7 @@ // See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tests.h" +#include "tests.hpp" #if TOML_ENABLE_WINDOWS_COMPAT diff --git a/toml++.code-workspace b/toml++.code-workspace index f2ffd5e..6407c96 100644 --- a/toml++.code-workspace +++ b/toml++.code-workspace @@ -17,6 +17,7 @@ "version": "cpp", "xstring": "cpp" }, - "explorer.sortOrder": "type" + "explorer.sortOrder": "type", + "C_Cpp.default.compileCommands": "builddir\\compile_commands.json" } } diff --git a/toml++.vcxproj b/toml++.vcxproj index c9baaf0..ed5a5a6 100644 --- a/toml++.vcxproj +++ b/toml++.vcxproj @@ -35,51 +35,52 @@ - + - - - - - - - - + + + + + + + + - + - - - - + + + + - - + + - - - - + + + + - - + + - - - - - - - - - + + + + + + + + + - - - - + + + + - + + diff --git a/toml++.vcxproj.filters b/toml++.vcxproj.filters index 97bb192..b6f2e4c 100644 --- a/toml++.vcxproj.filters +++ b/toml++.vcxproj.filters @@ -4,103 +4,106 @@ include - + + include + + include\impl include\impl - + include\impl - + include\impl include\impl - + include\impl - + include\impl include\impl - + include\impl include\impl - + include\impl - + include\impl - + include\impl - + include\impl include\impl - + include\impl - + include\impl - + include\impl include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl @@ -112,31 +115,31 @@ include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl - + include\impl diff --git a/toml-test/tt.h b/toml-test/tt.hpp similarity index 97% rename from toml-test/tt.h rename to toml-test/tt.hpp index cc423d9..110f7a4 100644 --- a/toml-test/tt.h +++ b/toml-test/tt.hpp @@ -40,4 +40,4 @@ #pragma warning(pop) #endif -#include +#include diff --git a/toml-test/tt_decoder.cpp b/toml-test/tt_decoder.cpp index a017b1d..0426ea9 100644 --- a/toml-test/tt_decoder.cpp +++ b/toml-test/tt_decoder.cpp @@ -3,7 +3,7 @@ //# See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tt.h" +#include "tt.hpp" using nlohmann::json; using namespace std::string_view_literals; diff --git a/toml-test/tt_decoder.vcxproj b/toml-test/tt_decoder.vcxproj index 5219826..a11941f 100644 --- a/toml-test/tt_decoder.vcxproj +++ b/toml-test/tt_decoder.vcxproj @@ -53,7 +53,7 @@ - + \ No newline at end of file diff --git a/toml-test/tt_encoder.cpp b/toml-test/tt_encoder.cpp index da0fd64..f1b5edf 100644 --- a/toml-test/tt_encoder.cpp +++ b/toml-test/tt_encoder.cpp @@ -3,7 +3,7 @@ //# See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text. // SPDX-License-Identifier: MIT -#include "tt.h" +#include "tt.hpp" using nlohmann::json; using namespace std::string_view_literals; diff --git a/toml-test/tt_encoder.vcxproj b/toml-test/tt_encoder.vcxproj index 137050d..9a1707b 100644 --- a/toml-test/tt_encoder.vcxproj +++ b/toml-test/tt_encoder.vcxproj @@ -53,7 +53,7 @@ - + - \ No newline at end of file + diff --git a/toml.hpp b/toml.hpp index ea7dae9..996373b 100644 --- a/toml.hpp +++ b/toml.hpp @@ -41,12 +41,13 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // //---------------------------------------------------------------------------------------------------------------------- -#ifndef TOMLPLUSPLUS_H -#define TOMLPLUSPLUS_H +#ifndef TOMLPLUSPLUS_HPP +#define TOMLPLUSPLUS_HPP #define INCLUDE_TOMLPLUSPLUS_H // old guard name used pre-v3 +#define TOMLPLUSPLUS_H // guard name used in the legacy toml.h -//******** impl/preprocessor.h *************************************************************************************** +//******** impl/preprocessor.hpp ************************************************************************************* #ifndef __cplusplus #error toml++ is a C++ library. @@ -996,7 +997,7 @@ TOML_ENABLE_WARNINGS; // clang-format off -//******** impl/version.h ******************************************************************************************** +//******** impl/version.hpp ****************************************************************************************** #define TOML_LIB_MAJOR 3 #define TOML_LIB_MINOR 3 @@ -1006,7 +1007,7 @@ TOML_ENABLE_WARNINGS; #define TOML_LANG_MINOR 0 #define TOML_LANG_PATCH 0 -//******** impl/preprocessor.h *************************************************************************************** +//******** impl/preprocessor.hpp ************************************************************************************* #define TOML_LIB_SINGLE_HEADER 1 @@ -1143,7 +1144,7 @@ TOML_PRAGMA_CLANG(diagnostic ignored "-Wreserved-identifier") #endif #endif -//******** impl/std_new.h ******************************************************************************************** +//******** impl/std_new.hpp ****************************************************************************************** TOML_DISABLE_WARNINGS; #include @@ -1157,7 +1158,7 @@ TOML_ENABLE_WARNINGS; #define TOML_LAUNDER(x) x #endif -//******** impl/std_string.h ***************************************************************************************** +//******** impl/std_string.hpp *************************************************************************************** TOML_DISABLE_WARNINGS; #include @@ -1202,7 +1203,7 @@ TOML_IMPL_NAMESPACE_END; #endif // TOML_ENABLE_WINDOWS_COMPAT -//******** impl/std_optional.h *************************************************************************************** +//******** impl/std_optional.hpp ************************************************************************************* TOML_DISABLE_WARNINGS; #if !TOML_HAS_CUSTOM_OPTIONAL_TYPE @@ -1226,7 +1227,7 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -//******** impl/forward_declarations.h ******************************************************************************* +//******** impl/forward_declarations.hpp ***************************************************************************** TOML_DISABLE_WARNINGS; #include @@ -1339,7 +1340,7 @@ TOML_IMPL_NAMESPACE_START class parser; TOML_ABI_NAMESPACE_END; // TOML_EXCEPTIONS - // clang-format off + // clang-format off inline constexpr std::string_view control_char_escapes[] = { @@ -1733,8 +1734,8 @@ TOML_IMPL_NAMESPACE_START && digits <= 53 // DBL_MANT_DIG && digits10 <= 15; // DBL_DIG - static constexpr bool can_represent_native = digits >= 53 // DBL_MANT_DIG - && digits10 >= 15; // DBL_DIG + static constexpr bool can_represent_native = digits >= 53 // DBL_MANT_DIG + && digits10 >= 15; // DBL_DIG static constexpr bool can_partially_represent_native = digits > 0 && digits10 > 0; }; @@ -2156,7 +2157,7 @@ TOML_IMPL_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/print_to_stream.h ************************************************************************************ +//******** impl/print_to_stream.hpp ********************************************************************************** TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -2296,7 +2297,7 @@ TOML_IMPL_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/source_region.h ************************************************************************************** +//******** impl/source_region.hpp ************************************************************************************ TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -2420,7 +2421,7 @@ TOML_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/date_time.h ****************************************************************************************** +//******** impl/date_time.hpp **************************************************************************************** TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -2764,7 +2765,7 @@ TOML_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/at_path.h ******************************************************************************************** +//******** impl/at_path.hpp ****************************************************************************************** TOML_IMPL_NAMESPACE_START { @@ -2803,14 +2804,14 @@ TOML_NAMESPACE_START } TOML_NAMESPACE_END; -//******** impl/std_vector.h ***************************************************************************************** +//******** impl/std_vector.hpp *************************************************************************************** TOML_DISABLE_WARNINGS; #include #include TOML_ENABLE_WARNINGS; -//******** impl/path.h *********************************************************************************************** +//******** impl/path.hpp ********************************************************************************************* TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -3403,13 +3404,13 @@ TOML_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/std_utility.h **************************************************************************************** +//******** impl/std_utility.hpp ************************************************************************************** TOML_DISABLE_WARNINGS; #include TOML_ENABLE_WARNINGS; -//******** impl/node.h *********************************************************************************************** +//******** impl/node.hpp ********************************************************************************************* TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -4024,13 +4025,13 @@ TOML_IMPL_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/std_initializer_list.h ******************************************************************************* +//******** impl/std_initializer_list.hpp ***************************************************************************** TOML_DISABLE_WARNINGS; #include TOML_ENABLE_WARNINGS; -//******** impl/node_view.h ****************************************************************************************** +//******** impl/node_view.hpp **************************************************************************************** TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -4547,7 +4548,7 @@ TOML_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/value.h ********************************************************************************************** +//******** impl/value.hpp ******************************************************************************************** TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -5640,7 +5641,7 @@ TOML_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/make_node.h ****************************************************************************************** +//******** impl/make_node.hpp **************************************************************************************** TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -5820,7 +5821,7 @@ TOML_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/array.h ********************************************************************************************** +//******** impl/array.hpp ******************************************************************************************** TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -6915,7 +6916,7 @@ TOML_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/key.h ************************************************************************************************ +//******** impl/key.hpp ********************************************************************************************** TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -7178,14 +7179,14 @@ TOML_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/std_map.h ******************************************************************************************** +//******** impl/std_map.hpp ****************************************************************************************** TOML_DISABLE_WARNINGS; #include #include TOML_ENABLE_WARNINGS; -//******** impl/table.h ********************************************************************************************** +//******** impl/table.hpp ******************************************************************************************** TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -8342,7 +8343,7 @@ TOML_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/unicode_autogenerated.h ****************************************************************************** +//******** impl/unicode_autogenerated.hpp **************************************************************************** TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -8534,7 +8535,7 @@ TOML_IMPL_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/unicode.h ******************************************************************************************** +//******** impl/unicode.hpp ****************************************************************************************** TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -8740,11 +8741,11 @@ TOML_IMPL_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/parse_error.h **************************************************************************************** +//******** impl/parse_error.hpp ************************************************************************************** #if TOML_ENABLE_PARSER -//******** impl/std_except.h ***************************************************************************************** +//******** impl/std_except.hpp *************************************************************************************** TOML_DISABLE_WARNINGS; #if TOML_EXCEPTIONS @@ -8752,7 +8753,7 @@ TOML_DISABLE_WARNINGS; #endif TOML_ENABLE_WARNINGS; -//******** impl/parse_error.h **************************************************************************************** +//******** impl/parse_error.hpp ************************************************************************************** TOML_PUSH_WARNINGS; #ifdef _MSC_VER @@ -8868,7 +8869,7 @@ TOML_POP_WARNINGS; #endif // TOML_ENABLE_PARSER -//******** impl/parse_result.h *************************************************************************************** +//******** impl/parse_result.hpp ************************************************************************************* #if TOML_DOXYGEN || (TOML_ENABLE_PARSER && !TOML_EXCEPTIONS) @@ -9219,7 +9220,7 @@ TOML_POP_WARNINGS; #endif // TOML_ENABLE_PARSER && !TOML_EXCEPTIONS -//******** impl/parser.h ********************************************************************************************* +//******** impl/parser.hpp ******************************************************************************************* #if TOML_ENABLE_PARSER @@ -9338,7 +9339,7 @@ TOML_POP_WARNINGS; #endif // TOML_ENABLE_PARSER -//******** impl/formatter.h ****************************************************************************************** +//******** impl/formatter.hpp **************************************************************************************** #if TOML_ENABLE_FORMATTERS @@ -9538,7 +9539,7 @@ TOML_POP_WARNINGS; #endif // TOML_ENABLE_FORMATTERS -//******** impl/toml_formatter.h ************************************************************************************* +//******** impl/toml_formatter.hpp *********************************************************************************** #if TOML_ENABLE_FORMATTERS @@ -9643,7 +9644,7 @@ TOML_POP_WARNINGS; #endif // TOML_ENABLE_FORMATTERS -//******** impl/json_formatter.h ************************************************************************************* +//******** impl/json_formatter.hpp *********************************************************************************** #if TOML_ENABLE_FORMATTERS @@ -9733,7 +9734,7 @@ TOML_POP_WARNINGS; #endif // TOML_ENABLE_FORMATTERS -//******** impl/yaml_formatter.h ************************************************************************************* +//******** impl/yaml_formatter.hpp *********************************************************************************** #if TOML_ENABLE_FORMATTERS @@ -12071,7 +12072,7 @@ TOML_NAMESPACE_END; #endif TOML_POP_WARNINGS; -//******** impl/simd.h *********************************************************************************************** +//******** impl/simd.hpp ********************************************************************************************* #if TOML_ENABLE_SIMD @@ -17430,4 +17431,4 @@ TOML_POP_WARNINGS; #undef TOML_WINDOWS #endif -#endif // TOMLPLUSPLUS_H +#endif // TOMLPLUSPLUS_HPP diff --git a/tools/clang_format.bat b/tools/clang_format.bat index 1d0ea76..7f2a139 100644 --- a/tools/clang_format.bat +++ b/tools/clang_format.bat @@ -33,6 +33,7 @@ EXIT /B 0 ECHO Formatting files in "%%~i" clang-format --style=file -i "%%~i\*.cpp" >nul 2>&1 clang-format --style=file -i "%%~i\*.h" >nul 2>&1 + clang-format --style=file -i "%%~i\*.hpp" >nul 2>&1 clang-format --style=file -i "%%~i\*.inl" >nul 2>&1 ) ) diff --git a/tools/generate_conformance_tests.py b/tools/generate_conformance_tests.py index a0bc83f..0da53ff 100755 --- a/tools/generate_conformance_tests.py +++ b/tools/generate_conformance_tests.py @@ -550,7 +550,7 @@ def write_test_file(name, all_tests): write(r'//-----') write(r'// this file was generated by generate_conformance_tests.py - do not modify it directly') write(r'') - write(r'#include "tests.h"') + write(r'#include "tests.hpp"') # test data write(r'') diff --git a/tools/generate_single_header.py b/tools/generate_single_header.py index bc36159..805836d 100755 --- a/tools/generate_single_header.py +++ b/tools/generate_single_header.py @@ -56,7 +56,7 @@ class Preprocessor: if incl_normalized.startswith(self.__entry_root): incl_normalized = incl_normalized[len(self.__entry_root):].strip('/') - if len(self.__include_stack) > 1 and incl_normalized not in (r'impl/header_start.h', r'impl/header_end.h'): + if len(self.__include_stack) > 1 and incl_normalized not in (r'impl/header_start.hpp', r'impl/header_end.hpp'): header = utils.make_divider(incl_normalized, 10, pattern = r'*') footer = '' if len(self.__include_stack) > 2: @@ -88,7 +88,7 @@ def main(): include_dir = Path(root_dir, 'include', 'toml++') # preprocess header(s) - toml_h = str(Preprocessor(Path(include_dir, 'toml.h'))) + toml_h = str(Preprocessor(Path(include_dir, 'toml.hpp'))) # strip various things: if 1: @@ -133,14 +133,14 @@ def main(): ) # read version number - version_h = utils.read_all_text_from_file(Path(include_dir, 'impl/version.h'), logger=True) + version_h = utils.read_all_text_from_file(Path(include_dir, 'impl/version.hpp'), logger=True) match = re.search( r'#\s*define\s+TOML_LIB_MAJOR\s+([0-9]+)[^0-9].*' + r'#\s*define\s+TOML_LIB_MINOR\s+([0-9]+)[^0-9].*' + r'#\s*define\s+TOML_LIB_PATCH\s+([0-9]+)[^0-9]', version_h, re.I | re.S) if match is None: - raise Exception("could not find TOML_LIB_MAJOR, TOML_LIB_MINOR or TOML_LIB_PATCH impl/version.h") + raise Exception("could not find TOML_LIB_MAJOR, TOML_LIB_MINOR or TOML_LIB_PATCH impl/version.hpp") version = rf'{int(match[1])}.{int(match[2])}.{int(match[3])}' print(rf'Library version: {version}') @@ -238,6 +238,7 @@ def main(): r'TOML_SMALL_INT_TYPE', r'TOML_UNDEF_MACROS', r'TOMLPLUSPLUS_H', + r'TOMLPLUSPLUS_HPP', r'TOML_SHARED_LIB' ) set_defines = [] diff --git a/tools/generate_windows_test_targets.py b/tools/generate_windows_test_targets.py index 3b9398a..a1df920 100755 --- a/tools/generate_windows_test_targets.py +++ b/tools/generate_windows_test_targets.py @@ -156,11 +156,11 @@ def main(): - - - - - + + + + +