You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this line is ambiguous it's not clear if end()+1 is undefined behavior, you can find discussions about it going either way, it may or may not be, but it does throw a runtime debug assertion in Visual C++ 2022. Seems like if you need to split on the null-terminator, rather than using the implicit one that string uses you could always explicitly add a '\0' which will get counted as part of the string length (contrary to what strlen would provide).
cheers.
The text was updated successfully, but these errors were encountered:
I think the s.end() already points to "one after" the last item, so removed +1, which now makes it possible to run/debug the code. @ProjectPhysX Thanks a lot for this great piece of code!
Have been coding CUDA a bit and now also wanted to try OpenCL, but as many before me has noted, there is more boiler plate code to get a hello-world project running (compare to CUDA).
OpenCL-Wrapper/src/utilities.hpp
Line 565 in deb0a35
this line is ambiguous it's not clear if end()+1 is undefined behavior, you can find discussions about it going either way, it may or may not be, but it does throw a runtime debug assertion in Visual C++ 2022. Seems like if you need to split on the null-terminator, rather than using the implicit one that string uses you could always explicitly add a '\0' which will get counted as part of the string length (contrary to what strlen would provide).
cheers.
The text was updated successfully, but these errors were encountered: