wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
version_slot.hpp
Go to the documentation of this file.
1#pragma once
2
12
13#include <type_traits>
14
16
17namespace wowlib::formats {
21 template <class Trait>
22 struct Absent {
23 // excluded from bindings: the parameter type is this unwelded base
24 [[=welder::mark::exclude]]
25 bool operator==(const Absent&) const = default;
26 };
27
29 inline constexpr ClientVersion VersionNeverRemoved{255, 0, 0, 0};
30
41 template <ClientVersion V, ClientVersion Since, class Trait, ClientVersion Until = VersionNeverRemoved>
42 using Slot = std::conditional_t<(V.formatLineage() >= Since && V.formatLineage() < Until), Trait, Absent<Trait>>;
43}
Client version identity, the flavor axis that separates a client's CONTENT version from the engine ge...
constexpr ClientVersion VersionNeverRemoved
Above any supported client build — the default Until (never removed).
std::conditional_t<(V.formatLineage() >=Since &&V.formatLineage()< Until), Trait, Absent< Trait > > Slot
A version-gated base: the entity inherits Trait (flattening its chunk members in) iff Since <= V < Un...
A distinct empty base per Trait, so an entity inheriting several inactive version slots never inherit...
bool operator==(const Absent &) const =default