C++17 c++;17名称空间和类的可变函数模板

C++17 c++;17名称空间和类的可变函数模板,c++17,C++17,我到底做错了什么 in.h namespace test1{ 模板 无效测试1_测试1(T&…T); }; 在。cpp namespace test1{ template <typename ...T> void test1_test1(T & ...t) { std::cout << "this is test1_test1" << std::endl; } } namespace te

我到底做错了什么

in.h

namespace test1{
模板
无效测试1_测试1(T&…T);
};
在。cpp

namespace test1{
    template <typename ...T>
    void test1_test1(T & ...t) {
        std::cout << "this is test1_test1" << std::endl;
    }
}
namespace test1{
模板
无效测试1_测试1(T&…T){
标准::cout
namespace test1{
    template <typename ...T>
    void test1_test1(T & ...t) {
        std::cout << "this is test1_test1" << std::endl;
    }
}
class testing2 {
public:
    template <typename ...T>
    void test1_test1(T & ...t);
};
template <typename ...T>
void test1_test1(T & ...t) {
    std::cout << "this is test1_test1" << std::endl;
}
Undefined symbols for architecture x86_64:
  "void test1::test1_test1<>()", referenced from:
      _main in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [testing_template] Error 1
make[1]: *** [CMakeFiles/testing_template.dir/all] Error 2
make: *** [all] Error 2