|
Boost Users : |
From: Jeffrey Holle (jeffreyholle_at_[hidden])
Date: 2005-11-03 12:23:31
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.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net