BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslalg::RangeCompare_Imp Struct Reference

#include <bslalg_rangecompare.h>

Static Public Member Functions

template<class VALUE_TYPE >
static bool equal (const VALUE_TYPE *start1, const VALUE_TYPE *end1, const VALUE_TYPE *start2, const VALUE_TYPE *end2, const VALUE_TYPE &, bsl::true_type)
 
template<class INPUT_ITER , class VALUE_TYPE >
static bool equal (INPUT_ITER start1, INPUT_ITER end1, INPUT_ITER start2, INPUT_ITER end2, const VALUE_TYPE &, bsl::false_type)
 
template<class INPUT_ITER , class VALUE_TYPE >
static bool equal (INPUT_ITER start1, INPUT_ITER end1, INPUT_ITER start2, INPUT_ITER end2, const VALUE_TYPE &)
 
template<class INPUT_ITER , class VALUE_TYPE >
static bool equal (INPUT_ITER start1, INPUT_ITER end1, INPUT_ITER start2, const VALUE_TYPE &, bsl::true_type)
 
template<class INPUT_ITER , class VALUE_TYPE >
static bool equal (INPUT_ITER start1, INPUT_ITER end1, INPUT_ITER start2, const VALUE_TYPE &, bsl::false_type)
 
template<class INPUT_ITER , class VALUE_TYPE >
static bool equal (INPUT_ITER start1, INPUT_ITER end1, INPUT_ITER start2, const VALUE_TYPE &)
 
template<class VALUE_TYPE >
static bool equalBitwiseEqualityComparable (const VALUE_TYPE *start1, const VALUE_TYPE *end1, const VALUE_TYPE *start2, bsl::true_type)
 
template<class INPUT_ITER >
static bool equalBitwiseEqualityComparable (INPUT_ITER start1, INPUT_ITER end1, INPUT_ITER start2, bsl::false_type)
 
template<class VALUE_TYPE >
static int lexicographical (const VALUE_TYPE *start1, const VALUE_TYPE *end1, const VALUE_TYPE *start2, const VALUE_TYPE *end2, const VALUE_TYPE &, bsl::true_type)
 
template<class INPUT_ITER , class VALUE_TYPE >
static int lexicographical (INPUT_ITER start1, INPUT_ITER end1, INPUT_ITER start2, INPUT_ITER end2, const VALUE_TYPE &, bsl::false_type)
 
template<class INPUT_ITER , class VALUE_TYPE >
static int lexicographical (INPUT_ITER start1, INPUT_ITER end1, INPUT_ITER start2, INPUT_ITER end2, const VALUE_TYPE &)
 
static int lexicographical (const char *start1, const char *end1, const char *start2)
 
static int lexicographical (const unsigned char *start1, const unsigned char *end1, const unsigned char *start2)
 
static int lexicographical (const wchar_t *start1, const wchar_t *end1, const wchar_t *start2)
 
template<class INPUT_ITER >
static int lexicographical (INPUT_ITER start1, INPUT_ITER end1, INPUT_ITER start2, bslmf::MatchAnyType)
 
template<class INPUT_ITER >
static int lexicographical (INPUT_ITER start1, INPUT_ITER end1, INPUT_ITER start2)
 

Detailed Description

This utility struct provides the implementations for bslalg::RangeCompare. Multiple implementations are provided for each method in bslalg::RangeCompare, and the most efficient version is found by disambiguating based on the iterator type, the value type, or the presence of nested traits.

Member Function Documentation

◆ equal() [1/6]

template<class VALUE_TYPE >
bool bslalg::RangeCompare_Imp::equal ( const VALUE_TYPE *  start1,
const VALUE_TYPE *  end1,
const VALUE_TYPE *  start2,
const VALUE_TYPE *  end2,
const VALUE_TYPE &  ,
bsl::true_type   
)
inlinestatic

Compare the range beginning at the specified start1 position and ending immediately before the specified end1 position with the range beginning at the specified start2 position and ending immediately before the specified end2 position, as if using operator== element-by-element. The unnamed VALUE_TYPE argument is for automatic type deduction, and is ignored. The fifth argument is for overloading resolution, and is also ignored.

◆ equal() [2/6]

template<class INPUT_ITER , class VALUE_TYPE >
bool bslalg::RangeCompare_Imp::equal ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2,
const VALUE_TYPE &  value 
)
inlinestatic

◆ equal() [3/6]

template<class INPUT_ITER , class VALUE_TYPE >
bool bslalg::RangeCompare_Imp::equal ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2,
const VALUE_TYPE &  ,
bsl::false_type   
)
static

◆ equal() [4/6]

template<class INPUT_ITER , class VALUE_TYPE >
bool bslalg::RangeCompare_Imp::equal ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2,
const VALUE_TYPE &  ,
bsl::true_type   
)
inlinestatic

Compare the range beginning at the specified start1 position and ending immediately before the specified end1 position with the range beginning at the specified start2 position of the same length (namely, end1 - start1), as if using operator== element-by-element. The unnamed VALUE_TYPE argument is for automatic type deduction, and is ignored. The fifth argument is for overloading resolution, and is also ignored.

◆ equal() [5/6]

template<class INPUT_ITER , class VALUE_TYPE >
bool bslalg::RangeCompare_Imp::equal ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2,
INPUT_ITER  end2,
const VALUE_TYPE &  value 
)
static

