Current it++ library (git-eabd5ad6) gtest process failed when building with LLVM's libc++ standard library because stream parsing breaking.
*** Assertion failed in /Users/sw/Downloads/itpp-4.3.1/itpp/base/vec.cpp on line 252:
Vec::set(): Stream operation failed (buffer >> data) (!buffer.fail())
It works only when building with GCC's libstdc++ library.
I believe the main reason is that the LLVM's libc++(v3.4) can not accept the valuable complex number format a+/-bi which is also compatible with MATLAB in internal token procedure (Vec.h). The tokenize funcion in vec.h convertes all of the complex number formats to uniform a+/-bi format. But it failed in LLVM's libc++.
I made a patch to revert all of the complex number formats to normal (or standard) (a,+/-b) format which should be accepted by every serious C++ compiler and its standard library including GCC and LLVM (clang). It is ugly, but seems works.
I applied this patch on Debian GNU/Linux platform (I don't have any OS X or FreeBSD system), and built the it++ library with Clang-3.4 and standard libc++, everything was fine, gtest passed all of the tests.
If any your comments and advices, please let me know.
Hi dear it++ developer,
Current it++ library (git-eabd5ad6) gtest process failed when building with LLVM's libc++ standard library because stream parsing breaking.
*** Assertion failed in /Users/sw/Downloads/itpp-4.3.1/itpp/base/vec.cpp on line 252:
Vec::set(): Stream operation failed (buffer >> data) (!buffer.fail())
It works only when building with GCC's libstdc++ library.
I believe the main reason is that the LLVM's libc++(v3.4) can not accept the valuable complex number format a+/-bi which is also compatible with MATLAB in internal token procedure (Vec.h). The tokenize funcion in vec.h convertes all of the complex number formats to uniform a+/-bi format. But it failed in LLVM's libc++.
I made a patch to revert all of the complex number formats to normal (or standard) (a,+/-b) format which should be accepted by every serious C++ compiler and its standard library including GCC and LLVM (clang). It is ugly, but seems works.
I applied this patch on Debian GNU/Linux platform (I don't have any OS X or FreeBSD system), and built the it++ library with Clang-3.4 and standard libc++, everything was fine, gtest passed all of the tests.
If any your comments and advices, please let me know.
Last edit: xiangyuliu 2014-05-16
I can confirm that your patch works on OSX Mavericks and openSUSE 13.1. Changes pushed into master branch. Thanks for proving the patch.