Skip to content

Instantly share code, notes, and snippets.

@julian-klode
Created May 7, 2025 18:31
Show Gist options
  • Save julian-klode/1c07096cf7ff9d49ffed4d1dcc092689 to your computer and use it in GitHub Desktop.
Save julian-klode/1c07096cf7ff9d49ffed4d1dcc092689 to your computer and use it in GitHub Desktop.
#include <cstdint>
#include <tuple>
struct priority {
uint16_t padding;
uint16_t dynamic;
uint16_t staticp;
int16_t index;
bool operator<(const priority &other) const;
};
bool priority::operator<(const priority &other) const
{
return std::tie(index, staticp, dynamic, padding) < std::tie(other.index, other.staticp, other.dynamic, other.padding);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment