| 391 | }; |
| 392 | |
| 393 | class Calc { |
| 394 | public: |
| 395 | constexpr explicit Calc(const int i = {}) : i_{i} {} |
| 396 | |
| 397 | constexpr auto add(int i) { return i + i_; } |
| 398 | constexpr auto add(int a, int b) { return (a + b) + i_; } |
| 399 | |
| 400 | private: |
| 401 | int i_{}; |
| 402 | }; |
| 403 | |
| 404 | test should_support_overloads = [] { |
| 405 | te::poly<Addable> addable{Calc{2}}; |
nothing calls this directly
no outgoing calls
no test coverage detected