diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-08-20 13:56:23 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-08-20 13:56:23 -0400 |
commit | 69fc8d805396b889b5e8c1c88e8129d93db77d29 (patch) | |
tree | 6b807bd9332c65b65066e247d4d00fd5e4118d2e /src/util.h | |
parent | 442f1ee071152be04c4184473ddfee5040795b76 (diff) | |
download | libtwittercpp-69fc8d805396b889b5e8c1c88e8129d93db77d29.tar.gz libtwittercpp-69fc8d805396b889b5e8c1c88e8129d93db77d29.tar.bz2 libtwittercpp-69fc8d805396b889b5e8c1c88e8129d93db77d29.zip |
Updated API to use exceptions and make tweet/user objects more helpful
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 */ |