220 32873 <de5bfa10-e0bf-4669-b6ef-bf008d6676a4@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Joseph Martin <pythoner6@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Extending Bitfields
Date: Sat, 24 Jun 2017 22:46:58 -0700 (PDT)
Lines: 260
Approved: news@gmane.org
Message-ID: <de5bfa10-e0bf-4669-b6ef-bf008d6676a4@isocpp.org>
References: <289ee4d8-01ce-4628-b788-0e128c8be2d9@isocpp.org>
 <CABPJVnTemri7jarrF9HVQtRcstyj5E6CEex43X2S9RcM3sFLMw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1457_573946451.1498369618518"
X-Trace: blaine.gmane.org 1498369622 12702 195.159.176.226 (25 Jun 2017 05:47:02 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sun, 25 Jun 2017 05:47:02 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC323BUL2IMRBU44XXFAKGQENFXGJBA@isocpp.org Sun Jun 25 07:46:57 2017
Return-path: <std-proposals+bncBC323BUL2IMRBU44XXFAKGQENFXGJBA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ua0-f198.google.com ([209.85.217.198])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC323BUL2IMRBU44XXFAKGQENFXGJBA@isocpp.org>)
	id 1dP0Nr-0002st-BE
	for gclcip-std-proposals@m.gmane.org; Sun, 25 Jun 2017 07:46:55 +0200
Original-Received: by mail-ua0-f198.google.com with SMTP id l38sf25916444uaf.1
        for <gclcip-std-proposals@m.gmane.org>; Sat, 24 Jun 2017 22:47:00 -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=cHDEgvLYWTcoCHdGw19MjseDVjcn/sfM9jdqo2mVMSE=;
        b=sbm6AYzBoPlBJODQSeBG+ZOnMWG5RHx7YmyzHlOAeRSpI/7LFVvya/7sy9TtunZEiB
         Exy1z2EvWu3U8ZX8YoWuXT7JhjAiy8+Be5bO5sX8NdmYDI0DZb6/XozbGGZMgnl4NOdn
         wKR12Q4qPVu6QrDg7rzDQu5hqYu9ljPKIM1K1HcFUEJ/MaWj9hye8iERVDHcZ98XS6a1
         xaRBpK6IQxUl+l2IOu6gi8K3rB6lkyQeEtC0XcdFfxSX/oO/IfvihpBLVmvgOBtw2oTK
         N7DEwrKOSbSfwyROde/BT7+NIEC8fhX50zCu3E9Tu5MToFhJRyJJiC/041IkwAy3JVVE
         8CsA==
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=cHDEgvLYWTcoCHdGw19MjseDVjcn/sfM9jdqo2mVMSE=;
        b=AIkYHd1Tj4z47MKzgcKJb5eWya9gjROvE3KCF4h2fp0yTcG3vbfQffa/tfx4sBFy0q
         VIWM3I4I2C77WxYQh+DPW/NVypFBKDFF/KqU2eGAj5e0YAoVlE9ZOaR2YaV0f/JA8qR/
         x5KtTL2eK+tyiwMRwC1I2Vfku6/kgVCaGGCY3FhTNj00DNaFpRivJqtcHD/VQag7TV/8
         LRQos1fw5TAttpHWW0BZ/OJK6x/B4VtURL1AGO7AxGxAmZnR2Dp6WokPfYP7eVABzD9L
         kr/v/bBmGtDYaRliImNV6dFX8HTzegZxyO9iZHeXwBGjcBAXxvf5HS4ybRSMXms1bKgV
         1mCw==
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=cHDEgvLYWTcoCHdGw19MjseDVjcn/sfM9jdqo2mVMSE=;
        b=FwEL23VYCPS2DjheVXZ1/j2IQA1UL8eQ0QtGkuT8nFTV1HZAICcJzCnsIZEGY1VRye
         WXEJNTTuK5p8yYZAN5JGc24uItk2vtWKkmGcSGp2nExRtBL6IBBX1kdnVzvztEfb3par
         dDxGL975N/wRsvWTl2T1bOBcCMnlkyybpM0UE7S2m1+yzjJUTOqN6DHKIW47fWzjt0nt
         0H/xUXFf11VDxyciJb3nLxWhS3WuZENJWM8pouAK+8UoW6iN0vuzsLuiMe4TTE8EQLqf
         uu7julyNx/ViHnrM1H5VMNFghVulBllUaMkpVi9GqUDRJdKZQOpmRfL3z0x5a+2kIQvF
         ygzQ==
