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

#include <format.h>

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

Public Member Functions

FMT_CONSTEXPR precision_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::precision_checker< ErrorHandler >

Definition at line 1530 of file format.h.

Constructor & Destructor Documentation

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

Definition at line 1532 of file format.h.

1532 : handler_(eh) {}
ErrorHandler & handler_
Definition: format.h:1550

Member Function Documentation

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

Definition at line 1536 of file format.h.

1536  {
1537  if (is_negative(value))
1538  handler_.on_error("negative precision");
1539  return static_cast<unsigned long long>(value);
1540  }
ErrorHandler & handler_
Definition: format.h:1550
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::precision_checker< ErrorHandler >::operator() ( )
inline

Definition at line 1544 of file format.h.

1544  {
1545  handler_.on_error("precision is not integer");
1546  return 0;
1547  }
ErrorHandler & handler_
Definition: format.h:1550

Member Data Documentation

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

Definition at line 1550 of file format.h.


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