title: Map C++ member function to C callback
body: <p>In a C++ project I am using a C library to access some hardware. The C-Bindings include callbacks to notify about changes on some input pins.
  The function for the callback looks like this:
  <code>void callback(char port, uint8_t interrupt_mask, uint8_t value_mask, void *user_data)</code></p>
  
  <p>In my implementation I have a <code>SensorController</code> class which has a member function that should receive the callback. The member function looks like this <code>void SensorController::pinChanged(char port, uint8_t interrupt_mask, uint8_t value_mask, void *user_data)</code>.</p>
  
  <p>Now I was wondering, what would be the cleanest way to avoid making the <code>pinChanged</code> function static to be able to assign the function to the callback?</p>