1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef INCLUDED_O3TL_MAKE_UNIQUE_HXX
11 #define INCLUDED_O3TL_MAKE_UNIQUE_HXX
20 * Constructs an object of type T and wraps it in a std::unique_ptr.
22 * Can be replaced by std::make_unique when we allow C++14.
24 template<typename T
, typename
... Args
>
25 typename
std::unique_ptr
<T
> make_unique(Args
&& ... args
)
27 return std::unique_ptr
<T
>(new T(std::forward
<Args
>(args
)...));
34 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */