]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Simplify __detail::__distance_fw using 'if constexpr'
authorJonathan Wakely <jwakely@redhat.com>
Fri, 1 Nov 2024 12:38:29 +0000 (12:38 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 8 Nov 2024 11:26:40 +0000 (11:26 +0000)
commitb907cde027dc65af5842c06c50cfa12e2f58133b
treed6c497e9fc51053db87a1067a31b5f07cf3111c1
parent775056616386b7d05f81a413a0ad72c63aa381bf
libstdc++: Simplify __detail::__distance_fw using 'if constexpr'

This uses 'if constexpr' instead of tag dispatching, removing the need
for a second call using that tag, and simplifying the overload set that
needs to be resolved for calls to __distance_fw.

libstdc++-v3/ChangeLog:

* include/bits/hashtable_policy.h (__distance_fw): Replace tag
dispatching with 'if constexpr'.
libstdc++-v3/include/bits/hashtable_policy.h