[libcxx-commits] [libcxx] 45c0ebe - [libc++] Surpress -Wunused-value warning in variant
Yuanfang Chen via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 21 15:33:41 PDT 2021
Author: Yuanfang Chen
Date: 2021-09-21T15:33:10-07:00
New Revision: 45c0ebe00efbc09750a808f1e95377b9ea1744c4
URL: https://github.com/llvm/llvm-project/commit/45c0ebe00efbc09750a808f1e95377b9ea1744c4
DIFF: https://github.com/llvm/llvm-project/commit/45c0ebe00efbc09750a808f1e95377b9ea1744c4.diff
LOG: [libc++] Surpress -Wunused-value warning in variant
The idiom helps with parameter unpacking so the return value is not
important. Make it explicit.
Added:
Modified:
libcxx/include/variant
Removed:
################################################################################
diff --git a/libcxx/include/variant b/libcxx/include/variant
index 1e24e11b6248..b69b697ce1c2 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -549,7 +549,7 @@ private:
inline _LIBCPP_INLINE_VISIBILITY
static constexpr auto __make_fdiagonal_impl() {
return __make_dispatch<_Fp, _Vs...>(
- index_sequence<(__identity<_Vs>{}, _Ip)...>{});
+ index_sequence<((void)__identity<_Vs>{}, _Ip)...>{});
}
template <class _Fp, class... _Vs, size_t... _Is>
More information about the libcxx-commits
mailing list