capydi
Loading...
Searching...
No Matches
DecoratableConfig.hpp
Go to the documentation of this file.
1#ifndef DECORATABLE_CONFIG_HPP_
2#define DECORATABLE_CONFIG_HPP_
3
4namespace capy::di
5{
6
7template<typename Self>
9{
10 template<typename Decorator, typename... Args>
11 auto with(Args&&... args) &&
12 {
13 return Decorator::decorate(
14 std::move(static_cast<Self&>(*this)),
15 std::forward<Args>(args)...
16 );
17 }
18};
19
20template<typename Self>
22{
23 template<typename Decorator, typename... Args>
24 auto with(Args&&... args) &&
25 {
26 return Decorator::decorate_chainable(
27 std::move(static_cast<Self&>(*this)),
28 std::forward<Args>(args)...
29 );
30 }
31};
32
33}
34
35#endif // !DECORATABLE_CONFIG_HPP_
Definition Decorator.hpp:19
Definition DecoratableConfig.hpp:22
auto with(Args &&... args) &&
Definition DecoratableConfig.hpp:24
Definition DecoratableConfig.hpp:9
auto with(Args &&... args) &&
Definition DecoratableConfig.hpp:11
Definition Decorator.hpp:30