BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlb::CStringEqualTo Struct Reference

#include <bdlb_cstringequalto.h>

Detailed Description

This struct defines a comparison functor on null-terminated character strings, enabling them for use as keys in the standard unordered associative containers such as bsl::unordered_map and bsl::unordered_set.

Note
Note that this class is an empty POD type.

See bdlb_cstringequalto

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 (CStringEqualTo, bsl::is_trivially_default_constructible) CStringEqualTo()=default
 
 CStringEqualTo (const CStringEqualTo &original)=default
 
 ~CStringEqualTo ()=default
 
CStringEqualTooperator= (const CStringEqualTo &)=default
 
bool operator() (const char *lhs, const char *rhs) const
 

Member Typedef Documentation

◆ first_argument_type

◆ result_type

◆ second_argument_type

Constructor & Destructor Documentation

◆ CStringEqualTo()

bdlb::CStringEqualTo::CStringEqualTo ( const CStringEqualTo original)
default

Create a CStringEqualTo object.

Note
Note that as CStringEqualTo is an empty (stateless) type, this operation has no observable effect.

◆ ~CStringEqualTo()

bdlb::CStringEqualTo::~CStringEqualTo ( )
default

Destroy this object.

Member Function Documentation

◆ BSLMF_NESTED_TRAIT_DECLARATION()

bdlb::CStringEqualTo::BSLMF_NESTED_TRAIT_DECLARATION ( CStringEqualTo  ,
bsl::is_trivially_default_constructible   
)
default

Create a CStringEqualTo object.

◆ operator()()

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

Return true if the specified lhs string has the same (case sensitive) value as the specified rhs string, and false otherwise.

Precondition
The behavior is undefined unless both lhs and rhs point to null-terminated strings.

◆ operator=()

CStringEqualTo & bdlb::CStringEqualTo::operator= ( const CStringEqualTo )
default

Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object.

Note
Note that as CStringEqualTo is an empty (stateless) type, this operation has no observable effect.

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