зеркало из https://github.com/microsoft/STL.git
Silence clang warning in <variant> (#768)
Clang complains about an "unnecessary" lambda capture despite that the capture is used in a discarded statement (LLVM-45398).
This commit is contained in:
Родитель
d7f855891b
Коммит
f0f0b55d57
|
@ -1143,6 +1143,10 @@ public:
|
||||||
using _Mybase::valueless_by_exception;
|
using _Mybase::valueless_by_exception;
|
||||||
|
|
||||||
// swap [variant.swap]
|
// swap [variant.swap]
|
||||||
|
#ifdef __clang__ // TRANSITION, LLVM-45398
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wunused-lambda-capture"
|
||||||
|
#endif // TRANSITION, LLVM-45398
|
||||||
void swap(variant& _That) noexcept(
|
void swap(variant& _That) noexcept(
|
||||||
conjunction_v<is_nothrow_move_constructible<_Types>..., is_nothrow_swappable<_Types>...>) {
|
conjunction_v<is_nothrow_move_constructible<_Types>..., is_nothrow_swappable<_Types>...>) {
|
||||||
// exchange the contained values if *this and _That hold the same alternative, otherwise exchange the values of
|
// exchange the contained values if *this and _That hold the same alternative, otherwise exchange the values of
|
||||||
|
@ -1219,6 +1223,9 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef __clang__ // TRANSITION, LLVM-45398
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif // TRANSITION, LLVM-45398
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <size_t _Idx, class... _ArgTypes>
|
template <size_t _Idx, class... _ArgTypes>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче