This is the mail archive of the
mailing list for the libstdc++ project.
Re: [PATCH] Use if-constexpr instead of overloading for customization point
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 Oct 2019 17:43:37 +0000
- Subject: Re: [PATCH] Use if-constexpr instead of overloading for customization point
- References: <20191030174223.GK4169@redhat.com>
On 30/10/19 17:42 +0000, Jonathan Wakely wrote:
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
P.S. this is how all the other std::ranges::* customization points are
defined, but I only started doing that after adding std::ranges::swap.
Now they're all done this way.