www.digitalmars.com         C & C++   DMDScript  

c++.beta - native typeof?

reply "Pavel Vozenilek" <pavel_vozenilek yahoo.co.uk> writes:
This is a humble feature request for non-standard C++ extension.

GCC, Metrowerks and Intel on Linux do support "typeof"
as a keyword recognisable by the compiler.

Boost now has a library Boost.Typeof
based upon the keyword or using
workarounds if they keyword is not available
or using compiler bug-features to implement
"typeof" natively on VC++ (up to VC8).

A new library, "scope_exit",  is now proposed
for Boost. The library took and extended the idea
of Alexandresu's ScopeGuard and could
be compared to the D's scope(exit)
(the syntax is not that clean, though).

Should DMC have C++ typeof people
would be able to use scope_exit without
need for manual registration and it would be faster
to compile (I tested it with emulated version
under Windows Intel, it works but so slowly to be unusable).

Dec 31 2006
parent Walter Bright <newshound digitalmars.com> writes:
It's a very good idea.
Dec 31 2006