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++/67397] New: GCC incorrectly accepts non-type template parameter pack expansion of a parameter pack declared in the same template-parameter-list


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

            Bug ID: 67397
           Summary: GCC incorrectly accepts non-type template parameter
                    pack expansion of a parameter pack declared in the
                    same template-parameter-list
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: brunocodutra at gmail dot com
  Target Milestone: ---

The following is incorrectly accepted by GCC (and clang but not MSVC 14)

template<typename...>
struct foo;

template<typename... t, t... v>
struct foo<std::integral_constant<t, v>...>
{
    using type = foo;
};

using bar = foo<std::integral_constant<int, -1>, std::true_type>::type;

[temp.param]/p15:

"A template parameter pack that is a pack expansion shall not expand a
parameter pack declared in the same template-parameter-list."


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