// tuple TR1 header
#pragma once
#ifndef _TUPLE_
#define _TUPLE_
#ifndef RC_INVOKED
#include <type_traits>
#include <xutility>
#include <new>

 #pragma pack(push,_CRT_PACKING)
 #pragma warning(push,3)
 #pragma push_macro("new")
 #undef new

 #pragma warning(disable: 4100 4521 4522)

_STD_BEGIN
	// STRUCT _Tuple_enable
template<class _Src,
	class _Dest>
	struct _Tuple_enable
	{	// default has no type definition
	};

template<>
	struct _Tuple_enable<tuple<>, tuple<> >
	{	// empty tuples match
	typedef void ** type;
	};

template<class _Src0,
	class... _Types1,
	class _Dest0,
	class... _Types2>
	struct _Tuple_enable<tuple<_Src0, _Types1...>,
		tuple<_Dest0, _Types2...> >
	: _If<is_convertible<_Src0, _Dest0>::value,
		_Tuple_enable<tuple<_Types1...>, tuple<_Types2...> >,
		_Tuple_enable<int, int>
	>::type
	{	// tests if all tuple element pairs are implicitly convertible
	};


	// CLASS _Ignore
class _Ignore
	{	// class that ignores assignments
public:
	_Ignore()
		{	// construct
		}

	template<class _Ty>
		void operator=(const _Ty&) const
		{	// do nothing
		}
	};

const _Ignore ignore;

		// STRUCT _Tuple_alloc_t
struct _Tuple_alloc_t
	{	// tag type to disambiguate added allocator argument
	};

const _Tuple_alloc_t _Tuple_alloc = _Tuple_alloc_t();

	// TEMPLATE CLASS _Tuple_val
template<class _Ty>
	struct _Tuple_val
	{	// stores each value in a tuple
	_Tuple_val()
		: _Val()
		{	// default construct
		}

	template<class _Other>
		_Tuple_val(_Other&& _Arg)
		: _Val(_STD forward<_Other>(_Arg))
		{	// construct with argument
		}

	template<class _Other>
		_Tuple_val& operator=(_Other&& _Right)
		{	// assign
		_Val = _STD forward<_Other>(_Right);
		return (*this);
		}

	template<class _Alloc,
		class... _Other>
		_Tuple_val(const _Alloc&,
			typename enable_if<!uses_allocator<_Ty, _Alloc>::value,
				_Tuple_alloc_t>::type, _Other&&... _Arg)
		: _Val(_STD forward<_Other>(_Arg)...)
		{	// construct with optional arguments, no allocator
		}

	template<class _Alloc,
		class... _Other>
		_Tuple_val(const _Alloc& _Al,
			typename enable_if<uses_allocator<_Ty, _Alloc>::value
				&& is_constructible<_Ty,
					allocator_arg_t, _Alloc>::value,
				_Tuple_alloc_t>::type, _Other&&... _Arg)
		: _Val(allocator_arg, _Al, _STD forward<_Other>(_Arg)...)
		{	// construct with optional arguments, leading allocator
		}

	template<class _Alloc,
		class... _Other>
		_Tuple_val(const _Alloc& _Al,
			typename enable_if<uses_allocator<_Ty, _Alloc>::value
				&& !is_constructible<_Ty,
					allocator_arg_t, _Alloc>::value,
				_Tuple_alloc_t>::type, _Other&&... _Arg)
		: _Val(_STD forward<_Other>(_Arg)..., _Al)
		{	// construct with optional arguments, trailing allocator
		}


	_Ty _Val;
	};

	// CLASS tuple
template<class... _Types>
	class tuple;

