Topic: Non-type template parameters


Author: "Anthony Williams" <anthony_w.geo@yahoo.com>
Date: 2000/09/26
Raw View
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

"James Kuyper" <kuyper@wizard.net> wrote in message
news:39CF3885.B4985355@wizard.net...
> Yaroslav Mironov wrote:
> >
> > Hi
> >
> > Anthony Williams wrote
> >
> > >I am trying to write a template class for range checking, which has an
> > >underlying type, and then min and max values as template parameters.
The
> > >following works, but only for built-in types:
> > >
> > >template<class T,T min,T max>
> > >class range
> > >{
> > >};
> >
> > Looks like this gives you nothing. For built-in types all the normal
>
> Yes, because he's left out the entire implementation of the class, which
> I suspect was non-empty. It wasn't the implementation he was asking
> about, but how to get the template defined in the first place.

Spot on.

> > integral conversions will be performed, and:
> >
> > range<char, 1, 2000> b;
> >
> > will most probably give no errors. Maybe a warning.
> >
> > Frankly, I don't quite understand what you're trying to do. If your
purpose
> > is to make a compile-time range checking for all types, then this is
hardly
> > possible because the very notion of range cannot be applied to most
> > user-defined types. For example, what is the range of std::locale?
>
> I doubt that this was his intent. I suspect he was trying to define a
> type with built-in range-checking, probably at run-time rather than at
> compile time, using a user-specified range, rather than the natural
> range of T. The type T would (if it weren't for his syntactic problems)
> be arbitrary, beyond necessarily supporting a comparison operator,
> presumably std::less<T>(), or perhaps operator<(). I'd recommend making
> the comparison operator another template parameter, defaulting to
> std::less<T>, but that might make the class heavier than he wanted.

Spot on, again.

> > >I tried changing it to
> > >
> > >template<class T,const T&min,const T&max>
> > >class range
> > >{
> > >};
> > >
> > >since references to objects are allowed.
> ...
> > > However, now simple cases don't
> > >work:
> > >
> > >range<int,1,3> a;
> > >
> > >produces the following errors:
> > >
> > >test_range.cc:15: `1' is not a valid template argument
> > >test_range.cc:15: `3' is not a valid template argument
> > >test_range.cc:15: ANSI C++ forbids declaration `a' with no type
> > >
> > >I can get round this by declaring a global int for the min and max
values:
> > >
> > >int minval=1;
> > >int maxval=3;
>
> I'd strongly recommend making these const.

Sadly, gcc complains about lack of external linkage, if I make these const.
It
does look like this is the only solution, though. Unless I provide a second
template parameter, which is a traits class:

template<class T,class traits>
range{};

class my_int_range_traits
{
public:
  static const int minval=1;
  static const int maxval=3;
};

And then range<> can use traits::minval and traits::maxval.

This seems a bit excessive, and doesn't really get round the problem of
having
static/global/namespace scope variables to store the min and max values.

On a slightly related note (I thought about using it in the implementation),
is
there a way of defining a static member in a template, in a general way:

template<typename T>
test_static
{
    static T val=T(3); // T must take a constructor of type int
    // gcc barfs at the above line, if T is not of integral type
};

without having to then explicitly declare the static for each T used,
explicitly

some_type test_static<some_type>::val=some_type(3);

> > >range<int,minval,maxval> b;
>
> b would then be a variable which would act in many ways like an 'int',
> presumably by way of having a conversions defined to and from 'int'.
> However, it would never allow the object it contains to hold a value
> outside the range from 1 to 3 - presumably the default ctor sets it to
> some value in that range. The conversion ctor and conversion assignment
> operator would either throw or reset the value to within it's valid
> range.

Precisely the intended usage.

Anthony

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use <http://www.pgp.com>
Comment: PGP Key at: http://i3.yimg.com/3/c7e5ee24/g/68fc2307.asc

iQA/AwUBOdBjbpvw+P4cG5rVEQJh+ACg5zHnrsgIFMwbS0khNhXSrGp39TYAn0ra
MRHB6IRTrUh0G7nc/rmPot9m
=dciC
-----END PGP SIGNATURE-----
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: James Kuyper <kuyper@wizard.net>
Date: 27 Sep 00 06:34:06 GMT
Raw View
Anthony Williams wrote:
>
> "James Kuyper" <kuyper@wizard.net> wrote in message
> news:39CF3885.B4985355@wizard.net...
> > Yaroslav Mironov wrote:
...
> > > >int minval=1;
> > > >int maxval=3;
> >
> > I'd strongly recommend making these const.
>
> Sadly, gcc complains about lack of external linkage, if I make these
const.

Sorry, I forgot about that; you must explicitly declare them 'extern';
without that specifier, const variables with namespace scope default to
internal linkage (3.5p3).

      [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




Author: "Yaroslav Mironov" <tada@mail.wplus.net>
Date: 2000/09/24
Raw View
Hi

Anthony Williams wrote

>I am trying to write a template class for range checking, which has an
>underlying type, and then min and max values as template parameters. The
>following works, but only for built-in types:
>
>template<class T,T min,T max>
>class range
>{
>};


Looks like this gives you nothing. For built-in types all the normal
integral conversions will be performed, and:

range<char, 1, 2000> b;

will most probably give no errors. Maybe a warning.

Frankly, I don't quite understand what you're trying to do. If your purpose
is to make a compile-time range checking for all types, then this is hardly
possible because the very notion of range cannot be applied to most
user-defined types. For example, what is the range of std::locale?

You cannot even use for this purpose specializations of std::numeric_limits,
because min and max values are obtained there through functions and not
available as static consts (in fact, they could not be static consts).

Maybe, if you're sure that the range of all the types in question is from
zero to 2^(sizeof(T)*BITS_PER_CHAR)-1 (as it is for built-in unsigned types)
then you can use this formula in range checking.

>I tried changing it to
>
>template<class T,const T&min,const T&max>
>class range
>{
>};
>
>since references to objects are allowed.

References to objects with external linkage. Temporaries, unnamed lvalues
and lvalues with no external linkage are out of the question. (see 14.3.2/4)

> However, now simple cases don't
>work:
>
>range<int,1,3> a;
>
>produces the following errors:
>
>test_range.cc:15: `1' is not a valid template argument
>test_range.cc:15: `3' is not a valid template argument
>test_range.cc:15: ANSI C++ forbids declaration `a' with no type
>
>I can get round this by declaring a global int for the min and max values:
>
>int minval=1;
>int maxval=3;
>
>range<int,minval,maxval> b;
>
>But this is messy.
>
>Any suggestions?


I still don't understand what you're trying to do with these templates.

By the way, it would be a good idea to implement a template like this one:

template <long min, unsigned long max> class SuitableType;

That will choose the most suitable type (from all built-in integral types)
for your variable.

For example,

SuitableType<-10, 100>::Result b; // b will (most probably) be of the signed
char type

I have little time right now, but this one looks like not very hard to do.


Surely, there is always a shortcut:

template <long min, unsigned long max> class SuitableType
{ enum Result {minimum = min, maximum = max}; };

Which will most probably have the right thing for the underlying type.
Unless the user have other preferences than the compiler.

Yaroslav
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: hnsngr@sirius.com (Ron Hunsinger)
Date: 2000/09/24
Raw View
In article <8qfdb1$fe4nl$1@ID-49767.news.cis.dfn.de>, "Anthony Williams"
<anthony_w.geo@yahoo.com> wrote:

> I am trying to write a template class for range checking, which has an
> underlying type, and then min and max values as template parameters. The
> following works, but only for built-in types:
>
> template<class T,T min,T max>
> class range
> {
> };

This ought to work.

Are you sure you don't have a #define for min and/or max floating around?
Try changing the template parameter names to, say, minvalue and maxvalue,
and see if that makes a difference.

-Ron Hunsinger
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: ivec@surgnav.com (Ivan Vecerina)
Date: 2000/09/24
Raw View
Anthony Williams said:
>I am trying to write a template class for range checking, which has an
>underlying type, and then min and max values as template parameters. The
>following works, but only for built-in types:
>
>template<class T,T min,T max>
>class range
>{
>};

Not only will it not work with custom types, but it will only
work if T is an integral type - e.g. double will not work.

>I tried changing it to
>
>template<class T,const T&min,const T&max>
>class range
>{
>};
>
>since references to objects are allowed. However, now simple cases don't
>work:

Indeed, only references to global objects with external linkage are
allowed - as you mentioned later - and there is no way around that.

>Any suggestions?

Maybe you could specialize your template class for T=int.

But in any case, there is not much benefit here in using a template
for non-integral type ranges: you may as well store the two values
within an instance of the template class: it will be more effective
than accessing global variables that you need to define anyway.
(plus the your template will not enforce that the specified globals
 are const and will not change during the program's execution ...
 this could lead to some funny effects ;)

I am afraid that what you are asking goes beyond what C++ can
offer today ...

--
 hth -ivec
---------------------------------------------------------
 Ivan Vecerina, Dr. med.
 Senior Software Developer - Surgical Navigation Network
  <http://www.surgnav.com> - <http://www.cedara.com>
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: James Kuyper <kuyper@wizard.net>
Date: 25 Sep 00 01:05:01 GMT
Raw View
Ron Hunsinger wrote:
>
> In article <8qfdb1$fe4nl$1@ID-49767.news.cis.dfn.de>, "Anthony Williams"
> <anthony_w.geo@yahoo.com> wrote:
>
> > I am trying to write a template class for range checking, which has an
> > underlying type, and then min and max values as template parameters.
The
> > following works, but only for built-in types:
> >
> > template<class T,T min,T max>
> > class range
> > {
> > };
>
> This ought to work.

14.1p4:
"A non-type _template-parameter_ shall have one of the following
(optionally _cv-qualified_ types:

-- integral or enumeration type
-- pointer or object or pointer to function
-- reference to object or reference to function
-- pointer to member"

The work-around he's already found, and described as clumsy, is the only
way I can think of to get around this problem.

      [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




Author: mckelvey@fafnir.com (James W. McKelvey)
Date: 25 Sep 00 03:29:07 GMT
Raw View
In <969778864.841055@unet.urbanet.ch> Ivan Vecerina wrote:
> Anthony Williams said:
> >I am trying to write a template class for range checking, which has an
> >underlying type, and then min and max values as template parameters. The
> >following works, but only for built-in types:
> >
> >template<class T,T min,T max>
> >class range
> >{
> >};
>
> Not only will it not work with custom types, but it will only
> work if T is an integral type - e.g. double will not work.
>
> >I tried changing it to
> >
> >template<class T,const T&min,const T&max>
> >class range
> >{
> >};
> >
> >since references to objects are allowed. However, now simple cases don't
> >work:
>
> Indeed, only references to global objects with external linkage are
> allowed - as you mentioned later - and there is no way around that.
>
> >Any suggestions?
>
> Maybe you could specialize your template class for T=int.
>
> But in any case, there is not much benefit here in using a template
> for non-integral type ranges: you may as well store the two values
> within an instance of the template class: it will be more effective
> than accessing global variables that you need to define anyway.
> (plus the your template will not enforce that the specified globals
>  are const and will not change during the program's execution ...
>  this could lead to some funny effects ;)
>
> I am afraid that what you are asking goes beyond what C++ can
> offer today ...
>
>

But if he makes the bounds static it all works; he just needs to define
operator< and operator= on T, and make a runtime call to set the bounds.
Something like this:


#ifndef __Bounded_Number_Variable_hh__
#define __Bounded_Number_Variable_hh__ 1

#include <stdexcept>


// Simple bounded integer type, bounds set at run time for entire class

template <class T>
class Bounded_Number_Variable
{
    public:

        // Constructor
        inline Bounded_Number_Variable(const T& initial);


        // Copy constructor
        inline Bounded_Number_Variable(const Bounded_Number_Variable&
other);


        // Default constructor
        inline Bounded_Number_Variable(void);


        // Get the value
        inline T value(void) const;


        // Assign a value
        inline Bounded_Number_Variable operator=(const T& other);


        inline Bounded_Number_Variable operator=(
            const Bounded_Number_Variable& other);


        // Get the minimum
        inline static const T& first(void);


        // Get the maximum
        inline static const T& last(void);


        // Set the minimum and maximum
        static void set_bounds(const T& min,
                               const T& max);
    private:

        // Check if bounds have been set
        static void check_bounds_set(void);


        // Check attempted change of value
        void set(const T& other);


        static T    _min_value;
        static T    _max_value;
        static bool _bounds_set;
        T           _value;
};


template <class T>
Bounded_Number_Variable<T>::

Bounded_Number_Variable(const T& initial)
    :
    _value()
{
    check_bounds_set();

    set(initial);
}


template <class T>
Bounded_Number_Variable<T>::

Bounded_Number_Variable(const Bounded_Number_Variable<T>& other)
    :
    _value()
{
    check_bounds_set();

    set(other._value);
}


template <class T>
Bounded_Number_Variable<T>::

Bounded_Number_Variable(void)
    :
    _value()
{
    check_bounds_set();

    set(_value);
};


template <class T>
T Bounded_Number_Variable<T>::

value(void) const
{
    check_bounds_set();

    return _value;
}


template <class T>
Bounded_Number_Variable<T> Bounded_Number_Variable<T>::

operator=(const T& other)
{
    check_bounds_set();

    set(other);

    return *this;
}


template <class T>
Bounded_Number_Variable<T> Bounded_Number_Variable<T>::

operator=(const Bounded_Number_Variable<T>& other)
{
    check_bounds_set();

    if (this != &other)
    {
        set(other._value);
    }

    return *this;
}


template <class T>
const T& Bounded_Number_Variable<T>::

first(void)
{
    check_bounds_set();

    return _min_value;
}


template <class T>
const T& Bounded_Number_Variable<T>::

last(void)
{
    check_bounds_set();

    return _max_value;
}


template<class T>
void Bounded_Number_Variable<T>::

set_bounds(const T& min,
           const T& max)
{
    if (_bounds_set)
    {
        throw new logic_error("Attempt to change bounds");
    }

    _min_value  = min;
    _max_value  = max;
    _bounds_set = true;
}


template <class T>
void Bounded_Number_Variable<T>::

check_bounds_set(void)
{
    if (! _bounds_set)
    {
        throw new logic_error("Bounds not set");
    }
}


template <class T>
void Bounded_Number_Variable<T>::

set(const T& other)
{
    if (other < _min_value)
    {
        throw new range_error("Attempt to set value below minimum");
    }

    if (_max_value < other)
    {
        throw new range_error("Attempt to set value above maximum");
    }

    _value = other;
}


template <class T>
T Bounded_Number_Variable<T>::

_min_value = 0;


template <class T>
T Bounded_Number_Variable<T>::

_max_value = 0;


template <class T>
bool Bounded_Number_Variable<T>::

_bounds_set = false;

#endif

--
People who cannot relive the past
are condemned to remember it.

Jim McKelvey  mckelvey@maskull.com

      [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




Author: James Kuyper <kuyper@wizard.net>
Date: 2000/09/25
Raw View
Yaroslav Mironov wrote:
>
> Hi
>
> Anthony Williams wrote
>
> >I am trying to write a template class for range checking, which has an
> >underlying type, and then min and max values as template parameters. The
> >following works, but only for built-in types:
> >
> >template<class T,T min,T max>
> >class range
> >{
> >};
>
> Looks like this gives you nothing. For built-in types all the normal

Yes, because he's left out the entire implementation of the class, which
I suspect was non-empty. It wasn't the implementation he was asking
about, but how to get the template defined in the first place.

> integral conversions will be performed, and:
>
> range<char, 1, 2000> b;
>
> will most probably give no errors. Maybe a warning.
>
> Frankly, I don't quite understand what you're trying to do. If your purpose
> is to make a compile-time range checking for all types, then this is hardly
> possible because the very notion of range cannot be applied to most
> user-defined types. For example, what is the range of std::locale?

I doubt that this was his intent. I suspect he was trying to define a
type with built-in range-checking, probably at run-time rather than at
compile time, using a user-specified range, rather than the natural
range of T. The type T would (if it weren't for his syntactic problems)
be arbitrary, beyond necessarily supporting a comparison operator,
presumably std::less<T>(), or perhaps operator<(). I'd recommend making
the comparison operator another template parameter, defaulting to
std::less<T>, but that might make the class heavier than he wanted.

> >I tried changing it to
> >
> >template<class T,const T&min,const T&max>
> >class range
> >{
> >};
> >
> >since references to objects are allowed.
...
> > However, now simple cases don't
> >work:
> >
> >range<int,1,3> a;
> >
> >produces the following errors:
> >
> >test_range.cc:15: `1' is not a valid template argument
> >test_range.cc:15: `3' is not a valid template argument
> >test_range.cc:15: ANSI C++ forbids declaration `a' with no type
> >
> >I can get round this by declaring a global int for the min and max values:
> >
> >int minval=1;
> >int maxval=3;

I'd strongly recommend making these const.

> >range<int,minval,maxval> b;

b would then be a variable which would act in many ways like an 'int',
presumably by way of having a conversions defined to and from 'int'.
However, it would never allow the object it contains to hold a value
outside the range from 1 to 3 - presumably the default ctor sets it to
some value in that range. The conversion ctor and conversion assignment
operator would either throw or reset the value to within it's valid
range.

      [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]





Author: "Kurt Krueckeberg" <kurtk@home.com>
Date: 2000/09/25
Raw View
How about a RangeChecker template with a constructor that receives the min
and max values of the range.
template<class T> class RangeChecker {
     T min_;
     T max_;
public:

     RangeChecker(T min, T max) : min_(min), max_(max) {}
     bool InRange(const T& x)
     {
          return (min_ <= x && x <= max_) ? true : false;
     }

     bool operator()(const T& x)
     {
      return InRange(x);
     }
};


int main(int argc, TCHAR* argv[], TCHAR* envp[])
{

 RangeChecker<int> r(1, 3);
 bool b1 = r.InRange(8);
    bool b2 = r.InRange(2);

 for (int i = 0; i < 10; i++) {

  cout << i << (r(i) ? " is " : " is not ") << " in range\n";

 }
 return 1;
}

"Anthony Williams" <anthony_w.geo@yahoo.com> wrote in message
news:8qfdb1$fe4nl$1@ID-49767.news.cis.dfn.de...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I am trying to write a template class for range checking, which has an
> underlying type, and then min and max values as template parameters. The
> following works, but only for built-in types:
>
> template<class T,T min,T max>
> class range
> {
> };
>
> I tried changing it to
>
> template<class T,const T&min,const T&max>
> class range
> {
> };
>
> since references to objects are allowed. However, now simple cases don't
> work:
>
> range<int,1,3> a;
>
> produces the following errors:
>
> test_range.cc:15: `1' is not a valid template argument
> test_range.cc:15: `3' is not a valid template argument
> test_range.cc:15: ANSI C++ forbids declaration `a' with no type
>
> I can get round this by declaring a global int for the min and max values:
>
> int minval=1;
> int maxval=3;
>
> range<int,minval,maxval> b;
>
> But this is messy.
>
> Any suggestions?
>
> Anthony
> - --
> alink@anthonyw.cjb.net -- Questions relating to ALINK
> anthony@anthonyw.cjb.net  -- Non-ALINK questions
> http://anthonyw.cjb.net/ -- ALINK home page
> PGP Fingerprint:
> 0E2D D32A 8732 DC31 804C  D435 9BF0 F8FE 1C1B 9AD5
> PGP Key at: http://i3.yimg.com/3/c7e5ee24/g/68fc2307.asc
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 6.5.1 for non-commercial use <http://www.pgp.com>
> Comment: PGP Key at: http://i3.yimg.com/3/c7e5ee24/g/68fc2307.asc
>
> iQA/AwUBOcs4J5vw+P4cG5rVEQKYfACfQvWLq/fVmPxY8sakbZtyU5eh4FkAn2YB
> 50p+by2wpnSMpCMR5b7/NrjU
> =wyRG
> -----END PGP SIGNATURE-----
>
>
>
>
>       [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
>       [ about comp.lang.c++.moderated. First time posters: do this! ]
>
> [ comp.std.c++ is moderated.  To submit articles, try just posting with ]
> [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
> [              --- Please see the FAQ before posting. ---               ]
> [ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]






Author: "Anthony Williams" <anthony_w.geo@yahoo.com>
Date: 2000/09/23
Raw View
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am trying to write a template class for range checking, which has an
underlying type, and then min and max values as template parameters. The
following works, but only for built-in types:

template<class T,T min,T max>
class range
{
};

I tried changing it to

template<class T,const T&min,const T&max>
class range
{
};

since references to objects are allowed. However, now simple cases don't
work:

range<int,1,3> a;

produces the following errors:

test_range.cc:15: `1' is not a valid template argument
test_range.cc:15: `3' is not a valid template argument
test_range.cc:15: ANSI C++ forbids declaration `a' with no type

I can get round this by declaring a global int for the min and max values:

int minval=1;
int maxval=3;

range<int,minval,maxval> b;

But this is messy.

Any suggestions?

Anthony
- --
alink@anthonyw.cjb.net -- Questions relating to ALINK
anthony@anthonyw.cjb.net  -- Non-ALINK questions
http://anthonyw.cjb.net/ -- ALINK home page
PGP Fingerprint:
0E2D D32A 8732 DC31 804C  D435 9BF0 F8FE 1C1B 9AD5
PGP Key at: http://i3.yimg.com/3/c7e5ee24/g/68fc2307.asc

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use <http://www.pgp.com>
Comment: PGP Key at: http://i3.yimg.com/3/c7e5ee24/g/68fc2307.asc

iQA/AwUBOcs4J5vw+P4cG5rVEQKYfACfQvWLq/fVmPxY8sakbZtyU5eh4FkAn2YB
50p+by2wpnSMpCMR5b7/NrjU
=wyRG
-----END PGP SIGNATURE-----




      [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]