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++/55998] New: 'integral expression .. is not constant' when instantiating template alias in a template using a parameter of an encapsulating template


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55998

             Bug #: 55998
           Summary: 'integral expression .. is not constant' when
                    instantiating template alias in a template using a
                    parameter of an encapsulating template
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: m-ou.se@m-ou.se


---- Test case ----

template<int N> struct A {};

template<int N> using B = A<N>;

template<int N> struct C {
    template<int> void x(B<N-1>) {}
};

int main() { C<4> x; }

-----

g++ version 4.8.0 20120314: Compiles fine. No errors.
g++ version 4.8.0 20121221: error: integral expression '(4 - 1)' is not
constant


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