Topic: Bit utilities: standardizing a


Author: Andrew Tomazos <andrewtomazos@gmail.com>
Date: Wed, 30 Dec 2015 07:55:26 +0100
Raw View
--001a1143112ee84fa4052818054b
Content-Type: text/plain; charset=UTF-8

This seems to be a very thorough treatment.  Well done.

One of the things you say this is for is for developers to make it easy to
implement their own bit containers and algorithm (other than the standard
ones).

I would suggest providing in the proposal a worked (and tested) example use
case of the code of such a custom bit container and/or bit algorithm.  It
should be small enough to be easily comprehended and large enough to be
realistic.  It should showcase the proposed entities.


On Wed, Dec 30, 2015 at 4:07 AM, Vincent Reverdy <vince.rev@gmail.com>
wrote:

> Hello everyone.
>
> Several weeks ago, I posted a first draft
> <https://groups.google.com/a/isocpp.org/forum/#!searchin/std-proposals/Standardizing$20a$20bit$20reference$20utility$20class$20template/std-proposals/9epHRTc9904/EPJ9p8YmEQAJ>
> of a proposal whose goal was to standardize a std::bit_reference.
> I've taken into account the initial comments, and I entirely redesigned
> the proposal to include a consistent set of bit tools.
> My goal is to have something complete for the next ISO WG21 mailing.
> All critics and comments are welcome, particularly on the design and
> technical specification part.
>
> Best,
> Vincent
>
> --
>
> ---
> 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
> https://groups.google.com/a/isocpp.org/group/std-proposals/.
>

--

---
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 https://groups.google.com/a/isocpp.org/group/std-proposals/.

--001a1143112ee84fa4052818054b
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">This seems to be a very thorough treatment.=C2=A0 Well don=
e.<div><br></div><div>One of the things you say this is for is for develope=
rs to make it easy to implement their own bit containers and algorithm (oth=
er than the standard ones).</div><div><br></div><div>I would suggest provid=
ing in the proposal a worked (and tested) example use case of the code of s=
uch a custom bit container and/or bit algorithm.=C2=A0 It should be small e=
nough to be easily comprehended and large enough to be realistic.=C2=A0 It =
should showcase the proposed entities.</div><div><br></div></div><div class=
=3D"gmail_extra"><br><div class=3D"gmail_quote">On Wed, Dec 30, 2015 at 4:0=
7 AM, Vincent Reverdy <span dir=3D"ltr">&lt;<a href=3D"mailto:vince.rev@gma=
il.com" target=3D"_blank">vince.rev@gmail.com</a>&gt;</span> wrote:<br><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #c=
cc solid;padding-left:1ex"><div dir=3D"ltr">Hello everyone.<br><br>Several =
weeks ago, I posted a <a href=3D"https://groups.google.com/a/isocpp.org/for=
um/#!searchin/std-proposals/Standardizing$20a$20bit$20reference$20utility$2=
0class$20template/std-proposals/9epHRTc9904/EPJ9p8YmEQAJ" target=3D"_blank"=
>first draft</a> of a proposal whose goal was to standardize a std::bit_ref=
erence. <br>I&#39;ve taken into account the initial comments, and I entirel=
y redesigned the proposal to include a consistent set of bit tools.<br>My g=
oal is to have something complete for the next ISO WG21 mailing.<br>All cri=
tics and comments are welcome, particularly on the design and technical spe=
cification part.<br><br>Best,<br>Vincent<span class=3D"HOEnZb"><font color=
=3D"#888888"><br></font></span></div><span class=3D"HOEnZb"><font color=3D"=
#888888">

<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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"https://groups.google.com/a/isocpp.org/group=
/std-proposals/" target=3D"_blank">https://groups.google.com/a/isocpp.org/g=
roup/std-proposals/</a>.<br>
</font></span></blockquote></div><br></div>

<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"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

--001a1143112ee84fa4052818054b--

.


Author: "T. C." <rs2740@gmail.com>
Date: Wed, 30 Dec 2015 02:03:15 -0800 (PST)
Raw View
------=_Part_5676_518207532.1451469795278
Content-Type: multipart/alternative;
 boundary="----=_Part_5677_179956822.1451469795278"

