Summary:
The current implementation didn't work for MSVC, as it tries to evaluate `noexcept` expressions in base class lists before the template is instantiated.
`std::is_nothrow_swappable` is coming in C++17, and MSVC already has it, so use it instead.
Reviewed By: yfeldblum
Differential Revision:
D3724399
fbshipit-source-id:
7927584618a7870824b2e7242fcae562647f4ef4
IsLessThanComparable;
namespace traits_detail_IsNothrowSwappable {
+#if defined(_MSC_VER) || defined(__cpp_lib_is_swappable)
+// MSVC already implements the C++17 P0185R1 proposal which
+// adds std::is_nothrow_swappable, so use it instead.
+template <typename T>
+using IsNothrowSwappable = std::is_nothrow_swappable<T>;
+#else
/* using override */ using std::swap;
template <class T>
std::is_nothrow_move_constructible<T>::value &&
noexcept(swap(std::declval<T&>(), std::declval<T&>()))
> {};
+#endif
}
/* using override */ using traits_detail_IsNothrowSwappable::IsNothrowSwappable;