
On 5/18/06, Howard Hinnant <hinnant@twcny.rr.com> wrote: Actually you don't even need a new type compressed_tuple. You could put this functionality straight into tuple. It'd be a royal pain to do for tuple sizes greater than 3 or 4 though. Dave, how many empty members do you find yourself glomming together? I often have several potentially empty members but usually have at least that many non- empty members to spread them around on (I have one example where wanted to glom two empty members onto a non-empty member). True, though one [potential] problem with that would be that compressed pairs and tuples are allowed to share storage for empty types, whereas a regular tuple, as far as I know, currently allows users to assume a separate storage location for each element. This could pose a problem in the rare yet valid case that programmers compare pointers to the instances or if they use the address of the object as a unique identifier for the instance. Then again, I doubt that would impact much, if any users' code, so tuple could be adapted without much problem. Either way, I definately agree that some form of tuple with optimized storage would be a great addition to boost. -- -Matt Calabrese