   (C++0x / VC++2010) Inherit move ctor when default ctor is private
  It seems with the using keyword you cannot specify only some of overloaded functions to be inherited.  This creates a design problem for me which someone here might be able to help me with.  I have a class that has parts of its structure as follows:class A{public:...inline A(T mandatory_arg)inline A(A &&other);Image &operator=(A &&other);...protected:...private:...A(void);A(A const &);A &operator=(A const &);...};Now, I have several derived classes and since the move ctor and assignment operator have identical bodies in each case, I'd like to inherit them:class B{public:...using A::A;using A::operator=;...};However, I am unable to do so because:error C2876: 'A' : not all overloads are accessibleWhich is understandable.  I might compromise in making the copy ctor and copy assignment public, but I must prevent default construction of A.  This leads to the ugly result of having to cast to A any time I want to use the move constructors on the derived classes... any better way?Too bad syntax such as this doesn't work:using A(A &&other);   
  You do realize that if you declare your own constructor, that a default constructor is no longer present unless explicitly declared.   ;  Wait, you have multiple derived classes and none of them add anything to the move constructor or assignment? Why do these classes exist then?   ;  It's not that much extra typing to write the constructors instead of trying to pull them in with usingclass B{  B(T mandatory_arg a) : A ...  B(A &&other a) : A ...};Quote:Original post by WashuYou do realize that if you declare your own constructor, that a default constructor is no longer present unless explicitly declared.You do realise that this form of rhetorical question is extremely patronising.[Edited by - Hodgman on April 15, 2010 11:25:40 PM];Quote:Original post by Hodgman  inline B(A &&other a) : A(a) {}This move constructor won't compile, as it'll try to call A(const A &) and not A(A &&). You should add in a std::move() call.   