220 5249 <291db835-d42d-40cd-8760-47cdf327680d@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Xeo <hivemaster@hotmail.de>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Some thoughts about coroutines
Date: Thu, 27 Jun 2013 01:53:53 -0700 (PDT)
Lines: 1439
Approved: news@gmane.org
Message-ID: <291db835-d42d-40cd-8760-47cdf327680d@isocpp.org>
References: <e4828fad-0428-46f8-ad6d-500848c2212b@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_87_21569202.1372323233185"
X-Trace: ger.gmane.org 1372323233 20728 80.91.229.3 (27 Jun 2013 08:53:53 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 27 Jun 2013 08:53:53 +0000 (UTC)
Cc: asaelr@gmail.com
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCCNBYNYXMJRBIP3V6HAKGQEH5HTKJQ@isocpp.org Thu Jun 27 10:53:56 2013
Return-path: <std-proposals+bncBCCNBYNYXMJRBIP3V6HAKGQEH5HTKJQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-vb0-f69.google.com ([209.85.212.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCCNBYNYXMJRBIP3V6HAKGQEH5HTKJQ@isocpp.org>)
	id 1Us7xj-0002tH-9U
	for gclcip-std-proposals@m.gmane.org; Thu, 27 Jun 2013 10:53:55 +0200
Original-Received: by mail-vb0-f69.google.com with SMTP id w16sf739061vbb.0
        for <gclcip-std-proposals@m.gmane.org>; Thu, 27 Jun 2013 01:53:54 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere:date:from:to:cc:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-google-group-id:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe:content-type;
        bh=5E5qHvH0TuKPDX2og4ZM6vZwLANsXx97cZhcecmx/zI=;
        b=Hl567hq7yLenJRWFMNWcO0dTZFkJi2PM9fM3vJJUcn+e6e6ijBaNu6RbPX2eX3PgN/
         vSoMHRE9V+HjqDvr8NkWAPgahspy1O5/zE2d5JgO1bfqKdNb1NmX6oqPGKPC/vaQRotg
         LcDsd3hg0uy4STHxpoXFxgB+IZZjLNEhTFrwLWggXhHvx5Bh2wVwjAy/SanHbSgwNmvd
         1KLUeTMnaBltm6azswrRos9CYN/hgAI8bDxrWZkly5vnmzIYsseIGnlwNC/RNnl4308U
         q+zc4XFNEZH65/9v7Umf+uKjezQSYvhw4mRy+1p3CCewR8oxFtdPDSqlacymhpM3/RlA
         IFTQ==
X-Received: by 10.236.83.82 with SMTP id p58mr4046579yhe.10.1372323234472;
        Thu, 27 Jun 2013 01:53:54 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.26.70 with SMTP id j6ls456342qeg.94.gmail; Thu, 27 Jun 2013
 01:53:53 -0700 (PDT)
X-Received: by 10.49.129.104 with SMTP id nv8mr204783qeb.27.1372323233632;
        Thu, 27 Jun 2013 01:53:53 -0700 (PDT)
In-Reply-To: <e4828fad-0428-46f8-ad6d-500848c2212b@isocpp.org>
X-Original-Sender: hivemaster@hotmail.de
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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:5249
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5249>

------=_Part_87_21569202.1372323233185
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

While I really want to get my hands on native coroutines, I don't think=20
your approach works very well.

1) Who says we always want to use coroutines as `for(auto r : coro(args))`?=
=20
I don't think that's necessarily the main form of use
2) How would the transformation to a class work for template argument=20
deduction?

I think a better course would be to transform the return type of such a=20
function, as would be done with async/await-style functions.
The returned type would then simply have an `operator()` and if you wanted=
=20
a range from that, it could be quite easily done with a general=20
function-adaptor.

On Thursday, June 27, 2013 3:40:58 AM UTC+2, asa...@gmail.com wrote:
>
> Recently, I=92ve thought a lot about coroutines, and how they should beha=
ve=20
> if became a part of c++.
>
> I found two (main) proposals:
>
> a.=20
> https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/3g6ZIW=
edGJ8
>
> It has the advantage of not requiring to change the syntax, but in force =
a=20
> new model of stack-based calls. It does so in purpose to let nested=20
> functions to yield value, which I think is not really necessary. (If we l=
et=20
> nested functions return value on behalf of their callee, we should start=
=20
> this in regular functions). Also, Its syntax is somehow complex.
>
> b.=20
> https://groups.google.com/a/isocpp.org/forum/#!topic/std-proposals/PPZJVT=
DdDVQ
>
> It is easy to use and doesn=92t require a new stack, and I think that thi=
s=20
> is the right direction. However, it ignores some technical details=20
> (lifetime of locals, etc). Also, adding a keyword may break too many=20
> working code, and my personal opinion is that it is ugly. Sentences like=
=20
> =93void numbers() yields int=94 reminds me too many things I hate in Java=
.. The=20
> alternative syntax (described at the end of this proposal) is not so ugly=
,=20
> but still complex.
>
> There is even a nice implementation of coroutines (using macros):=20
> http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
>
> but it has 2 major disadvantages: while using it, we can=92t yield a valu=
e=20
> from within a switch statement, and, much more important, we have to defi=
ne=20
> all the local variables at the top of the function - back to C90 days! (a=
nd=20
> with constructors this is much worst.)
>
> Another thing that was very little talk about, is for-range loops native=
=20
> support. Let=92s say we have a Fibonacci number generator (a very common=
=20
> example):
>
> (Using Denis Bredelet=92s proposal syntax)
>
> void fib(int n) yields int {
>
>  int a=3D0,b=3D1;
>
>  while(n--) {
>
>    int c=3Da+b;
>
>    a=3Db;
>
>    b=3Dc;
>
>    yield c;
>
>  }
>
> }
>
> We want the possibility to write for (int i : fib(10)) std::cout<<i<<=92\=
n=92;to print the first 10 Fibonacci numbers.
>
> So what am I suggest?
>
> First, to the syntax. Since we want it to work natively with for-range=20
> loops, and since the  language concept is =93declare it the way you will =
use=20
> it=94, I would suggest using colon in the function signature. The nicest =
idea=20
> I managed to think so far is int : fib(int n)
>
> Also, there is no reason to add the keyword yield, when we can stick to=
=20
> good old return.
>
> Now, to the real stuff: What does fib(10) mean? What=92s the type of=20
> fib(10).begin()?
>
> I suggest this meaning: fib will be (auto-generated) class, and an object=
=20
> of it will represent calling the =93function=94 with specific parameters.=
 The=20
