aboutsummaryrefslogtreecommitdiff
path: root/src/DI/alloc_functor.tpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/DI/alloc_functor.tpp')
-rw-r--r--src/DI/alloc_functor.tpp34
1 files changed, 24 insertions, 10 deletions
diff --git a/src/DI/alloc_functor.tpp b/src/DI/alloc_functor.tpp
index d3f6946..9611a3d 100644
--- a/src/DI/alloc_functor.tpp
+++ b/src/DI/alloc_functor.tpp
@@ -18,29 +18,41 @@ auto InvokeReturnWrapper<Return>::call(Args &&...args) -> Return
ALLOC_FUNCTOR_TEMPLATE
ALLOC_FUNCTOR::AllocFunctor(Target &&function)
- : _function(std::piecewise_construct, std::forward_as_tuple(std::move(function)),
- std::forward_as_tuple())
+ : _function(
+ std::piecewise_construct,
+ std::forward_as_tuple(std::move(function)),
+ std::forward_as_tuple()
+ )
{
}
ALLOC_FUNCTOR_TEMPLATE
ALLOC_FUNCTOR::AllocFunctor(const Target &function, const Alloc &allocator)
- : _function(std::piecewise_construct, std::forward_as_tuple(function),
- std::forward_as_tuple(allocator))
+ : _function(
+ std::piecewise_construct,
+ std::forward_as_tuple(function),
+ std::forward_as_tuple(allocator)
+ )
{
}
ALLOC_FUNCTOR_TEMPLATE
ALLOC_FUNCTOR::AllocFunctor(const Target &function, Alloc &&allocator)
- : _function(std::piecewise_construct, std::forward_as_tuple(function),
- std::forward_as_tuple(std::move(allocator)))
+ : _function(
+ std::piecewise_construct,
+ std::forward_as_tuple(function),
+ std::forward_as_tuple(std::move(allocator))
+ )
{
}
ALLOC_FUNCTOR_TEMPLATE
ALLOC_FUNCTOR::AllocFunctor(Target &&function, Alloc &&allocator)
- : _function(std::piecewise_construct, std::forward_as_tuple(std::move(function)),
- std::forward_as_tuple(std::move(allocator)))
+ : _function(
+ std::piecewise_construct,
+ std::forward_as_tuple(std::move(function)),
+ std::forward_as_tuple(std::move(allocator))
+ )
{
}
@@ -75,8 +87,10 @@ auto ALLOC_FUNCTOR::clone() const -> AllocFunctor *
using Destructor = AllocDestructor<AllocHelper>;
- auto hold = std::unique_ptr<AllocFunctor, Destructor>(alloc_helper.allocate(1),
- _Dp(alloc_helper, 1));
+ auto hold = std::unique_ptr<AllocFunctor, Destructor>(
+ alloc_helper.allocate(1),
+ _Dp(alloc_helper, 1)
+ );
::new (static_cast<void *>(hold.get()))
AllocFunctor(_function.first(), _Alloc(alloc_helper));