|
C Container Collection (CCC)
|
An element comparison helper. More...
#include <types.h>
An element comparison helper.
This type helps the user define the comparison callback function, if the container takes a standard element comparison function, and helps avoid swappable argument errors. Any type LHS is considered the left hand side and any type RHS is the right hand side when considering three-way comparison return values. Context data is a reference to any context data provided upon container initialization.
The pointers are const to bind the types closely with their context, if context is provided. Because container code is providing the user reference to the types it currently stores it is critical the user does not accidentally move or misuse the pointer to jeopardize container invariants.
Data Fields | |
| void const *const | type_left |
| void const *const | type_right |
| void *const | context |
| void* const CCC_Comparator_arguments::context |
A reference to context data provided to container on initialization.
| void const* const CCC_Comparator_arguments::type_left |
The left hand side for a three-way comparison operation.
| void const* const CCC_Comparator_arguments::type_right |
The right hand side for a three-way comparison operation.