X-Gm-Message-State: AKS2vOxUy9mQ3dJjWQRScRlHDX52Z7GmmiARA+JNm+3eay78fZaq8qcS
	cuvM63U4OZV+gVnT
X-Received: by 10.176.23.94 with SMTP id k30mr8166828uaf.34.1498369620139;
        Sat, 24 Jun 2017 22:47:00 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.12.226 with SMTP id o31ls10995880otd.2.gmail; Sat, 24 Jun
 2017 22:46:59 -0700 (PDT)
X-Received: by 10.157.32.55 with SMTP id n52mr278850ota.10.1498369619060;
        Sat, 24 Jun 2017 22:46:59 -0700 (PDT)
In-Reply-To: <CABPJVnTemri7jarrF9HVQtRcstyj5E6CEex43X2S9RcM3sFLMw@mail.gmail.com>
X-Original-Sender: pythoner6@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: <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:32873
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/32873>

------=_Part_1457_573946451.1498369618518
Content-Type: multipart/alternative; 
	boundary="----=_Part_1458_1801156048.1498369618519"

------=_Part_1458_1801156048.1498369618519
Content-Type: text/plain; charset="UTF-8"

On Sunday, June 25, 2017 at 1:07:54 AM UTC-4, John McFarlane wrote:
>
> There's a related paper from Klemens Morgenstern which was discussed 
> recently in Study Group 14 including in the forum [1]. Kvasir provides 
> bitfields functionality specialized for embedded systems [2].
>
> John
>
> [1] 
> https://groups.google.com/a/isocpp.org/d/msg/sg14/E_EKDsAgFq0/oaQP9gKkCQAJ
> [2] https://github.com/kvasir-io/Kvasir
>
> On Sat, Jun 24, 2017 at 8:41 PM <pyth...@gmail.com <javascript:>> wrote:
>
>> Hello everyone,
>>
>> I've always been interested in embedded development and have gravitated 
>> towards using C++ for most of my projects in that area. As such, one thing 
>> I find myself doing pretty often is working with memory mapped devices. 
>> This usually involves doing a fair amount of bitshifting, and this can get 
>> rather tedious and error prone. I knew that there should be a better way, 
>> and so I developed some templates to automate all the bitshifting. Using 
>> this I was able to create a much nicer interface to memory mapped devices 
>> than the typical set of #defines provided by chip vendors (gist with an 
>> example: 
>> https://gist.github.com/LordPython/e9f58255ae8bee7102dc603d29bb919f).
>>
>> Afterwards, I realized that I might be able to make this a lot simpler by 
>> using bitfields. And so I came up with this alternative prototype: 
>> https://gist.github.com/LordPython/0e9428c4d425a109d5a926ad1a7017c6. 
>> However, I have a few concerns with the bitfield approach:
>>
>>    1. They're not really portable as (at least as far as I know) the 
>>    layout of bitfields is implementation defined.
>>    2. Because the fields in a bitfield only have their size specified, 
>>    making sure that fields are at the right offset can be kind of annoying
>>
>> It seems to me that almost all the times I'd want to use bitfields are 
>> for things like this memory mapped IO where I care about the exact layout 
>> of the bits, but then it turns out that bitfields aren't particularly 
>> useful, because the layout isn't specified. Another use case I've had is in 
>> parsing binary messages when there are fields that are smaller than a byte 
>> packed together - again here the exact layout is crucial to correctness, 
>> and portability is potentially a much greater concern than when developing 
>> software for a specific embedded system.
>>
>> In the past, I have had exactly one case I remember where I've used 
>> bitfields, and that was when I wanted to pack a bunch of different fields 
>> very tightly into a 64 bit object so I could use atomic operations instead 
>> of needing a mutex. In this case, bitfields made sense because I did not 
>> care at all how the bitfield was arranged, just that it was only 64 bits in 
>> size.
>>
>> So, I got to thinking that it would be really nice if bitfields were 
>> extended so that you could specify an explicit offset and length for each 
>> field, as well as a total size for the bitfield as a whole, something that 
>> works similar to the way Ada's record representation clauses do (
>> http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-13-5-1.html#S0313).
>>
>> Does anyone else think that this might be a worthwhile extension of the 
>> language? Or does an extension like this not really fit with the C++ memory 
>> model for similar reasons that packing structs hasn't become standardized?
>>
>> Also out of curiosity, has anyone else seen other good uses for bitfields 
>> in their current sate?
>>
>> - Joseph Martin
>>
>> PS: The fact that my first example using templates compiles down to 
>> almost exactly the same code as the second example and to writing the 
>> assembly by hand is one of the biggest reasons I love C++ (it ends up with 
>> 2 more instructions for this example because of the way volatile works). 
>> Though I'm sure many people here feel the same way :P
>>
>> -- 
>> 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-proposal...@isocpp.org <javascript:>.
>> To post to this group, send email to std-pr...@isocpp.org <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/289ee4d8-01ce-4628-b788-0e128c8be2d9%40isocpp.org 
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/289ee4d8-01ce-4628-b788-0e128c8be2d9%40isocpp.org?utm_medium=email&utm_source=footer>
>> .
>>
>
Ah yes, that's very much along the lines of what I'd be looking for, thanks 
for pointing it out. I think the main thing not present in that proposal is 
that ideally I'd want a way to specify the offset and length (or 
alternatively offset/start and end) instead of just the length because I 
find it less error prone when dealing with the specifications which are 
often bit 0 is this, bit 1 is that, bits 2-7 are that, etc.

