Boost logo

Boost :

From: John Max Skaller (skaller_at_[hidden])
Date: 2001-05-29 11:09:08

joel de guzman wrote:

> > > auto rule = a | b >> c;
> >
> > That sucks. Why should inference
> > be restricted to auto storage class?
> It is not. You can use it for function arguments etc.
> It just 'overloading' the almost unused 'auto' keyword
> instead of adding another.
        I use the auto keyword sometimes.
I use it so I can see variable declarations.

> I think it is ok, IMO. We never use the 'auto' anymore.
> It should be deprecated and the new meaning
> replace the old.

        You can't do that. You can _ban_ the old use,
but deprecation implies that support continues.
If 'implicit int' is banned (rather than deprecated),

        auto x = 1;

is problematic: what if 'x' is a typename? But:

        int x = 1; // only a syntax error if x is
                   // declared in the same block

> > > Does anyone have a better way of doing this?
> >
> > dcl x = expr;

> What makes this better?

It doesn't change the existing meaning of 'auto'.

John (Max) Skaller, mailto:skaller_at_[hidden]
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper
download Interscript

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