C++ explicit return type template specialisation
问题 This is a follow up on this (more general) question: previous question. A partial answer to the present question is given here: partial answer to the present question. I am interested in explicit specialisation of the return type based on the template argument. While the answer presented above provides a solution to the problem, I believe that there is a more elegant way of solving the problem using C++11/14 techniques: template<int N> auto getOutputPort2(); template<> auto getOutputPort2<0>(