Boost logo

Boost Users :

From: Yariv Tal (yariv_tal2003_at_[hidden])
Date: 2005-02-23 07:16:40


This one was already posted by Nicholas Burlett awhile back (see
http://lists.boost.org/MailArchives/boost-users/msg06534.php), but I have
some new info that may help.

The problem:
=========
When compiling code that uses the boost.graph library the VC7.1 compiler
shouts:
c:\boost_1_32_0\boost\mpl\aux_\preprocessed\plain\apply_wrap.hpp(48) :
fatal error C1001: INTERNAL COMPILER ERROR

As Nicholas already noted, this seems to be due to some compiler problem
with the boost.graph out_edge_iterators since it is caused by the following
lines in my code: (FilteredGraphGenerator::FilteredGraph is a typedef of a
boost::filtered_graph)

typedef boost::graph_traits<FilteredGraphGenerator::FilteredGraph>
                                     ::out_edge_iterator oedge_iterator;

oedge_iterator edgesItr, edgesEnd;

boost::tie(edgesItr, edgesEnd) =
   boost::out_edges(itr->first, m_g.m_filteredGraph);

while (edgesItr != edgesEnd) {
    // do anything!
}

In fact, it seems to be related to the operator!= between iterators (if the
while loop is commented out it compiles).
How ever, the error persists even after changing the operator!= to
operator== :

while (edgesItr == edgesEnd) {
    // do anything!
}

==========================================================================
Some findings:
===========

* We used to use boost_1_30_0 and the code used to compile PERFECTLY.
   The problem only appeared after migrating to boost_1_32_0.

* Calling directly to the "equal" function in iterator_core_access instead
of the operator== works.
typedef boost::graph_traits<FilteredGraphGenerator::FilteredGraph>
                                  ::out_edge_iterator oedge_iterator;

oedge_iterator edgesItr, edgesEnd;

boost::tie(edgesItr, edgesEnd) =
   boost::out_edges(itr->first,m_g.m_filteredGraph);

while (boost::iterator_core_access::equal(edgesItr, edgesEnd,

boost::mpl::true_()))
{
    // do somthing
}

* The error message location is at the mpl::apply_wrap2 function. Any
relation to the mpl::apply2 function used for declaring the operator== in
the BOOST_ITERATOR_FACADE_INTEROP_HEAD macro? Have these functions changed
since v1.30.0?


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