// xutility experimental header
#pragma once
#ifndef _EXPERIMENTAL_XUTILITY_
#define _EXPERIMENTAL_XUTILITY_
#ifndef RC_INVOKED

#include <xutility>

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

_STD_BEGIN
namespace experimental {
	inline namespace fundamentals_v2 {

	// TEMPLATE FUNCTION _Erase_nodes_if
template<class _Container,
	class _Pr> inline
	void _Erase_nodes_if(_Container& _Cont, _Pr _Pred)
	{	// erase each element satisfying _Pred
	auto _First = _Cont.begin();
	auto _Last = _Cont.end();
	_DEBUG_POINTER_IF(_First != _Last, _Pred);
	while (_First != _Last)
		if (_Pred(*_First))
			_First = _Cont.erase(_First);
		else
			++_First;
	}

	}	// inline namespace fundamentals_v2
}	// namespace experimental
_STD_END

 #pragma pop_macro("new")
 #pragma warning(pop)
 #pragma pack(pop)

#endif /* RC_INVOKED */
#endif /* _EXPERIMENTAL_XUTILITY_ */

/*
 * Copyright (c) by P.J. Plauger. All rights reserved.
 * Consult your license regarding permissions and restrictions.
V6.50:0009 */
