I have this following program for map with custom keys:

```
class MyClass
{
public:

    MyClass(int i): val(i) {}

    bool operator< (const MyClass& that) const { return val <= that.val; }

private:
    int val;
};

int main()
{
    MyClass c1(1);
    MyClass c2(2);
    MyClass c3(3);

    map<MyClass, int> table;

    table[c1] = 12;
    table[c2] = 22;
    table[c3] = 33;

    cout << "Mapped values are: " << table.lower_bound(c1)->second << " " << table[c2] << " " << table[c3] << endl;

}

```

The output comes as: 

```
Mapped values are: 22 0 0

```

But if I compare using < or > in the operator< instead of <= then everything works fine. And the output comes as:

```
Mapped values are: 12 22 33

```

Can someone explain why <= does not work at all, but < and even > works?