#include <iostream>
#include <mutex>

using namespace std;

std::once_flag flag;

class Class
{
public:
    Class()
    {
        std::call_once(flag, [this]{ SomeMethod(); });
    }

    void SomeMethod()
    {
        cout << __func__ << endl;
    }
};


int main(int argc, const char * argv[])
{
    Class x, y;
    x.SomeMethod();
    y.SomeMethod();
}


