On Saturday, 12 March 2022 at 13:12:25 UTC, vit wrote:
```d
enum touch_T = __traits(hasMember, T, "touch");
```
I think you meant build instead of touch?
```d
struct Query {
public const SharedPtr!Builder builder;
}
interface Builder {
void build(ref Query query);
}
struct SharedPtr(T) {
On Saturday, 12 March 2022 at 19:01:06 UTC, Paul Backus wrote:
Typo: `.tupleof`
I use `.tupleof` otherwise, but this is old stuff from when I
didn't know of it. I'll have to refactor it some day, I had hoped
for it to be just... not yet.
On Saturday, 12 March 2022 at 19:00:23 UTC, Paul Backus wrote:
On Saturday, 12 March 2022 at 18:49:32 UTC, Anonymouse wrote:
Currently I'm testing if a function that takes the address of
the member compiles, and I think it works, but like with
everything `__traits(compiles)` it strikes me as
On Saturday, 12 March 2022 at 18:49:32 UTC, Anonymouse wrote:
Currently I'm testing if a function that takes the address of
the member compiles, and I think it works, but like with
everything `__traits(compiles)` it strikes me as it might not
be the right way to go about things.
It sounds l
I'm introspecting structs, and I ran into an issue where
`__traits(derivedMembers)` includes manifest constant enums in
the returned tuple.
What is the correct way to statically detect these? The immediate
thing that springs to mind is `is(symbol == enum)`, but it's not
it.
Currently I'm t
Hello,
why this code compile without problems:
```d
struct Query{
public const SharedPtr!Builder builder;
}
interface Builder{
void build(ref Query query);
}
struct SharedPtr(T){
enum touch_T = __traits(hasMember, T, "touch");
//...
}
void main(){
}
```
but if `ref Query q