[](auto const& foo) {
??? bar; // should be same base type as foo, minus const&
}
Bisher verwende ich:
typename std::remove_const<typename std::remove_reference<decltype(foo)>::type>::type combination
Aber ich hoffe wirklich Theres eine einfachere Alternative!
Soweit ich gelesen habe, war ich 'Auto' Typ Abzugssemantik, aber an einem Ort, wo ich' Decltype' verwenden muss, da ich keinen Ausdruck zuordnen. Sie haben 'decltype (auto) foo = bar' für das umgekehrte Problem eingeführt, aber jetzt will ich' declltype (bar) foo; ';) –
mmocny