This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

question about HOWTO use std::set in non-trival way...


I'm using gcc v3.4.1.

I've got an application that has a need for the following set container:

struct ltSubgraph : public binary_function<Edge,Edge,bool>
{
  ltSubgraph(const SubGraphT& subgraph);
  .....
};

typedef set<Edge,ltSubgraph> Edges;

The compare function requires that it has a SubGraphT object to implement its operator() method.

The question is how do I instanciate this container?

Just doing:
  Edges edges;

Produces errors for want of a ltSubgraph default constructor...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]