Dune Core Modules (2.9.1)

to_unique_ptr.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5
6#ifndef DUNE_TO_UNIQUE_PTR_HH
7#define DUNE_TO_UNIQUE_PTR_HH
8
9#warning to_unique_ptr.hh and ToUniquePtr are deprecated. Use std::unique_ptr or std::shared_ptr instead.
10
11#include <memory>
12
13namespace Dune
14{
17 template <class T>
18 using ToUniquePtr [[deprecated]] = std::unique_ptr<T>;
19
22 template <class T, class... Args>
23 [[deprecated]] std::unique_ptr<T> makeToUnique (Args&&... args)
24 {
25 return std::make_unique(std::forward<Args>(args)...);
26 }
27
28} // end namespace Dune
29
30#endif // DUNE_TO_UNIQUE_PTR_HH
Dune namespace.
Definition: alignedallocator.hh:13
std::unique_ptr< T > makeToUnique(Args &&... args)
Alias for std::make_unique introduced as transition wrapper.
Definition: to_unique_ptr.hh:23
std::unique_ptr< T > ToUniquePtr
Alias for std::unique_ptr introduced as transition wrapper.
Definition: to_unique_ptr.hh:18
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)