[Development] RFC: more liberal 'auto' rules?

Marc Mutz marc.mutz at kdab.com
Wed Dec 9 16:32:34 CET 2015


On Wednesday 09 December 2015 14:15:47 Bubke Marco wrote:
> for (auto &&value : values)

This is ok in generic code.

In non-generic code, I think it's too clever.

In general, I would always try to preserve which kind of type we're dealing 
with:

   const auto *e =
   auto e* =
   const auto &e =
   auto &e =
   auto e =
   const auto e =

But that's just the level of auto that _I_ feel comfortable with. YMMV.

Thanks,
Marc

-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt Experts



More information about the Development mailing list