Struct every_n_policy

Struct Documentation

struct every_n_policy

Implementation detail for the every_n_policy.

This policy triggers an action every N calls, where N is a specified count.

Public Functions

inline explicit constexpr every_n_policy(std::size_t count)

Constructor.

Parameters:

count – The count specifying when the action should be triggered (every N calls).

inline constexpr bool operator()()

Call operator overload.

Increments the internal counter and returns true if the current count is a multiple of N.

Returns:

True if the action should be triggered, false otherwise.