Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct validate_set
- {
- std::string_view key;
- span<std::string_view> allowed_values;
- };
- constexpr std::array allowedValues{
- validate_set{ "foo"sv, { "bar"sv, "baz"sv } },
- validate_set{ "hello"sv, { "world"sv } }
- };
- constexpr std::array allowedValues{
- validate_set{ "foo"sv, "bar baz"sv },
- validate_set{ "hello"sv, "world"sv }
- };
- constexpr std::initializer_list list0 = { "bar"sv, "baz"sv };
- constexpr std::initializer_list list1 = { "world"sv };
- constexpr std::array allowedValues{
- validate_set{ "foo"sv, list0 },
- validate_set{ "hello"sv, list1 }
- };
Add Comment
Please, Sign In to add comment