Made sure we can serialize and deserialize empty structs

This commit is contained in:
Patrick Urbanke
2024-03-31 12:33:54 +02:00
parent 6f01c3fccb
commit 32ac265293
9 changed files with 112 additions and 49 deletions
+23
View File
@@ -0,0 +1,23 @@
#include "test_empty_object.hpp"
#include <iostream>
#include <rfl.hpp>
#include <rfl/json.hpp>
#include <source_location>
#include <string>
#include <vector>
#include "write_and_read.hpp"
namespace test_empty_object {
struct Empty {};
void test() {
std::cout << std::source_location::current().function_name() << std::endl;
const auto empty = Empty{};
write_and_read(empty, R"({})");
}
} // namespace test_empty_object