From be08ba2be2a964edcdb3d3e3ea8d100abc26f286 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Sun, 16 Feb 2025 00:14:52 +0900 Subject: [PATCH] doc: update versions in docs --- README.md | 10 +++-- README_ja.md | 10 +++-- docs/content.en/docs/changelog/_index.md | 19 ++++++++++ docs/content.en/docs/features/toml_spec.md | 2 +- docs/content.en/docs/installation/_index.md | 41 +++++++++++++++++++++ docs/content.en/docs/reference/spec.md | 2 +- docs/content.ja/docs/changelog/_index.md | 19 ++++++++++ docs/content.ja/docs/features/toml_spec.md | 2 +- docs/content.ja/docs/installation/_index.md | 41 +++++++++++++++++++++ docs/content.ja/docs/reference/spec.md | 2 +- 10 files changed, 136 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index bed22e6..9eee9d2 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ include(FetchContent) FetchContent_Declare( toml11 GIT_REPOSITORY https://github.com/ToruNiina/toml11.git - GIT_TAG v4.3.0 + GIT_TAG v4.4.0 ) FetchContent_MakeAvailable(toml11) @@ -141,15 +141,17 @@ After [adding cpm to your project](https://github.com/cpm-cmake/CPM.cmake?tab=re ```cmake include(cmake/CPM.cmake) -CPMAddPackage("gh:ToruNiina/toml11@4.3.0") +CPMAddPackage("gh:ToruNiina/toml11@4.4.0") # OR CPMAddPackage( NAME toml11 GITHUB_REPOSITORY "ToruNiina/toml11" - VERSION 4.3.0 - OPTIONS "TOML11_PRECOMPILE ON" # to pre-compile + 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) diff --git a/README_ja.md b/README_ja.md index b5a2397..cc21629 100644 --- a/README_ja.md +++ b/README_ja.md @@ -127,7 +127,7 @@ include(FetchContent) FetchContent_Declare( toml11 GIT_REPOSITORY https://github.com/ToruNiina/toml11.git - GIT_TAG v4.3.0 + GIT_TAG v4.4.0 ) FetchContent_MakeAvailable(toml11) @@ -142,15 +142,17 @@ target_link_libraries(main PRIVATE toml11::toml11) ```cmake include(cmake/CPM.cmake) -CPMAddPackage("gh:ToruNiina/toml11@4.3.0") +CPMAddPackage("gh:ToruNiina/toml11@4.4.0") # OR CPMAddPackage( NAME toml11 GITHUB_REPOSITORY "ToruNiina/toml11" - VERSION 4.3.0 - OPTIONS "TOML11_PRECOMPILE ON" # to pre-compile + 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) diff --git a/docs/content.en/docs/changelog/_index.md b/docs/content.en/docs/changelog/_index.md index a807da5..215d5cc 100644 --- a/docs/content.en/docs/changelog/_index.md +++ b/docs/content.en/docs/changelog/_index.md @@ -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` instead of `is_same` (#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 diff --git a/docs/content.en/docs/features/toml_spec.md b/docs/content.en/docs/features/toml_spec.md index a8d8171..913cda1 100644 --- a/docs/content.en/docs/features/toml_spec.md +++ b/docs/content.en/docs/features/toml_spec.md @@ -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. {{}} diff --git a/docs/content.en/docs/installation/_index.md b/docs/content.en/docs/installation/_index.md index d20be76..8284ccd 100644 --- a/docs/content.en/docs/installation/_index.md +++ b/docs/content.en/docs/installation/_index.md @@ -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. diff --git a/docs/content.en/docs/reference/spec.md b/docs/content.en/docs/reference/spec.md index 5d90c48..e7fe318 100644 --- a/docs/content.en/docs/reference/spec.md +++ b/docs/content.en/docs/reference/spec.md @@ -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)` diff --git a/docs/content.ja/docs/changelog/_index.md b/docs/content.ja/docs/changelog/_index.md index 79e5f27..e46f639 100644 --- a/docs/content.ja/docs/changelog/_index.md +++ b/docs/content.ja/docs/changelog/_index.md @@ -6,6 +6,25 @@ weight = 4 # Change Log +# v4.4.0 + +## Added + +- `toml::find_or_default()` を追加 (by Ken Matsui @ken-matsui) +- `ordered_map`から値を削除できるよう変更 (by Sunlight @SunPodder) +- 値がアクセス済みかを調べる`bool basic_value::accessed() const`を追加 + - `TOML11_ENABLE_ACCESS_CHECK`が定義されているときのみ有効 +- `toml::spec`に比較演算子を追加 + +## Fixed + +- `is_same`ではなく`is_void`を使用するように修正 (by Ken Matsui @ken-matsui) + +## Changed + +- `toml::parse`のパフォーマンスを約2倍向上 +- GitHub ActionsでUbuntu 20のイメージの使用を終了 + # v4.3.0 ## Added diff --git a/docs/content.ja/docs/features/toml_spec.md b/docs/content.ja/docs/features/toml_spec.md index 1835187..0dd9a7d 100644 --- a/docs/content.ja/docs/features/toml_spec.md +++ b/docs/content.ja/docs/features/toml_spec.md @@ -42,7 +42,7 @@ int main() デフォルトの値はtoml11のバージョンによって変わりますが、その時点でリリースされているTOML言語の最新バージョンに追従します。 -v4.0.0現在、TOML v1.1.0はまだリリースされていないため、デフォルトのTOMLバージョンはv1.0.0です。 +v4.4.0現在、TOML v1.1.0はまだリリースされていないため、デフォルトのTOMLバージョンはv1.0.0です。 {{}} diff --git a/docs/content.ja/docs/installation/_index.md b/docs/content.ja/docs/installation/_index.md index 1b326cc..75e9820 100644 --- a/docs/content.ja/docs/installation/_index.md +++ b/docs/content.ja/docs/installation/_index.md @@ -27,6 +27,47 @@ target_link_libraries(main PUBLIC toml11::toml11) `toml11`は自身がルートプロジェクトのときのみ、テストとインストールを行います。 +### CMake `FetchContent` + +CMakeの `FetchContent`を使用することで、`build`ディレクトリに自動でダウンロードすることができます。 + +```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) + +[CMake package manager](https://github.com/cpm-cmake/CPM.cmake)を導入すると、以下のようにして使用することができます。 + +```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) +``` + ## `cmake`を使用してインストールする `toml11`をクローンしたのち、`cmake`を使ってインストールすることができます。 diff --git a/docs/content.ja/docs/reference/spec.md b/docs/content.ja/docs/reference/spec.md index 6802e1b..94b3eb1 100644 --- a/docs/content.ja/docs/reference/spec.md +++ b/docs/content.ja/docs/reference/spec.md @@ -131,7 +131,7 @@ constexpr static spec default_version() noexcept; `toml::parse`、`toml::format`でのデフォルト値として使われます。 -toml11 v4.0.0での値は、v1.0.0です。 +toml11 v4.4.0での値は、v1.0.0です。 ### `v(major, minor, patch)`