libMesh
Public Types | Public Member Functions | List of all members
GETPOT_NAMESPACE::GetPot::ltstr Struct Reference

Transparent comparator object used for making std::sets that contain unique_ptrs. More...

Public Types

using is_transparent = void
 As of C++14, std::set::find() can be a templated overload. More...
 

Public Member Functions

bool operator() (const std::unique_ptr< const char[]> &s1, const std::unique_ptr< const char[]> &s2) const
 
bool operator() (const std::unique_ptr< const char[]> &s1, const char *const &s2) const
 
bool operator() (const char *const &s1, const std::unique_ptr< const char[]> &s2) const
 

Detailed Description

Transparent comparator object used for making std::sets that contain unique_ptrs.

Definition at line 557 of file getpot.h.

Member Typedef Documentation

◆ is_transparent

As of C++14, std::set::find() can be a templated overload.

https://en.cppreference.com/w/cpp/container/set/find We enable this by defining is_transparent as a type. See also: the CompareUnderlying struct in libmesh/utility.h

Definition at line 565 of file getpot.h.

Member Function Documentation

◆ operator()() [1/3]

bool GETPOT_NAMESPACE::GetPot::ltstr::operator() ( const std::unique_ptr< const char[]> &  s1,
const std::unique_ptr< const char[]> &  s2 
) const
inline

Definition at line 567 of file getpot.h.

569  { return strcmp(s1.get(), s2.get()) < 0; }

◆ operator()() [2/3]

bool GETPOT_NAMESPACE::GetPot::ltstr::operator() ( const std::unique_ptr< const char[]> &  s1,
const char *const &  s2 
) const
inline

Definition at line 571 of file getpot.h.

573  { return strcmp(s1.get(), s2) < 0; }

◆ operator()() [3/3]

bool GETPOT_NAMESPACE::GetPot::ltstr::operator() ( const char *const &  s1,
const std::unique_ptr< const char[]> &  s2 
) const
inline

Definition at line 575 of file getpot.h.

577  { return strcmp(s1, s2.get()) < 0; }

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