11 lines
434 B
C++
11 lines
434 B
C++
#include <structive/property/property.hpp>
|
|
#include <string>
|
|
struct Incompatible_Constraint {
|
|
int value{};
|
|
};
|
|
int main() {
|
|
auto only_string = structive::constraint<"string_only">([](const std::string&) { return true; });
|
|
auto schema = structive::object<Incompatible_Constraint>(structive::field<&Incompatible_Constraint::value>(structive::key<"value">, only_string));
|
|
return static_cast<int>(schema.property_count);
|
|
}
|