220 37347 <2034613.rN3AoRdNao@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: `offsetof` in a macro-less, modular world
Date: Thu, 15 Mar 2018 16:12:44 -0700
Lines: 28
Approved: news@gmane.org
Message-ID: <2034613.rN3AoRdNao@tjmaciei-mobl1>
References: <c5f5ccc4-3267-442d-8cb2-de1ae103a38e@isocpp.org> <8745898.m7JMjNCkYK@tjmaciei-mobl1> <08d4fa62-ab7d-f257-5a50-fc77f4d35a24@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1521155446 14440 195.159.176.226 (15 Mar 2018 23:10:46 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 15 Mar 2018 23:10:46 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRB373VPKQKGQE5FITL2I@isocpp.org Fri Mar 16 00:10:42 2018
Return-path: <std-proposals+bncBCB4TK757YBRB373VPKQKGQE5FITL2I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qk0-f200.google.com ([209.85.220.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRB373VPKQKGQE5FITL2I@isocpp.org>)
	id 1ewc1B-0003fu-JF
	for gclcip-std-proposals@m.gmane.org; Fri, 16 Mar 2018 00:10:41 +0100
Original-Received: by mail-qk0-f200.google.com with SMTP id e6sf5478374qkf.19
        for <gclcip-std-proposals@m.gmane.org>; Thu, 15 Mar 2018 16:12:48 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1521155568; cv=pass;
        d=google.com; s=arc-20160816;
        b=Fynf8cuHkfdpg8X3eRz2t/oXTt0DjVh9buphENTUFfSmA/3BVhao3sMdl/Fbp9DI6c
         ZGNtFKVgjbAtNEw4PzBR2eGUHJu0j+mJJYBxxSmJXzXN/j4YNFsCDEFFhSqxXfd3fio2
         1WeIoHipkmSqI0EIzcpnjKT9U0sLMgEaw0zJd/UrZ0jJV/6E29J2IQ7wXSYOkYwmHTGE
         v57dKjumj57T7rRSlyUKqLcoGMKWIfplueENqmGfQ9Sx/kFoi6iQRzT1NY20tDA6BuGi
         k4Q28UezWjVTc+0WBkKQHA0zeKUGNYmi23aIZfBuAhN4M/zcMVtDc3zNsS+QWZCy35z7
         G3gQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:mime-version:references
         :in-reply-to:message-id:date:subject:to:from
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=3aiGHWIjxzdvRUqyw64w+wZ+hQyq+jlpQ2brUtwOmrA=;
        b=ZJ6j1uPoOqx6RlJebRe5prvfovLbZawDUai2oqVWquzahnv7+PW9uRU+GnPJ6MomsI
         xhW6wmGzmxi1zKVsFU9UWGCE3WrDqmlyiFdbdCR4mL44dSDXG8cziTqpMePFf3Xo0zCu
         c+rOt3reY7+LeXgbwJ8nDfXE4qxpVfEPiO7xcMGUFa2uWmE2ApEnWvyN93SyUEKkXLk6
         gq9IQnf7tBy9Ocltw1O+h5U8Ihws6KiQRONfHA1jREWQ0G0GU1gVsan5pQXJiM1X5zoq
         piyJAuntb7BBps6ii7cfQbf9tEB8fpNHeDdiosSEueHMVAdlcqlwRAN4XzuV8IeUGkgy
         P1Cw==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 2001:19f0:5:2221::1:3 as permitted sender) smtp.mailfrom=thiago@macieira.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id:in-reply-to:references:mime-version
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=3aiGHWIjxzdvRUqyw64w+wZ+hQyq+jlpQ2brUtwOmrA=;
        b=qYbsANMpWnSX5PepPEd9n87i1Gdpm0AZsIWAHdDn6o1qryZH5bYx9DLYGQXTX/UfLq
         MuOyHPOXBZCHPMP0OEeehT18RWVGKl6Hvjr3MMR2mQ7QGU7LYQhSc/Y/eoswYYP/Y/T5
         u5AbBLYhYz0gdydxAeRt2Io1AmeRdVV2X21hJlwAXf4PVNgrvQIwzZpCN5CpcxbY4y+z
         RtrjkGIja8wQ4hjl2zgIBl0PUJgjLeSxSYe3d9oP38VcI/eivjxl03zpRjDLwM1YYGKa
         rvFvJFTrylcLl5QKysDyKm+vwPShl/tPBSm4gXN+kNqmb+a1WMd8SQJ0JzGVJf0kPIUY
         YFVA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
         :references:mime-version: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=3aiGHWIjxzdvRUqyw64w+wZ+hQyq+jlpQ2brUtwOmrA=;
        b=T9LnAXA7m4hjQidUxQADqn034wcilgMyYyvSMDhcx3nmB5NOYVddopY+sYkmJYgm0z
         cI3K974afi54fpomBvneqrc3Rk+YPncDYXP82sihKtknK66yn/IbQ1KbEzpGo3qTL3ep
         z50tj+V7AdCnXP5hbC1WAQTDijOyNM+jvcVquKLhYwxsUVzHzEAjnZtOM20GMi3GA6Ce
         L25L8wiv5Q2XsYUGN51PLsbOz4Bg9OtGBOcw2rIPik5J+cdhy5Y/HO5CSnWq+u4dVevZ
         DgC6c0isayNZAYmBey7GhGmLHoCAH7IOJGBmq6UG+JBur3/6ALRRl+EkGMJd0pef/u7o
         ezeA==
X-Gm-Message-State: AElRT7HJeiMWd1RdBf5ahmZeQpfG3LJdf+5qyJeUMkPvYprGUK25Dd/y
	r0iHNSVNIJcQlAPNlkMAro2lBA==
X-Google-Smtp-Source: AG47ELvUC5LsKhUPFqxjEcNLQv/y5Iz69H+IRKf3m84q9EI1vo8PwU6FfQt1klml6UNkkjB0ilvR7Q==
X-Received: by 10.55.77.133 with SMTP id a127mr2846773qkb.25.1521155568135;
        Thu, 15 Mar 2018 16:12:48 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.200.44.152 with SMTP id 24ls3344113qtw.0.gmail; Thu, 15 Mar
 2018 16:12:47 -0700 (PDT)
X-Received: by 10.237.54.161 with SMTP id f30mr2267010qtb.128.1521155567203;
        Thu, 15 Mar 2018 16:12:47 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1521155567; cv=none;
        d=google.com; s=arc-20160816;
        b=u8e+QAJVKa7tO6uG01HZSevizZVT/q7YRI2awJkJ6fzRx0x8VxM5Cey89HJP0vlx/g
         vOCgZehMXndYna9s+9lEzrWv2bxZmMASX39EViAdOF8sNu9y0f73T9So9VjSe+lTbH3N
         BSHS65KMtjkXVtfxzv7ct55VkVBMeAgzLjiGzFt8WR2lU1+dniavRF7P+NYtcpGQsu1+
         rbkzt2gzhk3z0fATz8kA96Yt3G9ygn9xsIx+9vd5KuAr0kXGCB7pa/3S/EePLSw+/d8I
         BhdPgV54fpFX+Ao8Ng8usi/t1sJfvE7stHiacWgZ5JNQxCD/b/f5X7eYuXNAcuqs6Wsy
         x79g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:to:from:arc-authentication-results;
        bh=zHhxGfHIZXmEbP49gy6UsrPm/34pGnxtIW5gghNH4p8=;
        b=JZNCtF5AXYfaYaxCKowYj5iHKPD6omVPBS/uprcXwt66ywCXAvbB4z0ObuV+2ZLTiQ
         rEohJHxwC23Qnv2ojs96oMb2EpR4bp5tABIZCYB2svqxugs8jt96wAiiCytuFFZcqS7e
         oT4sc+hDcHFcPaTu1DM6lA2zH4IaqsFoDf42fz1teZAuXNk1Dar3HgAlr4BkaCUsu35v
         NlcBTxs/PXzMiEfJIVJwsbyECJyON/baLkWmiQ1He3k52aqiOLBh8JlPder+OAAwV38W
         fkLiqmOtBj1kfsQIme7wAZnaSM7htbHRDWyBn/yevup16tZL90pszDTPpzHtJ/D72YaV
         rNUg==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 2001:19f0:5:2221::1:3 as permitted sender) smtp.mailfrom=thiago@macieira.org
