◐ Shell
clean mode source ↗

std::vector<bool>::reference — cppreference.com

De cppreference.com

<metanoindex/>

template <class Allocator>
class vector<bool, Allocator> {
  // ...
  public:
    class reference {
        friend class vector;
        reference();
      public:
        ~reference();
        operator bool() const;
        reference& operator=(bool x);
        reference& operator=(const reference&);
        void flip();
    };
  // ...
};

La spécialisation std::vector<bool> définit std::vector<bool>::reference comme une classe imbriquée accessible au public. std::vector<bool>::reference mandataires du comportement de références à un seul bit dans std::vector<bool> .

Original:

The std::vector<bool> specialization defines std::vector<bool>::reference as a publicly-accessible nested class. std::vector<bool>::reference proxies the behavior of references to a single bit in std::vector<bool>.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

  • operator bool renvoie true lorsque le bit est activé .

    Original:

    operator bool returns true when the bit is set.

    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

  • Les opérateurs d'affectation définir et effacer le bit de donnée .

    Original:

    The assignment operators set and clear the given bit.

    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

  • flip inverse l'état du bit .

    Original:

    flip inverts the state of the bit.

    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.

Voir aussi

accède à l'élément spécifié
(fonction membre publique de std::vector) [edit]