Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-04-02 14:35:16


"Gennadiy Rozental" <gennadiy.rozental_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote in message
> news:uptaqlaqz.fsf_at_boost-consulting.com...
>> "Gennadiy Rozental" <gennadiy.rozental_at_[hidden]> writes:
>>
>> >> A trait is a part of the definition of an entity.
>> >
>> > That's right.
>>
>> Absolutely not. A key trait of traits is that they're non-intrusive.
>> They create an association with that can be defined *after* the type
>> argument is defined. See
>> http://www.boost.org/more/generic_programming.html#traits
>
> I do undersand that. But I still believe that trait specification is part of
> definition.

Not if you want to describe the properties of some 3rd-party class:

    #include <3rd_party/smart_ptr.hpp>
    
    template <class T>
    struct is_dereferenceable<third_party::smart_ptr<T> >
       : mpl::true
    {};

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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