Closed atoader closed 8 years ago
Could you just replace vector<bool>
with vector<char>
?. bool
and char
are binary compatible, but std::vector<char>
is a real vector, whereas std::vector<bool>
is really not.
In case it is important for you to really work with bool
s, then providing a specification for operator<<
should be easy. It is implemented here.
First of all, great work with VexCL! I have been playing with VexCL and I noticed that the following code does not compile:
The compiler prints the following error message:
From what I understand, the overload of operator<< for vex::vector uses a std::vector internally and it uses the data() member of the std::vector to transfer the data. For
std::vector<bool>
the data() member does not exist.I think that the problem could be fixed by providing a specialization of the operator<< for bool. Let me know what you think. I can look into the code and patch it if you think this should be fixed.