|
Boost : |
Subject: Re: [boost] [type_traits] has_equal_to< std::vector<T> > always true_
From: Daniel James (dnljms_at_[hidden])
Date: 2012-04-30 16:25:02
On 30 April 2012 05:48, Frédéric Bron <frederic.bron_at_[hidden]> wrote:
>
> This looks a very good idea. It is a pity that the standard does not
> provide such header as it does for iostreams (iosfwd).
> However, I see that <boost/detail/container_fwd.hpp> has some troubles
> with many compilers, in particular with g++.
> // GNU libstdc++ 3
> // Disable forwarding for all recent versions, as the library has a
> // versioned namespace mode, and I don't know how to detect it.
> This is a major drawback but maybe we can do something for it.
That's pretty new, I received a bug report a little while ago and
couldn't find much information about it. If anyone knows a better
solution, let me know. With libstdc++ forward declaration almost
always works, but it's hard to detect the cases where it won't. But
for some other standard libraries (esp. libc++) it never does.
> I see also that with the new standard, this header is now not
> exhaustive; we have to include all of these:
> * <array>
> - <deque>
> * <forward_list>
> - <list>
> - <vector>
> - <map>
> - <set>
> * <unordered_map>
> * <unordered_set>
> - <queue>
> - <stack>
> - <string>
> - <bitset>
>
> *: missing headers in <boost/detail/container_fwd.hpp>
I'd rather not add extra headers, since they often get included rather
than forward declared. Maybe could have another C++11 header, or more
fine grained headers.
I think if I was starting fresh, I probably wouldn't put everything
into a single header, and require the user to include extra headers
for standard library objects (e.g. #include
<boost/functional/hash/hash_std_vector.hpp>).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk