Skip to content

Commit

Permalink
std::result_of<> is sometimes more convenient than decltype()
Browse files Browse the repository at this point in the history
  • Loading branch information
rollbear committed Jan 10, 2015
1 parent 3fcf385 commit b8d38f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trompeloeil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ namespace trompeloeil
call_modifier<Matcher, return_injector<return_of_t<signature>, Parent > >
handle_return(H&& h)
{
using ret = decltype(h(std::declval<call_params_type_t<signature>& >()));
using ret = typename std::result_of<H(call_params_type_t<signature>&)>::type;
static_assert(std::is_constructible<return_of_t<signature>, ret>::value
|| !std::is_same<return_of_t<signature>, void>::value,
"RETURN does not make sense for void-function");
Expand Down

0 comments on commit b8d38f8

Please sign in to comment.