template<>
	class tuple<>
	{	// empty tuple
public:
	typedef tuple<> _Myt;

	tuple()
		{	// default construct
		}

	template<class _Alloc>
		tuple(allocator_arg_t, const _Alloc&) _NOEXCEPT
		{	// default construct, allocator
		}

	tuple(const tuple&) _NOEXCEPT
		{	// copy construct
		}

	template<class _Alloc>
		tuple(allocator_arg_t, const _Alloc&, const tuple&) _NOEXCEPT
		{	// copy construct, allocator
		}

	void swap(_Myt&) _NOEXCEPT
		{	// swap elements
		}

	bool _Equals(const _Myt&) const _NOEXCEPT
		{	// test if *this == _Right
		return (true);
		}

	bool _Less(const _Myt&) const _NOEXCEPT
		{	// test if *this < _Right
		return (false);
		}
	};

template<class _This,
	class... _Rest>
	class tuple<_This, _Rest...>
		: private tuple<_Rest...>
	{	// recursive tuple definition
public:
	typedef _This _This_type;
	typedef tuple<_This, _Rest...> _Myt;
	typedef tuple<_Rest...> _Mybase;
	static const size_t _Mysize = 1 + sizeof...(_Rest);

	tuple()
		: _Mybase(),
			_Myfirst()
		{	// construct default
		}

	template<class... _Rest2>
		explicit tuple(_Tuple_alloc_t, _Rest2&&... _Rest_arg)
			: _Mybase(_STD forward<_Rest2>(_Rest_arg)...),
				_Myfirst(allocator_arg)
		{	// construct smuggled allocator_arg_t element
		}

	template<class... _Other,
		class = typename _Tuple_enable<
			tuple<const _Other&...>, _Myt>::type>
		tuple(const tuple<_Other...>& _Right)
		: _Mybase(_Right._Get_rest()), _Myfirst(_Right._Myfirst._Val)
		{	// construct by copying same size tuple
		}

	template<class _Alloc,
		class... _Other,
		class = typename _Tuple_enable<
			tuple<const _Other&...>, _Myt>::type>
		tuple(allocator_arg_t, const _Alloc& _Al,
			const tuple<_Other...>& _Right)
		: _Mybase(allocator_arg, _Al, _Right._Get_rest()),
			_Myfirst(_Al, _Tuple_alloc,
				_Right._Myfirst._Val)
		{	// construct by copying same size tuple, allocator
		}

	explicit tuple(const _This& _This_arg, const _Rest&... _Rest_arg)
		: _Mybase(_Rest_arg...),
			_Myfirst(_This_arg)
		{	// construct from one or more copied elements
		}

	template<class _Alloc>
		tuple(allocator_arg_t, const _Alloc& _Al,
			const _This& _This_arg, const _Rest&... _Rest_arg)
		: _Mybase(allocator_arg, _Al, _Rest_arg...),
			_Myfirst(_Al, _Tuple_alloc, _This_arg)
		{	// construct from one or more copied elements, allocator
		}

	template<class _This2,
		class... _Rest2,
		class = typename _Tuple_enable<
			tuple<_This2, _Rest2...>, _Myt>::type>
		explicit tuple(_This2&& _This_arg, _Rest2&&... _Rest_arg)
		: _Mybase(_STD forward<_Rest2>(_Rest_arg)...),
			_Myfirst(_STD forward<_This2>(_This_arg))
		{	// construct from one or more moved elements
		}

	template<class _Alloc,
		class _This2,
		class... _Rest2,
		class = typename _Tuple_enable<
			tuple<_This2, _Rest2...>, _Myt>::type>
		tuple(allocator_arg_t, const _Alloc& _Al,
			_This2&& _This_arg, _Rest2&&... _Rest_arg)
		: _Mybase(allocator_arg, _Al,
				_STD forward<_Rest2>(_Rest_arg)...),
			_Myfirst(_Al, _Tuple_alloc,
				_STD forward<_This2>(_This_arg))
		{	// construct from one or more moved elements, allocator
		}

	template<class... _Other,
		class = typename _Tuple_enable<
			tuple<_Other...>, _Myt>::type>
		tuple(tuple<_Other...>&& _Right)
		: _Mybase(_STD forward<typename tuple<_Other...>::_Mybase>
			(_Right._Get_rest())),
			_Myfirst(_STD forward<typename tuple<_Other...>::_This_type>
				(_Right._Myfirst._Val))
		{	// construct by moving same size tuple
		}

	template<class _Alloc,
		class... _Other,
		class = typename _Tuple_enable<
			tuple<_Other...>, _Myt>::type>
		tuple(allocator_arg_t, const _Alloc& _Al,
			tuple<_Other...>&& _Right)
		: _Mybase(allocator_arg, _Al,
				_STD forward<typename tuple<_Other...>::_Mybase>
					(_Right._Get_rest())),
			_Myfirst(_Al, _Tuple_alloc,
				_STD forward<typename tuple<_Other...>::_This_type>
					(_Right._Myfirst._Val))
		{	// construct by moving same size tuple, allocator
		}

	template<class... _Other>
		_Myt& operator=(const tuple<_Other...>& _Right)
		{	// assign by copying same size tuple
		_Myfirst._Val = _Right._Myfirst._Val;
		(_Mybase&)*this = _Right._Get_rest();
		return (*this);
		}

	template<class... _Other>
		_Myt& operator=(tuple<_Other...>&& _Right)
		{	// assign by moving same size tuple
		_Myfirst._Val = _STD forward<typename tuple<_Other...>::_This_type>
			(_Right._Myfirst._Val);
		(_Mybase&)*this = _STD forward<typename tuple<_Other...>::_Mybase>
			(_Right._Get_rest());
		return (*this);
		}

	template<class... _Other>
		bool _Equals(const tuple<_Other...>& _Right) const
		{	// test if *this == _Right
		static_assert(_Mysize == sizeof...(_Other),
			"comparing tuple to object with different size");
		return (_Myfirst._Val == _Right._Myfirst._Val
			&& _Mybase::_Equals(_Right._Get_rest()));
		}

	template<class... _Other>
		bool _Less(const tuple<_Other...>& _Right) const
		{	// test if *this < _Right
		static_assert(_Mysize == sizeof...(_Other),
			"comparing tuple to object with different size");
		return (_Myfirst._Val < _Right._Myfirst._Val
			|| (!(_Right._Myfirst._Val < _Myfirst._Val)
				&& _Mybase::_Less(_Right._Get_rest())));
		}

	template<class _Alloc>
		tuple(allocator_arg_t, const _Alloc& _Al)
		: _Mybase(allocator_arg, _Al),
			_Myfirst(_Al, _Tuple_alloc)
		{	// construct default, allocator
		}

	template<class _Alloc>
		tuple(allocator_arg_t, const _Alloc& _Al,
			const _Myt& _Right)
		: _Mybase(allocator_arg, _Al, _Right._Get_rest()),
			_Myfirst(_Al, _Tuple_alloc,
				_Right._Myfirst._Val)
		{	// construct by copying, allocator
		}

	template<class _First,
		class _Second,
		class = typename _Tuple_enable<
			tuple<const _First&, const _Second&>, _Myt>::type>
		tuple(const pair<_First, _Second>& _Right)

		: _Mybase(tuple<_Second>(_Right.second)),
			_Myfirst(_Right.first)
		{	// construct by copying pair
		// no static_assert necessary
		}

	template<class _Alloc,
		class _First,
		class _Second,
		class = typename _Tuple_enable<
			tuple<const _First&, const _Second&>, _Myt>::type>
		tuple(allocator_arg_t, const _Alloc& _Al,
			const pair<_First, _Second>& _Right)

		: _Mybase(allocator_arg, _Al, tuple<_Second>(_Right.second)),
			_Myfirst(_Al, _Tuple_alloc,
				_Right.first)
		{	// construct by copying pair, allocator
		// no static_assert necessary
		}

	_Myt& operator=(const _Myt& _Right)
		{	// assign
		_Myfirst._Val = _Right._Myfirst._Val;
		(_Mybase&)*this = _Right._Get_rest();
		return (*this);
		}

	template<class _First,
		class _Second>
		_Myt& operator=(const pair<_First, _Second>& _Right)
		{	// assign by copying pair
		static_assert(_Mysize == 2,
			"assigning to tuple from object with different size");
		_Myfirst._Val = _Right.first;
		(_Mybase&)*this = tuple<_Second>(_Right.second);
		return (*this);
		}

	template<class _Alloc>
		tuple(allocator_arg_t, const _Alloc& _Al,
			_Myt&& _Right)
		: _Mybase(allocator_arg, _Al,
				_STD forward<_Mybase>(_Right._Get_rest())),
			_Myfirst(_Al, _Tuple_alloc,
				_STD forward<_This>(_Right._Myfirst._Val))
		{	// construct by moving, allocator
		}

	template<class _First,
		class _Second,
		class = typename _Tuple_enable<
			tuple<_First, _Second>, _Myt>::type>
		tuple(pair<_First, _Second>&& _Right)

		: _Mybase(tuple<_Second>(_STD forward<_Second>(_Right.second))),
			_Myfirst(_STD forward<_First>(_Right.first))
		{	// construct by moving pair
		// no static_assert necessary
		}

	template<class _Alloc,
		class _First,
		class _Second,
		class = typename _Tuple_enable<
			tuple<_First, _Second>, _Myt>::type>
		tuple(allocator_arg_t, const _Alloc& _Al,
			pair<_First, _Second>&& _Right)

		: _Mybase(allocator_arg, _Al,
				tuple<_Second>(_STD forward<_Second>(_Right.second))),
			_Myfirst(_Al, _Tuple_alloc,
				_STD forward<_First>(_Right.first))
		{	// construct by moving pair, allocator
		// no static_assert necessary
		}

	_Myt& operator=(_Myt&& _Right)
		_NOEXCEPT_OP(is_nothrow_move_assignable<_This>::value
			&& is_nothrow_move_assignable<_Mybase>::value)
		{	// assign by moving
		_Myfirst = _STD forward<_This>(_Right._Myfirst._Val);
		(_Mybase&)*this = _STD forward<_Mybase>(_Right._Get_rest());
		return (*this);
		}

	template<class _First,
		class _Second>
		_Myt& operator=(pair<_First, _Second>&& _Right)
		_NOEXCEPT_OP(
			_NOEXCEPT_OP(_Myfirst._Val = _STD forward<_First>(_Right.first))
			&& _NOEXCEPT_OP((_Mybase&)*this =
				tuple<_Second>(_STD forward<_Second>(_Right.second))))
		{	// assign by moving pair
		static_assert(_Mysize == 2,
			"assigning to tuple from object with different size");
		_Myfirst._Val = _STD forward<_First>(_Right.first);
		(_Mybase&)*this =
			tuple<_Second>(_STD forward<_Second>(_Right.second));
		return (*this);
		}

	_Mybase& _Get_rest()
		{	// get reference to rest of elements
		return (*this);
		}

	const _Mybase& _Get_rest() const
		{	// get const reference to rest of elements
		return (*this);
		}

	void swap(tuple& _Right)
		_NOEXCEPT_OP(
			_NOEXCEPT_OP(_Swap_adl(_Myfirst._Val, _Myfirst._Val))
			&& _NOEXCEPT_OP(_Swap_adl((_Mybase&)_Right, (_Mybase&)_Right)))
		{	// swap *this and _Right
		_Swap_adl(_Myfirst._Val, _Right._Myfirst._Val);
		_Mybase::swap((_Mybase&)_Right);
		}

	_Tuple_val<_This> _Myfirst;	// the stored element
	};


	// OPERATORS FOR tuple

