Created
August 14, 2018 15:13
-
-
Save terngkub/958a80a145a5bd27fea0437714b747f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template <typename D = void, typename... T> | |
| constexpr auto make_array(T &&... t) -> std::array<std::conditional_t<std::is_void<D>::value, std::common_type_t<T...>, D>, sizeof...(T)> | |
| { | |
| return {{std::forward<T>(t)...}}; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment