Boost logo

Boost Users :

From: Stephan Diederich (stephan.diederich_at_[hidden])
Date: 2007-04-11 03:20:08


Hi Shufei,

On 4/10/07, Shufei Fan <fansf_at_[hidden]> wrote:
[snip]

> I found out later that a member defined in my class GA was causing the
> compiling error:

This seems to work for me (currently on apple's gcc 4.01):

struct GA {
  Graph *rowGraph;
  boost::property_map<Graph, int Node::*>::type nmt;

  GA():rowGraph(0){
    rowGraph = new Graph();
    nmt = get(&Node::count, *rowGraph);
  };
                
  ~GA(){
    if(rowGraph) delete rowGraph;
  }
};

HTH,
Stephan


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