Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. /**
  2. #include <cstdio>
  3.  
  4. int main() {
  5. int a[4];
  6. a[0] = 3;
  7. a[1] = 2;
  8. a[2] = 1;
  9. a[3] = 0;
  10.  
  11. printf("%d", a[1 + 2[a]]);
  12. return 0;
  13. }
  14. **/
  15.  
  16. /**
  17. #include <iostream>
  18. using namespace std;
  19. int main()
  20. {
  21. int i, &j = i;
  22. [=]
  23. {
  24. cout << is_same<decltype ((j)), int >::value
  25. << is_same<decltype (((j))), int & >::value
  26. << is_same<decltype ((((j)))), int const& >::value
  27. << is_same<decltype (((((j))))), int && >::value
  28. << is_same<decltype((((((j)))))), int const&& >::value;
  29. }();
  30. }
  31. **/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement