]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/callable_traits/example/remove_varargs.cpp
3 Copyright Barrett Adair 2016-2017
5 Distributed under the Boost Software License, Version 1.0.
6 (See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
10 #include <type_traits>
11 #include <boost/callable_traits/remove_varargs.hpp>
13 namespace ct
= boost::callable_traits
;
20 using f
= void(int, ...);
21 using expect
= void(int);
22 using test
= ct::remove_varargs_t
<f
>;
23 static_assert(std::is_same
<test
, expect
>::value
, "");
25 using fp
= void(*)(...);
26 using expect
= void(*)();
27 using test
= ct::remove_varargs_t
<fp
>;
28 static_assert(std::is_same
<test
, expect
>::value
, "");
30 using fr
= void(&)(const char*, ...);
31 using expect
= void(&)(const char*);
32 using test
= ct::remove_varargs_t
<fr
>;
33 static_assert(std::is_same
<test
, expect
>::value
, "");
35 using pmf
= void(foo::*)(...) const;
36 using expect
= void(foo::*)() const;
37 using test
= ct::remove_varargs_t
<pmf
>;
38 static_assert(std::is_same
<test
, expect
>::value
, "");