Rename to detail::is_invocable

Fix #323
This commit is contained in:
Vinnie Falco
2017-07-20 08:12:15 -07:00
parent 512ab5ba7d
commit 4b19600dd2
9 changed files with 99 additions and 117 deletions
+1 -1
View File
@@ -41,8 +41,8 @@ unit-test core-tests :
core/base64.cpp
core/empty_base_optimization.cpp
core/get_lowest_layer.cpp
core/is_call_possible.cpp
core/sha1.cpp
core/type_traits.cpp
;
unit-test http-tests :
+1 -1
View File
@@ -34,8 +34,8 @@ add_executable (core-tests
base64.cpp
empty_base_optimization.cpp
get_lowest_layer.cpp
is_call_possible.cpp
sha1.cpp
type_traits.cpp
)
if (NOT WIN32)
-56
View File
@@ -1,56 +0,0 @@
//
// Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Test that header file is self-contained.
#include <beast/core/detail/is_call_possible.hpp>
namespace beast {
namespace detail {
namespace {
struct is_call_possible_udt1
{
void operator()(int) const;
};
struct is_call_possible_udt2
{
int operator()(int) const;
};
struct is_call_possible_udt3
{
int operator()(int);
};
#ifndef __INTELLISENSE__
// VFALCO Fails to compile with Intellisense
static_assert(is_call_possible<
is_call_possible_udt1, void(int)>::value, "");
static_assert(! is_call_possible<
is_call_possible_udt1, void(void)>::value, "");
static_assert(is_call_possible<
is_call_possible_udt2, int(int)>::value, "");
static_assert(! is_call_possible<
is_call_possible_udt2, int(void)>::value, "");
static_assert(! is_call_possible<
is_call_possible_udt2, void(void)>::value, "");
static_assert(is_call_possible<
is_call_possible_udt3, int(int)>::value, "");
static_assert(! is_call_possible<
is_call_possible_udt3 const, int(int)>::value, "");
#endif
}
} // detail
} // beast
+56
View File
@@ -0,0 +1,56 @@
//
// Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Test that header file is self-contained.
#include <beast/core/detail/type_traits.hpp>
namespace beast {
namespace detail {
namespace {
struct is_invocable_udt1
{
void operator()(int) const;
};
struct is_invocable_udt2
{
int operator()(int) const;
};
struct is_invocable_udt3
{
int operator()(int);
};
#ifndef __INTELLISENSE__
// VFALCO Fails to compile with Intellisense
static_assert(is_invocable<
is_invocable_udt1, void(int)>::value, "");
static_assert(! is_invocable<
is_invocable_udt1, void(void)>::value, "");
static_assert(is_invocable<
is_invocable_udt2, int(int)>::value, "");
static_assert(! is_invocable<
is_invocable_udt2, int(void)>::value, "");
static_assert(! is_invocable<
is_invocable_udt2, void(void)>::value, "");
static_assert(is_invocable<
is_invocable_udt3, int(int)>::value, "");
static_assert(! is_invocable<
is_invocable_udt3 const, int(int)>::value, "");
#endif
}
} // detail
} // beast