Created
June 29, 2016 15:30
-
-
Save mbolt35/dc58ab1c67f6980d1f301f11ceb06e46 to your computer and use it in GitHub Desktop.
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 T, class...Ts> | |
container<T, Ts...> make_container(T value, Ts... values) { | |
// Print the total number of arguments passed in. | |
// We'll use the sizeof.. builtin to determine this for | |
// variadic args and increment once for the single T arg | |
std::cout << "Total Args: " << (sizeof...(values) + 1) << std::endl; | |
return container<T, Ts...>(value, values...); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment