From 294e746ad836bf8ce039c64e24ab38da253e8d58 Mon Sep 17 00:00:00 2001 From: Jason Burmark Date: Thu, 6 Oct 2022 12:46:04 -0700 Subject: [PATCH 1/2] Quiet unused var warnings --- test/tuple.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tuple.cpp b/test/tuple.cpp index be3efa5..a105644 100644 --- a/test/tuple.cpp +++ b/test/tuple.cpp @@ -288,8 +288,8 @@ TEST(CampTuple, CatPair) TEST(CampTuple, CatPairFwd) { MoveOnly a; - char b; - float c; + char b{'a'}; + float c{5.1f}; MoveOnly d; auto t1 = camp::forward_as_tuple(std::move(a), std::move(b)); auto t2 = camp::forward_as_tuple(std::move(c), std::move(d)); From 04f709cac99c4eb28e3d6a00a1cf8002ee2fd31e Mon Sep 17 00:00:00 2001 From: Jason Burmark Date: Thu, 6 Oct 2022 15:01:48 -0700 Subject: [PATCH 2/2] Use static_cast --- include/camp/helpers.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/camp/helpers.hpp b/include/camp/helpers.hpp index d30660f..a5697df 100644 --- a/include/camp/helpers.hpp +++ b/include/camp/helpers.hpp @@ -41,7 +41,7 @@ namespace detail { using __expand_array_type = int[]; } -#define CAMP_EXPAND(...) ::camp::sink( \ +#define CAMP_EXPAND(...) static_cast( \ ::camp::detail::__expand_array_type { 0, ((void)(__VA_ARGS__), 0)... }) template