mirror of
https://github.com/libretro/cpp-cheat.git
synced 2025-04-12 08:14:07 +00:00
20 lines
369 B
C++
20 lines
369 B
C++
#include "common.hpp"
|
|
|
|
int main() {
|
|
// String init.
|
|
{
|
|
// Basic.
|
|
{
|
|
std::bitset<4> s("1010");
|
|
std::cout << s << std::endl;
|
|
assert(!s[0]);
|
|
}
|
|
|
|
// Missing bits: MSB filled with zeroes.
|
|
{
|
|
std::bitset<4> s("10");
|
|
assert(s == std::bitset<4>("0010"));
|
|
}
|
|
}
|
|
}
|