Like this:
#include <type_traits>
// Declaration in the .h file
class MyClass
{
public:
template <class T> void function(T&& x) noexcept(std::is_nothrow_constructible<T>::value);
};
// Definition in the .cpp file
template <class T> void MyClass::function(T&& x) noexcept(std::is_nothrow_constructible<T>::value);
But please also see Why can templates only be implemented in the header file?. You (generally) cannot implement a template in the source file.