Skip to content

Reply To: IndicatorCuboid2D : Need extra Explanation

#5429
Adrian
Keymaster

This is an oversight in the documentation. Functor and indicator arithmetic use std::shared_ptr since version 1.3. See section 10.3.2 of the userguide for an introduction.

Basically you can write any indicator as

`
std::shared_ptr<IndicatorF2D<T>> box1 = std::make_shared<IndicatorCuboid2D<T>>(extend1, origin1);
std::shared_ptr<IndicatorF2D<T>> box2 = std::make_shared<IndicatorCuboid2D<T>>(extend2, origin2);
auto unified_box = box1 + box2;
`

and so on. This also works for functors.