Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Houman Mirzaalian Dastjerdi
waLBerla
Commits
1e3f9d83
Commit
1e3f9d83
authored
Jun 04, 2018
by
Michael Kuron
Browse files
Use perfect forwarding in MakeBlockDataInitFunction
parent
aff8c9ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/domain_decomposition/MakeBlockDataInitFunction.h
View file @
1e3f9d83
...
...
@@ -34,19 +34,19 @@ namespace domain_decomposition {
/// \cond internal
namespace
internal
{
template
<
class
T
,
class
...
P
>
T
*
newFunc
(
const
IBlock
*
const
,
const
P
&
...
p
)
{
return
new
T
(
p
...);
template
<
class
T
,
typename
...
Args
>
T
*
newFunc
(
const
IBlock
*
const
,
Args
&
...
args
)
{
return
new
T
(
args
...);
}
}
// namespace internal
/// \endcond
template
<
class
T
,
class
...
P
>
template
<
class
T
,
typename
...
Args
>
std
::
function
<
T
*
(
const
IBlock
*
const
block
)
>
makeBlockDataInitFunction
(
const
P
&
...
p
)
{
return
std
::
bind
(
internal
::
newFunc
<
T
,
P
...
>
,
std
::
placeholders
::
_1
,
p
...
);
makeBlockDataInitFunction
(
Args
&&
...
args
)
{
return
std
::
bind
(
internal
::
newFunc
<
T
,
Args
...
>
,
std
::
placeholders
::
_1
,
std
::
forward
<
Args
>
(
args
)
...
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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