[Bug c++/66596] New: Type that is not dependent on the variable template template parameters

pau.montequi at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Jun 19 07:35:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66596

            Bug ID: 66596
           Summary: Type that is not dependent on the variable template
                    template parameters
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pau.montequi at gmail dot com
  Target Milestone: ---

The bug appears to be that where the non-specialized variable template has a
type that is not dependent on the variable template template parameters, gcc
assumes within template methods that use that variable template that the
variable template always has that type.

struct U { void f() {} };
struct V { void f() {} };
template<class T> U t;
template<> V t<int>;
template<class T> void g() { t<T>.f(); }
int main() { g<int>(); }

SO thread: http://stackoverflow.com/a/30910509/499359



More information about the Gcc-bugs mailing list