#pragma once #include "adminive/value.hpp" #include #include #include #include #include namespace adminive { template concept String_Type = std::same_as, std::string>; template concept String_View_Type = std::same_as, std::string_view>; template struct Is_Optional : std::false_type {}; template struct Is_Optional> : std::true_type { using value_type = T; }; template concept Optional_Type = Is_Optional>::value; template using Optional_Value_Type = typename Is_Optional>::value_type; template struct Optional_Unwrapped { using type = std::remove_cvref_t; }; template struct Optional_Unwrapped> { using type = T; }; template using Optional_Unwrapped_Type = typename Optional_Unwrapped>::type; template concept Container_Like_Type = requires(T value) { typename std::remove_cvref_t::value_type; value.begin(); value.end(); } && !String_Type && !String_View_Type && !Optional_Type; template concept Json_Scalar_Type = std::same_as, bool> || std::integral> || std::floating_point> || String_Type> || String_View_Type> || std::is_enum_v>; template concept Multiple_Of_Validator = requires { { Validator::multiple_of }; }; template concept Validator_With_Message = requires { { Validator::message } -> std::convertible_to; }; template inline constexpr bool Always_False = false; }