fork download
  1. #include <iostream>
  2. #include <type_traits>
  3.  
  4. template<class T>
  5. struct e {
  6.  
  7. };
  8.  
  9. template <int N>
  10. struct e<std::integral_constant<int,N> > {
  11. static const int value = N;
  12. };
  13.  
  14. int main() {
  15. std::cout << e<std::integral_constant<int,5>>::value << std::endl;
  16. }
Success #stdin #stdout 0s 4320KB
stdin
Standard input is empty
stdout
5