std::vector::insert (...) with reverse iterator on SunStudio RW STL
std::vector::insert (...) in SunStudio's RW STL, does not support reverse iterator, a workaround is to use std::copy (...) and back_inserter (...) instead, as following,
- dest.insert (dest.end(), src.rbegin(), src.rend());
+ std::copy (src.rbegin(),src.rend(),back_inserter(dest));


Hi Yong Sun,
you don't need that hack, just compile your C++ code with "-library=stlport4"
发表于 Anon Ymous 在 2009年05月20日, 05:59 上午 CST #
Hi, Anon, yeah, I knew, while I have to use the RW STL for ABI compatibilities. :(
发表于 Yong Sun 在 2009年05月20日, 11:31 上午 CST #
ah pity, IHMO that roguewaves stuff should go away (or at least be made optional, with stlport4 as the new default), it's dog slow (see Solaris Application Programming by Darryl Gove, chapter 7.3.5 STLport4) and well, as you already noticed, incomplete
发表于 Anon Ymous 在 2009年05月21日, 12:53 上午 CST #
I hate Rogues Wave, why does Sun still keep this old slow thing?
For the simplest "cout << xxx << endl;", you can truss it to see how many unnecessary syscalls it generate...
发表于 lxf 在 2009年06月06日, 09:04 上午 CST #