MCPcopy Create free account
hub / github.com/boostorg/histogram / add_impl

Function add_impl

test/adaptive_storage_test.cpp:262–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260
261template <typename LHS, typename RHS>
262void add_impl() {
263 auto a = prepare<LHS>(2);
264 auto b = prepare<RHS>(2);
265 if (std::is_same<RHS, void>::value) {
266 a += b;
267 BOOST_TEST_EQ(a[0].value(), 0);
268 BOOST_TEST_EQ(a[1].value(), 0);
269 } else {
270 b.increase(0);
271 b.increase(0);
272 a += b;
273 BOOST_TEST_EQ(a[0].value(), 2);
274 BOOST_TEST_EQ(a[0].variance(), 2);
275 BOOST_TEST_EQ(a[1].value(), 0);
276 }
277}
278
279template <typename LHS>
280void add_impl_all_rhs() {

Callers

nothing calls this directly

Calls 3

valueMethod · 0.45
increaseMethod · 0.45
varianceMethod · 0.45

Tested by

no test coverage detected