ACE  6.3.3
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ACE_Utils::Fast_Comparator< LEFT, RIGHT > Struct Template Reference

Quick comparison of types that can be safely promoted and/or converted to each other. More...

#include <Truncate.h>

Public Types

typedef ACE::If_Then_Else< USE_LEFT, LEFT, typename ACE::If_Then_Else< USE_RIGHT, RIGHT, void >::result_type >::result_type promote_type
 

Public Member Functions

 ACE_STATIC_CONSTANT (bool, USE_LEFT=((sizeof(LEFT) > sizeof(RIGHT)&&(Sign_Check< LEFT >::is_signed==1||Sign_Check< RIGHT >::is_signed==0))||(sizeof(LEFT)==sizeof(RIGHT)&&((Sign_Check< LEFT >::is_signed==1 &&Sign_Check< RIGHT >::is_signed==1)||(Sign_Check< LEFT >::is_signed==0 &&Sign_Check< RIGHT >::is_signed==0)))))
 
 ACE_STATIC_CONSTANT (bool, USE_RIGHT=(sizeof(RIGHT) > sizeof(LEFT)&&(Sign_Check< RIGHT >::is_signed==1||Sign_Check< LEFT >::is_signed==0)))
 
 ACE_STATIC_CONSTANT (bool, USABLE=(USE_LEFT||USE_RIGHT))
 

Static Public Member Functions

static bool greater_than (LEFT lhs, RIGHT rhs)
 

Detailed Description

template<typename LEFT, typename RIGHT>
struct ACE_Utils::Fast_Comparator< LEFT, RIGHT >

Quick comparison of types that can be safely promoted and/or converted to each other.

The comparison operations provided by this structure perform no negative value checking, meaning it is not applicable to all types. Check the value of the USABLE enumerator to determine if it applies to the types in question.

This structure is not meant for general use.

Member Typedef Documentation

template<typename LEFT , typename RIGHT >
typedef ACE::If_Then_Else< USE_LEFT, LEFT, typename ACE::If_Then_Else< USE_RIGHT, RIGHT, void>::result_type>::result_type ACE_Utils::Fast_Comparator< LEFT, RIGHT >::promote_type

Member Function Documentation

template<typename LEFT , typename RIGHT >
ACE_Utils::Fast_Comparator< LEFT, RIGHT >::ACE_STATIC_CONSTANT ( bool  ,
USE_LEFT  = ((sizeof(LEFT) > sizeof(RIGHT)&&(Sign_Check< LEFT >::is_signed==1||Sign_Check< RIGHT >::is_signed==0))||(sizeof(LEFT)==sizeof(RIGHT)&&((Sign_Check< LEFT >::is_signed==1 &&Sign_Check< RIGHT >::is_signed==1)||(Sign_Check< LEFT >::is_signed==0 &&Sign_Check< RIGHT >::is_signed==0)))) 
)
template<typename LEFT , typename RIGHT >
ACE_Utils::Fast_Comparator< LEFT, RIGHT >::ACE_STATIC_CONSTANT ( bool  ,
USE_RIGHT  = (sizeof(RIGHT) > sizeof(LEFT)&&(Sign_Check< RIGHT >::is_signed==1||Sign_Check< LEFT >::is_signed==0)) 
)
template<typename LEFT , typename RIGHT >
ACE_Utils::Fast_Comparator< LEFT, RIGHT >::ACE_STATIC_CONSTANT ( bool  ,
USABLE  = (USE_LEFT||USE_RIGHT) 
)
template<typename LEFT , typename RIGHT >
static bool ACE_Utils::Fast_Comparator< LEFT, RIGHT >::greater_than ( LEFT  lhs,
RIGHT  rhs 
)
inlinestatic

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