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
This commit is contained in:
2025-12-06 10:55:46 -05:00
parent 2b5abeae58
commit ec13264050
365 changed files with 63946 additions and 357 deletions

View File

@@ -0,0 +1,32 @@
#pragma once
#include "enchantum.hpp"
#include <concepts>
#include <iosfwd>
#include <string>
namespace enchantum::istream_operators {
template<typename Traits, Enum E>
requires std::assignable_from<E&, E>
std::basic_istream<char, Traits>& operator>>(std::basic_istream<char, Traits>& is, E& value)
{
std::basic_string<char, Traits> s;
is >> s;
if (!is)
return is;
if constexpr (is_bitflag<E>) {
if (const auto v = enchantum::cast_bitflag<E>(s))
value = *v;
else
is.setstate(std::ios_base::failbit);
}
else {
if (const auto v = enchantum::cast<E>(s))
value = *v;
else
is.setstate(std::ios_base::failbit);
}
return is;
}
} // namespace enchantum::istream_operators