sincerely
Singaporean
If you have not done so, read this full tutorial on how to use SGEXTN to build an application.
(no source file, everything inside header)
template ‹typename T1, typename T2› class SGLPair;
part of SGEXTN module SG_Containers
temporary struct for 2 pieces of data
list of all including inherited members
preprocessor file inclusion directive: #include ‹SGLPair.h›
CMake target for BuildLah: SGEXTN::SG_Containers
see this link for more information about BuildLah
parent class: (none)
children classes: (none)
T1 first;
T2 second;
SGLPair(T1 first, T2 second);
[[nodiscard]] int hash() const;
[[nodiscard]] bool operator!=(const SGLPair& x) const;
[[nodiscard]] bool operator‹(const SGLPair& x) const;
[[nodiscard]] bool operator==(const SGLPair& x) const;
[[nodiscard]] bool operator›(const SGLPair& x) const;
SGLPair provides a template based temporary struct to store any 2 pieces of data. Common operators are also defined but are ignored if the component structs do not define the operator. This is a template based class with no separate source file. This class is a SGEXTN container. Copy constructor, copy assignment, move constructor, move assignment, and destructor work as expected. A deep copy is performed whenever this class is copied, and the new instance will not be linked to the old instance in any way. It is assumed that the contents placed into this SGEXTN container can be copied and moved. This means that their copy constructor copy assignment, move constructor, move assignment, and destructor work as expected. If this is not the case or if you want the container to store references or constant references, store pointers instead.
a class with 2 member variables, 1 per component
First component.
Second component.
Creates a SGLPair with the first element first and second element second.
Returns the hash value of this pair, used by SGLHash.
This is ignored if any component is a custom struct without hash() defined or if it is a function pointer.
Returns if this pair is not equal to x.
This is ignored if any component does not have operator!= defined.
Returns if this pair is less than x, components in front have their comparators taking priority.
This is ignored if any component does not have operator‹ or operator› defined.
Returns if this pair is equal to x.
This is ignored if any component does not have operator== defined.
Returns if this pair is more than x, components in front have their comparators taking priority.
This is ignored if any component does not have operator‹ or operator› defined.
©2025 05524F.sg (Singapore)