???????????嶨????????????????????????????????????????????????????decltype??÷????????
????template<typename It>
????decltype(*beg) get_begin(It beg)
????{
????return *beg;
????}
????????????д?????????????????decltype??????????????beg??????????????????????β?÷????????
????template<typename It>
????auto get_begin(It beg) -> decltype(*beg)
????{
????return *beg;
????}
????std::cout<<"test tail return type of template: ";
????std::vector<int> numbers = {1?? 2?? 3?? 4?? 5};
????std::cout<<"get_begin: "<<get_begin(numbers.begin())<<std::endl;
????std::cout<<"test tail return type of template done. ";
?????????????
?????±???У???????????????????????????б?????????????????????á?
????template<typename T>
????std::ostream &print_variadic(std::ostream &os?? const T &t)
????{
????return os<<t<<std::endl;
????}
????template<typename T?? typename... Args>
????std::ostream &print_variadic(std::ostream &os?? const T &t?? const Args&... rest)
????{
????os<<t<<"(remain size: "<<sizeof...(Args)<<")?? ";
????return print_variadic(os?? rest...);
????}
????std::cout<<"test variadic template: ";
????print_variadic(std::cout?? 100?? "s"?? 56.76?? 101);
????std::cout<<"test variadic template done. ";
??????????print_variadic??????4?????????????????????????????????庯??????100?????t??????????3???????????rest??
?????????????У?????????rest???е??????????ó???????t???????????????????ε????á?
???????????????????????????print_variadic??????????????????????????????汾?????????????????????????????print_variadic????????顣
???????
????· ??????????function??????????????function????????????????????????????Щ????????????????????????????μ?
????· ???±???У??????????????????????????????????
????· ?±???У????????using??????????????
????· ?±???У????????????????????????????????????????
????· ??????庯?????????????β?÷????????
????· ?±???У???????????????????????????б????????????????????????????????á?