Public Member Functions | List of all members
internal::printf_precision_handler Class Reference

#include <printf.h>

Inheritance diagram for internal::printf_precision_handler:
internal::function< int >

Public Member Functions

template<typename T >
std::enable_if< std::is_integral< T >::value, int >::type operator() (T value)
 
template<typename T >
std::enable_if<!std::is_integral< T >::value, int >::type operator() (T)
 

Detailed Description

Definition at line 165 of file printf.h.

Member Function Documentation

template<typename T >
std::enable_if<std::is_integral<T>::value, int>::type internal::printf_precision_handler::operator() ( value)
inline

Definition at line 169 of file printf.h.

169  {
170  if (!int_checker<std::numeric_limits<T>::is_signed>::fits_in_int(value))
171  FMT_THROW(format_error("number is too big"));
172  return static_cast<int>(value);
173  }
#define FMT_THROW(x)
Definition: format.h:115
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225
template<typename T >
std::enable_if<!std::is_integral<T>::value, int>::type internal::printf_precision_handler::operator() ( )
inline

Definition at line 176 of file printf.h.

176  {
177  FMT_THROW(format_error("precision is not integer"));
178  return 0;
179  }
#define FMT_THROW(x)
Definition: format.h:115

The documentation for this class was generated from the following file: