In GCC, Clang and MSVC is there any way to conform against C++98 and not C++03?

霸气de小男生 提交于 2019-12-05 07:43:33
Lightness Races with Monica

Is there a way to make GCC only conform to C++98?

No. You already thoroughly covered the available flags in your question, and none of them can do this.


Does Clang conform to C++98 or do they actually conform to C++03? Where can I find the relevant documentation for this?

Clang implements C++03 minus export, just like GCC:

Clang implements all of the ISO C++ 1998 standard (including the defects addressed in the ISO C++ 2003 standard) except for export (which was removed in C++11).


Same for MSVC. Is there a way to change language standards in MSVC to conform only against C++98?

No. As you say, you cannot specify the C++ version in MSVC. There is a list of compiler flags and that is not the function of any of them.


The whole point of C++03 was to make corrections to C++98 and thus to effectively replace it outright, rather than to follow it as a new unit. It does not make sense to want to "revert" those fixes. That would be like asking Windows 7 SP2 to boot into Windows 7 SP1 mode. It just isn't a model that anyone would want to support.

Fictional.

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