r/ProgrammerHumor • • 16d ago

Meme cppAndItsVectorBooleans

Post image
3.4k Upvotes

214 comments sorted by

View all comments

Show parent comment

6

u/That-Cpp-Girl 16d ago

template <typename T>

class CoolerVector : public std::vector<T> { using std::vector<T>::vector; };

template <>

class CoolerVector<bool> : public std::vector<uint8_t> { using std::vector<uint8_t>::vector; };

1

u/dedservice 11d ago

Yeah I know there are workarounds but there just shouldn't have to be.