Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2002-10-27 21:50:26


Beman Dawes wrote:
[mailto:bdawes_at_[hidden]]
> Sent: Sunday, October 27, 2002 9:29 PM
> To: Boost mailing list; 'Boost mailing list'
> Subject: RE: [boost] is_polymorphic added to type traits
>
>
> At 03:01 AM 10/27/02, Aleksey Gurtovoy wrote:
> >Beman Dawes wrote:
> >> By the way, several compiler writers say they are implementing
> >> support for type traits as they near standardization. One
> >> compiler writer said he was doing it by adding built-in functions
> >> with leading underscores (I guess like "__is_pod(...)").
> >
> >I hope these would be *meta*-functions, i.e.
> >
> > template< typename T > struct __is_pod { /* ...
> 'type/value' members */
>
> >};
>
> No, it is only an attempt to introduce what is required to
> support John's Type Traits proposal.

Oh, you mean they are introducing ordinary functions to allow one to write
something like this:

    template< typename T > struct is_pod
    {
        BOOST_STATIC_CONSTANT(bool, value =
              sizeof( __is_pod(static_cast<T*>(0)) ) == sizeof(yes_tag)
            );
    };

?

Aleksey


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