-
bool은 왜 1비트가 아닌 1바이트인가프로그래밍/c++ 2018. 2. 9. 16:13반응형
Because every C++ data Because every C++ data type must be addressable.
https://stackoverflow.com/questions/2064550/c-why-bool-is-8-bits-long
가장 심플하고 좋은 대답인 듯 ~~??
하지만 bool 벡터(std::vector<bool>)의 경우는 비트로 특수화 되어있다.
반응형'프로그래밍 > c++' 카테고리의 다른 글
std::array와 c array는 다르다? (0) 2018.03.11 const std::string& 대신 std::string_view (0) 2018.02.20 c++에서 리플렉션 흉내내기 (0) 2018.01.03 asio 기반으로 라이브러리 프로토타입을 만들었다. (0) 2017.12.24 구글 플랫버퍼(flatbuffers) 맛보기 in c++ (1) 2017.11.30