220 8142 <CAGsORuD6xJXBxn8f4p9V6ZNzb-Ue2xziyysCJRnQKubm8tfAeA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Zhihao Yuan <zy@miator.net>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: A compile-time string literal library type
Date: Mon, 16 Dec 2013 14:32:14 -0500
Lines: 29
Approved: news@gmane.org
Message-ID: <CAGsORuD6xJXBxn8f4p9V6ZNzb-Ue2xziyysCJRnQKubm8tfAeA@mail.gmail.com>
References: <d9fcae4a-7452-4660-8053-1386f851951f@isocpp.org>	<CAGsORuAv7xKEXMsUfWd04tkBULXRVM90RqQguJfdqkX1KbLsPg@mail.gmail.com>	<fcb910ab-7d1b-4622-a58a-e51a8b781dbc@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1387222339 2316 80.91.229.3 (16 Dec 2013 19:32:19 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 16 Dec 2013 19:32:19 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCSKRWMD4EHBBQVKXWKQKGQEU6A3Z4Y@isocpp.org Mon Dec 16 20:32:25 2013
Return-path: <std-proposals+bncBCSKRWMD4EHBBQVKXWKQKGQEU6A3Z4Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ve0-f198.google.com ([209.85.128.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCSKRWMD4EHBBQVKXWKQKGQEU6A3Z4Y@isocpp.org>)
	id 1Vsdtr-00014Y-KT
	for gclcip-std-proposals@m.gmane.org; Mon, 16 Dec 2013 20:32:19 +0100
Original-Received: by mail-ve0-f198.google.com with SMTP id oy12sf10438444veb.1
        for <gclcip-std-proposals@m.gmane.org>; Mon, 16 Dec 2013 11:32:18 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from:to:sender: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=BejzpGKOOAxHqbheuiNDn6LQsH99iheOtUF5+W2T3bA=;
        b=Qx4gNAVdyOnpMuw4ijWkEl7nsj57nDuVADtE8M5y7fiACClRus7weUfjIGOXFCkeMG
         xvt2Hc98jwIcKn6k9Q9sGVqGyc/++4g9R8kmhYlN6jC3ToKWHL+N8HyJjA3G9yfYDr0F
         qK2QWCaHm+lAVzNx+vhVJzctLu5WnX0JzFNSgRwrMjHVVntNj8XwQKjvfUjy77aTJyXe
         W8x1nU52qyH9sDLr4gs3VEV+hZ+vR77mhcKQYR2TtTSRqIgeQt5gNKC5ftduAUTkuafn
         DpIDHT0CqTvIsYVELCnPxKSOIdHmUHuSoUtjDz1H80QwUlTBtDm/2TQ7F+RSRRTFoi0l
         F4+g==
X-Gm-Message-State: ALoCoQkBd/g3zrClHFYVPbztSCkyCsZGqfyejE5/IQJAUFRpRIlB5jTiC8tF2OMB/94m17P7Zvbi
X-Received: by 10.236.20.114 with SMTP id o78mr5818032yho.8.1387222338700;
        Mon, 16 Dec 2013 11:32:18 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.81.229 with SMTP id d5ls2141107qey.64.gmail; Mon, 16 Dec
 2013 11:32:17 -0800 (PST)
X-Received: by 10.49.84.195 with SMTP id b3mr35747269qez.32.1387222337946;
        Mon, 16 Dec 2013 11:32:17 -0800 (PST)
Original-Received: from mail-s68.mailgun.info (mail-s68.mailgun.info. [184.173.153.196])
        by mx.google.com with ESMTP id k9si10155414qat.145.2013.12.16.11.32.17
        for <std-proposals@isocpp.org>;
        Mon, 16 Dec 2013 11:32:17 -0800 (PST)
Received-SPF: pass (google.com: domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates 184.173.153.196 as permitted sender) client-ip=184.173.153.196;
Original-Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com
 [209.85.220.169]) by mxa.mailgun.org with ESMTP id 52af553e.5c36570-in1;
 Mon, 16 Dec 2013 19:32:14 -0000 (UTC)
Original-Received: by mail-vc0-f169.google.com with SMTP id hu19so3567808vcb.28 for
 <std-proposals@isocpp.org>; Mon, 16 Dec 2013 11:32:14 -0800 (PST)
X-Received: by 10.58.11.73 with SMTP id o9mr9058110veb.8.1387222334245; Mon,
 16 Dec 2013 11:32:14 -0800 (PST)
Original-Received: by 10.221.73.199 with HTTP; Mon, 16 Dec 2013 11:32:14 -0800 (PST)
In-Reply-To: <fcb910ab-7d1b-4622-a58a-e51a8b781dbc@isocpp.org>
X-Mailgun-Sid: WyI3MTBkYiIsICJzdGQtcHJvcG9zYWxzQGlzb2NwcC5vcmciLCAiNjkxMTAiXQ==
Original-Sender: zy@miator.net
X-Original-Sender: zy@miator.net
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of bounce+3f9131.69110-std-proposals=isocpp.org@miator.net designates
 184.173.153.196 as permitted sender) smtp.mail=bounce+3f9131.69110-std-proposals=isocpp.org@miator.net;
       dkim=pass header.i=@miator.net
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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:8142
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8142>

On Mon, Dec 16, 2013 at 2:22 PM, Sean Middleditch
<sean.middleditch@gmail.com> wrote:
> Given the current lack of some essential C++11 features in a very popular
> compiler we end up using a few hacks.  One common one I see a lot is to use
> a macro like HASH_STR("literal") and then a preprocessor to find and replace
> all those with hash results.  Obviously that is far from ideal, though there
> are plenty of other needs for a specialized pre-processor in C++ today (it's
> one way to implement reflection for serialization and editor data binding).

I think you can do it with array reference and constexpr function.

The string_literal class proposed here is different: every string literal
differ in content also differ in types.  To array reference and std::array,
they are only differ in types when the lengths are different.

-- 
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://4bsd.biz/

-- 

--- 
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/.

.
