1 2 3 4 5 6 7 8 9 10 11 12 13 14
struct Type1 {}; struct Type2 {}; class MyClass { public: Type1 RunAlgo(); private: Type2 Run(); }; Type1 MyClass::RunAlgo() { //additional code return Run(); }
1 2 3
t.cpp: In member function 'Type1 MyClass::RunAlgo()': Line 13: error: conversion from 'Type2' to non-scalar type 'Type1' requested compilation terminated due to -Wfatal-errors.