Template Semantic Errors (fake) [message #897177] |
Mon, 23 July 2012 01:18 |
Scribble ink Messages: 2 Registered: July 2012 |
Junior Member |
|
|
Hi everyone,
Fake Semantic error messages are non-fatal, but admittedly distracting and honestly annoying.
The following code creates "Semantic Error" messages for adjacency_pair_t and edge_pair_t, but strangely not for vertex_pair_t in Indigo + CDT8 (also in CDT6). The code compiles fine, both inside and outside of Eclipse. Rebuilding the index did not resolve the issue.
typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS,
vertex_prop_t, edge_prop_t, graph_prop_t >
graph_t;
typedef boost::graph_traits<graph_t>::vertex_iterator vertex_iterator_t;
typedef boost::graph_traits<graph_t>::edge_iterator edge_iterator_t;
typedef boost::graph_traits<graph_t>::adjacency_iterator adjacency_iterator_t;
typedef std::pair<vertex_iterator_t, vertex_iterator_t> vertex_pair_t;
typedef std::pair<edge_iterator_t, edge_iterator_t> edge_pair_t;
typedef std::pair<adjacency_iterator_t, adjacency_iterator_t> adjacency_pair_t;
EDIT: The issue propagates further in the code with the error message: "Field 'first' cannot be resolved (Semantic Error)."
adjacency_pair_t nbd = boost::adjacent_vertices(g, v);
while(nbd.first != nbd.second) {
++nbd.first;
}
The following solutions for previously reported semantic errors did not work.
+ March 2012: http://www.eclipse.org/forums/index.php/m/830451/ - Rebuild the index
+ July 2012: http://www.eclipse.org/forums/index.php/t/367733/ - Rebuild the index
It should be noted that the files .project and .cproject were generated using CMake and edited in Eclipse via "Import" -> "Existing projects..." The include directories have been manually verified to be correct.
+ Anyone else run into this issue as well?
+ Any suggestions or insights?
Thanks in advance,
scribbleink
[Updated on: Mon, 23 July 2012 01:25] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03274 seconds