Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Functions
18.numeric.special.int.cpp File Reference
#include <limits>
#include <climits>
#include <cstdio>
#include <rw_driver.h>
Include dependency graph for 18.numeric.special.int.cpp:

Go to the source code of this file.

Data Structures

struct  Limits< T >
 
struct  Limits< int >
 
struct  Limits< bool >
 
struct  Limits< char >
 
struct  Limits< signed char >
 
struct  Limits< unsigned char >
 
struct  Limits< wchar_t >
 
struct  Limits< short >
 
struct  Limits< long >
 
struct  Limits< unsigned short >
 
struct  Limits< unsigned int >
 
struct  Limits< unsigned long >
 

Macros

#define ASSERT(expr, fmt)
 
#define ASSERT_0(expr, fmt)
 
#define TEST(T, fmt)   run_test ((T*)0, #T, fmt)
 

Functions

template<class T >
bool is_modulo (T _max)
 
_RWSTD_SPECIALIZED_FUNCTION bool is_modulo (bool)
 
template<class T >
void run_test (T *, const char *tname, const char *fmt)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ ASSERT

#define ASSERT (   expr,
  fmt 
)
Value:
/* verify that `expr' is a constant integral expression */ \
{ enum { is_const_integral_expression = limT::expr }; } \
rw_assert (limT::expr == int (Traits::expr), 0, __LINE__, \
"std::numeric_limits<%s>::" #expr \
" == %{@}, got %{@}", \
tname, fmt, Traits::expr, fmt, limT::expr)

◆ ASSERT_0

#define ASSERT_0 (   expr,
  fmt 
)
Value:
rw_assert (!limT::expr, 0, __LINE__, \
"std::numeric_limits<%s>::" #expr " == 0, got %{@}", \
tname, fmt, limT::expr)
_TEST_EXPORT int rw_assert(int, const char *, int, const char *,...)
Definition driver.cpp:1630

◆ TEST

#define TEST (   T,
  fmt 
)    run_test ((T*)0, #T, fmt)

Function Documentation

◆ is_modulo() [1/2]

_RWSTD_SPECIALIZED_FUNCTION bool is_modulo ( bool  )
inline

Definition at line 74 of file 18.numeric.special.int.cpp.

◆ is_modulo() [2/2]

template<class T >
bool is_modulo ( T  _max)
inline

Definition at line 64 of file 18.numeric.special.int.cpp.

◆ main()

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

Definition at line 641 of file 18.numeric.special.int.cpp.

◆ run_test()

template<class T >
void run_test ( T *  ,
const char *  tname,
const char *  fmt 
)

Definition at line 454 of file 18.numeric.special.int.cpp.