-- 
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/de5bfa10-e0bf-4669-b6ef-bf008d6676a4%40isocpp.org.

------=_Part_1458_1801156048.1498369618519
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Sunday, June 25, 2017 at 1:07:54 AM UTC-4, John McFarla=
ne wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: =
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div=
>There&#39;s a related paper from Klemens Morgenstern which was discussed r=
ecently in Study Group 14 including in the forum [1]. Kvasir provides bitfi=
elds functionality specialized for embedded systems [2].<br><br></div>John<=
br><div><br>[1] <a href=3D"https://groups.google.com/a/isocpp.org/d/msg/sg1=
4/E_EKDsAgFq0/oaQP9gKkCQAJ" target=3D"_blank" rel=3D"nofollow" onmousedown=
=3D"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/msg/sg14/E_EK=
DsAgFq0/oaQP9gKkCQAJ&#39;;return true;" onclick=3D"this.href=3D&#39;https:/=
/groups.google.com/a/isocpp.org/d/msg/sg14/E_EKDsAgFq0/oaQP9gKkCQAJ&#39;;re=
turn true;">https://groups.google.com/a/<wbr>isocpp.org/d/msg/sg14/E_<wbr>E=
KDsAgFq0/oaQP9gKkCQAJ</a><br>[2] <a href=3D"https://github.com/kvasir-io/Kv=
asir" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;ht=
tps://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fkvasir-io%2FKvasir=
\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNE0Kw5BF72S_rLz4jNQ2_7mxAEXdg&#39;;=
return true;" onclick=3D"this.href=3D&#39;https://www.google.com/url?q\x3dh=
ttps%3A%2F%2Fgithub.com%2Fkvasir-io%2FKvasir\x26sa\x3dD\x26sntz\x3d1\x26usg=
\x3dAFQjCNE0Kw5BF72S_rLz4jNQ2_7mxAEXdg&#39;;return true;">https://github.co=
m/kvasir-io/<wbr>Kvasir</a><br></div></div><br><div class=3D"gmail_quote"><=
div dir=3D"ltr">On Sat, Jun 24, 2017 at 8:41 PM &lt;<a href=3D"javascript:"=
 target=3D"_blank" gdf-obfuscated-mailto=3D"LafT_jh3AQAJ" rel=3D"nofollow" =
