242 Commits

Author SHA1 Message Date
NmPassTHFan
49eb12d594
fix: std::is_trivial is deprecated in C++26, replace to 'is_trivially_default_constructible_v && is_trivially_copyable_v'. (#270)
Co-authored-by: nmpassthf <sunyulong@wondersoft.cn>
2025-05-07 10:59:19 +03:00
Toni500github
d1eed09ae7
Fix build msys2 (#264) 2025-03-14 16:25:10 +02:00
Dirk Eddelbuettel
ddd97fdf3f
Address clang++20 nag about 'whitespace in literal operator' (#263) 2025-03-12 06:47:45 +02:00
Niels Dekker
2ca7ac6c2c
let toml::get_line return an _optional_ string_view (#258) 2025-02-27 15:56:02 +02:00
Niels Dekker
8b86a2490c
declare toml::get_line(std::string_view, source_index) constexpr (#256) 2025-02-26 11:47:47 +02:00
Niels Dekker
f3f625819a
add get_line(doc, line_num) utility (#255) 2025-02-23 18:20:03 +02:00
Niels Dekker
cbc00d6766
add TOML_DISABLE_CONDITIONAL_NOEXCEPT_LAMBDA workaround MSVC error C2057 (#247)
Offered a workaround to compile errors like "error C2057: expected constant expression", when using the "legacy lambda processor" of Visual C++. Such compile errors were reported by Kevin Dick, Jan 19, 2024, at issue https://github.com/marzer/tomlplusplus/issues/219
2025-02-12 23:41:10 +02:00
Niels Dekker
1fdd67ce5a
let print_to_stream also print the end of a source region (#244) 2025-02-07 10:45:59 +02:00
tyler92
c4369ae1d8
fix stack overflow by limiting the maximum depth of dotted keys (#242) 2024-11-14 14:08:35 +02:00
Mark Gillard
e2bae9d559 fix #231, redux 2024-07-12 12:04:23 +03:00
Mark Gillard
495119a8a6 fixed unclear error message (closes #224) 2024-07-12 11:54:20 +03:00
Mark Gillard
7ddb98543c fix is_homogeneous with outparam (fixes #231) 2024-07-12 11:43:25 +03:00
Mark Gillard
1f7884e591 workaround for weird symbol issue on nvc++ 2024-03-19 14:07:25 +09:00
Mark Gillard
30172438ce v3.4.0 2023-10-13 16:39:42 +03:00
Mark Gillard
cc1962eac7 fixed keys with \n round-tripping incorrectly 2023-10-10 17:21:03 +03:00
Mark Gillard
be30d11245 fixed keys containing \t formatting incorrectly 2023-10-09 19:41:18 +03:00
Mark Gillard
941341fce6 improved support for using enums with value_or() 2023-09-25 18:50:34 +03:00
Mark Gillard
42a428f8ea fixed FLT_RADIX check getting broken by MKL
fixes #202
2023-09-11 15:20:17 +03:00
Mark Gillard
d46cac705a fixed #197
also:
- fixed `noexcept(...)` sometimes being incorrectly derived on `for_each()
- refactors
2023-09-05 13:53:23 +03:00
Mark Gillard
882d9d1c34 fixed gnu symbol visibility for static lib builds (fixes #201)
also:
- renamed header files to .hpp
- updated conformance tests
- minor documentation fixes
2023-08-26 17:41:29 +03:00
Mark Gillard
4a28c36c43 misc preprocessor handling fixes 2023-06-14 15:44:33 +03:00
Mark Gillard
e6d1958f92 fixed compiler error when using NVCC
fixes #198
2023-05-18 12:02:56 +03:00
Mark Gillard
ad55bae8a1 minor fixes/tweaks 2023-04-03 22:37:18 +03:00
Mark Gillard
82c3b90697 fixed #108 2023-04-03 21:32:40 +03:00
Mark Gillard
2414d904a8 fixed value_flags not preserved during insertion (#108)
also:
- fixed `toml::value::flags()` not being cleared when `std::move`-ing a value
- fixed #195
2023-04-03 19:34:39 +03:00
Jonathan Guzmán
7eb2ffcc09
do not use inline_recursion if using clang-cl (#192) 2023-02-07 10:16:29 +02:00
Mark Gillard
1ebdad3e71 Update toml.hpp 2023-01-29 17:53:36 +02:00
Mark Gillard
8f31ec8aed fixed #187
also:
- fixed #188
- fixed #189
- updated conformance tests
- version bump
2023-01-29 17:49:41 +02:00
Mark Gillard
d00464a7bc tentative fix for #189 2023-01-29 14:42:08 +02:00
Mark Gillard
2b770b19cc build system overhaul
Fixes #185
Fixes #186
2023-01-22 22:02:20 +02:00
Claude Heiland-Allen
698285d9b2
fix build with mingw g++ 10 (#183)
Fixes https://github.com/marzer/tomlplusplus/issues/182
2022-12-20 13:11:30 +02:00
Mark Gillard
0a90913abf added TOML_ENABLE_FLOAT16 config to fix #178 2022-11-15 21:38:28 +02:00
Mark Gillard
b081c3505d added toml::format_flags::terse_key_value_pairs 2022-11-09 22:33:44 +02:00
Mark Gillard
cc741c9f5f fixed toml::parse_file() on windows for non-ASCII paths
see: https://github.com/PrismLauncher/PrismLauncher/issues/226
2022-11-05 16:21:48 +02:00
Mark Gillard
1e4a3833d0 "But who warns the warnings?" 2022-10-18 14:04:50 +03:00
Mark Gillard
c8780a5b8e fixed some _Float16 detection issues
also:
- fixed a few minor issues with tests
- removed `__fp16` support (it was always broken)
2022-10-17 20:08:26 +03:00
Mark Gillard
698ee0ecd1 fixes for latest MSVC
also:
- minor doc tweaks
2022-10-14 13:18:24 +03:00
Alexey Ismagilov
fb8ce80350
Fix typo in at_path (#173)
* ENH: tests: replacing tabs with '\t'.

* NEW: tests: adding tests for `path`

Added the test that detects an error in the code.
Code fixing in the following commit.

* FIX: at_path: typo in `parse_path`

Fixing bug in the code. Also fixing `path - parsing` tests.

* NEW: readme: update list of contributors
2022-09-19 09:22:48 +09:30
Björn Schäpers
c6deadf61d
Suppress -Wduplicated-branches (#171)
Solves:
tomlplusplus/include/toml++/impl/path.h:29:73: warning: this condition has identical branches [-Wduplicated-branches]
   29 |                                 (alignof(size_t) < alignof(std::string) ? alignof(std::string) : alignof(size_t));
2022-09-12 14:25:42 +05:30
Mark Gillard
7876c96aae fixed parser null deref when exceptions are disabled
closes #169
2022-08-31 14:49:23 +03:00
Mark Gillard
4b166b69f2 v3.2.0 2022-08-30 00:04:04 +03:00
Kevin Saul
be0fbd5203
Update at_path(toml::path) to handle missing component (#168)
* test(paths): check at_path handles missing path component

* fix(paths): update at_path to handle missing component
2022-08-25 08:13:22 +03:00
Mark Gillard
59ad6e6dfe removing use of std::aligned_storage
That shit is deprecated in C++23, yo.
2022-08-11 16:13:25 +03:00
Mark Gillard
67c18a3251 fixed spurious Wnull-dereference warning on GCC
closes #164
2022-08-08 23:41:32 +03:00
Mark Gillard
b6fa7e1891 arm fixes
- disambiguated `print_to_stream()` for ints (fixes #167)
- relaxed mantissa and digits10 requirements of extended floats
2022-08-03 00:16:04 +03:00
Mark Gillard
501a80e231 preprocessor + CI cleanup
also:
- minor refactors in path
- updated conformance tests
2022-07-31 18:34:53 +03:00
Tristan Jones
4047eb28b1
feat(paths): Removed use of std::variant in path_component_value (#161) 2022-06-25 12:19:40 +03:00
Tristan Jones
fa8b6d472e
added operator= for path_components to keep component type and value synchronized (#159)
* feat(path): added operator= for path_components to keep component type and value synchronized

* fix(path): added missing TOML_EXPORTED_MEMBER_FUNCTION directives

* refactor(path): changed constructors to preserve type - value correlation in path_component

* fix(path): added TOML_EXPORTED_CLASS for path_component

* fix(path): corrected placement of TOML_EXPORTED_CLASS for path_component. urgh.

* fix(path): tidied up some constructors/accessors in path_component
2022-06-10 23:03:40 +03:00
Mark Gillard
0058d68bbc added node::operator[] for toml::path
also:
- added missing relational operators for `source_position`
- TOML_CHARCONV cleanup (was too keen)
- minor refactors
2022-06-06 23:46:04 +03:00
Mark Gillard
5baa568a6b unified internal path parsing using callbacks 2022-06-06 13:59:14 +03:00