Original-Received: from smtp.macieira.info (smtp.macieira.info. [2001:19f0:5:2221::1:3])
        by mx.google.com with ESMTPS id s42si3597431qts.89.2018.03.15.16.12.46
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Thu, 15 Mar 2018 16:12:46 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2001:19f0:5:2221::1:3 as permitted sender) client-ip=2001:19f0:5:2221::1:3;
Original-Received: from tjmaciei-mobl1.localnet (jfdmzpr05-ext.jf.intel.com [134.134.139.74])
	by smtp.macieira.info (Postfix) with ESMTPSA id DCDB5A65F
	for <std-proposals@isocpp.org>; Thu, 15 Mar 2018 16:12:45 -0700 (PDT)
In-Reply-To: <08d4fa62-ab7d-f257-5a50-fc77f4d35a24@gmail.com>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2001:19f0:5:2221::1:3 as permitted
 sender) smtp.mailfrom=thiago@macieira.org
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:37347
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37347>

On Thursday, 15 March 2018 13:53:54 PDT Andrey Semashev wrote:
> On 03/15/18 22:41, Thiago Macieira wrote:
> > On Thursday, 15 March 2018 10:21:05 PDT Nicolas Lesser wrote:
> >> Not that I know of. This was mentioned in passing while discussing P0908,
> >> where it was suggested to make it an operator.
> > 
> > I'd bring back the idea of using pointers to members as a complete
> > replacement for offsetof.
> 
> P0908 suggested something along these lines and it was rejected.

That's not what I meant.

I meant not using offsetof at all. All uses of offsetof can be replaced with a 
pointer to member or pointer to container.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center



-- 
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/2034613.rN3AoRdNao%40tjmaciei-mobl1.

.
