This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] rvalue reference implementation for C++0x


Russell Yanofsky wrote:

struct A {};

  struct B : A
  {
    B(int);
    B(B &);
    B(A);
  };

Since B doesn't have a const copy constructor, initializing the variable
directly from the temporary is impossible. But the class A has an
implicit const copy constructor which is allowed to bind to temporary
instances of B under C++0x.

Yes, but you can't use a constructor for A to intialize an object of type B. We should only be considering the B constructors.


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]