c++0x inherited constructor in templates
问题 Here is class foo: template <typename T> struct foo { foo() { t = nullptr; } foo(T* p, bool flag) { t = p; } private: T* t; }; Here is class bar: template <typename T> struct bar: public foo<T> { using foo<T>::foo<T>; }; Is it correct syntax for inheriting constructors? If I use "using foo::foo;" then compiler of Visual C++ 2010 dies. So basically how to inherit constructors from template classes in VC++ 2010? 回答1: template <typename T> struct bar: public foo<T> { using foo<T>::foo<T>; }; To