template<class... _Types1,
	class... _Types2> inline
	bool operator==(const tuple<_Types1...>& _Left,
		const tuple<_Types2...>& _Right)
	{	// test if _Left == _Right
	return (_Left._Equals(_Right));
	}

template<class... _Types1,
	class... _Types2> inline
	bool operator!=(const tuple<_Types1...>& _Left,
		const tuple<_Types2...>& _Right)
	{	// test if _Left != _Right
	return (!(_Left == _Right));
	}

template<class... _Types1,
	class... _Types2> inline
	bool operator<(const tuple<_Types1...>& _Left,
		const tuple<_Types2...>& _Right)
	{	// test if _Left < _Right
	return (_Left._Less(_Right));
	}

template<class... _Types1,
	class... _Types2> inline
	bool operator>=(const tuple<_Types1...>& _Left,
		const tuple<_Types2...>& _Right)
	{	// test if _Left >= _Right
	return (!(_Left < _Right));
	}

template<class... _Types1,
	class... _Types2> inline
	bool operator>(const tuple<_Types1...>& _Left,
		const tuple<_Types2...>& _Right)
	{	// test if _Left > _Right
	return (_Right < _Left);
	}

template<class... _Types1,
	class... _Types2> inline
	bool operator<=(const tuple<_Types1...>& _Left,
		const tuple<_Types2...>& _Right)
	{	// test if _Left <= _Right
	return (!(_Right < _Left));
	}