> member function begin (and end) will return some sort of iterator, which=
=20
> will represent the actual call.
>
> Some details: the fib class should have some members, to contain the=20
> parameters it called with, but the real fun is in the iterator class: it=
=20
> will have (in addition to the parameters),  as (not exactly, I will expla=
in=20
> below) members, all the local variables of the =93function=94 (including =
the=20
> return value), and also the information about where it stopped last time=
=20
> (and should resume from) - let=92s call it, from now on, =93position data=
=94.
>
> To be more precise: an iterator should contain the memory for the local=
=20
> variables (like every member variable), but their lifetime will be as if=
=20
> they were local variables of the =93function=94. I mean - they will been=
=20
> constructed only when the =93function=94 will decide so, and not automati=
cally=20
> when the iterator is been constructed.
>
> When the =93function=94 ends (either by falling through the ending brace,=
 not=20
> catching exception, or simply saying return; without a value), the=20
> position data should contain this information, and (like every function),=
=20
> every local variable should be destructed.
>
> Knowing the position data let us easily determine which variables are=20
> alive, and so I think that the following member functions can be=20
> automatically created:
>
> copy constructor - should copy the position data, the parameters, and=20
> every living local variable
>
> move constructor - the same, but move instead of copy
>
> destructor - destroy the parameters, and every living local variable.
>
> (Of course, if some local variable is noncopyable, so is the iterator)
>
> I think that it should not be assignable - If one iterator have a live=20
> object, and another one have not, it=92s a real mess.
>
> Some example:
>
> Suppose that we want to yield the number 0, and then, the first n=20
> Fibonacci numbers and the first n even number, alternately. To add more=
=20
> interest (and to demonstrate more rules), I want to create and destroy so=
me=20
> objects (assume A is a copyable, moveable, and int-constructive class),=
=20
> so I=92ve written the following code:
>
> int : fib_even(int n) {
>
>    A a(7);
>
>    int fib1=3D0,fib2=3D1,even=3D0;
>
>    return 0;
>
>    while(n--) {
>
>        int fib3=3Dfib1+fib2;
>
>        fib1=3Dfib2;
>
>        fib2=3Dfib3;
>
>        return fib3;
>
>        A b=3Dn;
>
>        return even+=3D2;
>
>    }
>
> }
>
> A compiler may expand it to something like:
>
> (Note: I=92m using dynamic memory allocation, but It=92s not really how i=
t=20
> should be implemented - I just don=92t want some constructors and destruc=
tors=20
> to been invoked automatically)
>
> class fib_even {
>
>    class iterator {
>
>        int n;
>
>        int *fib1,*fib2,*fib3,*even;
>
>        A *a,*b;
>
>        int *ret_value;
>
>        enum {p0,p1,p2,p3,p4} pos; //resuming points
>
>        void next() {
>
>            switch (pos) {
>
>                case p0: break;
>
>                case p1: goto label1;
>
>                case p2: goto label2;
>
>                case p3: goto label3;
>
>                case p4: return;
>
>            }
>
> //construct automatic variables of the function
>
>            a=3Dnew A(7);
>
>            fib1=3Dnew int(0);
>
>            fib2=3Dnew int(1);
>
>            even=3Dnew int(0);
>
> //the return process - create the value, save the resuming point, and=20
> return
>
>            ret_value=3Dnew int(0);
>
>            pos=3Dp1;
>
>            return;
>
>        label1:
>
>            while(n--) {
>
>                fib3=3Dnew int(*fib1+*fib2); //being constructed only now
>
>                *fib1=3D*fib2;
>
>                *fib2=3D*fib3;
>
>                ret_value=3Dnew int(*fib3);
>
>                pos=3Dp2;
>
>                return;
>
>        label2:
>
>                b=3Dnew A(n);
>
>                ret_value=3Dnew int((*even)+=3D2);
>
>                pos=3Dp3;
>
>                return;
>
>        label3:
>
> //automatic variables going out of scope, and should be destructed
>
>                delete b;
>
>                delete fib3;
>
>            }
>
>            delete even;
>
>            delete fib2;
>
>            delete fib1;
>
>            delete a;
>
>            pos=3Dp4;
>
>        }
>
>        iterator(int n) : n(n),pos(p0) {
>
>            next(); //get the first value
>
>        }
>
>        iterator() : pos(p4) {}
>
>    public:
>
>        iterator &operator++() {
>
>            delete ret_value;
>
>            next();
>
>            return *this;
>
>        }
>
>        int &operator*() {
>
>            return *ret_value;
>
>        }
>
>        iterator(const iterator &it) : n(it.n),pos(it.pos) {
>
> //copy only living members
>
>            if (pos>p0 && pos<p4) {
>
>                ret_value=3Dnew int(*it.ret_value);
>
>                a=3Dnew A(*it.a);
>
>                fib1=3Dnew int(*it.fib1);
>
>                fib2=3Dnew int(*it.fib2);
>
>                even=3Dnew int(*it.even);
>
>            }
>
>            if (pos>p1 && pos<p4) fib3=3Dnew int(*it.fib3);
>
>            if (pos>p2 && pos<p4) b=3Dnew A(*it.b);
>
>        }
>
>        iterator(iterator &&it) : n(std::move(it.n)),pos(it.pos) {
>
>            if (pos>p0 && pos<p4) {
>
>                ret_value=3Dnew int(std::move(*it.ret_value));
>
>                a=3Dnew A(std::move(*it.a));
>
>                fib1=3Dnew int(std::move(*it.fib1));
>
>                fib2=3Dnew int(std::move(*it.fib2));
>
>                even=3Dnew int(std::move(*it.even));
>
>            }
>
>            if (pos>p1 && pos<p4) fib3=3Dnew int(std::move(*it.fib3));
>
>            if (pos>p2 && pos<p4) b=3Dnew A(std::move(*it.b));
>
>        }
>
>        ~iterator() {
>
>            if (pos>p2 && pos<p4) delete b;
>
>            if (pos>p1 && pos<p4) delete fib3;
>
>            if (pos>p0 && pos<p4) {
>
>                delete even;
>
>                delete fib2;
>
>                delete fib1;
>
>                delete a;
>
>                delete ret_value;
>
>            }
>
>        }
>
>        bool operator!=3D(const iterator &it) {
>
>            return pos!=3Dit.pos;
>
>        }
>
>        operator bool() {
>
>            return pos<p4; //still hasn't ended
>
>        }
>
>        iterator &operator=3D(const iterator&) =3D delete;
>
>        friend fib_even;
>
>    };
>
>    int n;
>
> public:
>
>    fib_even(int n) : n(n) {}
>
>    iterator begin() {
>
>        return iterator(n);
>
>    }
>
>    iterator end() {
>
>        return iterator();
>
>    }
>
> };
>
> So, what do you think?
>

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.



------=_Part_87_21569202.1372323233185
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

While I really want to get my hands on native coroutines, I don't think you=
r approach works very well.<br><br>1) Who says we always want to use corout=
ines as `for(auto r : coro(args))`? I don't think that's necessarily the ma=
in form of use<br>2) How would the transformation to a class work for templ=
ate argument deduction?<br><br>I think a better course would be to transfor=
m the return type of such a function, as would be done with async/await-sty=
le functions.<br>The returned type would then simply have an `operator()` a=
nd if you wanted a range from that, it could be quite easily done with a ge=
neral function-adaptor.<br><br>On Thursday, June 27, 2013 3:40:58 AM UTC+2,=
 asa...@gmail.com wrote:<blockquote class=3D"gmail_quote" style=3D"margin: =
0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><p dir=
=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span =
style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:tr=
ansparent;font-weight:normal;font-style:normal;font-variant:normal;text-dec=
oration:none;vertical-align:baseline">Recently, I=92ve thought a lot about =
coroutines, and how they should behave if became a part of c++.</span></p><=
p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><=
span style=3D"font-size:15px;font-family:Arial;color:#000000;background-col=
or:transparent;font-weight:normal;font-style:normal;font-variant:normal;tex=
t-decoration:none;vertical-align:baseline">I found two (main) proposals:</s=
pan></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bott=
om:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backg=
round-color:transparent;font-weight:normal;font-style:normal;font-variant:n=
ormal;text-decoration:none;vertical-align:baseline">a. </span><a href=3D"ht=
tps://groups.google.com/a/isocpp.org/forum/#%21topic/std-proposals/3g6ZIWed=
GJ8" style=3D"text-decoration:none" target=3D"_blank"><span style=3D"font-s=
ize:15px;font-family:Arial;color:#1155cc;background-color:transparent;font-=
weight:normal;font-style:normal;font-variant:normal;text-decoration:underli=
ne;vertical-align:baseline">https://groups.google.com/a/<wbr>isocpp.org/for=
um/#!topic/std-<wbr>proposals/3g6ZIWedGJ8</span></a><span style=3D"font-siz=
e:15px;font-family:Arial;color:#000000;background-color:transparent;font-we=
ight:normal;font-style:normal;font-variant:normal;text-decoration:none;vert=
ical-align:baseline"></span></p><p dir=3D"ltr" style=3D"line-height:1.15;ma=
rgin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:A=
rial;color:#000000;background-color:transparent;font-weight:normal;font-sty=
le:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"=
>It
 has the advantage of not requiring to change the syntax, but in force a
 new model of stack-based calls. It does so in purpose to let nested=20
