Skip to content

Commit 1908d3c

Browse files
author
Hana Dusíková
committed
fix #238 (again)
1 parent f2dfb52 commit 1908d3c

File tree

4 files changed

+5
-33
lines changed

4 files changed

+5
-33
lines changed

include/ctre/first.hpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -494,17 +494,7 @@ template <size_t Capacity> class point_set {
494494
template <auto A, auto B> constexpr void populate(ctre::char_range<A,B>) {
495495
insert(A,B);
496496
}
497-
constexpr void populate(can_be_anything) {
498-
points[0].low = (std::numeric_limits<int64_t>::min)();
499-
points[0].high = (std::numeric_limits<int64_t>::max)();
500-
used = 1;
501-
}
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>) {
497+
constexpr void populate(...) {
508498
points[0].low = (std::numeric_limits<int64_t>::min)();
509499
points[0].high = (std::numeric_limits<int64_t>::max)();
510500
used = 1;

single-header/ctre-unicode.hpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3941,17 +3941,7 @@ template <size_t Capacity> class point_set {
39413941
template <auto A, auto B> constexpr void populate(ctre::char_range<A,B>) {
39423942
insert(A,B);
39433943
}
3944-
constexpr void populate(can_be_anything) {
3945-
points[0].low = (std::numeric_limits<int64_t>::min)();
3946-
points[0].high = (std::numeric_limits<int64_t>::max)();
3947-
used = 1;
3948-
}
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>) {
3944+
constexpr void populate(...) {
39553945
points[0].low = (std::numeric_limits<int64_t>::min)();
39563946
points[0].high = (std::numeric_limits<int64_t>::max)();
39573947
used = 1;

single-header/ctre.hpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3938,17 +3938,7 @@ template <size_t Capacity> class point_set {
39383938
template <auto A, auto B> constexpr void populate(ctre::char_range<A,B>) {
39393939
insert(A,B);
39403940
}
3941-
constexpr void populate(can_be_anything) {
3942-
points[0].low = (std::numeric_limits<int64_t>::min)();
3943-
points[0].high = (std::numeric_limits<int64_t>::max)();
3944-
used = 1;
3945-
}
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>) {
3941+
constexpr void populate(...) {
39523942
points[0].low = (std::numeric_limits<int64_t>::min)();
39533943
points[0].high = (std::numeric_limits<int64_t>::max)();
39543944
used = 1;

tests/_unicode.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ static_assert(CTRE_CREATE(U"\\u20AC").match(U"€"));
6161
static_assert(CTRE_SYNTAX(U"\\p{L}"));
6262
static_assert(CTRE_CREATE(U"[\\p{L}]").match("A"));
6363
static_assert(CTRE_CREATE(U"[\\p{L}]+").match("ABC"));
64+
static_assert(CTRE_CREATE(U"[\\P{L}]").match("1"));
65+
static_assert(CTRE_CREATE(U"[\\P{L}]+").match("123"));
6466
static_assert(CTRE_SYNTAX(U"\\p{Letter}"));
6567
static_assert(CTRE_CREATE(U"\\P{Letter}").match(U"1"));
6668
static_assert(CTRE_CREATE(U"\\P{latin}").match(U"Є"));

0 commit comments

Comments
 (0)