| 12 | namespace te = boost::te; |
| 13 | |
| 14 | struct Addable { |
| 15 | constexpr auto add(int i) { return te::call<int>(add_impl, *this, i); } |
| 16 | constexpr auto add(int a, int b) { |
| 17 | return te::call<int>(add_impl, *this, a, b); |
| 18 | } |
| 19 | |
| 20 | private: |
| 21 | static constexpr auto add_impl = [](auto &self, auto... args) { |
| 22 | return self.add(args...); |
| 23 | }; |
| 24 | }; |
| 25 | |
| 26 | class Calc { |
| 27 | public: |