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.
Reviewed-by: Tomasz KamiĆski <tkaminsk@redhat.com>
#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 {
};
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" );