------=_Part_5677_179956822.1451469795278
Content-Type: text/plain; charset=UTF-8



On Tuesday, December 29, 2015 at 10:07:53 PM UTC-5, Vincent Reverdy wrote:
>
> Hello everyone.
>
> Several weeks ago, I posted a first draft
> <https://groups.google.com/a/isocpp.org/forum/#!searchin/std-proposals/Standardizing$20a$20bit$20reference$20utility$20class$20template/std-proposals/9epHRTc9904/EPJ9p8YmEQAJ>
> of a proposal whose goal was to standardize a std::bit_reference.
> I've taken into account the initial comments, and I entirely redesigned
> the proposal to include a consistent set of bit tools.
> My goal is to have something complete for the next ISO WG21 mailing.
> All critics and comments are welcome, particularly on the design and
> technical specification part.
>
> Best,
> Vincent
>


bit_iterator's synopsis seems a little broken:
using difference_type = intmax_t
missing semicolon.
using iterator_category = typename underlying_iterator :: iterator_category
;
underlying_iterator doesn't exist elsewhere, and this needs to go through
iterator_traits.

Also, the current definition means that bit_iterator<const unsigned int
*>::reference is bit_reference<unsigned int>, which doesn't seem correct.

--

---
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 https://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_5677_179956822.1451469795278
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br><br>On Tuesday, December 29, 2015 at 10:07:53 PM UTC-5, Vincent Reverdy=
 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">Hello =
everyone.<br><br>Several weeks ago, I posted a <a href=3D"https://groups.go=
ogle.com/a/isocpp.org/forum/#!searchin/std-proposals/Standardizing$20a$20bi=
t$20reference$20utility$20class$20template/std-proposals/9epHRTc9904/EPJ9p8=
YmEQAJ" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;=
https://groups.google.com/a/isocpp.org/forum/#!searchin/std-proposals/Stand=
ardizing$20a$20bit$20reference$20utility$20class$20template/std-proposals/9=
epHRTc9904/EPJ9p8YmEQAJ&#39;;return true;" onclick=3D"this.href=3D&#39;http=
s://groups.google.com/a/isocpp.org/forum/#!searchin/std-proposals/Standardi=
zing$20a$20bit$20reference$20utility$20class$20template/std-proposals/9epHR=
Tc9904/EPJ9p8YmEQAJ&#39;;return true;">first draft</a> of a proposal whose =
goal was to standardize a std::bit_reference. <br>I&#39;ve taken into accou=
nt the initial comments, and I entirely redesigned the proposal to include =
a consistent set of bit tools.<br>My goal is to have something complete for=
 the next ISO WG21 mailing.<br>All critics and comments are welcome, partic=
ularly on the design and technical specification part.<br><br>Best,<br>Vinc=
ent<br></div></blockquote><div><br></div><div><br></div><div>bit_iterator&#=
39;s synopsis seems a little broken:</div><div class=3D"prettyprint" style=
=3D"border: 1px solid rgb(187, 187, 187); word-wrap: break-word; background=
-color: rgb(250, 250, 250);"><code class=3D"prettyprint"><div class=3D"subp=
rettyprint"><span style=3D"color: #008;" class=3D"styled-by-prettify">using=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> differenc=
e_type </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D=
</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> intmax_t<=
br></span></div></code></div><div>missing semicolon.</div><div><div class=
=3D"prettyprint" style=3D"border: 1px solid rgb(187, 187, 187); word-wrap: =
break-word; background-color: rgb(250, 250, 250);"><code class=3D"prettypri=
nt"><div class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">using</span><span style=3D"color: #000;" class=3D"styled-b=
y-prettify"> iterator_category </span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-by-prett=
ify">typename</span><span style=3D"color: #000;" class=3D"styled-by-prettif=
y"> underlying_iterator </span><span style=3D"color: #660;" class=3D"styled=
-by-prettify">::</span><span style=3D"color: #000;" class=3D"styled-by-pret=
tify"> iterator_category </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">;</span></div></code></div></div><div>underlying_iterator do=
esn&#39;t exist elsewhere, and this needs to go through iterator_traits.</d=
iv><div><br></div><div>Also, the current definition means that=C2=A0bit_ite=
rator&lt;const unsigned int *&gt;::reference is bit_reference&lt;unsigned i=
nt&gt;, which doesn&#39;t seem correct.</div><div><br></div>

