Commit Graph

203 Commits

Author SHA1 Message Date
Mark Gillard
7da912c45e fixed incorrect clang+GCC flag in meson build script
also:
- renamed `_impl.h` files to `*.inl`
- simplified warning + namespace management boilerplate
- applied clang-format to examples
- bumped minimum required meson version to `0.54.0`
2021-10-26 00:53:57 +03:00
Mark Gillard
337aa82017 Merge branch 'master' into v3 2021-10-25 22:24:25 +03:00
Mark Gillard
47216c8a73 fix meson build script breaking with meson 0.60.0 (fixes #121) 2021-10-25 22:15:23 +03:00
Mark Gillard
516b8e2096 greatly simplified project header structure
also:
- removed `TOML_LARGE_FILES`
- removed unnecessary template machinery (esp. where ostreams were involved)
- made all overloaded operators 'hidden friends'
- documentation fixes
- version bump - this will form the foundation of v3
2021-10-25 01:04:23 +03:00
Mark Gillard
0f589ceba8 added header bookend includes 2021-10-24 13:21:32 +03:00
Mark Gillard
ca76e5d571 project-wide refactoring
- moved implementation-only headers to `/impl`
- replaced `[[nodiscard]]` with `TOML_NODISCARD`
- added `.clang-format` + applied to all files

also:
- added support for Unicode 14.0
- fixed minor documentation issues
- version bump (pre-emptive for next release)
2021-10-23 18:20:49 +03:00
Andrea Pappacoda
fe28ec8d24
build(meson): use override_dependency if supported (#116)
This improves user experience when using tomlplusplus as a Meson
subproject.

With this change users will be able to simply call
dependency('tomlplusplus') and have Meson automatically resolve the
dependency from the subproject if it is not found on the system.

Without this, users always have to explicitly call
dependency('tomlplusplus', fallback:['tomlplusplus','tomlplusplus_dep'])

A lot of saved keystrokes :)
2021-09-22 19:53:27 +03:00
Andrea Pappacoda
73870cef54
build(meson): general improvements and fixes (#115)
Use the / operator instead of join_paths

Use the / operator instead of using "/" in string paths

Use the includedir opt instead of hardcoding "include" in install_subdir

Remove discouraged layout=flat option (mesonbuild/meson#9243)

Remove unneeded Wextra, Wpedantic flags, already added by warning_level

Remove manual -Oz flag when using Clang (mesonbuild/meson#9286)

Make use of : in kwargs consistent
2021-09-22 09:47:15 +03:00
Andrea Pappacoda
6bfdc14b23
build(meson): do not install if used as subproj (#114) 2021-09-21 16:57:05 +03:00
Mark Gillard
9aa7cd8218 updated conformance tests (see #113)
also removed the 'modern C++' meme text from various places
2021-09-07 20:02:00 +03:00
Mark Gillard
f3896b7474 fixed an illegal table redefinition edge case (closes #112)
also:
- fixed incorrect source position in redefinition error messages
- updated conformance tests
2021-09-04 14:52:28 +03:00
Mark Gillard
037bfdd21f release v2.5.0 2021-08-11 18:42:00 +03:00
Mark Gillard
4f21332bdd allow lowercase 't' and 'z' in datetimes (per spec)
also:
- updated conformance tests
2021-07-04 13:58:33 +03:00
Mark Gillard
ba754462b8 fixed linkage error with windows compat mode
also:
- updated conformance tests
2021-06-24 21:08:45 +03:00
Mark Gillard
bc6891e1fb fixed TOML_CONSTEVAL still being broken in MSVC :( 2021-06-03 11:05:20 +03:00
Mark Gillard
1c3957ca20 add cpp.hint to cmake install
also:
- documentation updates
2021-05-30 18:43:18 +03:00
Ryan
42fa6555a9
Add natvis file to cmake install rules (#106)
* install natvis file

* add contribution to readme
2021-05-24 09:53:34 +03:00
Mark Gillard
ced65d0a4b documentation updates 2021-05-23 19:02:27 +03:00
friendlyanon
d962c6ccc1
Restore CMake package config used by Meson (#105)
Co-authored-by: friendlyanon <friendlyanon@users.noreply.github.com>
2021-05-21 16:09:28 +03:00
Mark Gillard
b85b074e65 minor documentation fix 2021-05-21 14:49:29 +03:00
Mark Gillard
6135deb6a3 added additional metafunctions
also:
- reduced bloat by removing unnecessary std::forwards and std::moves
- minor cleanup of example code
2021-05-21 14:28:45 +03:00
Evgeny Proydakov
7bf8c03f7a
Added CMake FetchContent + tar archive downloading (#103) 2021-05-21 11:14:05 +03:00
friendlyanon
a9262c672f
Modernize the CMake build files (#102)
List of things that this commit brings:
* Makes the project `FetchContent` ready
  This is achieved by conditionally executing code that is only useful
  for a consumer of the project, such as examples.
* Componentize the install rules
  Because this is a header-only library, its install rules should be
  categorized in a dev component (think foo-dev packages in apt). By
  assigning all install rules to a component, the project no longer
  clobbers the global component when vendored (see the previous point).
* Provide an interface similar to the install interface when vendored
  This is achieved by adding SYSTEM to the include directories
  conditionally and only providing targets that are actually needed.
* Make the project architecture independant
  This is achieved by setting the ARCH_INDEPENDENT argument when
  generating the version config file, which is available since CMake
  3.14. This feature is intended to be used for header-only libraries.
* Misc changes for trivial packaging
  The install rules are written in a way that allows package maintainers
  to trivially package the project.

Co-authored-by: friendlyanon <friendlyanon@users.noreply.github.com>
2021-05-20 22:03:35 +03:00
Mark Gillard
9c59810084 minor config fixes [skip ci] 2021-05-19 23:22:43 +03:00
Mark Gillard
1baad21734 removed <fstream> requirement for parse_file
also:
- fixed false-positive char_8 support detection on older compilers
- removed extraneous `TOML_API` declarations
2021-05-19 14:36:25 +03:00
Evgeny Proydakov
ac923d81bb
Added CMake FetchContent information 2021-05-19 13:24:25 +03:00
Mark Gillard
a29ecda102 fix crash with pathologically-nested inputs (closes #100)
also:
- fixed parse_result natvis
- added parse_result default constructor
- added nested value limit example to error printer
2021-05-18 01:39:01 +03:00
Mark Gillard
c4e00f9a56 fix conflict with Windows.h (closes #99) 2021-05-14 15:47:35 +03:00
Mark Gillard
dca69453f6 building warning-clean on VS 16.10.0 pre3
also:
- made tests build with /Wall on MSVC
- fixed minor documentation error
2021-05-12 00:48:53 +03:00
BeastLe9enD
1ab8d3d022
Bypass including Windows.h (MultiByteToWideChar/WideCharToMultiByte) (#98) 2021-05-10 18:13:54 +03:00
Mark Gillard
369b36d288 documentation fixes, redux 2021-05-09 19:27:08 +03:00
Mark Gillard
479a550ba7 documentation fixes 2021-05-06 15:56:36 +03:00
Mark Gillard
0fcbfbe655 fixed segfault JSON-formatting a failed parse_result (closes #96)
also:
- fixed config error in example `.vcxproj` files
- fixed spurious newline after JSON formatting a table
- fixed VS intellisense not detecting TOML_COMPILER_EXCEPTIONS correctly
- moved `parse_result` to a separate header
- made more internal macros require semicolons
- removed some old deprecations
- minor documentation fixes
2021-05-06 14:28:29 +03:00
Mark Gillard
2cee913b6d fix spurious warnings with MSVC /Wall (fixes #94) 2021-04-23 00:51:25 +03:00
Mark Gillard
14682c1ece fixed TOML_CONSTEVAL breaking on VS 16.10.0pre2 (closes #93)
https://developercommunity.visualstudio.com/t/Erroneous-C7595-error-with-consteval-in/1404234
2021-04-21 15:36:25 +03:00
Mark Gillard
7a4993029e CI updates 2021-04-20 23:44:35 +03:00
Mark Gillard
f73fa187ef add missing badge images [skip ci] 2021-04-19 00:01:50 +03:00
Mark Gillard
53f29d9365 restructuring and minor refactoring
There's no new functionality here. It's purely tooling + CI stuff:
- moved `python` => `tools`
- moved documentation images to subfolder
- moved `vs/tests` to tests/vs projects
- moved `vs` solution etc to root
- added semicolons to macros
- added cpp.hint to help VS intellisense
- migrated documentation generation to external lib
2021-04-18 22:58:41 +03:00
Claus Klein
dcfab29e70
add cmake files to build and install header only library (#85)
* add cmake build and install support

export cmake config package too

* enable bootstap build without cmake config package

cleanup cmake list file
2021-02-02 18:45:59 +02:00
Mark Gillard
b11f28af78 fixed dotted kvps being unable to add subtables (fixes #61)
also:
- fixed extremely weird linker error on linux ICC (fixes #83)
- added some missing GNU attributes
- added additional tests
2021-01-16 12:59:10 +02:00
Mark Gillard
5a9166bce8 Update TOML version for v1.0.0 release 🎉 2021-01-13 11:00:10 +02:00
Mark Gillard
3db1e4e331 minor refactoring to make ICC happy 2021-01-11 09:53:03 +02:00
Mark Gillard
18c269bfac fixed missing internal macro default 2021-01-10 11:08:30 +02:00
Mark Gillard
9be51e440a fixed missing blank lines between consecutive empty tables/A-o-T
also:
- added additional value() testsfor inf/nan
- added additional formatting tests
2021-01-07 12:06:26 +02:00
Mark Gillard
00e080f126 fix node::value() not retrieving inf and nan correctly 2021-01-05 17:34:18 +02:00
Mark Gillard
1ef6c0c6c8 update copyright year [skip ci] 2021-01-02 17:48:47 +02:00
Mark Gillard
4face4d5bf release 2.3.0 2020-12-29 11:22:22 +02:00
Mark Gillard
63ec393826 updated .editorconfig [skip ci] 2020-12-20 18:38:07 +02:00
Mark Gillard
bd1545a2f6 fixed compile failure on apple clang
also:
- updated conformance tests
- updated submodules
- updated windows test targets
2020-12-19 13:27:22 +02:00
Björn Schäpers
05f8b1f1cc
Make iterators real iterators (#77)
They were missing the iterator_category and thus could not be used with
some standard algorithms.
2020-12-18 18:08:15 +02:00