Created
May 19, 2016 10:08
-
-
Save r-lyeh-archived/b3c4b21fa19ccb683c944b87baca51e5 to your computer and use it in GitHub Desktop.
Revisions
-
r-lyeh created this gist
May 19, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #include <string> #include <iostream> #include <utility> void internal_func(const std::string& s) { std::cout << s << '\n'; } template <typename ... T> void do_with_string(T&& ... t) { internal_func({std::forward<T>(t)...}); } int main() { do_with_string("foobar", 3U); do_with_string(std::string("bar")); }