[cfe-users] Fwd: Warnings for implicit constructors and wrong usage of auto

2018-05-15 Thread Andrea Arteaga via cfe-users
Dear all, Recently, my team suffered from a bug due to a double bad usage of C++. We have a function returning a reference to an object: Object& GetObject(); Sometimes we use this function like this: auto obj = GetObject(); This triggers a copy of the object, which we really don't mean

Re: [cfe-users] [cfe-dev] Warnings for implicit constructors and wrong usage of auto

2018-05-15 Thread Andrea Arteaga via cfe-users
t; cfe-...@lists.llvm.org> wrote: >> >> +cfe-dev >> >> Hi Andrea, >> >> I think you might get more luck asking on the cfe-dev mailing list. >> >> >> George >> >> On May 15, 2018, at 1:15 PM, Andrea Arteaga via cfe-users < >> cfe-u