On 8/6/12 3:11 PM, Jacob Carlborg wrote:
On 6 aug 2012, at 20:55, Andrei Alexandrescu wrote:
Consider:
auto s = "some string";
static assert(!hasLength(typeof(s));
auto m = map!(a => a)(s);
static assert(!hasLength(typeof(s));
Do you mean:
static assert(!hasLength(typeof(m)));
For the second assert?
Yes, apologies. Essentially mapping a function over characters in a
string should not automagically define a length property.
Andrei
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos