]> git.proxmox.com Git - ceph.git/blob - ceph/src/Beast/test/core/is_call_possible.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / Beast / test / core / is_call_possible.cpp
1 //
2 // Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7
8 // Test that header file is self-contained.
9 #include <beast/core/detail/is_call_possible.hpp>
10
11 namespace beast {
12 namespace detail {
13 namespace {
14
15 struct is_call_possible_udt1
16 {
17 void operator()(int) const;
18 };
19
20 struct is_call_possible_udt2
21 {
22 int operator()(int) const;
23 };
24
25 struct is_call_possible_udt3
26 {
27 int operator()(int);
28 };
29
30 #ifndef __INTELLISENSE__
31 // VFALCO Fails to compile with Intellisense
32 static_assert(is_call_possible<
33 is_call_possible_udt1, void(int)>::value, "");
34
35 static_assert(! is_call_possible<
36 is_call_possible_udt1, void(void)>::value, "");
37
38 static_assert(is_call_possible<
39 is_call_possible_udt2, int(int)>::value, "");
40
41 static_assert(! is_call_possible<
42 is_call_possible_udt2, int(void)>::value, "");
43
44 static_assert(! is_call_possible<
45 is_call_possible_udt2, void(void)>::value, "");
46
47 static_assert(is_call_possible<
48 is_call_possible_udt3, int(int)>::value, "");
49
50 static_assert(! is_call_possible<
51 is_call_possible_udt3 const, int(int)>::value, "");
52 #endif
53
54 }
55 } // detail
56 } // beast