diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/boost/libs/exception/test/visibility_test.cpp | |
parent | Initial commit. (diff) | |
download | ceph-upstream/18.2.2.tar.xz ceph-upstream/18.2.2.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/exception/test/visibility_test.cpp')
-rw-r--r-- | src/boost/libs/exception/test/visibility_test.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/boost/libs/exception/test/visibility_test.cpp b/src/boost/libs/exception/test/visibility_test.cpp new file mode 100644 index 000000000..362c63bbc --- /dev/null +++ b/src/boost/libs/exception/test/visibility_test.cpp @@ -0,0 +1,32 @@ +//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. + +//Distributed under the Boost Software License, Version 1.0. (See accompanying +//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/config.hpp> + +#if defined( BOOST_NO_EXCEPTIONS ) +# error This program requires exception handling. +#endif + +#include "visibility_test_lib.hpp" +#include <boost/exception/get_error_info.hpp> +#include <boost/detail/lightweight_test.hpp> + +void BOOST_SYMBOL_IMPORT hidden_throw(); + +int +main() + { + try + { + hidden_throw(); + BOOST_TEST(false); + } + catch( + my_exception & e ) + { + BOOST_TEST(boost::get_error_info<my_info>(e) && *boost::get_error_info<my_info>(e)==42); + } + return boost::report_errors(); + } |