div0 wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Thanks Simen,
That's nicer than the chained static ifs.
Is there anyway to get rid of the enum though?
Using the enum is a pain as it means you have to edit that import
anytime you need to create a specialistion.
It's nearly
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jason House wrote:
div0 wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Thanks Simen,
That's nicer than the chained static ifs.
Is there anyway to get rid of the enum though?
Using the enum is a pain as it means you have to edit that
div0 wrote:
Thanks Simen,
That's nicer than the chained static ifs.
Is there anyway to get rid of the enum though?
I would believe this to work:
template createHandlerCode( T... ) if ( is( T == msgRangeHdlr ) ) {
string format( ) {
return
div0 wrote:
It seems I might know how to do this after all.
As is mentioned under template constraints[1], templates can be specialized by
trailing the parameter list with a condition:
template createHandlerCode( T... ) if ( T[0]._type ==
EHandlerType.eMsgRangeHdlr ) {
string format( ) {