Created
February 23, 2012 18:38
-
-
Save rhysd/1894264 to your computer and use it in GitHub Desktop.
make_array
This file contains 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 < | |
class... Args, | |
class Result = std::array< | |
typename std::decay<typename std::common_type<Args...>::type>::type, | |
sizeof...(Args) | |
> | |
> | |
inline Result make_array(Args &&... args) | |
{ | |
return Result{{ std::forward<Args>(args)... }}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment