Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
davidstone committed Dec 18, 2024
1 parent b2ca5b3 commit 08cd31c
Show file tree
Hide file tree
Showing 24 changed files with 62 additions and 81 deletions.
4 changes: 1 addition & 3 deletions source/tm/clients/pokemon_showdown/parsed_stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ export struct ParsedStats {
} // namespace techniclalmachine::ps

template<>
struct bounded::tombstone_traits<technicalmachine::ps::ParsedStats> {
struct bounded::tombstone<technicalmachine::ps::ParsedStats> {
private:
using base = tombstone_traits<technicalmachine::VisibleHP>;
public:
static constexpr auto spare_representations = base::spare_representations;

static constexpr auto make(auto const index) noexcept -> technicalmachine::ps::ParsedStats {
return technicalmachine::ps::ParsedStats{
.hp = base::make(index),
Expand Down
4 changes: 1 addition & 3 deletions source/tm/clients/pokemon_showdown/parsed_team.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ export struct ParsedPokemon {
} // namespace techniclalmachine::ps

template<>
struct bounded::tombstone_traits<technicalmachine::ps::ParsedPokemon> {
struct bounded::tombstone<technicalmachine::ps::ParsedPokemon> {
private:
using base = tombstone_traits<technicalmachine::ps::ParsedStats>;
public:
static constexpr auto spare_representations = base::spare_representations;

static constexpr auto make(auto const index) noexcept -> technicalmachine::ps::ParsedPokemon {
return technicalmachine::ps::ParsedPokemon{
.species = {},
Expand Down
6 changes: 2 additions & 4 deletions source/tm/held_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -973,15 +973,13 @@ export struct HeldItem {
m_tombstone(true)
{
}
friend bounded::tombstone_traits<HeldItem>;
friend bounded::tombstone<HeldItem>;
};

} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::HeldItem> {
static constexpr auto spare_representations = 1_bi;

struct bounded::tombstone<technicalmachine::HeldItem> {
static constexpr auto make(bounded::constant_t<0>) noexcept -> technicalmachine::HeldItem {
return technicalmachine::HeldItem(tombstone_tag());
}
Expand Down
4 changes: 2 additions & 2 deletions source/tm/move/initial_move.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ export struct InitialMove {
pp_ups(make())
{
}
friend bounded::tombstone_traits_composer<&InitialMove::pp_ups>;
friend bounded::tombstone_member<&InitialMove::pp_ups>;
};

} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::InitialMove> : bounded::tombstone_traits_composer<&technicalmachine::InitialMove::pp_ups> {
struct bounded::tombstone<technicalmachine::InitialMove> : bounded::tombstone_member<&technicalmachine::InitialMove::pp_ups> {
};

namespace technicalmachine {
Expand Down
6 changes: 3 additions & 3 deletions source/tm/move/move.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ export struct Move {
MoveName m_name;
PP m_pp;

friend bounded::tombstone_traits<Move>;
friend bounded::tombstone_traits_composer<&Move::m_pp>;
friend bounded::tombstone<Move>;
friend bounded::tombstone_member<&Move::m_pp>;
};

} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::Move> : bounded::tombstone_traits_composer<&technicalmachine::Move::m_pp> {
struct bounded::tombstone<technicalmachine::Move> : bounded::tombstone_member<&technicalmachine::Move::m_pp> {
};
6 changes: 3 additions & 3 deletions source/tm/move/pp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,8 +967,8 @@ export struct PP {
tv::optional<max_type> m_max;
tv::optional<current_type> m_current;

friend bounded::tombstone_traits<PP>;
friend bounded::tombstone_traits_composer<&PP::m_max>;
friend bounded::tombstone<PP>;
friend bounded::tombstone_member<&PP::m_max>;
};

export constexpr auto no_pp(PP const pp) {
Expand All @@ -979,5 +979,5 @@ export constexpr auto no_pp(PP const pp) {
} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::PP> : bounded::tombstone_traits_composer<&technicalmachine::PP::m_max> {
struct bounded::tombstone<technicalmachine::PP> : bounded::tombstone_member<&technicalmachine::PP::m_max> {
};
6 changes: 3 additions & 3 deletions source/tm/move/regular_moves.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ export struct RegularMoves {
}
containers::static_vector<Move, max_moves_per_pokemon> m_moves;

friend bounded::tombstone_traits<RegularMoves>;
friend bounded::tombstone_traits_composer<&RegularMoves::m_moves>;
friend bounded::tombstone<RegularMoves>;
friend bounded::tombstone_member<&RegularMoves::m_moves>;
};

} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::RegularMoves> : bounded::tombstone_traits_composer<&technicalmachine::RegularMoves::m_moves> {
struct bounded::tombstone<technicalmachine::RegularMoves> : bounded::tombstone_member<&technicalmachine::RegularMoves::m_moves> {
};
6 changes: 3 additions & 3 deletions source/tm/move/selection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ export struct Selection {
m_value(make())
{
}
friend bounded::tombstone_traits<Selection>;
friend bounded::tombstone_traits_composer<&Selection::m_value>;
friend bounded::tombstone<Selection>;
friend bounded::tombstone_member<&Selection::m_value>;
};

} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::Selection> : bounded::tombstone_traits_composer<&technicalmachine::Selection::m_value> {
struct bounded::tombstone<technicalmachine::Selection> : bounded::tombstone_member<&technicalmachine::Selection::m_value> {
};
4 changes: 1 addition & 3 deletions source/tm/move/side_effects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,11 @@ struct SideEffect {
} // namespace technicalmachine

template<technicalmachine::any_team UserTeam>
struct bounded::tombstone_traits<technicalmachine::SideEffect<UserTeam>> {
struct bounded::tombstone<technicalmachine::SideEffect<UserTeam>> {
private:
using T = technicalmachine::SideEffect<UserTeam>;
using base = tombstone_traits<technicalmachine::SideEffectFunction<UserTeam>>;
public:
static constexpr auto spare_representations = base::spare_representations;

static constexpr auto make(bounded::constant_t<0>) noexcept {
return T(
technicalmachine::Probability(0.0),
Expand Down
6 changes: 3 additions & 3 deletions source/tm/move/switch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ export struct Switch {
m_index(make())
{
}
friend bounded::tombstone_traits<Switch>;
friend bounded::tombstone_traits_composer<&Switch::m_index>;
friend bounded::tombstone<Switch>;
friend bounded::tombstone_member<&Switch::m_index>;
};

} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::Switch> : bounded::tombstone_traits_composer<&technicalmachine::Switch::m_index> {
struct bounded::tombstone<technicalmachine::Switch> : bounded::tombstone_member<&technicalmachine::Switch::m_index> {
};
6 changes: 3 additions & 3 deletions source/tm/pokemon/hidden_power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ struct HiddenPower {
[[no_unique_address]] Power m_power;
Type m_type;

friend bounded::tombstone_traits<HiddenPower<generation>>;
friend bounded::tombstone_traits_composer<&HiddenPower<generation>::m_power>;
friend bounded::tombstone<HiddenPower<generation>>;
friend bounded::tombstone_member<&HiddenPower<generation>::m_power>;
};

export template<Generation generation>
Expand All @@ -229,7 +229,7 @@ constexpr auto calculate_hidden_power(DVsOrIVs<special_style_for(generation)> dv
} // namespace technicalmachine

template<technicalmachine::Generation generation>
struct bounded::tombstone_traits<technicalmachine::HiddenPower<generation>> : bounded::tombstone_traits_composer<&technicalmachine::HiddenPower<generation>::m_power> {
struct bounded::tombstone<technicalmachine::HiddenPower<generation>> : bounded::tombstone_member<&technicalmachine::HiddenPower<generation>::m_power> {
};

namespace technicalmachine {
Expand Down
3 changes: 1 addition & 2 deletions source/tm/pokemon/initial_pokemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ struct InitialPokemon {
} // namespace technicalmachine

template<technicalmachine::SpecialStyle style>
struct bounded::tombstone_traits<technicalmachine::InitialPokemon<style>> {
struct bounded::tombstone<technicalmachine::InitialPokemon<style>> {
using base = tombstone_traits<technicalmachine::InitialMoves>;
static constexpr auto spare_representations = base::spare_representations;

static constexpr auto make(auto const index) noexcept -> technicalmachine::InitialPokemon<style> {
return {
Expand Down
6 changes: 3 additions & 3 deletions source/tm/pokemon/known_pokemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ struct KnownPokemon {
Pokemon<generation> m_pokemon;
Nickname m_nickname;

friend bounded::tombstone_traits<KnownPokemon<generation>>;
friend bounded::tombstone_traits_composer<&KnownPokemon<generation>::m_pokemon>;
friend bounded::tombstone<KnownPokemon<generation>>;
friend bounded::tombstone_member<&KnownPokemon<generation>::m_pokemon>;
};

template<Generation generation>
Expand All @@ -211,7 +211,7 @@ constexpr auto is_known_pokemon<KnownPokemon<generation>> = true;
} // namespace technicalmachine

template<technicalmachine::Generation generation>
struct bounded::tombstone_traits<technicalmachine::KnownPokemon<generation>> : bounded::tombstone_traits_composer<&technicalmachine::KnownPokemon<generation>::m_pokemon> {
struct bounded::tombstone<technicalmachine::KnownPokemon<generation>> : bounded::tombstone_member<&technicalmachine::KnownPokemon<generation>::m_pokemon> {
};

namespace technicalmachine {
Expand Down
6 changes: 3 additions & 3 deletions source/tm/pokemon/level.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ export struct Level {
m_value(make())
{
}
friend bounded::tombstone_traits<Level>;
friend bounded::tombstone_traits_composer<&Level::m_value>;
friend bounded::tombstone<Level>;
friend bounded::tombstone_member<&Level::m_value>;
};

} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::Level> : bounded::tombstone_traits_composer<&technicalmachine::Level::m_value> {
struct bounded::tombstone<technicalmachine::Level> : bounded::tombstone_member<&technicalmachine::Level::m_value> {
};
6 changes: 3 additions & 3 deletions source/tm/pokemon/pokemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ struct Pokemon {

bool m_has_been_seen;

friend bounded::tombstone_traits<Pokemon<generation>>;
friend bounded::tombstone_traits_composer<&Pokemon<generation>::m_regular_moves>;
friend bounded::tombstone<Pokemon<generation>>;
friend bounded::tombstone_member<&Pokemon<generation>::m_regular_moves>;
};

template<Generation generation>
Expand All @@ -305,5 +305,5 @@ constexpr auto is_real_pokemon<Pokemon<generation>> = true;
} // namespace technicalmachine

template<technicalmachine::Generation generation>
struct bounded::tombstone_traits<technicalmachine::Pokemon<generation>> : bounded::tombstone_traits_composer<&technicalmachine::Pokemon<generation>::m_regular_moves> {
struct bounded::tombstone<technicalmachine::Pokemon<generation>> : bounded::tombstone_member<&technicalmachine::Pokemon<generation>::m_regular_moves> {
};
6 changes: 3 additions & 3 deletions source/tm/pokemon/seen_pokemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ struct SeenPokemon {

// TODO: Possible Hidden Power types

friend bounded::tombstone_traits<SeenPokemon<generation>>;
friend bounded::tombstone_traits_composer<&SeenPokemon<generation>::m_regular_moves>;
friend bounded::tombstone<SeenPokemon<generation>>;
friend bounded::tombstone_member<&SeenPokemon<generation>::m_regular_moves>;
};

template<Generation generation>
Expand All @@ -331,5 +331,5 @@ constexpr auto is_seen_pokemon<SeenPokemon<generation>> = true;
} // namespace technicalmachine

template<technicalmachine::Generation generation>
struct bounded::tombstone_traits<technicalmachine::SeenPokemon<generation>> : bounded::tombstone_traits_composer<&technicalmachine::SeenPokemon<generation>::m_regular_moves> {
struct bounded::tombstone<technicalmachine::SeenPokemon<generation>> : bounded::tombstone_member<&technicalmachine::SeenPokemon<generation>::m_regular_moves> {
};
6 changes: 3 additions & 3 deletions source/tm/stat/hp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export struct HP {
m_current()
{
}
friend bounded::tombstone_traits<HP>;
friend bounded::tombstone_traits_composer<&HP::m_max>;
friend bounded::tombstone<HP>;
friend bounded::tombstone_member<&HP::m_max>;
};

static_assert(HP(100_bi).max() == 100_bi);
Expand All @@ -81,5 +81,5 @@ static_assert(HP(250_bi, Level(100_bi), IV(30_bi), EV(252_bi)).max() == 703_bi);
} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::HP> : bounded::tombstone_traits_composer<&technicalmachine::HP::m_max> {
struct bounded::tombstone<technicalmachine::HP> : bounded::tombstone_member<&technicalmachine::HP::m_max> {
};
12 changes: 6 additions & 6 deletions source/tm/stat/iv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ export struct IV {
m_value(make())
{
}
friend bounded::tombstone_traits<IV>;
friend bounded::tombstone_traits_composer<&IV::m_value>;
friend bounded::tombstone<IV>;
friend bounded::tombstone_member<&IV::m_value>;
};

export constexpr auto default_iv(Generation const generation) {
Expand Down Expand Up @@ -87,8 +87,8 @@ export struct DV {
m_value(make())
{
}
friend bounded::tombstone_traits<DV>;
friend bounded::tombstone_traits_composer<&DV::m_value>;
friend bounded::tombstone<DV>;
friend bounded::tombstone_member<&DV::m_value>;
};

export struct DVs {
Expand Down Expand Up @@ -205,9 +205,9 @@ static_assert(DVs(DV(14_bi), DV(14_bi), DV(14_bi), DV(14_bi)).hp() == DV(0_bi));
} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::IV> : bounded::tombstone_traits_composer<&technicalmachine::IV::m_value> {
struct bounded::tombstone<technicalmachine::IV> : bounded::tombstone_member<&technicalmachine::IV::m_value> {
};

template<>
struct bounded::tombstone_traits<technicalmachine::DV> : bounded::tombstone_traits_composer<&technicalmachine::DV::m_value> {
struct bounded::tombstone<technicalmachine::DV> : bounded::tombstone_member<&technicalmachine::DV::m_value> {
};
8 changes: 2 additions & 6 deletions source/tm/stat/iv_and_ev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export struct DVAndEV {
} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::IVAndEV> {
static constexpr auto spare_representations = tombstone_traits<technicalmachine::IV>::spare_representations;

struct bounded::tombstone<technicalmachine::IVAndEV> {
static constexpr auto make(auto const index) noexcept -> technicalmachine::IVAndEV {
return technicalmachine::IVAndEV(
tombstone_traits<technicalmachine::IV>::make(index),
Expand All @@ -44,9 +42,7 @@ struct bounded::tombstone_traits<technicalmachine::IVAndEV> {
};

template<>
struct bounded::tombstone_traits<technicalmachine::DVAndEV> {
static constexpr auto spare_representations = tombstone_traits<technicalmachine::DV>::spare_representations;

struct bounded::tombstone<technicalmachine::DVAndEV> {
static constexpr auto make(auto const index) noexcept -> technicalmachine::DVAndEV {
return technicalmachine::DVAndEV(
tombstone_traits<technicalmachine::DV>::make(index),
Expand Down
6 changes: 3 additions & 3 deletions source/tm/stat/stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ struct Stats {
{
}

friend bounded::tombstone_traits<Stats<stat_style>>;
friend bounded::tombstone_traits_composer<&Stats<stat_style>::m_hp>;
friend bounded::tombstone<Stats<stat_style>>;
friend bounded::tombstone_member<&Stats<stat_style>::m_hp>;
};

} // namespace technicalmachine

template<technicalmachine::StatStyle stat_style>
struct bounded::tombstone_traits<technicalmachine::Stats<stat_style>> : bounded::tombstone_traits_composer<&technicalmachine::Stats<stat_style>::m_hp> {
struct bounded::tombstone<technicalmachine::Stats<stat_style>> : bounded::tombstone_member<&technicalmachine::Stats<stat_style>::m_hp> {
};
4 changes: 1 addition & 3 deletions source/tm/strategy/selection_probability.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ export struct SelectionProbability {
} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::SelectionProbability> {
static constexpr auto spare_representations = tombstone_traits<technicalmachine::Selection>::spare_representations;

struct bounded::tombstone<technicalmachine::SelectionProbability> {
static constexpr auto make(auto const index) noexcept -> technicalmachine::SelectionProbability {
return technicalmachine::SelectionProbability(
tombstone_traits<technicalmachine::Selection>::make(index),
Expand Down
4 changes: 1 addition & 3 deletions source/tm/strategy/weighted_selection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ export struct WeightedSelection {
} // namespace technicalmachine

template<>
struct bounded::tombstone_traits<technicalmachine::WeightedSelection> {
static constexpr auto spare_representations = tombstone_traits<technicalmachine::Selection>::spare_representations;

struct bounded::tombstone<technicalmachine::WeightedSelection> {
static constexpr auto make(auto const index) noexcept -> technicalmachine::WeightedSelection {
return technicalmachine::WeightedSelection(
tombstone_traits<technicalmachine::Selection>::make(index),
Expand Down
Loading

0 comments on commit 08cd31c

Please sign in to comment.