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

--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-24 
08:25:04 UTC ---
(In reply to comment #10)
> (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.

That seems inconsistent with 20.9.4.3/6

the predicate condition for a template specialization is_constructible<T,
Args...> shall be satisfied if and only if the following variable definition
would be well-formed for some invented variable t:
    T t(create<Args>()...);

and that variable definition is not well-formed:

  const N<M>& create();
  N<M> t(create());

u.cc: In instantiation of ‘N<T>::N(const N<T>&) [with T = M]’:
u.cc:17:16:   required from here
u.cc:11:24: error: use of deleted function ‘constexpr M::M(const M&)’
   N(const N& n) : m(n.m) { }
                        ^


I guess the solution is to add enable_if-style constraints to the copy
constructors, everywhere.

Reply via email to