This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]