fork(1) download
  1. #include <iostream>
  2.  
  3. template <typename>
  4. struct B
  5. {
  6. constexpr static int T = 5;
  7. };
  8.  
  9. template <int T>
  10. struct D : B<int>
  11. {
  12. constexpr static int value = T;
  13. };
  14.  
  15. int main()
  16. {
  17. std::cout << D<7>::value << std::endl; // 5, how to get 7 ?
  18. }
  19.  
Success #stdin #stdout 0s 4588KB
stdin
Standard input is empty
stdout
5