1

I have the following things defined in a class called Layer in my layer.h file:

class Layer {
public:
    Layer(const std::string& name = "Layer");
    void OnEvent(const Event& e);
    std::function<void(const Event&)> m_Callback;

In the constructor I want to do this:

m_Callback = OnEvent;

However I get the error message "no operator "=" matches these operands". Does anyone know why I get this error and how to solve it? Thank you.

JFMR
  • 23,265
  • 4
  • 52
  • 76
Nicky
  • 121
  • 1
  • 7

0 Answers0