Files

20 lines
310 B
C++
Raw Permalink Normal View History

2026-09-07 15:16:52 -04:00
#include "numbers.hpp"
template <Addable T>
T twice(T value) {
return value + value;
}
// This branch syntax requires C++23.
constexpr int evaluation_mode() {
if consteval {
return 1;
} else {
return 2;
}
}
int main() {
return increment(twice(20)) + evaluation_mode();
}