Commit faf8f098 authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

Only enable C++17 usings under MSVC if C++17 mode is enabled

Summary: Because not everyone is at C++17 yet.

Reviewed By: yfeldblum

Differential Revision: D7751672

fbshipit-source-id: bcca4d4da67d56be0217a940144977f1cc98e5a1
parent 24eaeed1
......@@ -410,7 +410,8 @@ constexpr auto kCpplibVer = 0;
#define FOLLY_HAS_COROUTINES 1
#endif
// MSVC 2017.5
#if __cpp_noexcept_function_type >= 201510 || _MSC_FULL_VER >= 191225816
// MSVC 2017.5 && C++17
#if __cpp_noexcept_function_type >= 201510 || \
(_MSC_FULL_VER >= 191225816 && _MSVC_LANG > 201402)
#define FOLLY_HAVE_NOEXCEPT_FUNCTION_TYPE 1
#endif
......@@ -152,7 +152,7 @@ auto uncurry(F&& f)
std::forward<F>(f));
}
#if __cpp_lib_make_from_tuple || _MSC_VER >= 1910
#if __cpp_lib_make_from_tuple || (_MSC_VER >= 1910 && _MSVC_LANG > 201402)
/* using override */ using std::make_from_tuple;
......
......@@ -61,8 +61,9 @@ constexpr auto invoke(M(C::*d), Args&&... args)
#endif
// Only available in >= MSVC 2017 15.3
#if __cpp_lib_is_invocable >= 201703 || _MSC_VER >= 1911
// Only available in >= MSVC 2017 15.3 in C++17
#if __cpp_lib_is_invocable >= 201703 || \
(_MSC_VER >= 1911 && _MSVC_LANG > 201402)
namespace folly {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment