🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Mike Stump Tue, 10 Oct 1995 18:11
class A { A::A(); }; valid?
#2159
Author: Mike Stump
Date: Tue, 10 Oct 1995 18:11
11 lines
688 bytes
Is:

	class A { A::A(); };

valid?  I couldn't find the wording that would prohibit it.
Please cite the draft if you can.

---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Re: class A { A::A(); }; valid?
#2175
Author: Jirtme Desquilbet
Date: Fri, 13 Oct 1995 08:28
25 lines
1265 bytes
After checking the August 1995 C++ ISO Committee Draft, it appears that the
above code is *not* legal, although most compilers accept it.

"8.3 Meaning of declarators

[...] A declarator-id shall be a simple identifier, except for the following
cases: the declaration of some special functions, the definition of a member
function, the definition of a static data member, the declaration of a friend
function that is a member of another class."

So, a declarator-id for a class member *declaration* shall be a simple
identifier.

Well, as long as I my understanding of the CD is correct.

  Jerome.




---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads