forked from boostorg/system
Add test for ODR-use of ::in_place_* (refs #115)
This commit is contained in:
@ -176,3 +176,4 @@ boost_test(TYPE run SOURCES result_and_fn1v.cpp)
|
|||||||
boost_test(TYPE run SOURCES result_and_fn1r.cpp)
|
boost_test(TYPE run SOURCES result_and_fn1r.cpp)
|
||||||
boost_test(TYPE run SOURCES result_and_eq_fn1v.cpp)
|
boost_test(TYPE run SOURCES result_and_eq_fn1v.cpp)
|
||||||
boost_test(TYPE run SOURCES result_and_eq_fn1r.cpp)
|
boost_test(TYPE run SOURCES result_and_eq_fn1r.cpp)
|
||||||
|
boost_test(TYPE run SOURCES result_in_place_use.cpp)
|
||||||
|
@ -206,3 +206,4 @@ run result_and_fn1v.cpp : : : $(CPP11) ;
|
|||||||
run result_and_fn1r.cpp : : : $(CPP11) ;
|
run result_and_fn1r.cpp : : : $(CPP11) ;
|
||||||
run result_and_eq_fn1v.cpp : : : $(CPP11) ;
|
run result_and_eq_fn1v.cpp : : : $(CPP11) ;
|
||||||
run result_and_eq_fn1r.cpp : : : $(CPP11) ;
|
run result_and_eq_fn1r.cpp : : : $(CPP11) ;
|
||||||
|
run result_in_place_use.cpp : : : $(CPP11) ;
|
||||||
|
20
test/result_in_place_use.cpp
Normal file
20
test/result_in_place_use.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// Copyright 2023 Peter Dimov.
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// https://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <boost/system.hpp>
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
|
||||||
|
template<class T, class U> void test( T const& t, U const& u )
|
||||||
|
{
|
||||||
|
BOOST_TEST_NE( static_cast<void const*>( &t ), static_cast<void const*>( &u ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
using namespace boost::system;
|
||||||
|
|
||||||
|
test( result<int>::in_place_value, result<int>::in_place_error );
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
Reference in New Issue
Block a user