diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-10-22 00:20:09 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-10-22 13:54:03 +0100 |
| commit | b2e90fe21eb2bffd65d66fb40c02195cabbb3fa3 (patch) | |
| tree | 843ddd3c82fdf4e6830efc3ae7d32139b7313a84 /src/utils.hh | |
| parent | fc4142178f2619a9ba0cac62ce1081590a56ed79 (diff) | |
Refactor highlighters, use an interface with virtual methods
Diffstat (limited to 'src/utils.hh')
| -rw-r--r-- | src/utils.hh | 7 |
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 |