functions to yield value, which I think is not really necessary. (If we=20
let nested functions return value on behalf of their callee, we should=20
start this in regular functions). Also, Its syntax is somehow complex.</spa=
n></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom=
:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgro=
und-color:transparent;font-weight:normal;font-style:normal;font-variant:nor=
mal;text-decoration:none;vertical-align:baseline">b. </span><a href=3D"http=
s://groups.google.com/a/isocpp.org/forum/#%21topic/std-proposals/PPZJVTDdDV=
Q" style=3D"text-decoration:none" target=3D"_blank"><span style=3D"font-siz=
e:15px;font-family:Arial;color:#1155cc;background-color:transparent;font-we=
ight:normal;font-style:normal;font-variant:normal;text-decoration:underline=
;vertical-align:baseline">https://groups.google.com/a/<wbr>isocpp.org/forum=
/#!topic/std-<wbr>proposals/PPZJVTDdDVQ</span></a><span style=3D"font-size:=
15px;font-family:Arial;color:#000000;background-color:transparent;font-weig=
ht:normal;font-style:normal;font-variant:normal;text-decoration:none;vertic=
al-align:baseline"></span></p><p dir=3D"ltr" style=3D"line-height:1.15;marg=
in-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Ari=
al;color:#000000;background-color:transparent;font-weight:normal;font-style=
:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">I=
t
 is easy to use and doesn=92t require a new stack, and I think that this=20
is the right direction. However, it ignores some technical details=20
(lifetime of locals, etc). Also, adding a keyword may break too many=20
working code, and my personal opinion is that it is ugly. Sentences like
 =93void numbers() yields int=94 reminds me too many things I hate in Java.=
=20
The alternative syntax (described at the end of this proposal) is not so
 ugly, but still complex.</span></p><p dir=3D"ltr" style=3D"line-height:1.1=
5;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-fami=
ly:Arial;color:#000000;background-color:transparent;font-weight:normal;font=
-style:normal;font-variant:normal;text-decoration:none;vertical-align:basel=
ine">There is even a nice implementation of coroutines (using macros): </sp=
an><a href=3D"http://www.chiark.greenend.org.uk/%7Esgtatham/coroutines.html=
" style=3D"text-decoration:none" target=3D"_blank"><span style=3D"font-size=
:15px;font-family:Arial;color:#1155cc;background-color:transparent;font-wei=
ght:normal;font-style:normal;font-variant:normal;text-decoration:underline;=
vertical-align:baseline">http://www.chiark.greenend.<wbr>org.uk/~sgtatham/c=
oroutines.<wbr>html</span></a><span style=3D"font-size:15px;font-family:Ari=
al;color:#000000;background-color:transparent;font-weight:normal;font-style=
:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><=
/span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bo=
ttom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;bac=
kground-color:transparent;font-weight:normal;font-style:normal;font-variant=
:normal;text-decoration:none;vertical-align:baseline">but
 it has 2 major disadvantages: while using it, we can=92t yield a value=20
from within a switch statement, and, much more important, we have to=20
define all the local variables at the top of the function - back to C90=20
days! (and with constructors this is much worst.)</span></p><br><span style=
=3D"font-size:15px;font-family:Arial;color:#000000;background-color:transpa=
rent;font-weight:normal;font-style:normal;font-variant:normal;text-decorati=
on:none;vertical-align:baseline"></span><p dir=3D"ltr" style=3D"line-height=
:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-=
family:Arial;color:#000000;background-color:transparent;font-weight:normal;=
font-style:normal;font-variant:normal;text-decoration:none;vertical-align:b=
aseline">Another
 thing that was very little talk about, is for-range loops native=20
support. Let=92s say we have a Fibonacci number generator (a very common=20
example):</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt=
;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#=
000000;background-color:transparent;font-weight:normal;font-style:normal;fo=
nt-variant:normal;text-decoration:none;vertical-align:baseline">(Using Deni=
s Bredelet=92s proposal syntax)</span></p><p dir=3D"ltr" style=3D"line-heig=
ht:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;fon=
t-family:Arial;color:#000000;background-color:transparent;font-weight:norma=
l;font-style:normal;font-variant:normal;text-decoration:none;vertical-align=
:baseline">void fib(int n) yields int {</span></p><p dir=3D"ltr" style=3D"l=
ine-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:=
15px;font-family:Arial;color:#000000;background-color:transparent;font-weig=
ht:normal;font-style:normal;font-variant:normal;text-decoration:none;vertic=
al-align:baseline"> &nbsp;int a=3D0,b=3D1;</span></p><p dir=3D"ltr" style=
=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-=
size:15px;font-family:Arial;color:#000000;background-color:transparent;font=
-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;v=
ertical-align:baseline"> &nbsp;while(n--) {</span></p><p dir=3D"ltr" style=
=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-=
size:15px;font-family:Arial;color:#000000;background-color:transparent;font=
-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;v=
ertical-align:baseline"> &nbsp;&nbsp;&nbsp;int c=3Da+b;</span></p><p dir=3D=
"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span sty=
le=3D"font-size:15px;font-family:Arial;color:#000000;background-color:trans=
parent;font-weight:normal;font-style:normal;font-variant:normal;text-decora=
tion:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;a=3Db;</span></p><p d=
ir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><spa=
n style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:=
transparent;font-weight:normal;font-style:normal;font-variant:normal;text-d=
ecoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;b=3Dc;</span></p=
><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"=
><span style=3D"font-size:15px;font-family:Arial;color:#000000;background-c=
olor:transparent;font-weight:normal;font-style:normal;font-variant:normal;t=
ext-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;yield c;</s=
pan></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bott=
om:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backg=
round-color:transparent;font-weight:normal;font-style:normal;font-variant:n=
ormal;text-decoration:none;vertical-align:baseline"> &nbsp;}</span></p><p d=
ir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><spa=
n style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:=
transparent;font-weight:normal;font-style:normal;font-variant:normal;text-d=
ecoration:none;vertical-align:baseline">}</span></p><p dir=3D"ltr" style=3D=
"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-siz=
e:15px;font-family:Arial;color:#000000;background-color:transparent;font-we=
ight:normal;font-style:normal;font-variant:normal;text-decoration:none;vert=
ical-align:baseline">We want the possibility to write </span><span style=3D=
"font-size:15px;font-family:Arial;color:#000000;background-color:transparen=
t;font-weight:normal;font-style:italic;font-variant:normal;text-decoration:=
none;vertical-align:baseline">for (int i : fib(10)) std::cout&lt;&lt;i&lt;&=
lt;=92\n=92;</span><span style=3D"font-size:15px;font-family:Arial;color:#0=
00000;background-color:transparent;font-weight:normal;font-style:normal;fon=
t-variant:normal;text-decoration:none;vertical-align:baseline"> to print th=
e first 10 Fibonacci numbers.</span></p><br><span style=3D"font-size:15px;f=
ont-family:Arial;color:#000000;background-color:transparent;font-weight:nor=
mal;font-style:normal;font-variant:normal;text-decoration:none;vertical-ali=
gn:baseline"></span><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt=
;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#=
000000;background-color:transparent;font-weight:normal;font-style:normal;fo=
nt-variant:normal;text-decoration:none;vertical-align:baseline">So what am =
I suggest?</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0p=
t;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:=
#000000;background-color:transparent;font-weight:normal;font-style:normal;f=
ont-variant:normal;text-decoration:none;vertical-align:baseline">First,
 to the syntax. Since we want it to work natively with for-range loops,=20
and since the &nbsp;language concept is =93declare it the way you will use =
it=94,
 I would suggest using colon in the function signature. The nicest idea I
 managed to think so far is </span><span style=3D"font-size:15px;font-famil=
y:Arial;color:#000000;background-color:transparent;font-weight:normal;font-=
style:italic;font-variant:normal;text-decoration:none;vertical-align:baseli=
ne">int : fib(int n)</span></p><p dir=3D"ltr" style=3D"line-height:1.15;mar=
gin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Ar=
ial;color:#000000;background-color:transparent;font-weight:normal;font-styl=
e:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">=
Also, there is no reason to add the keyword </span><span style=3D"font-size=
:15px;font-family:Arial;color:#000000;background-color:transparent;font-wei=
ght:normal;font-style:italic;font-variant:normal;text-decoration:none;verti=
cal-align:baseline">yield</span><span style=3D"font-size:15px;font-family:A=
rial;color:#000000;background-color:transparent;font-weight:normal;font-sty=
le:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"=
>, when we can stick to good old </span><span style=3D"font-size:15px;font-=
family:Arial;color:#000000;background-color:transparent;font-weight:normal;=
font-style:italic;font-variant:normal;text-decoration:none;vertical-align:b=
aseline">return</span><span style=3D"font-size:15px;font-family:Arial;color=
:#000000;background-color:transparent;font-weight:normal;font-style:normal;=
font-variant:normal;text-decoration:none;vertical-align:baseline">.</span><=
/p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0p=
t"><span style=3D"font-size:15px;font-family:Arial;color:#000000;background=
-color:transparent;font-weight:normal;font-style:normal;font-variant:normal=
;text-decoration:none;vertical-align:baseline">Now, to the real stuff: What=
 does </span><span style=3D"font-size:15px;font-family:Arial;color:#000000;=
