struct mat4 {}; struct Base { void operator*(float) {} }; struct Derived : Base { void operator*(mat4) {} }; int main() { Derived d; mat4 m; d * m; d * 4.2f; return 0; }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:16:9: error: no match for ‘operator*’ in ‘d * 4.19999981e+0f’ prog.cpp:16:9: note: candidate is: prog.cpp:8:10: note: void Derived::operator*(mat4) prog.cpp:8:10: note: no known conversion for argument 1 from ‘float’ to ‘mat4’
Standard output is empty