On Wednesday, 17 May 2017 at 03:08:39 UTC, Timothee Cour wrote:
NOTE: curious about both cases:
* thread local
* shared
On Tue, May 16, 2017 at 8:04 PM, Timothee Cour
<thelastmamm...@gmail.com> wrote:
what's the best D equivalent of C++11's function local static
initialization?
```
vo
t of C++11's function local static
initialization?
```
void fun(){
static auto a=[](){
//some code
return some_var;
}
}
```
(C++11 guarantees thread safety)
I don't know the exact equivalent, mostly because I don't
really know what the C++ statement does tbh. Tried to look it
up real
On Wednesday, 17 May 2017 at 03:08:39 UTC, Timothee Cour wrote:
NOTE: curious about both cases:
* thread local
* shared
On Tue, May 16, 2017 at 8:04 PM, Timothee Cour
<thelastmamm...@gmail.com> wrote:
what's the best D equivalent of C++11's function local static
initialization?
```
vo
NOTE: curious about both cases:
* thread local
* shared
On Tue, May 16, 2017 at 8:04 PM, Timothee Cour <thelastmamm...@gmail.com> wrote:
> what's the best D equivalent of C++11's function local static initialization?
> ```
> void fun(){
> static auto a=[](){
> //
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)