mirror of
https://github.com/boostorg/callable_traits.git
synced 2026-01-23 05:22:13 +00:00
40 lines
826 B
C++
40 lines
826 B
C++
/*<-
|
|
|
|
Copyright Barrett Adair 2016
|
|
|
|
Distributed under the Boost Software License, Version 1.0.
|
|
(See accompanying file LICENSE.md or copy at http ://boost.org/LICENSE_1_0.txt)
|
|
|
|
->*/
|
|
|
|
//[ pop_front_args
|
|
#include <boost/callable_traits/pop_front_args.hpp>
|
|
|
|
namespace ct = boost::callable_traits;
|
|
|
|
static_assert(std::is_same<
|
|
ct::pop_front_args_t<int(char, short, int)>,
|
|
int(short, int)
|
|
>::value, "");
|
|
|
|
struct foo;
|
|
|
|
static_assert(std::is_same<
|
|
ct::pop_front_args_t<int(foo::*)(char, short, int) const, 2>,
|
|
int(foo::*)(int) const
|
|
>::value, "");
|
|
|
|
static_assert(std::is_same<
|
|
ct::pop_front_args_t<int(*)(char, short, int), 3>,
|
|
int(*)()
|
|
>::value, "");
|
|
|
|
static_assert(std::is_same<
|
|
//overflow is handled
|
|
ct::pop_front_args_t<int(&)(char, short, int), 27>,
|
|
int(&)()
|
|
>::value, "");
|
|
|
|
int main() {}
|
|
//]
|