File tree Expand file tree Collapse file tree 4 files changed +32
-0
lines changed
Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -499,6 +499,16 @@ template <size_t Capacity> class point_set {
499499 points[0 ].high = (std::numeric_limits<int64_t >::max)();
500500 used = 1 ;
501501 }
502+ template <auto Property> constexpr void populate (ctre::binary_property<Property>) {
503+ points[0 ].low = (std::numeric_limits<int64_t >::min)();
504+ points[0 ].high = (std::numeric_limits<int64_t >::max)();
505+ used = 1 ;
506+ }
507+ template <auto Property, auto Value> constexpr void populate (ctre::property<Property, Value>) {
508+ points[0 ].low = (std::numeric_limits<int64_t >::min)();
509+ points[0 ].high = (std::numeric_limits<int64_t >::max)();
510+ used = 1 ;
511+ }
502512 template <typename ... Content> constexpr void populate (ctre::negative_set<Content...> nset) {
503513 negative_helper (nset, [&](int64_t low, int64_t high){
504514 this ->insert (low, high);
Original file line number Diff line number Diff line change @@ -3946,6 +3946,16 @@ template <size_t Capacity> class point_set {
39463946 points[0].high = (std::numeric_limits<int64_t>::max)();
39473947 used = 1;
39483948 }
3949+ template <auto Property> constexpr void populate(ctre::binary_property<Property>) {
3950+ points[0].low = (std::numeric_limits<int64_t>::min)();
3951+ points[0].high = (std::numeric_limits<int64_t>::max)();
3952+ used = 1;
3953+ }
3954+ template <auto Property, auto Value> constexpr void populate(ctre::property<Property, Value>) {
3955+ points[0].low = (std::numeric_limits<int64_t>::min)();
3956+ points[0].high = (std::numeric_limits<int64_t>::max)();
3957+ used = 1;
3958+ }
39493959 template <typename... Content> constexpr void populate(ctre::negative_set<Content...> nset) {
39503960 negative_helper(nset, [&](int64_t low, int64_t high){
39513961 this->insert(low, high);
Original file line number Diff line number Diff line change @@ -3943,6 +3943,16 @@ template <size_t Capacity> class point_set {
39433943 points[0 ].high = (std::numeric_limits<int64_t >::max)();
39443944 used = 1 ;
39453945 }
3946+ template <auto Property> constexpr void populate (ctre::binary_property<Property>) {
3947+ points[0 ].low = (std::numeric_limits<int64_t >::min)();
3948+ points[0 ].high = (std::numeric_limits<int64_t >::max)();
3949+ used = 1 ;
3950+ }
3951+ template <auto Property, auto Value> constexpr void populate (ctre::property<Property, Value>) {
3952+ points[0 ].low = (std::numeric_limits<int64_t >::min)();
3953+ points[0 ].high = (std::numeric_limits<int64_t >::max)();
3954+ used = 1 ;
3955+ }
39463956 template <typename ... Content> constexpr void populate (ctre::negative_set<Content...> nset) {
39473957 negative_helper (nset, [&](int64_t low, int64_t high){
39483958 this ->insert (low, high);
Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ static_assert(CTRE_CREATE(U"\\u20AC").match(U"€"));
5959// UTS #18 Level 1: RL1.2: Properties
6060// TODO only \p and \P is not supported
6161static_assert (CTRE_SYNTAX(U" \\ p{L}" ));
62+ static_assert (CTRE_CREATE(U" [\\ p{L}]" ).match(" A" ));
63+ static_assert (CTRE_CREATE(U" [\\ p{L}]+" ).match(" ABC" ));
6264static_assert (CTRE_SYNTAX(U" \\ p{Letter}" ));
6365static_assert (CTRE_CREATE(U" \\ P{Letter}" ).match(U" 1" ));
6466static_assert (CTRE_CREATE(U" \\ P{latin}" ).match(U" Є" ));
You can’t perform that action at this time.
0 commit comments