template<class... _Types> inline
	void swap(tuple<_Types...>& _Left,
		tuple<_Types...>& _Right)
			_NOEXCEPT_OP(_NOEXCEPT_OP(_Left.swap(_Right)))
	{	// swap _Left and _Right
	return (_Left.swap(_Right));
	}


	// CLASS tuple_element
template<size_t _Index,
	class _Tuple>
	struct tuple_element;

template<class _This,
	class... _Rest>
	struct tuple_element<0, tuple<_This, _Rest...> >
	{	// select first element
	typedef _This type;
	typedef typename add_lvalue_reference<const _This>::type _Ctype;
	typedef typename add_lvalue_reference<_This>::type _Rtype;
	typedef typename add_rvalue_reference<_This>::type _RRtype;
	typedef tuple<_This, _Rest...> _Ttype;
	};

template<size_t _Index,
	class _This,
	class... _Rest>
	struct tuple_element<_Index, tuple<_This, _Rest...> >
		: public tuple_element<_Index - 1, tuple<_Rest...> >
	{	// recursive tuple_element definition
	};


template<size_t _Index,
	class _Tuple>
	struct tuple_element<_Index, const _Tuple>
	: public tuple_element<_Index, _Tuple>
	{	// tuple_element for const
	typedef tuple_element<_Index, _Tuple> _Mybase;
	typedef typename add_const<typename _Mybase::type>::type type;
	};

