]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/beast/test/beast/core/handler_ptr.cpp
2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 // Official repository: https://github.com/boostorg/beast
10 // Test that header file is self-contained.
11 #include <boost/beast/core/handler_ptr.hpp>
13 #include <boost/beast/unit_test/suite.hpp>
20 class handler_ptr_test
: public beast::unit_test::suite
26 handler(handler
const&) = default;
29 operator()(bool& b
) const
50 throw std::exception
{};
58 handler_ptr
<T
, handler
> p1
{h
};
59 handler_ptr
<T
, handler
> p2
{p1
};
62 handler_ptr
<U
, handler
> p3
{h
};
65 catch(std::exception
const&)
73 handler_ptr
<T
, handler
> p4
{std::move(h
)};
75 p4
.invoke(std::ref(b
));
80 BEAST_DEFINE_TESTSUITE(beast
,core
,handler_ptr
);