On Wed, 2015-01-21 at 11:36 +0100, François Legendre wrote:
> Hi,
> 
> For range based loop, why not use the name of the element (and not the 
> indice) ?
> 
> -    for(unsigned i = 0; i < names.size(); i++)
> -      std::cout << names[i] << "." << std::endl;
> +    for(const auto& i : names)
> +      std::cout << i << "." << std::endl;
> 
> +    for(const auto& name : names)
> +      std::cout << name << "." << std::endl;

Yes, of course. I might have done that via a regex or put my own brain
on automatic. Patches are welcome.

-- 
Murray Cumming
murr...@murrayc.com
www.murrayc.com


_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to