From 8f39d870759de362d5ac911d6554347fb3b46759 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 10 Dec 2018 07:07:15 +0900 Subject: Suppress a function_traits<> test with lambdas on MSVC2015 Assigning a lambda to a static variable causes it to fail with 'auto must always deduce to the same type' error. --- lib/util.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/util.cpp') diff --git a/lib/util.cpp b/lib/util.cpp index 5e7644a1..e22a1df5 100644 --- a/lib/util.cpp +++ b/lib/util.cpp @@ -112,10 +112,12 @@ static_assert(is_callable_v, "Test is_callable<> with function object 1"); static_assert(std::is_same, int>(), "Test fn_arg_t defaulting to first argument"); +#if (!defined(_MSC_VER) || _MSC_VER >= 1910) static auto l = [] { return 1; }; static_assert(is_callable_v, "Test is_callable_v<> with lambda"); static_assert(std::is_same, int>::value, "Test fn_return_t<> with lambda"); +#endif template struct fn_object -- cgit v1.2.3