DUNE PDELab (2.8)

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
4#ifndef DUNE_TO_UNIQUE_PTR_HH
5#define DUNE_TO_UNIQUE_PTR_HH
6
7#warning to_unique_ptr.hh and ToUniquePtr are deprecated. Use std::unique_ptr or std::shared_ptr instead.
8
9#include <memory>
10
11namespace Dune
12{
15 template <class T>
16 using ToUniquePtr [[deprecated]] = std::unique_ptr<T>;
17
20 template <class T, class... Args>
21 [[deprecated]] std::unique_ptr<T> makeToUnique (Args&&... args)
22 {
23 return std::make_unique(std::forward<Args>(args)...);
24 }
25
26} // end namespace Dune
27
28#endif // DUNE_TO_UNIQUE_PTR_HH
Dune namespace.
Definition: alignedallocator.hh:11
std::unique_ptr< T > makeToUnique(Args &&... args)
Alias for std::make_unique introduced as transition wrapper.
Definition: to_unique_ptr.hh:21
std::unique_ptr< T > ToUniquePtr
Alias for std::unique_ptr introduced as transition wrapper.
Definition: to_unique_ptr.hh:16
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Aug 31, 22:30, 2024)