Boost logo

Boost :

From: Jason Shirk (jasonsh_at_[hidden])
Date: 2002-03-24 23:50:54

> -----Original Message-----
> From: Aleksey Gurtovoy [mailto:agurtovoy_at_[hidden]]
> Jason Shirk wrote:
> > Actually, it can, but only under -Za. The problem is our
> > "extension" to not need typename.
> >
> > Considering how often I see typename in Boost, I often wonder if
> > "nontypename" would have been more appropriate.
> IMO a separate flag for the extension is a must.
> > At any rate, disabling this "extension" will definitely cause our
> > customers headaches.
> Actually, for us it's the other way around. Your compiler may allow
> programmers to get away with missing typenames, but others don't, and
> means that we are going to have constant troubles because somebody
> in something that cannot be compiled on another platform. Of course,
if we
> would be able to disable the extension without affecting anything
> that
> would solve the issue.

Yep, I'm well aware of that. This is my primary argument for solving
our problem. The constructs we can't compile because of this
"extension" are really a lesser argument IMO.

> > I've only seen a few rare cases (like
> > this) where we fail to compile legal code because of this.
> Hhmm.. are these cases resolvable? If it is so, it would mean that
> 'typename' qualification of dependent names is unnecessary from
> implementation point of view, and we could declare the requirement
> obsolete
> :).

Sure would be nice if it were so. I don't think it is though.

> >
> > Is anyone aware of any compelling reason why a construct like this
> > critical? Keep in mind the poor maintenance programmer that is not
> > expert in templates and doesn't have my email address.
> With proper diagnostics missing typenames shouldn't be a problem even
> a
> maintenance programmer - an error would just say this explicitly -
> "missing
> typename in ...".

I wish it were that easy. Maybe it is, but it will take some thought.

A switch (and the obligatory pragma) is probably our path of least
resistance, but QA hates switches, they always mumble something about
the combinatorial explosion of the test matrix :).

Jason Shirk
VC++ Compiler Team

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