2
0
mirror of https://github.com/boostorg/leaf.git synced 2026-01-19 16:32:08 +00:00
Files
leaf/test/so_dll_lib2.cpp

36 lines
933 B
C++

// Copyright 2018-2024 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)
#ifdef BOOST_LEAF_TEST_SINGLE_HEADER
# include "leaf.hpp"
#else
# include <boost/leaf/exception.hpp>
# include <boost/leaf/result.hpp>
# include <boost/leaf/on_error.hpp>
#endif
#include "lightweight_test.hpp"
#define BOOST_LEAF_SO_DLL_TEST_BUILDING_LIB2
#include "so_dll_lib2.hpp"
namespace leaf = boost::leaf;
BOOST_LEAF_SO_DLL_TEST_LIB2_API leaf::result<void> hidden_result2()
{
auto load = leaf::on_error( my_info<1>{1}, my_info<3>{3} );
return leaf::new_error( my_info<2>{2} );
}
#ifndef BOOST_LEAF_NO_EXCEPTIONS
BOOST_LEAF_SO_DLL_TEST_LIB2_API void hidden_throw2()
{
auto load = leaf::on_error( my_info<1>{1}, my_info<3>{3} );
leaf::throw_exception( my_info<2>{2} );
}
#endif