<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"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

------=_Part_5677_179956822.1451469795278--
------=_Part_5676_518207532.1451469795278--

.


Author: Vincent Reverdy <vince.rev@gmail.com>
Date: Wed, 30 Dec 2015 02:36:15 -0800 (PST)
Raw View
------=_Part_215_632862073.1451471775881
Content-Type: multipart/alternative;
 boundary="----=_Part_216_806382037.1451471775887"

------=_Part_216_806382037.1451471775887
Content-Type: text/plain; charset=UTF-8

Thanks for the two mistakes.

A workaround or the problem of constness may be :

using reference = std::bit_reference<typename std::remove_reference<typename
std::iterator_traits<Iterator>::reference>::type>;
using pointer = std::bit_pointer<typename std::remove_pointer<typename std::
iterator_traits<Iterator>::pointer>::type>;


--

---
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 https://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_216_806382037.1451471775887
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thanks for the two mistakes.<br><br>A workaround or the pr=
oblem of constness may be :<br><br><div class=3D"prettyprint" style=3D"back=
ground-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-=
style: solid; border-width: 1px; word-wrap: break-word;"><code class=3D"pre=
ttyprint"><div class=3D"subprettyprint"><span style=3D"color: #008;" class=
=3D"styled-by-prettify">using</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"> reference </span><span style=3D"color: #660;" class=3D"=
styled-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-=
by-prettify"> std</span><span style=3D"color: #660;" class=3D"styled-by-pre=
ttify">::</span><span style=3D"color: #000;" class=3D"styled-by-prettify">b=
it_reference</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">&lt;</span><span style=3D"color: #008;" class=3D"styled-by-prettify">type=
name</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> std</=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify">remove_reference</sp=
an><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><sp=
an style=3D"color: #008;" class=3D"styled-by-prettify">typename</span><span=
 style=3D"color: #000;" class=3D"styled-by-prettify"> std</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">iterator_traits</span><span style=3D=
"color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color=
: #606;" class=3D"styled-by-prettify">Iterator</span><span style=3D"color: =
#660;" class=3D"styled-by-prettify">&gt;::</span><span style=3D"color: #000=
;" class=3D"styled-by-prettify">reference</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">&gt;::</span><span style=3D"color: #000;" cl=
ass=3D"styled-by-prettify">type</span><span style=3D"color: #660;" class=3D=
"styled-by-prettify">&gt;;</span><span style=3D"color: #000;" class=3D"styl=
ed-by-prettify"><br></span><span style=3D"color: #008;" class=3D"styled-by-=
prettify">using</span><span style=3D"color: #000;" class=3D"styled-by-prett=
ify"> pointer </span><span style=3D"color: #660;" class=3D"styled-by-pretti=
fy">=3D</span><span style=3D"color: #000;" class=3D"styled-by-prettify"> st=
d</span><span style=3D"color: #660;" class=3D"styled-by-prettify">::</span>=
<span style=3D"color: #000;" class=3D"styled-by-prettify">bit_pointer</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">&lt;</span><span=
 style=3D"color: #008;" class=3D"styled-by-prettify">typename</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"> std</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">::</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">remove_pointer</span><span style=3D"=
color: #660;" class=3D"styled-by-prettify">&lt;</span><span style=3D"color:=
 #008;" class=3D"styled-by-prettify">typename</span><span style=3D"color: #=
000;" class=3D"styled-by-prettify"> std</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">::</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify">iterator_traits</span><span style=3D"color: #660;" cla=
ss=3D"styled-by-prettify">&lt;</span><span style=3D"color: #606;" class=3D"=
styled-by-prettify">Iterator</span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">&gt;::</span><span style=3D"color: #000;" class=3D"styled=
-by-prettify">pointer</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">&gt;::</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify">type</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>&gt;;</span></div></code></div><br><br></div>

<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"https://groups.google.com/a/isocpp.org/group=
/std-proposals/">https://groups.google.com/a/isocpp.org/group/std-proposals=
/</a>.<br />

------=_Part_216_806382037.1451471775887--
------=_Part_215_632862073.1451471775881--

.