diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index fe97758..3c49583 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -307,6 +307,7 @@ run sv_stream_insert_test.cpp ; run sv_conversion_test.cpp ; run sv_conversion_test2.cpp : ; run sv_common_reference_test.cpp ; +compile sv_common_reference_test2.cpp ; run span_test.cpp ; run span_types_test.cpp ; diff --git a/test/sv_common_reference_test2.cpp b/test/sv_common_reference_test2.cpp new file mode 100644 index 0000000..91e61e0 --- /dev/null +++ b/test/sv_common_reference_test2.cpp @@ -0,0 +1,24 @@ +// Copyright 2021 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include +#include +#include +#include + +#if !defined(__cpp_lib_ranges) + +BOOST_PRAGMA_MESSAGE( "Skipping test because __cpp_lib_ranges is not defined" ) + +#else + +struct Iterator +{ + using value_type = std::string; + boost::core::string_view operator*() const noexcept; +}; + +static_assert( std::indirectly_readable ); + +#endif