http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55043

--- Comment #10 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2012-10-24 06:37:05 UTC ---
(In reply to comment #9)
> (In reply to comment #8)
> > is this a bug in is_constructible?
> 
> I don't think so. The implementation of the copy constructor is irrelevant,
> only the prototype matters to determine copy-constructibility.

I agree with Marc, the trait can only test what the compile-time interface
says. This *could* be an LWG issue and one possible solution would be to
require that implementations ensure that for a non-copyable element type a
container's copy constructor is deleted. This is technically possible, but also
has the unfortunate side-effect that existing container implementations for
std::vector, std::list, etc. could after this change *never* be used in
situations where the element type is still incomplete (albeit not granted by
the standard, many implementations allow this), like

#include <list>
#include <vector>

struct S {
  std::list<S> li;
  std::vector<S> v;
} s1, s2 = s1;

Reply via email to