On 5/20/20 12:03 PM, realhet wrote:
On Wednesday, 20 May 2020 at 01:18:24 UTC, Paul Backus wrote:
On Tuesday, 19 May 2020 at 23:15:45 UTC, realhet wrote:
I think what you want is `std.meta.staticMap`. Something like this:
alias FieldNameTuple2(T) = staticMap!(FieldNameTuple,
On Wednesday, 20 May 2020 at 09:03:51 UTC, realhet wrote:
On Wednesday, 20 May 2020 at 01:18:24 UTC, Paul Backus wrote:
On Tuesday, 19 May 2020 at 23:15:45 UTC, realhet wrote:
With this mod it also works with structs:
template AllClasses(T){
static if(is(T == class))
alias
On Wednesday, 20 May 2020 at 01:18:24 UTC, Paul Backus wrote:
On Tuesday, 19 May 2020 at 23:15:45 UTC, realhet wrote:
I think what you want is `std.meta.staticMap`. Something like
this:
alias FieldNameTuple2(T) = staticMap!(FieldNameTuple,
BaseClassesTuple!T);
class A { int a, a1; }
class
On Tuesday, 19 May 2020 at 23:15:45 UTC, realhet wrote:
Hi,
I was able to reach all the fields in a subclass using foreach
and BaseClassesTuple, but is there a way to do this using
functional programming primitives, but in compile time for
tuples?
private template FieldNameTuple2(T) {