user48730: I'm using the exact piece of code in my ESP8266 library (which works OK ), but when used in a ESP32 library- I got an error:
This is the relevant code snip: 
void myIOT32::_feedTheDog()
{
  _wdtResetCounter++;
  if (_wdtResetCounter >= _wdtMaxRetries)
  {
    sendReset("Dog goes woof");
  }
}
void myIOT32::_startWDT()
{
  wdt.attach(1, std::bind(&myIOT32::_feedTheDog, this)); // Start WatchDog
}

void myIOT32::sendReset(char *header)
{
  char temp[150];

  sprintf(temp, "[%s] - Reset sent", header);

  if (useSerial)
  {
    Serial.println(temp);
  }
  if (strcmp(header, "null") != 0)
  {
    pub_msg(temp);
  }
  delay(1000);
  ESP.restart();
}

and this is the error:
/home/guy/Documents/git/Arduino/libraries/myIOTesp32/myIOTesp32.cpp: In member function 'void myIOT32::_startWDT()':
/home/guy/Documents/git/Arduino/libraries/myIOTesp32/myIOTesp32.cpp:333:55: error: no matching function for call to 'Ticker::attach(int, std::_Bind_helper<false, void (myIOT32::*)(), myIOT32*>::type)'
   wdt.attach(1, std::bind(&myIOT32::_feedTheDog, this)); // Start WatchDog
                                                       ^


user30175: ESP32 ticker attach functions take pure function pointers with at max one argument type -- not a std::function/ std::_Bind_helper that std::bind produces.
See code and types at https://github.com/espressif/arduino-esp32/blob/master/libraries/Ticker/src/Ticker.h#L38. 
For the ESP8266 however, they do use a std::function:
https://github.com/esp8266/Arduino/blob/master/libraries/Ticker/src/Ticker.h#L36
And that's why it works on ESP8266 and not on ESP32 -- either adapt the Ticker library or rework your own code to not use member functions of classes.
Edit: You can easily rewrite your code to use a static helper function with one argument (the watchdog object itself) which then just calls the member function of that object. For this to work, the called function must be public. So a rewrite like
static void watchdog_timer_triggered_helper(myIOT32* watchdog) {
   //needs to be public!
   watchdog->_feedTheDog();
}

void myIOT32::_feedTheDog()
{
  _wdtResetCounter++;
  if (_wdtResetCounter >= _wdtMaxRetries)
  {
    sendReset("Dog goes woof");
  }
}
void myIOT32::_startWDT()
{
  wdt.attach(1, &watchdog_timer_triggered_helper, this); // Start WatchDog
}

void myIOT32::sendReset(char *header)
{
  char temp[150];

  sprintf(temp, "[%s] - Reset sent", header);

  if (useSerial)
  {
    Serial.println(temp);
  }
  if (strcmp(header, "null") != 0)
  {
    pub_msg(temp);
  }
  delay(1000);
  ESP.restart();
}

Since both the ESP32 and ESP8266 versions implement the 
    template<typename TArg>
    void attach(float seconds, void (*callback)(TArg), TArg arg)

templated function this should work on both platforms now.

48730: <p>I'm using the exact piece of code in my ESP8266 library (which works OK ), but when used in a ESP32 library- I got an error:</p>

<p>This is the relevant code snip: </p>

<pre><code>void myIOT32::_feedTheDog()
{
  _wdtResetCounter++;
  if (_wdtResetCounter &gt;= _wdtMaxRetries)
  {
    sendReset("Dog goes woof");
  }
}
void myIOT32::_startWDT()
{
  wdt.attach(1, std::bind(&amp;myIOT32::_feedTheDog, this)); // Start WatchDog
}

void myIOT32::sendReset(char *header)
{
  char temp[150];

  sprintf(temp, "[%s] - Reset sent", header);

  if (useSerial)
  {
    Serial.println(temp);
  }
  if (strcmp(header, "null") != 0)
  {
    pub_msg(temp);
  }
  delay(1000);
  ESP.restart();
}
</code></pre>

<p>and this is the error:</p>

<pre><code>/home/guy/Documents/git/Arduino/libraries/myIOTesp32/myIOTesp32.cpp: In member function 'void myIOT32::_startWDT()':
/home/guy/Documents/git/Arduino/libraries/myIOTesp32/myIOTesp32.cpp:333:55: error: no matching function for call to 'Ticker::attach(int, std::_Bind_helper&lt;false, void (myIOT32::*)(), myIOT32*&gt;::type)'
   wdt.attach(1, std::bind(&amp;myIOT32::_feedTheDog, this)); // Start WatchDog
                                                       ^
</code></pre>
 30175: <p>ESP32 ticker attach functions take pure function pointers with at max one argument type -- not a <code>std::function</code>/ <code>std::_Bind_helper</code> that <code>std::bind</code> produces.</p>

<p>See code and types at <a href="https://github.com/espressif/arduino-esp32/blob/master/libraries/Ticker/src/Ticker.h#L38" rel="nofollow noreferrer">https://github.com/espressif/arduino-esp32/blob/master/libraries/Ticker/src/Ticker.h#L38</a>. </p>

<p>For the ESP8266 however, they do use a <code>std::function</code>:</p>

<p><a href="https://github.com/esp8266/Arduino/blob/master/libraries/Ticker/src/Ticker.h#L36" rel="nofollow noreferrer">https://github.com/esp8266/Arduino/blob/master/libraries/Ticker/src/Ticker.h#L36</a></p>

<p>And that's why it works on ESP8266 and not on ESP32 -- either adapt the <code>Ticker</code> library or rework your own code to not use member functions of classes.</p>

<p>Edit: You can easily rewrite your code to use a static helper function with one argument (the watchdog object itself) which then just calls the member function of that object. For this to work, the <strong>called function must be public</strong>. So a rewrite like</p>

<pre class="lang-cpp prettyprint-override"><code>static void watchdog_timer_triggered_helper(myIOT32* watchdog) {
   //needs to be public!
   watchdog-&gt;_feedTheDog();
}

void myIOT32::_feedTheDog()
{
  _wdtResetCounter++;
  if (_wdtResetCounter &gt;= _wdtMaxRetries)
  {
    sendReset("Dog goes woof");
  }
}
void myIOT32::_startWDT()
{
  wdt.attach(1, &amp;watchdog_timer_triggered_helper, this); // Start WatchDog
}

void myIOT32::sendReset(char *header)
{
  char temp[150];

  sprintf(temp, "[%s] - Reset sent", header);

  if (useSerial)
  {
    Serial.println(temp);
  }
  if (strcmp(header, "null") != 0)
  {
    pub_msg(temp);
  }
  delay(1000);
  ESP.restart();
}
</code></pre>

<p>Since both the ESP32 and ESP8266 versions implement the </p>

<pre class="lang-cpp prettyprint-override"><code>    template&lt;typename TArg&gt;
    void attach(float seconds, void (*callback)(TArg), TArg arg)
</code></pre>

<p>templated function this should work on both platforms now.</p>
