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).
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.
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:
- If F::result_type exists, return F::result_type;
- Else:
- If BOOST_NO_CXX11_DECLTYPE, return F::result< F ( Args... ) >
- Else, if F::result<> exists, return F::result< F ( Args... ) >
- Else return decltype( declval<F>() ( declval< Args >()... ) )