On Sunday, 9 February 2020 at 02:25:56 UTC, Steven Schveighoffer
wrote:
On 2/8/20 7:39 PM, realhet wrote:
On Sunday, 9 February 2020 at 00:15:47 UTC, Drug wrote:
On Saturday, 8 February 2020 at 23:37:56 UTC, realhet wrote:
Yea, I exactly ran into that "init" problem, I will avoid that,
thx!
On Sunday, 9 February 2020 at 01:19:55 UTC, Paul Backus wrote:
On Sunday, 9 February 2020 at 00:57:05 UTC, realhet wrote:
On Sunday, 9 February 2020 at 00:41:12 UTC, realhet wrote:
On Sunday, 9 February 2020 at 00:27:21 UTC, Adam D. Ruppe
enum initValue = (new
On 2/8/20 7:39 PM, realhet wrote:
On Sunday, 9 February 2020 at 00:15:47 UTC, Drug wrote:
On Saturday, 8 February 2020 at 23:37:56 UTC, realhet wrote:
Hello,
class A{
int i = 42;
}
Is there a way to get that 42? (Input is the class A and the name of
the field 'i')
A.i.init returns 0, so
On Sunday, 9 February 2020 at 00:57:05 UTC, realhet wrote:
On Sunday, 9 February 2020 at 00:41:12 UTC, realhet wrote:
On Sunday, 9 February 2020 at 00:27:21 UTC, Adam D. Ruppe
wrote:
Using what I've learned:
class A{
int i=42;
void init(){ // reInitialize class fields
alias T =
On Sunday, 9 February 2020 at 00:57:05 UTC, realhet wrote:
On Sunday, 9 February 2020 at 00:41:12 UTC, realhet wrote:
On Sunday, 9 February 2020 at 00:27:21 UTC, Adam D. Ruppe
wrote:
mixin([FieldNameTuple!T].map!(n => n~"=(new T)."~n~";").join);
After checking it in the asm debugger, it
On Sunday, 9 February 2020 at 00:41:12 UTC, realhet wrote:
On Sunday, 9 February 2020 at 00:27:21 UTC, Adam D. Ruppe wrote:
Using what I've learned:
class A{
int i=42;
void init(){ // reInitialize class fields
alias T = typeof(this);
mixin([FieldNameTuple!T].map!(n => n~"=(new
On Sunday, 9 February 2020 at 00:27:21 UTC, Adam D. Ruppe wrote:
On Saturday, 8 February 2020 at 23:37:56 UTC, realhet wrote:
classinfo.m_init can be an option, but maybe there's a nicer
way to do this?
eh the initializer i think is the best. you can sometimes
shortcut it
pragma(msg, (new
On Sunday, 9 February 2020 at 00:15:47 UTC, Drug wrote:
On Saturday, 8 February 2020 at 23:37:56 UTC, realhet wrote:
Hello,
class A{
int i = 42;
}
Is there a way to get that 42? (Input is the class A and the
name of the field 'i')
A.i.init returns 0, so it doesn't care about the class.
On Saturday, 8 February 2020 at 23:37:56 UTC, realhet wrote:
classinfo.m_init can be an option, but maybe there's a nicer
way to do this?
eh the initializer i think is the best. you can sometimes
shortcut it
pragma(msg, (new A).i);
which will call the ctor at ctfe and get the value. but if
On Saturday, 8 February 2020 at 23:37:56 UTC, realhet wrote:
Hello,
class A{
int i = 42;
}
Is there a way to get that 42? (Input is the class A and the
name of the field 'i')
A.i.init returns 0, so it doesn't care about the class.
classinfo.m_init can be an option, but maybe there's a
10 matches
Mail list logo