id summary reporter owner description type status milestone component version severity resolution keywords cc 7659 sizeof(tribool) > sizeof(bool) * 2 anonymous James E. King, III "I was wondering why tribool is 4 times larger than a simple bool (tested with msvc10 in 32bit and g++ 4.6.2 on 64bit). By looking at the sourcecode I am suspecting the internal enum always gets compiled as a 4byte int. When using the similar boost::optional I get at least as good as the naive implementation using two bools, but actually I was expecting a class tribool to be sizeof(bool) *and* encode the third value in the 7 unused bits of the single bool member field. If this has been a design decision I think this is a decision that should be documented." Bugs closed To Be Determined logic Boost 1.52.0 Optimization wontfix