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++/60328] New: [4.8/4.9 Regression] [c++11] ICE/Rejection with specialization in variadic template


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

            Bug ID: 60328
           Summary: [4.8/4.9 Regression] [c++11] ICE/Rejection with
                    specialization in variadic template
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reagentoo at gmail dot com

The following valid code snippet (compiled with "-std=c++11") rejected in GCC
4.9.0 (20130909) and triggers an ICE in GCC 4.8.2:

================================================
template <class _T, class... _Rest>
struct Foo
{
    template <class _TT, class... _RR>
    using Bar = Foo<_TT, _RR...>;

    using Normal = Foo<_Rest...>;
    using Fail = Bar<_Rest...>;
};
================================================
GCC 4.8.2 output:
internal compiler error: Segmentation fault
     using Fail = Bar<_Rest...>;
                              ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.
================================================
GCC 4.9.0 output:
8 : error: pack expansion argument for non-pack parameter â_TTâ of alias
template âtemplate template using Bar = Foo<_TT, _RR ...>â
using Fail = Bar<_Rest...>;
^

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