Skip to content

Commit 7441e6c

Browse files
committed
Re-run regression tests
There seems to be a problem for MSVC here with "cpp2regex.h2(591): error C2668: 'std::make_reverse_iterator': ambiguous call to overloaded function". Here's 591: r := func(make_reverse_iterator(cur), make_reverse_match_context(ctx), true_end_func()); It seems the similar line 577 should also get this error, but doesn't because maybe that one is never invoked? Conjecture: Maybe - lines 577 and 591 make*iterator calls should be std:: qualified, and - the make*iterator helpers on lines 184-189 should just be removed as they don't seem to be used? But I'm not sure so I'll just push this update to regression tests in without any code changes
1 parent a89690b commit 7441e6c

8 files changed

+9260
-23
lines changed

regression-tests/test-results/clang-12-c++20/pure2-expected-is-as.cpp.output

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -77,59 +77,59 @@ pure2-expected-is-as.cpp2:34:24: error: use of undeclared identifier 'ex1'; did
7777
__MATHCALL_VEC (exp,, (_Mdouble_ __x));
7878
^
7979
In file included from pure2-expected-is-as.cpp:7:
80-
../../../include/cpp2util.h:469:72: error: invalid application of 'sizeof' to a function type
80+
../../../include/cpp2util.h:475:72: error: invalid application of 'sizeof' to a function type
8181
(std::is_floating_point_v<From> && std::is_floating_point_v<To> && sizeof(From) > sizeof(To)) || // NOLINT(misc-redundant-expression)
8282
^~~~~~~~~~~~
83-
../../../include/cpp2util.h:2924:19: note: in instantiation of variable template specialization 'cpp2::impl::is_narrowing_v' requested here
83+
../../../include/cpp2util.h:2929:19: note: in instantiation of variable template specialization 'cpp2::impl::is_narrowing_v' requested here
8484
if constexpr (is_narrowing_v<C, CPP2_TYPEOF(x)>) {
8585
^
8686
pure2-expected-is-as.cpp2:39:28: note: in instantiation of function template specialization 'cpp2::impl::as_<int, double (&)(double) noexcept>' requested here
8787
auto val1 {cpp2::impl::as_<int>(ex1)};
8888
^
8989
In file included from pure2-expected-is-as.cpp:7:
90-
../../../include/cpp2util.h:2944:12: error: no matching function for call to 'as'
90+
../../../include/cpp2util.h:2949:12: error: no matching function for call to 'as'
9191
return as<C>(CPP2_FORWARD(x));
9292
^~~~~
9393
pure2-expected-is-as.cpp2:39:28: note: in instantiation of function template specialization 'cpp2::impl::as_<int, double (&)(double) noexcept>' requested here
9494
auto val1 {cpp2::impl::as_<int>(ex1)};
9595
^
96-
../../../include/cpp2util.h:1902:16: note: candidate template ignored: constraints not satisfied [with C = int, x:auto = double (&)(double) noexcept]
96+
../../../include/cpp2util.h:1907:16: note: candidate template ignored: constraints not satisfied [with C = int, x:auto = double (&)(double) noexcept]
9797
constexpr auto as(auto&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto)
9898
^
99-
../../../include/cpp2util.h:1908:18: note: because 'std::is_scalar_v<std::remove_cvref_t<decltype(x)> >' evaluated to false
99+
../../../include/cpp2util.h:1913:18: note: because 'std::is_scalar_v<std::remove_cvref_t<decltype(x)> >' evaluated to false
100100
(std::is_scalar_v<CPP2_TYPEOF(x)> && !std::is_enum_v<CPP2_TYPEOF(x)>)
101101
^
102-
../../../include/cpp2util.h:1909:17: note: and 'std::is_floating_point_v<std::remove_cvref_t<decltype(x)> >' evaluated to false
102+
../../../include/cpp2util.h:1914:17: note: and 'std::is_floating_point_v<std::remove_cvref_t<decltype(x)> >' evaluated to false
103103
|| std::is_floating_point_v<CPP2_TYPEOF(x)>
104104
^
105-
../../../include/cpp2util.h:1910:17: note: and 'std::is_base_of_v<int, std::remove_cvref_t<decltype(x)> >' evaluated to false
105+
../../../include/cpp2util.h:1915:17: note: and 'std::is_base_of_v<int, std::remove_cvref_t<decltype(x)> >' evaluated to false
106106
|| std::is_base_of_v<C, CPP2_TYPEOF(x)>
107107
^
108-
../../../include/cpp2util.h:1911:17: note: and 'std::is_base_of_v<std::remove_cvref_t<decltype(x)>, int>' evaluated to false
108+
../../../include/cpp2util.h:1916:17: note: and 'std::is_base_of_v<std::remove_cvref_t<decltype(x)>, int>' evaluated to false
109109
|| std::is_base_of_v<CPP2_TYPEOF(x), C>
110110
^
111-
../../../include/cpp2util.h:1912:30: note: and 'C({std::forward<decltype(x)>(x)})' would be invalid: cannot initialize a value of type 'int' with an lvalue of type 'double (double) noexcept'
111+
../../../include/cpp2util.h:1917:30: note: and 'C({std::forward<decltype(x)>(x)})' would be invalid: cannot initialize a value of type 'int' with an lvalue of type 'double (double) noexcept'
112112
|| requires { C{CPP2_FORWARD(x)}; }
113113
^
114-
../../../include/cpp2util.h:327:37: note: expanded from macro 'CPP2_FORWARD'
114+
../../../include/cpp2util.h:333:37: note: expanded from macro 'CPP2_FORWARD'
115115
#define CPP2_FORWARD(x) std::forward<decltype(x)>(x)
116116
^
117-
../../../include/cpp2util.h:2041:6: note: candidate template ignored: constraints not satisfied [with C = int, X = double (&)(double) noexcept]
117+
../../../include/cpp2util.h:2046:6: note: candidate template ignored: constraints not satisfied [with C = int, X = double (&)(double) noexcept]
118118
auto as(X&& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT_AS) -> decltype(auto)
119119
^
120-
../../../include/cpp2util.h:2040:23: note: because 'specialization_of_template<double (&)(double) noexcept, std::variant>' evaluated to false
120+
../../../include/cpp2util.h:2045:23: note: because 'specialization_of_template<double (&)(double) noexcept, std::variant>' evaluated to false
121121
template< typename C, specialization_of_template<std::variant> X >
122122
^
123-
../../../include/cpp2util.h:892:7: note: because 'specialization_of_template_helper<C>(std::forward<X>(x))' would be invalid: no matching function for call to 'specialization_of_template_helper'
123+
../../../include/cpp2util.h:897:7: note: because 'specialization_of_template_helper<C>(std::forward<X>(x))' would be invalid: no matching function for call to 'specialization_of_template_helper'
124124
{ specialization_of_template_helper<C>(std::forward<X>(x)) } -> std::same_as<std::true_type>;
125125
^
126-
../../../include/cpp2util.h:2088:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept]
126+
../../../include/cpp2util.h:2093:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept]
127127
constexpr auto as( X && x ) -> decltype(auto) {
128128
^
129-
../../../include/cpp2util.h:2087:22: note: because 'same_type_as<double (&)(double) noexcept, std::any>' evaluated to false
129+
../../../include/cpp2util.h:2092:22: note: because 'same_type_as<double (&)(double) noexcept, std::any>' evaluated to false
130130
template<typename T, same_type_as<std::any> X>
131131
^
132-
../../../include/cpp2util.h:922:29: note: because 'std::same_as<std::remove_cvref_t<double (&)(double) noexcept>, std::remove_cvref_t<any> >' evaluated to false
132+
../../../include/cpp2util.h:927:29: note: because 'std::same_as<std::remove_cvref_t<double (&)(double) noexcept>, std::remove_cvref_t<any> >' evaluated to false
133133
concept same_type_as = std::same_as<std::remove_cvref_t<X>, std::remove_cvref_t<C>>;
134134
^
135135
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/concepts:63:19: note: because '__detail::__same_as<double (double) noexcept, std::any>' evaluated to false
@@ -138,19 +138,19 @@ concept same_type_as = std::same_as<std::remove_cvref_t<X>, std::remove_cvref_t<
138138
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/concepts:57:27: note: because 'std::is_same_v<double (double) noexcept, std::any>' evaluated to false
139139
concept __same_as = std::is_same_v<_Tp, _Up>;
140140
^
141-
../../../include/cpp2util.h:2131:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept]
141+
../../../include/cpp2util.h:2136:16: note: candidate template ignored: constraints not satisfied [with T = int, X = double (&)(double) noexcept]
142142
constexpr auto as( X&& x ) -> decltype(auto) {
143143
^
144-
../../../include/cpp2util.h:2130:22: note: because 'specialization_of_template<double (&)(double) noexcept, std::optional>' evaluated to false
144+
../../../include/cpp2util.h:2135:22: note: because 'specialization_of_template<double (&)(double) noexcept, std::optional>' evaluated to false
145145
template<typename T, specialization_of_template<std::optional> X>
146146
^
147-
../../../include/cpp2util.h:892:7: note: because 'specialization_of_template_helper<C>(std::forward<X>(x))' would be invalid: no matching function for call to 'specialization_of_template_helper'
147+
../../../include/cpp2util.h:897:7: note: because 'specialization_of_template_helper<C>(std::forward<X>(x))' would be invalid: no matching function for call to 'specialization_of_template_helper'
148148
{ specialization_of_template_helper<C>(std::forward<X>(x)) } -> std::same_as<std::true_type>;
149149
^
150-
../../../include/cpp2util.h:1877:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided
150+
../../../include/cpp2util.h:1882:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided
151151
constexpr auto as() -> auto
152152
^
153-
../../../include/cpp2util.h:1888:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided
153+
../../../include/cpp2util.h:1893:16: note: candidate function template not viable: requires 0 arguments, but 1 was provided
154154
constexpr auto as() -> auto
155155
^
156156
pure2-expected-is-as.cpp2:39:37: error: use of undeclared identifier 'ex1'
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
Running tests_20_lookbehind:
2+
01_y: OK regex: (?<=a)b parsed_regex: (?<=a)b str: ab result_expr: $& expected_results b
3+
02_y: OK regex: (?<=af?)b parsed_regex: (?<=af?)b str: ab result_expr: $& expected_results b
4+
03_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: cb result_expr: - expected_results -
5+
04_n: OK regex: (?<=a(?:fo)?)b parsed_regex: (?<=a(?:fo)?)b str: cb result_expr: - expected_results -
6+
05_n: OK regex: (?<=a)b parsed_regex: (?<=a)b str: b result_expr: - expected_results -
7+
06_n: OK regex: (?<=a(?:foo)?)b parsed_regex: (?<=a(?:foo)?)b str: b result_expr: - expected_results -
8+
07_y: OK regex: (?<!c)b parsed_regex: (?<!c)b str: ab result_expr: $& expected_results b
9+
08_y: OK regex: (?<!c(?:foob)?)b parsed_regex: (?<!c(?:foob)?)b str: ab result_expr: $& expected_results b
10+
09_n: OK regex: (?<!c)b parsed_regex: (?<!c)b str: cb result_expr: - expected_results -
11+
10_n: OK regex: (?<!c(?:fooba)?)b parsed_regex: (?<!c(?:fooba)?)b str: cb result_expr: - expected_results -
12+
11_y: OK regex: (?<!c)b parsed_regex: (?<!c)b str: b result_expr: - expected_results -
13+
12_y: OK regex: (?<!c(?:foobar)?)b parsed_regex: (?<!c(?:foobar)?)b str: b result_expr: - expected_results -
14+
13_y: OK regex: (?<!c)b parsed_regex: (?<!c)b str: b result_expr: $& expected_results b
15+
14_y: OK regex: (?<!c(?:foobarb)?)b parsed_regex: (?<!c(?:foobarb)?)b str: b result_expr: $& expected_results b
16+
15_n: OK regex: (?<![cd])b parsed_regex: (?<![cd])b str: dbcb result_expr: - expected_results -
17+
16_n: OK regex: (?<![cd]e{0,254})b parsed_regex: (?<![cd]e{0,254})b str: dbcb result_expr: - expected_results -
18+
17_y: OK regex: (?<![cd])[ab] parsed_regex: (?<![cd])[ab] str: dbaacb result_expr: $& expected_results a
19+
18_y: OK regex: (?<![cd]{1,2})[ab] parsed_regex: (?<![cd]{1,2})[ab] str: dbaacb result_expr: $& expected_results a
20+
19_y: OK regex: (?<![cd]{1,3})[ab] parsed_regex: (?<![cd]{1,3})[ab] str: dbaacb result_expr: $& expected_results a
21+
20_n: OK regex: (?<!(c|d))b parsed_regex: (?<!(c|d))b str: dbcb result_expr: - expected_results -
22+
21_y: OK regex: (?<!(c|d))[ab] parsed_regex: (?<!(c|d))[ab] str: dbaacb result_expr: $& expected_results a
23+
22_y: OK regex: (?<!cd)[ab] parsed_regex: (?<!cd)[ab] str: cdaccb result_expr: $& expected_results b
24+
23_y: OK regex: $(?<=^(a)) parsed_regex: $(?<=^(a)) str: a result_expr: $1 expected_results a
25+
24_y: OK regex: (.*)c parsed_regex: (.*)c str: abcd result_expr: $1 expected_results ab
26+
25_y: OK regex: (.*)(?<=b) parsed_regex: (.*)(?<=b) str: abcd result_expr: $1 expected_results ab
27+
26_y: OK regex: (.*)(?<=b)c parsed_regex: (.*)(?<=b)c str: abcd result_expr: $1 expected_results ab
28+
27_y: OK regex: (.*)(?<=b|c) parsed_regex: (.*)(?<=b|c) str: abcd result_expr: $1 expected_results abc
29+
28_y: OK regex: (.*)(?<=b|c)c parsed_regex: (.*)(?<=b|c)c str: abcd result_expr: $1 expected_results ab
30+
29_y: OK regex: (.*)(?<=c|b) parsed_regex: (.*)(?<=c|b) str: abcd result_expr: $1 expected_results abc
31+
30_y: OK regex: (.*)(?<=c|b)c parsed_regex: (.*)(?<=c|b)c str: abcd result_expr: $1 expected_results ab
32+
31_y: OK regex: (.*)(?<=[bc]) parsed_regex: (.*)(?<=[bc]) str: abcd result_expr: $1 expected_results abc
33+
32_y: OK regex: (.*)(?<=[bc])c parsed_regex: (.*)(?<=[bc])c str: abcd result_expr: $1 expected_results ab
34+
33_y: OK regex: (.*?)c parsed_regex: (.*?)c str: abcd result_expr: $1 expected_results ab
35+
34_y: OK regex: (.*?)(?<=b) parsed_regex: (.*?)(?<=b) str: abcd result_expr: $1 expected_results ab
36+
35_y: OK regex: (.*?)(?<=b)c parsed_regex: (.*?)(?<=b)c str: abcd result_expr: $1 expected_results ab
37+
36_y: OK regex: (.*?)(?<=b|c) parsed_regex: (.*?)(?<=b|c) str: abcd result_expr: $1 expected_results ab
38+
37_y: OK regex: (.*?)(?<=b|c)c parsed_regex: (.*?)(?<=b|c)c str: abcd result_expr: $1 expected_results ab
39+
38_y: OK regex: (.*?)(?<=c|b) parsed_regex: (.*?)(?<=c|b) str: abcd result_expr: $1 expected_results ab
40+
39_y: OK regex: (.*?)(?<=c|b)c parsed_regex: (.*?)(?<=c|b)c str: abcd result_expr: $1 expected_results ab
41+
40_y: OK regex: (.*?)(?<=[bc]) parsed_regex: (.*?)(?<=[bc]) str: abcd result_expr: $1 expected_results ab
42+
41_y: OK regex: (.*?)(?<=[bc])c parsed_regex: (.*?)(?<=[bc])c str: abcd result_expr: $1 expected_results ab
43+
42_y: OK regex: (?<=foo) parsed_regex: (?<=foo) str: foo result_expr: @+ expected_results 3
44+
43_y: OK regex: (?<=foo) parsed_regex: (?<=foo) str: XfooY result_expr: @+ expected_results 4
45+
44_y: OK regex: .*(?<=foo) parsed_regex: .*(?<=foo) str: foo result_expr: @+ expected_results 3
46+
45_y: OK regex: .*(?<=foo) parsed_regex: .*(?<=foo) str: XfooY result_expr: @+ expected_results 4
47+
46_y: OK regex: (?<=foo)Y parsed_regex: (?<=foo)Y str: XfooY result_expr: @+ expected_results 5
48+
47_y: OK regex: o(?<=foo)Y parsed_regex: o(?<=foo)Y str: ..XfooY.. result_expr: @+ expected_results 7
49+
48_y: OK regex: X(?<=foo.)[YZ] parsed_regex: X(?<=foo.)[YZ] str: ..XfooXY.. result_expr: @+ expected_results 8
50+
49_y: OK regex: (?<=bar>)foo parsed_regex: (?<=bar>)foo str: bar>foo result_expr: $& expected_results foo
51+
50_n: OK regex: (?<!bar>)foo parsed_regex: (?<!bar>)foo str: bar>foo result_expr: - expected_results -
52+
51_y: OK regex: (?<=bar>ABC)foo parsed_regex: (?<=bar>ABC)foo str: bar>ABCfoo result_expr: $& expected_results foo
53+
52_n: OK regex: (?<!bar>ABC)foo parsed_regex: (?<!bar>ABC)foo str: bar>ABCfoo result_expr: - expected_results -
54+
53_y: OK regex: (?<=abcd(?<=(aaaabcd))) parsed_regex: (?<=abcd(?<=(aaaabcd))) str: ..aaaabcd.. result_expr: $1 expected_results aaaabcd
55+
54_y: OK regex: (?=xy(?<=(aaxy))) parsed_regex: (?=xy(?<=(aaxy))) str: ..aaxy.. result_expr: $1 expected_results aaxy
56+
55_y: OK regex: (?=xy(?<=(aaxyz?))) parsed_regex: (?=xy(?<=(aaxyz?))) str: ..aaxy.. result_expr: $1 expected_results aaxy
57+
56_y: OK regex: (?<=(?=(aaxy))aa) parsed_regex: (?<=(?=(aaxy))aa) str: ..aaxy.. result_expr: $1 expected_results aaxy
58+

regression-tests/test-results/gcc-10-c++20/pure2-expected-is-as.cpp.output

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pure2-expected-is-as.cpp2:85:34: error: parse error in template argument list
3333
pure2-expected-is-as.cpp2:85:159: error: parse error in template argument list
3434
In file included from pure2-expected-is-as.cpp:7:
3535
pure2-expected-is-as.cpp2:85:309: error: parse error in template argument list
36-
../../../include/cpp2util.h:317:66: note: in definition of macro ‘CPP2_TYPEOF’
37-
317 | #define CPP2_TYPEOF(x) std::remove_cvref_t<decltype(x)>
36+
../../../include/cpp2util.h:323:66: note: in definition of macro ‘CPP2_TYPEOF’
37+
323 | #define CPP2_TYPEOF(x) std::remove_cvref_t<decltype(x)>
3838
| ^
3939
pure2-expected-is-as.cpp2:85:430: error: parse error in template argument list

0 commit comments

Comments
 (0)