Draft: Add bool type
This MR adds boolean type to the memory manager. Closes #34
Some facts of the boolean type:
- Fortran default
logicalhas a size of 4 bytes. The Cboolis one byte. -
std::vector<bool>is an experimental feature. All values are stored in one bit, not one byte. https://en.cppreference.com/w/cpp/container/vector_bool.html -
boolis an extension of_Boolin thestdbool.hheader. https://en.cppreference.com/w/c/header/stdbool.html -
stdbool.hwill be deprecated in C++23.bool,true, andfalsewill be predefined types and constants. https://en.cppreference.com/w/c/types.html - Before C++23,
trueandfalseare integers. From C++23, they areboolconstants. https://en.cppreference.com/w/c/language/bool_constant.html
We use int8_t (signed char) to store the boolean values in the backend.
Edited by Yen-Chen Chen