Boost logo

Boost Users :

Subject: [Boost-users] [BGL] Dynamic property map containing pointers to custom object
From: Leonardo Ciman (leonardo.ciman_at_[hidden])
Date: 2009-05-29 08:45:04

i tried to build a property map using the associative_property_map and
putting a poiter to a pure virtual class as value type but i had some
error i can't understand.
I also tried with a normal class pointer and i had the same problem.

/usr/include/boost/dynamic_property_map.hpp:202: error: no match for
‘operator<<’ in'
out << boost::get ...

I'm new to boost and c++, it's likely that i've done some stupid

I hope somebody can help me.

That's a test that reproduce the problem:

f#include <boost/graph/adjacency_list.hpp>
#include <boost/dynamic_property_map.hpp>
#include <boost/property_map.hpp>
#include <map>
#include <iostream>

typedef boost::graph_traits<Graph>::vertex_descriptor

class Interface
        virtual void test()=0;

class Implement : Interface
        void test(){std::cout << "ok" <<std::endl;}

int main()
        std::map<vertex_descriptor,Interface&>* testmap = new
std::map<vertex_descriptor, Interface&>;
> test_map(*testmap);
        boost::dynamic_properties dp;"test", test_map); //that's the line that cause the
        Implement i;
        put("test", dp, 0, i);

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at