doc: update versions in docs

This commit is contained in:
ToruNiina
2025-02-16 00:14:52 +09:00
parent 587f9acb2a
commit be08ba2be2
10 changed files with 136 additions and 12 deletions

View File

@@ -6,6 +6,25 @@ weight = 4
# Change Log
# v4.4.0
## Added
- Add `toml::find_or_default()` (#280) (by Ken Matsui @ken-matsui)
- Add `erase` to `ordered_map` (#282) (#283) (by Sunlight @SunPodder)
- Add `bool basic_value::accessed() const` to detect whether the value has been accessed
- enabled only if `TOML11_ENABLE_ACCESS_CHECK` is defined
- Add compare operators to `toml::spec`
## Fixed
- Use `is_void<T>` instead of `is_same<T, void>` (#281) (by Ken Matsui @ken-matsui)
## Changed
- Improve `toml::parse` performance by 2x
- Stop using deprecated Ubuntu 20 image on GitHub Actions
# v4.3.0
## Added

View File

@@ -38,7 +38,7 @@ If not specified explicitly, `toml::spec::default_version()` is used to construc
The default value depends on the version of toml11 and follows the latest version of the TOML language released at that time.
As of v4.0.0, TOML v1.1.0 has not been released yet, so the default TOML version is v1.0.0.
As of v4.4.0, TOML v1.1.0 has not been released yet, so the default TOML version is v1.0.0.
{{<hint warning>}}

View File

@@ -27,6 +27,47 @@ target_link_libraries(main PUBLIC toml11::toml11)
toml11 will only run tests and install when it is the root project.
### CMake `FetchContent`
Using `FetchContent`, you can automatically download toml11 to your `build` directory.
```cmake
include(FetchContent)
FetchContent_Declare(
toml11
GIT_REPOSITORY https://github.com/ToruNiina/toml11.git
GIT_TAG v4.4.0
)
FetchContent_MakeAvailable(toml11)
add_executable(main main.cpp)
target_link_libraries(main PRIVATE toml11::toml11)
```
### CMake Package Manager (CPM)
After [adding cpm to your project](https://github.com/cpm-cmake/CPM.cmake?tab=readme-ov-file#adding-cpm), you can use toml11 by doing:
```cmake
include(cmake/CPM.cmake)
CPMAddPackage("gh:ToruNiina/toml11@4.4.0")
# OR
CPMAddPackage(
NAME toml11
GITHUB_REPOSITORY "ToruNiina/toml11"
VERSION 4.4.0
OPTIONS
"TOML11_PRECOMPILE ON" # to pre-compile
"TOML11_ENABLE_ACCESS_CHECK ON" # to use value.accessed()
)
add_executable(main main.cpp)
target_link_libraries(main PUBLIC toml11::toml11)
```
## Installing using cmake
After cloning toml11, you can install it using cmake.

View File

@@ -131,7 +131,7 @@ Constructs a `spec` with the default version.
Used as the default value for `toml::parse` and `toml::format`.
In toml11 v4.0.0, the value is v1.0.0.
In toml11 v4.4.0, the value is v1.0.0.
### `v(major, minor, patch)`