On Wednesday, 20 November 2013 at 23:35:02 UTC, Meta wrote:
Something that's almost exactly what you're looking for:

http://dlang.org/phobos/std_typecons.html#.wrap
http://dlang.org/phobos/std_typecons.html#.unwrap

Wrong-wrong-wrong! `wrap` is different, though with some implementation similarities. First, it only works on polymorphic types. Second, it actually creates a wrapper type while point of typical `implements!(T, I)` is duck typing verification as-is in templated code. It is basically a more generic form of `isXXXRange`.

Reply via email to