Created on2000-01-11.00:00:00 last changed275 months ago
Proposed resolution (10/00):
Add to 11.4 [class.mem] paragraph 13
- every member function of classT [Note: thisrestriction does not apply to constructors, which do not have names(11.4.5 [class.ctor]). ];
immediately following the line
- every data member of classT;
Change 11.4.5 [class.ctor] paragraph 1 from
A special declarator syntax using an optionalfunction-specifier (9.2.3 [dcl.fct.spec])...
to
A special declarator syntax using an optional sequence offunction-specifiers (9.2.3 [dcl.fct.spec])...
According to 11.4.5 [class.ctor]paragraph1, the syntax used in declaring a constructor allows at most onefunction-specifier. It is thus not permitted to declare aconstructor bothinline andexplicit. This seemsoverly restrictive.
On a related note, there doesn't seem to be any explicitprohibition against member functions with the same name as the class.(Such a prohibition might reasonably be expected to occur in11.4 [class.mem] paragraph 13, but memberfunctions are not listed there.)
One possible interpretation would be that such member functionswould violate the restrictions in6.4.7 [basic.scope.class] paragraph 1,because the class name would refer to the class at some points in theclass scope and to the member function at others. However, this seemsa bit tenuous. Is an explicit prohibition needed?
(See alsoissue 147.)

| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2003-04-25 00:00:00 | admin | set | status: dr -> tc1 |
| 2000-11-18 00:00:00 | admin | set | status: ready -> dr |
| 2000-05-21 00:00:00 | admin | set | messages: +msg314 |
| 2000-05-21 00:00:00 | admin | set | status: open -> ready |
| 2000-01-11 00:00:00 | admin | create | |