I am trying to write graph class as a template class. As answered in Question, I was trying to implement graph in term of std::set , here is what I have wrote till now.
#include <set>
template <class T,
class Container = std::set<T> >
class graph {
public:
class iterator {
public:
iterator() {
std::set<T>::iterator();
}
iterator(const iterator&) {
std::set<T>::iterator();
}
~iterator() {
std::set<T>::~iterator();
}
What I am looking for here is whenever graph::itertor is called, internally it should called set::iterator, Is this approach ok, and why ~iterator() is not getting compiled.