From aab7e1c1217ca5e5eb4ac051d163358c3a062c64 Mon Sep 17 00:00:00 2001 From: Ivan Matek Date: Sun, 29 Aug 2021 23:02:22 +0200 Subject: [PATCH] fix spaceship support macro check, proper order of includes in test --- test/is_clamped_test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/is_clamped_test.cpp b/test/is_clamped_test.cpp index d5ea2b1..e2d5cba 100644 --- a/test/is_clamped_test.cpp +++ b/test/is_clamped_test.cpp @@ -3,11 +3,11 @@ // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#include #include +#include #include #include -#ifdef __cpp_impl_three_way_comparison +#ifdef __cpp_impl_three_way_comparison &&__has_include() #include #endif #include @@ -167,7 +167,7 @@ void test_constexpr() { } -#ifdef __cpp_impl_three_way_comparison +#ifdef __cpp_impl_three_way_comparison &&__has_include() struct custom_with_spaceship { int v; auto operator<=>(const custom_with_spaceship&) const = default; @@ -175,7 +175,7 @@ struct custom_with_spaceship { #endif void test_spaceship() { - #ifdef __cpp_impl_three_way_comparison + #ifdef __cpp_impl_three_way_comparison &&__has_include() // Inside the range, equal to the endpoints, and outside the endpoints. const custom_with_spaceship c0(0); const custom_with_spaceship c1(1);