C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Implementing Ruby Ranges in C++

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
Dilip
Guest





PostPosted: Sun Apr 24, 2005 8:21 pm    Post subject: Implementing Ruby Ranges in C++ Reply with quote



Gurus

I came across a post[1] that has done a non-trivial job of trying to
implement Ruby-like Ranges[2] in C#. Considering the kind of
contortions an OO language had to undergo to implement this, I wonder
if something similar has already been done in C++ using the magic of
templates? Maybe the Boost libraries have something equivalent?

--Dilip

[1] http://pluralsight.com/blogs/dbox/archive/2005/04/24/7690.aspx
[2] http://www.zenspider.com/Languages/Ruby/QuickRef.html#9


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
chabiss
Guest





PostPosted: Tue Apr 26, 2005 9:06 am    Post subject: Re: Implementing Ruby Ranges in C++ Reply with quote



Check out the RangeLib library...Boost and STLSoft both offer an
implementation of the range concept

http://rangelib.synesis.com.au/

-Charles

"Dilip" <rdilipk (AT) lycos (DOT) com> wrote

Quote:
Gurus

I came across a post[1] that has done a non-trivial job of trying to
implement Ruby-like Ranges[2] in C#. Considering the kind of
contortions an OO language had to undergo to implement this, I wonder
if something similar has already been done in C++ using the magic of
templates? Maybe the Boost libraries have something equivalent?

--Dilip

[1] http://pluralsight.com/blogs/dbox/archive/2005/04/24/7690.aspx
[2] http://www.zenspider.com/Languages/Ruby/QuickRef.html#9

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


Back to top
Ben Hutchings
Guest





PostPosted: Wed Apr 27, 2005 7:49 am    Post subject: Re: Implementing Ruby Ranges in C++ Reply with quote



Dilip wrote:
Quote:
Gurus

I came across a post[1] that has done a non-trivial job of trying to
implement Ruby-like Ranges[2] in C#. Considering the kind of
contortions an OO language had to undergo to implement this, I wonder
if something similar has already been done in C++ using the magic of
templates? Maybe the Boost libraries have something equivalent?

They do:
<http://www.boost.org/libs/iterator/doc/counting_iterator.html>

--
Ben Hutchings
Having problems with C++ templates? Your questions may be answered by
<http://womble.decadentplace.org.uk/c++/template-faq.html>.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.