[PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402,PR102033,PR102034,PR102039,PR102
Jason Merrill
jason@redhat.com
Fri Oct 15 21:00:19 GMT 2021
On 10/14/21 07:04, Nick Huang wrote:
> IMHO, I think your patch probably finally solved this long-standing Core
> 1001 issue. Of course it is not up to me to say so. I just want to point out
> that it even solves the following case, even though it is more or less
> expected if concept and lambda all work expectedly.
>
> template<class T>
> concept IsLambdaAry3=__is_same(T, decltype(+[]{})[3]);
> template<IsLambdaAry3 T>
> void bar(const T){}
> template<>
> void bar<decltype(+[]{})[3]>(const decltype(+[]{})[3]){}
Sounds good. Here's what I'm applying:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-c-array-cv-quals-and-template-specialization-PR10140.patch
Type: text/x-patch
Size: 9484 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20211015/8395f96f/attachment.bin>
More information about the Gcc-patches
mailing list