background-color:transparent;font-weight:normal;font-style:italic;font-vari=
ant:normal;text-decoration:none;vertical-align:baseline">fib(10)</span><spa=
n style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:=
transparent;font-weight:normal;font-style:normal;font-variant:normal;text-d=
ecoration:none;vertical-align:baseline"> mean? What=92s the type of </span>=
<span style=3D"font-size:15px;font-family:Arial;color:#000000;background-co=
lor:transparent;font-weight:normal;font-style:italic;font-variant:normal;te=
xt-decoration:none;vertical-align:baseline">fib(10).begin()</span><span sty=
le=3D"font-size:15px;font-family:Arial;color:#000000;background-color:trans=
parent;font-weight:normal;font-style:normal;font-variant:normal;text-decora=
tion:none;vertical-align:baseline">?</span></p><p dir=3D"ltr" style=3D"line=
-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15p=
x;font-family:Arial;color:#000000;background-color:transparent;font-weight:=
normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-=
align:baseline">I
 suggest this meaning: fib will be (auto-generated) class, and an object
 of it will represent calling the =93function=94 with specific parameters.=
=20
The member function </span><span style=3D"font-size:15px;font-family:Arial;=
color:#000000;background-color:transparent;font-weight:normal;font-style:it=
alic;font-variant:normal;text-decoration:none;vertical-align:baseline">begi=
n</span><span style=3D"font-size:15px;font-family:Arial;color:#000000;backg=
round-color:transparent;font-weight:normal;font-style:normal;font-variant:n=
ormal;text-decoration:none;vertical-align:baseline"> (and </span><span styl=
e=3D"font-size:15px;font-family:Arial;color:#000000;background-color:transp=
arent;font-weight:normal;font-style:italic;font-variant:normal;text-decorat=
ion:none;vertical-align:baseline">end</span><span style=3D"font-size:15px;f=
ont-family:Arial;color:#000000;background-color:transparent;font-weight:nor=
mal;font-style:normal;font-variant:normal;text-decoration:none;vertical-ali=
gn:baseline">) will return some sort of iterator, which will represent the =
actual call.</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:=
0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;colo=
r:#000000;background-color:transparent;font-weight:normal;font-style:normal=
;font-variant:normal;text-decoration:none;vertical-align:baseline">Some det=
ails: the </span><span style=3D"font-size:15px;font-family:Arial;color:#000=
000;background-color:transparent;font-weight:normal;font-style:italic;font-=
variant:normal;text-decoration:none;vertical-align:baseline">fib</span><spa=
n style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:=
transparent;font-weight:normal;font-style:normal;font-variant:normal;text-d=
ecoration:none;vertical-align:baseline"> class should have some members, to=
 contain the parameters it called with, but the real fun is in the </span><=
span style=3D"font-size:15px;font-family:Arial;color:#000000;background-col=
or:transparent;font-weight:normal;font-style:italic;font-variant:normal;tex=
t-decoration:none;vertical-align:baseline">iterator</span><span style=3D"fo=
nt-size:15px;font-family:Arial;color:#000000;background-color:transparent;f=
ont-weight:normal;font-style:normal;font-variant:normal;text-decoration:non=
e;vertical-align:baseline">
 class: it will have (in addition to the parameters), &nbsp;as (not exactly=
, I
 will explain below) members, all the local variables of the =93function=94=
=20
(including the return value), and also the information about where it=20
stopped last time (and should resume from) - let=92s call it, from now on,
 =93position data=94.</span></p><p dir=3D"ltr" style=3D"line-height:1.15;ma=
rgin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:A=
rial;color:#000000;background-color:transparent;font-weight:normal;font-sty=
le:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"=
>To be more precise: an </span><span style=3D"font-size:15px;font-family:Ar=
ial;color:#000000;background-color:transparent;font-weight:normal;font-styl=
e:italic;font-variant:normal;text-decoration:none;vertical-align:baseline">=
iterator</span><span style=3D"font-size:15px;font-family:Arial;color:#00000=
0;background-color:transparent;font-weight:normal;font-style:normal;font-va=
riant:normal;text-decoration:none;vertical-align:baseline">
 should contain the memory for the local variables (like every member=20
variable), but their lifetime will be as if they were local variables of
 the =93function=94. I mean - they will been constructed only when the=20
=93function=94 will decide so, and not automatically when the </span><span =
style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:tr=
ansparent;font-weight:normal;font-style:italic;font-variant:normal;text-dec=
oration:none;vertical-align:baseline">iterator</span><span style=3D"font-si=
ze:15px;font-family:Arial;color:#000000;background-color:transparent;font-w=
eight:normal;font-style:normal;font-variant:normal;text-decoration:none;ver=
tical-align:baseline"> is been constructed.</span></p><p dir=3D"ltr" style=
=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-=
size:15px;font-family:Arial;color:#000000;background-color:transparent;font=
-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;v=
ertical-align:baseline">When the =93function=94 ends (either by falling thr=
ough the ending brace, not catching exception, or simply saying </span><spa=
n style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:=
transparent;font-weight:normal;font-style:italic;font-variant:normal;text-d=
ecoration:none;vertical-align:baseline">return;</span><span style=3D"font-s=
ize:15px;font-family:Arial;color:#000000;background-color:transparent;font-=
weight:normal;font-style:normal;font-variant:normal;text-decoration:none;ve=
rtical-align:baseline">
 without a value), the position data should contain this information,=20
and (like every function), every local variable should be destructed.</span=
></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:=
0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgrou=
nd-color:transparent;font-weight:normal;font-style:normal;font-variant:norm=
al;text-decoration:none;vertical-align:baseline">Knowing
 the position data let us easily determine which variables are alive,=20
and so I think that the following member functions can be automatically=20
created:</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;=
margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#0=
00000;background-color:transparent;font-weight:normal;font-style:normal;fon=
t-variant:normal;text-decoration:none;vertical-align:baseline">copy constru=
ctor - should copy the position data, the parameters, and every living loca=
l variable</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0p=
t;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:=
#000000;background-color:transparent;font-weight:normal;font-style:normal;f=
ont-variant:normal;text-decoration:none;vertical-align:baseline">move const=
ructor - the same, but move instead of copy</span></p><p dir=3D"ltr" style=
=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-=
size:15px;font-family:Arial;color:#000000;background-color:transparent;font=
-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;v=
ertical-align:baseline">destructor - destroy the parameters, and every livi=
ng local variable.</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margi=
n-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Aria=
l;color:#000000;background-color:transparent;font-weight:normal;font-style:=
normal;font-variant:normal;text-decoration:none;vertical-align:baseline">(O=
f course, if some local variable is noncopyable, so is the iterator)</span>=
</p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0=
pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgroun=
d-color:transparent;font-weight:normal;font-style:normal;font-variant:norma=
l;text-decoration:none;vertical-align:baseline">I think that it should not =
be assignable - If one iterator have a live object, and another one have no=
t, it=92s a real mess.</span></p><br><span style=3D"font-size:15px;font-fam=
ily:Arial;color:#000000;background-color:transparent;font-weight:normal;fon=
t-style:normal;font-variant:normal;text-decoration:none;vertical-align:base=
line"></span><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin=
-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;=
background-color:transparent;font-weight:normal;font-style:normal;font-vari=
ant:normal;text-decoration:none;vertical-align:baseline">Some example:</spa=
n></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom=
:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgro=
und-color:transparent;font-weight:normal;font-style:normal;font-variant:nor=
mal;text-decoration:none;vertical-align:baseline">Suppose
 that we want to yield the number 0, and then, the first n Fibonacci=20
