Consider a type like
#include <type_traits>
template<typename T>
struct Foo {
std::remove_cv_t<T> m;
};
which uses a type trait to deduce the type of one of its members from a template parameter. This type may then be used as follows:
Foo<const int> f;
f.m = 42; // type of f.m is std::remove_cv_t<const int>,
// which resolves to int; break on this line
When trying to inspect the type of f.m wit gdb's Python API, it seems I only get incomplete information.
(gdb) python-interactive
>>> print(gdb.parse_and_eval('f')['m'].type)
std::remove_cv_t
This is not very helpful. It does not tell me what template arguments remove_cv_t was instantiated with, nor which underlying type the instantiated trait resolves to.
How can I determine through the Python API that the resolved type of f.m in this case is int?