diff --git a/tests/noexcept.cpp b/tests/noexcept.cpp index edfa88f..967f39e 100644 --- a/tests/noexcept.cpp +++ b/tests/noexcept.cpp @@ -22,7 +22,7 @@ TEST_CASE("Noexcept", "[noexcept]") { SECTION("swap") { //TODO see why this fails -#if !defined(_MSC_VER) || _MSC_VER > 1900 +#if !defined(_MSC_VER) || _MSC_VER >= 1900 REQUIRE(noexcept(swap(o1, o2)) == noexcept(o1.swap(o2))); struct nothrow_swappable { @@ -48,7 +48,7 @@ TEST_CASE("Noexcept", "[noexcept]") { SECTION("constructors") { //TODO see why this fails -#if !defined(_MSC_VER) || _MSC_VER > 1900 +#if !defined(_MSC_VER) || _MSC_VER >= 1900 REQUIRE(noexcept(tl::optional{})); REQUIRE(noexcept(tl::optional{tl::nullopt})); diff --git a/tl/optional.hpp b/tl/optional.hpp index c63d820..a8b2590 100644 --- a/tl/optional.hpp +++ b/tl/optional.hpp @@ -278,8 +278,8 @@ using enable_assign_from_other = detail::enable_if_t< !std::is_assignable &>::value && !std::is_assignable &&>::value>; -#ifdef _MSC_VER -// TODO make a version which works with MSVC +#if defined(_MSC_VER) && _MSC_VER < 1900 +// TODO make a version which works with MSVC 2015 template struct is_swappable : std::true_type {}; template struct is_nothrow_swappable : std::true_type {};