template<size_t _Index,
	class _Tuple>
	struct tuple_element<_Index, volatile _Tuple>
	: public tuple_element<_Index, _Tuple>
	{	// tuple element for volatile
	typedef tuple_element<_Index, _Tuple> _Mybase;
	typedef typename add_volatile<typename _Mybase::type>::type type;
	};

template<size_t _Index,
	class _Tuple>
	struct tuple_element<_Index, const volatile _Tuple>
	: public tuple_element<_Index, _Tuple>
	{	// tuple_element for const volatile
	typedef tuple_element<_Index, _Tuple> _Mybase;
	typedef typename add_cv<typename _Mybase::type>::type type;
	};

	// FUNCTION get
template<size_t _Index,
	class... _Types> inline
	typename tuple_element<_Index, tuple<_Types...> >::_Rtype
		get(tuple<_Types...>& _Tuple)
	{	// get reference to _Index element of tuple
	typedef typename tuple_element<_Index, tuple<_Types...> >::_Ttype
		_Ttype;
	return (((_Ttype&)_Tuple)._Myfirst._Val);
	}

template<size_t _Index,
	class... _Types> inline
	typename tuple_element<_Index, tuple<_Types...> >::_Ctype
		get(const tuple<_Types...>& _Tuple)
	{	// get const reference to _Index element of tuple
	typedef typename tuple_element<_Index, tuple<_Types...> >::_Ttype
		_Ttype;
	return (((_Ttype&)_Tuple)._Myfirst._Val);
	}

