Re: C++ operators in gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux