Skip to content

Instantly share code, notes, and snippets.

@klmr
Last active March 18, 2024 07:14
Show Gist options
  • Save klmr/2775736 to your computer and use it in GitHub Desktop.
Save klmr/2775736 to your computer and use it in GitHub Desktop.
C++11 make_array function template
template <typename... T>
constexpr auto make_array(T&&... values) ->
std::array<
typename std::decay<
typename std::common_type<T...>::type>::type,
sizeof...(T)> {
return {std::forward<T>(values)...};
}
@quietdragon
Copy link

What are the licensing terms of this gist ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment