| 21 | |
| 22 | #if not defined(__clang__) and not defined(_MSC_VER) |
| 23 | struct calc { |
| 24 | static inline ut::suite sum_suite = []<class T = calc>() -> void { |
| 25 | using namespace ut; |
| 26 | |
| 27 | "sum"_test = [] { |
| 28 | T calc{}; |
| 29 | expect(6_i == calc.sum(1, 2, 3)); |
| 30 | }; |
| 31 | }; |
| 32 | |
| 33 | template <class... TArgs> |
| 34 | constexpr auto sum(TArgs... args) -> int { |
| 35 | return (args + ...); |
| 36 | } |
| 37 | }; |
| 38 | #endif |
| 39 | |
| 40 | int main() {} |