Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-05-30 16:07:48


From: Douglas Gregor <gregod_at_[hidden]>
> On Wednesday 30 May 2001 03:04 pm, you wrote:
> > > > if (allow_typeof) {
> > > > typespec = TYPEOF '(' expr ')' | TYPEOF '(' type_id ')';
> > > > }
> >
> > <offtopic>
> >
> > BTW, I'd love to have typeof. I read somewhere that there
> > was a way to simulate this. Any info?
>
> The only solution I've seen for this was proposed by Bill Gibbons, but it
> required types to be registered first - making it completely useless for
> generic programming where typeof would be most useful.
>
> > I'd also love to have: auto var = <expression>
>
> That'd be nice, too, but the incompatibility with C will likely hinder it.
> The nice thing about typeof() is that it fits into the language easily and
> most people agree on the semantics of it.
>
> > I hear CW6 and G++3 has typeof. Correct me if I'm wrong.
>
> Yes, g++ 3.0 will have typeof.
>
> > It is not standard but Andrei told me it has a very big chance
> > to be standard. So, can we simulate: auto var = <expression>
> > with typeof?
>
> typeof(expression) var = expression;
>
> ... but it's a real pain to type :).

Hasn't C eliminated or at least deprecated implicit int?

In which case, can't the suntax just be

   var = expression;

?

> > </offtopic>
> >
> > Joel de Guzman
>
> Doug
>
> To unsubscribe, send email to: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk