
On Fri, May 28, 2010 at 5:23 AM, vicente.botet <vicente.botet@wanadoo.fr> wrote:
Hi,
The Boost.Conversion library (Generic explicit conversion between unrelated types) has not revealed too much interest for the Boost community since v0.4 was released on 10/09.
For those that don't know it yet you can get the documentation and download links from https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Conve...
I have added on the sandbox some pending issues that Jeffrey Hellrung related to conversions that need extra information.
If B1 is covertible to A1 using convert_to, now we can conver vectors of conversible types.
B1 b10, b11, b12, b13; std::vector<B1> vb2; vb2[0]=b10; vb2[1]=b11; vb2[2]=b12; vb2[3]=b13; std::vector<A1> va2(boost::convert_to<std::vector<A1> >(vb2))
What's wrong with std::vector<A1> va2; std::transform(vb2.begin(),vb2.end(),std::inserter(va2,va2.end()),bind(convert_to<A1>,_1)); Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode