Specializating a template function that takes a universal reference parameter
- by David Stone
How do I specialize a template function that takes a universal reference parameter?
foo.hpp:
template<typename T>
void foo(T && t) // universal reference parameter
foo.cpp
template<>
void foo<Class>(Class && class) {
// do something complicated
}
Here, Class is no longer a deduced type and thus is…