
On Sun, Jul 17, 2011 at 11:07 AM, Joshua Boyce <raptorfactor@raptorfactor.com> wrote:
According to the Clang mailing list this is in fact a Boost defect.
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-July/016195.html
Although the rest of that post seems correct, the paragraph mentioned in that posting is wrong, since it is about copy assignment rather than copy construction. The correct paragraph in the FDIS is 18.2, paragraph 7, which reads "If the class definition does not explicitly declare a copy constructor, one is declared implicitly. If the class definition declares a move constructor or move assignment operator, the implicitly declared copy constructor is defined as deleted; otherwise, it is defined as defaulted (8.4). The latter case is deprecated if the class has a user-declared copy assignment operator or a user-declared destructor. ..." So this does look like a bug in Boost shared_ptr code. Incidentally, I was recently bitten by the same problem, but mistakenly thought I was dealing with a compiler bug so just worked around it by defining the copy constructor:-) --Beman