ACE 8.0.1
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | 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, typenameACE::If_Then_Else< USE_RIGHT, RIGHT, void >::result_type >::result_type promote_type
 

Static Public Member Functions

static bool greater_than (LEFT lhs, RIGHT rhs)
 

Static Public Attributes

static bool const USE_LEFT
 
static bool const USE_RIGHT
 
static bool const USABLE = (USE_LEFT || USE_RIGHT)
 

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

◆ promote_type

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

Member Function Documentation

◆ greater_than()

template<typename LEFT , typename RIGHT >
static bool ACE_Utils::Fast_Comparator< LEFT, RIGHT >::greater_than ( LEFT lhs,
RIGHT rhs )
inlinestatic

Member Data Documentation

◆ USABLE

template<typename LEFT , typename RIGHT >
bool const ACE_Utils::Fast_Comparator< LEFT, RIGHT >::USABLE = (USE_LEFT || USE_RIGHT)
static

◆ USE_LEFT

template<typename LEFT , typename RIGHT >
bool const ACE_Utils::Fast_Comparator< LEFT, RIGHT >::USE_LEFT
static
Initial value:
=
((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))))

◆ USE_RIGHT

template<typename LEFT , typename RIGHT >
bool const ACE_Utils::Fast_Comparator< LEFT, RIGHT >::USE_RIGHT
static
Initial value:
=
(sizeof (RIGHT) > sizeof (LEFT)
&& (Sign_Check<RIGHT>::is_signed == 1
|| Sign_Check<LEFT>::is_signed == 0))

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