Using std::shared_ptr with clang++ and libstdc++
问题 I'm trying to use the std::shared_ptr in clang++(clang version 3.1 (trunk 143100)) using libstdc++(4.6.1). I have a little demo program: #include <memory> int main() { std::shared_ptr<int> some(new int); std::shared_ptr<int> other(some); return 0; } which can be build using: clang++ -std=c++0x -o main main.cpp and gives the following error output: main.cpp:6:23: error: call to deleted constructor of 'std::shared_ptr<int>' std::shared_ptr<int> other(some); ^ ~~~~ /usr/include/c++/4.6/bits