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

Function check_const_correctness

test/mapped_matrix.cpp:148–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148template<typename PlainObjectType> void check_const_correctness(const PlainObjectType&)
149{
150 // there's a lot that we can't test here while still having this test compile!
151 // the only possible approach would be to run a script trying to compile stuff and checking that it fails.
152 // CMake can help with that.
153
154 // verify that map-to-const don't have LvalueBit
155 typedef typename internal::add_const<PlainObjectType>::type ConstPlainObjectType;
156 VERIFY( !(internal::traits<Map<ConstPlainObjectType> >::Flags & LvalueBit) );
157 VERIFY( !(internal::traits<Map<ConstPlainObjectType, AlignedMax> >::Flags & LvalueBit) );
158 VERIFY( !(Map<ConstPlainObjectType>::Flags & LvalueBit) );
159 VERIFY( !(Map<ConstPlainObjectType, AlignedMax>::Flags & LvalueBit) );
160}
161
162template<typename Scalar>
163void map_not_aligned_on_scalar()

Callers 1

test_mapped_matrixFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_mapped_matrixFunction · 0.56