fork download
  1. #include <iostream>
  2. #include <utility>
  3.  
  4. using namespace std;
  5.  
  6. template <typename T>
  7. struct foo {
  8. typedef pair<T, T> PointType;
  9. PointType point;
  10. };
  11.  
  12. int main() {
  13. foo<int> myFoo;
  14. decltype(myFoo)::PointType myBar;
  15.  
  16. myBar.first = 13;
  17. myBar.second = 42;
  18.  
  19. cout << myBar.first << ' ' << myBar.second << endl;
  20. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
13 42