This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: wish: generation of type annotation for C++11 code.
On Sat, Nov 12, 2011 at 8:52 AM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> Actually in our case (as you know) we have SCARY iterators, so
> multimap::iterator is a typedef, and the actual type is
> std::_Rb_tree_iterator<std::pair<const Foo, Bar>> which is even less
> useful to know!
Exactly. One of the key reasons why we added "auto" to C++11
was NOT to mimic Hindley-Milner systems. It was to abstract over
this type of noise. People should not use "auto" just because they can,
or because it vaguely looks like something from a previously known
programming language, or because it is the new kid on the block.