
3 Nov
2005
3 Nov
'05
5:23 p.m.
I'm using gcc 4.0.2 with boost 1.33.0. I'm getting a compiler warning about taking the address of a temporary with the following code: Edge* TransshipmentPivotingRule::enteringEdge(const FeasibleSpanningTree* pFST) { graph_traits<AntiTree>::edge_iterator ei,ei_out; tie(ei,ei_out)=edges(*m_pAntiTree); return (find_if(ei,ei_out, ProfitableEdge(*m_pAntiTree,m_c,m_y,*pFST))!=ei_out) ? &*ei : NULL; } Note the "&*ei". I know that the iterator is tempory, but what the iterator is pointing to isn't. Is this a legit warning that I need to be concerned about? In case it matters, AntiTree is a filtered_graph.