[gnu.g++] how much of C++ 2.0 does g++ support?

andersnb@cmcl2.NYU.EDU (Brian Anderson) (09/15/89)

Can anyone give me a *clear* description of which features of AT&T's C++
2.0 are *not* supported by the current release of g++ (1.35.1-)?  My main
concerns are:

a) can new and delete be overloaded?

b) does new allow user specified placement?

c) are pure virtual functions allowed?

d) can the -> and , operator be overloaded?

e) is type safe linkage supported (i.e. is the overload operator
required)?

Thank you for your help

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Brian G. Anderson                                       |
NYU Ultracomputer Research Project                     |||
715 Broadway  Rm. 1006                                |||||
New York, NY  10003                                   |||||
(212) 998-3346                                     --- //\ ---
arpa:	andersnb@cmcl2                             ----/ \----
uucp:	{ihnp4,seismo}!cmcl2!andersnb              ----   ----

tiemann@SUN.COM (Michael Tiemann) (09/20/89)

   Date: 15 Sep 89 12:00:34 GMT
   From: andersnb@nyu.edu  (Brian Anderson)
   Organization: New York University, Ultracomputer project
   Sender: info-g++-request@prep.ai.mit.edu

   Can anyone give me a *clear* description of which features of AT&T's C++
   2.0 are *not* supported by the current release of g++ (1.35.1-)?  My main
   concerns are:

   a) can new and delete be overloaded?
Yes.

   b) does new allow user specified placement?
Yes, but with a different syntax.  The AT&T syntax is impossible to do
with an LALR grammar.  For GNU C++ you say

	char *p = new { London } char[10];

in AT&T C++ you say

	char *p = new ( London ) char[10];

You could do this in a header file:

#ifdef __GNUG__
#define NEW(WHERE) new { WHERE }
#else
#define NEW(WHERE) new ( WHERE )
#endif

and then say

	char *p = NEW ( London ) char[10];

   c) are pure virtual functions allowed?
Yes.

   d) can the -> and , operator be overloaded?
Yes and no.  You can overload ->, but I have not implemented
overloaded ',' yet.

   e) is type safe linkage supported (i.e. is the overload operator
   required)?
It is supported.  The overload specifier is no longer needed.

   Thank you for your help

   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   Brian G. Anderson                                       |
   NYU Ultracomputer Research Project                     |||
   715 Broadway  Rm. 1006                                |||||
   New York, NY  10003                                   |||||
   (212) 998-3346                                     --- //\ ---
   arpa:	andersnb@cmcl2                             ----/ \----
   uucp:	{ihnp4,seismo}!cmcl2!andersnb              ----   ----

Michael