On Saturday, 24 September 2022 at 06:13:55 UTC, test123 wrote:
If so please report it for me to bugs platform. I can not
register one.
```d
package {
version(TEST) {
static:
} else {
__gshared:
}
uint test = 0;
}
```
ldmd2 -betterC -vtls -c ./test.d
On Saturday, 24 September 2022 at 06:13:55 UTC, test123 wrote:
If so please report it for me to bugs platform.
This isn't a bug, the effect of keyword: things stop at the
matching }.
(static if and version don't introduce a namespace scope, but
they still follow this rule for the { colon:
On Saturday, 24 September 2022 at 07:11:12 UTC, rikki cattermole
wrote:
```d
version(all) {
__gshared:
uint test2;
}
uint test;
```
Output with -vtls:
```
Up to 2.079.1: Success with output: onlineapp.d(9): test
is thread local
Since 2.080.1: Success with output:
```d
version(all) {
__gshared:
uint test2;
}
uint test;
```
Output with -vtls:
```
Up to 2.079.1: Success with output: onlineapp.d(9): test is thread
local
Since 2.080.1: Success with output: onlineapp.d(9): `test` is
thread local
```
Looks fine to me.
If so please report it for me to bugs platform. I can not
register one.
```d
package {
version(TEST) {
static:
} else {
__gshared:
}
uint test = 0;
}
```
ldmd2 -betterC -vtls -c ./test.d
./test.d(7): `test` is thread local
On Saturday, 20 July 2019 at 14:19:08 UTC, Adam D. Ruppe wrote:
Like the other person said, try/catch turns throws to nothrow.
The `debug` keyword disables pure checks. Those make this easy
without any mixin or wrappers/casts at all.
But even if you did want to do the mixin route, look at
On Saturday, 20 July 2019 at 09:01:21 UTC, Newbie2019 wrote:
I want to cast std.stdio : writefln into pure function pointer,
so I can call it from debug pure function.
Like the other person said, try/catch turns throws to nothrow.
The `debug` keyword disables pure checks. Those make this easy
On Saturday, 20 July 2019 at 09:01:47 UTC, Newbie2019 wrote:
On Saturday, 20 July 2019 at 09:01:21 UTC, Newbie2019 wrote:
I want to cast std.stdio : writefln into pure function
pointer, so I can call it from debug pure function. is there
a way to work around the pure check for call writefln
On Saturday, 20 July 2019 at 09:01:21 UTC, Newbie2019 wrote:
I want to cast std.stdio : writefln into pure function pointer,
so I can call it from debug pure function. is there a way to
work around the pure check for call writefln ?
nothrow check, not pure.
On Saturday, 20 July 2019 at 06:43:03 UTC, user1234 wrote:
use `__traits(identifier)` instead of `.stringof`, see
https://dlang.org/spec/traits.html#identifier.
as explained this is not a new bug, not even a bug according to
me.
I want to cast std.stdio : writefln into pure function
shared immutable " ~ N
~ "_P " ~ P ~"= cast(" ~ N ~ "_P) &" ~ N ~ " ;" ;
}
use `__traits(identifier)` instead of `.stringof`, see
https://dlang.org/spec/traits.html#identifier.
as explained this is not a new bug, not even a bug according to
me.
On Saturday, 20 July 2019 at 04:18:15 UTC, Adam D. Ruppe wrote:
show me what you're doing now and I'll see which case it is.
Most the time I see these, the code is significantly simplified
and bugs fixed by removing the usages of these strings..
I want to do this in betterC:
template
On Saturday, 20 July 2019 at 04:10:53 UTC, Newbie2019 wrote:
I may not fully understand why I can done it without
identifier.stringof
show me what you're doing now and I'll see which case it is. Most
the time I see these, the code is significantly simplified and
bugs fixed by removing the
On Saturday, 20 July 2019 at 03:58:36 UTC, Adam D. Ruppe wrote:
You should never actually need that! What is your use case?
In most cases I see people doing .stringof, the correct
solution is to simply... not. Use the local name directly.
If you do need the name - and the only cases for this
On Saturday, 20 July 2019 at 03:31:41 UTC, Newbie2019 wrote:
template Test(alias T){
pragma(msg, T.stringof);
Believe it or not, but this can result in the function being
called. This is D's optional parenthesis feature, to do simple
property syntax.
Not a bug.
I want get the
template Test(alias T){
pragma(msg, T.stringof);
enum Test = T.stringof;
}
string t1;
void t2(){}
void t3(string s){}
extern(C) void main(){
enum x1 = Test!(t1); // ok
enum x2 = Test!(t2); // expect t2, but get t2()
enum x3 = Test!(t3); //Error:
16 matches
Mail list logo