Previous section   Next section

Imperfect C++ Practical Solutions for Real-Life Programming
By Matthew Wilson
Table of Contents
Chapter 29.  Arithmetic Types


29.9. sinteger64

The issues we've examine for uinteger64 / UInteger64 largely apply to the signed version, except that we no longer need to provide a dubious int overload in order to cater for literals. But this is moot since, as with UInteger64, we can simply provide a single constructor representing the largest possible built-in signed integer:



class SInteger64


  : protected sinteger64


{


  . . .


#ifdef ACMELIB_SINT64_T_SUPPORT


  SInteger64(sint64_t i);


#else /* ? ACMELIB_SINT64_T_SUPPORT */


  SInteger64(sint32_t i);


#endif ACMELIB_SINT64_T_SUPPORT


  . . .



Everything else just flows smoothly from this.


      Previous section   Next section