Difference in stringstream behavior for void* type using libc++ and libstdc++
The following test program returns different results depending on whether I'm using libc++ or libstdc++. #include <sstream> #include <iostream> int main() { int a = 0; void* optr = &a; void* iptr; std::stringstream ss; ss << optr; std::cout << ss.str() << '\n'; ss >> iptr; std::cout << iptr << '\n'; return 0; } I'm using the following version of clang from Xcode 5 on OSX 10.9.2 $ xcrun clang++ --version Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin13.1.0 Thread model: posix Here's the output of the test when built with libstdc++ and libc++ $ xcrun