prog.cpp: In instantiation of 'T* Factory<T>::create() [with T = Pair]':
prog.cpp:47:1: required from here
prog.cpp:16:25: error: no matching function for call to 'Pair::Pair(int&)'
return new T(num);
^
prog.cpp:29:5: note: candidate: Pair::Pair(int, int)
Pair(int num1, int num2) : num1(num1), num2(num2) {}
^
prog.cpp:29:5: note: candidate expects 2 arguments, 1 provided
prog.cpp:26:7: note: candidate: constexpr Pair::Pair(const Pair&)
class Pair {
^
prog.cpp:26:7: note: no known conversion for argument 1 from 'int' to 'const Pair&'
prog.cpp:26:7: note: candidate: constexpr Pair::Pair(Pair&&)
prog.cpp:26:7: note: no known conversion for argument 1 from 'int' to 'Pair&&'