220 8156 <CAGsORuB5GU9frJFEVYOivijj4W8bMSYTj35MvxbRN_Frh3+JJg@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: Tue, 17 Dec 2013 23:42:53 -0500
Lines: 39
Approved: news@gmane.org
Message-ID: <CAGsORuB5GU9frJFEVYOivijj4W8bMSYTj35MvxbRN_Frh3+JJg@mail.gmail.com>
References: <d9fcae4a-7452-4660-8053-1386f851951f@isocpp.org>	<CAGsORuAv7xKEXMsUfWd04tkBULXRVM90RqQguJfdqkX1KbLsPg@mail.gmail.com>	<e2b8cee3-0977-4338-a7d9-d7876bffec2c@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 1387341783 7364 80.91.229.3 (18 Dec 2013 04:43:03 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 18 Dec 2013 04:43:03 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCSKRWMD4EHBBW6PYSKQKGQECUABDLY@isocpp.org Wed Dec 18 05:43:10 2013
Return-path: <std-proposals+bncBCSKRWMD4EHBBW6PYSKQKGQECUABDLY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f197.google.com ([209.85.223.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCSKRWMD4EHBBW6PYSKQKGQECUABDLY@isocpp.org>)
	id 1Vt8yS-0007cf-U1
	for gclcip-std-proposals@m.gmane.org; Wed, 18 Dec 2013 05:43:09 +0100
Original-Received: by mail-ie0-f197.google.com with SMTP id e14sf25650178iej.8
        for <gclcip-std-proposals@m.gmane.org>; Tue, 17 Dec 2013 20:43:07 -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=k4HG9BHwKz0ioIJfyQawcH5fBKkLEfqvOeWkNlSFmQM=;
        b=i1qlNF3miOcRGWgFqdg9hcph3IwMGUHP7F71LsXe0IkDywT9lPuYNwSyNAfhEKvsB7
         CtW85GvDMIcT2xEa1A/xszw0WA3lip/ewEUYkzY7k44D58z9KXlmspt+MOKIr89bIE8c
         slcbV1xY0sfisnP1EWj2bB15xxvIWVaPhg2/8YAHHBZq0yiwmOm0p6guF1IMOmM4oaPu
         TBcDfbeMIyRR36U7H7pqqjFQgE9TCqFBdSpwTtNygUEAALs5v8/QO4EUs4u1OZqfaAEH
         wQJrjpln288uES0vpOyBvJup07LNVM3lYySkwj83JNzfvSgrohj9JasHYq4p87InY1Lz
         tB4g==
X-Gm-Message-State: ALoCoQlt1V37HI09lyAjTp/T60MxlFgjNdr8b49+XkFuB7llK3/aIyJIMthUe2HpTT/G88zwAZaF
X-Received: by 10.42.112.2 with SMTP id w2mr8332951icp.14.1387341787763;
        Tue, 17 Dec 2013 20:43:07 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.12.241 with SMTP id b17ls2828512qec.11.gmail; Tue, 17 Dec
 2013 20:43:07 -0800 (PST)
X-Received: by 10.224.124.74 with SMTP id t10mr49925388qar.40.1387341787026;
        Tue, 17 Dec 2013 20:43:07 -0800 (PST)
Original-Received: from mail-s68.mailgun.info (mail-s68.mailgun.info. [184.173.153.196])
        by mx.google.com with ESMTP id b3si16298899qab.93.2013.12.17.20.43.06
        for <std-proposals@isocpp.org>;
        Tue, 17 Dec 2013 20:43:06 -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-vb0-f41.google.com (mail-vb0-f41.google.com
 [209.85.212.41]) by mxa.mailgun.org with ESMTP id 52b127cd.6a931b0-in1;
 Wed, 18 Dec 2013 04:42:53 -0000 (UTC)
Original-Received: by mail-vb0-f41.google.com with SMTP id p14so3171821vbm.28 for
 <std-proposals@isocpp.org>; Tue, 17 Dec 2013 20:42:53 -0800 (PST)
X-Received: by 10.58.155.162 with SMTP id vx2mr10108veb.46.1387341773109;
 Tue, 17 Dec 2013 20:42:53 -0800 (PST)
Original-Received: by 10.221.73.199 with HTTP; Tue, 17 Dec 2013 20:42:53 -0800 (PST)
In-Reply-To: <e2b8cee3-0977-4338-a7d9-d7876bffec2c@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:8156
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8156>

On Tue, Dec 17, 2013 at 10:45 PM, Michael Price - Dev
<michael.b.price.dev@gmail.com> wrote:
> constexpr auto library_name = "BEST"_cs;
> constexpr auto static_prefix = library_name + ": "_cs;
>
> static_assert(false, static_prefix + "Oops, did I say false"); // would

This can be build based on same technique of std::array;
you really don't need string literal those different in content
to have different types.

And they actually meet your requirements better, because
after being built at compile-time, std::array based string
can be modified at runtime.

Metaparse is cool, but think about it: all compilers can
parse at compiler time, and you want to parse at compile
time, then why you write yet-another parser?  If you want
a rich interface, I think this is a good solution:

  http://static.rust-lang.org/doc/0.6/tutorial-macros.html

if you just want a symbol table, then just ask compiler
to expose its symbol table...

-- 
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/.

.
