Skip to content

Std::call once

Example

#include <mutex>
// ...
static std::once_flag register_flag;
std::call_once(register_flag, [this](){
        this->init();
    });

Favorite site