Hello,<div><br></div><div>I've encountered a compiler error using shared_ptr and allocator from the libc++ header <memory>.  I'm running OS X 10.7.2, and I first noticed this while using the libc++ implementation with Xcode 4.2.1, though I believe this still exists in svn 147357.</div>

<div><br></div><div>The problem is caused by instantiating std::allocator<> (in the memory header) with a const type.  This causes the pointer and const_pointer types to be the same, which results in methods using these to have the same signatures, which gives a compiler error (as it should, given that methods are colliding).  Is this supposed to happen? I haven't read the standard, but it seems like it should work, that is, that std::allocator<const int> should be allowed to exist.</div>

<div><br></div><div>A bit of background. This gets triggered when using:</div><div>std::shared_ptr<const int> ptr(new const int(4));</div><div>which also seems like a reasonable thing to do.</div><div><br></div><div>

Thanks,</div><div>Paul O'Neil</div>