Boost logo

Boost :

From: Matt Calabrese (rivorus_at_[hidden])
Date: 2006-05-18 17:14:58

On 5/18/06, David Abrahams <dave_at_[hidden]> wrote:
I imagine this sort of usage is pretty common. The problem is that
it's hard to initialize this member efficiently: you have to build and
copy too many compressed_pairs. I propose to extend compressed_pair
with overloaded ctors, as follows:

        first_param_type f
      , typename second_type::first_param_type sf
      , typename second_type::second_param_type ss);

        first_param_type f
      , typename second_type::first_param_type sf
      , typename second_type::second_type::first_param_type ssf
      , typename second_type::second_type::second_param_type sss );



If SFINAE doesn't take out these declarations when the second type is
not a (compressed_)pair, we can always template them.


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?

-Matt Calabrese

Boost list run by bdawes at, gregod at, cpdaniel at, john at