This is the mail archive of the
mailing list for the GCC project.
Re: C++14 digit separators..
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Mon, 28 Oct 2013 13:10:08 +0000
- Subject: Re: C++14 digit separators..
- Authentication-results: sourceware.org; auth=none
- References: <526DD13C dot 2080400 at verizon dot net>
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