220 14342 <26549f31-89d2-4d30-b031-e067036f44c8@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Myriachan <myriachan@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Visual C++'s __identifier keyword
Date: Thu, 30 Oct 2014 22:10:07 -0700 (PDT)
Lines: 115
Approved: news@gmane.org
Message-ID: <26549f31-89d2-4d30-b031-e067036f44c8@isocpp.org>
References: <7e589557-cb3c-4323-9565-e6b859df0e76@isocpp.org>
 <4610134.1FNuJdPqBg@tjmaciei-mobl4>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_1320_1561302656.1414732207988"
X-Trace: ger.gmane.org 1414732217 3053 80.91.229.3 (31 Oct 2014 05:10:17 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 31 Oct 2014 05:10:17 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDKLT4PURQHRBMNTZSRAKGQEOZKW6SQ@isocpp.org Fri Oct 31 06:10:11 2014
Return-path: <std-proposals+bncBDKLT4PURQHRBMNTZSRAKGQEOZKW6SQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qc0-f200.google.com ([209.85.216.200])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDKLT4PURQHRBMNTZSRAKGQEOZKW6SQ@isocpp.org>)
	id 1Xk4TS-0006V3-Pc
	for gclcip-std-proposals@m.gmane.org; Fri, 31 Oct 2014 06:10:10 +0100
Original-Received: by mail-qc0-f200.google.com with SMTP id m20sf12627421qcx.7
        for <gclcip-std-proposals@m.gmane.org>; Thu, 30 Oct 2014 22:10:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=55aim+CC/BAe6WpOE7tF0auKFpSqDPRVnANxsiZpQM4=;
        b=JP1bLjQW7MwBQGEDZSck4/PA28ZubCGhQ3eCGy/rBSP/tC2jxvXPNu5c53jMUfBVha
         HROhtKSTZEoh66i54AA3Nmfnn9Tf9DImuyKu2tMHCj6Y3F1xclQ3tnqupK13BRXncy3C
         4UMVVwJHOAUr+BBMeBX1Emh25KMEEUj4YudKsJH13k/EUMs0iSyYhD6j1oBz9GAPz80y
         rxAZLJ4Jvxq4TKx7zhb0iT2fb5G0ES59XlQEiX9UyeorUkDRwi450UmBMCkUUSwBM9Lq
         oJFeHsV8STTCSTrVUNE93I3u1ck2epZbMN7PdUakUSzecvzGLi3AJjp/flbqeeeDpJTu
         YS7Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=55aim+CC/BAe6WpOE7tF0auKFpSqDPRVnANxsiZpQM4=;
        b=Eg8/xPDLA6SYLstpKQUixlNPQqOsOqQx1q7BsicfMN/QNQNU9Ted5zXwCskGcYsJRB
         RPgMcvBlIlV0zl8YIowKr+gbZxSyygVOfKONGHtN9M9BoKBFTv8X+HEJWPnZx/Hg9WqG
         9x1FddtlgMtvXEWiFbt0Q8Z55d6pj+b4HGU4/SgM71zmsq0uhalhhTEXZQfD7h5LxQBc
         Wm4ATBreGxqtRBpGIlFje5WF4OkwFvcExo+9NRaf9i8PZcqm2dhpdqFQI+ioTk+gx1KU
         rOmBvQZvN+/wKU/Gm0CK828lFiFq0v53GvdkWGWUt9dFNsiAiRqpP+6aCrtJj9MN6YO2
         TodA==
X-Gm-Message-State: ALoCoQnZHrBIvbduzfUwZecQLwfdns6eBOLsRDGAR+E/hYO7yHwb9uSV7JyCGvQR9u1r2MkeVpPk
X-Received: by 10.236.61.132 with SMTP id w4mr10115712yhc.2.1414732210031;
        Thu, 30 Oct 2014 22:10:10 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.17.206 with SMTP id 75ls1130003ior.89.gmail; Thu, 30 Oct
 2014 22:10:09 -0700 (PDT)
X-Received: by 10.50.73.4 with SMTP id h4mr17072igv.0.1414732209216;
        Thu, 30 Oct 2014 22:10:09 -0700 (PDT)
In-Reply-To: <4610134.1FNuJdPqBg@tjmaciei-mobl4>
X-Original-Sender: myriachan@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:14342
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14342>

------=_Part_1320_1561302656.1414732207988
Content-Type: text/plain; charset=UTF-8

On Thursday, October 30, 2014 8:14:46 PM UTC-7, Thiago Macieira wrote:
>
> How about an identifier containing the closing parenthesis? You probably 
> want 
> to have this as a string literal. 
>
> With GCC: 
>
> extern "C" int class_() asm("class"); 
> extern "C" int closingparen() asm("("); 
>
>
Visual C++ equivalent, in theory:

extern "C" int __identifier(class)();
extern "C" int __identifier("(")();
 

> Or, maybe just use the backtick like SQL does: 
>
> SELECT `SELECT` FROM `FROM`; 
>
>
I actually prefer the MySQL `` style to __identifier =)  (It's 
implementation-specific, by the way.  Oracle uses double quotes, and 
Microsoft SQL Server I believe uses square brackets...?)
 

> But aside from external names, what use would this have? I'm not sure I 
> understood your example for wchar_t/char16_t and, to be honest, it's not 
> relevant because the standard can assume that the implementation fully 
> implements the standard. 
>
>
Certainly; it was just a little trick you can do in the Visual C++ style, 
and isn't something needed in the Standard.  It doesn't work with GCC or 
Clang's __asm__ because those don't modify the name of the variable, only 
its object symbol.  It's like creating a legal-identifier alias, whereas 
MSVC's __identifier actually makes the identifier name be "class" and will 
show it in error messages that way and such.

Melissa

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_1320_1561302656.1414732207988
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Thursday, October 30, 2014 8:14:46 PM UTC-7, Thiago Mac=
ieira wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">How about an ident=
ifier containing the closing parenthesis? You probably want=20
<br>to have this as a string literal.
<br>
<br>With GCC:
<br>
<br>extern "C" int class_() asm("class");
<br>extern "C" int closingparen() asm("(");
<br>
<br></blockquote><div><br>Visual C++ equivalent, in theory:<br><br>extern "=
C" int __identifier(class)();<br>extern "C" int __identifier("(")();<br>&nb=
sp;</div><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: =
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Or, maybe just use th=
e backtick like SQL does:
<br>
<br>SELECT `SELECT` FROM `FROM`;
<br>
<br></blockquote><div><br>I actually prefer the MySQL `` style to __identif=
ier =3D)&nbsp; (It's implementation-specific, by the way.&nbsp; Oracle uses=
 double quotes, and Microsoft SQL Server I believe uses square brackets...?=
)<br>&nbsp;</div><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">But aside fro=
m external names, what use would this have? I'm not sure I=20
<br>understood your example for wchar_t/char16_t and, to be honest, it's no=
t=20
<br>relevant because the standard can assume that the implementation fully=
=20
<br>implements the standard.
<br>
<br></blockquote><div><br>Certainly; it was just a little trick you can do =
in the Visual C++ style, and isn't something needed in the Standard.&nbsp; =
It doesn't work with GCC or Clang's __asm__ because those don't modify the =
name of the variable, only its object symbol.&nbsp; It's like creating a le=
gal-identifier alias, whereas MSVC's __identifier actually makes the identi=
fier name be "class" and will show it in error messages that way and such.<=
br><br>Melissa<br></div></div>

<p></p>

-- <br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_1320_1561302656.1414732207988--

.
