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

Jeffrey Holle jeff.holle@verizon.net
Fri Sep 10 23:34:00 GMT 2004


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...



More information about the Gcc-help mailing list