BSHA3
0.17.99
P2P Blockchain, based on Bitcoin
src
utilmemory.h
Go to the documentation of this file.
1
// Copyright (c) 2009-2010 Satoshi Nakamoto
2
// Copyright (c) 2009-2018 The Bitcoin Core developers
3
// Distributed under the MIT software license, see the accompanying
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6
#ifndef BITCOIN_UTILMEMORY_H
7
#define BITCOIN_UTILMEMORY_H
8
9
#include <memory>
10
#include <utility>
11
13
template
<
typename
T,
typename
... Args>
14
std::unique_ptr<T>
MakeUnique
(Args&&... args)
15
{
16
return
std::unique_ptr<T>(
new
T(std::forward<Args>(args)...));
17
}
18
19
#endif
MakeUnique
std::unique_ptr< T > MakeUnique(Args &&... args)
Substitute for C++14 std::make_unique.
Definition:
utilmemory.h:14
Generated on Wed Nov 28 2018 15:30:30 for BSHA3 by
1.8.14