standards of using and naming of pointer to function as delegates in C++ -


there questions in mind:

  1. what standard naming pointer functions delegates?
  2. what best way define signature of functions in matter?
  3. what techniques of maintaining safety , stability of code when using pointers?

  1. there no standard such naming, conventions vary project project (or company company). common rules include avoiding leading underscores in such names (reserved standard library)
  2. there no best way "define signature", it's same other functions: choose explicit , clear names both method name , arguments.
  3. the best advise avoid explicit pointers functions, , prefer using std::function , powerful polymorphic function wrapper.

Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -