stlab
2.4.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
Toggle main menu visibility
Loading...
Searching...
No Matches
memory.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2017 Adobe
3
Distributed under the Boost Software License, Version 1.0.
4
(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
*/
6
7
/**************************************************************************************************/
8
9
#ifndef STLAB_MEMORY_HPP
10
#define STLAB_MEMORY_HPP
11
15
16
/**************************************************************************************************/
17
18
#include <memory>
19
#include <stlab/config.hpp>
20
21
/**************************************************************************************************/
22
23
namespace
stlab
{
24
STLAB_VERSION_NAMESPACE_BEGIN()
25
26
30
31
/**************************************************************************************************/
32
33
34
template <typename T>
35
auto
make_weak_ptr
(const std::shared_ptr<T>& x) {
36
return
std::weak_ptr<T>(x);
37
}
38
39
/**************************************************************************************************/
40
42
43
STLAB_VERSION_NAMESPACE_END()
44
}
// namespace stlab
45
46
/**************************************************************************************************/
47
48
#endif
stlab::make_weak_ptr
auto make_weak_ptr(const std::shared_ptr< T > &x)
Returns a std::weak_ptr<T> sharing ownership with x.
Definition
memory.hpp:35
stlab
Definition
reverse.hpp:28
stlab
memory.hpp
Generated by
1.18.0