Usually decltype perseveres the ref qualifiers
auto a = 0;
auto& a_ref = a;
static_assert(std::is_reference_v<decltype(a_ref)>);
But apparently not when it's argument is obtained from structured binding
auto p = std::pair{1, 2.f};
auto& [i, d] = p;
static_assert(std::is_reference_v<decltype(i)>); // fails
https://godbolt.org/z/qWT574fr9
I'm pretty sure that i
and d
are references here. They should be according to oldnewthing and intellisense is telling me so.