diff --git a/xprof/btx_tally.hpp b/xprof/btx_tally.hpp index 2f123b66..ab8f9e36 100644 --- a/xprof/btx_tally.hpp +++ b/xprof/btx_tally.hpp @@ -159,11 +159,11 @@ template void _get_uniq_tally(std::set> &s, std::v } // Exposed function template auto get_uniq_tally(std::unordered_map, K> &m) { - // Map to Set. Can remove the last elements who is the `api name` + // Map to Set. Can remove the last element who is the `api name` typedef decltype(make_tuple_without_last(std::declval>())) Minusone; std::set s; - for (auto &[k, v] : m) - s.insert(make_tuple_without_last(k)); + for (auto &kv : m) + s.insert(make_tuple_without_last(kv.first)); // Get the Tally std::vector v{}; _get_uniq_tally(s, v);