Boost logo

Boost :

Subject: Re: [boost] [result_of] now uses decltype on release branch
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-09-08 12:45:00

Daniel Walker wrote:
> Do you know of any previously proposed solutions to the SFINAE problem;
> e.g. alternative result_of implementations?

This post (Note: written in Japanese )
says that boost::result_of (and std::result_of) cannot be used for SFINAE
and presents the following implementation

  template < class , class = void >
  struct result_of_aux

  template < class F, class ...Args>
  struct result_of_aux<F(Args...),
decltype(std::declval<F>()(std::declval<Args>()...), void ())>
      typedef decltype(std::declval<F>()(std::declval<Args>()...)) type;

  template < class Sig>
  struct result_of
    : result_of_aux<Sig>


Boost list run by bdawes at, gregod at, cpdaniel at, john at