On 19-07-2012 16:36, Christophe Travert wrote:
"Petr Janda" , dans le message (digitalmars.D:172719), a écrit :
Array gets sorted, then doubles are removed (uniq) and then
everything is converted to a string (map).

Everything was recently introduced around 2.059.

Ok, but what is map!(). What's the point of the exclamation mark,
is it a template specialization?

Yes, !(...) is template specialization.
It is the equivalent of <...> in c++.
The parentheses can be omited if only one argument is passed after the
exclamation mark.

map is a template of the std.algorithm module.
http://dlang.org/phobos/std_algorithm.html#map

This kind of questions should go in digitalmars.D.learn.


No, please, template instantiation. Specialization is something completely different, and doesn't happen at the call site.

I don't mean to be overly pedantic, but I think OP has a C++ background or similar, so wrong terminology is not going to be helpful.

--
Alex Rønne Petersen
a...@lycus.org
http://lycus.org

Reply via email to