Files
libconfig/examples/simple.cpp
Emily Boudreaux ec13264050 feat(reflect-cpp): Switched from glaze -> reflect cpp
A bug was discovered in glaze which prevented valid toml output. We have
switched to toml++ and reflect-cpp. The interface has remained the same
so this should not break any code
2025-12-06 10:55:46 -05:00

37 lines
692 B
C++

#include "rfl.hpp"
#include "rfl/toml.hpp"
#include <string>
#include <vector>
#include <print>
#include "fourdst/config/config.h"
struct Other {
std::array<int, 3> a{};
std::vector<std::string> b{};
double c;
};
struct Location {
double x;
double y;
Other other{};
};
struct Person {
std::string name{};
std::string address{};
double height{};
Location location{};
};
int main() {
const fourdst::config::Config<Person> personConfig;
personConfig.save("Example.toml");
fourdst::config::Config<Person> personConfigToLoad;
personConfigToLoad.load("Example.toml");
personConfigToLoad.save_schema("ExampleSchema.schema.json");
}