Boost logo

Boost :

Subject: Re: [boost] traits classes vs. metafunctions
From: Stefan Strasser (strasser_at_[hidden])
Date: 2013-03-06 14:57:24

Am 06.03.2013 20:50, schrieb Andrey Semashev:
> On Wednesday 06 March 2013 20:36:20 Stefan Strasser wrote:
>> Hi everyone,
>> are there any guidelines for boost libraries on when to use traits
>> classes and when to use a metafunction for each member of a would-be
>> traits class?
> I'm not aware of any guidelines but I typically use traits when the result
> types are related and may be used together by the user.

what do you do when there is both, properties that are related and ones
that are not?

> Consider iterator_traits, which provides several properties of an iterator.

consider c++11 allocator_traits and propagate_*

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