Changes between Initial Version and Version 1 of Guidelines/GCCBoost


Ignore:
Timestamp:
Mar 18, 2013, 10:20:29 AM (10 years ago)
Author:
Paul A. Bristow
Comment:

Content for GCCBoost

Legend:

Unmodified
Added
Removed
Modified
  • Guidelines/GCCBoost

    v1 v1  
     1'''Selecting the C++ language specification with GCC'''
     2
     3GCC supports finely granulated selection of the underlying C++ language specification With command line options.
     4
     5The command line option -std=c++98 selects language conformance with ISO/IEC 14882:1998, also known as C++98.
     6
     7The command line option -std=c++03 selects language conformance with ISO/IEC 14882:2003, also known as C++03.
     8
     9The command line option -std=c++11 selects language conformance with ISO/IEC 14882:2011, also known as C++11.
     10
     11In general, Boost libraries should be compatible with C++03 and use -std=c++03 accordingly.
     12
     13Important: Please avoid using -std=c++11, -std=gnu++11, and -std=gnu++0x. These command line arguments activate GCC's experimental support for C++11. There is not yet a consensus on using C++11 in Boost libraries off-the-rack.
     14
     15GCC also has the similar language options -std=gnu++98, -std=gnu++03, -std=gnu++11, and -std=gnu++0x.
     16These command line options activate certain GNU-specific language extensions. Please avoid using them because their use can lead to non-portability issues.
     17
     18The GCC command line option -std=c++0x was an interim solution used for preliminary support support for C++11 features before these were published by ISO. As of GCC 4.7, the command line option -std=c++0x has been replaced with -std=c++11. If possible, preferentially use -std=C++11 instead of -std=c++0x when testing for C++11 compatibility. This rational for this is that -std=c++0x can easily be confused with, for example, -std=c++03.
     19
     20Do note, however, that Boost libraries should not yet rely on C++11 via the -std=c++11 switch for their build and/or usage.
     21
     22In general, then, please use -std=c++03.