cprover
Loading...
Searching...
No Matches
make_unique.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Really simple unique_ptr utilities
4
5Author: Reuben Thomas, reuben.thomas@diffblue.com
6
7\*******************************************************************/
8
9#ifndef CPROVER_UTIL_MAKE_UNIQUE_H
10#define CPROVER_UTIL_MAKE_UNIQUE_H
11
12#include <memory> // unique_ptr
13
14// This is a stand-in for std::make_unique, which isn't part of the standard
15// library until C++14. When we move to C++14, we should do a find-and-replace
16// on this to use std::make_unique instead.
17
18template<typename T, typename... Ts>
19std::unique_ptr<T> util_make_unique(Ts &&... ts)
20{
21 return std::unique_ptr<T>(new T(std::forward<Ts>(ts)...));
22}
23
24#endif
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:563
std::unique_ptr< T > util_make_unique(Ts &&... ts)
Definition make_unique.h:19