Boost logo

Boost :

From: Peder Holt (peder.holt_at_[hidden])
Date: 2008-02-16 13:39:19


2008/2/16, shunsuke <pstade.mb_at_[hidden]>:
>
> 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
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk