Boost logo

Boost :

From: Stephen Nutt (snutt_at_[hidden])
Date: 2002-08-30 20:19:54


I believe what I need is a change to boost\integer.hpp along the following
lines

# ifndef BOOST_NO_INT64_T
  template<> struct int_least_helper<?> { typedef int64_t least; };
  template<> struct int_least_helper<?> { typedef uint64_t least; };
# endif

then of course the 5 templates
  template< int Bits > // bits (including sign) required
  struct int_t
{
...
}

  template< int Bits > // bits required
  struct uint_t
 {
...
}

  template< long MaxValue > // maximum value to require support
  struct int_max_value_t
 {
...
}

  template< long MinValue > // minimum value to require support
  struct int_min_value_t
{
...
}

  template< unsigned long Value > // maximum value to require support
  struct uint_value_t
{
...
}

will need changing accordingly.

Thanks for the attention,

Stephen

----- Original Message -----
From: "Jeff Garland" <jeff_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Friday, August 30, 2002 8:40 PM
Subject: RE: [boost] Re: Why no long long support in integer::int_t?

> > Sorry, I wasn't very clear with my question. What I require is a way to
do
> > the following
> >
> > boost::int_t<60> val;
>
> Yep, that wasn't clear ;-(
>
> > This however will be in a template and so the literal 60 will be
replaced by
> > some template parameter not known until compile time. When I compile
this I
> > currently get compile errors as the int_t template does not support long
> > long. If I replace it with
> >
> > boost::int64_t<60> val;
> >
> > I get compile errors as int64_t is a typedef and not a template.
>
> Right, sorry your question confused me...I thought you were talking
> about the cstdint part of the library. Looks like an extension is
> required to do what you want. It will be a tricky extension b/c
> 'long long' is not the name for the 64 bit type on many compilers
> (MSVC and Borland use __int64).
>
> Jeff
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk