#include "Test.h"
#include <iostream>
#include <string>
int main()
{
//ок
Test<int> t1(1);
//ок
Test<std::string> t2("2");
//нет определения конструктора, нужно раскомментировать в Test.cpp строку
Test<uint64_t> t3(3);
std::cout << "Hello World!\n";
}
#pragma once
#include <iostream>
template<typename T>
class Test
{
T m_t{};
public:
Test(const T& t);
};
#include "Test.h"
#include <string>
template<typename T>
Test<T>::Test(const T& t)
{
m_t = t;
std::cout << "Test.h set t = " << t << std::endl;
}
template class Test<int>;
template class Test<std::string>;
//template class Test<uint64_t>;