https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78273

            Bug ID: 78273
           Summary: The transparent version of {map,set}::count should
                    call _M_count_tr
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

They are currently

>      template<typename _Kt>
>       auto
>       count(const _Kt& __x) const
>       -> decltype(_M_t._M_count_tr(__x))
>       { return _M_t._M_find_tr(__x) == _M_t.end() ? 0 : 1; }

but there is no requirement that at most one key in the container compare
equivalent to the heterogeneous key; the only requirement is that the keys of
the elements in the container be suitably partitioned with respect to the
heterogeneous key. Thus, they should simply return _M_t._M_count_tr(__x);.

Reply via email to