C++ Lambda Idioms
Unary plus trick
Immediately Invoked Function Expressions (IIFE)
Foo
没有默认的构造函数,或者定义为常量需要立即初始化,这个初始化依赖一些逻辑的情况。
Call-once Lambda
what is the difference between std::call_once and function-level static initialization
Foo
没有默认的构造函数,或者定义为常量需要立即初始化,这个初始化依赖一些逻辑的情况。
what is the difference between std::call_once and function-level static initialization