Semantic does not pick up auto variables in a BOOST_FOREACH loop
"Dixon Ryan (ETAS/ESW6)" <[email protected]> Mon, 8 Dec 2014 17:16:46 +0000
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <[email protected]> |
I am quite surprised by this particular issue:
Here is the single file:
======START=====
#include <boost/foreach.hpp>
#include <iostream>
#include <vector>
struct MyStruct {
int data;
int getData( void ) { return data; }
};
int main ( void ) {
std::vector<MyStruct*> myVec;
myVec.push_back ( new MyStruct() );
myVec.push_back ( new MyStruct() );
BOOST_FOREACH( MyStruct* ms, myVec )
{
std::cout << "Addr: " << ms << std::endl;
ms-> // does not work
delete ms;
}
for ( int i = 0 ; i < myVec.size() ; ++ i )
{
std::cout << "Addr: " << myVec[i] << std::endl;
}
MyStruct* ptrMs = new MyStruct();
ptrMs-> // works
delete ptrMs;
return 0;
}
=====END======
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk