mirror of https://github.com/CGAL/cgal
Removed usage of CGAL::iterator from join iterators
They define (almost) all the typedefs in the class anyway Also use result_of() to deduce the result type instead of assuming that a typedef 'result_type' will be present.
This commit is contained in:
parent
27eb601598
commit
0c96d06fc3
|
|
@ -30,18 +30,19 @@
|
|||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#include <CGAL/circulator.h>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/use.h>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <CGAL/circulator.h>
|
||||
#include <CGAL/Iterator_range.h>
|
||||
#include <CGAL/result_of.h>
|
||||
#include <CGAL/tuple.h>
|
||||
#include <CGAL/use.h>
|
||||
|
||||
#include <boost/variant.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <CGAL/Iterator_range.h>
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -656,20 +657,19 @@ bool operator!=(const Filter_iterator<I,P>& it1,
|
|||
{ return !(it1 == it2); }
|
||||
|
||||
template <class I1,class Op>
|
||||
class Join_input_iterator_1 : public
|
||||
CGAL::iterator<typename std::iterator_traits<I1>::iterator_category,
|
||||
typename Op::result_type,
|
||||
typename std::iterator_traits<I1>::difference_type,
|
||||
typename Op::result_type*,
|
||||
typename Op::result_type&>
|
||||
{
|
||||
public:
|
||||
typedef Join_input_iterator_1<I1,Op> Self;
|
||||
typedef typename Op::result_type value_type;
|
||||
typedef typename std::iterator_traits<I1>::difference_type difference_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
|
||||
class Join_input_iterator_1
|
||||
{
|
||||
typedef Join_input_iterator_1<I1,Op> Self;
|
||||
|
||||
typedef typename std::iterator_traits<I1>::value_type arg_type;
|
||||
|
||||
public:
|
||||
typedef typename std::iterator_traits<I1>::iterator_category iterator_category;
|
||||
typedef typename cpp11::result_of<Op(arg_type)>::type value_type;
|
||||
typedef typename std::iterator_traits<I1>::difference_type difference_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
|
||||
protected:
|
||||
I1 i1;
|
||||
Op op;
|
||||
|
|
@ -742,20 +742,20 @@ public:
|
|||
};
|
||||
|
||||
template <class I1,class I2,class Op>
|
||||
class Join_input_iterator_2 : public
|
||||
CGAL::iterator<typename std::iterator_traits<I1>::iterator_category,
|
||||
typename Op::result_type,
|
||||
typename std::iterator_traits<I1>::difference_type,
|
||||
typename Op::result_type*,
|
||||
typename Op::result_type&>
|
||||
{
|
||||
public:
|
||||
typedef Join_input_iterator_2<I1,I2,Op> Self;
|
||||
typedef typename Op::result_type value_type;
|
||||
typedef typename std::iterator_traits<I1>::difference_type difference_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
|
||||
class Join_input_iterator_2
|
||||
{
|
||||
typedef Join_input_iterator_2<I1,I2,Op> Self;
|
||||
|
||||
typedef typename std::iterator_traits<I1>::value_type arg_type_1;
|
||||
typedef typename std::iterator_traits<I2>::value_type arg_type_2;
|
||||
|
||||
public:
|
||||
typedef typename std::iterator_traits<I1>::iterator_category iterator_category;
|
||||
typedef typename cpp11::result_of<Op(arg_type_1, arg_type_2)>::type value_type;
|
||||
typedef typename std::iterator_traits<I1>::difference_type difference_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
|
||||
protected:
|
||||
I1 i1;
|
||||
I2 i2;
|
||||
|
|
@ -835,19 +835,21 @@ public:
|
|||
};
|
||||
|
||||
template <class I1,class I2,class I3,class Op>
|
||||
class Join_input_iterator_3 : public
|
||||
CGAL::iterator<typename std::iterator_traits<I1>::iterator_category,
|
||||
typename Op::result_type,
|
||||
typename std::iterator_traits<I1>::difference_type,
|
||||
typename Op::result_type*,
|
||||
typename Op::result_type&>
|
||||
{
|
||||
public:
|
||||
typedef Join_input_iterator_3<I1,I2,I3,Op> Self;
|
||||
typedef typename Op::result_type value_type;
|
||||
typedef typename std::iterator_traits<I1>::difference_type difference_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
class Join_input_iterator_3
|
||||
{
|
||||
typedef Join_input_iterator_3<I1,I2,I3,Op> Self;
|
||||
|
||||
typedef typename std::iterator_traits<I1>::value_type arg_type_1;
|
||||
typedef typename std::iterator_traits<I2>::value_type arg_type_2;
|
||||
typedef typename std::iterator_traits<I3>::value_type arg_type_3;
|
||||
|
||||
public:
|
||||
typedef typename std::iterator_traits<I1>::iterator_category iterator_category;
|
||||
typedef typename cpp11::result_of<Op(arg_type_1, arg_type_2, arg_type_3)>::type
|
||||
value_type;
|
||||
typedef typename std::iterator_traits<I1>::difference_type difference_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
|
||||
protected:
|
||||
I1 i1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue