220 24657 <87io1dlxx7.fsf@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Moritz Klammler <moritz.klammler@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: String class memory allocation
Date: Wed, 24 Feb 2016 20:18:28 +0100
Lines: 24
Approved: news@gmane.org
Message-ID: <87io1dlxx7.fsf@gmail.com>
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 1456341529 23408 80.91.229.3 (24 Feb 2016 19:18:49 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 24 Feb 2016 19:18:49 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDHI7IWJYALRBCEEXC3AKGQEE6MPX3Y@isocpp.org Wed Feb 24 20:18:35 2016
Return-path: <std-proposals+bncBDHI7IWJYALRBCEEXC3AKGQEE6MPX3Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f72.google.com ([74.125.82.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDHI7IWJYALRBCEEXC3AKGQEE6MPX3Y@isocpp.org>)
	id 1aYexG-0008Gi-U6
	for gclcip-std-proposals@m.gmane.org; Wed, 24 Feb 2016 20:18:34 +0100
Original-Received: by mail-wm0-f72.google.com with SMTP id g62sf12541719wme.1
        for <gclcip-std-proposals@m.gmane.org>; Wed, 24 Feb 2016 11:18:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:in-reply-to:message-id:user-agent:mime-version
         :content-type:x-original-sender:x-original-authentication-results
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=5uUqa1VS6AyCqGFdpCUwdrAu9L+6fy9gpqzuASxMzB8=;
        b=bsH5TnOZwvqC1Oiy75jtHTPt89lyvBUDKNMjFf/dx2jYGkaU/bAlPQOUhC7gsSDYea
         v3DnTgwyLeLMJxqMTP/ySZpIj34EJV5C+pPF0qSs1plGFwC2ZosFqxwx7UsThO9u1TbD
         bS9fF8y+ZDNtN4w2WsLTwaI9HwafptaLxnx4NIM/+TO/XrmU2X8r4BKtxs3EwZeeKljT
         H42pvCgPluhWTY0XQBECzhXUfdldo9YuBEpTS3fB16HVJlQLoTGsJ0kos7F14DLIGyM9
         I6ujPN9fmo5hPqWNAyLjSixIjZd1KoH5eiDVyrFGopWP1YrbVs4lBB2+3CGXPIyz+GAA
         94Ug==
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:in-reply-to:message-id
         :user-agent:mime-version:content-type:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=5uUqa1VS6AyCqGFdpCUwdrAu9L+6fy9gpqzuASxMzB8=;
        b=RKIAYfacSCzKew3zO1TaG9KKftFOKCVAbQzsG4tn3iD3ZUtFW+k1wlwkrspSeeAb0/
         xvgS5monPRdAiGcaObITFOvVGTdHgA4i/5yZZfScVbmM8Tq03ZhsI3+ZelnvD/jz7exQ
         j61b2YVrMk0ZaPWvpXa2LuzPZk00AMXKf4uF13ixaHn0w8oYehrdLz2l1FHk3au598wJ
         4Ae9NmjveK9lTg50qYbN82/GPLDBxiETEhfhtaGMgtw84B5JuDi1Sj0GRDhp73uA2SPf
         QVXP/eIPFbDc8Nx+QZ2hXP23ZEo/bSSCWAqPWPc34VCbzlbLthU8cc2gCwrtjAuexrMt
         XeFQ==
X-Gm-Message-State: AG10YOQ6IXBSyAzOY6iyMT+MNnUw4/ixDQMhubT4t8wH4XNFRAU/guAzecEayLiWGrK/MA==
X-Received: by 10.194.216.3 with SMTP id om3mr5090154wjc.7.1456341514145;
        Wed, 24 Feb 2016 11:18:34 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.47.195 with SMTP id v186ls147339wmv.21.gmail; Wed, 24 Feb
 2016 11:18:32 -0800 (PST)
X-Received: by 10.28.156.199 with SMTP id f190mr24940915wme.83.1456341512604;
        Wed, 24 Feb 2016 11:18:32 -0800 (PST)
Original-Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com. [2a00:1450:400c:c09::22f])
        by mx.google.com with ESMTPS id w188si5842649wmg.123.2016.02.24.11.18.32
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 24 Feb 2016 11:18:32 -0800 (PST)
Received-SPF: pass (google.com: domain of moritz.klammler@gmail.com designates 2a00:1450:400c:c09::22f as permitted sender) client-ip=2a00:1450:400c:c09::22f;
Original-Received: by mail-wm0-x22f.google.com with SMTP id a4so3376660wme.1
        for <std-proposals@isocpp.org>; Wed, 24 Feb 2016 11:18:32 -0800 (PST)
X-Received: by 10.194.57.244 with SMTP id l20mr21846079wjq.45.1456341512384;
        Wed, 24 Feb 2016 11:18:32 -0800 (PST)
Original-Received: from moritz-desktop (HSI-KBW-46-223-128-55.hsi.kabel-badenwuerttemberg.de. [46.223.128.55])
        by smtp.gmail.com with ESMTPSA id l7sm4401842wjx.14.2016.02.24.11.18.30
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Wed, 24 Feb 2016 11:18:30 -0800 (PST)
In-Reply-To: Nicol Bolas's message of "Wed\, 24 Feb 2016 09\:54\:23 -0800 \(PST\)
	\(1 hour\, 18 minutes\, 22 seconds ago\)"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
X-Original-Sender: moritz.klammler@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of moritz.klammler@gmail.com designates 2a00:1450:400c:c09::22f as
 permitted sender) smtp.mailfrom=moritz.klammler@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:24657
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/24657>

Nicol Bolas <jmckesson@gmail.com> writes:

> On Wednesday, February 24, 2016 at 12:36:26 PM UTC-5, Moritz Klammler wrote:
>>
>> Given that we already have `std::array` and almost certainly will
>> have `std::string_view` soon, I think that this isssue is solved.
>>
>
> `string_view` will not obviate the need for a fixed-length string
> class.  And `array<char>` is not a string; it's an array of char.

In case this wasn't clear, my point is of course that you can use
`std::array` to *store* the data and *atop of that* a `std::string_view`
to *access* it through the "string interface" the OP requested.  In the
same way, you could combine `std::vector` and `std::string_view` to get
a dynamically-sized string, if there wouldn't already be the superior
(thanks to SSO) `std::string`, of course.

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/87io1dlxx7.fsf%40gmail.com.

.
