<br><div class="gmail_extra">All,<br><br><div class="gmail_quote">Jeffrey Lee Hellrung, Jr.�wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> <div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> </blockquote> I had the same issue and posted it a few months ago. I wrote to the MS VS forum that their std::result_of should work correctly with both old and new formats; in particular use the declared result_type if it exists (which in general lets the user override the deduced type, great for compatibility issues).<div class="im"><br> <br> Actually doing that robustly is a bit of a maze of metaprogramming. I ended up making a local my_namespace::result_of that I just handles what I needed, and only when I asked for it. That doesn't help the existing range templates, but such a change could be put back into boost::result_of.<br></div></blockquote><div><br>Maybe this is what you did, so I might not be suggesting something new, but... Perhaps boost::result_of could have an extra conditional logic branch added to it:<br>- If F::result_type exists, return F::result_type;<br> - Else:<br>� - If BOOST_NO_CXX11_DECLTYPE, return F::result< F ( Args... ) ><br>� - Else, if F::result<> exists, return F::result< F ( Args... ) ><br>� - Else return decltype( declval<F>() ( declval< Args >()... ) )<br> </div></div></blockquote><div><br></div><div>�I like this -- it sounds like what John describes, but also using the result struct. �I'd suggest that structure if neither BOOST_RESULT_OF_USE_DECLTYPE nor BOOST_RESULT_OF_USE_TR1 are defined (and BOOST_NO_DECLTYPE_N3276 is defined).</div> <div><br></div><div>Those who have been working on result_of the most lately haven't been on this thread; I'll post this with a new subject to see what they say.</div><div><br></div><div>With or without a change to result_of, I believe there's value in allowing the user to explicitly specify the result_type of a callable object passed to transformed. �Ticket #7748[1] contains a patch which permits that.</div> <div><br></div><div>Thanks,</div><div>Nate</div><div><br></div><div>[1]�<a href="https://svn.boost.org/trac/boost/ticket/7748">https://svn.boost.org/trac/boost/ticket/7748</a></div><div><br></div><div><br></div></div></div>