Use difference functions on RHS and LHS of assignment
Posted on 2000-04-11
I recall seeing somewhere how you can create two overloaded functions, 1 called on the LHS and the other on the RHS of an assignment.
I want an 'operator(...)' function that only references existing items when its used on the RHS of an assignment, but another one (obviously the same name etc) that can create a new entry if there is no matching item found when used on the LHS of an assignment.
I think it has something to do with the placement of 'const' keywords, but I can't make it work and I can't find any references on the web.