Draft: Add bool type
This MR adds boolean type to the memory manager.
Some facts of the boolean type:
- Fortran default
logical
has a size of 4 bytes. The Cbool
is 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 -
bool
is an extension of_Bool
in thestdbool.h
header. https://en.cppreference.com/w/c/header/stdbool.html -
stdbool.h
will be deprecated in C++23.bool
,true
, andfalse
will be predefined types and constants. https://en.cppreference.com/w/c/types.html - Before C++23,
true
andfalse
are integers. From C++23, they arebool
constants. 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