aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/test/script/regex.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/build2/test/script/regex.hxx b/build2/test/script/regex.hxx
index e7969dc..ec02b18 100644
--- a/build2/test/script/regex.hxx
+++ b/build2/test/script/regex.hxx
@@ -615,11 +615,23 @@ namespace std
// msvcrt assumes regex_traits<line_char>::_Uelem to be present (see above)
// and statically asserts it is unsigned.
//
+ // And starting from VC 16.1, is_unsigned_v is not implemented in terms of
+ // is_unsigned so we have to get deeper into the implementation details.
+ //
+#if defined(_MSC_VER) && _MSC_VER >= 1921
+ template <class _Ty>
+ struct _Sign_base<_Ty, false>
+ {
+ static constexpr bool _Signed = false;
+ static constexpr bool _Unsigned = true;
+ };
+#else
template <>
struct is_unsigned<build2::test::script::regex::line_char>
{
static const bool value = true;
};
+#endif
// When used with libc++ the linker complains that it can't find
// __match_any_but_newline<line_char>::__exec() function. The problem is