Boost logo

Boost :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2007-04-13 14:21:14


On Apr 13, 2007, at 3:24 PM, Daniel Walker wrote:

> On 4/12/07, Douglas Gregor <doug.gregor_at_[hidden]> wrote:
>> On Apr 12, 2007, at 12:16 AM, Mathias Gaunard wrote:
>>> Thank you.
>>> This is awesome.
>>>
>>> A version of GCC, and even precompiled binaries, with all those C+
>>> +0x
>>> features is a good thing as it will allow early usage and
>>> spreading of
>>> those new features.
>>
>> The "OSL5" regression tester for Boost CVS HEAD tests a version of
>> GCC with all of those C++0x features *except* concepts, so we can
>> start (conditionally) using these features in Boost libraries.
>
> So, libraries could begin providing features that rely on decltype
> even if the features won't be available on all compilers, so long as
> the user has some way to conditionally include the features?

Yes. The Config library has macros for some C++0x features (e.g.,
BOOST_HAS_RVALUE_REFS)

> I'm wondering if/when Boost can offer a result_of implementation using
> decltype along the lines of your suggested in N1454 (or typeof if
> reference preservation is not necessary). Perhaps, Boost.TR1 could
> provide a result_of that adheres to the current TR1 proposal and
> Boost.Utility could provide a decltype-based result_of.

The TR1 result_of is allowed to use compiler magic (read: decltype)
to get the right answer, so yes, this is entirely possible and could
probably be done now relatively easily.

        Cheers,
        Doug


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