- Title
- Literal operators and default arguments
- Status
- cd3
- Section
- 12.6 [over.literal]
- Submitter
- Jason Merrill
Created on 2012-03-13.00:00:00 last changed 152 months ago
Messages
Date: 2013-04-15.00:00:00
[Moved to DR at the April, 2013 meeting.]
Date: 2012-10-15.00:00:00
Proposed resolution (October, 2012): Change 12.6 [over.literal] paragraph 3 as follows: The declaration of a literal operator shall have a
parameter-declaration-clause equivalent to one of the
following: ... If a parameter has a default argument (9.3.4.7 [dcl.fct.default]), the program is ill-formed.
Date: 2012-03-13.00:00:00
It appears that an example like is ambiguous: although only the second declaration is a raw literal
operator, the corresponding call could match either declaration. Should default arguments for
literal operators be prohibited?
int operator"" _a (const char *, std::size_t = 0);
int operator"" _a (const char *);
int i = 123_a;
operator"" _a ("123")
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
| 2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
| 2013-05-03 00:00:00 | admin | set | messages: + msg4424 |
| 2013-05-03 00:00:00 | admin | set | status: ready -> dr |
| 2012-11-03 00:00:00 | admin | set | messages: + msg4068 |
| 2012-11-03 00:00:00 | admin | set | status: open -> ready |
| 2012-03-13 00:00:00 | admin | create | |