Add sv_common_reference_test2

This commit is contained in:
Peter Dimov 2021-12-18 18:53:42 +02:00
parent 574c7cf86e
commit 0b9624d047
2 changed files with 25 additions and 0 deletions

View File

@ -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 ;

View File

@ -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 <boost/core/detail/string_view.hpp>
#include <boost/config/pragma_message.hpp>
#include <string>
#include <iterator>
#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<Iterator> );
#endif