| 6704 | }; |
| 6705 | template <typename Fun> |
| 6706 | struct model : public callable { |
| 6707 | model(Fun&& fun) : fun(std::move(fun)) {} |
| 6708 | model(Fun const& fun) : fun(fun) {} |
| 6709 | |
| 6710 | model<Fun>* clone() const override { return new model<Fun>(*this); } |
| 6711 | |
| 6712 | void call(Chronometer meter) const override { |
| 6713 | call(meter, is_callable<Fun(Chronometer)>()); |
| 6714 | } |
| 6715 | void call(Chronometer meter, std::true_type) const { |
| 6716 | fun(meter); |
| 6717 | } |
| 6718 | void call(Chronometer meter, std::false_type) const { |
| 6719 | meter.measure(fun); |
| 6720 | } |
| 6721 | |
| 6722 | Fun fun; |
| 6723 | }; |
| 6724 | |
| 6725 | struct do_nothing { void operator()() const {} }; |
| 6726 |
no outgoing calls
no test coverage detected