From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fce663eaf40b52f6 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!green.octanews.net!news-out.octanews.net!news-out.visi.com!petbe.visi.com!news.octanews.net!attcg2!attdv2!frgp!attdv1!ip.att.net!newsfeed1.global.lmco.com!svlnews.lmms.lmco.com!not-for-mail From: "Xenos" Newsgroups: comp.lang.ada Subject: Re: Ranges in C++ Date: Mon, 10 May 2004 12:19:19 -0400 Organization: Hades Message-ID: References: <1327280.rH5RGlINvC@linux1.krischik.com> NNTP-Posting-Host: 158.187.64.144 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Xref: controlnews3.google.com comp.lang.ada:420 Date: 2004-05-10T12:19:19-04:00 List-Id: "James Rogers" wrote in message news:Xns94E2AF95950Ajimmaureenrogers@204.127.36.1... > Martin Krischik wrote in > news:1327280.rH5RGlINvC@linux1.krischik.com: > > > Xenos wrote: > > > >> As a programmer of both Ada and C++, I too am glad. When I have to > >> use Ada, > >> I sorely miss the STL. Of course, when I have to use C++, I miss > >> unique (new) types derived from primative types...and ranges (oh how > >> I miss ranges!), oh and arrays as first-class types. > > > > I have implemented a little C++ Template-Library emulating ranges. > > It's not at cool as ranges but it works. If you want I package it up > > and make a release for you. Yeah, I have done something similar. I had it so it would use the class type to check ranges in development builds, and use actual primative types in release builds. > > Does it only create integer ranges? It is my understanding that > C++ templates cannot have floating point parameters. > You can use floating point types, but you cannot specialize on a floating point constant like you can with intregal types. This wasn't a problem for me as it specified the actual range in the constructor.