Skip to content

Releases: ToruNiina/toml11

version 3.0.0

14 Jul 07:49
Compare
Choose a tag to compare

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.

version 2.4.0

20 Jun 03:59
Compare
Choose a tag to compare

Fixed

  • Fix sign-compare warning (@khoitd1997 )
  • Allow to install toml11 by CMake (@KerstinKeller )
  • Fix definition of _toml operator
  • Compare table values correctly

Changed

  • Throw toml::type_error from as_xxx
  • Add as_xxx(std::nothrow) noexcept overload
  • Show hints when it encounters a syntax error

Deprecated

  • Deprecate (is|as)_float. Use (is|as)_floating instead.
    • To make it consistent with snake_case typenames

version 2.3.1

31 May 11:19
Compare
Choose a tag to compare
  • Fix MSVC 2019 Warnings (@chronoxor )
  • consider rvalue-reference in as_* member function
  • increase the performance of the parser a bit

version 2.3.0

28 Apr 08:08
Compare
Choose a tag to compare
  • add toml::value::as_* functions for convenience
  • enable to get comments related to a value
  • support std::string_view if C++17 is enabled

BREAKING

  • remove deprecated toml::get_or(toml::value, toml::key, T default)
    • use toml::find_or(value, key, defalt) instead
    • toml::get_or<T>(value, default) is still available

version 2.2.3

26 Apr 06:48
Compare
Choose a tag to compare
  • fix error message format for ""_toml literals

version 2.2.2

19 Apr 05:15
Compare
Choose a tag to compare
  • fix operator ""_toml literal
    • resolve ambiguity in "[1]"_toml;
  • suppress warnings on MSVC (@wbenny )
  • improve runtime efficiency
    • remove needless error message generations
    • guess type of value before matching it
  • improve error messages
    • show "missing curly brace" for multiline inline table
    • fix typo in error message from parse_offset_datetime

version 2.2.1

15 Apr 06:21
26eced3
Compare
Choose a tag to compare
  • optimization of the parser (~60x faster for 50k lines of files)
  • suppress warnings

version 2.2.0

21 Mar 10:18
Compare
Choose a tag to compare
  • support conversion into/from arbitrary types
  • add ""_toml literal
  • add find_or
  • fix toml::format for table not to make top-level table inline
  • fix format of duplicate sign in timezone
  • fix add missing const specifier to a overload of get
  • fix overload resolution and type deduction of get_or
  • consider invalid utf-8 sequences as a syntax error
  • remove deprecated to_toml
  • mark get_or(table, key, fallback) deprecated because find_or is more clear
    • get_or(value, fallback) is not deprecated

version 2.1.3

16 Mar 04:18
Compare
Choose a tag to compare
  • fix a bug in the serializer
    • remove a null character at the end of floating-point number

version 2.1.2

15 Mar 08:23
9eb4008
Compare
Choose a tag to compare
  • fix the serialization of floating point number to make it locale-free
  • run test codes with more compilers on Travis CI
  • mark to_toml as deprecated
    • because now constructors of toml::value support the feature
    • It will be removed in v2.2.0.