microsoft / microsoft/vscode-cpptools
natvis is failing to read conditional with variables with Eigen
@pieandcakes ci sta già lavorando.
Dal 13/2/2019.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
I am running Visual Studio 2017 15.9.5
I am trying to make an addition to a natvis for the Eigen library available here
I am basically making a variant of: <Type Name="Eigen::Matrix<*,-1,-1,*,*,*>"> for Eigen::Map.
I used the code already in place in the natvis as a platform:
<Type Name="Eigen::Map<Eigen::Matrix<*,-1,-1,*,*,*>,*,*>">
<DisplayString Condition="m_data == 0">empty</DisplayString>
<DisplayString Condition="m_data != 0">Map[{m_rows.m_value}, {m_cols.m_value}] (dynamic matrix)</DisplayString>
<Expand>
<ArrayItems Condition="Flags%2"> <!-- row major layout -->
<Rank>2</Rank>
<Size>$i==0 ? m_rows.m_value : m_cols.m_value</Size>
<ValuePointer>m_data</ValuePointer>
</ArrayItems>
<ArrayItems Condition="!(Flags%2)"> <!-- column major layout -->
<Direction>Backward</Direction>
<Rank>2</Rank>
<Size>$i==0 ? m_rows.m_value : m_cols.m_value</Size>
<ValuePointer>m_data</ValuePointer>
</ArrayItems>
</Expand>
</Type>
Using trial and error, I know that my issue is with the line (in both locations):
<Size>$i==0 ? m_rows.m_value : m_cols.m_value</Size>
This is because if I replace either m_rows.m_value or m_cols.m_value with some constant integer, then it runs fine but not the way I want it to run, of course.
How do I get this to work?
I also have a stackoverflow questions here.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.