You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use.cpp:4:11: error: ambiguous deduction for template arguments of 'Templ' Templ t(5); ^/home/chuanqi.xcq/workspace.xuchuanqi/llvm-project-for-work/build/modules_deduction_guide/foo.h:4:5: note: candidate function [with T = int] Templ(T a) {} ^/home/chuanqi.xcq/workspace.xuchuanqi/llvm-project-for-work/build/modules_deduction_guide/foo.h:4:5: note: candidate function [with T = int]
The error message is clearly wrong.
A workaround could be to add a user-defined deduction guide:
Yeah, it looks like the compiler can't do a good job for implicit deduction guide now. But due to the deduction guide is mainly grammar sugar for me. So the priority may be relatively low now..
Reproducer:
Compile it by:
then we'll meet:
The error message is clearly wrong.
A workaround could be to add a user-defined deduction guide:
The text was updated successfully, but these errors were encountered: