Perfect forwarding for functions inside of a templated C++ class
问题 Is there a good way to get perfect forwarding for functions inside of a templated class? Specifically, in the code #include <iostream> // Forward declare a Bar struct Bar; // Two different functions that vary based on the kind of argument void printme(Bar const & bar) { std::cout << "printme: constant reference bar" << std::endl; } void printme(Bar && bar) { std::cout << "printme: r-value reference bar" << std::endl; } void printme2(Bar const & bar) { std::cout << "printme2: constant