Quick Links:

bal | bbl | bdl | bsl

Static Public Member Functions

bslalg::RangeCompare_Imp Struct Reference

#include <bslalg_rangecompare.h>

List of all members.

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.

See Component bslalg_rangecompare


Member Function Documentation

template<class VALUE_TYPE >
static 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   
) [static]
template<class INPUT_ITER , class VALUE_TYPE >
static bool bslalg::RangeCompare_Imp::equal ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2,
INPUT_ITER  end2,
const VALUE_TYPE &  ,
bsl::false_type   
) [static]
template<class INPUT_ITER , class VALUE_TYPE >
static bool bslalg::RangeCompare_Imp::equal ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2,
INPUT_ITER  end2,
const VALUE_TYPE &   
) [static]

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.

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

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.

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

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.

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

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.

template<class VALUE_TYPE >
static 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   
) [static]

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.

template<class INPUT_ITER , class VALUE_TYPE >
static 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.

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

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.

static int bslalg::RangeCompare_Imp::lexicographical ( const char *  start1,
const char *  end1,
const char *  start2 
) [static]

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.

static int bslalg::RangeCompare_Imp::lexicographical ( const unsigned char *  start1,
const unsigned char *  end1,
const unsigned char *  start2 
) [static]
static int bslalg::RangeCompare_Imp::lexicographical ( const wchar_t *  start1,
const wchar_t *  end1,
const wchar_t *  start2 
) [static]
template<class INPUT_ITER >
static int bslalg::RangeCompare_Imp::lexicographical ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2,
bslmf::MatchAnyType   
) [static]
template<class INPUT_ITER >
static int bslalg::RangeCompare_Imp::lexicographical ( INPUT_ITER  start1,
INPUT_ITER  end1,
INPUT_ITER  start2 
) [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 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.


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