more push_back tests

This commit is contained in:
badair
2016-04-17 15:06:14 -05:00
parent 6fcb682491
commit 7908670c42
13 changed files with 325 additions and 287 deletions

29
test/push_back_pmf.cpp Normal file
View File

@@ -0,0 +1,29 @@
#include <tuple>
#include <utility>
#include <type_traits>
#include <callable_traits/callable_traits.hpp>
#ifndef CT_ASSERT
#define CT_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)
#endif //CT_ASSERT
namespace ct = callable_traits;
template<int I>
struct N {};
struct foo;
template<typename... Ts>
using sig = int(foo::* const &)(Ts...) const volatile;
int main() {
{
using f = sig<N<0>, N<1>, N<2>, N<3>, N<4>>;
using test = ct::push_back<f, int&, char*>;
using expect = sig<N<0>, N<1>, N<2>, N<3>, N<4>, int&, char*>;
CT_ASSERT(std::is_same<test, expect>::value);
}
}