ref storage class in templates

Regan Heath regan at netmail.co.nz
Wed Apr 16 05:40:17 PDT 2008


Janice Caron wrote:
> How is that a bug? I certainly wouldn't have expected that to compile.
> You can't pass "storage classes" to templates.

I suspect the confusion arises because 'const' is used as both a storage 
class and as a type modifier.

eg.

const int a = 5;  //storage class
void foo(const int a) {} //type modifier

and you can pass type modifiers to templates.

Regan



More information about the Digitalmars-d mailing list