You can't have a type whose size isn't a multiple of bytes - so creating a 10-bit datatype is a nonstarter.
You can create a type which represents entities that contain 10 bits though: whether using std::bitset<10>
or using a 10-bit bitfield in a 16-bit type:
struct uint10_t {
uint16_t value : 10;
uint16_t _ : 6;
};
In both cases, the type itself will be larger than 10 bits. So you wouldn't be able to create an array of 8 of them to fit into 10 bytes, for instance.