In file included from main.cpp:17:0:
figure.h: In function 'T CreateFigure(std::istringstream&)':
figure.h:71:28: error: expected initializer before '<' token
Triangle shared_ptr<Triangle>(a, b, c);
^
figure.h:76:22: error: expected initializer before '<' token
Circle shared_ptr<Circle>(r);
^
main.cpp: In function 'int main()':
main.cpp:33:37: error: no matching function for call to 'CreateFigure(std::istringstream&)'
figures.push_back(CreateFigure(is));
^
In file included from main.cpp:17:0:
figure.h:57:3: note: candidate: template<class T> T CreateFigure(std::istringstream&)
T CreateFigure(std::istringstream& is) {
^~~~~~~~~~~~
figure.h:57:3: note: template argument deduction/substitution failed:
main.cpp:33:37: note: couldn't deduce template parameter 'T'
figures.push_back(CreateFigure(is));
^
|