sincerely Singaporean

If you have not done so, read this full tutorial on how to use SGEXTN to build an application.

SGLEqualsTo

see header file

(no source file, everything inside header)

template ‹typename T› class SGLEqualsTo;

part of SGEXTN module SG_Containers

Equality check struct for use with SGEXTN Containers

detailed description

list of all including inherited members

implementation details

preprocessor file inclusion directive: #include ‹SGLEqualsTo.h›

CMake target for BuildLah: SGEXTN::SG_Containers

see this link for more information about BuildLah

parent class: (none)

children classes: (none)

instance member functions

[[nodiscard]] bool operator()(const T& a, const T& b) const;

Detailed Description

SGLEqualsTo provides a equality check struct for use with SGEXTN Containers, this should be used most of the time when using SGLUnorderedSet, SGLUnorderedMultiSet, or SGLUnorderedMap. You need operator== defined to use SGLEqualsTo with custom structs. This is a template based class with no separate source file.

Implementation Details

SGLEqualsTo simply checks operator== on the corresponding data type.

[[nodiscard]] bool operator()(const T& a, const T& b) const;

Checks if a and b are equal using operator== on T.

This is internally used by SGLUnorderedSet, SGLUnorderedMultiSet, and SGLUnorderedMap when SGLEqualsTo is selected as the equality check struct.

The presense of operator() makes SGLEqualsTo a functor.

This will not compile if operator== is not defined for T. Check the source code of any SGEXTN struct (SGXChar, SGXString, SGXColourRGBA, SGXColourHSLA, SGXIdentifier, SGXTimeStamp, SGXVector2) to see how to define operator==.

©2025 05524F.sg (Singapore)

contact 05524F / report a bug / make a suggestion

about 05524F SINGAPORE values

list of 05524F projects