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'

Reply via email to