Commit Graph
121 Commits
Author SHA1 Message Date
Patrick Urbanke 63e7bf3d81 Allow tagged unions with explicit tags 2024-03-31 14:37:34 +02:00
Patrick Urbanke 32ac265293 Made sure we can serialize and deserialize empty structs 2024-03-31 12:33:54 +02:00
Patrick Urbanke 86f73123d2 Allow creation of box and ref through std::unique_ptr and std::shared_ptr respectively 2024-03-31 11:40:22 +02:00
Patrick Urbanke 4fa84ffd30 Bugfix and added test for shared_ptr 2024-03-31 11:14:58 +02:00
Patrick Urbanke 1f0dcf591e Added TOML support 2024-03-29 12:24:43 +01:00
stu 3cfee3f62d revert change of F&& to const F& 2024-03-21 12:11:06 +00:00
Patrick Urbanke 58d89e717c Optimizationg for the reader and writer; #68 2024-03-16 09:58:26 +01:00
Patrick Urbanke 58f1e41c83 Added support for monadic operations on the named tuples 2024-03-06 14:21:33 +01:00
Patrick Urbanke 54ffdbc9e9 Split up the enum tests 2024-03-03 10:33:22 +01:00
Patrick Urbanke 091ce65693 Split up test_view 2024-03-03 09:35:52 +01:00
Patrick Urbanke d1a9bc6b61 Added the JSON schema; #25 2024-03-03 07:09:28 +01:00
stu 0b2f5d2a13 clang-format 2024-03-01 19:25:46 +00:00
stu ec437c51f2 add documentation for new enumerator functionality 2024-03-01 19:19:48 +00:00
stu 617226cd1d rename to get_underlying_enumerators 2024-03-01 19:02:51 +00:00
stu cdca9ac73a add get_enumerators_underlying and get_enumerator_array_underlying 2024-03-01 18:59:47 +00:00
stu c76e7a6471 add rfl::get_enumerators() and rfl::get_enumerator_array() 2024-02-22 15:24:20 +00:00
stu a1fb54f4ac add rfl::enum_to_string and rfl::string_to_enum 2024-02-22 13:57:09 +00:00
Laz 68cdfa8dd4 feat: add support for parsing std::wstrings 2024-02-11 13:04:36 +00:00
stu 34c36d9b97 slight rework
clang on linux doesn't believe field.name() can be constexpr, so
fall back to Field::name() when constexpr is required.
2024-02-07 13:08:17 +00:00
stu fb0dd371b3 add rfl::NamedTuple::apply() for convenient compile-time iteration 2024-02-07 12:31:45 +00:00
Patrick Urbanke f2d977909c Added CBOR support; #53 2024-01-26 06:48:39 +01:00
Patrick Urbanke 5a34c9bea8 Added BSON support; #22 2024-01-19 16:09:26 +01:00
Patrick Urbanke 696289dbf2 Made sure that we can get field names from structs declared inside functions or unnamed namespaces; #46 2024-01-07 23:05:39 +01:00
Patrick Urbanke b63c246f92 Made sure that to_named_tuple (and, by extension, rfl::replace) works properly 2024-01-04 21:49:25 +01:00
Patrick Urbanke 11c80d4e89 Resolved merge conflicts 2024-01-03 15:49:14 +01:00
Patrick Urbanke 5c81e40f09 Redesigned the writer (#36) and added YAML support based on the new writer (#23) 2024-01-03 07:22:36 +01:00
hazby2002 12007f3eab Add tests for writing c arrays. 2024-01-02 13:49:02 +08:00
Patrick Urbanke 07942bb64d Added more tests and more includes 2023-12-28 21:00:57 +01:00
Patrick Urbanke 7de20db53e Added support for rfl::to_view; #32 2023-12-24 13:50:23 +01:00
Patrick Urbanke c5347eee28 Added XML support; #21 2023-12-20 21:07:36 +01:00
zerol f585a1a96a Merge remote-tracking branch 'origin/main' into ci
# Conflicts:
#	tests/json/CMakeLists.txt
2023-12-17 10:50:31 +08:00
zerol bd2cc44b8a make json support out-of-box 2023-12-16 19:27:30 +08:00
zerol 5798238c40 revert the rename 2023-12-16 19:03:56 +08:00
zerol e77a5a66da try to fix windows ci 2023-12-16 18:56:30 +08:00
Ed Catmur f429bd994a Serialization of std::reference_wrapper
Only for serialization - similarly to pointers, this should not be used for deserialization.

As discussed https://github.com/getml/reflect-cpp/pull/20#issuecomment-1857491501 this requires changing the implementation of bind_to_tuple, since std::ref() collapses on a std::reference_wrapper.
2023-12-16 05:31:13 +00:00
zerol 359a21d905 ci 2023-12-16 00:31:02 +08:00
Patrick Urbanke a547abd8c1 Added support for flag enums; handle unidentified enums 2023-12-14 19:38:52 +01:00
Patrick Urbanke e416283e41 Added support for enums; #3 2023-12-09 13:27:57 +01:00
Patrick Urbanke 2c761efdcd Included the meta field retrieval 2023-12-08 00:13:14 +01:00
Patrick Urbanke 5e0de0246c Added support for compile-time field name retrieval 2023-12-06 22:52:00 +01:00
Patrick Urbanke 2e3872c651 Fixed -fsanitize=undefined issue; #16, possibly #15 2023-12-04 20:16:09 +01:00
Patrick Urbanke 395118de92 Rewrote the tests for flexbuffers 2023-12-03 20:03:00 +01:00
Patrick Urbanke 1382a2a505 Compile the JSON tests separately 2023-12-03 16:52:24 +01:00
Patrick Urbanke 1b7c95942b Added compiler instructions for MSVC 2023-12-03 14:31:06 +01:00
Patrick Urbanke f0945fdd27 Got rid of ugly warning 2023-11-29 20:42:51 +01:00
Patrick Urbanke 7038adb4f5 Updated the test for the tagged union 2023-11-29 19:55:10 +01:00
Patrick Urbanke 12528fe28b Updated the flexbuffers tests 2023-11-29 19:54:58 +01:00
Patrick Urbanke 44af021371 Use a proper stack trace inside the tests 2023-11-28 20:07:24 +01:00
Patrick Urbanke 456fc33613 Added support for tagged unions without explicitly tagging the structs 2023-11-28 19:09:14 +01:00
Patrick Urbanke abe7bd3546 Made sure that automatic field retrieval works in the context of tagged unions 2023-11-27 20:04:30 +01:00