#include <algorithm>
#include "bench.hpp"
#include "cpp-stack.hpp"
#include "cpp-pair.hpp"

int main(int argc, char** argv) {
	int maxi = 0, vali = 42;
	stack<int> si, ti;
	
	REPEAT_TIMED( "push_int", N, si.push( vali ); )
	TIMED( "copy_int", ti = si; )
	TIMED( "clear_int", si.clear(); )
	REPEAT_TIMED( "pop_int", N, maxi = std::max( maxi, ti.pop() ); )

	pair<short, char> maxp = { 0, '\0' }, valp = { 42, 'a' };
	stack<pair<short, char>> sp, tp;
	
	REPEAT_TIMED( "push_pair", N, sp.push( valp ); )
	TIMED( "copy_pair", tp = sp; )
	TIMED( "clear_pair", sp.clear(); )
	REPEAT_TIMED( "pop_pair", N, maxp = std::max( maxp, tp.pop() ); )
}
