Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
f81be4b4
Commit
f81be4b4
authored
Jan 25, 2016
by
Quentin Khan
Browse files
Add simple c++14 make_unique replacement when compiling with c++11
parent
2f2aa5a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Src/Utils/make_unique.hpp
0 → 100644
View file @
f81be4b4
#if __cplusplus < 201402L
#ifndef _SCALFMM_MAKE_UNIQUE_HPP_
#define _SCALFMM_MAKE_UNIQUE_HPP_
#include
<utility>
#include
<memory>
namespace
std
{
template
<
class
T
,
class
...
Args
>
std
::
unique_ptr
<
T
>
make_unique
(
Args
&&
...
args
)
{
return
std
::
unique_ptr
<
T
>
(
new
T
(
std
::
forward
<
Args
>
(
args
)...));
}
}
#endif
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment