开发者

Are there any other keywords that can be accessed using the global namespace scope resolution operator?

开发者 https://www.devze.com 2023-01-09 10:12 出处:网络
The global new and delete can be used like normal, but you can also prefix the :: operator to them and it w开发者_Python百科ill work the same.

The global new and delete can be used like normal, but you can also prefix the :: operator to them and it w开发者_Python百科ill work the same. Are there any other keywords that have this same behaviour?


Yes, you can also scope operator keyword, like ::operator+(a, b).

I believe new, delete and operator are the only ones in standard C++ that allow this.

0

精彩评论

暂无评论...
验证码 换一张
取 消