Boost C++ Libraries: Ticket #4577: invoke() uses invalid boost::result_of<> https://svn.boost.org/trac10/ticket/4577 <pre class="wiki">struct F{ template&lt;typename Sig&gt; struct result; }; vector&lt;int&gt; const vec(5); invoke(F(),vec); // (1) int t(int i){ return i; } invoke(F(),transform(vec,&amp;t)); // (2) </pre><p> (1) uses F::result&lt;F(int const &amp;)&gt;, while (2) uses F::result&lt;F(int)&gt;. I believe it should be (1) in both cases. </p> <p> attaching test case and patch, which converts each argument type using fusion::detail::call_param </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4577 Trac 1.4.3 anonymous Fri, 20 Aug 2010 12:23:17 GMT attachment set https://svn.boost.org/trac10/ticket/4577 https://svn.boost.org/trac10/ticket/4577 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test.cpp</span> </li> </ul> Ticket anonymous Fri, 20 Aug 2010 12:24:01 GMT attachment set https://svn.boost.org/trac10/ticket/4577 https://svn.boost.org/trac10/ticket/4577 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">invoke.patch</span> </li> </ul> Ticket Joel de Guzman Fri, 21 Jan 2011 07:57:49 GMT owner changed https://svn.boost.org/trac10/ticket/4577#comment:1 https://svn.boost.org/trac10/ticket/4577#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Joel de Guzman</span> to <span class="trac-author">t_schwinger</span> </li> </ul> Ticket Kohei Takahashi <flast@…> Mon, 05 Jan 2015 14:57:39 GMT <link>https://svn.boost.org/trac10/ticket/4577#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4577#comment:2</guid> <description> <p> I think that original behaviour is eligible in such situation. </p> <p> In (1), as you know, <code>vec[n]</code> is <code>const lvalue reference</code> of <code>int</code> since <code>vec</code> is <code>const lvalue</code> of <code>vector</code>. However, in (2), the function <code>t</code> returns <code>prvalue</code> of <code>int</code>: means type of <code>f(vec[n])</code> is <strong>just</strong> <code>int</code>. </p> <p> So, I'm against the suggestion. </p> </description> <category>Ticket</category> </item> </channel> </rss>