]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/callable_traits/example/is_noexcept.cpp
2 Copyright (c) 2016 Barrett Adair
4 Distributed under the Boost Software License, Version 1.0.
5 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
8 #include <boost/callable_traits/detail/config.hpp>
10 #ifndef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES
15 #include <boost/callable_traits/is_noexcept.hpp>
17 namespace ct
= boost::callable_traits
;
21 static_assert(ct::is_noexcept
<int() noexcept
>::value
, "");
22 static_assert(ct::is_noexcept
<int(*)() noexcept
>::value
, "");
23 static_assert(ct::is_noexcept
<int(&)() noexcept
>::value
, "");
24 static_assert(ct::is_noexcept
<int(foo::*)() const noexcept
>::value
, "");
26 static_assert(!ct::is_noexcept
<int()>::value
, "");
27 static_assert(!ct::is_noexcept
<int(*)()>::value
, "");
28 static_assert(!ct::is_noexcept
<int(&)()>::value
, "");
29 static_assert(!ct::is_noexcept
<int(foo::*)() const>::value
, "");