mirror of
https://github.com/boostorg/core.git
synced 2025-05-11 13:13:55 +00:00
Add sv_common_reference_test2
This commit is contained in:
parent
574c7cf86e
commit
0b9624d047
@ -307,6 +307,7 @@ run sv_stream_insert_test.cpp ;
|
|||||||
run sv_conversion_test.cpp ;
|
run sv_conversion_test.cpp ;
|
||||||
run sv_conversion_test2.cpp : ;
|
run sv_conversion_test2.cpp : ;
|
||||||
run sv_common_reference_test.cpp ;
|
run sv_common_reference_test.cpp ;
|
||||||
|
compile sv_common_reference_test2.cpp ;
|
||||||
|
|
||||||
run span_test.cpp ;
|
run span_test.cpp ;
|
||||||
run span_types_test.cpp ;
|
run span_types_test.cpp ;
|
||||||
|
24
test/sv_common_reference_test2.cpp
Normal file
24
test/sv_common_reference_test2.cpp
Normal 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
|
Loading…
x
Reference in New Issue
Block a user