For now, both of G++ and VC++ 2010 don't support inheriting constructors.
However, I think this is one the most beautiful features in C++0x. And I think it should be rather easy to implement by the compiler.
Why are the compilers not interested of this feature?
Assume I want to design my own string class by inheriting std::string like this:
class MyString : public std::string
{
public:
// I have to redefine many overloaded ctors here and forward their arguments to
// std::string's ctors. How tedious it will be!!!
};
A beautiful code example:
struct B1
{
B1(char);
};
struct B2
{
B2(double);
B2(int);
};
struct D1 : B1, B2
{
using B1::B1; // D1(char)
using B2::B2; // D1(double), D1(int)
};
D1 d('c'); //OK, invokes D1(char)