Files
callable_traits/test/clear_args.cpp
2016-12-10 18:25:20 -06:00

63 lines
1.7 KiB
C++

#include <tuple>
#include <utility>
#include <type_traits>
#include <boost/callable_traits/clear_args.hpp>
#include "test.hpp"
struct foo;
int main() {
{
using f = void(int, int, int, int, int);
using test = clear_args_t<f>;
using expect = void();
CT_ASSERT(std::is_same<test, expect>::value);
}
#ifndef CALLABLE_TRAITS_DISABLE_ABOMINABLE_FUNCTIONS
{
using f = void(int, int, int, int, int) const;
using test = clear_args_t<f>;
using expect = void() const;
CT_ASSERT(std::is_same<test, expect>::value);
}
#endif // #ifndef CALLABLE_TRAITS_DISABLE_ABOMINABLE_FUNCTIONS
{
using f = void(*)(int, int, int, int, int);
using test = clear_args_t<f>;
using expect = void(*)();
CT_ASSERT(std::is_same<test, expect>::value);
}
{
using f = void(&)(int, int, int, int, int);
using test = clear_args_t<f>;
using expect = void(&)();
CT_ASSERT(std::is_same<test, expect>::value);
}
{
using f = void(&)(int, int, int, int, int);
using test = clear_args_t<f>;
using expect = void(&)();
CT_ASSERT(std::is_same<test, expect>::value);
}
{
using f = void(foo::*)(int, int, int, int, int);
using test = clear_args_t<f>;
using expect = void(foo::*)();
CT_ASSERT(std::is_same<test, expect>::value);
}
{
using f = void(foo::*)(int, int, int, int, int) volatile;
using test = clear_args_t<f>;
using expect = void(foo::*)() volatile;
CT_ASSERT(std::is_same<test, expect>::value);
}
}