From db24260dbe4d93638d50d8316e0fbf57e03395b4 Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Wed, 11 Oct 2017 19:18:08 +0100 Subject: [PATCH] Lol MSVC --- optional.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/optional.hpp b/optional.hpp index 493eb2e..3e6041d 100644 --- a/optional.hpp +++ b/optional.hpp @@ -232,6 +232,14 @@ struct is_adl_swap_noexcept : std::integral_constant(0))> {}; } +#ifdef _MSC_VER + // TODO make a version which works with MSVC + template + sturct is_swappable : std::true_type{}; + + template + struct is_nothrow_swappable : std::true_type{}; +#else template struct is_swappable : std::integral_constant< @@ -261,6 +269,8 @@ struct is_nothrow_swappable detail::swap_adl_tests::is_adl_swap_noexcept::value))> { }; +#endif + } // [optional.nullopt], no-value state indicator