Where possible, don't try to ask whether a template argument is
dependent until it's been converted to match its parameter. The type of a non-type template parameter can in general affect whether the template argument is dependent. Note that this is not always possible. For template arguments that name static local variables in templates, the type of the template parameter affects whether the argument is dependent, so the query is imprecise until we know the parameter type. For example, in: template<typename T> void f() { static const int n = 5; typename T::template X<n> x; } ... we don't know whether 'n' is dependent until we know whether the corresponding template parameter is of type 'int' or 'const int&'.
Loading
Please sign in to comment