[Issue 9835] DynamicArrayTypeOf and isDynamicArray work inconsistently
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 30 07:12:24 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9835
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> 2013-03-30 07:12:21 PDT ---
Current behavior is completely intended, so it's not a bug.
In old days, I thought that std.traits.isSomething should consider alias this
types. That was necessary for std.format and std.conv implementation. For the
purpose I added std.traits.SomethingTypeOf, and used them as the implementation
of isSomething.
https://github.com/D-Programming-Language/phobos/pull/488
But, the change of isSomething's behavior had been complained as a bug by some
peoples. They said "isDymanicArray!T should be true if and only if T is
actually a dynamic array type. If T is a struct with alias this, it should
return false".
I finally agreed with that and reverted the behavior.
https://github.com/D-Programming-Language/phobos/pull/976
Now, std.format and std.conv uses is(SomethingTypeOf!T).
Furthermore, SomethingTypeOf is now *undocumented* templates, so their
specifications are "as-is". (But considering "alias this" type is sometimes
useful, so they are not marked wit "package".)
If you really need SomethingTypeOf, please open an enhancement that they should
be *documented*.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list