#pragma once #include "schema.hpp" namespace saw { template struct schema_factory { using Schema = T; static_assert(always_false, "Not supported"); }; template struct schema_factory...>> { using Schema = schema::Struct...>; template constexpr schema_factory...,schema::Member>> add() const noexcept { return {}; } }; template struct schema_factory...>> { using Schema = schema::Union...>; template constexpr schema_factory...,schema::Member>> add() const noexcept { return {}; } }; template struct schema_factory> { using Schema = schema::Tuple; template constexpr schema_factory> add() const noexcept { return {}; } }; /** * This creates the base schema. For example an empty struct,tuple,union or anything else. */ template constexpr schema_factory build_schema() noexcept { return {}; } }