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:
@@ -0,0 +1,27 @@
|
||||
#ifndef RFL_HASDEFAULTVALV_HPP_
|
||||
#define RFL_HASDEFAULTVALV_HPP_
|
||||
#include <type_traits>
|
||||
|
||||
#include "../NamedTuple.hpp"
|
||||
#include "../named_tuple_t.hpp"
|
||||
#include "is_default_val_v.hpp"
|
||||
|
||||
namespace rfl::internal {
|
||||
|
||||
template <class T>
|
||||
struct HasDefaultVal;
|
||||
|
||||
template <class... Fields>
|
||||
struct HasDefaultVal<NamedTuple<Fields...>> {
|
||||
static constexpr bool value =
|
||||
(false || ... ||
|
||||
is_default_val_v<
|
||||
std::remove_cvref_t<std::remove_pointer_t<typename Fields::Type>>>);
|
||||
};
|
||||
|
||||
template <class T>
|
||||
constexpr bool has_default_val_v = HasDefaultVal<named_tuple_t<T>>::value;
|
||||
|
||||
} // namespace rfl::internal
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user