Skip to content

Commit bf13bbd

Browse files
committed
added for_each() for tables and arrays
also: - refactoring - documentation fixes - updated conformance tests - made submodules shallow
1 parent db04ac8 commit bf13bbd

File tree

56 files changed

+1448
-238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1448
-238
lines changed

.gitmodules

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
[submodule "external/toml-test"]
22
path = external/toml-test
33
url = https://github.com/BurntSushi/toml-test.git
4+
shallow = true
45
[submodule "external/toml-spec-tests"]
56
path = external/toml-spec-tests
67
url = https://github.com/iarna/toml-spec-tests.git
7-
[submodule "external/dox"]
8-
path = external/dox
9-
url = https://github.com/marzer/dox.git
10-
[submodule "external/Catch2"]
11-
path = external/Catch2
12-
url = https://github.com/catchorg/Catch2.git
13-
branch = v2.x
8+
shallow = true
149
[submodule "external/tloptional"]
1510
path = external/tloptional
1611
url = https://github.com/TartanLlama/optional.git
12+
shallow = true
1713
[submodule "external/json"]
1814
path = external/json
1915
url = https://github.com/nlohmann/json.git
16+
shallow = true
17+
[submodule "external/Catch2"]
18+
path = external/Catch2
19+
url = https://github.com/catchorg/Catch2.git
20+
branch = v2.x
21+
shallow = true

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,19 @@ template:
1414
-->
1515

1616

17-
## Unreleased
17+
## [v3.1.0](https://github.com/marzer/tomlplusplus/releases/tag/v3.1.0) - 2022-04-22
1818

1919
#### Fixes:
2020
- Fixed potential segfault when calling `at_path()` with an empty string
2121
- Fixed UB in internal unicode machinery (#144) (@kchalmer)
2222
- Fixed a number of spurious warnings with Clang 10 (#145, #146) (@chronoxor)
2323

2424
#### Additions:
25+
- Added `toml::array::for_each()`
26+
- Added `toml::table::for_each()`
2527
- Added config options `TOML_EXPORTED_CLASS`, `TOML_EXPORTED_MEMBER_FUNCTION`, `TOML_EXPORTED_STATIC_FUNCTION` & `TOML_EXPORTED_FREE_FUNCTION`
26-
- Add support for escape sequence `\e` when using `TOML_ENABLE_UNRELEASED_FEATURES` ([toml/790](https://github.com/toml-lang/toml/pull/790))
27-
- Add support for more unicode in bare keys when using `TOML_ENABLE_UNRELEASED_FEATURES` ([toml/891](https://github.com/toml-lang/toml/pull/891))
28+
- Added support for escape sequence `\e` when using `TOML_ENABLE_UNRELEASED_FEATURES` ([toml/790](https://github.com/toml-lang/toml/pull/790))
29+
- Added support for more unicode in bare keys when using `TOML_ENABLE_UNRELEASED_FEATURES` ([toml/891](https://github.com/toml-lang/toml/pull/891))
2830

2931
#### Removals/Deprecations:
3032
- Deprecated old `TOML_API` option in favour new `TOML_EXPORTED_X` options

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.14)
22

33
project(
44
tomlplusplus
5-
VERSION 3.0.1
5+
VERSION 3.1.0
66
DESCRIPTION "Header-only TOML config file parser and serializer for C++17"
77
HOMEPAGE_URL "https://marzer.github.io/tomlplusplus/"
88
LANGUAGES CXX

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,13 @@ You'll find some more code examples in the `examples` directory, and plenty more
9999
2. `#include <toml++/toml.h>`
100100
101101
### Conan
102-
Add `tomlplusplus/3.0.1` to your conanfile.
102+
Add `tomlplusplus/3.1.0` to your conanfile.
103103
104104
### DDS
105105
Add `tomlpp` to your `package.json5`, e.g.:
106106
```
107107
depends: [
108-
'tomlpp^3.0.1',
108+
'tomlpp^3.1.0',
109109
]
110110
```
111111
> ℹ&#xFE0F; _[What is DDS?](https://dds.pizza/)_
@@ -121,12 +121,21 @@ include(FetchContent)
121121
FetchContent_Declare(
122122
tomlplusplus
123123
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
124-
GIT_TAG v3.0.1
124+
GIT_TAG v3.1.0
125125
)
126126
FetchContent_MakeAvailable(tomlplusplus)
127127
```
128128
> ℹ&#xFE0F; _[What is FetchContent?](https://cmake.org/cmake/help/latest/module/FetchContent.html)_
129129
130+
### Git submodules
131+
```
132+
git submodule add --depth 1 https://github.com/marzer/tomlplusplus.git tomlplusplus
133+
git config -f .gitmodules submodule.tomlplusplus.shallow true
134+
```
135+
> ℹ&#xFE0F; The toml++ repository has some submodules of its own, but **they are only used for testing**!
136+
> You do not need to use the `--recursive` option for regular library consumption.
137+
138+
130139
### Other environments and package managers
131140
`toml++` is a fairly new project and I'm not up-to-speed with all of the available packaging and integration options
132141
in the C++ ecosystem. I'm also a cmake novice, for better or worse. If there's an integration option missing be

docs/pages/main_page.dox

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,15 +457,15 @@
457457

458458

459459
\subsection mainpage-adding-lib-conan Conan
460-
Add `tomlplusplus/3.0.1` to your conanfile.
460+
Add `tomlplusplus/3.1.0` to your conanfile.
461461

462462

463463

464464
\subsection mainpage-adding-lib-dds DDS
465465
Add `tomlpp` to your `package.json5`, e.g.:
466466
\bash
467467
depends: [
468-
'tomlpp^3.0.1',
468+
'tomlpp^3.1.0',
469469
]
470470
\ebash
471471

@@ -497,7 +497,7 @@
497497
FetchContent_Declare(
498498
tomlplusplus
499499
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
500-
GIT_TAG v3.0.1
500+
GIT_TAG v3.1.0
501501
)
502502
FetchContent_MakeAvailable(tomlplusplus)
503503
\endcode
@@ -506,6 +506,16 @@
506506

507507

508508

509+
\subsection mainpage-adding-lib-git-submodules Git submodules
510+
\bash
511+
git submodule add --depth 1 https://github.com/marzer/tomlplusplus.git tomlplusplus
512+
git config -f .gitmodules submodule.tomlplusplus.shallow true
513+
\ebash
514+
\note The toml++ repository has some submodules of its own, but **they are only used for testing**! You do not need to
515+
use the `--recursive` option for regular library consumption.
516+
517+
518+
509519
\subsection mainpage-adding-lib-other Other environments and package managers
510520
toml++ is a fairly new project and I'm not up-to-speed with all of the available packaging and integration options
511521
in the C++ ecosystem. I'm also a cmake novice, for better or worse. If there's an integration option missing

external/json

Submodule json updated 84 files

external/toml-test

0 commit comments

Comments
 (0)