Bug 77781

Summary: [DR 1315] Some valid cases of partial specialization not accepted
Product: gcc Reporter: Ville Voutilainen <ville.voutilainen>
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: daniel.kruegler, jason, mpolacek, webrown.cpp
Priority: P3 Keywords: rejects-valid
Version: 7.0   
Target Milestone: ---   
See Also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67593
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96555
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2019-08-12 00:00:00

Description Ville Voutilainen 2016-09-28 16:09:49 UTC

    
Comment 1 Ville Voutilainen 2016-09-28 16:12:45 UTC
gcc rejects the following, clang accepts it:

template<size_t,class...> struct S; template<class...A> struct S<sizeof...(A),A...>{};

both gcc and clang reject this:

template<int,int> struct S; template<int i> struct S<i,i+1>{};

gcc accepts the following, clang rejects it:

template<class,int> struct S; template<class T> struct S<T,T{}>{};
Comment 2 Robert Haberlach 2017-12-15 11:29:25 UTC
Clang now accepts the second example.
Comment 3 Marek Polacek 2021-11-23 02:01:48 UTC
Fixed by 9b94785dedb08b006419bec1a402614d9241317a.