I'm trying to create a .natvis file for visual studio. According to this page I can reference a template parameter with $T1, $T2 and so on. So in the case of MyClass<A> $T1 will reference the type A. This works. But in my case A is a template itself and I need to reference its parameter, some sort of $T1<$T1> - but this obviously doesn't work.
Asked
Active
Viewed 2,514 times
8
nikitablack
- 4,359
- 2
- 35
- 68
1 Answers
11
With Visual Studio 2015 at least, the template parameter psuedo-variables $T1, $T2, etc. appear to actually correspond to the wildcards in the type `name' expression, rather than strictly to template parameters.
For example, when
<Type Name="outer<*,inner<*>,*>">
matches against outer< int, inner< float >, short, long >, $T1 expands to int, $T2 expands to float and $T3 expands to short, long.
Mad Alex
- 111
- 1
- 3