c++.beta - native typeof?
- "Pavel Vozenilek" <pavel_vozenilek yahoo.co.uk> Dec 31 2006
- Walter Bright <newshound digitalmars.com> Dec 31 2006
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 http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/typeof.html 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). /Pavel
Dec 31 2006








Walter Bright <newshound digitalmars.com>