[C++] Care operatori nu pot fi supraincarcati (overloaded)?

Despre limbajul de programare C++ si biblioteca standard STL (forum moderat)
Post Reply
User avatar
Ovidiu Cucu
Fondator
Fondator
Posts: 3776
Joined: 11 Jul 2007, 16:10
Judet: Iaşi
Location: Iasi
Contact:

[C++] Care operatori nu pot fi supraincarcati (overloaded)?

Post by Ovidiu Cucu » 16 Jun 2011, 09:38

Intrebare
Care operatori nu pot fi supraincarcati?

Raspuns
Urmatorii operatori nu pot fi supraincarcati:
  • . acces membru clasa (class member access operator);
  • .* pointer la membru (pointer to member operator)
  • :: rezolutie (scope rezolution operator);
  • ?: conditional (conditional expression operator).
Note
  • De asemenea, nu pot fi supraincarcati operatorii de preprocesare ca # si ##.
Vezi si



sopcu
Junior
Junior
Posts: 1
Joined: 06 Jul 2011, 12:02

Care operatori nu pot fi supraincarcati (overloaded)

Post by sopcu » 06 Jul 2011, 12:42

La cei de mai sus, se adauga si operatorul: sizeof.

Post Reply