|
Boost : |
Subject: Re: [boost] [type_traits] has_equal_to< std::vector<T> > always true_
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2012-04-26 11:56:15
lcaminiti wrote
>
>
> Vicente Botet wrote
>>
>> Le 25/04/12 20:17, Jeffrey Lee Hellrung, Jr. a écrit :
>>> On Wed, Apr 25, 2012 at 10:28 AM, Vicente J. Botet Escriba<
>>> vicente.botet@> wrote:
>>>
>>>>
>>>> Why do you need to specialize this trait for STL containers? Do you
>>>> mean
>>>> that has_equal_to doesn't work for them? if no why?
>>>>
>>>> Sorry if this is something obvious.
>>>>
>>> As far as I've gathered, typical STL implementations won't "guard" the
>>> declaration of vector's operator== with something like Boost.EnableIf,
>>> so
>>> vector<X> is always reported as having an operator== regardless of what
>>> X
>>> is.
>> Oh, I see now. I had the same issue while implementing is_assignable ;-)
>>
>
> Is is_assignable part of some Boost library public API? Did you put the
> specializations in a separate STL header or not?
>
No, these traits are included in the reviewed Boost.Conversion. Even if the
review is pending I don't expect it to be accepted.
I opted to have a file by std file containing specialization.
http://svn.boost.org/svn/boost/sandbox/conversion/boost/conversion/std/
Others are also needed for Boost
http://svn.boost.org/svn/boost/sandbox/conversion/boost/conversion/boost
HTH,
Vicente
-- View this message in context: http://boost.2283326.n4.nabble.com/boost-type-traits-has-equal-to-std-vector-T-always-true-tp3922160p4590234.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk