prog.cpp: In instantiation of ‘position<T> position<T>::operator*(const position<T>&) const [with T = double]’:
prog.cpp:98:10: required from here
prog.cpp:46:70: error: no matching function for call to ‘position<double>::perform_arithmetic_operator(const position<double>&, const position<double>&, std::multiplies<double>) const’
return perform_arithmetic_operator(*this, rhs, std::multiplies<T>());
^
prog.cpp:46:70: note: candidate is:
prog.cpp:83:18: note: static position<T> position<T>::perform_arithmetic_operator(position<T>, const position<T>&, A&) [with A = std::multiplies<double>; T = double]
static position perform_arithmetic_operator(position lhs, const position &rhs, A &arithmetic)
^
prog.cpp:83:18: note: no known conversion for argument 3 from ‘std::multiplies<double>’ to ‘std::multiplies<double>&’
prog.cpp: In instantiation of ‘position<T> position<T>::operator-(const position<T>&) const [with T = double]’:
prog.cpp:98:15: required from here
prog.cpp:37:65: error: no matching function for call to ‘position<double>::perform_arithmetic_operator(const position<double>&, const position<double>&, std::minus<double>) const’
return perform_arithmetic_operator(*this, rhs, std::minus<T>());
^
prog.cpp:37:65: note: candidate is:
prog.cpp:83:18: note: static position<T> position<T>::perform_arithmetic_operator(position<T>, const position<T>&, A&) [with A = std::minus<double>; T = double]
static position perform_arithmetic_operator(position lhs, const position &rhs, A &arithmetic)
^
prog.cpp:83:18: note: no known conversion for argument 3 from ‘std::minus<double>’ to ‘std::minus<double>&’
prog.cpp: In instantiation of ‘position<T> position<T>::operator+(const position<T>&) const [with T = double]’:
prog.cpp:98:19: required from here
prog.cpp:28:64: error: no matching function for call to ‘position<double>::perform_arithmetic_operator(const position<double>&, const position<double>&, std::plus<double>) const’
return perform_arithmetic_operator(*this, rhs, std::plus<T>());
^
prog.cpp:28:64: note: candidate is:
prog.cpp:83:18: note: static position<T> position<T>::perform_arithmetic_operator(position<T>, const position<T>&, A&) [with A = std::plus<double>; T = double]
static position perform_arithmetic_operator(position lhs, const position &rhs, A &arithmetic)
^
prog.cpp:83:18: note: no known conversion for argument 3 from ‘std::plus<double>’ to ‘std::plus<double>&’
prog.cpp: In instantiation of ‘position<T> position<T>::operator/(const position<T>&) const [with T = double]’:
prog.cpp:98:24: required from here
prog.cpp:55:67: error: no matching function for call to ‘position<double>::perform_arithmetic_operator(const position<double>&, const position<double>&, std::divides<double>) const’
return perform_arithmetic_operator(*this, rhs, std::divides<T>());
^
prog.cpp:55:67: note: candidate is:
prog.cpp:83:18: note: static position<T> position<T>::perform_arithmetic_operator(position<T>, const position<T>&, A&) [with A = std::divides<double>; T = double]
static position perform_arithmetic_operator(position lhs, const position &rhs, A &arithmetic)
^
prog.cpp:83:18: note: no known conversion for argument 3 from ‘std::divides<double>’ to ‘std::divides<double>&’
prog.cpp: In member function ‘position<T> position<T>::operator*(const position<T>&) const [with T = double]’:
prog.cpp:47:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^
prog.cpp: In member function ‘position<T> position<T>::operator-(const position<T>&) const [with T = double]’:
prog.cpp:38:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^
prog.cpp: In member function ‘position<T> position<T>::operator+(const position<T>&) const [with T = double]’:
prog.cpp:29:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^
prog.cpp: In member function ‘position<T> position<T>::operator/(const position<T>&) const [with T = double]’:
prog.cpp:56:2: warning: control reaches end of non-void function [-Wreturn-type]
}
^