11 static constexpr int Count{
sizeof...(Ts) };
12 static constexpr int Single{
sizeof...(Ts) == 1 };
15 static_assert(
sizeof...(Ts) >= 1 &&
"At least 1 type must be provided.");
17 using HeaderType = std::conditional_t<IsConst, const Headers, Headers>;
18 using PatternType = std::conditional_t<Single, std::string_view, std::array<std::string_view, Count>>;
19#ifdef __cpp_pack_indexing
20 using Type = std::conditional_t<
Single, Ts...[0], std::variant<Ts...>>;
23 template<
class F,
class...>
struct First {
using Type = F; };
33 std::expected<Type, HeaderErrorEnum>
Get() &&;
41 void operator=(
const T& newValue) &&;
44 void operator=(T&& newValue) &&;
48 void Set(
const T& newValue) &&;
51 void Set(T&& newValue) &&;
53 template<
class =
void>
55 bool TrySet(std::string_view newValue) &&;
59 const std::string_view key;