MCPcopy Create free account
hub / github.com/avaxman/Directional / zeroSizedVector

Function zeroSizedVector

external/eigen/test/zerosized.cpp:77–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77template<typename VectorType> void zeroSizedVector()
78{
79 VectorType t1;
80
81 if (VectorType::SizeAtCompileTime == Dynamic || VectorType::SizeAtCompileTime==0)
82 {
83 zeroReduction(t1);
84 VERIFY(t1.size() == 0);
85 VectorType t2(DenseIndex(0)); // DenseIndex disambiguates with 0-the-null-pointer (error with gcc 4.4 and MSVC8)
86 VERIFY(t2.size() == 0);
87 zeroReduction(t2);
88
89 VERIFY(t1==t2);
90 }
91}
92
93EIGEN_DECLARE_TEST(zerosized)
94{

Callers

nothing calls this directly

Calls 2

zeroReductionFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected