clang++ can compile the following code without any error and warning, but g++ always gives me the error "no matching call ..."? Is it a bug of g++ or kind of extensions of clang++?
Code:#include <algorithm> int main() { struct utils { struct int_type { int m_value; }; static int_type& transform_predicate(int_type& x) { x.m_value += 1; return x; } }; static utils::int_type array[1048576]; int i; for(i = 0; i < 1048576; i++) array[i].m_value = i; std::transform(array, array + 1048576, array, utils::transform_predicate); return 0; }



LinkBack URL
About LinkBacks


