Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | "Richard Smith"<richard@metafoo.co.uk> |
| Newsgroups | comp.std.c++ |
| Subject | Defect report: ref-qualifiers in partial ordering of non-static template operator members and non-members |
| Date | Wed, 19 Oct 2011 15:24:44 -0700 (PDT) |
| Organization | unknown |
| Lines | 27 |
| Sender | std-cpp-request@vandevoorde.com |
| Approved | stephen.clamage@oracle.com |
| Message-ID | <36286.10.0.16.53.1319061850.squirrel@webmail.secure.aluminati.net> (permalink) |
| Reply-To | richard@metafoo.co.uk |
| Content-Type | text/plain;charset=iso-8859-1 |
| X-Trace | news.albasani.net EFgUbYPWhhGalfYihIUosdgQqR9psWamCsBtCWWexfE6IHY8j38bomemK8Z+S0A7MV84QwHWGA48rBFMVW+qtQ== |
| NNTP-Posting-Date | Wed, 19 Oct 2011 22:24:46 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="RJrG162NDp6xeBBtLYlt7+0XVOogSfzKLr3xCyQJc7kmj2e7Zu9IhStwpFf5bb3jUr70Kvl7qV9F5hxr6RH4LOKDdICMWwsl2wvqihXdSfrjgYjKcMOC0Kp9iJK1GWQM"; mail-complaints-to="abuse@albasani.net" |
| X-Mailer | Perl5 Mail::Internet v2.05 |
| X-Submission-Address | std-cpp-submit@vandevoorde.com |
| Cancel-Lock | sha1:x3WEefL+uEDXK0DFqLeiIq9FDxk= |
| X-Original-Date | Wed, 19 Oct 2011 23:04:10 +0100 (BST) |
| Xref | x330-a1.tempe.blueboxinc.net comp.std.c++:330 |
Show key headers only | View raw
Hi, C++11 [temp.func.order]p3 says: "If only one of the function templates is a non-static member, that function template is considered to have a new first parameter inserted in its function parameter list. The new parameter is of type “reference to cv A,” where cv are the cv-qualifiers of the function template (if any) and A is the class of which the function template is a member. [ Note: This allows a non-static member to be ordered with respect to a nonmember function and for the results to be equivalent to the ordering of two equivalent nonmembers. — end note ]" This paragraph does not specify what kind of reference the new parameter should be (and I can't see anywhere else in the standard which specifies this). It seems to me that the standard should specify that the new parameter shall be an rvalue reference if the non-static member function template uses the&& ref-qualifier, and an lvalue reference otherwise. Thanks, Richard -- [ comp.std.c++ is moderated. To submit articles, try posting with your ] [ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next | Find similar
Defect report: ref-qualifiers in partial ordering of non-static template operator members and non-members "Richard Smith"<richard@metafoo.co.uk> - 2011-10-19 15:24 -0700
csiph-web