I was trying to compile some code that uses Boost (1.49), with Clang(& libc++) from trunk. The problematic code boils down to the following:
#include
The code in foreign_ptr.hpp
is a redeclaration (if shared_ptr
has already been defined), and as such not likely to cause problems (adding declarations to std
is technically undefined behavior, but most compilers don't care since they don't really distinguish between standard library headers and other files). So the error can only be caused by shared_ptr
being actually undefined.
Now libc++
obviously has a definition shared_ptr
, so I can only suspect some C++03 library made it to the include path somehow and got preferred over libc++.