boostorg / property_tree

Boost.org property_tree module
http://boost.org/libs/property_tree
55 stars 93 forks source link

isspace() may not be a macro #31

Closed kuhlenough closed 6 years ago

kuhlenough commented 6 years ago

Specifically in Dinkum clib shipped with VxWorks it's an inline function

Kojoley commented 6 years ago

Did not you forget to strip std:: from the call?

kuhlenough commented 6 years ago

Yes, missed that last commit, fixed now.

Kojoley commented 6 years ago

Just to clarify: I am not a maintainer of property_tree (you should probably ping the boost mail list of inactivity of the maintainer), but for me it is not clear what was the original problem you described in the title. IIUC the real problem is that VxWorks does not have isspace in std namespace, so you want to use one in a global, right?

kuhlenough commented 6 years ago

The original code was isaspace() in the global namespace, which matches a macro ctype.h in most C libraries. But not the Dinkum clib used by VxWorks.

I did not notice that the commit https://github.com/boostorg/property_tree/commit/616631208c11c47826f07037d8827052800ce98c already fixed this issue for VxWorks. And now makes the code portable, but is not optimized for the most common user of boost glibc.

So after your note I updated my pull, with the alternative, which is still portable, and matches the macro and provide better performance for many users.

Kojoley commented 6 years ago

I did not notice that the commit 6166312

This commit was 2 years ago and in the boost since 1.61 :D. That's why your commit message is now wrong and confusing.