aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/util/rust-make-unique.h
blob: 4698b7d966faa684f693664c8524418fd793e9ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef RUST_MAKE_UNIQUE_H
#define RUST_MAKE_UNIQUE_H

#include <memory>

namespace Rust {

template <typename T, typename... Ts>
std::unique_ptr<T>
make_unique (Ts &&... params)
{
  return std::unique_ptr<T> (new T (std::forward<Ts> (params)...));
}

} // namespace Rust

#endif // RUST_MAKE_UNIQUE_H