Skip to content

Instantly share code, notes, and snippets.

@ridiculousfish
Created May 4, 2020 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ridiculousfish/0a24a98e7634b78e77a0351501576ee8 to your computer and use it in GitHub Desktop.
Save ridiculousfish/0a24a98e7634b78e77a0351501576ee8 to your computer and use it in GitHub Desktop.
#include <mutex>
static void hello() {}
int main(void)
{
std::once_flag just_once{};
std::call_once(just_once, hello);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment