Did `#pragma once` make it into C++0x?

六月ゝ 毕业季﹏ 提交于 2019-12-01 16:16:36

All #pragma directives cause the implementation to behave in an implementation defined way.

This hasn't changed between C++03 and the latest C++0x draft (n3225.pdf). Include guards are the portable alternative.

Sun C++ compiler (Solaris) does not implement it. And no, it's not in C++0x drafts.

It's also trivial to implement using #ifdef. What's the guiding principal for the new version? Implement everything you might ever want and the kitchen sink or just give you the minimum tools to do so yourself?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!