]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/core/test/sv_conversion_test2.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / core / test / sv_conversion_test2.cpp
CommitLineData
1e59de90
TL
1// Copyright 2021 Peter Dimov
2// Distributed under the Boost Software License, Version 1.0.
3// https://www.boost.org/LICENSE_1_0.txt
4
5#include <boost/core/detail/string_view.hpp>
6#include <boost/utility/string_view.hpp>
7#include <boost/core/lightweight_test.hpp>
8#include <string>
9
10boost::core::string_view f( boost::core::string_view const& str )
11{
12 return str;
13}
14
15int main()
16{
17 {
18 std::string s1( "123" );
19 std::string s2 = f( s1 );
20
21 BOOST_TEST_EQ( s1, s2 );
22 }
23
24 {
25 boost::string_view s1( "123" );
26 boost::string_view s2 = f( s1 );
27
28 BOOST_TEST_EQ( s1, s2 );
29 }
30
31 return boost::report_errors();
32}