[libc++][NFC] Refactor enable_ifs in vector
authorNikolas Klauser <nikolasklauser@berlin.de>
Mon, 15 Aug 2022 12:09:49 +0000 (14:09 +0200)
committerNikolas Klauser <nikolasklauser@berlin.de>
Tue, 20 Sep 2022 08:06:34 +0000 (10:06 +0200)
commit54150e8257e462290e8f43f3a4153d12fb778216
tree8b493164063598434aa9fc7c770fdba9ca61643f
parent4f30c5808a49ba85b052cb65bbe7b34109187bad
[libc++][NFC] Refactor enable_ifs in vector

Using the `enable_if_t<..., int> = 0` style has the benefit that it works in all cases and makes function declarations easier to read because the function arguments and return type and SFINAE are separated. Unifying the style also makes it easier for people not super familiar with SFINAE to make sense of the code.

Reviewed By: Mordante, var-const, #libc, huixie90

Spies: huixie90, libcxx-commits

Differential Revision: https://reviews.llvm.org/D131868
libcxx/include/vector