标准选择1st,然后选择2nd

standard select1st and select2nd

本文关键字:选择 2nd 然后 1st 标准      更新时间:2023-10-16

C++11中有标准的select1stselect2st等价物吗
这些似乎只在GNUCPP中定义过。

对于get定义的所有内容:

template <std::size_t N>
constexpr auto select = [] (auto&& x) noexcept -> decltype(auto) {
  return std::get<N>(std::forward<decltype(x)>(x));
};