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

div0 div0 at users.sourceforge.net
Sun May 17 10:23:49 PDT 2009


-----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 import
>> anytime you need to create a specialistion.
> 
> It's nearly impossible to answer your question without knowing what you're 
> trying to achieve.  For example, you're specializing on T... which means 
> there are more template arguments.  Is there anything differentiating the 
> cases in those?  Another candidate is a class hierarchy (or use of an 
> interface) where createHandlerCode is defined in the base definition, and 
> each inheriting class overrides the method.
> 
I've just reread it and realised I deleted too much stuff for anybody to
get what I was after. doh.

But as per usual, I thought of a much easier way to do it about 10
minutes after I asked the question.

Thanks for your responses though! :)

- --
My enormous talent is exceeded only by my outrageous laziness.
http://www.ssTk.co.uk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKEEglT9LetA9XoXwRAt+wAJ9tdu/LdSan1W4+YPNtFRs9BcCATgCfTBIQ
M+um8KGHgwngYTkQIvv1OGA=
=tXiu
-----END PGP SIGNATURE-----


More information about the Digitalmars-d-learn mailing list