On Wednesday, 21 October 2015 at 14:27:45 UTC, Shriramana Sharma wrote:
John Colvin wrote:

It might be better to ask in http://forum.dlang.org/group/learn first for these sort of questions.

I didn't do that only because it concerns implemental details of Phobos which didn't seem to be learner material. I have just now separately posted an actual "I don't know why this doesn't work" question over there. I do use both fora for different things.

One reason is that it interacts with constructs like std.meta.staticMap, e.g.

alias constTypes(T ...) = staticMap!(ConstOf, T);

But even then it's enough if these are marked `package`, no?

No, I meant that as an example of user code, not necessarily something in phobos.

It's just a convenience. Sure, the user could write

alias constOf(T) = const(T);

themselves, but for better or worse, it's in std.traits so they don't have to.

Reply via email to