KK
Size: a a a
KK
RM
KK
НК
НК
НК
KK
KK
НК
RM
struct not_a_cb_tag {
explicit constexpr not_a_cb_tag() = default;
};
template <typename T, typename Callback =
not_a_cb_tag
, typename = std::enable_if_t<std::is_same_v<T, CServer> || std::is_same_v<T, CClient>, T>>
void RemoveConnection(const uint32_t connection, [[maybe_unused]] Callback fCallback = not_a_cb_tag{})
{
if(const auto itr = m_connection.find(connection); itr != m_connection.end())
{
if constexpr (std::is_same_v<T, CServer>) {
m_connectionAppID.erase(registry.get<T>(itr->second).base_.app_id);
}
registry.destroy(itr->second);
m_connection.erase(connection);
}
// хз куда
if constexpr (!std::is_same_v<Callback,
not_a_cb_tag
>) {
fCallback(stuff);
}
}
AB
/¯
/¯
/¯
НК
RM
RM
/¯
AB
RM