mirror of
https://github.com/boostorg/callable_traits.git
synced 2026-02-09 11:02:29 +00:00
31 lines
880 B
C++
31 lines
880 B
C++
/*<-
|
|
Copyright (c) 2016 arett Adair
|
|
|
|
Distributed under the Boost Software License, Version 1.0.
|
|
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
|
->*/
|
|
|
|
#include "test.hpp"
|
|
#include <callable_traits/apply_member_pointer.hpp>
|
|
|
|
struct foo;
|
|
|
|
template<typename Input, typename Output>
|
|
void test_case() {
|
|
assert_same<ct::apply_member_pointer_t<Input, foo>, Output>();
|
|
}
|
|
|
|
int main() {
|
|
test_case<int, int foo::*>();
|
|
test_case<int &, int foo::*>();
|
|
test_case<int const, int const foo::*>();
|
|
test_case<int const &, int const foo::*>();
|
|
test_case<int volatile, int volatile foo::*>();
|
|
test_case<int volatile &, int volatile foo::*>();
|
|
|
|
//member data - function pointer
|
|
test_case<int(* const)(), int(* const foo::*)()>();
|
|
test_case<int(* const &)(), int(* const foo::*)()>();
|
|
}
|
|
|