[prev in list] [next in list] [prev in thread] [next in thread]
List: boost-users
Subject: Re: [Boost-users] boost range dynamic joined_range
From: Richard Hodges via Boost-users <boost-users () lists ! boost ! org>
Date: 2020-04-06 16:36:23
Message-ID: CALvx3hYyWKUGQh10dHnTnJ4L4q3MqdCqowsP9-jcakEpcn=+YA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
This stack-overflow quarion and answer looks relevant.
It seems as if boost could benefit from a flattening_iterator type:
https://stackoverflow.com/questions/3623082/flattening-iterator
On Mon, 6 Apr 2020 at 08:41, Lars Sunde via Boost-users <
boost-users@lists.boost.org> wrote:
> Appreciate the response but do not think this answers my question.
>
> Maybe I did not explain myself properly. I would like the foo object to
> return a (boost) range object that the caller can traverse without knowing
> the details of the internal structure. The foo object might contain a
> configurable number of vector of int.
>
> So in one scenario foo will be initalized like this;
> vec = { {1,2,3}, {4,5,6}, {7,8,9} };
> and in another scenario like this;
> vec = { {1,2,3}, {4,5,6}, {7,8,9}, {10,11,12} };
>
> I do not want to create another vector "master" that contains all int.
>
> Appreciate any input 🙂
>
> kind regards, Lars
>
> ------------------------------
> *Fra:* degski <degski@gmail.com>
> *Sendt:* søndag 5. april 2020 23:08
> *Til:* Boost users list <boost-users@lists.boost.org>
> *Kopi:* Lars Sunde <laasunde@hotmail.com>
> *Emne:* Re: [Boost-users] boost range dynamic joined_range
>
>
> On Sun, 5 Apr 2020 at 14:31, Lars Sunde via Boost-users <
> boost-users@lists.boost.org> wrote:
>
> The following code compile on Visual Studio 2017 and will output the
> number 1 to 9.
>
>
> This code will do so: https://stackoverflow.com/a/50660987 .
>
> degski
> --
> @systemdeg
> "We value your privacy, click here!" Sod off! - degski
> "Anyone who believes that exponential growth can go on forever in a finite
> world is either a madman or an economist" - Kenneth E. Boulding
> "Growth for the sake of growth is the ideology of the cancer cell" -
> Edward P. Abbey
> _______________________________________________
> Boost-users mailing list
> Boost-users@lists.boost.org
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
>
--
Richard Hodges
hodges.r@gmail.com
office: +442032898513
home: +376841522
mobile: +376380212
[Attachment #5 (text/html)]
<div dir="ltr">This stack-overflow quarion and answer looks \
relevant.<div><br></div><div>It seems as if boost could benefit from a \
flattening_iterator type:</div><div><br></div><div><a \
href="https://stackoverflow.com/questions/3623082/flattening-iterator">https://stackoverflow.com/questions/3623082/flattening-iterator</a> \
</div><div> <br></div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Mon, 6 Apr 2020 at 08:41, Lars Sunde via Boost-users <<a \
href="mailto:boost-users@lists.boost.org">boost-users@lists.boost.org</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Appreciate the response but do not think this answers my question.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Maybe I did not explain myself properly. I would like the foo object to return a \
(boost) range object that the caller can traverse without knowing the details of the \
internal structure. The foo object might contain a configurable number of vector of \
int. </div> <div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
So in one scenario foo will be initalized like this; </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
vec = { {1,2,3}, {4,5,6}, {7,8,9} }; </div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
and in another scenario like this;</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-family:Calibri,Helvetica,sans-serif;background-color:rgb(255,255,255);display:inline">vec \
= { {1,2,3}, {4,5,6}, {7,8,9}, <span \
style="font-family:Calibri,Helvetica,sans-serif;background-color:rgb(255,255,255);display:inline">{10,11,12}</span>
}; </span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I do not want to create another vector "master" that contains all \
int.</div> <div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Appreciate any input <span id="gmail-m_-4398783679901443512🙂">🙂</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span>kind regards, Lars</span></div>
<div id="gmail-m_-4398783679901443512appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-4398783679901443512divRplyFwdMsg" dir="ltr"><font face="Calibri, \
sans-serif" color="#000000" style="font-size:11pt"><b>Fra:</b> degski <<a \
href="mailto:degski@gmail.com" target="_blank">degski@gmail.com</a>><br> \
<b>Sendt:</b> søndag 5. april 2020 23:08<br> <b>Til:</b> Boost users list <<a \
href="mailto:boost-users@lists.boost.org" \
target="_blank">boost-users@lists.boost.org</a>><br> <b>Kopi:</b> Lars Sunde \
<<a href="mailto:laasunde@hotmail.com" \
target="_blank">laasunde@hotmail.com</a>><br> <b>Emne:</b> Re: [Boost-users] boost \
range dynamic joined_range</font> <div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr"></div>
<br>
<div>
<div dir="ltr">On Sun, 5 Apr 2020 at 14:31, Lars Sunde via Boost-users <<a \
href="mailto:boost-users@lists.boost.org" \
target="_blank">boost-users@lists.boost.org</a>> wrote:<br> </div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"> <div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(171,171,171)">
The following code compile on Visual Studio 2017 and will output the number 1 to 9.
</div>
</div>
</blockquote>
<div><br>
</div>
<div>This code will do so: <a href="https://stackoverflow.com/a/50660987" \
target="_blank">https://stackoverflow.com/a/50660987</a> .</div> <div><br>
</div>
<div>degski<br>
</div>
</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">@systemdeg</div>
<div>"We value your privacy, click here!" Sod off! - degski<br>
</div>
<div dir="ltr">"Anyone who believes that exponential growth can go on forever in \
a finite world is either a madman or an economist" - Kenneth E. Boulding</div> \
<div dir="ltr">"Growth for the sake of growth is the ideology of the cancer \
cell" - Edward P. Abbey<br> </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Boost-users mailing list<br>
<a href="mailto:Boost-users@lists.boost.org" \
target="_blank">Boost-users@lists.boost.org</a><br> <a \
href="https://lists.boost.org/mailman/listinfo.cgi/boost-users" rel="noreferrer" \
target="_blank">https://lists.boost.org/mailman/listinfo.cgi/boost-users</a><br> \
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" \
class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Richard Hodges<div><a \
href="mailto:hodges.r@gmail.com" \
target="_blank">hodges.r@gmail.com</a></div><div>office: \
+442032898513</div><div>home: +376841522</div><div>mobile: \
+376380212</div><div><br></div></div></div></div></div>
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic