Struct StrategyPair

Struct Documentation

struct StrategyPair

A combination of a Load and ZeroStrategy

The two strategies are tracked independently: an entry only carries the strategy that was explicitly set for it. This matters because setting one strategy must not implicitly assert a value for the other – e.g. requesting a zero strategy for a result must not also pin its load strategy (and thereby shadow a load strategy set elsewhere for the same object).

See also

LoadStrategy

See also

ZeroStrategy

Public Functions

StrategyPair() = default
StrategyPair(LoadStrategy load, ZeroStrategy zero)
StrategyPair(LoadStrategy load)
StrategyPair(ZeroStrategy zero)

Public Members

std::optional<LoadStrategy> load
std::optional<ZeroStrategy> zero