#pragma once #include namespace DB { using OnceFlag = std::once_flag; template void callOnce(OnceFlag & flag, Callable && func, Args&&... args) { std::call_once(flag, std::forward(func), std::forward(args)...); } }