From 308aaa6f78ea0b20418e310d2ec34ad87f8a1a3d 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. --- src/beast/beast/is_call_possible.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/beast/beast/is_call_possible.h b/src/beast/beast/is_call_possible.h index e858c2a10..5c18bc3b1 100644 --- a/src/beast/beast/is_call_possible.h +++ b/src/beast/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, ""); } }