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 @@