Template deduction guide doesn't work well with aggregate initialization
I am studying how to use deduction guides. I composed this program. template<typename T> struct Test { void f() { cout << std::is_same_v<T, std::size_t> << endl; } T t; }; Test(int) -> Test<std::size_t>; int main() { Test t1(1.2); t1.f(); } I expected the deduction guide will only kick in when if I pass an integer