tomlplusplus/include/toml++
whiterabbit963 52736559d2
fix node::value_or() to act like node::value() (#50)
auto table = toml::table{{{"value", 10}}};
const toml::node *value = table.get("value");
if(value && value->is_number())
{
    double number = value->value_or<double>(0);
    cout << number << endl;
}
The original output was 0. This change will output 10.0.
The old way would see that it was an integer (a native type),
then use the integer conversion, but since the type being requested
was a double, it would return the default value.
2020-07-30 20:41:28 +03:00
..
toml_array.h added insert, emplace, push_back etc. compatibility with node_views 2020-07-28 01:21:41 +03:00
toml_array.hpp added copy construction/assignment for arrays. tables and values 2020-07-27 13:38:01 +03:00
toml_common.h added insert, emplace, push_back etc. compatibility with node_views 2020-07-28 01:21:41 +03:00
toml_date_time.h improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_default_formatter.h improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_default_formatter.hpp improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_formatter.h improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_instantiations.hpp improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_json_formatter.h improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_json_formatter.hpp improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_node_view.h added insert, emplace, push_back etc. compatibility with node_views 2020-07-28 01:21:41 +03:00
toml_node.h added insert, emplace, push_back etc. compatibility with node_views 2020-07-28 01:21:41 +03:00
toml_node.hpp improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_parse_error.h improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_parser.h improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_parser.hpp fixed array::insert not working correctly in some cases 2020-07-26 15:03:33 +03:00
toml_preprocessor.h fixed array::insert not working correctly in some cases 2020-07-26 15:03:33 +03:00
toml_print_to_stream.h improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_table.h added insert, emplace, push_back etc. compatibility with node_views 2020-07-28 01:21:41 +03:00
toml_table.hpp added insert, emplace, push_back etc. compatibility with node_views 2020-07-28 01:21:41 +03:00
toml_utf8_generated.h improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_utf8_streams.h improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_utf8_streams.hpp improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_utf8.h improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml_value.h fix node::value_or() to act like node::value() (#50) 2020-07-30 20:41:28 +03:00
toml_version.h improved support for __fp16, _Float16 and __float128 2020-07-25 20:50:24 +03:00
toml.h fixed array::insert not working correctly in some cases 2020-07-26 15:03:33 +03:00