The Gaudi Framework  master (37c0b60a)
print_limits.cpp File Reference
#include <cxxabi.h>
#include <iostream>
#include <limits>
Include dependency graph for print_limits.cpp:

Go to the source code of this file.

Functions

template<typename T >
void print_limits_for ()
 
void print_limits ()
 

Function Documentation

◆ print_limits()

void print_limits ( )

Definition at line 26 of file print_limits.cpp.

26  {
27  using std::cout;
28  cout << "{\n";
29  print_limits_for<signed char>();
30  print_limits_for<short>();
31  print_limits_for<int>();
32  print_limits_for<long>();
33  print_limits_for<long long>();
34  print_limits_for<unsigned char>();
35  print_limits_for<unsigned short>();
36  print_limits_for<unsigned int>();
37  print_limits_for<unsigned long>();
38  print_limits_for<unsigned long long>();
39  cout << "}\n";
40 }

◆ print_limits_for()

template<typename T >
void print_limits_for ( )

Definition at line 16 of file print_limits.cpp.

16  {
17  using std::cout;
18  int status;
20  abi::__cxa_demangle( typeid( T ).name(), nullptr, nullptr, &status ), free );
21  // the unary '+' is explained in https://stackoverflow.com/a/28414758
22  cout << " '" << realname.get() << "': (" << +std::numeric_limits<T>::min() << ", "
23  << +std::numeric_limits<T>::max() << "),\n";
24 }
std::cout
std::numeric_limits::min
T min(T... args)
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
std::numeric_limits::max
T max(T... args)
std::unique_ptr
STL class.