Boost logo

Boost Users :

Subject: Re: [Boost-users] [container] Initialization from transformed_range compilation error
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2011-09-06 07:13:55


El 06/09/2011 1:17, Daniel James escribió:
> 2011/9/5 Ion Gaztañaga<igaztanaga_at_[hidden]>:
>>
>> Ok, I'll try to check what's wrong with Boost.Container.
>>
>> Thanks for the report
>
> I don't know if this is related but some of your insertion functions
> have problems with implicit conversions. This fails:
>
> #include<boost/container/vector.hpp>
> #include<string>
>
> int main()
> {
> boost::container::vector<std::string> x;
> x.push_back("something");
> }
>
> I think you possibly should use is_convertible for your SFINAE
> functions rather than is_same, so that they're instantiated for
> anything that has an implicit conversion to your argument. We
> discussed this recently:
>
> http://article.gmane.org/gmane.comp.lib.boost.devel/222236
>

it's a bit more complicated than that, there was no overload for
non-class convertible types to class in the insertion macro. I'll fix
this ASAP.

Ion


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net