diff --git a/include/boost/array.hpp b/include/boost/array.hpp index 12a2e9e..601fee8 100644 --- a/include/boost/array.hpp +++ b/include/boost/array.hpp @@ -51,6 +51,12 @@ #include #include +#if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L +# if __has_include() +# include +# endif +#endif + namespace boost { template @@ -383,6 +389,7 @@ namespace boost { } #if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L +# if __has_include() template constexpr auto operator<=> (const array& x, const array& y) @@ -394,16 +401,17 @@ namespace boost { if( r != 0 ) return r; } - return 0 <=> 0; // std::strong_ordering::equal + return std::strong_ordering::equal; } template constexpr auto operator<=> (const array& /*x*/, const array& /*y*/) - -> decltype( 0 <=> 0 ) + -> std::strong_ordering { - return 0 <=> 0; // std::strong_ordering::equal + return std::strong_ordering::equal; } +# endif #endif // undocumented and obsolete