You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
template<typename T>
struct Foo
{
};
template<typename T> using Bar = Foo<T>;
int main()
{
Foo<int> foo = {};
Bar<int> bar = {};
// break here and hover over foo and bar.
return 0;
}
with this natvis file
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="Foo<*>">
<DisplayString>this is a Foo</DisplayString>
</Type>
</AutoVisualizer>
then cppdbg with gcc on Linux will be able to display the content of foo as this is a Foo, but it displays the default visualizer for bar.
Expected result: display this is a Foo for bar as well.
Adding <AlternativeType Name="Bar<*>"> to the Foo type does not work.
Adding a separate <Type Name="Bar<*>"> does not work.
Adding a separate <Type Name="Bar">does work. However, I loose the information about the template parameters. I can't access $T1 anymore.
Side note / trivia: with cppvsdbg, this is a Foo is displayed for bar - also if the entry for Bar is missing in the natvis file.
More trivia: this contrived example stems from an attempt to display Qt's type QVector which is defined as template <typename T> using QVector = QList<T>.
The text was updated successfully, but these errors were encountered:
Consider the following code
with this natvis file
then cppdbg with gcc on Linux will be able to display the content of
foo
asthis is a Foo
, but it displays the default visualizer forbar
.Expected result: display
this is a Foo
forbar
as well.Adding
<AlternativeType Name="Bar<*>">
to theFoo
type does not work.Adding a separate
<Type Name="Bar<*>">
does not work.Adding a separate
<Type Name="Bar">
does work. However, I loose the information about the template parameters. I can't access$T1
anymore.Side note / trivia: with cppvsdbg,
this is a Foo
is displayed forbar
- also if the entry forBar
is missing in the natvis file.More trivia: this contrived example stems from an attempt to display Qt's type
QVector
which is defined astemplate <typename T> using QVector = QList<T>
.The text was updated successfully, but these errors were encountered: