Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Namespaces | Macros | Typedefs | Enumerations | Functions
18.cstdint.cpp File Reference
#include <rw_driver.h>
#include <ansi/cstdint>
Include dependency graph for 18.cstdint.cpp:

Go to the source code of this file.

Namespaces

namespace  Fallback
 
namespace  std
 
namespace  std::Nested
 

Macros

#define DEFINE_TYPE(name)
 
#define TEST_REQUIRED_TYPE(name, bits, exact)
 
#define TEST_OPTIONAL_TYPE(name, bits, exact)
 
#define TEST_MACRO(T, macro, bits, exact, valstr)    test_bits (__LINE__, test_ ## T (macro), bits, exact, #T, #macro, valstr)
 
#define TEST_MACRO_NO_TYPE(macro, bits, exact, valstr)    test_bits (__LINE__, macro, bits, exact, "", #macro, valstr)
 

Typedefs

typedef int8_t std::Nested::test_int8_t
 
typedef uint8_t std::Nested::test_uint8_t
 
typedef int_least8_t std::Nested::test_int_least8_t
 
typedef uint_least8_t std::Nested::test_uint_least8_t
 
typedef int_fast8_t std::Nested::test_int_fast8_t
 
typedef uint_fast8_t std::Nested::test_uint_fast8_t
 
typedef int16_t std::Nested::test_int16_t
 
typedef uint16_t std::Nested::test_uint16_t
 
typedef int_least16_t std::Nested::test_int_least16_t
 
typedef uint_least16_t std::Nested::test_uint_least16_t
 
typedef int_fast16_t std::Nested::test_int_fast16_t
 
typedef uint_fast16_t std::Nested::test_uint_fast16_t
 
typedef int32_t std::Nested::test_int32_t
 
typedef uint32_t std::Nested::test_uint32_t
 
typedef int_least32_t std::Nested::test_int_least32_t
 
typedef uint_least32_t std::Nested::test_uint_least32_t
 
typedef int_fast32_t std::Nested::test_int_fast32_t
 
typedef uint_fast32_t std::Nested::test_uint_fast32_t
 
typedef int64_t std::Nested::test_int64_t
 
typedef uint64_t std::Nested::test_uint64_t
 
typedef int_least64_t std::Nested::test_int_least64_t
 
typedef uint_least64_t std::Nested::test_uint_least64_t
 
typedef int_fast64_t std::Nested::test_int_fast64_t
 
typedef uint_fast64_t std::Nested::test_uint_fast64_t
 
typedef intmax_t std::Nested::test_intmax_t
 
typedef uintmax_t std::Nested::test_uintmax_t
 
typedef intptr_t std::Nested::test_intptr_t
 
typedef uintptr_t std::Nested::test_uintptr_t
 
typedef std::Nested::test_int8_t test_int8_t
 
typedef std::Nested::test_uint8_t test_uint8_t
 
typedef std::Nested::test_int_least8_t test_int_least8_t
 
typedef std::Nested::test_uint_least8_t test_uint_least8_t
 
typedef std::Nested::test_int_fast8_t test_int_fast8_t
 
typedef std::Nested::test_uint_fast8_t test_uint_fast8_t
 
typedef std::Nested::test_int16_t test_int16_t
 
typedef std::Nested::test_uint16_t test_uint16_t
 
typedef std::Nested::test_int_least16_t test_int_least16_t
 
typedef std::Nested::test_uint_least16_t test_uint_least16_t
 
typedef std::Nested::test_int_fast16_t test_int_fast16_t
 
typedef std::Nested::test_uint_fast16_t test_uint_fast16_t
 
typedef std::Nested::test_int32_t test_int32_t
 
typedef std::Nested::test_uint32_t test_uint32_t
 
typedef std::Nested::test_int_least32_t test_int_least32_t
 
typedef std::Nested::test_uint_least32_t test_uint_least32_t
 
typedef std::Nested::test_int_fast32_t test_int_fast32_t
 
typedef std::Nested::test_uint_fast32_t test_uint_fast32_t
 
typedef std::Nested::test_int64_t test_int64_t
 
typedef std::Nested::test_uint64_t test_uint64_t
 
typedef std::Nested::test_int_least64_t test_int_least64_t
 
typedef std::Nested::test_uint_least64_t test_uint_least64_t
 
typedef std::Nested::test_int_fast64_t test_int_fast64_t
 
typedef std::Nested::test_uint_fast64_t test_uint_fast64_t
 
typedef std::Nested::test_intmax_t test_intmax_t
 
typedef std::Nested::test_uintmax_t test_uintmax_t
 
typedef std::Nested::test_intptr_t test_intptr_t
 
typedef std::Nested::test_uintptr_t test_uintptr_t
 

Enumerations

enum  macros {
  PTRDIFF_MIN , PTRDIFF_MAX , SIZE_MAX , WCHAR_MIN ,
  WCHAR_MAX , WINT_MIN , WINT_MAX , SIG_ATOMIC_MIN ,
  SIG_ATOMIC_MAX , INT8_MIN , INT8_MAX , INT16_MIN ,
  INT16_MAX , INT32_MIN , INT32_MAX , INT64_MIN ,
  INT64_MAX , INT_LEAST8_MIN , INT_LEAST8_MAX , INT_LEAST16_MIN ,
  INT_LEAST16_MAX , INT_LEAST32_MIN , INT_LEAST32_MAX , INT_LEAST64_MIN ,
  INT_LEAST64_MAX , INT_FAST8_MIN , INT_FAST8_MAX , INT_FAST16_MIN ,
  INT_FAST16_MAX , INT_FAST32_MIN , INT_FAST32_MAX , INT_FAST64_MIN ,
  INT_FAST64_MAX , INTPTR_MAX , UINT8_MIN , UINT8_MAX ,
  UINT16_MIN , UINT16_MAX , UINT32_MIN , UINT32_MAX ,
  UINT64_MIN , UINT64_MAX , UINT_LEAST8_MIN , UINT_LEAST8_MAX ,
  UINT_LEAST16_MIN , UINT_LEAST16_MAX , UINT_LEAST32_MIN , UINT_LEAST32_MAX ,
  UINT_LEAST64_MIN , UINT_LEAST64_MAX , UINT_FAST8_MIN , UINT_FAST8_MAX ,
  UINT_FAST16_MIN , UINT_FAST16_MAX , UINT_FAST32_MIN , UINT_FAST32_MAX ,
  UINT_FAST64_MIN , UINT_FAST64_MAX , UINTPTR_MAX
}
 

Functions

 Fallback::DEFINE_TYPE (int8_t)
 
 Fallback::DEFINE_TYPE (uint8_t)
 
 Fallback::DEFINE_TYPE (int_least8_t)
 
 Fallback::DEFINE_TYPE (uint_least8_t)
 
 Fallback::DEFINE_TYPE (int_fast8_t)
 
 Fallback::DEFINE_TYPE (uint_fast8_t)
 
 Fallback::DEFINE_TYPE (int16_t)
 
 Fallback::DEFINE_TYPE (uint16_t)
 
 Fallback::DEFINE_TYPE (int_least16_t)
 
 Fallback::DEFINE_TYPE (uint_least16_t)
 
 Fallback::DEFINE_TYPE (int_fast16_t)
 
 Fallback::DEFINE_TYPE (uint_fast16_t)
 
 Fallback::DEFINE_TYPE (int32_t)
 
 Fallback::DEFINE_TYPE (uint32_t)
 
 Fallback::DEFINE_TYPE (int_least32_t)
 
 Fallback::DEFINE_TYPE (uint_least32_t)
 
 Fallback::DEFINE_TYPE (int_fast32_t)
 
 Fallback::DEFINE_TYPE (uint_fast32_t)
 
 Fallback::DEFINE_TYPE (int64_t)
 
 Fallback::DEFINE_TYPE (uint64_t)
 
 Fallback::DEFINE_TYPE (int_least64_t)
 
 Fallback::DEFINE_TYPE (uint_least64_t)
 
 Fallback::DEFINE_TYPE (int_fast64_t)
 
 Fallback::DEFINE_TYPE (uint_fast64_t)
 
 Fallback::DEFINE_TYPE (intmax_t)
 
 Fallback::DEFINE_TYPE (uintmax_t)
 
 Fallback::DEFINE_TYPE (intptr_t)
 
 Fallback::DEFINE_TYPE (uintptr_t)
 
template<class intT >
void test_bits (int line, intT testval, int expect, bool exact, const char *type_name, const char *macro_name=0, const char *valstr=0)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ DEFINE_TYPE

