what's the best D equivalent of C++11's function local static initialization? ``` void fun(){ static auto a=[](){ //some code return some_var; } } ```
(C++11 guarantees thread safety)
Timothee Cour via Digitalmars-d-learn Tue, 16 May 2017 20:07:58 -0700
what's the best D equivalent of C++11's function local static initialization? ``` void fun(){ static auto a=[](){ //some code return some_var; } } ```
(C++11 guarantees thread safety)