Skip to content

Commit

Permalink
Fix compiler warning in make_initialized_array function
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Jul 29, 2024
1 parent accca40 commit b5c39bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c++/nda/stdutil/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ namespace nda::stdutil {
template <size_t R, typename T>
constexpr std::array<T, R> make_initialized_array(T v) {
return [&v]<size_t... Is>(std::index_sequence<Is...>) {
return std::array<T, R>{(Is, v)...}; // NOLINT (always v, just a trick to have the pack)
return std::array<T, R>{((void)Is, v)...}; // NOLINT (always v, just a trick to have the pack)
}(std::make_index_sequence<R>{});
}

Expand Down

0 comments on commit b5c39bb

Please sign in to comment.