Public Member Functions | Private Attributes | List of all members
internal::width_checker< ErrorHandler > Class Template Reference

#include <format.h>

Inheritance diagram for internal::width_checker< ErrorHandler >:
internal::function< unsigned long long >

Public Member Functions

FMT_CONSTEXPR width_checker (ErrorHandler &eh)
 
template<typename T >
FMT_CONSTEXPR std::enable_if< is_integer< T >::value, unsigned long long >::type operator() (T value)
 
template<typename T >
FMT_CONSTEXPR std::enable_if< !is_integer< T >::value, unsigned long long >::type operator() (T)
 

Private Attributes

ErrorHandlerhandler_
 

Detailed Description

template<typename ErrorHandler>
class internal::width_checker< ErrorHandler >

Definition at line 1505 of file format.h.

Constructor & Destructor Documentation

template<typename ErrorHandler >
FMT_CONSTEXPR internal::width_checker< ErrorHandler >::width_checker ( ErrorHandler eh)
inlineexplicit

Definition at line 1507 of file format.h.

1507 : handler_(eh) {}
ErrorHandler & handler_
Definition: format.h:1526

Member Function Documentation

template<typename ErrorHandler >
template<typename T >
FMT_CONSTEXPR std::enable_if< is_integer<T>::value, unsigned long long>::type internal::width_checker< ErrorHandler >::operator() ( value)
inline

Definition at line 1512 of file format.h.

1512  {
1513  if (is_negative(value))
1514  handler_.on_error("negative width");
1515  return static_cast<unsigned long long>(value);
1516  }
ErrorHandler & handler_
Definition: format.h:1526
FMT_CONSTEXPR std::enable_if< std::numeric_limits< T >::is_signed, bool >::type is_negative(T value)
Definition: format.h:727
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225
template<typename ErrorHandler >
template<typename T >
FMT_CONSTEXPR std::enable_if< !is_integer<T>::value, unsigned long long>::type internal::width_checker< ErrorHandler >::operator() ( )
inline

Definition at line 1520 of file format.h.

1520  {
1521  handler_.on_error("width is not integer");
1522  return 0;
1523  }
ErrorHandler & handler_
Definition: format.h:1526

Member Data Documentation

template<typename ErrorHandler >
ErrorHandler& internal::width_checker< ErrorHandler >::handler_
private

Definition at line 1526 of file format.h.


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