220 37376 <8fdfc016-2eb8-4888-9531-66310c80b457@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Jakob Riedle <jakob.riedle@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: `offsetof` in a macro-less, modular world
Date: Sat, 17 Mar 2018 03:11:11 -0700 (PDT)
Lines: 86
Approved: news@gmane.org
Message-ID: <8fdfc016-2eb8-4888-9531-66310c80b457@isocpp.org>
References: <c5f5ccc4-3267-442d-8cb2-de1ae103a38e@isocpp.org> <d9e85fb4-6296-44ee-81f8-7b8fdbc8822e@isocpp.org> <6725bbc8-a8db-40e1-a3f4-98ac05e23862@isocpp.org>
 <3998341.rfsqbO5A2U@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_4263_1238526659.1521281471848"
X-Trace: blaine.gmane.org 1521281361 18615 195.159.176.226 (17 Mar 2018 10:09:21 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 17 Mar 2018 10:09:21 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCX2XNFO6MPRBQOTWPKQKGQEPK2JQOY@isocpp.org Sat Mar 17 11:09:17 2018
Return-path: <std-proposals+bncBCX2XNFO6MPRBQOTWPKQKGQEPK2JQOY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vk0-f69.google.com ([209.85.213.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCX2XNFO6MPRBQOTWPKQKGQEPK2JQOY@isocpp.org>)
	id 1ex8m0-0004Yq-7c
	for gclcip-std-proposals@m.gmane.org; Sat, 17 Mar 2018 11:09:12 +0100
Original-Received: by mail-vk0-f69.google.com with SMTP id y20sf7904398vkd.12
        for <gclcip-std-proposals@m.gmane.org>; Sat, 17 Mar 2018 03:11:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=ntBywPqP+7L1xayTnpK4xG7BCwFBOHLVcSwUu31jMc8=;
        b=1YDrGOVglVUvF3z+cVEtCZsZrmGIxOq9XsU5DVIxc7uG5Iy82fbad6eFHaxyeIdSXI
         dVSzQ6Cf2SiZO1ibk11Y+Mk9Tg4IarhpJNaCybbWyOgBqVP98OpBOFP71Ep5HtXEo5SJ
         9bgehAUj5pJj23E8aTP5jliLYuxYneVNHaOqKe9jMMBAv44tfUzKq/FfX/V5SM6i4xVE
         iSx31qZFy1K9y0kduDdd+Gfk20ofmArousE1uwpOPUGqK5Jj2Bprfp93kfdmaDAboxjX
         yAztcL/oeAY6D9oWT0qYs/CUYbAazbnnoXJPH0RaTDSdTW4NB6cBb79HY+41bpxZvTpP
         Ng/Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=ntBywPqP+7L1xayTnpK4xG7BCwFBOHLVcSwUu31jMc8=;
        b=CpituT2CdEMkWBNG147GgHsO28IwiS+JW+l6q2fuha9QkJpfNokgXosVCXATdY3iO0
         l6kyATG03YwVdxYCZMI6ixn+sBoaXGfxNbLlZxC/DwLQs938uQk6DmrCML9ZJjoUqtdv
         ZXzSPYdV0LAj1zDeiJm0KTUaIECAw5ZHu0vqzQS8Ky2vxf0rv1A3v4FO80XdniUi8b6y
         5x1kOPwDpBjvRtDR2Cz2vqWdv3OdOuZPbK9p2jZSGVei7Gf3TQaGjvJsO7WPLxwgw49y
         E2UCWlSHV66JS9HbTAjS+GXTdNtAVWgXUKANfNJ5h9HE0WFK8X5op/uTVrYC4PA9gpLH
         fIQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=ntBywPqP+7L1xayTnpK4xG7BCwFBOHLVcSwUu31jMc8=;
        b=Vya7Vtx80z573rGwYoeJrwBr+6HIKNobICs52MPQam53l4aZU3TOaGSn1o8g0Ha3Yg
         WF5sOUSvJACPVDVUGSIClKIT1uF7lpb7N/c1m12saM8/nqbwYbq4SKNzZIYH4qRyVA/H
         a5OJz2vno+3XYwzTToTEeGjVXHpoNBOtSC0iaU/QBJDCKHvHilXd5qWy37Nyk/iiDSm7
         gSTwoGGXYxgfZxGU6DSJOijhR2QiyoRW/olFLH3iyYC2ZFfxFc4nmh0u+N380ilUGneB
         po63KnKlQWofJb/WvUSObDw9qli1kWOEKZ0VRxCZFahWG4s4VDTmwhb57RP5ZnlZVw8Z
         Hklg==
X-Gm-Message-State: AElRT7EPDGp2r7RXcsn5Wu7ZaCSFg+R/XvXWos6z+LuxKF8oly+nf/WX
	eEPxJ4aog0nQY9tAD11fONTIxQ==
X-Google-Smtp-Source: AG47ELvQXRWESy4Y4o3AFNJ3ueQmtZCvFb42YwyLRVBXEGajs6VJndCh5Ys5FUbYW8r4vaV8Ra3oIQ==
X-Received: by 10.159.54.36 with SMTP id r33mr2125761uad.2.1521281474069;
        Sat, 17 Mar 2018 03:11:14 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.31.146.138 with SMTP id u132ls4856922vkd.13.gmail; Sat, 17 Mar
 2018 03:11:12 -0700 (PDT)
X-Received: by 10.31.151.87 with SMTP id z84mr583432vkd.5.1521281472586;
        Sat, 17 Mar 2018 03:11:12 -0700 (PDT)
In-Reply-To: <3998341.rfsqbO5A2U@tjmaciei-mobl1>
X-Original-Sender: jakob.riedle@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:37376
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37376>

------=_Part_4263_1238526659.1521281471848
Content-Type: multipart/alternative; 
	boundary="----=_Part_4264_1670575124.1521281471848"

------=_Part_4264_1670575124.1521281471848
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable



Am Samstag, 17. M=C3=A4rz 2018 05:32:36 UTC+1 schrieb Thiago Macieira:
>
> The first step would be to make a (quick) survey of C++ uses of offsetof=
=20
> --=20
> that is, things that aren't just regular C code in C++ mode (think of=20
> Linux=20
> kernel's struct list[1]).=20
>

Hi Thiago,

as a first contribution to this survey :-), I recently used it to=20
determine, whether two attributes (used in two different memory layout=20
modes of a class) shaddow each other.
Here is the link to the spot (Line 667):
https://github.com/DuffsDevice/tinyutf8/blob/master/include/tinyutf8.h

I found this macro very useful in this spot and I'd be fine to have it=20
replaced by a built-in feature.

Hope this helps,
Jakob

--=20
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 e=
mail 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/8fdfc016-2eb8-4888-9531-66310c80b457%40isocpp.or=
g.

------=_Part_4264_1670575124.1521281471848
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>Am Samstag, 17. M=C3=A4rz 2018 05:32:36 UTC+1 schr=
ieb Thiago Macieira:<blockquote class=3D"gmail_quote" style=3D"margin: 0;ma=
rgin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">The first =
step would be to make a (quick) survey of C++ uses of offsetof --=20
<br>that is, things that aren&#39;t just regular C code in C++ mode (think =
of Linux=20
<br>kernel&#39;s struct list[1]).
<br></blockquote><div><br></div><div>Hi Thiago,</div><div><br></div><div>as=
 a first contribution to this survey :-), I recently used it to determine, =
whether two attributes (used in two different memory layout modes of a clas=
s) shaddow each other.</div><div>Here is the link to the spot (Line 667):</=
div><div><a href=3D"https://github.com/DuffsDevice/tinyutf8/blob/master/inc=
lude/tinyutf8.h">https://github.com/DuffsDevice/tinyutf8/blob/master/includ=
e/tinyutf8.h</a></div><div><br></div><div>I found this macro very useful in=
 this spot and I&#39;d be fine to have it replaced by a built-in feature.</=
div><div><br></div><div>Hope this helps,</div><div>Jakob</div><div><br></di=
v></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/8fdfc016-2eb8-4888-9531-66310c80b457%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/8fdfc016-2eb8-4888-9531-66310c80b457=
%40isocpp.org</a>.<br />

------=_Part_4264_1670575124.1521281471848--

------=_Part_4263_1238526659.1521281471848--

.
