From e3414bf042c7000398ded29f89cf7e6e8b71e519 Mon Sep 17 00:00:00 2001 From: Scott Schurr Date: Tue, 1 Mar 2016 17:09:24 -0800 Subject: [PATCH] Test how beast::is_call_possible<> handles const-ness. --- beast/is_call_possible.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/beast/is_call_possible.h b/beast/is_call_possible.h index e858c2a10..5c18bc3b1 100644 --- a/beast/is_call_possible.h +++ b/beast/is_call_possible.h @@ -71,6 +71,11 @@ struct is_call_possible_udt2 int operator()(int) const; }; +struct is_call_possible_udt3 +{ + int operator()(int); +}; + static_assert(is_call_possible< is_call_possible_udt1, void(int)>::value, ""); @@ -86,6 +91,11 @@ static_assert(! is_call_possible< 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, ""); } }