There is no ostream<< for uint8_t. Therefore, the compiler picks some of the existing overloads. Perhaps
Easy to test. What does
uint8_t num8 = 'r'; print with stream?
Explicit casting of num8 to (larger) numeric type would guide the selection of the <<.
Thank you keskiverto, explicit casting worked.
uint8_t num8 = 8;
std::cout << "start>>" << (int)num8 << "<<end" << std::endl;
Last edited on