MoReFEM
Loading...
Searching...
No Matches
Public Types | Public Member Functions
MoReFEM::Utilities::PointerComparison::Equal< T > Struct Template Reference

See Less for explanation. More...

#include <PointerComparison.hpp>

Collaboration diagram for MoReFEM::Utilities::PointerComparison::Equal< T >:

Public Types

using comparison_type
 Use reference if the type being compared is a shared or unique pointer.
 

Public Member Functions

bool operator() (comparison_type lhs, comparison_type rhs) const
 

Detailed Description

template<class T>
struct MoReFEM::Utilities::PointerComparison::Equal< T >

See Less for explanation.

Member Typedef Documentation

◆ comparison_type

template<class T >
using MoReFEM::Utilities::PointerComparison::Equal< T >::comparison_type
Initial value:
std::conditional_t
<
Utilities::IsSharedPtr<T>() || Utilities::IsUniquePtr<T>(),
const T&,
T
>

Use reference if the type being compared is a shared or unique pointer.

For the shared pointer it's only a matter of efficiency, for the unique one comparison couldn't occur otherwise.

Member Function Documentation

◆ operator()()

template<class T >
bool MoReFEM::Utilities::PointerComparison::Equal< T >::operator() ( comparison_type lhs,
comparison_type rhs ) const

Overload operator() so that Less might be used as a functor.

Parameters
[in]lhsLeft-hand side.
[in]rhsRight-hand side.

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