]>
git.proxmox.com Git - ceph.git/blob - ceph/src/Beast/test/core/handler_ptr.cpp
2 // Copyright (c) 2013-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)
8 // Test that header file is self-contained.
9 #include <beast/core/handler_ptr.hpp>
11 #include <beast/unit_test/suite.hpp>
17 class handler_ptr_test
: public beast::unit_test::suite
23 handler(handler
const&) = default;
26 operator()(bool& b
) const
47 throw std::exception
{};
55 handler_ptr
<T
, handler
> p1
{h
};
56 handler_ptr
<T
, handler
> p2
{p1
};
59 handler_ptr
<U
, handler
> p3
{h
};
62 catch(std::exception
const&)
70 handler_ptr
<T
, handler
> p4
{std::move(h
)};
72 p4
.invoke(std::ref(b
));
77 BEAST_DEFINE_TESTSUITE(handler_ptr
,core
,beast
);