numbers and the first n even number, alternately. To add more interest=20
(and to demonstrate more rules), I want to create and destroy some=20
objects (assume </span><span style=3D"font-size:15px;font-family:Arial;colo=
r:#000000;background-color:transparent;font-weight:normal;font-style:italic=
;font-variant:normal;text-decoration:none;vertical-align:baseline">A</span>=
<span style=3D"font-size:15px;font-family:Arial;color:#000000;background-co=
lor:transparent;font-weight:normal;font-style:normal;font-variant:normal;te=
xt-decoration:none;vertical-align:baseline"> is a copyable, moveable, and i=
nt-constructive class), so I=92ve written the following code:</span></p><p =
dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><sp=
an style=3D"font-size:15px;font-family:Arial;color:#000000;background-color=
:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-=
decoration:none;vertical-align:baseline">int : fib_even(int n) {</span></p>=
<p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt">=
<span style=3D"font-size:15px;font-family:Arial;color:#000000;background-co=
lor:transparent;font-weight:normal;font-style:normal;font-variant:normal;te=
xt-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;A a(7);</spa=
n></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom=
:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgro=
und-color:transparent;font-weight:normal;font-style:normal;font-variant:nor=
mal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;int fi=
b1=3D0,fib2=3D1,even=3D0;</span></p><p dir=3D"ltr" style=3D"line-height:1.1=
5;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-fami=
ly:Arial;color:#000000;background-color:transparent;font-weight:normal;font=
-style:normal;font-variant:normal;text-decoration:none;vertical-align:basel=
ine"> &nbsp;&nbsp;&nbsp;return 0;</span></p><p dir=3D"ltr" style=3D"line-he=
ight:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;f=
ont-family:Arial;color:#000000;background-color:transparent;font-weight:nor=
mal;font-style:normal;font-variant:normal;text-decoration:none;vertical-ali=
gn:baseline"> &nbsp;&nbsp;&nbsp;while(n--) {</span></p><p dir=3D"ltr" style=
=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-=
size:15px;font-family:Arial;color:#000000;background-color:transparent;font=
-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;v=
ertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;int fib3=3Dfi=
b1+fib2;</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;=
margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#0=
00000;background-color:transparent;font-weight:normal;font-style:normal;fon=
t-variant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; &nbsp;fib1=3Dfib2;</span></p><p dir=3D"ltr" style=3D"li=
ne-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:1=
5px;font-family:Arial;color:#000000;background-color:transparent;font-weigh=
t:normal;font-style:normal;font-variant:normal;text-decoration:none;vertica=
l-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;fib2=3Dfib3;</span>=
</p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0=
pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgroun=
d-color:transparent;font-weight:normal;font-style:normal;font-variant:norma=
l;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; &nbsp;return fib3;</span></p><p dir=3D"ltr" style=3D"line-height:1.15;=
margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family=
:Arial;color:#000000;background-color:transparent;font-weight:normal;font-s=
tyle:normal;font-variant:normal;text-decoration:none;vertical-align:baselin=
e"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;A b=3Dn;</span></p><p dir=3D"ltr" =
style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"=
font-size:15px;font-family:Arial;color:#000000;background-color:transparent=
;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:n=
one;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;return e=
ven+=3D2;</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt=
;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#=
000000;background-color:transparent;font-weight:normal;font-style:normal;fo=
nt-variant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbs=
p;&nbsp;}</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt=
;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#=
000000;background-color:transparent;font-weight:normal;font-style:normal;fo=
nt-variant:normal;text-decoration:none;vertical-align:baseline">}</span></p=
><br><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgrou=
nd-color:transparent;font-weight:normal;font-style:normal;font-variant:norm=
al;text-decoration:none;vertical-align:baseline"></span><p dir=3D"ltr" styl=
e=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font=
-size:15px;font-family:Arial;color:#000000;background-color:transparent;fon=
t-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;=
vertical-align:baseline">A compiler may expand it to something like:</span>=
</p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0=
pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgroun=
d-color:transparent;font-weight:normal;font-style:normal;font-variant:norma=
l;text-decoration:none;vertical-align:baseline">(Note:
 I=92m using dynamic memory allocation, but It=92s not really how it should=
