I have the following code:
ostream.write(reinterpret_cast<const char*>(&bone.parent_index), sizeof(bone.parent_index));
Now this is a lot of code for something that should be fairly straightforward and simple. I'm wondering if there exists a way to write functionally the same thing with less code; it'd be preferable to have an interface like this:
ostream.write(bone.parent_index);
I'm open to any solution within the C++11 standard library or boost.