Thanks.  I figured out how that I needed to put a boost namespace around the whole specialization sometime last night, and after I did everything built correctly.  The mysterious non-scalar conversion error went away.

Ultimately I think the source of my confusion lay in the fact that property graph concept types are defined in property_map structures while all other graph concept types are defined in graph  traits.  I was so in the habit of adding typedefs inside my graph class I overlooked the fact that property graphs do something else.

In retrospect this is all clearly spelled out in the documentation, but if I was confused about it someone else probably will be too.  Hopefully my sample at http://github.com/wpm/Boost-Implicit-Graph-Example can prevent someone from going down the same path.

Thanks again for your help.

On Fri, Jun 25, 2010 at 6:55 AM, Jeremiah Willcock <jewillco@osl.iu.edu> wrote:
On Thu, 24 Jun 2010, W.P. McNeill wrote:

How do I "specialize boost::property_map directly"?  This might be the key to the problem.  

My current shot in the dark is to try:
template<>
struct boost::property_map<ImplicitRingGraph, boost::edge_weight_t> {
typedef EdgeWeightMap type;
typedef EdgeWeightMap const_type;
};

which gives me the error

implicit.hpp:116: error: specialization of ‘template<class Graph, class Property> struct boost::property_map’ in different namespace
/opt/local/include/boost/graph/properties.hpp:244: error:   from definition of ‘template<class Graph, class Property> struct boost::property_map’

You need to do:

namespace boost {
 template <>
 struct property_map<ImplicitRingGraph, boost::edge_weight_t> {
   ...
 };
}

-- Jeremiah Willcock

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users