标签: c++ stdtuple
我需要构造一个std::tuple对象,以便std::tuple_size<T>::value = 0。 有办法吗?
std::tuple
std::tuple_size<T>::value
答案 0 :(得分:10)
std::tuple<> empty; using empty_t = std::tuple<>; auto empty2 = std::make_tuple(); static_assert(std::tuple_size<std::tuple<>>::value == 0);