github ToruNiina/toml11 v3.0.0
version 3.0.0

latest releases: v3.8.1, v3.8.0, v3.7.1...
4 years ago

A major update including a number of breaking changes.

TL;DR

  • toml::value becomes customizable
  • unify typenames into snake_case

Overview

To support comments in a better way and to enable to change containers used inside of toml::value, toml::basic_value<Comment, Map, Array> has been introduced. Due to this, the return value of toml::parse has also been changed from toml::table to toml::value that contains a table and a comment (if any). Since toml::value and toml::parse are the most important functionalities, an alias to the default configuration has also been introduced to reduce the work to upgrade codes.

Since now toml::parse returns toml::value and the map class underlying toml::table can be configurable, some overloads for toml::table that makes overload resolution difficult has been dropped.

Type names that appear in enum class value_t, toml::value::(is|as)_xxx and toml::typename are unified into snake_case because that were confusing.

Breaking Changes

See README for details.

  • toml::parse now returns a toml::value, not toml::table.
  • toml::value is now an alias of toml::basic_value<discard_comment, std::vector, std::unordered_map>.
  • The elements of toml::value_t are renamed as snake_case.
  • Supports for the CamelCaseNames are dropped.
  • (is|as)_float has been removed to make the function names consistent with others.
  • An overload of toml::find for toml::table has been dropped. Use toml::value version instead.
  • An overload of operator<< and toml::format for toml::tables are dropped.
  • Interface around comments.
  • An ancient from_toml/into_toml has been removed. Use arbitrary type conversion support.

Don't miss a new toml11 release

NewReleases is sending notifications on new releases.