First public contribution.
2 // STLport regression testsuite component.
3 // To compile as a separate example, please #define MAIN.
10 #define vec1_test main
13 #if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
16 int vec1_test(int, char**)
19 // cout<<"Sizeof(vector) is "<<sizeof(vector<int>)<<endl;
20 // cout<<"Sizeof(fw) is "<<sizeof(forward_iterator_tag)<<endl;
21 // cout<<"Sizeof(ra) is "<<sizeof(random_access_iterator_tag)<<endl;
22 cout<<"Results of vec1_test:"<<endl;
23 vector<int> v1; // Empty vector of integers.
24 cout << "empty = " << v1.empty() << endl;
25 cout << "size = " << v1.size() << endl;
26 cout << "max_size = " << v1.max_size() << endl;
32 else if(1073741823!=v1.max_size())
35 v1.push_back(42); // Add an integer to the vector.
36 cout << "size = " << v1.size() << endl;
37 cout << "v1[0] = " << v1[0] << endl;