Skip to content

Commit b8d38f8

Browse files
committed
std::result_of<> is sometimes more convenient than decltype()
1 parent 3fcf385 commit b8d38f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trompeloeil.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ namespace trompeloeil
915915
call_modifier<Matcher, return_injector<return_of_t<signature>, Parent > >
916916
handle_return(H&& h)
917917
{
918-
using ret = decltype(h(std::declval<call_params_type_t<signature>& >()));
918+
using ret = typename std::result_of<H(call_params_type_t<signature>&)>::type;
919919
static_assert(std::is_constructible<return_of_t<signature>, ret>::value
920920
|| !std::is_same<return_of_t<signature>, void>::value,
921921
"RETURN does not make sense for void-function");

0 commit comments

Comments
 (0)