onmousedown=3D"this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"t=
his.href=3D&#39;javascript:&#39;;return true;">pyth...@gmail.com</a>&gt; wr=
ote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Hello everyon=
e,<div><br></div><div>I&#39;ve always been interested in embedded developme=
nt and have gravitated towards using C++ for most of my projects in that ar=
ea. As such, one thing I find myself doing pretty often is working with mem=
ory mapped devices. This usually involves doing a fair amount of bitshiftin=
g, and this can get rather tedious and error prone. I knew that there shoul=
d be a better way, and so I developed some templates to automate all the bi=
tshifting. Using this I was able to create a much nicer interface to memory=
 mapped devices than the typical set of #defines provided by chip vendors (=
gist with an example: <a href=3D"https://gist.github.com/LordPython/e9f5825=
5ae8bee7102dc603d29bb919f" target=3D"_blank" rel=3D"nofollow" onmousedown=
=3D"this.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgist.git=
hub.com%2FLordPython%2Fe9f58255ae8bee7102dc603d29bb919f\x26sa\x3dD\x26sntz\=
x3d1\x26usg\x3dAFQjCNGcCjLbyYQ4GlHuaXfIDL47xL5crw&#39;;return true;" onclic=
k=3D"this.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgist.gi=
thub.com%2FLordPython%2Fe9f58255ae8bee7102dc603d29bb919f\x26sa\x3dD\x26sntz=
\x3d1\x26usg\x3dAFQjCNGcCjLbyYQ4GlHuaXfIDL47xL5crw&#39;;return true;">https=
://gist.github.com/<wbr>LordPython/<wbr>e9f58255ae8bee7102dc603d29bb91<wbr>=
9f</a>).</div><div><br></div><div>Afterwards, I realized that I might be ab=
le to make this a lot simpler by using bitfields. And so I came up with thi=
s alternative prototype:=C2=A0<a href=3D"https://gist.github.com/LordPython=
/0e9428c4d425a109d5a926ad1a7017c6" target=3D"_blank" rel=3D"nofollow" onmou=
sedown=3D"this.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgi=
st.github.com%2FLordPython%2F0e9428c4d425a109d5a926ad1a7017c6\x26sa\x3dD\x2=
6sntz\x3d1\x26usg\x3dAFQjCNFsFqjOZmvwO0jetN8DpyghW-pqdw&#39;;return true;" =
onclick=3D"this.href=3D&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fg=
ist.github.com%2FLordPython%2F0e9428c4d425a109d5a926ad1a7017c6\x26sa\x3dD\x=
26sntz\x3d1\x26usg\x3dAFQjCNFsFqjOZmvwO0jetN8DpyghW-pqdw&#39;;return true;"=
>https://gist.<wbr>github.com/LordPython/<wbr>0e9428c4d425a109d5a926ad1a701=
7<wbr>c6</a>. However, I have a few concerns with the bitfield approach:</d=
iv><div><ol><li>They&#39;re not really portable as (at least as far as I kn=
ow) the layout of bitfields is implementation defined.</li><li>Because the =
fields in a bitfield only have their size specified, making sure that field=
s are at the right offset can be kind of annoying</li></ol></div><div>It se=
ems to me that almost all the times I&#39;d want to use bitfields are for t=
hings like this memory mapped IO where I care about the exact layout of the=
 bits, but then it turns out that bitfields aren&#39;t particularly useful,=
 because the layout isn&#39;t specified. Another use case I&#39;ve had is i=
