Why isn't operator overloading for pointers allowed to work?

后端 未结 9 2059
鱼传尺愫
鱼传尺愫 2020-12-03 14:08

As per the comment under this answer, references were introduced primarily to support operator overloading which quotes Bjarne Stroustrup:

References

9条回答
  •  星月不相逢
    2020-12-03 14:40

    Because most operators already have an alternate established meaning when applied to pointers.

提交回复
热议问题