EDN Admin
Well-known member
I have tried to use an std::set<std::wstring>, and the debugger appears to have a problem with displaying the values that are stored in the set (this also happens when using std::wstring as the key value in a map.
Sample code: <font face="Courier New" color="#0000ff" size=2>
#include</font><font face="Courier New" size=2> </font><font face="Courier New" color="#800000" size=2><set> </font><font face="Courier New" color="#0000ff" size=2>
#include</font><font face="Courier New" size=2> </font><font face="Courier New" color="#800000" size=2><string> </font><font face="Courier New" color="#0000ff" size=2>
int</font><font face="Courier New" size=2> main()
{
<font face="Courier New, Courier, Monospace std::set<std::wstring> test;</font>
<font face="Courier New, Courier, Monospace test.insert( L</font></font><font face="Courier New, Courier, Monospace <font color="#800000" size=2>"1234567"</font><font size=2> ); // this is displaying correctly in the watch window </font></font><font color="#008000" size=2>
</font><font face="Courier New, Courier, Monospace <font size=2> test.insert( L</font><font color="#800000" size=2>"12345678"</font></font><font size=2><font face="Courier New, Courier, Monospace ); // this is displaying garbage in the watch window</font>
</font><font face="Courier New, Courier, Monospace" color="#0000ff" size=2> return</font><font face="Courier New" size=2><font face="Courier New, Courier, Monospace 0;</font>
} </font><font face=Arial size=2>
<font size=3>This isnt a major problem, but makes it more difficult to use std::wstring.</font>
<font size=3>John</font> </font>
View the full article
Sample code: <font face="Courier New" color="#0000ff" size=2>
#include</font><font face="Courier New" size=2> </font><font face="Courier New" color="#800000" size=2><set> </font><font face="Courier New" color="#0000ff" size=2>
#include</font><font face="Courier New" size=2> </font><font face="Courier New" color="#800000" size=2><string> </font><font face="Courier New" color="#0000ff" size=2>
int</font><font face="Courier New" size=2> main()
{
<font face="Courier New, Courier, Monospace std::set<std::wstring> test;</font>
<font face="Courier New, Courier, Monospace test.insert( L</font></font><font face="Courier New, Courier, Monospace <font color="#800000" size=2>"1234567"</font><font size=2> ); // this is displaying correctly in the watch window </font></font><font color="#008000" size=2>
</font><font face="Courier New, Courier, Monospace <font size=2> test.insert( L</font><font color="#800000" size=2>"12345678"</font></font><font size=2><font face="Courier New, Courier, Monospace ); // this is displaying garbage in the watch window</font>
</font><font face="Courier New, Courier, Monospace" color="#0000ff" size=2> return</font><font face="Courier New" size=2><font face="Courier New, Courier, Monospace 0;</font>
} </font><font face=Arial size=2>
<font size=3>This isnt a major problem, but makes it more difficult to use std::wstring.</font>
<font size=3>John</font> </font>
View the full article