]> WPIA git - cassiopeia.git/blobdiff - src/util.h
fix: catch another exception
[cassiopeia.git] / src / util.h
index 04448d402d6ccfb6bd87b721d11c9962931e0ecc..976c148ba32d9795f7bdfce4bef0de4455eae302 100644 (file)
@@ -13,4 +13,15 @@ std::pair<bool, std::time_t> parseDate( const std::string& date );
 std::pair<bool, std::time_t> parseMonthInterval( std::time_t t, const std::string& date );
 std::pair<bool, std::time_t> parseYearInterval( std::time_t t, const std::string& date );
 
-std::shared_ptr<std::ofstream> openLogfile( const std::string name );
+std::unique_ptr<std::ofstream> openLogfile( const std::string &name );
+
+#if __GNUC__ < 5
+namespace std{
+template<typename T, typename... Args>
+std::unique_ptr<T> make_unique( Args&&... args ) {
+    return std::unique_ptr<T>( new T( std::forward<Args>(args)... ));
+}
+}
+#endif
+
+std::string timestamp();