CTFE determination?

bmeck bmeck at stedwards.edu
Fri Sep 12 14:14:04 PDT 2008


Well if it is available at CTFE I want to hash out as much as possible calculations and store the result, if its not, dont mess with the data and send it to a functions that does the same calculations and stores the result at run time but in a different manner, namely allowing pointers heap etc.

IE: if args = ["\w+$"] // gets last word

auto reg1 = Regex("\w+$"); // woot got enough to make the struct at Compile time , use structs as needed and hard code that sucker!
auto reg2 = Regex(args[0]); // uh oh, dont know at compile time, leave it to a run time call and use pointers and heap as needed!




More information about the Digitalmars-d mailing list