fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template <int a, int b> struct sum_mod256 {
  5. enum{ value = (a+b) % 256 };
  6. };
  7.  
  8. int main() {
  9. std::cout << sum_mod256<sum_mod256<1, 2>::value, 3>::value << std::endl;
  10. return 0;
  11. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
6