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++/80296] New: Broken diagnostic 'unary_plus_expr' not supported by expression


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

            Bug ID: 80296
           Summary: Broken diagnostic 'unary_plus_expr' not supported by
                    expression
           Product: gcc
           Version: 7.0.1
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
  Target Milestone: ---

GCC gives a broken daignostic for the following invalid code snippet
since GCC 4.7.0:

=============================================
template <int...> struct A {};

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

B<int> b;
=============================================

bug.cc:5:6: error: type/value mismatch at argument 1 in template parameter list
for 'template<int ...N> using B = A<#'unary_plus_expr' not supported by
expression#...>'
 B<int> b;
      ^
bug.cc:5:6: note:   expected a constant of type 'int', got 'int'

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