
Hi, Boost.Typeof seems to implement native typeof by using compiler bug or extension. Can decltype(reference sensitive) be implemented by using compiler bug or extension? Regards, -- Shunsuke Sogame

2008/2/16, shunsuke <pstade.mb@gmail.com>:
Hi,
Boost.Typeof seems to implement native typeof by using compiler bug or extension.
Can decltype(reference sensitive) be implemented by using compiler bug or extension?
Boost.Foreach already implements compile time rvalue detection for some compilers: #if BOOST_WORKAROUND(BOOST_MSVC, >= 1310) && !defined(_PREFAST_) \ || (BOOST_WORKAROUND(__GNUC__, >= 4) && !defined(BOOST_INTEL)) \ || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ >= 4) && !defined(BOOST_INTEL)) # define BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION For these compilers, it is possible to implement decltype. I am not sure whether this should be part of Boost.Typeof, since we cannot implement this feature on the remaining compilers. Regards, Peder Regards,
-- Shunsuke Sogame
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Peder Holt wrote:
For these compilers, it is possible to implement decltype. I am not sure whether this should be part of Boost.Typeof, since we cannot implement this feature on the remaining compilers.
I wanted to use decltype in order to make boost::result_of compilation faster. (So that, the portability could be kept anyway.) I probably give up, after all. I've applied Boost.Typeof when expression type is known rvalue. Unfortunately, the compilation time becomes slower :-) Regards, -- Shunsuke Sogame
participants (2)
-
Peder Holt
-
shunsuke