CFront problemsbool type |
bool
type. This has been worked around by providing a supplementary "bool.h"
header which typedefs bool
as int
.
Whilst this is a workable solution to the problem in most cases, it is impossible to overload functions or parameterize template classes in a way which distinguishes bool
from int
. This is most obvious in the stream classes - where the member functions operator<<(ostream const&, bool)
and operator>>(istream const&, bool&)
have had to be omitted - and in the implementation of the template class specialization vector<bool>
- which has been replaced with a non-template class vector_bool
.
It may be possible to define a bool
class to overcome these restrictions.