
Jeremiah Willcock wrote:
Is there a reason that the use of decltype is not on by default for compilers that support it, perhaps with a flag to force emulation mode (like Boost.Move supports)?
Aside from the type-completeness problem of old C++0x decltype,
there is another type of breakage caused by incorrect support of the
traditional result_of protocol or incorrect usage of result_of.
Some codes using Boost.Fusion or Boost.Phoenix failed to compile with
BOOST_RESULT_OF_USE_DECLTYPE. The reason for the compile error is that
many metafunctions have `struct result` but they do not have corresponding
function call operators.
http://thread.gmane.org/gmane.comp.parsers.spirit.general/24027
https://svn.boost.org/trac/boost/ticket/5687
So we should proceed gradually even if N3276-decltype become available.
As a first step, Daniel already made by updating the documentation.
The documentation on trunk says:
In a future release, BOOST_RESULT_OF_USE_DECLTYPE may be enabled
by default on compilers that support decltype, so if you use the above
protocol please take care to ensure that the result_type and
result<> members accurately represent the result type.
If you wish to continue to use the protocol on compilers that
support decltype, use boost::tr1_result_of, which is also defined
in