mirror of
https://github.com/boostorg/callable_traits.git
synced 2026-01-21 16:52:21 +00:00
40 lines
811 B
C++
40 lines
811 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_back_args
|
|
#include <boost/callable_traits/pop_back_args.hpp>
|
|
|
|
namespace ct = boost::callable_traits;
|
|
|
|
static_assert(std::is_same<
|
|
ct::pop_back_args_t<int(char, short, int)>,
|
|
int(char, short)
|
|
>::value, "");
|
|
|
|
struct foo;
|
|
|
|
static_assert(std::is_same<
|
|
ct::pop_back_args_t<int(foo::*)(char, short, int), 2>,
|
|
int(foo::*)(char)
|
|
>::value, "");
|
|
|
|
static_assert(std::is_same<
|
|
ct::pop_back_args_t<int(*)(char, short, int), 3>,
|
|
int(*)()
|
|
>::value, "");
|
|
|
|
static_assert(std::is_same<
|
|
//underflow is handled
|
|
ct::pop_back_args_t<int(&)(char, short, int), 27>,
|
|
int(&)()
|
|
>::value, "");
|
|
|
|
int main() {}
|
|
//]
|