diff --git a/test/std/re/re.alg/re.alg.match/basic.pass.cpp b/test/std/re/re.alg/re.alg.match/basic.pass.cpp index b2fa6e941..fd5e7e640 100644 --- a/test/std/re/re.alg/re.alg.match/basic.pass.cpp +++ b/test/std/re/re.alg/re.alg.match/basic.pass.cpp @@ -1367,6 +1367,30 @@ int main(int, char**) assert(m.position(0) == 0); assert(m.str(0) == s); } + { // LWG 2273 + std::regex re("Foo|FooBar"); + std::cmatch m; + { + assert(std::regex_match("FooBar", m, re)); + assert(m.size() == 1); + assert(m[0] == "FooBar"); + } + { + assert(std::regex_match("Foo", m, re)); + assert(m.size() == 1); + assert(m[0] == "Foo"); + } + { + assert(!std::regex_match("FooBarBaz", m, re)); + assert(m.size() == 0); + assert(m.empty()); + } + { + assert(!std::regex_match("FooBa", m, re)); + assert(m.size() == 0); + assert(m.empty()); + } + } return 0; } diff --git a/test/std/re/re.alg/re.alg.search/basic.pass.cpp b/test/std/re/re.alg/re.alg.search/basic.pass.cpp index bd96c9830..cb11f3bdf 100644 --- a/test/std/re/re.alg/re.alg.search/basic.pass.cpp +++ b/test/std/re/re.alg/re.alg.search/basic.pass.cpp @@ -1547,6 +1547,30 @@ int main(int, char**) assert(m.position(0) == 0); assert(m.str(0) == s); } + { // LWG 2273 + std::regex re("Foo|FooBar"); + std::cmatch m; + { + assert(std::regex_search("FooBar", m, re)); + assert(m.size() == 1); + assert(m[0] == "Foo"); + } + { + assert(std::regex_search("Foo", m, re)); + assert(m.size() == 1); + assert(m[0] == "Foo"); + } + { + assert(std::regex_search("FooBarBaz", m, re)); + assert(m.size() == 1); + assert(m[0] == "Foo"); + } + { + assert(std::regex_search("FooBa", m, re)); + assert(m.size() == 1); + assert(m[0] == "Foo"); + } + } return 0; } diff --git a/www/cxx1z_status.html b/www/cxx1z_status.html index 5427d4880..100d15927 100644 --- a/www/cxx1z_status.html +++ b/www/cxx1z_status.html @@ -257,7 +257,7 @@ 2244Issue on basic_istream::seekgKonaComplete 2250Follow-up On Library Issue 2207KonaComplete 2259Issues in 17.6.5.5 rules for member functionsKonaComplete - 2273regex_match ambiguityKona + 2273regex_match ambiguityKonaComplete 2336is_trivially_constructible/is_trivially_assignable traits are always falseKonaComplete 2353std::next is over-constrainedKonaComplete 2367pair and tuple are not correctly implemented for is_constructible with no argsKonaComplete @@ -503,7 +503,7 @@ -

Last Updated: 26-Feb-2018

+

Last Updated: 3-Jul-2019