ACE 8.0.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
ACE_Utils::Truncator< FROM, TO > Struct Template Reference

Truncate value of type FROM to value of type TO. More...

#include <Truncate.h>

Public Types

typedef ACE::If_Then_Else< MAX_FROM_GT_MAX_TO, FROM, TO >::result_type comp_to_type
 
typedef ACE::If_Then_Else< MAX_FROM_GT_MAX_TO, Fast_Comparator< FROM, comp_to_type >, typenameComparator< FROM, comp_to_type >::comp_type >::result_type comparator
 

Public Member Functions

TO operator() (FROM val)
 

Static Public Attributes

static bool const MAX_FROM_GT_MAX_TO
 

Detailed Description

template<typename FROM, typename TO>
struct ACE_Utils::Truncator< FROM, TO >

Truncate value of type FROM to value of type TO.

Truncate a value of type FROM to value of type TO, if the value is larger than the maximum of value of type TO.

Member Typedef Documentation

◆ comp_to_type

◆ comparator

Member Function Documentation

◆ operator()()

template<typename FROM , typename TO >
TO ACE_Utils::Truncator< FROM, TO >::operator() ( FROM val)
inline

Truncate a value of type FROM to value of type TO, if the value is larger than the maximum of value of type TO.

Member Data Documentation

◆ MAX_FROM_GT_MAX_TO

template<typename FROM , typename TO >
bool const ACE_Utils::Truncator< FROM, TO >::MAX_FROM_GT_MAX_TO
static
Initial value:
= (sizeof(FROM) > sizeof (TO)
|| (sizeof(FROM) == sizeof (TO)
&& Sign_Check<FROM>::is_signed == 0))
This class inherits the interface of the abstract ACE_Dumpable class and is instantiated with the imp...
Definition Dump_T.h:39

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