diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-12-10 07:07:15 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-12-10 08:22:12 +0900 |
commit | 8f39d870759de362d5ac911d6554347fb3b46759 (patch) | |
tree | 29618e6a5ade61073b9a8e876909d4523d160567 | |
parent | 9a1453bbd56fb7912c73845fc8580ce79e694286 (diff) | |
download | libquotient-8f39d870759de362d5ac911d6554347fb3b46759.tar.gz libquotient-8f39d870759de362d5ac911d6554347fb3b46759.zip |
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.
-rw-r--r-- | lib/util.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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<Fo1>, "Test is_callable<> with function object 1"); static_assert(std::is_same<fn_arg_t<Fo1>, 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<decltype(l)>, "Test is_callable_v<> with lambda"); static_assert(std::is_same<fn_return_t<decltype(l)>, int>::value, "Test fn_return_t<> with lambda"); +#endif template <typename T> struct fn_object |