I gave up trying to solve this myself, so any help will be appreciated.
Let's say, we have the following declaration:
class A
{
virtual void() foo() {....};
};
typedef A B;
Then, somewhere in code we have this:
B b;
b.foo();
Now, if you are using MSVC++, Intellisense hint (when you hover your mouse over "
b.foo();
" call ) will resolve it as "
void A::foo()
", not "
void B::foo()
". I.e. if you typedef anything, Intellisense totally ignore your def, and resolves to the very bone of the declaration.
Same will happen if you declare B as descendant of A:
class B: public A
{
};
Intellisense hint will still show "
void A::foo()
" until you override foo() in B one way or another.
And here is my problem. I'm writing a templated class, which itself is descendant of another templated class, etc, etc. Final class name become very, very long (>200 symbols). Of course, it is then typedef-ed, but - and this is my problem - Intellisense doesn't care about any typedef, and just unwraps the type to this crazy 200 symbols.
My question is this:
is there ANY way at all to force Intellisense to use typedef instead of unwrapped def?
If this is not possible, is it any way to have Intellisense at least display B::foo() instead of A::foo() in the above example, provided that there is no way I can override foo() in B?
My ultimate goal is this:
template<class X1, class X2<X1>, ...., class X10000, typename Q=X1::nested_type> class Base : public AnotherTemplatedBase<.....>
{
typedef typename AnotherTemplatedBase<.....>::very_deeply_nested_type data_type;
data_type foo(yet_another_deep_data_type& src) {...}
}
typedef Base< and here are end-user params> UserClass;
....
UserClass uc;
auto x = uc.foo(y);
Is this even doable? May be in new MSVC++ releases?...