[vs 2005]_Checked_base


関数_Checked_base:
// _Checked_base , const const
template<class _Iter> inline
typename _Checked_iterator_base_helper<_Iter>::_Checked_iterator_base_type
	_Checked_base(_Iter &_It)
{
	typename _Checked_iterator_base_helper<_Iter>::_Checked_iterator_base_type_tag _Base_tag;
	return _Checked_base(_It, _Base_tag);
}

template<class _Iter> inline
typename _Checked_iterator_base_helper<_Iter>::_Checked_iterator_base_type
	_Checked_base(const _Iter &_It)
{
	typename _Checked_iterator_base_helper<_Iter>::_Checked_iterator_base_type_tag _Base_tag;
	return _Checked_base(_It, _Base_tag);
}

_Checked_iterator_base_helperテンプレート
//  :__is_base_of==>helper2==>helper1
template <class _Iter>
class _Checked_iterator_base_helper
{
public:
	typedef _Checked_iterator_base_helper2<_Iter, __is_base_of(_Iterator_base, _Iter)> _Base_helper2;
	typedef _Checked_iterator_base_helper1<_Iter, typename  _Base_helper2::_Checked_iterator_base_type > _Base_helper1;

	typedef typename _Base_helper1::_Base_type_tag _Checked_iterator_base_type_tag;
	typedef typename _Base_helper1::_Checked_iterator_base_type _Checked_iterator_base_type;
};

_Checked_iterator_base_helper 2テンプレート
//  _Checked_iterator_base_helper2
template <class _Iter, bool _Inherits_from_iterator_base>
class _Checked_iterator_base_helper2
{
public:
	typedef _Unchanged_checked_iterator_base_type_tag _Checked_iterator_base_type;
};

template <class _Iter>
class _Checked_iterator_base_helper2<_Iter, true>
{
public:
	typedef typename _Iter::_Checked_iterator_base_type _Checked_iterator_base_type;
};

_Checked_iterator_base_helper 1テンプレート
//   _Checked_iterator_base_helper1
template <class _Iter, class _Base_type>
class _Checked_iterator_base_helper1
{
public:
	typedef _Different_checked_iterator_base_type_tag _Base_type_tag;
	typedef _Base_type _Checked_iterator_base_type;
};
template <class _Iter>
class _Checked_iterator_base_helper1<_Iter, _Unchanged_checked_iterator_base_type_tag>
{
public:
	typedef _Unchanged_checked_iterator_base_type_tag _Base_type_tag;
	typedef _Iter _Checked_iterator_base_type;
};

_Checked_iterator_base_type_tagの可能な値:
struct _Unchanged_checked_iterator_base_type_tag
{
};

struct _Different_checked_iterator_base_type_tag
{
};