Boost logo

Boost :

Subject: Re: [boost] [type_traits] has_equal_to< std::vector<T> > always true_
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2012-04-29 06:41:32


Hi all,

> At the end, I'm happy to do what the Boost.TypeTraits authors reccommand:
> separate header or not.

I am the author of the operator traits. I thought a bit about your
proposals. I see pro and cons for both solutions. If std container
specializations are:
1. in actual headers:
  a) easy to use (no need to add #include)
  b) forces user of has_equal_to to include <list>, <vector>, <deque>,
<map>, <multi_map>, <set>, <multiset>...
2. in separate headers
  a) must #include an additionnal header, can have a header for each
container and a header that includes all headers so that it is easy to
include just the minimum
  b) no need to include unneeded headers

I would favor solution 2 because I think 1b is too much overload.
Another solution could be to have a macro that say if we must include
the std specialization or not?

John, you are the guru of Boost.TypeTraits, any comment?

Lorenzo, could you look at all standard containers in detail and list
all operators that are concerned for each of them?

Frédéric


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