Boost C++ Libraries: Ticket #511: predicates without default constructor fail to compile https://svn.boost.org/trac10/ticket/511 <pre class="wiki"> I want to draw your attention to a possible flaw in the implementation of the write_graphviz method from the Boost Graph Library. The current implementation uses the assignment operator for the vertex and edge iterators. This is natural, but some examples fail to compile with this version. The problem comes from the predicates witch don't have default constructors. When trying to assign a vertex iterator of a graph filtered with such a predicate, the compiler issues an error: C2512:'positive_edge_weight_pred&lt;MyEdgeWeightMap&gt;' : no appropriate default constructor available with [ MyEdgeWeightMap=EdgeWeightMapT ] If a small modification in the write_graphviz implementation is made (using copy constructors instead of assignement operators), the example compiles and runs sucesfully. I am using the Microsoft Visual C++ 7.1 compiler. In conclusion, I think that this modification should be made, as it grows the flexibility of the library and doesn't add any overhead. I have attached the example (main.cpp) and the patch for graphviz.hpp (graphviz.hpp.patch). My e-mail adress is pdumitrache@bphx.ro </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/511 Trac 1.4.3 Daryle Walker Mon, 14 Nov 2005 21:37:30 GMT <link>https://svn.boost.org/trac10/ticket/511#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/511#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=551024 The submitter forgot to attach the example/patch. That person made up for this by recreating the message as a new tracker with the files attached. So this tracker should be closed as a duplicate of the second one (#1353875). </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Daryle Walker</dc:creator> <pubDate>Mon, 14 Nov 2005 21:37:33 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/511#comment:2 https://svn.boost.org/trac10/ticket/511#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket