1//
2// impl/multiple_exceptions.ipp
3// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4//
5// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6//
7// Distributed under the Boost Software License, Version 1.0. (See accompanying
8// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9//
10
11#ifndef BOOST_ASIO_IMPL_MULTIPLE_EXCEPTIONS_IPP
12#define BOOST_ASIO_IMPL_MULTIPLE_EXCEPTIONS_IPP
13
14#if defined(_MSC_VER) && (_MSC_VER >= 1200)
15# pragma once
16#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18#include <boost/asio/detail/config.hpp>
19#include <boost/asio/multiple_exceptions.hpp>
20
21#include <boost/asio/detail/push_options.hpp>
22
23namespace boost {
24namespace asio {
25
26multiple_exceptions::multiple_exceptions(
27 std::exception_ptr first) noexcept
28 : first_(static_cast<std::exception_ptr&&>(first))
29{
30}
31
32const char* multiple_exceptions::what() const noexcept
33{
34 return "multiple exceptions";
35}
36
37std::exception_ptr multiple_exceptions::first_exception() const
38{
39 return first_;
40}
41
42} // namespace asio
43} // namespace boost
44
45#include <boost/asio/detail/pop_options.hpp>
46
47#endif // BOOST_ASIO_IMPL_MULTIPLE_EXCEPTIONS_IPP
48

source code of boost/libs/asio/include/boost/asio/impl/multiple_exceptions.ipp