UniSet  2.8.0
unisetstd.h
1 /*
2  * Copyright (c) 2015 Pavel Vainerman.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as
6  * published by the Free Software Foundation, version 2.1.
7  *
8  * This program is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Lesser General Lesser Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 // --------------------------------------------------------------------------
21 // --------------------------------------------------------------------------
22 #ifndef UniSetCPP_H_
23 #define UniSetCPP_H_
24 // --------------------------------------------------------------------------
25 #include <memory>
26 #include <utility>
27 
28 namespace unisetstd
29 {
30 
31  template<typename T, typename ...Args>
32  std::unique_ptr<T> make_unique( Args&& ...args )
33  {
34  return std::unique_ptr<T>( new T( std::forward<Args>(args)... ) );
35  }
36  // --------------------------------------------------------------------------
37 } // end of namespace unisetstd
38 // --------------------------------------------------------------------------
39 #endif