Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 With boost, std iterators don't work

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
yym 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.
12   L A T E S T    R E P L I E S    (Newest First)
feline 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.
yym 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 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?
yym 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 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.
yym Posted - Jul 21 2011 : 03:51:49 AM
Unfortunately the problem still exists.
feline Posted - Jul 20 2011 : 10:33:12 AM
VA 1854 has now been released, and hopefully it will help:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=10251
yym Posted - Jul 20 2011 : 01:22:49 AM
Thanks, I'll try it out when it's available.
feline 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.
yym 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 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->|;
}
yym Posted - Jul 17 2011 : 11:10:41 AM
I forgot to mention that the boost directory is in the project include directories.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000