Khronos public bugtracker – Bug 246
cl.hpp: Bugs in vector iterator class lead to endless loop
Last modified: 2013-07-23 05:35:51 PDT
I think I've found two small bugs in the vector iterator class. Please try something like:
for( cl::vector<int>::iterator it = v.begin(); it != v.end(); it++ )
std::cout << *it;
This ends up in an infinite loop, because the implementation of operator+= (and operator -=) has been erroneously written as operator++ in line 719 (729) of cl.hpp. Also, if you correct this, you'll find out that there's no postfix operator ++ defined.
This applies to cl.hpp from October 20, 2009.
Other than that, I'm happy with the bindings so far. :-)
Assigning to me.
I'm actually at the airport about to go on vacation and so I will fix this, along with a number of other changes, as soon as I'm back.
I'm going to close this because it appears to be fixed, although it also seems that at the moment building with __NO_STD_VECTOR doesn't work (I'll open a separate bug for that in the internal bugzilla).