220 14341 <4610134.1FNuJdPqBg@tjmaciei-mobl4> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Visual C++'s __identifier keyword
Date: Thu, 30 Oct 2014 20:14:38 -0700
Lines: 44
Approved: news@gmane.org
Message-ID: <4610134.1FNuJdPqBg@tjmaciei-mobl4>
References: <7e589557-cb3c-4323-9565-e6b859df0e76@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1414725335 25357 80.91.229.3 (31 Oct 2014 03:15:35 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 31 Oct 2014 03:15:35 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBJH5ZORAKGQEWCA46RA@isocpp.org Fri Oct 31 04:15:30 2014
Return-path: <std-proposals+bncBCB4TK757YBRBJH5ZORAKGQEWCA46RA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ee0-f71.google.com ([74.125.83.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBJH5ZORAKGQEWCA46RA@isocpp.org>)
	id 1Xk2fl-0000ll-L3
	for gclcip-std-proposals@m.gmane.org; Fri, 31 Oct 2014 04:14:45 +0100
Original-Received: by mail-ee0-f71.google.com with SMTP id e51sf207294eek.10
        for <gclcip-std-proposals@m.gmane.org>; Thu, 30 Oct 2014 20:14:45 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:message-id:user-agent
         :in-reply-to:references:mime-version:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=0hcoJdnQNYuT1uZtcacvirQH04P348kPYZ7dOsMoG7I=;
        b=FlA67eCufniV59VED9aMbfGDfFcdH3xVSEcN5VPfZeE7sysCpO15K5BFxrlArXz9DP
         x3BOhfb0/ejtsqi0ugg4rUmFGG75e6mNRVcodI87nxMCStVbFKG3FFAfL9KE2Mib+Fpx
         pNlbSA7rnDj3Y04DgBbnjS2jMrTt4TmhvXKJZU4l7vRhJZgwYMVB/WGCnl60fxQP/B+3
         K8pw81HXErNHWN85plPghXB/uAlSx7RXSdWADLTuy+cRUeLdyiqKA8XOsbcDAqZh8Vzc
         BQd2JHh4izCe2hEO+OXCuUOuP+VboShgcvJXMaBI8mVz88wCDgD1ul58ojQGBWmaVoTm
         mdaA==
X-Gm-Message-State: ALoCoQmqNilyin4ovANcdmmbctElpzqCifXo8Ar1T+/ZVKnGmgEqBm4BnJYrZNLXVr5g8IrTxomg
X-Received: by 10.180.98.101 with SMTP id eh5mr60823wib.7.1414725285326;
        Thu, 30 Oct 2014 20:14:45 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.6.5 with SMTP id w5ls419643law.71.gmail; Thu, 30 Oct 2014
 20:14:43 -0700 (PDT)
X-Received: by 10.112.140.135 with SMTP id rg7mr23281054lbb.24.1414725283643;
        Thu, 30 Oct 2014 20:14:43 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id w6si14654936lad.65.2014.10.30.20.14.43
        for <std-proposals@isocpp.org>;
        Thu, 30 Oct 2014 20:14:43 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) client-ip=78.47.120.188;
Original-Received: from tjmaciei-mobl4.localnet (unknown [IPv6:2601:7:1c80:906:5852:e362:d258:a879])
	by gondolin.macieira.info (Postfix) with ESMTPSA id BD11811A66A
	for <std-proposals@isocpp.org>; Thu, 30 Oct 2014 20:14:42 -0700 (PDT)
User-Agent: KMail/4.14 (Linux/3.11.10-21-desktop; KDE/4.14.0; x86_64; ; )
In-Reply-To: <7e589557-cb3c-4323-9565-e6b859df0e76@isocpp.org>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mail=thiago@macieira.org
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:14341
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14341>

On Thursday 30 October 2014 12:52:10 Myriachan wrote:
> extern "C" int __identifier(class);
> 
> __identifier also may take a literal string as a parameter, allowing weird 
> characters in identifiers.  I would say that the effect of using a literal 
> string that is neither a legal C++ identifier nor a C++ keyword (i.e. 
> something that'd work without being a string) has unspecified behavior, 
> leaving it to the implementation to decide whether such a thing is 
> meaningful or an error.  This literal string feature can be used to access 
> mangled symbol names if used in conjunction with extern "C", or could be 
> used to put dollar signs in identifiers.  And yes, 
> __identifier(__identifier) is legal.

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("(");

Or, maybe just use the backtick like SQL does:

SELECT `SELECT` FROM `FROM`;

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.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

-- 

--- 
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/.

.
