What is std::pair
for, why would I use it, and what benefits does boost::compressed_pair
bring?
You sometimes need to return 2 values from a function, and it's often overkill to go and create a class just for that.
std:pair comes in handy in those cases.
I think boost:compressed_pair is able to optimize away the members of size 0. Which is mostly useful for heavy template machinery in libraries.
If you do control the types directly, it's irrelevant.