While replacing C constants with C++ equivalents I ran into the problem where I assumed all chars were numerically the same, such that C's CHAR_BIT is 8 while C++'s std::numeric_limits<char>::digits gives me 7.
I then went down the rabbit hole of trying to shift types around until I get an 8 from numeric_limits. std::uint8_t seems like a decent candidate.
I was met by a whole bunch of compiler complaints about my chosen type not fitting an existing type covered by std::char_traits.
Do I just plow through with a magic 8 in my code? Is it wrong to assume char has eight digits?
Am I supposed to use a different streaming class from std::basic_iostream? I just want to read in bytes and treat them like eight bits data morsels without the compiler yelling at me and without using magic numbers. Is my understanding of C++ completely broken?