Overload operator for set of sets
<p>I just build a mini program to understand how this will work because i need this for something a bit more difficult but i can't make this work. </p>

<p>I think i need to define operator overload but i dont know how because they are two objects of <code>set&lt;set&lt;a&gt;&gt;</code></p>

<p>If you compile you will see a big error where it notice that he can't compare <code>myset == myset2</code> and i think it will say same for operator <code>!=</code> and <code>=</code></p>

<pre><code>#include &lt;set&gt;
using namespace std;

class a{
private:
     int a_;
public:
    int get_a() const{ return a_; }
     void set_a(int aux){ a_=aux;}
     bool operator &lt; (const a&amp; t) const{
         return this-&gt;get_a() &lt; t.get_a();
     }
};


class b{
private:
     set&lt;set&lt;a&gt; &gt; b_;
public:
     void set_(set&lt;a&gt; aux){ b_.insert(aux); }
     //Overload operators?
};


int main(){
    b myset;    
    b myset2;

    set&lt;a&gt; subset1;
    set&lt;a&gt; subset2;

    a myint;

    myint.set_a(1);
    subset1.insert(myint);

    myint.set_a(2);
    subset1.insert(myint);

    myint.set_a(3);
    subset1.insert(myint);

    myint.set_a(5);
    subset2.insert(myint);

    myint.set_a(6);
    subset2.insert(myint);

    myint.set_a(7);
    subset2.insert(myint);

    myset.set_(subset1);
    myset.set_(subset2);

    myset2.set_(subset1);
    myset2.set_(subset2);


    if(myset == myset2){
        cout &lt;&lt; "They are equal" &lt;&lt; endl;
    }

    if(myset != myset2){
        cout &lt;&lt; "They are different" &lt;&lt; endl;
    }

    b myset3;

    myset3 = myset2; //Copy one into other

}
</code></pre>