n parsing binary messages when there are fields that are smaller than a byt=
e packed together - again here the exact layout is crucial to correctness, =
and portability is potentially a much greater concern than when developing =
software for a specific embedded system.</div><div><br></div><div>In the pa=
st, I have had exactly one case I remember where I&#39;ve used bitfields, a=
nd that was when I wanted to pack a bunch of different fields very tightly =
into a 64 bit object so I could use atomic operations instead of needing a =
mutex. In this case, bitfields made sense because I did not care at all how=
 the bitfield was arranged, just that it was only 64 bits in size.</div><di=
v><br></div><div>So, I got to thinking that it would be really nice if bitf=
ields were extended so that you could specify an explicit offset and length=
 for each field, as well as a total size for the bitfield as a whole, somet=
hing that works similar to the way Ada&#39;s record representation clauses =
do (<a href=3D"http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-13-5-1.=
html#S0313" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&=
#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.ada-auth.org%2Fstandard=
s%2Frm12_w_tc1%2Fhtml%2FRM-13-5-1.html%23S0313\x26sa\x3dD\x26sntz\x3d1\x26u=
sg\x3dAFQjCNGIp1Y-Z8cCaT3trPJpbtgDPH-lqg&#39;;return true;" onclick=3D"this=
..href=3D&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.ada-auth.org%2=
Fstandards%2Frm12_w_tc1%2Fhtml%2FRM-13-5-1.html%23S0313\x26sa\x3dD\x26sntz\=
x3d1\x26usg\x3dAFQjCNGIp1Y-Z8cCaT3trPJpbtgDPH-lqg&#39;;return true;">http:/=
/www.ada-auth.org/<wbr>standards/rm12_w_tc1/html/RM-<wbr>13-5-1.html#S0313<=
/a>).</div><div><br></div><div>Does anyone else think that this might be a =
worthwhile extension of the language? Or does an extension like this not re=
ally fit with the C++ memory model for similar reasons that packing structs=
 hasn&#39;t become standardized?</div><div><br></div><div>Also out of curio=
sity, has anyone else seen other good uses for bitfields in their current s=
ate?</div><div><br></div><div>- Joseph Martin</div><div><br></div><div>PS: =
The fact that my first example using templates compiles down to almost exac=
tly the same code as the second example and to writing the assembly by hand=
 is one of the biggest reasons I love C++ (it ends up with 2 more instructi=
ons for this example because of the way volatile works). Though I&#39;m sur=
e many people here feel the same way :P</div></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"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
LafT_jh3AQAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&=
#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return true=
;">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"LafT_jh3AQAJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39=
;javascript:&#39;;return true;">std-pr...@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/289ee4d8-01ce-4628-b788-0e128c8be2d9%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank" =
rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/289ee4d8-01ce-4628-b788-0e128c8be2d9%40i=
socpp.org?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" on=
click=3D"this.href=3D&#39;https://groups.google.com/a/isocpp.org/d/msgid/st=
d-proposals/289ee4d8-01ce-4628-b788-0e128c8be2d9%40isocpp.org?utm_medium\x3=
demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com=
/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/289ee4d8-01ce-4628-<wbr>b788-=
0e128c8be2d9%40isocpp.org</a><wbr>.<br></blockquote></div></blockquote><div=
><br></div><div>Ah yes, that&#39;s very much along the lines of what I&#39;=
d be looking for, thanks for pointing it out. I think the main thing not pr=
esent in that proposal is that ideally I&#39;d want a way to specify the of=
fset and length (or alternatively offset/start and end) instead of just the=
 length because I find it less error prone when dealing with the specificat=
ions which are often bit 0 is this, bit 1 is that, bits 2-7 are that, etc.<=
/div></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/de5bfa10-e0bf-4669-b6ef-bf008d6676a4%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/de5bfa10-e0bf-4669-b6ef-bf008d6676a4=
%40isocpp.org</a>.<br />

------=_Part_1458_1801156048.1498369618519--

------=_Part_1457_573946451.1498369618518--

.
