1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
// { dg-do assemble } #include <vector> using namespace std; template <typename T=float> class foo { public: foo(); foo(vector<int> v); private: vector<int> v; T t; }; template <typename T> foo<T>::foo() :v(), t() {} template <typename T=float> foo<T>::foo(vector<int> v_) :v(v_), t() {} // { dg-error "" } default arg for member template foo<float> a;