template<size_t _Index,
	class... _Types> inline
	typename tuple_element<_Index, tuple<_Types...> >::_RRtype
		get(tuple<_Types...>&& _Tuple)
	{	// get rvalue reference to _Index element of tuple
	typedef typename tuple_element<_Index, tuple<_Types...> >::_Ttype
		_Ttype;
	typedef typename tuple_element<_Index, tuple<_Types...> >::_RRtype
		_RRtype;
	return (_STD forward<_RRtype>(((_Ttype&)_Tuple)._Myfirst._Val));
	}

	// FUNCTION make_tuple
template<class... _Types> inline
	tuple<typename _Unrefwrap<_Types>::type...>
		make_tuple(_Types&&... _Args)
	{	// make tuple from elements
	typedef tuple<typename _Unrefwrap<_Types>::type...> _Ttype;
	return (_Ttype(_STD forward<_Types>(_Args)...));
	}

	// FUNCTION tie
template<class... _Types> inline
	tuple<_Types&...>
		tie(_Types&... _Args) _NOEXCEPT
	{	// make tuple from elements
	typedef tuple<_Types&...> _Ttype;
	return (_Ttype(_Args...));
	}


	// TEMPLATE FUNCTION forward_as_tuple

template<class... _Types> inline
	tuple<_Types&&...>
		forward_as_tuple(_Types&&... _Args) _NOEXCEPT
	{	// forward arguments in a tuple
	return (tuple<_Types&&...>(_STD forward<_Types>(_Args)...));
	}


	// TEMPLATE STRUCT _Make_arg_idx AND HELPERS
template<class _Arg_idx_type,
	class... _Types>
	struct _Make_arg_idx1
	{	// ends recursion and defines type
	typedef _Arg_idx_type type;
	};

template<size_t... _Indexes,
	class _Ty,
	class... _Types>
	struct _Make_arg_idx1<_Arg_idx<_Indexes...>, _Ty, _Types...>
		: _Make_arg_idx1<_Arg_idx<sizeof...(_Types), _Indexes...>, _Types...>
	{	// counts a type and recurses
	};

template<class... _Types>
	struct _Make_arg_idx
		: _Make_arg_idx1<_Arg_idx<>, _Types...>
	{	// defines type as _Arg_idx<0, 1, 2... (sizeof...(_Types))-1>
	};

template<class _Arg_idx_type1,
	class _Arg_idx_type2>
	struct _Cat_arg_idx;

template<size_t... _Indexes1,
	size_t... _Indexes2>
	struct _Cat_arg_idx<_Arg_idx<_Indexes1...>, _Arg_idx<_Indexes2...> >
	{	// concatenates two _Arg_idx types
	typedef _Arg_idx<_Indexes1..., _Indexes2...> type;
	};

template<size_t _Nx,
	class _Ty>
	struct _Repeat_for
		: integral_constant<size_t, _Nx>
	{	// repeats _Nx for each _Ty in a parameter pack
	};

	// FUNCTION tuple_cat
template<class _Ret,
	class _Kx_arg,
	class _Ix_arg,
	size_t _Ix_next,
	class... _Tuples>
	struct _Tuple_cat2
	{	// determine tuple_cat's return type and _Kx/_Ix indices
	static_assert(sizeof...(_Tuples) == 0,
		"Unsupported tuple_cat arguments.");
	typedef _Ret type;
	typedef _Kx_arg _Kx_arg_idx;
	typedef _Ix_arg _Ix_arg_idx;
	};

template<class... _Types1,
	class _Kx_arg,
	size_t... _Ix,
	size_t _Ix_next,
	class... _Types2,
	class... _Rest>
	struct _Tuple_cat2<tuple<_Types1...>, _Kx_arg, _Arg_idx<_Ix...>, _Ix_next,
		tuple<_Types2...>, _Rest...>
		: _Tuple_cat2<
			tuple<_Types1..., _Types2...>,
			typename _Cat_arg_idx<_Kx_arg,
				typename _Make_arg_idx<_Types2...>::type>::type,
			_Arg_idx<_Ix..., _Repeat_for<_Ix_next, _Types2>::value...>,
			_Ix_next + 1,
			_Rest...>
	{	// determine tuple_cat's return type and _Kx/_Ix indices
	};

