Use if-constexpr instead of overloading for customization point
authorJonathan Wakely <jwakely@redhat.com>
Wed, 30 Oct 2019 17:42:04 +0000 (17:42 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 30 Oct 2019 17:42:04 +0000 (17:42 +0000)
commitce001b300fc7bd22cbb2712b6d06e5043fe6354f
treeb2683f18d18e9fffb66104d9f990fc5557782463
parent411679568b2e3b1ca9b84673c430f2fdc9360368
Use if-constexpr instead of overloading for customization point

This combines two of the std::ranges::swap.operator() overloads into a
single function template. Using if-constexpr to choose between
implementations should give the compiler less work to do than using
overloading.

* include/std/concepts (std::ranges::swap): Use a single overload for
the non-array cases, and switch using if-constexpr.

From-SVN: r277635
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/concepts