0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd::util: Simplify.

This commit is contained in:
Jason Volk 2017-08-31 22:49:47 -07:00
parent f98be1582d
commit dc78c4743d

View file

@ -1088,30 +1088,10 @@ static_assert
// To collapse pairs of iterators down to a single type
//
template<class T>
struct iterators
:std::pair<typename T::iterator, typename T::iterator>
{
using std::pair<typename T::iterator, typename T::iterator>::pair;
iterators(T &t)
:std::pair<typename T::iterator, typename T::iterator>
{
std::begin(t), std::end(t)
}{}
};
using iterators = std::pair<typename T::iterator, typename T::iterator>;
template<class T>
struct const_iterators
:std::pair<typename T::const_iterator, typename T::const_iterator>
{
using std::pair<typename T::const_iterator, typename T::const_iterator>::pair;
const_iterators(const T &t)
:std::pair<typename T::const_iterator, typename T::const_iterator>
{
std::begin(t), std::end(t)
}{}
};
using const_iterators = std::pair<typename T::const_iterator, typename T::const_iterator>;
template<class T>
typename T::iterator