summaryrefslogtreecommitdiff
path: root/src/utils.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-10-22 00:20:09 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-10-22 13:54:03 +0100
commitb2e90fe21eb2bffd65d66fb40c02195cabbb3fa3 (patch)
tree843ddd3c82fdf4e6830efc3ae7d32139b7313a84 /src/utils.hh
parentfc4142178f2619a9ba0cac62ce1081590a56ed79 (diff)
Refactor highlighters, use an interface with virtual methods
Diffstat (limited to 'src/utils.hh')
-rw-r--r--src/utils.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utils.hh b/src/utils.hh
index e999f405..354c2fc3 100644
--- a/src/utils.hh
+++ b/src/utils.hh
@@ -11,6 +11,13 @@
namespace Kakoune
{
+
+template<typename T, typename... Args>
+std::unique_ptr<T> make_unique(Args&&... args)
+{
+ return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
+}
+
// *** Singleton ***
//
// Singleton helper class, every singleton type T should inherit