#include <functional>
#include "base/integral_types.h"
#include "base/macros.h"
#include "ion/base/staticsafedeclare.h"
#include "ion/port/atomic.h"
#include "ion/port/macros.h"
#include "ion/port/threadutils.h"
Go to the source code of this file.
#define ION_STATIC_ONCE |
( |
|
function | ) |
|
Value:
s_once_flag_macro->CallOnce(function); \
} while (0)
#define ION_DECLARE_SAFE_STATIC_POINTER(type, variable)
Declare a static non-array pointer and calls a default constructor.
OnceFlag ensures that a target function is only evaluated once.
Executes a given static void() or T() function exactly once.
Any return type is ignored.
Definition at line 133 of file once.h.
Executes a given static bool() function exactly once.
Logs an error if the function returns false.
Definition at line 128 of file once.h.