structured binding with [[maybe_unused]]
问题 Functional languages with pattern matching (sometimes?) have the possibility to ignore some bound values, but with C++17 structured bindings there seem to be no way to do that (std::ignore with structured bindings?). The advice is to use a dummy name, but then we'll get warnings about unused variables. With the latest heads of both clang and gcc, this does the expected thing, which is nice and useful, [[maybe_unused]] auto x =4 ; // fine, no warning [[maybe_unused]] auto [a,dummyb,dummyc] =