Implementation detail for the every_n_policy. More...
#include <every_n.hpp>
Public Member Functions | |
constexpr | every_n_policy (std::size_t count) |
Constructor. More... | |
constexpr bool | operator() () |
Call operator overload. More... | |
Private Attributes | |
std::size_t | count_ {0} |
The count specifying when the action should be triggered. More... | |
std::size_t | current_ {0} |
The current count of calls. More... | |
Implementation detail for the every_n_policy.
This policy triggers an action every N calls, where N is a specified count.
Definition at line 33 of file every_n.hpp.
|
inlineexplicitconstexpr |
Constructor.
count | The count specifying when the action should be triggered (every N calls). |
Definition at line 39 of file every_n.hpp.
|
inlineconstexpr |
Call operator overload.
Increments the internal counter and returns true if the current count is a multiple of N.
Definition at line 47 of file every_n.hpp.
|
private |
The count specifying when the action should be triggered.
Definition at line 53 of file every_n.hpp.
|
private |
The current count of calls.
Definition at line 54 of file every_n.hpp.