
Howard Hinnant wrote:
On May 18, 2006, at 5:14 PM, Matt Calabrese wrote:
SFINAE would not come into play with just overloaded constructors, regardless of the fact that they are constructors of a template instantiation. The constructors would have to be templates themselves. Correct me if I'm missing something, but would it not be better to just have a compressed_tuple template, or are there reasons I am missing?
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).
boost::bind( f, _1, _2, _3, _4, _5 ) has five empty members. :-)