Identifier right after a template Type

Puneet Goel puneet at coverify.com
Thu Jun 22 07:56:22 UTC 2023


It becomes an issue when the string passed to the template is 
actually meant to be a pseudo-code (to be parsed at compile-time):

```D
class Foo {
   int bar;

   Predicate! q{
     bar < 42;
   }b_pred;

   Predicate! q{
     bar > 0;
   }c_pred;
}
```

This becomes confusing since the user's intention is to declare a 
predicate named c_pred. But the D compiler actually parses that 
as _pred;


More information about the Digitalmars-d mailing list