#include <iostream>
using namespace std;
#include "iter_practice.hpp"
#include <vector>
#include <tuple>
int test_fr(const iter_practice& ip)
{
return ip.nums[2];
}
int&& test(int &a)
{
//int a = 10;
return std::move(a);
}
int main()
{
std::pair<int, float> p = std::make_pair(10, 3.5f);
std::pair<int, float> p2 = std::make_pair(110, 3.15f);
p.swap(p2);
cout << p.second << endl;
cout << "Hello World!" << endl;
iter_practice ip;
if (ip)
cout << "object is what we need;" << endl;
else
cout << "object is not what we need;" << endl;
ip.sort();
if (ip)
cout << "object is what we need;" << endl;
else
cout << "object is not what we need;" << endl;
for (iter_practice::iter& it = ip.begin(); it != ip.end(); ++it)
cout << *it <<",";
cout << endl;
for (auto& i : ip)
cout << i << ",";
cout << endl;
vector<int> nums {10, 2, 5, 99, 1};
for (auto& n:nums)
cout << n << ",";
cout <<endl;
/**
* @note sss
*/
for (vector<int>::iterator it = nums.begin(); it != nums.end(); it++)
cout << *it.operator->() <<",";
cout << endl;
cout << __cplusplus << endl;
cout << test_fr(ip) << endl;
int a = 0xF9;
cout << test(a) << endl;
cout << ip[3] << endl;
return 0;
}