how to shorten templates structs name?
Ali Çehreli
acehreli at yahoo.com
Tue Oct 10 20:40:23 UTC 2017
On 10/10/2017 04:30 AM, drug wrote:
> using classes I can make an inherited class of templated class and avoid
> too long mangled name:
> ```
> class TemplatedClass(A, Very, Much, Args, Here) { ... }
>
> class ShortenClass : TemplatedClass!(A,Very, Much, Args, Here) { ... };
> ```
> Now ShortenClass has a nice mangling.
>
> What can be done in case of struct?
I think an alias is more suitable here for both classes and structs:
alias ShortenClass = TemplatedClass!(int,bool, float, ubyte, string);
Ali
More information about the Digitalmars-d-learn
mailing list