Le mer. 31 mars 2010 à 12:02:50 (+0200), Oscar Lazzarino a écrit:
> It seems to me that "auto" is the sort of feature that
> should be implemented in an IDE, just to make you type faster.
I think it's not only that. It can be useful to declare objects
for which it's hard to know the type without having a deep knowledge of
the library you are using. E.g:
auto foo = boost::bind(&weirdo_function, _2, _1, weirdo_object);
The type of foo is the type of the particular function template version
of boost::bind that matches the arguments above. If the argument are
template instantiations themselves, you can have some headache
determining the type of foo. I would believe the auto type specifier
can greatly help there. Incidentally, the new decltype operator can help
in similar situations to infer the type of expressions.
I wouldn't be so quick in asserting that those are
"just to make you type faster".
Dodji
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list