xxtelebot  1.4.1.0
A simple Telegram Bot implementation in C++
make_ptr.h
1 #ifndef TGBOT_UTILS_MAKE_PTR_H
2 #define TGBOT_UTILS_MAKE_PTR_H
3 
4 #include <utility>
5 #include "../types.h"
6 
7 namespace tgbot {
8  namespace utils {
9 
17  template<typename PtrType, typename... TypeArgs>
18  inline types::Ptr<PtrType> makePtr(TypeArgs &&... args_fwd) {
19  return types::Ptr<PtrType>(new PtrType(std::forward<TypeArgs>(args_fwd)...));
20  }
21 
22  } // namespace utils
23 
24 } // namespace tgbot
25 
26 #endif // TGBOT_UTILS_MAKE_PTR_H
Main tgbot namespace.
Definition: bot.h:13
types::Ptr< PtrType > makePtr(TypeArgs &&...args_fwd)
Make a new tgbot::types::Ptr.
Definition: make_ptr.h:18