C++ operators in gcc
Ingo Krabbe
ikrabbe.ask@web.de
Mon Sep 26 18:40:00 GMT 2005
Cool Idea.
BYE INGO
Am Montag, 26. September 2005 13:19 schrieb John Love-Jensen:
> Hi Tommy,
>
> In C++, every class some freebies. If you write this...
>
> class Foo
> {
> };
>
> ...the compiler generates this...
>
> class Foo
> {
> public:
> Foo();
> Foo(Foo const&);
> ~Foo();
> Foo& operator = (Foo const&);
> Foo* operator & ();
> Foo const* operator & () const;
> };
>
> (I presume the definitions of these methods are obvious.)
>
> If you don't want the compiler to generate one-or-more of those functions,
> you could explicitly declare them in a private section, and leave them
> unimplemented.
>
> HTH,
> --Eljay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20050926/7d0ea802/attachment-0001.sig>
More information about the Gcc-help
mailing list