标准的select1st和select2nd

MBZ*_*MBZ 5 c++ tuples functor

有没有标准select1stselect2st等价的C++11
似乎这些仅在GNU CPP中定义.

Col*_*mbo 9

对于get定义的所有内容:

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