diff options
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 6 |
1 files changed, 6 insertions, 0 deletions
| diff --git a/src/util.h b/src/util.h index e1c9370..2f4b9a3 100644 --- a/src/util.h +++ b/src/util.h | |||
| @@ -24,6 +24,12 @@ namespace twitter { | |||
| 24 | return result.str(); | 24 | return result.str(); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | template<typename T, typename... Args> | ||
| 28 | std::unique_ptr<T> make_unique(Args&&... args) | ||
| 29 | { | ||
| 30 | return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); | ||
| 31 | } | ||
| 32 | |||
| 27 | }; | 33 | }; |
| 28 | 34 | ||
| 29 | #endif /* end of include guard: UTIL_H_440DEAA0 */ | 35 | #endif /* end of include guard: UTIL_H_440DEAA0 */ |
