Advertisement
tinyevil

Untitled

Feb 20th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. //CORRECT
  2.  
  3. template <int N>
  4. struct ev{
  5. };
  6.  
  7. static ev<0> ev_0;
  8.  
  9. template<int N>
  10. static ev<N + 2> ev_SS(ev<N>);
  11.  
  12.  
  13.  
  14. //VS WRONG
  15. template <int N>
  16. struct ev{
  17. static ev<0> ev_0;
  18.  
  19. template<int M>
  20. static ev<M + 2> ev_SS(ev<M>); //fails coz Coq enforces ev<N> return type here
  21. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement