Index: test/std/re/re.alg/re.alg.match/basic.pass.cpp =================================================================== --- test/std/re/re.alg/re.alg.match/basic.pass.cpp +++ test/std/re/re.alg/re.alg.match/basic.pass.cpp @@ -1367,6 +1367,30 @@ 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; } Index: test/std/re/re.alg/re.alg.search/basic.pass.cpp =================================================================== --- test/std/re/re.alg/re.alg.search/basic.pass.cpp +++ test/std/re/re.alg/re.alg.search/basic.pass.cpp @@ -1547,6 +1547,30 @@ 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; } Index: www/cxx1z_status.html =================================================================== --- www/cxx1z_status.html +++ 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