2014-06-01 17:55:23 +00:00
|
|
|
/*
|
2018-09-02 00:57:29 +00:00
|
|
|
* This file is part of the DXX-Rebirth project <https://www.dxx-rebirth.com/>.
|
2014-06-01 17:55:23 +00:00
|
|
|
* It is copyright by its individual contributors, as recorded in the
|
|
|
|
* project's Git history. See COPYING.txt at the top level for license
|
|
|
|
* terms and a link to the Git history.
|
|
|
|
*/
|
2014-01-18 18:02:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#if defined(DXX_HAVE_CXX11_BEGIN)
|
|
|
|
#include <iterator>
|
|
|
|
using std::begin;
|
|
|
|
using std::end;
|
|
|
|
#elif defined(DXX_HAVE_BOOST_BEGIN)
|
|
|
|
#include <boost/range/begin.hpp>
|
|
|
|
#include <boost/range/end.hpp>
|
|
|
|
using boost::begin;
|
|
|
|
using boost::end;
|
2014-06-30 23:56:51 +00:00
|
|
|
|
|
|
|
namespace boost {
|
|
|
|
template <typename T>
|
|
|
|
struct range_const_iterator<T *>
|
|
|
|
{
|
|
|
|
typedef const T* type;
|
|
|
|
};
|
|
|
|
template <typename T>
|
|
|
|
struct range_mutable_iterator<T *>
|
|
|
|
{
|
|
|
|
typedef T* type;
|
|
|
|
};
|
|
|
|
}
|
2014-01-18 18:02:02 +00:00
|
|
|
#else
|
|
|
|
#error "No begin()/end() implementation found."
|
|
|
|
#endif
|