Re: [Boost-bugs] [Boost C++ Libraries] #10443: [fusion] Compile errors with boost::fusion::invoke and boost::result_of using decltype

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10443: [fusion] Compile errors with boost::fusion::invoke and boost::result_of using decltype
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-09-06 03:14:35


#10443: [fusion] Compile errors with boost::fusion::invoke and boost::result_of
using decltype
-------------------------------------+-------------------------------------
  Reporter: James Whitworth | Owner: djowel
  <fun4jimmy@…> | Status: new
      Type: Bugs | Component: fusion
 Milestone: To Be Determined | Severity: Problem
   Version: Boost 1.56.0 | Keywords: invoke result_of
Resolution: | delctype c++11
-------------------------------------+-------------------------------------

Comment (by michel):

 I've not followed recent updates in Boost.Fusion,
 so I might be wrong, but...

 Both C++03 and C++11 versions of `fusion::invoke` are not SFINAE-friendly,
 as demonstrated in this post (
 [[http://thread.gmane.org/gmane.comp.lib.boost.devel/233752/focus=233849|Re:
 [result_of] now uses decltype on release branch]]
 ):
 {{{
 #include <boost/fusion/include/invoke.hpp>
 #include <boost/fusion/include/vector.hpp>

 struct F {
     template <typename Sig>
     struct result;
     template <typename This>
     struct result<This(int&)>
     {
         typedef void type;
     };
     void operator()(int&) const {}
 };

 int main (int argc, char* argv[])
 {
     boost::fusion::vector<int> v(1);

     // Error;
     // trying to instantiate result_of<F(const int&)>
     boost::fusion::invoke(F(), v);

     return 0;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10443#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC