6 Mar
2013
6 Mar
'13
7:57 p.m.
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_* http://en.cppreference.com/w/cpp/memory/allocator_traits