CTAD and designated initializers in C++20
I have already stated confusion about CTAD with designated initializers in this question , but i have another confusion with a very similar code snippet template <typename int_t=int, typename float_t=float> struct my_pair { int_t first; float_t second; }; template<typename ... ts> my_pair(ts...) -> my_pair<ts...>; int main() { my_pair x{.second = 20.f}; static_assert( std::is_same_v<decltype(x.first), int> ); //FAILS <- its deduced to float static_assert( std::is_same_v<decltype(x.second), float> ); } It seems like the deduction guide causes the type of first to be deduced to float , even