Author |
Topic  |
|
yym
Senior Member
  
Israel
31 Posts |
Posted - Jul 17 2011 : 11:01:44 AM
|
With VA 1849 and boost 1.45.0, I have found that VA doesn't give members from iterators:
#include <vector>
struct D
{
int a;
int b;
int c;
};
void f()
{
std::vector<D>::iterator id;
id->
}
After id-> I get nothing -- although VA does change . to ->
I tracked down the problem to boost\\detail\\container_fwd.hpp which has forward declarations for the standard containers -- if I comment out the content of that file everything works. I have tried defining (in StdAfx.h) the macros which disable that file but they seem to have no effect. Is there any way around this? I would prefer not to have to modify the boost source. |
|
yym
Senior Member
  
Israel
31 Posts |
Posted - Jul 17 2011 : 11:10:41 AM
|
I forgot to mention that the boost directory is in the project include directories. |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19179 Posts |
Posted - Jul 18 2011 : 6:28:37 PM
|
Which IDE are you using?
Are you aware that std::vector is not coming from boost?
I am not seeing any problem using this code, in VS2008 with VA 1850, working in a .cpp file:
#include <vector>
struct vectorIteratorTestStruct
{
int structIteratorA;
int structIteratorB;
int structIteratorC;
};
static void testGeneralCode()
{
std::vector<vectorIteratorTestStruct>::iterator itTest;
itTest->|;
}
|
zen is the art of being at one with the two'ness |
 |
|
yym
Senior Member
  
Israel
31 Posts |
Posted - Jul 19 2011 : 02:30:32 AM
|
VS2008SP1
I am aware that std::vector does not come from boost. However, if I have the boost directory (C:\\boost_1_45_0 in my installation) in the project include directories, VA gets confused due to the forward declarations in boost\\detail\\container_fwd.hpp.
Strictly speaking boost is violating the standard by providing the forward declarations, but I wouldn't have expected them to have any effect on VA since they are only forward declarations and not full definitions.
I am a little surprised that the disabling macros didn't help. Does VA ignore #ifdef when parsing code? |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19179 Posts |
Posted - Jul 19 2011 : 8:07:37 PM
|
I have boost installed and in my VA stable include directories on the system where I tested this, and I did not see any problems. I have asked our developers about this, and they think the next build of VA may fix this problem for you. It should be posted in the next couple of days. |
zen is the art of being at one with the two'ness |
 |
|
yym
Senior Member
  
Israel
31 Posts |
Posted - Jul 20 2011 : 01:22:49 AM
|
Thanks, I'll try it out when it's available. |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19179 Posts |
|
yym
Senior Member
  
Israel
31 Posts |
Posted - Jul 21 2011 : 03:51:49 AM
|
Unfortunately the problem still exists. |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19179 Posts |
Posted - Jul 21 2011 : 09:48:21 AM
|
Can you please go to:
VA Options -> System Info -> Copy Info
and paste the details (from the clipboard) into your reply. This will give us the basic information about your setup.
Also can you please export your VA and IDE settings and send them to me:
VA Options -> Performance -> Export Settings IDE tools menu -> Import and Export Settings -> Export selected environment settings
I can then import them here and see if I can reproduce the problem. Please submit the files via the form:
http://www.wholetomato.com/support/contact.asp
including this thread ID or URL in the description, so we can match it up. |
zen is the art of being at one with the two'ness |
 |
|
yym
Senior Member
  
Israel
31 Posts |
Posted - Jul 21 2011 : 11:04:04 AM
|
I have sent the information via the contact form as well as a minimal project which demonstrates the issue. I did have to include a boost header - I'm not sure why I didn't need to above. |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19179 Posts |
Posted - Jul 21 2011 : 9:20:32 PM
|
I have the files, thank you for them. I think I have a work around. Can you please edit your VA stable include directories:
VA Options -> Projects -> C/C++ Directories
and add:
C:\\boost_1_45_0
to the directory list, and then restart the IDE. This will trigger a rebuild of your VA symbol database, and fixes the problem for me.
Does this make any difference for you? |
zen is the art of being at one with the two'ness |
 |
|
yym
Senior Member
  
Israel
31 Posts |
Posted - Jul 24 2011 : 03:16:55 AM
|
That does seem to do the trick. I had to clear the cache in my main project as well, and I still see the occasional (likely unrelated) glitch with iterators (eg occasionally I will see the iterator's members or the container's members mixed with the value's members) but it's much more usable now, thanks. |
 |
|
feline
Whole Tomato Software
    
United Kingdom
19179 Posts |
Posted - Jul 25 2011 : 11:17:12 AM
|
I am glad this has helped, thank you for the update. If you can reproduce the new, more limited problems then some sample code to help me try to reproduce the problem here would be most helpful. |
zen is the art of being at one with the two'ness |
 |
|
|
Topic  |
|