]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/assert/test/source_location_test5.cpp
1 // Copyright 2022 Peter Dimov
2 // Distributed under the Boost Software License, Version 1.0.
3 // http://www.boost.org/LICENSE_1_0.txt
5 // Reduced from a boost::system::result test; codegen bug
6 // in GCC < 5 which is somehow triggered by __PRETTY_FUNCTION__
7 // and throwing an exception
9 #include <boost/assert/source_location.hpp>
10 #include <boost/core/lightweight_test.hpp>
13 template<class T
> class result
22 result(): has_value_( false ), value_()
26 T
value( boost::source_location
const& /*loc*/ = BOOST_CURRENT_LOCATION
) const
34 throw std::exception();
42 BOOST_TEST_THROWS( r
.value(), std::exception
);
43 return boost::report_errors();