Changeset View
Changeset View
Standalone View
Standalone View
src/util.h
Show First 20 Lines • Show All 252 Lines • ▼ Show 20 Lines | template <typename Callable> void TraceThread(const char *name, Callable func) { | ||||
} catch (...) { | } catch (...) { | ||||
PrintExceptionContinue(nullptr, name); | PrintExceptionContinue(nullptr, name); | ||||
throw; | throw; | ||||
} | } | ||||
} | } | ||||
std::string CopyrightHolders(const std::string &strPrefix); | std::string CopyrightHolders(const std::string &strPrefix); | ||||
//! Substitute for C++14 std::make_unique. | |||||
template <typename T, typename... Args> | |||||
std::unique_ptr<T> MakeUnique(Args &&... args) { | |||||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); | |||||
} | |||||
#endif // BITCOIN_UTIL_H | #endif // BITCOIN_UTIL_H |