=20
be implemented - I just don=92t want some constructors and destructors to=
=20
been invoked automatically)</span></p><br><span style=3D"font-size:15px;fon=
t-family:Arial;color:#000000;background-color:transparent;font-weight:norma=
l;font-style:normal;font-variant:normal;text-decoration:none;vertical-align=
:baseline"></span><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;m=
argin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#00=
0000;background-color:transparent;font-weight:normal;font-style:normal;font=
-variant:normal;text-decoration:none;vertical-align:baseline">class fib_eve=
n {</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margi=
n-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000=
;background-color:transparent;font-weight:normal;font-style:normal;font-var=
iant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbs=
p;class iterator {</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margi=
n-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Aria=
l;color:#000000;background-color:transparent;font-weight:normal;font-style:=
normal;font-variant:normal;text-decoration:none;vertical-align:baseline"> &=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;int n;</span></p><p dir=3D"ltr" style=
=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-=
size:15px;font-family:Arial;color:#000000;background-color:transparent;font=
-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;v=
ertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;int *fib1,*fi=
b2,*fib3,*even;</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-t=
op:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;c=
olor:#000000;background-color:transparent;font-weight:normal;font-style:nor=
mal;font-variant:normal;text-decoration:none;vertical-align:baseline"> &nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;A *a,*b;</span></p><p dir=3D"ltr" style=3D=
"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-siz=
e:15px;font-family:Arial;color:#000000;background-color:transparent;font-we=
ight:normal;font-style:normal;font-variant:normal;text-decoration:none;vert=
ical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;int *ret_value;<=
/span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bo=
ttom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;bac=
kground-color:transparent;font-weight:normal;font-style:normal;font-variant=
:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp; &nbsp;enum {p0,p1,p2,p3,p4} pos; //resuming points<br></span></p=
><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"=
><span style=3D"font-size:15px;font-family:Arial;color:#000000;background-c=
olor:transparent;font-weight:normal;font-style:normal;font-variant:normal;t=
ext-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; &nbsp;void next() {</span></p><p dir=3D"ltr" style=3D"line-height:1.15;ma=
rgin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:A=
rial;color:#000000;background-color:transparent;font-weight:normal;font-sty=
le:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"=
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;switch (pos) {</s=
pan></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bott=
om:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backg=
round-color:transparent;font-weight:normal;font-style:normal;font-variant:n=
ormal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;case p0: break;</span>=
</p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0=
pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgroun=
d-color:transparent;font-weight:normal;font-style:normal;font-variant:norma=
l;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;case p1: goto label1;</spa=
n></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom=
:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgro=
und-color:transparent;font-weight:normal;font-style:normal;font-variant:nor=
mal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;case p2: goto label2;</s=
pan></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bott=
om:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backg=
round-color:transparent;font-weight:normal;font-style:normal;font-variant:n=
ormal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;case p3: goto label3;<=
/span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bo=
ttom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;bac=
kground-color:transparent;font-weight:normal;font-style:normal;font-variant=
:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;case p4: return;</sp=
an></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-botto=
m:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgr=
ound-color:transparent;font-weight:normal;font-style:normal;font-variant:no=
rmal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}</span></p><p dir=3D"ltr" style=3D"line-h=
eight:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;=
font-family:Arial;color:#000000;background-color:transparent;font-weight:no=
rmal;font-style:normal;font-variant:normal;text-decoration:none;vertical-al=
ign:baseline">//construct automatic variables of t</span><span style=3D"fon=
t-size:15px;font-family:Arial;color:#000000;background-color:transparent;fo=
nt-weight:normal;font-style:normal;font-variant:normal;text-decoration:none=
;vertical-align:baseline">he function<br></span></p><p dir=3D"ltr" style=3D=
"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-siz=
e:15px;font-family:Arial;color:#000000;background-color:transparent;font-we=
ight:normal;font-style:normal;font-variant:normal;text-decoration:none;vert=
ical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nb=
sp;a=3Dnew A(7);</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-=
top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;=
color:#000000;background-color:transparent;font-weight:normal;font-style:no=
rmal;font-variant:normal;text-decoration:none;vertical-align:baseline"> &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;fib1=3Dnew int(0);</sp=
an></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-botto=
m:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgr=
ound-color:transparent;font-weight:normal;font-style:normal;font-variant:no=
rmal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;fib2=3Dnew int(1);</span></p><p dir=3D"ltr=
" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=
=3D"font-size:15px;font-family:Arial;color:#000000;background-color:transpa=
rent;font-weight:normal;font-style:normal;font-variant:normal;text-decorati=
on:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbs=
p;&nbsp; &nbsp;even=3Dnew int(0);</span></p><p dir=3D"ltr" style=3D"line-he=
ight:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;f=
ont-family:Arial;color:#000000;background-color:transparent;font-weight:nor=
mal;font-style:normal;font-variant:normal;text-decoration:none;vertical-ali=
gn:baseline">//t</span><span style=3D"font-size:15px;font-family:Arial;colo=
r:#000000;background-color:transparent;font-weight:normal;font-style:normal=
;font-variant:normal;text-decoration:none;vertical-align:baseline">he retur=
n process - create t</span><span style=3D"font-size:15px;font-family:Arial;=
color:#000000;background-color:transparent;font-weight:normal;font-style:no=
rmal;font-variant:normal;text-decoration:none;vertical-align:baseline">he v=
alue, save t</span><span style=3D"font-size:15px;font-family:Arial;color:#0=
00000;background-color:transparent;font-weight:normal;font-style:normal;fon=
t-variant:normal;text-decoration:none;vertical-align:baseline">he resuming =
point, and return<br></span></p><p dir=3D"ltr" style=3D"line-height:1.15;ma=
rgin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:A=
rial;color:#000000;background-color:transparent;font-weight:normal;font-sty=
le:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"=
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ret_value=3Dnew i=
nt(0);</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;ma=
rgin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000=
000;background-color:transparent;font-weight:normal;font-style:normal;font-=
variant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pos=3Dp1;</span></p><p dir=3D"lt=
r" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=
=3D"font-size:15px;font-family:Arial;color:#000000;background-color:transpa=
rent;font-weight:normal;font-style:normal;font-variant:normal;text-decorati=
on:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbs=
p;&nbsp; &nbsp;return;</span></p><p dir=3D"ltr" style=3D"line-height:1.15;m=
argin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:=
Arial;color:#000000;background-color:transparent;font-weight:normal;font-st=
yle:normal;font-variant:normal;text-decoration:none;vertical-align:baseline=
"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;label1:<br></span></p><p dir=3D"ltr=
" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=
=3D"font-size:15px;font-family:Arial;color:#000000;background-color:transpa=
rent;font-weight:normal;font-style:normal;font-variant:normal;text-decorati=
on:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbs=
p;&nbsp; &nbsp;while(n--) {</span></p><p dir=3D"ltr" style=3D"line-height:1=
..15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-fa=
mily:Arial;color:#000000;background-color:transparent;font-weight:normal;fo=
nt-style:normal;font-variant:normal;text-decoration:none;vertical-align:bas=
eline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp=
; &nbsp;fib3=3Dnew int(*fib1+*fib2); //being constructed only now<br></span=
></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:=
0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgrou=
nd-color:transparent;font-weight:normal;font-style:normal;font-variant:norm=
al;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;*fib1=3D*fib2;</span></p>=
<p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt">=
<span style=3D"font-size:15px;font-family:Arial;color:#000000;background-co=
lor:transparent;font-weight:normal;font-style:normal;font-variant:normal;te=
xt-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;*fib2=3D*fib3;</span></p><p di=
r=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span=
 style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:t=
ransparent;font-weight:normal;font-style:normal;font-variant:normal;text-de=
coration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbs=
p;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ret_value=3Dnew int(*fib3);</span><=
/p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0p=
t"><span style=3D"font-size:15px;font-family:Arial;color:#000000;background=
-color:transparent;font-weight:normal;font-style:normal;font-variant:normal=
;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pos=3Dp2;</span></p><p dir=
=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span =
style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:tr=
ansparent;font-weight:normal;font-style:normal;font-variant:normal;text-dec=
oration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp=
;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return;</span></p><p dir=3D"ltr" sty=
le=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"fon=
t-size:15px;font-family:Arial;color:#000000;background-color:transparent;fo=
nt-weight:normal;font-style:normal;font-variant:normal;text-decoration:none=
;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;label2:</sp=
an></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-botto=
m:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgr=
ound-color:transparent;font-weight:normal;font-style:normal;font-variant:no=
rmal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;b=3Dnew A(n);</span></p=
><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"=
><span style=3D"font-size:15px;font-family:Arial;color:#000000;background-c=
olor:transparent;font-weight:normal;font-style:normal;font-variant:normal;t=
ext-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;ret_value=3Dnew int((*even)+=
=3D2);</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;ma=
rgin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000=
000;background-color:transparent;font-weight:normal;font-style:normal;font-=
variant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pos=3Dp3;</sp=
an></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-botto=
m:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgr=
ound-color:transparent;font-weight:normal;font-style:normal;font-variant:no=
rmal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return;</span></p><p di=
r=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span=
 style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:t=
ransparent;font-weight:normal;font-style:normal;font-variant:normal;text-de=
coration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbs=
p;label3:</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt=
;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#=
000000;background-color:transparent;font-weight:normal;font-style:normal;fo=
nt-variant:normal;text-decoration:none;vertical-align:baseline">//automatic=
 variables going out of scope, and s</span><span style=3D"font-size:15px;fo=
nt-family:Arial;color:#000000;background-color:transparent;font-weight:norm=
al;font-style:normal;font-variant:normal;text-decoration:none;vertical-alig=
n:baseline"><span style=3D"font-size:15px;font-family:Arial;color:#000000;b=
ackground-color:transparent;font-weight:normal;font-style:normal;font-varia=
nt:normal;text-decoration:none;vertical-align:baseline">h</span>ould be des=
tructed<br></span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0=
pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color=
:#000000;background-color:transparent;font-weight:normal;font-style:normal;=
font-variant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;delete b=
;</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-=
bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;b=
ackground-color:transparent;font-weight:normal;font-style:normal;font-varia=
nt:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;delete fib3;</span=
></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:=
0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgrou=
nd-color:transparent;font-weight:normal;font-style:normal;font-variant:norm=
al;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}</span></p><p dir=3D"ltr" style=3D"line-hei=
ght:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;fo=
nt-family:Arial;color:#000000;background-color:transparent;font-weight:norm=
al;font-style:normal;font-variant:normal;text-decoration:none;vertical-alig=
n:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;delete=
 even;</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;ma=
rgin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000=
000;background-color:transparent;font-weight:normal;font-style:normal;font-=
variant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;delete fib2;</span></p><p dir=3D=
"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span sty=
le=3D"font-size:15px;font-family:Arial;color:#000000;background-color:trans=
parent;font-weight:normal;font-style:normal;font-variant:normal;text-decora=
tion:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&n=
bsp;&nbsp; &nbsp;delete fib1;</span></p><p dir=3D"ltr" style=3D"line-height=
:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-=
family:Arial;color:#000000;background-color:transparent;font-weight:normal;=
font-style:normal;font-variant:normal;text-decoration:none;vertical-align:b=
aseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;delete a;=
</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-b=
ottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;ba=
ckground-color:transparent;font-weight:normal;font-style:normal;font-varian=
t:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;pos=3Dp4;</span></p><p dir=3D"ltr" sty=
le=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"fon=
t-size:15px;font-family:Arial;color:#000000;background-color:transparent;fo=
nt-weight:normal;font-style:normal;font-variant:normal;text-decoration:none=
;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;}</span></p=
><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"=
><span style=3D"font-size:15px;font-family:Arial;color:#000000;background-c=
olor:transparent;font-weight:normal;font-style:normal;font-variant:normal;t=
ext-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; &nbsp;iterator(int n) : n(n),pos(p0) {</span></p><p dir=3D"ltr" style=3D"=
line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size=
:15px;font-family:Arial;color:#000000;background-color:transparent;font-wei=
ght:normal;font-style:normal;font-variant:normal;text-decoration:none;verti=
cal-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbs=
p;next(); //get t</span><span style=3D"font-size:15px;font-family:Arial;col=
or:#000000;background-color:transparent;font-weight:normal;font-style:norma=
l;font-variant:normal;text-decoration:none;vertical-align:baseline">he firs=
t value<br></span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0=
pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color=
:#000000;background-color:transparent;font-weight:normal;font-style:normal;=
font-variant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp; &nbsp;}</span></p><p dir=3D"ltr" style=3D"line-heigh=
t:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font=
-family:Arial;color:#000000;background-color:transparent;font-weight:normal=
;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:=
baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;iterator() : pos(p4) {}</sp=
an></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-botto=
m:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgr=
ound-color:transparent;font-weight:normal;font-style:normal;font-variant:no=
rmal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;publi=
c:</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin=
-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;=
background-color:transparent;font-weight:normal;font-style:normal;font-vari=
ant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; &nbsp;iterator &amp;operator++() {</span></p><p dir=3D"ltr" s=
tyle=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"f=
ont-size:15px;font-family:Arial;color:#000000;background-color:transparent;=
font-weight:normal;font-style:normal;font-variant:normal;text-decoration:no=
ne;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nb=
sp; &nbsp;delete ret_value;</span></p><p dir=3D"ltr" style=3D"line-height:1=
..15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-fa=
mily:Arial;color:#000000;background-color:transparent;font-weight:normal;fo=
nt-style:normal;font-variant:normal;text-decoration:none;vertical-align:bas=
eline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;next();</sp=
an></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-botto=
m:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgr=
ound-color:transparent;font-weight:normal;font-style:normal;font-variant:no=
rmal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return *this;</span></p><p dir=3D"ltr" sty=
le=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"fon=
t-size:15px;font-family:Arial;color:#000000;background-color:transparent;fo=
nt-weight:normal;font-style:normal;font-variant:normal;text-decoration:none=
;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;}</span></p=
><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"=
><span style=3D"font-size:15px;font-family:Arial;color:#000000;background-c=
olor:transparent;font-weight:normal;font-style:normal;font-variant:normal;t=
ext-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; &nbsp;int &amp;operator*() {</span></p><p dir=3D"ltr" style=3D"line-heigh=
t:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font=
-family:Arial;color:#000000;background-color:transparent;font-weight:normal=
;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:=
baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return *=
ret_value;</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0p=
t;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:=
#000000;background-color:transparent;font-weight:normal;font-style:normal;f=
ont-variant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; &nbsp;}</span></p><p dir=3D"ltr" style=3D"line-height=
:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-=
family:Arial;color:#000000;background-color:transparent;font-weight:normal;=
font-style:normal;font-variant:normal;text-decoration:none;vertical-align:b=
aseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;iterator(const iterator &amp=
;it) : n(it.n),pos(it.pos) {</span></p><p dir=3D"ltr" style=3D"line-height:=
1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-f=
amily:Arial;color:#000000;background-color:transparent;font-weight:normal;f=
ont-style:normal;font-variant:normal;text-decoration:none;vertical-align:ba=
seline">//copy only living members<br></span></p><p dir=3D"ltr" style=3D"li=
ne-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:1=
5px;font-family:Arial;color:#000000;background-color:transparent;font-weigh=
t:normal;font-style:normal;font-variant:normal;text-decoration:none;vertica=
l-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;=
if (pos&gt;p0 &amp;&amp; pos&lt;p4) {</span></p><p dir=3D"ltr" style=3D"lin=
e-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15=
px;font-family:Arial;color:#000000;background-color:transparent;font-weight=
:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical=
-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&=
nbsp;&nbsp; &nbsp;ret_value=3Dnew int(*it.ret_value);</span></p><p dir=3D"l=
tr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=
=3D"font-size:15px;font-family:Arial;color:#000000;background-color:transpa=
rent;font-weight:normal;font-style:normal;font-variant:normal;text-decorati=
on:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbs=
p;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;a=3Dnew A(*it.a);</span></p><p dir=3D"ltr=
" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=
=3D"font-size:15px;font-family:Arial;color:#000000;background-color:transpa=
rent;font-weight:normal;font-style:normal;font-variant:normal;text-decorati=
on:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbs=
p;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;fib1=3Dnew int(*it.fib1);</span></p><p di=
r=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span=
 style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:t=
ransparent;font-weight:normal;font-style:normal;font-variant:normal;text-de=
coration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbs=
p;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;fib2=3Dnew int(*it.fib2);</span></p=
><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"=
><span style=3D"font-size:15px;font-family:Arial;color:#000000;background-c=
olor:transparent;font-weight:normal;font-style:normal;font-variant:normal;t=
ext-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;even=3Dnew int(*it.even);</sp=
an></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-botto=
m:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgr=
ound-color:transparent;font-weight:normal;font-style:normal;font-variant:no=
rmal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}</span></p><p dir=3D"ltr" style=3D"line-h=
eight:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;=
font-family:Arial;color:#000000;background-color:transparent;font-weight:no=
rmal;font-style:normal;font-variant:normal;text-decoration:none;vertical-al=
ign:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if (=
pos&gt;p1 &amp;&amp; pos&lt;p4) fib3=3Dnew int(*it.fib3);</span></p><p dir=
=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span =
style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:tr=
ansparent;font-weight:normal;font-style:normal;font-variant:normal;text-dec=
oration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp=
;&nbsp;&nbsp; &nbsp;if (pos&gt;p2 &amp;&amp; pos&lt;p4) b=3Dnew A(*it.b);</=
span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bot=
tom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;back=
ground-color:transparent;font-weight:normal;font-style:normal;font-variant:=
normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; &nbsp;}</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin=
-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial=
;color:#000000;background-color:transparent;font-weight:normal;font-style:n=
ormal;font-variant:normal;text-decoration:none;vertical-align:baseline"> &n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;iterator(iterator &amp;&amp;it) : n(std:=
:move(it.n)),pos(it.pos) {</span></p><p dir=3D"ltr" style=3D"line-height:1.=
15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-fam=
ily:Arial;color:#000000;background-color:transparent;font-weight:normal;fon=
t-style:normal;font-variant:normal;text-decoration:none;vertical-align:base=
line"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if (pos&gt;p=
0 &amp;&amp; pos&lt;p4) {</span></p><p dir=3D"ltr" style=3D"line-height:1.1=
5;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-fami=
ly:Arial;color:#000000;background-color:transparent;font-weight:normal;font=
-style:normal;font-variant:normal;text-decoration:none;vertical-align:basel=
ine"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;ret_value=3Dnew int(std::move(*it.ret_value));</span></p><p dir=3D"lt=
r" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=
=3D"font-size:15px;font-family:Arial;color:#000000;background-color:transpa=
rent;font-weight:normal;font-style:normal;font-variant:normal;text-decorati=
on:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbs=
p;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;a=3Dnew A(std::move(*it.a));</span></p><p=
 dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><s=
pan style=3D"font-size:15px;font-family:Arial;color:#000000;background-colo=
r:transparent;font-weight:normal;font-style:normal;font-variant:normal;text=
-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &=
nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;fib1=3Dnew int(std::move(*it.fib=
1));</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;marg=
in-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#00000=
0;background-color:transparent;font-weight:normal;font-style:normal;font-va=
riant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;fib2=3Dnew int(=
std::move(*it.fib2));</span></p><p dir=3D"ltr" style=3D"line-height:1.15;ma=
rgin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:A=
rial;color:#000000;background-color:transparent;font-weight:normal;font-sty=
le:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"=
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbs=
p;even=3Dnew int(std::move(*it.even));</span></p><p dir=3D"ltr" style=3D"li=
ne-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:1=
5px;font-family:Arial;color:#000000;background-color:transparent;font-weigh=
t:normal;font-style:normal;font-variant:normal;text-decoration:none;vertica=
l-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;=
}</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-=
bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;b=
ackground-color:transparent;font-weight:normal;font-style:normal;font-varia=
nt:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if (pos&gt;p1 &amp;&amp; pos&lt;p4) f=
ib3=3Dnew int(std::move(*it.fib3));</span></p><p dir=3D"ltr" style=3D"line-=
height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px=
;font-family:Arial;color:#000000;background-color:transparent;font-weight:n=
ormal;font-style:normal;font-variant:normal;text-decoration:none;vertical-a=
lign:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if =
(pos&gt;p2 &amp;&amp; pos&lt;p4) b=3Dnew A(std::move(*it.b));</span></p><p =
dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><sp=
an style=3D"font-size:15px;font-family:Arial;color:#000000;background-color=
:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-=
decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &n=
bsp;}</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;mar=
gin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#0000=
00;background-color:transparent;font-weight:normal;font-style:normal;font-v=
ariant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; &nbsp;~iterator() {</span></p><p dir=3D"ltr" style=3D"line=
-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15p=
x;font-family:Arial;color:#000000;background-color:transparent;font-weight:=
normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-=
align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if=
 (pos&gt;p2 &amp;&amp; pos&lt;p4) delete b;</span></p><p dir=3D"ltr" style=
=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-=
size:15px;font-family:Arial;color:#000000;background-color:transparent;font=
-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;v=
ertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;if (pos&gt;p1 &amp;&amp; pos&lt;p4) delete fib3;</span></p><p dir=3D"=
ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span styl=
e=3D"font-size:15px;font-family:Arial;color:#000000;background-color:transp=
arent;font-weight:normal;font-style:normal;font-variant:normal;text-decorat=
ion:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nb=
sp;&nbsp; &nbsp;if (pos&gt;p0 &amp;&amp; pos&lt;p4) {</span></p><p dir=3D"l=
tr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=
=3D"font-size:15px;font-family:Arial;color:#000000;background-color:transpa=
rent;font-weight:normal;font-style:normal;font-variant:normal;text-decorati=
on:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbs=
p;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;delete even;</span></p><p dir=3D"ltr" sty=
le=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"fon=
t-size:15px;font-family:Arial;color:#000000;background-color:transparent;fo=
nt-weight:normal;font-style:normal;font-variant:normal;text-decoration:none=
;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp=
; &nbsp;&nbsp;&nbsp; &nbsp;delete fib2;</span></p><p dir=3D"ltr" style=3D"l=
ine-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:=
15px;font-family:Arial;color:#000000;background-color:transparent;font-weig=
ht:normal;font-style:normal;font-variant:normal;text-decoration:none;vertic=
al-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp=
;&nbsp;&nbsp; &nbsp;delete fib1;</span></p><p dir=3D"ltr" style=3D"line-hei=
ght:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;fo=
nt-family:Arial;color:#000000;background-color:transparent;font-weight:norm=
al;font-style:normal;font-variant:normal;text-decoration:none;vertical-alig=
n:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;=
&nbsp; &nbsp;delete a;</span></p><p dir=3D"ltr" style=3D"line-height:1.15;m=
argin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:=
Arial;color:#000000;background-color:transparent;font-weight:normal;font-st=
yle:normal;font-variant:normal;text-decoration:none;vertical-align:baseline=
"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nb=
sp;delete ret_value;</span></p><p dir=3D"ltr" style=3D"line-height:1.15;mar=
gin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Ar=
ial;color:#000000;background-color:transparent;font-weight:normal;font-styl=
e:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">=
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}</span></p><p dir=
=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span =
style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:tr=
ansparent;font-weight:normal;font-style:normal;font-variant:normal;text-dec=
oration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp=
;}</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin=
-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;=
background-color:transparent;font-weight:normal;font-style:normal;font-vari=
ant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; &nbsp;bool operator!=3D(const iterator &amp;it) {</span></p><=
p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><=
span style=3D"font-size:15px;font-family:Arial;color:#000000;background-col=
or:transparent;font-weight:normal;font-style:normal;font-variant:normal;tex=
t-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp; &nbsp;return pos!=3Dit.pos;</span></p><p dir=3D"ltr" sty=
le=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"fon=
t-size:15px;font-family:Arial;color:#000000;background-color:transparent;fo=
nt-weight:normal;font-style:normal;font-variant:normal;text-decoration:none=
;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;}</span></p=
><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"=
><span style=3D"font-size:15px;font-family:Arial;color:#000000;background-c=
olor:transparent;font-weight:normal;font-style:normal;font-variant:normal;t=
ext-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; &nbsp;operator bool() {</span></p><p dir=3D"ltr" style=3D"line-height:1.1=
5;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-fami=
ly:Arial;color:#000000;background-color:transparent;font-weight:normal;font=
-style:normal;font-variant:normal;text-decoration:none;vertical-align:basel=
ine"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return pos&lt=
;p4; //still </span><span style=3D"font-size:15px;font-family:Arial;color:#=
000000;background-color:transparent;font-weight:normal;font-style:normal;fo=
nt-variant:normal;text-decoration:none;vertical-align:baseline">hasn't ende=
d<br></span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;mar=
gin-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#0000=
00;background-color:transparent;font-weight:normal;font-style:normal;font-v=
ariant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp; &nbsp;}</span></p><p dir=3D"ltr" style=3D"line-height:1.15=
;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-famil=
y:Arial;color:#000000;background-color:transparent;font-weight:normal;font-=
style:normal;font-variant:normal;text-decoration:none;vertical-align:baseli=
ne"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;iterator &amp;operator=3D(const i=
terator&amp;) =3D delete;</span></p><p dir=3D"ltr" style=3D"line-height:1.1=
5;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-fami=
ly:Arial;color:#000000;background-color:transparent;font-weight:normal;font=
-style:normal;font-variant:normal;text-decoration:none;vertical-align:basel=
ine"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;friend fib_even;</span></p><p di=
r=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span=
 style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:t=
