-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behavior when using algorithm::trim() to remove spaces #58
Comments
Since you didn't provide an actual test program, I wrote my own:
That looks fine to me.
Can you run this program on your platform and tell me what happens? |
Thanks! That I did not providing a minimal example was lazy on my part. Here is the result of the test program you provided:
The Boost version I have is 1.68.0. Compiled with Android cross compiler under Windows Linux Subsystem |
The only difference that I can see is that you're using Boost 1.68.0, and I'm using trunk. That's very odd. And the fact that it only fails when cross-compiling to ARM suggests a tool problem. Doesn't rule out a bug in Boost, though. |
The issue comes from boostorg/compute#817 where
boost::trim()
is invoked to sanitize OpenCL kernel arguments from preprocessor-generated strings. One of the failing cases taken directly from the boost compute repo is this:Here the
trim()
actually leave a leading space left ofpi
and slices one valid character on the right. One big BUT: this only happens to Linux cross-compiler targeting Android platform, downloaded from Android NDK page. Where as MSVC on Windows, GCC/Clang on Mac all run without problems. What might be the reason of this unexpected behavior?The text was updated successfully, but these errors were encountered: