The Gaudi Framework  master (181af51f)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages Concepts
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()

◆ 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;
19 auto realname = std::unique_ptr<char, decltype( free )*>(
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}