Boost logo

Boost :

Subject: Re: [boost] [type_traits] has_equal_to< std::vector<T> > always true_
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2011-10-21 21:10:43

Le 22/10/11 01:13, Dave Abrahams a écrit :
> on Fri Oct 21 2011, Frédéric Bron<> wrote:
>>>>>> has_equal_to< std::vector<T> > always returns true
>>> Would the Boost.TypeTraits authors consider adding the specializations* to
>>> workaround STL not using SFINAE? If not, can these cases be documented?
>> Hi,
>> Thanks for highlighting this major issue. I understand that there is
>> nothing to do apart from specializing the traits for those particular
>> std classes. This would however not work with user classes. As the
>> beta is due on Monday, I believe it is too short to submit a working
>> and tested patch. Maybe once the beta is out, you can start to work on
>> a proposed contribution?
> I'm not sure, but it's *conceivable* that with C++11 extended SFINAE it
> might be possible to produce a has_equal_to that fails if the operator
> can't be instantiated. Somebody else around here surely knows better
> than I do.
I think so. The problem appears with compilers that don't supports C++11
extended SFINAE and those standard library doesn't protect the operator


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