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
>> "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
> 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

Boost list run by bdawes at, gregod at, cpdaniel at, john at