aaron.ballman added a comment. In https://reviews.llvm.org/D42116#977588, @juliehockett wrote:
> In https://reviews.llvm.org/D42116#977347, @aaron.ballman wrote: > > > Can you give some background on what problem the coding standard is trying > > to avoid by banning this? For instance, if trailing return types are bad, > > are deduced return types similarly bad, or are those fine? > > > The main concern is that of readability. Deduced return types can help > readability, so those are okay (within reason). Thanks for the explanation. I'm a bit worried that this is going to diagnose reasonable C++11 code: template <typename T1, typename T2> auto fn(const T1 &lhs, const T2 &rhs) -> decltype(lhs + rhs) { return lhs + rhs; } Would it be a reasonable exception to the rule to allow a trailing return type so long as it's a `decltype` type specifier? https://reviews.llvm.org/D42116 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits