Title
Specifications for operator-function-id that should also apply to literal-operator-id
Status
cd2
Section
6.1 [basic.pre]
Submitter
Daveed Vandevoorde

Created on 2008-09-19.00:00:00 last changed 178 months ago

Messages

Date: 2009-10-15.00:00:00

[Voted into WP at October, 2009 meeting.]

Date: 2009-06-15.00:00:00

Proposed resolution (June, 2009):

  1. Change 6.1 [basic.pre] paragraph 4 as follows:

  2. A name is a use of an identifier (5.10 [lex.name]), operator-function-id (12.4 [over.oper]), literal-operator-id (12.6 [over.literal]), conversion-function-id (11.4.8.3 [class.conv.fct]), or template-id (13.3 [temp.names]) that denotes an entity or label (8.7.6 [stmt.goto], 8.2 [stmt.label]).
  3. Change _N4567_.5.1.1 [expr.prim.general] paragraph 3 as follows:

  4. The operator :: followed by an identifier, a qualified-id, or an operator-function-id, or a literal-operator-id is a primary-expression. Its type is specified by the declaration of the identifier, qualified-id, or operator-function-id, or literal-operator-id. The result is the entity denoted by the identifier, qualified-id, or operator-function-id, or literal-operator-id. The result is an lvalue if the entity is a function or variable. The identifier, qualified-id, or operator-function-id, or literal-operator-id shall have global namespace scope or be visible in global scope because of a using-directive (9.8.4 [namespace.udir])...
  5. Add the following production to the grammar for qualified-id in _N4567_.5.1.1 [expr.prim.general] paragraph 7:

    • qualified-id:
        ::opt nested-name-specifier templateopt unqualified-id
        :: identifier
        :: operator-function-id
        :: literal-operator-id
        :: template-id
  6. Add the following production to the grammar for template-id in 13.3 [temp.names] paragraph 1:

    • template-id:
        simple-template-id
        operator-function-id < template-argument-listopt >
        literal-operator-id < template-argument-listopt >
  7. Change 13.3 [temp.names] paragraph 3 as follows:

  8. After name lookup (6.5 [basic.lookup]) finds that a name is a template-name, or that an operator-function-id or a literal-operator-id refers to a set of overloaded functions any member of which is a function template...
  9. Change 13.6 [temp.type] bullet 1.1 as follows:

    • their template-names, or operator-function-ids, or literal-operator-ids refer to the same template, and

Date: 2022-02-18.07:47:23

When user-defined literals were added, a new form of operator function was created. Presumably many of the existing specifications that deal with operator-function-ids (the definition of name, for instance, in paragraph 4 of 6.1 [basic.pre]) should also apply to literal-operator-ids.

History
Date User Action Args
2010-03-29 00:00:00adminsetstatus: dr -> cd2
2009-11-08 00:00:00adminsetmessages: + msg2421
2009-11-08 00:00:00adminsetstatus: ready -> dr
2009-08-03 00:00:00adminsetstatus: review -> ready
2009-06-19 00:00:00adminsetmessages: + msg2036
2009-06-19 00:00:00adminsetstatus: drafting -> review
2009-03-23 00:00:00adminsetstatus: open -> drafting
2008-09-19 00:00:00admincreate