http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6709

cheburnae <osa252 at mail dot ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |osa252 at mail dot ru

--- Comment #18 from cheburnae <osa252 at mail dot ru> 2011-04-06 14:23:53 UTC 
---
A simple workaround:

template <class T>
struct TypeEcho {
    typedef T R;
};

#define TYPE_OF(expr) TypeEcho<typeof (*&expr)>::R

template <class T>
void foo() {
    typename TYPE_OF(std::vector<T>())::value_type();
}

void foo2() {
    TYPE_OF(std::vector<int>())::value_type();
    foo<int>();
}

Reply via email to