I understand (here is one source) that one can re-define default template arguments as long as the two definitions are not in conflict. So, I am trying to compile the following with g++ 5.3.1:
template <class = int> class A; // forward declaration
template <class T = A<>> struct B {};
template <class T = int> class A {}; // "= int" here is for clarity
int main() { return 0; }
The compiler complains:
error: redefinition of default argument for ‘class T’
Where is my understanding incorrect?