Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-01-21 13:03:43

----- Original Message -----
From: "Jaakko Jarvi" <jajarvi_at_[hidden]>
To: "boost" <boost_at_[hidden]>
Sent: Monday, January 21, 2002 12:50 PM
Subject: Re: [boost] tuple constructors

> On Thu, 17 Jan 2002, David Abrahams wrote:
> > I notice that if I declare a tuple type with
> >
> > tuple<T1, T2, T3...>::inherited
> >
> > that I cannot construct it unless I provide all the paramters
explicitly, as
> > I can when inherited is omitted. Would that be hard to fix?
> >
> Default arguments do not help (the cons constructor is a member template)
> so it would require writing a separate constructor for each argument
> length.
> I can go ahead and do that, if the feature is considerd useful ?

I'm not sure that it's really useful. I like to use ::inherited (btw, that's
an implementation detail; I think it should be called "::type") because I
don't like long strings of default args in my error messages. Maybe that's
just something for compiler writers to improve. It's plausible that
tuple<...> is even less taxing on a compiler than tuple<...>::inherited,
since less recursion is exposed, so I wouldn't push for this change.


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