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.
This commit is contained in:
Ed Catmur
2023-12-16 05:31:13 +00:00
parent 8dbaf140b6
commit f429bd994a
6 changed files with 521 additions and 1352 deletions
+2
View File
@@ -48,6 +48,7 @@
#include "test_save_load.hpp"
#include "test_set.hpp"
#include "test_size.hpp"
#include "test_std_ref.hpp"
#include "test_string_map.hpp"
#include "test_string_unordered_map.hpp"
#include "test_tagged_union.hpp"
@@ -93,6 +94,7 @@ int main() {
test_unordered_multimap::test();
test_multiset::test();
test_unordered_multiset::test();
test_std_ref::test();
test_string_map::test();
test_string_unordered_map::test();
test_alphanumeric_map::test();