Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2007-05-24 09:48:57

"Giovanni Piero Deretta" <gpderetta_at_[hidden]> wrote

> This works though (at least with gcc 4.1.2):
> #include <vector>
> template<typename T>
> struct identity {
> typedef T type;
> };
> int main() {
> std::vector<int> v;
> typedef identity<typeof(v)>::type::iterator type;
> }
> So BOOST_TYPEOF could include 'identity' in its expansion.

Working around the problem by _complicating_ the expression inside typeof is
not a way I would go. It then may fail in another contexts, where it didn't
fail before.

This is clearly a compiler bug, and needs to be addressed by the compiler


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