5 Feb
2008
5 Feb
'08
5:42 p.m.
Alexis H. Rivera-Rios wrote:
Just so you know, the code compiles fine in VC2005 and Windriver Diab compiler. Gcc 3,4 is the one that complains. Can somebody explain me why that happens?
mem_fun_ref_t is not DefaultConstructible, so that its transform_iterator is not. lower_bound requires ForwardIterator, which shall be DefaultConstructible. Hence, that code is not guaranteed to compile. Easy workaround is to write functor type from scratch. BTW, I'm proposing a library(waiting for review) which contains workaround named `regular`: http://tinyurl.com/3awba9 Regards, -- Shunsuke Sogame