@@ -39,96 +39,4 @@ SOFTWARE.
3939 #include "private/delegate_cpp03.h" // IWYU pragma: export
4040#endif
4141
42- namespace etl {
43- // ***************************************************************************
44- template <typename >
45- struct closure ;
46-
47- template <typename R, typename P0>
48- struct closure <R(P0)>
49- {
50- using fct = delegate<R(P0)>;
51-
52- closure (fct const & f, P0 const p0) : _f(f), _p0(p0) {}
53-
54- R operator ()() const { return _f (_p0); }
55-
56- private:
57- fct _f;
58- P0 _p0;
59- };
60-
61- template <typename R, typename P0, typename P1>
62- struct closure <R(P0, P1)>
63- {
64- using fct = delegate<R(P0, P1)>;
65-
66- closure (fct const & f, P0 const p0, P1 const p1) : _f(f), _p0(p0), _p1(p1) {}
67-
68- R operator ()() const { return _f (_p0, _p1); }
69-
70- private:
71- fct _f;
72- P0 _p0;
73- P1 _p1;
74- };
75-
76- template <typename R, typename P0, typename P1, typename P2>
77- struct closure <R(P0, P1, P2)>
78- {
79- using fct = delegate<R(P0, P1, P2)>;
80-
81- closure (fct const & f, P0 const p0, P1 const p1, P2 const p2) : _f(f), _p0(p0), _p1(p1), _p2(p2)
82- {}
83-
84- R operator ()() const { return _f (_p0, _p1, _p2); }
85-
86- private:
87- fct _f;
88- P0 _p0;
89- P1 _p1;
90- P2 _p2;
91- };
92-
93- template <typename R, typename P0, typename P1, typename P2, typename P3>
94- struct closure <R(P0, P1, P2, P3)>
95- {
96- using fct = delegate<R(P0, P1, P2, P3)>;
97-
98- closure (fct const & f, P0 const p0, P1 const p1, P2 const p2, P3 const p3)
99- : _f(f), _p0(p0), _p1(p1), _p2(p2), _p3(p3)
100- {}
101-
102- R operator ()() const { return _f (_p0, _p1, _p2, _p3); }
103-
104- private:
105- fct _f;
106- P0 _p0;
107- P1 _p1;
108- P2 _p2;
109- P3 _p3;
110- };
111-
112- template <typename R, typename P0, typename P1, typename P2, typename P3, typename P4>
113- struct closure <R(P0, P1, P2, P3, P4)>
114- {
115- using fct = delegate<R(P0, P1, P2, P3, P4)>;
116-
117- closure (fct const & f, P0 const p0, P1 const p1, P2 const p2, P3 const p3, P4 const p4)
118- : _f(f), _p0(p0), _p1(p1), _p2(p2), _p3(p3), _p4(p4)
119- {}
120-
121- R operator ()() const { return _f (_p0, _p1, _p2, _p3, _p4); }
122-
123- private:
124- fct _f;
125- P0 _p0;
126- P1 _p1;
127- P2 _p2;
128- P3 _p3;
129- P4 _p4;
130- };
131-
132- }
133-
13442#endif
0 commit comments