2023-12-15 02:11:19 +02:00
|
|
|
// Copyright 2023 Peter Dimov.
|
|
|
|
// Distributed under the Boost Software License, Version 1.0.
|
|
|
|
// https://www.boost.org/LICENSE_1_0.txt
|
|
|
|
|
2023-12-15 02:44:14 +02:00
|
|
|
#include <boost/system/result.hpp>
|
2023-12-15 02:11:19 +02:00
|
|
|
#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 );
|
2023-12-15 02:44:14 +02:00
|
|
|
test( result<void>::in_place_value, result<void>::in_place_error );
|
|
|
|
test( result<int&>::in_place_value, result<int&>::in_place_error );
|
2023-12-15 02:11:19 +02:00
|
|
|
|
|
|
|
return boost::report_errors();
|
|
|
|
}
|