220 8133 <CAGsORuAv7xKEXMsUfWd04tkBULXRVM90RqQguJfdqkX1KbLsPg@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: Sun, 15 Dec 2013 23:52:52 -0500
Lines: 47
Approved: news@gmane.org
Message-ID: <CAGsORuAv7xKEXMsUfWd04tkBULXRVM90RqQguJfdqkX1KbLsPg@mail.gmail.com>
References: <d9fcae4a-7452-4660-8053-1386f851951f@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 1387169570 21408 80.91.229.3 (16 Dec 2013 04:52:50 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 16 Dec 2013 04:52:50 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCSKRWMD4EHBBJ4OXKKQKGQEDTQRCOI@isocpp.org Mon Dec 16 05:52:58 2013
Return-path: <std-proposals+bncBCSKRWMD4EHBBJ4OXKKQKGQEDTQRCOI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f199.google.com ([209.85.223.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCSKRWMD4EHBBJ4OXKKQKGQEDTQRCOI@isocpp.org>)
	id 1VsQAr-0004f7-3k
	for gclcip-std-proposals@m.gmane.org; Mon, 16 Dec 2013 05:52:57 +0100
Original-Received: by mail-ie0-f199.google.com with SMTP id lx4sf16547611iec.10
        for <gclcip-std-proposals@m.gmane.org>; Sun, 15 Dec 2013 20:52:56 -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=+lm1lXzSAICKnE9UAsGaciFuwe4QZ2XzCkeU+D3f5As=;
        b=lyr0Urue5aVadBtqRaJHj6+dHv20tsYRHCVAm1dwBW/Yx2AZ/PCJOVFaGr1iUGX74Z
         dTheH2mtCQyh8gJQ5hT+H5FhPP3rX7NOUrVsSUata5ogk13G1SY3635WTtPNotKgRVxj
         s+UBorumYZuIk7Wzok977IEtTFfKnSC9h6cERlrhh1qZHDBapv1E4kttCqd3Ywbzj23h
         gUA6m2lMryfyTM2BVv5Kq6fcNnpz8ZGxZI9SFk+2bQoNQXZe/b59/48Q3zmmXAi7R6aC
         4ZV73hbsiRyOAqcl9xR4q7sHQYlzpQU2JYBnnYs3oLBcSz39KJmADj4XalpguoLzDZS0
         auaA==
X-Gm-Message-State: ALoCoQl8QjrxMlIk1AvXePtP4MbYNFK9JG285M2TrVFY7gHD6JgyHT6qezv4ENSJUYM+QIwtdj09
X-Received: by 10.182.111.134 with SMTP id ii6mr179911obb.38.1387169576015;
        Sun, 15 Dec 2013 20:52:56 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.29.197 with SMTP id m5ls1877278qeh.43.gmail; Sun, 15 Dec
 2013 20:52:55 -0800 (PST)
X-Received: by 10.236.207.73 with SMTP id m49mr10816166yho.5.1387169575241;
        Sun, 15 Dec 2013 20:52:55 -0800 (PST)
Original-Received: from mail-s68.mailgun.info (mail-s68.mailgun.info. [184.173.153.196])
        by mx.google.com with ESMTP id x29si11335709yha.186.2013.12.15.20.52.54
        for <std-proposals@isocpp.org>;
        Sun, 15 Dec 2013 20:52:55 -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-f46.google.com (mail-vb0-f46.google.com
 [209.85.212.46]) by mxa.mailgun.org with ESMTP id 52ae8724.5647130-in2;
 Mon, 16 Dec 2013 04:52:52 -0000 (UTC)
Original-Received: by mail-vb0-f46.google.com with SMTP id w20so2833441vbb.33 for
 <std-proposals@isocpp.org>; Sun, 15 Dec 2013 20:52:52 -0800 (PST)
X-Received: by 10.58.146.71 with SMTP id ta7mr3138951veb.23.1387169572406;
 Sun, 15 Dec 2013 20:52:52 -0800 (PST)
Original-Received: by 10.221.73.199 with HTTP; Sun, 15 Dec 2013 20:52:52 -0800 (PST)
In-Reply-To: <d9fcae4a-7452-4660-8053-1386f851951f@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:8133
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/8133>

On Sun, Dec 15, 2013 at 10:26 PM, Michael Price - Dev
<michael.b.price.dev@gmail.com> wrote:
> I'm considering writing up a proposal to standardize a library type that
> represents a compile-time sequence of character literals.  I'm looking for a
> first round of feedback.  You can view my prototype implementation at
> https://github.com/michaelbprice/cxx_snippets/blob/master/string_literal/string_literal.cpp
>
> I'm using the top-of-trunk clang to compile with the following command-line:

I think you know that the language feature you used

  http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3599.html

is not a part of C++14.

Anyway.

What's the different between `make_array("str")` and "str"_cs?

  http://isocpp.org/files/papers/N3824.html

 1. string_literalS are different in types (works with template);
 2. string_literal cannot be modified;
 3. string_literal has some algorithms as member functions.

So what is the problem you want to solve?  Compile-time parsing?
If so, Bristol EWG says:

 1. don't think template instantiations is the only way to do it;
 2. doubt user to overuse it (a compile time SQL parser is fun,
    but what you gain?);
 3. need use cases.

-- 
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/.

.