#define DEFINE_TYPE (   name)
Value:
struct name { \
int i_; \
char dummy_ [256]; \
\
name (int i = 0): i_ (i) { } \
operator int () const volatile { return i_; } \
name operator- (int i) const volatile { return i_ - i; } \
name operator~ () const volatile { return ~0; } \
name operator& (int i) const volatile { return i_ & i; } \
bool operator< (int i) const volatile { return i_ < i; } \
}
#define i
Definition 17.names.cpp:126
#define i_
Definition 17.names.cpp:180
const minus< T > & operator-(const minus< T > &lhs, const minus< T > &rhs)
const char * name
Definition codecvt1.cpp:72
bool operator<(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
Definition json.h:14787

Definition at line 351 of file 18.cstdint.cpp.

◆ TEST_MACRO

#define TEST_MACRO (   T,
  macro,
  bits,
  exact,
  valstr 
)     test_bits (__LINE__, test_ ## T (macro), bits, exact, #T, #macro, valstr)

◆ TEST_MACRO_NO_TYPE

#define TEST_MACRO_NO_TYPE (   macro,
  bits,
  exact,
  valstr 
)     test_bits (__LINE__, macro, bits, exact, "", #macro, valstr)

◆ TEST_OPTIONAL_TYPE

#define TEST_OPTIONAL_TYPE (   name,
  bits,
  exact 
)
Value:
do { \
rw_info (0, 0, __LINE__, "std::%s (optional)", # name); \
const bool type_defined = \
sizeof (test_ ## name) != sizeof (Fallback::name); \
rw_warn (type_defined, 0, __LINE__, \
"optional type %s not defined in namespace " \
"std", #name); \
if (type_defined) \
test_bits (__LINE__, test_ ## name (0), \
bits, exact, #name); \
} while (0)

◆ TEST_REQUIRED_TYPE

#define TEST_REQUIRED_TYPE (   name,
  bits,
  exact 
)
Value:
do { \
rw_info (0, 0, __LINE__, "std::%s (required)", # name); \
const bool type_defined = \
sizeof (test_ ## name) != sizeof (Fallback::name); \
rw_assert (type_defined, 0, __LINE__, \
"required type %s not defined in namespace " \
"std", #name); \
if (type_defined) \
test_bits (__LINE__, test_ ## name (0), \
bits, exact, #name); \
} while (0)

Typedef Documentation

◆ test_int16_t

typedef std::Nested::test_int16_t test_int16_t

Definition at line 459 of file 18.cstdint.cpp.

◆ test_int32_t

typedef std::Nested::test_int32_t test_int32_t

Definition at line 466 of file 18.cstdint.cpp.

◆ test_int64_t

typedef std::Nested::test_int64_t test_int64_t

Definition at line 473 of file 18.cstdint.cpp.

◆ test_int8_t

typedef std::Nested::test_int8_t test_int8_t

Definition at line 452 of file 18.cstdint.cpp.

◆ test_int_fast16_t

typedef std::Nested::test_int_fast16_t test_int_fast16_t

Definition at line 463 of file 18.cstdint.cpp.

◆ test_int_fast32_t

typedef std::Nested::test_int_fast32_t test_int_fast32_t

Definition at line 470 of file 18.cstdint.cpp.

◆ test_int_fast64_t

typedef std::Nested::test_int_fast64_t test_int_fast64_t

Definition at line 477 of file 18.cstdint.cpp.

◆ test_int_fast8_t

typedef std::Nested::test_int_fast8_t test_int_fast8_t

Definition at line 456 of file 18.cstdint.cpp.

◆ test_int_least16_t

typedef std::Nested::test_int_least16_t test_int_least16_t

Definition at line 461 of file 18.cstdint.cpp.

◆ test_int_least32_t

typedef std::Nested::test_int_least32_t test_int_least32_t

Definition at line 468 of file 18.cstdint.cpp.

◆ test_int_least64_t

typedef std::Nested::test_int_least64_t test_int_least64_t

Definition at line 475 of file 18.cstdint.cpp.

◆ test_int_least8_t

typedef std::Nested::test_int_least8_t test_int_least8_t

Definition at line 454 of file 18.cstdint.cpp.

◆ test_intmax_t

typedef std::Nested::test_intmax_t test_intmax_t

Definition at line 480 of file 18.cstdint.cpp.

◆ test_intptr_t

typedef std::Nested::test_intptr_t test_intptr_t

Definition at line 482 of file 18.cstdint.cpp.

◆ test_uint16_t

typedef std::Nested::test_uint16_t test_uint16_t

Definition at line 460 of file 18.cstdint.cpp.

◆ test_uint32_t

typedef std::Nested::test_uint32_t test_uint32_t

Definition at line 467 of file 18.cstdint.cpp.

◆ test_uint64_t

typedef std::Nested::test_uint64_t test_uint64_t

Definition at line 474 of file 18.cstdint.cpp.

◆ test_uint8_t

typedef std::Nested::test_uint8_t test_uint8_t

Definition at line 453 of file 18.cstdint.cpp.

◆ test_uint_fast16_t

typedef std::Nested::test_uint_fast16_t test_uint_fast16_t

Definition at line 464 of file 18.cstdint.cpp.

◆ test_uint_fast32_t

typedef std::Nested::test_uint_fast32_t test_uint_fast32_t

Definition at line 471 of file 18.cstdint.cpp.

◆ test_uint_fast64_t

typedef std::Nested::test_uint_fast64_t test_uint_fast64_t

Definition at line 478 of file 18.cstdint.cpp.

◆ test_uint_fast8_t

typedef std::Nested::test_uint_fast8_t test_uint_fast8_t

Definition at line 457 of file 18.cstdint.cpp.

◆ test_uint_least16_t

typedef std::Nested::test_uint_least16_t test_uint_least16_t

Definition at line 462 of file 18.cstdint.cpp.

◆ test_uint_least32_t

typedef std::Nested::test_uint_least32_t test_uint_least32_t

Definition at line 469 of file 18.cstdint.cpp.

◆ test_uint_least64_t

typedef std::Nested::test_uint_least64_t test_uint_least64_t

Definition at line 476 of file 18.cstdint.cpp.

◆ test_uint_least8_t

typedef std::Nested::test_uint_least8_t test_uint_least8_t

Definition at line 455 of file 18.cstdint.cpp.

◆ test_uintmax_t

typedef std::Nested::test_uintmax_t test_uintmax_t

Definition at line 481 of file 18.cstdint.cpp.

◆ test_uintptr_t

typedef std::Nested::test_uintptr_t test_uintptr_t

Definition at line 483 of file 18.cstdint.cpp.

Enumeration Type Documentation

◆ macros

enum macros

18.cstdint.cpp - test exercising cstdint

$Id$

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 1994-2008 Rogue Wave Software, Inc.

Enumerator
PTRDIFF_MIN 
PTRDIFF_MAX 
SIZE_MAX 
WCHAR_MIN 
WCHAR_MAX 
WINT_MIN 
WINT_MAX 
SIG_ATOMIC_MIN 
SIG_ATOMIC_MAX 
INT8_MIN 
INT8_MAX 
INT16_MIN 
INT16_MAX 
INT32_MIN 
INT32_MAX 
INT64_MIN 
INT64_MAX 
INT_LEAST8_MIN 
INT_LEAST8_MAX 
INT_LEAST16_MIN 
INT_LEAST16_MAX 
INT_LEAST32_MIN 
INT_LEAST32_MAX 
INT_LEAST64_MIN 
INT_LEAST64_MAX 
INT_FAST8_MIN 
INT_FAST8_MAX 
INT_FAST16_MIN 
INT_FAST16_MAX 
INT_FAST32_MIN 
INT_FAST32_MAX 
INT_FAST64_MIN 
INT_FAST64_MAX 
INTPTR_MAX 
UINT8_MIN 
UINT8_MAX 
UINT16_MIN 
UINT16_MAX 
UINT32_MIN 
UINT32_MAX 
UINT64_MIN 
UINT64_MAX 
UINT_LEAST8_MIN 
UINT_LEAST8_MAX 
UINT_LEAST16_MIN 
UINT_LEAST16_MAX 
UINT_LEAST32_MIN 
UINT_LEAST32_MAX 
UINT_LEAST64_MIN 
UINT_LEAST64_MAX 
UINT_FAST8_MIN 
UINT_FAST8_MAX 
UINT_FAST16_MIN 
UINT_FAST16_MAX 
UINT_FAST32_MIN 
UINT_FAST32_MAX 
UINT_FAST64_MIN 
UINT_FAST64_MAX 
UINTPTR_MAX 

Definition at line 31 of file 18.cstdint.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 758 of file 18.cstdint.cpp.

◆ test_bits()

template<class intT >
void test_bits ( int  line,
intT  testval,
int  expect,
bool  exact,
const char *  type_name,
const char *  macro_name = 0,
const char *  valstr = 0 
)

Definition at line 488 of file 18.cstdint.cpp.