◆ equal() [6/6]

template<class INPUT_ITER , class VALUE_TYPE >
bool bslalg::RangeCompare_Imp::equal ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2,
INPUT_ITER  end2,
const VALUE_TYPE &  ,
bsl::false_type   
)
static

◆ equalBitwiseEqualityComparable() [1/2]

template<class VALUE_TYPE >
bool bslalg::RangeCompare_Imp::equalBitwiseEqualityComparable ( const VALUE_TYPE *  start1,
const VALUE_TYPE *  end1,
const VALUE_TYPE *  start2,
bsl::true_type   
)
inlinestatic

Compare the range beginning at the specified start1 position and ending immediately before the specified end1 position with the range beginning at the specified start2 position of the same length (namely, end1 - start1), using bit-wise comparison across the entire ranges. The last argument is for removing overload ambiguities, and is not used. Return true if the ranges are bit-wise equal, and false otherwise.

◆ equalBitwiseEqualityComparable() [2/2]

template<class INPUT_ITER >
bool bslalg::RangeCompare_Imp::equalBitwiseEqualityComparable ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2,
bsl::false_type   
)
inlinestatic

Compare the range beginning at the specified start1 position and ending immediately before the specified end1 position with the range beginning at the specified start2 position of the same length (namely, end1 - start1), using operator== element-by-element. The last argument is for removing overload ambiguities, and is not used. Return true if each element in the first range is equal to the corresponding element in the second range, and false otherwise.

◆ lexicographical() [1/8]

int bslalg::RangeCompare_Imp::lexicographical ( const char *  start1,
const char *  end1,
const char *  start2 
)
inlinestatic

Compare the range beginning at the specified start1 position and ending immediately before the specified end1 position with the range beginning at the specified start2 position of the same length (namely, end1 - start1), using a bit-wise comparison across the entire range, if const char is unsigned, and using operator< otherwise. Return a negative value if the first range compares lexicographically less than the second range, 0 if they are the same length and compare lexicographically equal, and a positive value if the first range compares lexicographically greater than the second range.

◆ lexicographical() [2/8]

int bslalg::RangeCompare_Imp::lexicographical ( const unsigned char *  start1,
const unsigned char *  end1,
const unsigned char *  start2 
)
inlinestatic

◆ lexicographical() [3/8]

template<class VALUE_TYPE >
int bslalg::RangeCompare_Imp::lexicographical ( const VALUE_TYPE *  start1,
const VALUE_TYPE *  end1,
const VALUE_TYPE *  start2,
const VALUE_TYPE *  end2,
const VALUE_TYPE &  ,
bsl::true_type   
)
inlinestatic

Compare the range beginning at the specified start1 position and ending immediately before the specified end1 position with the range beginning at the specified start2 position and ending immediately before the specified end2 position. The last two arguments are for removing overload ambiguities and are not used. Return a negative value if the first range compares lexicographically less than the second range, 0 if they are the same length and compare lexicographically equal, and a positive value if the first range compares lexicographically greater than the second range.

◆ lexicographical() [4/8]

int bslalg::RangeCompare_Imp::lexicographical ( const wchar_t *  start1,
const wchar_t *  end1,
const wchar_t *  start2 
)
inlinestatic

Compare each element in the range beginning at the specified start1 position and ending immediately before the specified end1 position with the corresponding element in the range of the same length beginning at the specified start2 position. Return a negative value if the first range compares lexicographically less than the second range, 0 if they are the same length and compare lexicographically equal, and a positive value if the first range compares lexicographically greater than the second range.

◆ lexicographical() [5/8]

template<class INPUT_ITER >
int bslalg::RangeCompare_Imp::lexicographical ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2 
)
inlinestatic

◆ lexicographical() [6/8]

template<class INPUT_ITER >
int bslalg::RangeCompare_Imp::lexicographical ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2,
bslmf::MatchAnyType   
)
static

◆ lexicographical() [7/8]

template<class INPUT_ITER , class VALUE_TYPE >
int bslalg::RangeCompare_Imp::lexicographical ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2,
INPUT_ITER  end2,
const VALUE_TYPE &  value 
)
inlinestatic

Compare the range beginning at the specified start1 position and ending immediately before the specified end1 position with the range beginning at the specified start2 position and ending immediately before the specified end2 position. The type of the last argument is considered in determining what optimizations, if any, can be applied to the comparison. The last argument is not used in any other way. Return a negative value if the first range compares lexicographically less than the second range, 0 if they are the same length and compare lexicographically equal, and a positive value if the first range compares lexicographically greater than the second range.

◆ lexicographical() [8/8]

template<class INPUT_ITER , class VALUE_TYPE >
int bslalg::RangeCompare_Imp::lexicographical ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2,
INPUT_ITER  end2,
const VALUE_TYPE &  ,
bsl::false_type   
)
static

Compare each element in the range beginning at the specified start1 position and ending immediately before the specified end1 position with the corresponding element in the range beginning at the specified start2 position and ending immediately before the specified end2 position using operator<. The last two arguments are for removing overload ambiguities and are not used. Return a negative value if the first range compares lexicographically less than the second range, 0 if they are the same length and compare lexicographically equal, and a positive value if the first range compares lexicographically greater than the second range.


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