MCPcopy Create free account
hub / github.com/PX4/eigen / zeroSizedVector

Function zeroSizedVector

test/zerosized.cpp:68–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68template<typename VectorType> void zeroSizedVector()
69{
70 VectorType t1;
71
72 if (VectorType::SizeAtCompileTime == Dynamic || VectorType::SizeAtCompileTime==0)
73 {
74 zeroReduction(t1);
75 VERIFY(t1.size() == 0);
76 VectorType t2(DenseIndex(0)); // DenseIndex disambiguates with 0-the-null-pointer (error with gcc 4.4 and MSVC8)
77 VERIFY(t2.size() == 0);
78 zeroReduction(t2);
79
80 VERIFY(t1==t2);
81 }
82}
83
84void test_zerosized()
85{

Callers

nothing calls this directly

Calls 2

zeroReductionFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected