Skip to content

Commit

Permalink
Merge pull request #120 from MrBurmark/bugfix/tuple_warnings
Browse files Browse the repository at this point in the history
Quiet uninitialized var warnings
  • Loading branch information
trws authored Oct 7, 2022
2 parents 7e6b225 + 04f709c commit 9a6b821
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/camp/helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace detail
{
using __expand_array_type = int[];
}
#define CAMP_EXPAND(...) ::camp::sink( \
#define CAMP_EXPAND(...) static_cast<void>( \
::camp::detail::__expand_array_type { 0, ((void)(__VA_ARGS__), 0)... })

template <typename Fn, typename... Args>
Expand Down
4 changes: 2 additions & 2 deletions test/tuple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 9a6b821

Please sign in to comment.