bool operator()(const Tuple& tup) const { if (not tup.dynamically_typed()) { // statically typed tuples return &typeid(type_list<T...>) // as type token return typeid(detail::type_list<T...>)== *(tup.type_token()); } // always use a full dynamic match for dynamic typed tuples else if (tup.size() == sizeof...(T)) { auto& tarr = static_types_array<T...>::arr; return std::equal(tup.begin(), tup.end(), tarr.begin(), types_only_eq); } return false; }
uint64_t get_cache_entry(const std::type_info* type_token, const Tuple& value) { CAF_REQUIRE(type_token != nullptr); if (value.dynamically_typed()) { return m_dummy.second; // all groups enabled } size_t i = find_token_pos(type_token); // if we didn't found a cache entry ... if (i == m_cache_end) { // ... 'create' one (override oldest element in cache if full) advance_(m_cache_end); if (m_cache_end == m_cache_begin) { advance_(m_cache_begin); } m_cache[i].first = type_token; idx_token_type idx_token; m_cache[i].second = calc_bitmask(m_cases, idx_token, *type_token, value); } return m_cache[i].second; }