I would like to overload the equals operator to test one of my list classes, like such:
assert(L1 == {2, 3, 5, 6, 7, 8, 10});
As far as I understand point five of this list, I should be able to use braced-init-lists as the argument to a function:
5) in a function call expression, with braced-init-list used as an argument
So my question is, does operator overload count as a "function-call expression" and is there a way to get the syntax and semantics I want?
Right now I am getting the error:
initializer list cannot be used on the right hand side of operator '=='
I can get it to work if I phrase it like this, but that's not what I want:
assert(L1 == List({2, 3, 5, 6, 7, 8, 10});