template<class... _Tuples>
	struct _Tuple_cat1
		: _Tuple_cat2<tuple<>, _Arg_idx<>, _Arg_idx<>, 0,
			typename decay<_Tuples>::type...>
	{	// prepare to determine tuple_cat's return type and _Kx/_Ix indices
	};

template<class _Ret,
	size_t... _Kx,
	size_t... _Ix,
	class _Ty> inline
	_Ret _Tuple_cat(_Arg_idx<_Kx...>, _Arg_idx<_Ix...>, _Ty&& _Arg)
	{	// concatenate tuples
	return (_Ret(_STD get<_Kx>(_STD get<_Ix>(_STD forward<_Ty>(_Arg)))...));
	}

template<class... _Tuples> inline
	typename _Tuple_cat1<_Tuples...>::type
		tuple_cat(_Tuples&&... _Tpls)
	{	// concatenate tuples
	typedef _Tuple_cat1<_Tuples...> _Cat1;
	return (_Tuple_cat<typename _Cat1::type>(
		typename _Cat1::_Kx_arg_idx(), typename _Cat1::_Ix_arg_idx(),
		_STD forward_as_tuple(_STD forward<_Tuples>(_Tpls)...)));
	}


	// TEMPLATE CONSTRUCTOR pair::pair(tuple, tuple, _Arg_idx, _Arg_idx)
template<class _Ty1,
	class _Ty2>
	template<class _Tuple1,
		class _Tuple2,
		size_t... _Indexes1,
		size_t... _Indexes2> inline
		pair<_Ty1, _Ty2>::pair(_Tuple1& _Val1,
			_Tuple2& _Val2,
			_Arg_idx<_Indexes1...>,
			_Arg_idx<_Indexes2...>)
		: first(_STD get<_Indexes1>(_STD move(_Val1))...),
			second(_STD get<_Indexes2>(_STD move(_Val2))...)
		{	// construct from pair of tuples
		}

	// TEMPLATE CONSTRUCTOR pair::pair(piecewise_construct_t, tuple, tuple)
template<class _Ty1,
	class _Ty2>
	template<class... _Types1,
		class... _Types2> inline
		pair<_Ty1, _Ty2>::pair(piecewise_construct_t,
			tuple<_Types1...> _Val1,
			tuple<_Types2...> _Val2)
			_NOEXCEPT_OP((is_nothrow_constructible<_Ty1, _Types1&&...>::value
				&& is_nothrow_constructible<_Ty2, _Types2&&...>::value))
		: pair(_Val1, _Val2,
			typename _Make_arg_idx<_Types1...>::type(),
			typename _Make_arg_idx<_Types2...>::type())
		{	// construct from pair of tuples
		}
_STD_END

namespace std {
	// TEMPLATE STRUCT uses_allocator
template<class... _Types,
	class _Alloc>
	struct uses_allocator<tuple<_Types...>, _Alloc>
		: true_type
	{	// true_type if container allocator enabled
	};

}	// namespace std

_STD_BEGIN
namespace tr1 {	// TR1 ADDITIONS
using _STD get;
using _STD ignore;
using _STD make_tuple;
using _STD ref;
using _STD tie;
using _STD tuple;
using _STD tuple_element;
}	// namespace tr1
_STD_END

 #pragma pop_macro("new")
 #pragma warning(pop)
 #pragma pack(pop)
#endif /* RC_INVOKED */
#endif /* _TUPLE_ */

/*
 * Copyright (c) 1992-2012 by P.J. Plauger.  ALL RIGHTS RESERVED.
 * Consult your license regarding permissions and restrictions.
V6.00:0009 */
