Bug 77781 - [DR 1315] Some valid cases of partial specialization not accepted
Summary: [DR 1315] Some valid cases of partial specialization not accepted
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2016-09-28 16:09 UTC by Ville Voutilainen
Modified: 2021-11-23 02:02 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2019-08-12 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.