Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost-users Digest, Vol 4181, Issue 1
From: Carl Wallace (carl_at_[hidden])
Date: 2015-06-30 10:33:13


>
>Message: 7
>Date: Tue, 30 Jun 2015 11:08:50 +0900
>From: Kohei Takahashi <flast_at_[hidden]>
>To: boost-users_at_[hidden]
>Subject: Re: [Boost-users] fusion error when compiling graphviz code
> using VC2010
>Message-ID: <5591FA32.6070802_at_[hidden]>
>Content-Type: text/plain; charset="utf-8"
>
>Hi Carl,
>
>On 2015/06/29 20:36, Carl Wallace wrote:
>> We have been using Boost's graphviz support for several years and have
>> upgraded through a few versions of Boost with no issues in some long
>> stable code. However, when we moved to 1.58 our Windows build broke. We
>> are still using VC2010, with plans to move to 2015 in the
>>not-too-distant
>> future. We have not yet tried 1.58 in VC2015. The error message is very
>> large but emanates from here:
>Can I get (minimal) reproducible code or more detailed error log?
>
>Best,
>Kihei

This stripped down code snip is enough to trigger the error when the 1.58
code is in place and compiles fine when the code from 1.54 is substituted
in the place I indicating initially. This code is not intended to do
anything and I have not run it. I can send the original error message if
you like too. Will send that privately if you want it.

#include <boost/graph/breadth_first_search.hpp>
#include <boost/graph/visitors.hpp>
#include <boost/graph/graphviz.hpp>

using namespace boost;

template <class Name, class ColorMap>
class label_writer2 {
public:
        label_writer2(Name _name, ColorMap _color) : name(_name), color(_color) {}

        template <class VertexOrEdge>
        void operator()(std::ostream& out, const VertexOrEdge& v) const
        {
        }
private:
        Name name;
        ColorMap color;
};

struct VertexProps
{
};

typedef adjacency_list < vecS, vecS, bidirectionalS, VertexProps> graph_t;
typedef property_map<graph_t, std::string VertexProps::*>::type name_map_t;

int _tmain(int argc, char* argv[])
{
        std::ostringstream oss;
        graph_t m_graph;
        name_map_t m_nameMap;

        two_bit_color_map<property_map<graph_t,
vertex_index_t>::const_type>color_map(num_vertices(m_graph),
get(vertex_index, m_graph));
        boost::write_graphviz(oss, m_graph, label_writer2<name_map_t,
two_bit_color_map<property_map<graph_t, vertex_index_t>::const_type>
>(m_nameMap, color_map));

        return 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