BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlb::CStringLess Struct Reference

#include <bdlb_cstringless.h>

Public Types

typedef const char * first_argument_type
 
typedef const char * second_argument_type
 
typedef bool result_type
 

Public Member Functions

 BSLMF_NESTED_TRAIT_DECLARATION (CStringLess, bsl::is_trivially_copyable)
 
 BSLMF_NESTED_TRAIT_DECLARATION (CStringLess, bsl::is_trivially_default_constructible)
 
 CStringLess ()=default
 Create a CStringLess object.
 
 CStringLess (const CStringLess &original)=default
 
 ~CStringLess ()=default
 Destroy this object.
 
CStringLessoperator= (const CStringLess &rhs)=default
 
bool operator() (const char *lhs, const char *rhs) const
 

Detailed Description

This struct defines an ordering on null-terminated character strings, enabling them for use as keys in the standard associative containers such as bsl::map and bsl::set. Note that this class is an empty POD type.

Member Typedef Documentation

◆ first_argument_type

◆ result_type

◆ second_argument_type

Constructor & Destructor Documentation

◆ CStringLess() [1/2]

bdlb::CStringLess::CStringLess ( )
default

◆ CStringLess() [2/2]

bdlb::CStringLess::CStringLess ( const CStringLess original)
default

Create a CStringLess object. Note that as CStringLess is an empty (stateless) type, this operation has no observable effect.

◆ ~CStringLess()

bdlb::CStringLess::~CStringLess ( )
default

Member Function Documentation

◆ BSLMF_NESTED_TRAIT_DECLARATION() [1/2]

bdlb::CStringLess::BSLMF_NESTED_TRAIT_DECLARATION ( CStringLess  ,
bsl::is_trivially_copyable   
)

◆ BSLMF_NESTED_TRAIT_DECLARATION() [2/2]

bdlb::CStringLess::BSLMF_NESTED_TRAIT_DECLARATION ( CStringLess  ,
bsl::is_trivially_default_constructible   
)

◆ operator()()

bool bdlb::CStringLess::operator() ( const char *  lhs,
const char *  rhs 
) const
inline

Return true if the specified lhs string is lexicographically ordered before the specified rhs string, and false otherwise. The behavior is undefined unless both lhs and rhs point to null-terminated strings.

◆ operator=()

CStringLess & bdlb::CStringLess::operator= ( const CStringLess rhs)
default

Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object. Note that as CStringLess is an empty (stateless) type, this operation has no observable effect.


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