Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 With boost, std iterators don't work
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

yym
Senior Member

Israel
31 Posts

Posted - Jul 17 2011 :  11:01:44 AM  Show Profile  Reply with Quote
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  Show Profile  Reply with Quote
I forgot to mention that the boost directory is in the project include directories.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Jul 18 2011 :  6:28:37 PM  Show Profile  Reply with Quote
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
Go to Top of Page

yym
Senior Member

Israel
31 Posts

Posted - Jul 19 2011 :  02:30:32 AM  Show Profile  Reply with Quote
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?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Jul 19 2011 :  8:07:37 PM  Show Profile  Reply with Quote
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
Go to Top of Page

yym
Senior Member

Israel
31 Posts

Posted - Jul 20 2011 :  01:22:49 AM  Show Profile  Reply with Quote
Thanks, I'll try it out when it's available.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Jul 20 2011 :  10:33:12 AM  Show Profile  Reply with Quote
VA 1854 has now been released, and hopefully it will help:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=10251

zen is the art of being at one with the two'ness
Go to Top of Page

yym
Senior Member

Israel
31 Posts

Posted - Jul 21 2011 :  03:51:49 AM  Show Profile  Reply with Quote
Unfortunately the problem still exists.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Jul 21 2011 :  09:48:21 AM  Show Profile  Reply with Quote
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
Go to Top of Page

yym
Senior Member

Israel
31 Posts

Posted - Jul 21 2011 :  11:04:04 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Jul 21 2011 :  9:20:32 PM  Show Profile  Reply with Quote
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
Go to Top of Page

yym
Senior Member

Israel
31 Posts

Posted - Jul 24 2011 :  03:16:55 AM  Show Profile  Reply with Quote
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.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Jul 25 2011 :  11:17:12 AM  Show Profile  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000