On Thu, Feb 5, 2026 at 11:35 AM Jonathan Wakely <[email protected]> wrote:
> These tests can be run as C++11, so should use a string literal with the
> static assertions.
>
> libstdc++-v3/ChangeLog:
>
> * testsuite/28_regex/algorithms/regex_match/multiline.cc: Add
> string to static_assert.
> * testsuite/28_regex/sub_match/lwg3204.cc: Likewise.
> ---
>
> Tested x86_64-linux.
>
LGTM. I think this change could be commited without review.
>
> .../testsuite/28_regex/algorithms/regex_match/multiline.cc | 4 ++--
> libstdc++-v3/testsuite/28_regex/sub_match/lwg3204.cc | 6 ++++--
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git
> a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/multiline.cc
> b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/multiline.cc
> index f4b3cf03a225..090fd0955cc8 100644
> --- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/multiline.cc
> +++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/multiline.cc
> @@ -3,8 +3,8 @@
> #include <testsuite_hooks.h>
>
> #if __cplusplus >= 201703L || !defined __STRICT_ANSI__
> -static_assert( std::regex_constants::multiline == std::regex::multiline );
> -static_assert( std::regex_constants::__multiline == std::regex::multiline
> );
> +static_assert( std::regex_constants::multiline == std::regex::multiline,
> "" );
> +static_assert( std::regex_constants::__multiline ==
> std::regex::multiline, "" );
> #else
> namespace test { constexpr int multiline = 0; }
> namespace check {
> diff --git a/libstdc++-v3/testsuite/28_regex/sub_match/lwg3204.cc
> b/libstdc++-v3/testsuite/28_regex/sub_match/lwg3204.cc
> index 58ef0df58a14..d95aed367876 100644
> --- a/libstdc++-v3/testsuite/28_regex/sub_match/lwg3204.cc
> +++ b/libstdc++-v3/testsuite/28_regex/sub_match/lwg3204.cc
> @@ -33,6 +33,8 @@ struct iter
> };
>
> using CS = std::csub_match;
> -static_assert( noexcept(std::declval<CS&>().swap(std::declval<CS&>())) );
> +static_assert( noexcept(std::declval<CS&>().swap(std::declval<CS&>())),
> + "std::csub_match::swap is nothrow" );
> using IS = std::sub_match<iter>;
> -static_assert( ! noexcept(std::declval<IS&>().swap(std::declval<IS&>()))
> );
> +static_assert( ! noexcept(std::declval<IS&>().swap(std::declval<IS&>())),
> + "std::sub_match<I>::swap is potentially throwing" );
> --
> 2.52.0
>
>