[Boost-bugs] [Boost C++ Libraries] #6915: boost::fusion::result_of::invoke compilation errors

Subject: [Boost-bugs] [Boost C++ Libraries] #6915: boost::fusion::result_of::invoke compilation errors
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-17 17:39:23


#6915: boost::fusion::result_of::invoke compilation errors
-------------------------------+--------------------------------------------
 Reporter: ulidtko@… | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.49.0
 Severity: Problem | Keywords:
-------------------------------+--------------------------------------------
 In Boost.Fusion 1.49.0, `boost::fusion::result_of::invoke` metafunction
 causes compilation errors in some cases of SFINAE usage.

 See attachments for reproducing example.

 Please note how the code works with trivial metafunction
 (`subst_failure_if_not_int`), and does not with
 `boost::fusion::result_of::invoke`, while being used in identical manner.

 Also note that the following line:
 {{{
   try_invoke<F, boost::fusion::vector<float>> (0);
 }}}
  may compile or not depending on the `BOOST_RESULT_OF_USE_DECLTYPE` switch
 under GCC. Which is a fair clue of that this is probably boost's bug.


 == Compiler error messages ==

 === MSVC 9 ===
 {{{
 d:\boost\1_49_0\boost\fusion\functional\invocation\invoke.hpp(199) : error
 C2039: 'type' : is not a member of 'boost::result_of<F>'
 d:\boost\1_49_0\boost\fusion\functional\invocation\invoke.hpp(159) : see
 reference to class template instantiation
 'boost::fusion::detail::invoke_impl<Function,Sequence>' being compiled
 ..\substitution_failure_test.cpp(60) : see reference to class template
 instantiation 'boost::fusion::result_of::invoke<Function,Sequence>' being
 compiled
         with
         [
             Function=F,
             Sequence=boost::fusion::vector<float>
         ]
 }}}

 === GCC 4.5.3 ===
 When compiling with `#define BOOST_RESULT_OF_USE_DECLTYPE 1`:
 {{{
 In file included from
 D:/boost/1_49_0/boost/preprocessor/iteration/detail/iter/forward1.hpp:52:0,
                  from D:/boost/1_49_0/boost/utility/result_of.hpp:95,
                  from
 D:/boost/1_49_0/boost/fusion/support/detail/segmented_fold_until_impl.hpp:13,
                  from
 D:/boost/1_49_0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp:15,
                  from
 D:/boost/1_49_0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp:10,
                  from
 D:/boost/1_49_0/boost/fusion/sequence/intrinsic/begin.hpp:17,
                  from
 D:/boost/1_49_0/boost/fusion/container/vector/vector10.hpp:15,
                  from
 D:/boost/1_49_0/boost/fusion/container/vector.hpp:12,
                  from D:/boost/1_49_0/boost/fusion/container.hpp:10,
                  from substitution_failure_test.cpp:5:
 D:/boost/1_49_0/boost/utility/detail/result_of_iterate.hpp: In
 instantiation of ‘boost::detail::cpp0x_result_of_impl<F(junk&)>’:
 D:/boost/1_49_0/boost/utility/detail/result_of_iterate.hpp:52:1:
 instantiated from ‘boost::result_of<F(junk&)>’
 D:/boost/1_49_0/boost/fusion/functional/invocation/invoke.hpp:199:60:
 instantiated from ‘boost::fusion::detail::invoke_impl<F,
 boost::fusion::vector<junk>, 1, false, true>’
 D:/boost/1_49_0/boost/fusion/functional/invocation/invoke.hpp:159:30:
 instantiated from ‘boost::fusion::result_of::invoke<F,
 boost::fusion::vector<junk> >’
 substitution_failure_test.cpp:65:47: instantiated from here
 D:/boost/1_49_0/boost/utility/detail/result_of_iterate.hpp:64:5: error: no
 match for call to ‘(F) (junk&)’
 substitution_failure_test.cpp:39:6: note: candidate is: int
 F::operator()(float)
 }}}

 Without:
 {{{
 In file included from
 D:/boost/1_49_0/boost/preprocessor/iteration/detail/iter/forward1.hpp:52:0,
                  from
 D:/boost/1_49_0/boost/fusion/functional/invocation/invoke.hpp:93,
                  from
 D:/boost/1_49_0/boost/fusion/functional/invocation.hpp:12,
                  from D:/boost/1_49_0/boost/fusion/functional.hpp:12,
                  from substitution_failure_test.cpp:7:
 D:/boost/1_49_0/boost/fusion/functional/invocation/invoke.hpp: In
 instantiation of ‘boost::fusion::detail::invoke_impl<F,
 boost::fusion::vector<float>, 1, false, true>’:
 D:/boost/1_49_0/boost/fusion/functional/invocation/invoke.hpp:159:30:
 instantiated from ‘boost::fusion::result_of::invoke<F,
 boost::fusion::vector<float> >’
 substitution_failure_test.cpp:62:48: instantiated from here
 D:/boost/1_49_0/boost/fusion/functional/invocation/invoke.hpp:199:60:
 error: no type named ‘type’ in ‘struct boost::result_of<F(float&)>’
 D:/boost/1_49_0/boost/fusion/functional/invocation/invoke.hpp: In
 instantiation of ‘boost::fusion::detail::invoke_impl<F,
 boost::fusion::vector<junk>, 1, false, true>’:
 D:/boost/1_49_0/boost/fusion/functional/invocation/invoke.hpp:159:30:
 instantiated from ‘boost::fusion::result_of::invoke<F,
 boost::fusion::vector<junk> >’
 substitution_failure_test.cpp:65:47: instantiated from here
 D:/boost/1_49_0/boost/fusion/functional/invocation/invoke.hpp:199:60:
 error: no type named ‘type’ in ‘struct boost::result_of<F(junk&)>’
 }}}

 ,,PS: ''I ♥ search engines.'',,

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6915>
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:09 UTC