[Issue 3952] pragma(msg,...) has bugs + alternative idea
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Jul 25 10:13:41 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=3952
--- Comment #6 from BCS <shro8822 at vandals.uidaho.edu> 2011-07-25 10:13:37 PDT ---
I don't have a github account so I'll comment here: There is use for ways to
create output at runtime, CTFE time and static expansion time. For instance
this function:
int TemplateCTFE(T...)(int j) {
  for (int i = 0; i < j; i++) {
    foreach(t; T) {
      pragma(msg, t.stringof);
    }
  }
}
When called like this from a CTFE context:
TemplateCTFE!(int, char, float)(5);
will only print "int\nchar\float" once rather than 5 times. IMHO this
static-expansion-time ouput is more valuable than a CTFE time output (that
would output 15 line from that call). OTOH, having both would be really nice.
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list