ransparent;font-weight:normal;font-style:normal;font-variant:normal;text-de=
coration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;};</span></p><p d=
ir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><spa=
n style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:=
transparent;font-weight:normal;font-style:normal;font-variant:normal;text-d=
ecoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;int n;</span></p=
><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"=
><span style=3D"font-size:15px;font-family:Arial;color:#000000;background-c=
olor:transparent;font-weight:normal;font-style:normal;font-variant:normal;t=
ext-decoration:none;vertical-align:baseline">public:</span></p><p dir=3D"lt=
r" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style=
=3D"font-size:15px;font-family:Arial;color:#000000;background-color:transpa=
rent;font-weight:normal;font-style:normal;font-variant:normal;text-decorati=
on:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;fib_even(int n) : n(n) =
{}</span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin=
-bottom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;=
background-color:transparent;font-weight:normal;font-style:normal;font-vari=
ant:normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp=
;iterator begin() {</span></p><p dir=3D"ltr" style=3D"line-height:1.15;marg=
in-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;font-family:Ari=
al;color:#000000;background-color:transparent;font-weight:normal;font-style=
:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;return iterator(n);</span></p><p dir=
=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span =
style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:tr=
ansparent;font-weight:normal;font-style:normal;font-variant:normal;text-dec=
oration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;}</span></p><p dir=
=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span =
style=3D"font-size:15px;font-family:Arial;color:#000000;background-color:tr=
ansparent;font-weight:normal;font-style:normal;font-variant:normal;text-dec=
oration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;iterator end() {</=
span></p><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-bot=
tom:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;back=
ground-color:transparent;font-weight:normal;font-style:normal;font-variant:=
normal;text-decoration:none;vertical-align:baseline"> &nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; &nbsp;return iterator();</span></p><p dir=3D"ltr" style=3D"line-h=
eight:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;=
font-family:Arial;color:#000000;background-color:transparent;font-weight:no=
rmal;font-style:normal;font-variant:normal;text-decoration:none;vertical-al=
ign:baseline"> &nbsp;&nbsp;&nbsp;}</span></p><p dir=3D"ltr" style=3D"line-h=
eight:1.15;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-size:15px;=
font-family:Arial;color:#000000;background-color:transparent;font-weight:no=
rmal;font-style:normal;font-variant:normal;text-decoration:none;vertical-al=
ign:baseline">};</span></p><br><span style=3D"font-size:15px;font-family:Ar=
ial;color:#000000;background-color:transparent;font-weight:normal;font-styl=
e:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">=
</span><p dir=3D"ltr" style=3D"line-height:1.15;margin-top:0pt;margin-botto=
m:0pt"><span style=3D"font-size:15px;font-family:Arial;color:#000000;backgr=
ound-color:transparent;font-weight:normal;font-style:normal;font-variant:no=
rmal;text-decoration:none;vertical-align:baseline">So, what do you think?</=
span></p></blockquote>

<p></p>

-- <br />
&nbsp;<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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_87_21569202.1372323233185--

.
