Ok. Better framed question. The following is compiled on XCode 5.0.1. Clang : Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin12.5.0 Thread model: posix Boost v 1.55.0. Build 2.0-m12. Not sure how to fix it. map complains about constructor ambiguity and I am not sure how to fix it. I am a casual hobbyist programmer and not a C++ expert. Looking at boost headers confuses me. Any help would be appreciated. //--------------------------------------------------------------------- Header File #ifndef boostTest_test_h #define boostTest_test_h #include #include #include using namespace boost::multiprecision; typedef std::map TestMap; #endif //------------------------------------------------------------------------- C++ file #include #include "test.h" int main(int argc, const char * argv[]) { static TestMap tm; std::string s="hello"; int128_t n=128; tm[n]=s;
Ok. Better framed question.
The following is compiled on XCode 5.0.1.
Clang :
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin12.5.0 Thread model: posix
Boost v 1.55.0. Build 2.0-m12.
Not sure how to fix it. map complains about constructor ambiguity and I am not sure how to fix it.
I'm not able to reproduce with either MSVC or g++, also looking at the source for libc++ I see the current source has only one overload of __construct_node, where as yours appears to have two: maybe this is an old libc++ bug? Sorry I can't be more helpful, but that's not a toolset or platform I use, John.
On Jan 21, 2014, at 5:26 AM, John Maddock
Ok. Better framed question.
The following is compiled on XCode 5.0.1.
Clang :
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) Target: x86_64-apple-darwin12.5.0 Thread model: posix
Boost v 1.55.0. Build 2.0-m12.
Not sure how to fix it. map complains about constructor ambiguity and I am not sure how to fix it.
I'm not able to reproduce with either MSVC or g++, also looking at the source for libc++ I see the current source has only one overload of __construct_node, where as yours appears to have two: maybe this is an old libc++ bug?
The key to reproducing this is “-std=c++11”; in C++03 it works, and in C++11 it does not. I believe that this is related to http://llvm.org/bugs/show_bug.cgi?id=16549 (which has been fixed) In any case, your code works fine with the latest libc++ sources, but I’m guessing that’s not a helpful answer for you. — Marshall
participants (3)
-
John Maddock
-
Marshall Clow
-
tridiak@ihug.co.nz