Title
Reserved identifier used in literal-operator-id example
Status
c++14
Section
12.6 [over.literal]
Submitter
Switzerland

Created on 2013-09-23.00:00:00 last changed 121 months ago

Messages

Date: 2014-02-15.00:00:00

[Moved to DR at the February, 2014 meeting.]

Date: 2014-02-15.00:00:00

Rationale (February, 2014):

The specification was removed from the WP and moved into a Technical Specification.

Date: 2013-09-15.00:00:00

Proposed resolution (September, 2013):

Change the example in 12.6 [over.literal] paragraph 8 as follows:

  void operator "" _km(long double);                     // OK
  string operator "" _i18n(const char*, std::size_t);    // OK
  template <char...> double operator "" _\u03C0();       // OK: UCN for lowercase pi
  float operator ""_E(const char*);                      // OK
  float operator ""E(const char*);                       // error: reserved identifier
  float operator " " B(const char*);                     // error: non-empty string-literal
  string operator "" 5X(const char*, std::size_t);       // error: invalid literal suffix identifier
  double operator "" _miles(double);                     // error: invalid parameter-declaration-clause
  template <char...> int operator "" _j(const char*);    // error: invalid parameter-declaration-clause
Date: 2013-09-23.00:00:00
N3690 comment CH 6

The example in 12.6 [over.literal] paragraph 8 contains the line

  float operator ""E(const char*); // OK

E does not begin with an underscore and thus is a reserved name.

History
Date User Action Args
2014-11-24 00:00:00adminsetstatus: dr -> c++14
2014-03-03 00:00:00adminsetmessages: + msg4965
2014-03-03 00:00:00adminsetmessages: + msg4964
2014-03-03 00:00:00adminsetstatus: ready -> dr
2013-10-14 00:00:00adminsetmessages: + msg4602
2013-09-23 00:00:00admincreate