At compile time

Ary Borenszweig ary at esperanto.org.ar
Wed Aug 5 04:23:54 PDT 2009


bearophile escribió:
> Jarrett Billingsley:
>> C++ has static initialization that occurs before main() too.  It's just.. hidden.<
> 
> I see. I have to learn more about C++. Thank you.
> 
> ------------------
> Lars T. Kyllingstad:
> 
>> This is good news! The restrictions you are referring to, are they any of the ones documented here: http://www.digitalmars.com/d/2.0/function.html#interpretation <
> 
> That list has a point regarding what I was trying to do:
>> 4. the function may not be a non-static member, i.e. it may not have a this pointer<
> It's true regarding stucts used as values too, and not just classes...

It would be nice if the compiler could say so: "I can't evaluate it 
because you are using a this pointer". With other words, but much more 
useful than "non-constant expression".


More information about the Digitalmars-d-learn mailing list