This documentation is automatically generated by online-judge-tools/verification-helper
#include "src/sys/call_once.hpp"
#pragma once
/**
* @file call_once.hpp
* @brief Call Once
*/
#include <unordered_set>
namespace workspace {
/**
* @brief Call once.
*/
template <class _F> void call_once(_F &&__f) {
static std::unordered_set<void *> __called;
if (__called.count(std::addressof(__f))) return;
__called.emplace(std::addressof(__f));
__f();
}
} // namespace workspace
#line 2 "src/sys/call_once.hpp"
/**
* @file call_once.hpp
* @brief Call Once
*/
#include <unordered_set>
namespace workspace {
/**
* @brief Call once.
*/
template <class _F> void call_once(_F &&__f) {
static std::unordered_set<void *> __called;
if (__called.count(std::addressof(__f))) return;
__called.emplace(std::addressof(__f));
__f();
}
} // namespace workspace