Re: Partial specialisation: howto? (in the right news group this time. *sigh*)

2009-05-17 Thread Jason House
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

Re: Partial specialisation: howto? (in the right news group this time. *sigh*)

2009-05-17 Thread div0
-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

Re: Partial specialisation: howto? (in the right news group this time. *sigh*)

2009-05-17 Thread Simen Kjaeraas
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

Re: Partial specialisation: howto? (in the right news group this time. *sigh*)

2009-05-16 Thread Simen Kjaeraas
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( ) {