This is the mail archive of the gcc-patches@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: C++14 digit separators..


On Sun, 27 Oct 2013, Ed Smith-Rowland wrote:

> Here is an implementation for C++14 digit separators (single quote).

I tend to think that such features should come with a test that the 
feature is not enabled for language / standard versions for which it 
shouldn't be.  That is, something like

#define m(x) 0
int i = m(1'2)+(3'4);

that is valid in both cases, but whose semantics differ depending on 
whether the feature is enabled (with an appropriate check on the value of 
i, and the test being run both in cases where it should be enabled and 
cases where it shouldn't).

-- 
Joseph S. Myers
joseph@codesourcery.com


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