什么是std :: array衰减到转发引用

时间:2016-11-10 21:59:03

标签: c++14 typetraits stdarray

simplex(a, A1 = c(1, 1), b1 = 1.0E+12, A2 = A2, b2 = b2, maxi = FALSE)

什么是template <typename T> void test(T&& t) { std::cout << std::is_same_v < T, std::array<int, 2> > << std::endl; std::cout << std::is_same_v < std::decay_t<T>, std::array<int, 2> > << std::endl; std::cout << std::is_array_v< std::decay_t<T> > << std::endl; } void foo { std::array<int, 2> a; test(a); } 腐烂?上面的代码给出了以下内容:

std::array

我对三个零感到非常惊讶,因为我认为至少第一个或第二个是真的。

0 个答案:

没有答案
相关问题