#define _STLP_USE_STATIC_LIB
#define _STLP_USE_OWN_NAMESPACE 1
#define _STLP_DONT_REDEFINE_STD 1
#include <stlport/vector>
#include <stlport/iostream>
#include <stlport/algorithm>
#undef __SGI_STL_PORT
#undef _STLPORT_VERSION
//#include <auto_link_stlport.hpp>
#include <iostream>
#include <algorithm>
#include <vector>
typedef stlport::vector<int> intsp;
typedef std::vector<int> ints;
int main(int argc, char* argv[])
{
intsp ary1;
ints ary2;
for (int i = 0; i < 10; ++i)
{
ary1.push_back(i);
ary2.push_back(i);
}
for (intsp::iterator it = ary1.begin(); it != ary1.end(); ++it)
{
std::cout << *it;
stlport::cout << *it << " ";
}
stlport::cout << stlport::endl;
std::random_shuffle(ary1.begin(), ary1.end());
stlport::random_shuffle(ary2.begin(), ary2.end());
for (int i = 0; i < ary2.size(); ++i)
{
std::cout << ary1[i];
stlport::cout << ary2[i] << " ";
}
std::cout << std::endl;
stlport::sort(ary1.begin(), ary1.end());
//stlport::sort(ary2.begin(), ary2.end()); // error C2665
std::sort(ary2.begin(), ary2.end());
//stlport::stable_sort(ary2.begin(), ary2.end()); // error C2665
for (int i = 0; i < ary2.size(); ++i)
{
std::cout << ary1[i];
stlport::cout << ary2[i] << " ";
}
return 0;
}