Files
callable_traits/test/clear_args.cpp
Barrett Adair 505e2496cf code cleanup
2017-03-24 20:48:37 -05: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 BOOST_CLBL_TRTS_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 BOOST_CLBL_TRTS_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);
}
}