Function callback

Synopsis

#include <src/easylogging++.h>

template <typename T, typename TPtr>
static T * callback(const std::string &id, std::unordered_map< std::string, TPtr > *mapT)

Description

No description yet.

Mentioned in

Source

Lines 1553-1560 in src/easylogging++.h.

template <typename T, typename TPtr>
static T* callback(const std::string& id, std::unordered_map<std::string, TPtr>* mapT) {
  typename std::unordered_map<std::string, TPtr>::iterator iter = mapT->find(id);
  if (iter != mapT->end()) {
    return static_cast<T*>(iter->second.get());
  }
  return nullptr;
}





Add Discussion

Log in to comment