220 3789 <2b72b613-965d-4273-898e-871dad3db413@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Mikhail Semenov <mikhailsemenov1957@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Dynamic Arrays: simple syntax
Date: Sat, 20 Apr 2013 12:58:38 -0700 (PDT)
Lines: 75
Approved: news@gmane.org
Message-ID: <2b72b613-965d-4273-898e-871dad3db413@isocpp.org>
References: <5ddeccbe-40d0-4894-afc5-c0105136b5d7@isocpp.org>
 <d239d1ff-d9ca-4f02-8dff-9b99a31f29e3@isocpp.org>
 <CAMeU-s0-h1jLBKw3omD0w7u9OpEBfnitr5_Tq65-PZfQn_OvMA@mail.gmail.com>
 <e22b1c93-d6d2-4d71-952d-d519cd3c446a@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_405_25498625.1366487919073"
X-Trace: ger.gmane.org 1366487919 12152 80.91.229.3 (20 Apr 2013 19:58:39 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 20 Apr 2013 19:58:39 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDC55PNFRYGRB4HGZOFQKGQEGGHJKVY@isocpp.org Sat Apr 20 21:58:43 2013
Return-path: <std-proposals+bncBDC55PNFRYGRB4HGZOFQKGQEGGHJKVY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ye0-f199.google.com ([209.85.213.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDC55PNFRYGRB4HGZOFQKGQEGGHJKVY@isocpp.org>)
	id 1UTdvn-0008Ge-1e
	for gclcip-std-proposals@m.gmane.org; Sat, 20 Apr 2013 21:58:43 +0200
Original-Received: by mail-ye0-f199.google.com with SMTP id l14sf8075264yen.6
        for <gclcip-std-proposals@m.gmane.org>; Sat, 20 Apr 2013 12:58:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=x-received:x-beenthere:x-received:date:from:to:message-id
         :in-reply-to:references:subject:mime-version:x-original-sender
         :reply-to:precedence:mailing-list:list-id:x-google-group-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=x/9QkpWBO86bYVIfBrkZqTc7CqROT3AcRGkurtwwMq4=;
        b=DCHjSt9FfXxpZv/JAsN/4rma+mUsl309qzZBpU3Y//MHKpl35yHiY+a8gHXaDNQk2E
         ghjrnJ9xaE3vdeFhQAhF5uPJ2Bpbp52+hRXDUQ/C14PV5W+hnYw6v6P6VlJAN3mFMl5d
         rKXUlJtY/kNDvo3e7xsybcFd+IQK6FPV7MH+0pW2g0n76FFdtGH5VWSxlvuul74EPDZv
         A1EW3HZcEKwfDCkb+mtqCTibtW4/NxnNtsOv8UOITcamciAv6la7WjBcuAR4BvzKaPtk
         1Pz4Tguz9ZU6wuoc8PolLA5u4Pld17LkS53CkkAp8lIsj6qcJlqIPavfm/IxpAJq8nan
         44fQ==
X-Received: by 10.224.178.205 with SMTP id bn13mr14751344qab.3.1366487922215;
        Sat, 20 Apr 2013 12:58:42 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.35.39 with SMTP id e7ls2751686qej.58.gmail; Sat, 20 Apr
 2013 12:58:39 -0700 (PDT)
X-Received: by 10.49.4.169 with SMTP id l9mr579950qel.29.1366487919541;
        Sat, 20 Apr 2013 12:58:39 -0700 (PDT)
In-Reply-To: <e22b1c93-d6d2-4d71-952d-d519cd3c446a@isocpp.org>
X-Original-Sender: mikhailsemenov1957@gmail.com
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?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:3789
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/3789>

------=_Part_405_25498625.1366487919073
Content-Type: text/plain; charset=ISO-8859-1

The sizeof() is statically defined; there is no way to define it properly 
dynamically.
It is possible to forbid the assignment altogether, but the efficiency will 
be lost in some cases.
 
Another approach is not to allow default assignment, but to allow operator= 
to be defined by the user, which may check for the sizes (sizes can be 
stored as class members) and produce an exception when they don't match.
Anyway, these are the details that can be addressed. 
 

On Saturday, April 20, 2013 7:39:08 PM UTC+1, DeadMG wrote:

> So, just to summarize:
>
>    - You want a sizeof() that doesn't actually represent the size of the 
>    object.
>    - You want operator= to be enabled or disabled based on a run-time 
>    variable.
>
> Neither of these are possible.
>

-- 

--- 
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/?hl=en.



------=_Part_405_25498625.1366487919073
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>The sizeof() is statically defined; there is no way to define it prope=
rly dynamically.</div><div>It is possible to forbid the assignment altogeth=
er, but the efficiency will be lost in some cases.</div><div>&nbsp;</div><d=
iv>Another approach is not to allow default assignment, but to allow operat=
or=3D to be defined by the user, which may check for the sizes (sizes can b=
e stored as class members) and produce an exception when they don't match.<=
/div><div>Anyway, these are the details that can be addressed. </div><div>&=
nbsp;</div><div><br>On Saturday, April 20, 2013 7:39:08 PM UTC+1, DeadMG wr=
ote:</div><blockquote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.=
8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-=
width: 1px; border-left-style: solid;">So, just to summarize:<div><ul><li><=
span style=3D"line-height: normal;">You want a sizeof() that doesn't actual=
ly represent the size of the object.</span></li><li><span style=3D"line-hei=
ght: normal;">You want operator=3D to be enabled or disabled based on a run=
-time variable.</span></li></ul><div>Neither of these are possible.</div></=
div></blockquote>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_405_25498625.1366487919073--

.
