This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Macro for C++14 support


Hi again,

Paolo Carlini <paolo.carlini@oracle.com> ha scritto:

>Hi,
>
>Gabriel Dos Reis <gdr@integrable-solutions.net> ha scritto:
>
>>There appear to be two targets: C++14 and C++17.  Personally, I am
>>inclined
>>to have CXX14 and CXX1Y, where CXX1Y is for the presumed C++17 target.
>
>This clarified - thanks - I'm wondering if it's safe to assume that the
>C++14 library is a superset of the C++11 one: in that case passing
>-std=c++14 would also automatically define the C++11 macro

Well, on second thought, I think we could do this anyway and be done in the wast majority of cases. Then, in special cases, where say the same facility is different in the two standards, we can always check both macros. I see now the issue mostly as a documentation issue: we would have to explain the users that -std=c++14 defines the C++11 macro too. This is *not* the same as -std=c++11 vs -std=c++98. If it's a problem, back to the huge search&replace ;)

Paolo



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]