Learn C++ STL

Lesson 2 of 9 · bitset and Bit Tricks: Sixty-Four Booleans in One Word

Module 15 · bitset and Bit Tricks: Sixty-Four Booleans in One Word

Every bitset Operation, One by One, With Its Cost

Free with an accountReading

David has three snapshots of a relay board. He needs changes at both boundaries, not just a comparison of endpoints. First he checks what each operation actually promises. This lesson is that small toolbox, with costs beside the calls.

Checking what this lesson needs for you…

What is inside Every bitset Operation, One by One, With Its Cost

  1. Construction
  2. size
  3. set
  4. reset
  5. flip
  6. test and subscript
  7. count
  8. any
  9. none
  10. all
  11. Left shift
  12. Right shift
  13. Bitwise AND
  14. Bitwise OR
  15. Bitwise XOR
  16. Complement
  17. to_string
  18. to_ulong and to_ullong
  19. Equality