alias = compile-time variants?

Jason Spencer spencer8 at sbcglobal.net
Thu Jul 29 13:40:46 PDT 2010


In writing templates that make heavy use of alias parameters, does
anyone else feel uneasy about whether the caller will pass a type, a
value, or a schmoo?  I'm having a hard time getting my head around
how wide-open aliases are and trying to resist the urge to put in
thousands of static asserts to check what should be invariants on
the kind of thing that can be passed in that position.  This all
feels very strange when I typically look for templates to provide
that nice, static, compile-time safety that keeps me from having to
check everything that gets passed.  Any words of wisdom on adjusting
to this feature?

Thanx,
Jason


More information about the Digitalmars-d-learn mailing list