Unary + on pointers

前端 未结 3 706
春和景丽
春和景丽 2021-02-19 18:49

I was just browsing through the draft of the C++11 standard and found the following puzzling statement (§13.6/8):

For every type T there exist c

3条回答
  •  余生分开走
    2021-02-19 19:42

    Well, you could overload it do do whatever you want, but it's just there for symmetry with the unary - operator. As you mention, it's just a no-op most of the time.

提交回复
热议问题