Xalan-C++ API Reference  1.12.0
Public Member Functions | List of all members
xalanc::less_null_terminated_arrays< T > Struct Template Reference

This functor is designed to compare 0-terminated arrays. More...

#include <xalanc/Include/STLHelper.hpp>

Public Member Functions

bool operator() (const T *theLHS, const T *theRHS) const
 Compare the values of two objects. More...
 

Detailed Description

template<class T>
struct xalanc::less_null_terminated_arrays< T >

This functor is designed to compare 0-terminated arrays.

It substitutes for the default less<type*> so that pointers to arrays can be compared, rather than copies of arrays. For example, you might want to use C-style strings as keys in a map, rather than string objects. The default algorithm less<const char*> would just compare the pointers, and not the vector of characters to which it points. Using this algorithm instead of the default will allow the map to work as expected.

Definition at line 194 of file STLHelper.hpp.

Member Function Documentation

◆ operator()()

template<class T >
bool xalanc::less_null_terminated_arrays< T >::operator() ( const T *  theLHS,
const T *  theRHS 
) const
inline

Compare the values of two objects.

Parameters
theLHSfirst object to compare
theRHSsecond object to compare
Returns
true if objects are the same

Definition at line 205 of file STLHelper.hpp.


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