A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/reference/bitset/bitset/reference/ below:

public member class

<bitset>

std::bitset::reference

Reference-like type

This embedded class is the type returned by bitset::operator[] when applied to non const-qualified bitset objects. It accesses individual bits with an interface that emulates a reference to a bool.

Its prototype is:


1
2
3
4
5
6
7
8
9
10
11
class bitset::reference {
  friend class bitset;
  reference();                                        // no public constructor
public:
  ~reference();
  operator bool() const;                              // convert to bool
  reference& operator= (bool x);                      // assign bool
  reference& operator= (const reference& x);          // assign bit
  reference& flip();                                  // flip bit value
  bool operator~() const;                             // return inverse value
}
1
2
3
4
5
6
7
8
9
10
11
class bitset::reference {
  friend class bitset;
  reference() noexcept;                               // no public constructor
public:
  ~reference();
  operator bool() const noexcept;                     // convert to bool
  reference& operator= (bool x) noexcept;             // assign bool
  reference& operator= (const reference& x) noexcept; // assign bit
  reference& flip() noexcept;                         // flip bit value
  bool operator~() const noexcept;                    // return inverse value
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4