From ea995887962f1b4857feb4c0b9b5d12424ca3ff2 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 25 May 2019 15:05:58 +0200 Subject: Work around new is_unsigned_v VC 16.1 implementation in regex --- build2/test/script/regex.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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::_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 + struct _Sign_base<_Ty, false> + { + static constexpr bool _Signed = false; + static constexpr bool _Unsigned = true; + }; +#else template <> struct is_unsigned { static const bool value = true; }; +#endif // When used with libc++ the linker complains that it can't find // __match_any_but_newline::__exec() function. The problem is -- cgit v1.1