boostorg / boostorg/algorithm

Unexpected behavior when using algorithm::trim() to remove spaces

Aperta
#58 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
131
Fork
117
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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:

```c++
two, pi // original string
[two, pi] // vector after split() using comma as delimiter
two // first element after trim()
p // second element after trim()
```
Here the `trim()` actually leave a leading space left of `pi` 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?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.