summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGabor Kelemen <kelemen.gabor2@nisz.hu>2019-02-23 12:23:34 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-25 17:24:20 +0100
commit97d68765d24c1a9e0715063b4f9c65585281a869 (patch)
tree90cbc7fe9b429a2b8cb25c9b1f74c0ace4245ed0 /include
parent6cf3f1fe4b77347f7b327f28e03941a95b9536b3 (diff)
Drop include/o3tl/make_unique.hxx
In favor of std::make_unique Change-Id: I0428076a10fb7b61c5add994c9970661b375b82c Reviewed-on: https://gerrit.libreoffice.org/68254 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/o3tl/make_unique.hxx51
1 files changed, 0 insertions, 51 deletions
diff --git a/include/o3tl/make_unique.hxx b/include/o3tl/make_unique.hxx
deleted file mode 100644
index 555e9ca538b8..000000000000
--- a/include/o3tl/make_unique.hxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_O3TL_MAKE_UNIQUE_HXX
-#define INCLUDED_O3TL_MAKE_UNIQUE_HXX
-
-#include <memory>
-#include <utility>
-#include <type_traits>
-
-namespace o3tl
-{
-
-/**
- * Constructs an object of type T and wraps it in a std::unique_ptr.
- *
- * Can be replaced by std::make_unique when we allow C++14.
- */
-template<typename T, typename... Args>
-typename std::enable_if<!std::is_array<T>::value, std::unique_ptr<T>>::type
-make_unique(Args&& ... args)
-{
- return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
-}
-
-/**
- * for arrays
- */
-template <class T>
-typename std::enable_if
-<
- std::is_array<T>::value,
- std::unique_ptr<T>
->::type
-make_unique(std::size_t n)
-{
- typedef typename std::remove_extent<T>::type RT;
- return std::unique_ptr<T>(new RT[n]);
-}
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */