220 17701 <7b8abc94-1928-4f61-82c2-75711d0b7a50@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Igor Baidiuk <target.san@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: =?UTF-8?Q?=5Bstd=2Dproposals=5D_Re=3A_Proposal=3A_Class_static_=E2=80=9Cproper?=
	=?UTF-8?Q?ty=E2=80=9D_constants_in_vtables?=
Date: Tue, 5 May 2015 09:37:02 -0700 (PDT)
Lines: 84
Approved: news@gmane.org
Message-ID: <7b8abc94-1928-4f61-82c2-75711d0b7a50@isocpp.org>
References: <49c358a2-d19a-415f-a4fa-1ff67286a0ad@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_442_284785086.1430843822245"
X-Trace: ger.gmane.org 1430843825 5991 80.91.229.3 (5 May 2015 16:37:05 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 5 May 2015 16:37:05 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDK4F76SSIIBBLXDUOVAKGQE5BCDZSI@isocpp.org Tue May 05 18:37:04 2015
Return-path: <std-proposals+bncBDK4F76SSIIBBLXDUOVAKGQE5BCDZSI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f198.google.com ([209.85.223.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDK4F76SSIIBBLXDUOVAKGQE5BCDZSI@isocpp.org>)
	id 1YpfqC-0005gB-9v
	for gclcip-std-proposals@m.gmane.org; Tue, 05 May 2015 18:37:04 +0200
Original-Received: by ierk9 with SMTP id k9sf312615225ier.1
        for <gclcip-std-proposals@m.gmane.org>; Tue, 05 May 2015 09:37:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :content-type:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=Y2q4uW6P9Ci0vTE5+AE91R5jol0OnQklTc1Y7HHtLcs=;
        b=tZM57m/qgQuWOjM77B+NqQEPc1LoU7UitXijoaG7xDEpuVC7DYl1lQHBrJK/DHpkBH
         4y/UwcaYlCftkUf+OyjN3YTjj+E5KQ4phXo/ravh6caC/2ukOGha5D/RkrFt0zcBZnT7
         /nuF8gDD/Iax8rE4LbhSlOUnZlX2q9YwTa+FQOmuJKMYsgLm/pww2qS6L7xwljSluANs
         Nbzk/4mcI0/5FMMRcFSVQwqDwOpifeBCmYrm5dIzQVd8w56hMyD5l2AHNzQKxcsFpPNs
         qlxPWUsJpKvuARXzCJaWC2B0ugeaLDSAJKGhvWxASSeNWHkqxtOSAmNxgRpLU3tj0icB
         mchA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:content-type:x-original-sender:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=Y2q4uW6P9Ci0vTE5+AE91R5jol0OnQklTc1Y7HHtLcs=;
        b=inEw//baSp6Mwno/gAIa/cEbiaVcx3mny9t9uysrwMGMrpfhrN5/PaJm6/lBKhfoI+
         7kgfdDsbvkNyYQKlzMVzJ9mnEOcsSjMdutKbX2WmltBrt/BHWUHCJdD0G2cWjkF5wlOc
         +nj3rHDVcI+5MpXbUpb1TPu3b9SvMwCmWw+pz4mj+qZ3zrDIE5Gosl+jwPgPdj85Uvue
         NxaPOuwrczGZ1M6p1LyUGmqsY2Z+FxwcZk3OGULHG3OJey07mssJZ4VFOrohz66M2YHu
         QTh+kYwACsufCruGEZxBY5EccLfF72SPvAZZPnFinxNy7h1x/fiY4sNbzQdlzOffBvLH
         Yn1Q==
X-Gm-Message-State: ALoCoQmdZrgvcyfc/FtN8d8qw2QFgnYGXooeYwAI7BAtIsQqFevGxRrO0seM3/q6MY5gjLy+Wjp3
X-Received: by 10.182.29.70 with SMTP id i6mr50882972obh.27.1430843823455;
        Tue, 05 May 2015 09:37:03 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.109.71 with SMTP id k65ls387567qgf.48.gmail; Tue, 05 May
 2015 09:37:02 -0700 (PDT)
X-Received: by 10.140.84.202 with SMTP id l68mr290668qgd.5.1430843822752;
        Tue, 05 May 2015 09:37:02 -0700 (PDT)
In-Reply-To: <49c358a2-d19a-415f-a4fa-1ff67286a0ad@isocpp.org>
X-Original-Sender: target.san@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>, <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: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:17701
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/17701>

------=_Part_442_284785086.1430843822245
Content-Type: multipart/alternative; 
	boundary="----=_Part_443_662716414.1430843822245"

------=_Part_443_662716414.1430843822245
Content-Type: text/plain; charset=UTF-8

Frankly speaking, I don't see what should it solve.
If you know type statically, then you use template programming, static 
constexpr members.
If you don't know type statically, then you'll need to go through vtable 
anyway to know exact type.
If this is a shortcut for 'virtual getSomeConstant', then please note that 
constant should be allocated somewhere in vtable and be perfectly 
constexpr. Not very flexible.
And BTW vtable structure is implementation-defined.

On Tuesday, May 5, 2015 at 7:21:24 PM UTC+3, John Yates wrote:
>
> I have been writing embedded systems in C++ for nearly 20 years.  
> Repeatedly I have encountered a desire to access class properties more 
> cheaply that via a call to a virtual method.  This seems (at least to me) a 
> very natural extension of C++ storage specifiers and the semantics of 
> virtual name lookup.  I have finally  gotten around to writing a brief 
> proposal 
> <https://docs.google.com/document/d/1Y0_MG7MgoUDHGQGh4IZcAWRRO9I4Xy-WjwgQe19iT1g/edit?usp=sharing>. 
>  Very curious what other may think.
>

-- 

--- 
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/.

------=_Part_443_662716414.1430843822245
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Frankly speaking, I don't see what should it solve.<br>If =
you know type statically, then you use template programming, static constex=
pr members.<br>If you don't know type statically, then you'll need to go th=
rough vtable anyway to know exact type.<br>If this is a shortcut for 'virtu=
al getSomeConstant', then please note that constant should be allocated som=
ewhere in vtable and be perfectly constexpr. Not very flexible.<br>And BTW =
vtable structure is implementation-defined.<br><br>On Tuesday, May 5, 2015 =
at 7:21:24 PM UTC+3, John Yates wrote:<blockquote class=3D"gmail_quote" sty=
le=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left=
: 1ex;"><div dir=3D"ltr"><span style=3D"font-family:arial,sans-serif;font-s=
ize:small">I have been writing embedded systems in C++ for nearly 20 years.=
&nbsp; Repeatedly I have encountered a desire to access class properties mo=
re cheaply that via a call to a virtual method. &nbsp;This seems (at least =
to me) a very natural extension of C++ storage specifiers and the semantics=
 of virtual name lookup. &nbsp;I have finally &nbsp;gotten around to writin=
g a <a href=3D"https://docs.google.com/document/d/1Y0_MG7MgoUDHGQGh4IZcAWRR=
O9I4Xy-WjwgQe19iT1g/edit?usp=3Dsharing" target=3D"_blank" rel=3D"nofollow" =
onmousedown=3D"this.href=3D'https://docs.google.com/document/d/1Y0_MG7MgoUD=
HGQGh4IZcAWRRO9I4Xy-WjwgQe19iT1g/edit?usp\75sharing';return true;" onclick=
=3D"this.href=3D'https://docs.google.com/document/d/1Y0_MG7MgoUDHGQGh4IZcAW=
RRO9I4Xy-WjwgQe19iT1g/edit?usp\75sharing';return true;">brief proposal</a>.=
 &nbsp;Very curious what other may think.</span><br></div></blockquote></di=
v>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_443_662716414.1430843822245--
------=_Part_442_284785086.1430843822245--

.
