[Bug c++/116005] Class template argument deduction for alias templates error in C++20
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jul 20 04:57:56 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116005
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
MSVC also rejects it for the same reason as GCC 13+:
```
<source>(19): error C2641: cannot deduce template arguments for 'B'
<source>(19): error C2783: 'A<const T1,T2> A(const
std::vector<T1,std::allocator<_Ty>> &)': could not deduce template argument for
'T2'
<source>(11): note: see declaration of 'A'
<source>(19): error C2783: 'A<T,void> A(const
std::vector<U,std::allocator<_Other>> &)': could not deduce template argument
for 'T'
<source>(7): note: see declaration of 'A'
<source>(19): error C2784: 'A<T,void> A(A<T,void>)': could not deduce template
argument for 'A<T,void>' from 'const std::vector<int,std::allocator<int>>'
<source>(5): note: see declaration of 'A'
```
That message started in MSVC v19.27 VS16.7 which was released August 2020.
So I think this is invalid after all.
More information about the Gcc-bugs
mailing list