[PATCH] D30547: [clang-tidy] Forwarding reference overload in constructors
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 13 04:47:50 PDT 2017
aaron.ballman added inline comments.
Comment at: clang-tidy/misc/MiscTidyModule.cpp:70
> malcolm.parsons wrote:
> > aaron.ballman wrote:
> > > leanil wrote:
> > > > aaron.ballman wrote:
> > > > > I wonder if the name might be slightly misleading -- I've always understood these to be universal references rather than forwarding references. I don't have the Meyers book in front of me -- what nomenclature does he use?
> > > > >
> > > > > Once we pick the name, we should use it consistently in the source code (like the file name for the check and the check name), the documentation, and the release notes.
> > > > Meyers calls them universal references, but it's //forwarding reference// in the standard (220.127.116.11).
> > > Hmm, the terms are a bit too new to really get a good idea from google's ngram viewer, but the search result counts are:
> > >
> > > Google:
> > > "universal reference" : 270,000
> > > "forwarding reference" : 9650
> > >
> > > Stack Overflow:
> > > universal reference : 3016
> > > forwarding reference: 1654
> > >
> > > So I think that these are probably more well-known as universal references, despite the standard's nomenclature being forwarding reference.
> > The Q&A section in https://isocpp.org/files/papers/N4164.pdf explains why "universal reference" is a bad name.
> I think in a compiler related project at least in the source code we should stick the the standard's nomenclature. In the documentation, however, it is worth to mention that, this very same thing is called universal reference by Scott Meyers.
Okay, I'm convinced enough that "forward reference" is okay. :-)
More information about the cfe-commits