Timeline for How do you set, clear, and toggle a single bit?
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 29, 2020 at 22:19 | history | edited | Joakim L. Christiansen | CC BY-SA 4.0 |
Improved code
|
Oct 27, 2020 at 23:14 | history | edited | Joakim L. Christiansen | CC BY-SA 4.0 |
deleted 283 characters in body
|
Oct 27, 2020 at 21:44 | history | edited | Joakim L. Christiansen | CC BY-SA 4.0 |
added 498 characters in body
|
Oct 25, 2020 at 21:56 | history | edited | Joakim L. Christiansen | CC BY-SA 4.0 |
Added a version with support for (optionally) multiple bits
|
Oct 25, 2019 at 20:27 | comment | added | pqnet |
use std::bitset in c++11
|
|
Feb 27, 2018 at 20:56 | comment | added | Joakim L. Christiansen |
Thank you for noticing, it was supposed to be ((variable & bits) == bits)
|
|
Feb 27, 2018 at 20:51 | history | edited | Joakim L. Christiansen | CC BY-SA 3.0 |
Fixed test_all()
|
Feb 25, 2018 at 18:25 | comment | added | melpomene |
(variable & bits == bits) ?
|
|
Feb 25, 2018 at 15:51 | comment | added | Joakim L. Christiansen | @melpomene The code is not broken, I did test it. Do you mean that it will not compile or that the result is wrong? About the extra ';' I don't remember, those can be removed indeed. | |
Feb 10, 2018 at 20:11 | comment | added | melpomene |
This code is broken. (Also, why do you have ; after your function definitions?)
|
|
Feb 10, 2018 at 20:07 | history | answered | Joakim L. Christiansen | CC BY-SA 3.0 |