On Thursday, 28 March 2013 at 22:04:36 UTC, Timon Gehr wrote:
- Copypasta & edit instead of string mixins / static foreach.

Part of why I did it this way was the annoyance that I can't do a variadic template in an interface. I'd REALLY prefer to do it that way so there wouldn't be a list of types at all - just plain to!string(foo).

The actual line in the program is a little longer too more like this:

if(arg == typeid(string) || arg == typeid(immutable(string)) || arg == typeid(const(string)))

It annoyed me that there's so many different typeids even though it really doesn't matter for me here. But oh well, I got this code to a point where it works (with a few practices I keep in mind) and now I generally don't think about it anymore.

Reply via email to