Open MaxEW707 opened 4 months ago
https://godbolt.org/z/WPPraqE1E
template <auto a> auto AutoFunc() { return a; } template <class T, T a> auto FuncT() { return a; } template<class T, T a> struct Foo { Foo() {} }; int main() { // Clang : ??$FuncT@H$0A@@@YA?A?<auto>@@XZ // MSVC 1929: ??$FuncT@H$0A@@@YA?A_PXZ // MSVC 1916: ??$FuncT@H$0A@@@YAHXZ FuncT<int, 0>(); // Clang : ??$AutoFunc@$0A@@@YA?A?<auto>@@XZ // MSVC 1929: ??$AutoFunc@$MH0A@@@YA?A_PXZ // MSVC 1916: ??$AutoFunc@$0A@@@YAHXZ AutoFunc<0>(); // Clang : ??0?$Foo@H$0A@@@QEAA@XZ // MSVC 1929: ??0?$Foo@H$0A@@@QEAA@XZ // MSVC 1916: ??0?$Foo@H$0A@@@QEAA@XZ Foo<int, 0> _f; }
@llvm/issue-subscribers-clang-codegen
Author: Max Winkler (MaxEW707)
@llvm/issue-subscribers-c-1
https://godbolt.org/z/WPPraqE1E