March 05, 2003 function template returning template object | ||||
---|---|---|---|---|
| ||||
Not sure about the diagnostic of this, could be the return object construction, or the specification of the function return type (I'm betting on the latter): class Type { }; struct Holder { template <class T1> struct B { typedef int type1; typedef int type2; }; }; template <class T1, class T2> struct A { }; template <class T> A<typename T:: B<Type>::type1, typename T:: B<Type>::type2> fn() { return A<int,int>(); } // Error: 2 actual arguments expected for A, had 1 // Internal error: template 1656 int main() { fn<Holder>(); } I fixed up the FC++ lib for DM intending to give result to Christof, but a section of the lib with this form fails and I can't think of a useful workaround. Richard |
Copyright © 1999-2021 by the D Language Foundation