In MSVC2010 The following code gives:
error C2039: 'my_type' : is not a member of ''global namespace''
template<typename T>
class C
{
public:
typedef T my_type;
};
C<int> c;
auto f = [&c]() {
decltype(c)::my_type v2; // ERROR C2039
};
I've found a lame way to work around it but I'm wondering what the proper way is to get at the typedef when you only have an object instance.