summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/callable_traits/example/class_of.cpp
blob: 9a75977e191b6362297462ff6d62e3159a622763 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*<-
Copyright (c) 2016 Barrett 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 <boost/callable_traits/detail/config.hpp>

//[ class_of
#include <type_traits>
#include <boost/callable_traits/class_of.hpp>

namespace ct = boost::callable_traits;

struct foo;

static_assert(std::is_same<foo, ct::class_of_t<int(foo::*)()>>::value, "");
static_assert(std::is_same<foo, ct::class_of_t<int foo::*>>::value, "");

int main() {}
//]