File: cstdint_include_test.cpp

package info (click to toggle)
boost1.42 1.42.0-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 277,864 kB
  • ctags: 401,076
  • sloc: cpp: 1,235,659; xml: 74,142; ansic: 41,313; python: 26,756; sh: 11,840; cs: 2,118; makefile: 655; perl: 494; yacc: 456; asm: 353; csh: 6
file content (69 lines) | stat: -rw-r--r-- 1,879 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//  Copyright John Maddock 2009.  
//  Distributed under the Boost
//  Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#define __STDC_CONSTANT_MACROS
#include <boost/cstdint.hpp> // must be the only #include!

int main()
{
   boost::int8_t i8 = INT8_C(0);
   (void)i8;
   boost::uint8_t ui8 = UINT8_C(0);
   (void)ui8;
   boost::int16_t i16 = INT16_C(0);
   (void)i16;
   boost::uint16_t ui16 = UINT16_C(0);
   (void)ui16;
   boost::int32_t i32 = INT32_C(0);
   (void)i32;
   boost::uint32_t ui32 = UINT32_C(0);
   (void)ui32;
#ifndef BOOST_NO_INT64_T
   boost::int64_t i64 = 0;
   (void)i64;
   boost::uint64_t ui64 = 0;
   (void)ui64;
#endif
   boost::int_least8_t i8least = INT8_C(0);
   (void)i8least;
   boost::uint_least8_t ui8least = UINT8_C(0);
   (void)ui8least;
   boost::int_least16_t i16least = INT16_C(0);
   (void)i16least;
   boost::uint_least16_t ui16least = UINT16_C(0);
   (void)ui16least;
   boost::int_least32_t i32least = INT32_C(0);
   (void)i32least;
   boost::uint_least32_t ui32least = UINT32_C(0);
   (void)ui32least;
#ifndef BOOST_NO_INT64_T
   boost::int_least64_t i64least = 0;
   (void)i64least;
   boost::uint_least64_t ui64least = 0;
   (void)ui64least;
#endif
   boost::int_fast8_t i8fast = INT8_C(0);
   (void)i8fast;
   boost::uint_fast8_t ui8fast = UINT8_C(0);
   (void)ui8fast;
   boost::int_fast16_t i16fast = INT16_C(0);
   (void)i16fast;
   boost::uint_fast16_t ui16fast = UINT16_C(0);
   (void)ui16fast;
   boost::int_fast32_t i32fast = INT32_C(0);
   (void)i32fast;
   boost::uint_fast32_t ui32fast = UINT32_C(0);
   (void)ui32fast;
#ifndef BOOST_NO_INT64_T
   boost::int_fast64_t i64fast = 0;
   (void)i64fast;
   boost::uint_fast64_t ui64fast = 0;
   (void)ui64fast;
#endif
   boost::intmax_t im = 0;
   (void)im;
   boost::uintmax_t uim = 0;
   (void)uim;
}