mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
Use std::is_nothrow_swappable (C++17 feature)
This commit is contained in:
@@ -121,7 +121,7 @@ namespace BlackMisc
|
||||
* Efficient swap for two Optional objects.
|
||||
*/
|
||||
template <typename T>
|
||||
void swap(Optional<T> &a, Optional<T> &b) noexcept(Private::is_nothrow_swappable<T, T>::value)
|
||||
void swap(Optional<T> &a, Optional<T> &b) noexcept(std::is_nothrow_swappable_v<T>)
|
||||
{
|
||||
if (a)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user