Mercurial > octave
diff liboctave/util/oct-inttypes.h @ 21785:c9f8a7f7915e
use forward declarations instead of including oct-inttypes.h where possible
* oct-inttypes-fwd.h: New file.
* liboctave/util/module.mk: Update.
* oct-inttypes.h, pr-output.h, Array.cc, dNDArray.h, fNDArray.h,
idx-vector.h, int16NDArray.h, int32NDArray.h, int64NDArray.h,
int8NDArray.h, uint16NDArray.h, uint32NDArray.h, uint64NDArray.h,
uint8NDArray.h, lo-mappers.h, data-conv.h: Include oct-inttypes-fwd.h
instead of oct-inttypes.h where possible.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 27 May 2016 15:19:45 -0400 |
parents | 2aef506f3fec |
children | 278fc29b69ca |
line wrap: on
line diff
--- a/liboctave/util/oct-inttypes.h Fri May 27 15:16:47 2016 -0400 +++ b/liboctave/util/oct-inttypes.h Fri May 27 15:19:45 2016 -0400 @@ -35,6 +35,18 @@ #include "lo-math.h" #include "lo-mappers.h" +template <typename T> class octave_int; + +typedef octave_int<int8_t> octave_int8; +typedef octave_int<int16_t> octave_int16; +typedef octave_int<int32_t> octave_int32; +typedef octave_int<int64_t> octave_int64; + +typedef octave_int<uint8_t> octave_uint8; +typedef octave_int<uint16_t> octave_uint16; +typedef octave_int<uint32_t> octave_uint32; +typedef octave_int<uint64_t> octave_uint64; + #if defined (OCTAVE_INT_USE_LONG_DOUBLE) namespace octave @@ -1133,16 +1145,6 @@ return a & mask; } -typedef octave_int<int8_t> octave_int8; -typedef octave_int<int16_t> octave_int16; -typedef octave_int<int32_t> octave_int32; -typedef octave_int<int64_t> octave_int64; - -typedef octave_int<uint8_t> octave_uint8; -typedef octave_int<uint16_t> octave_uint16; -typedef octave_int<uint32_t> octave_uint32; -typedef octave_int<uint64_t> octave_uint64; - #if defined (OCTAVE_ENSURE_LONG_DOUBLE_OPERATIONS_ARE_NOT_TRUNCATED) #define DECLARE_EXTERNAL_LONG_DOUBLE_OP(T, OP) \