aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-05-25 15:05:58 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-05-25 15:05:58 +0200
commitea995887962f1b4857feb4c0b9b5d12424ca3ff2 (patch)
treeab8209ad4f758284089569c01fe6f26af2aac0c2
parentf4de56f7023f1cc90bb2f1ba55db596beffb1a4f (diff)
Work around new is_unsigned_v VC 16.1 implementation in regex
-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