diff options
Diffstat (limited to 'boost/boost-ublas-c++20-iterator.patch')
| -rw-r--r-- | boost/boost-ublas-c++20-iterator.patch | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/boost/boost-ublas-c++20-iterator.patch b/boost/boost-ublas-c++20-iterator.patch deleted file mode 100644 index 21321cc..0000000 --- a/boost/boost-ublas-c++20-iterator.patch +++ /dev/null | |||
| @@ -1,59 +0,0 @@ | |||
| 1 | From a31e5cffa85f58b64a39fa7c4a1bd3bd9228b069 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Conrad Poelman <cpgithub@stellarscience.com> | ||
| 3 | Date: Tue, 4 Aug 2020 17:20:40 -0400 | ||
| 4 | Subject: [PATCH] Remove deprecated inheritance from std::iterator (#97) | ||
| 5 | |||
| 6 | std::iterator was deprecated in C++17 and removed in C++20. I replaced the inheritance with the 5 equivalent typedefs, even though they're not all used by ublas, for compatibility in case clients depend on them. | ||
| 7 | --- | ||
| 8 | .../boost/numeric/ublas/detail/iterator.hpp | 24 ++++++++++++++----- | ||
| 9 | 1 file changed, 18 insertions(+), 6 deletions(-) | ||
| 10 | |||
| 11 | diff --git a/include/boost/numeric/ublas/detail/iterator.hpp b/include/boost/numeric/ublas/detail/iterator.hpp | ||
| 12 | index 1723a301c..7aebf2f9f 100644 | ||
| 13 | --- a/include/boost/numeric/ublas/detail/iterator.hpp | ||
| 14 | +++ b/include/boost/numeric/ublas/detail/iterator.hpp | ||
| 15 | @@ -107,8 +107,12 @@ namespace boost { namespace numeric { namespace ublas { | ||
| 16 | * via the post increment operator. | ||
| 17 | */ | ||
| 18 | template<class IC, class I, class T> | ||
| 19 | - struct forward_iterator_base: | ||
| 20 | - public std::iterator<IC, T> { | ||
| 21 | + struct forward_iterator_base { | ||
| 22 | + typedef IC iterator_category; | ||
| 23 | + typedef T value_type; | ||
| 24 | + typedef std::ptrdiff_t difference_type; | ||
| 25 | + typedef T* pointer; | ||
| 26 | + typedef T& reference; | ||
| 27 | typedef I derived_iterator_type; | ||
| 28 | typedef T derived_value_type; | ||
| 29 | |||
| 30 | @@ -145,8 +149,12 @@ namespace boost { namespace numeric { namespace ublas { | ||
| 31 | * via the post increment and post decrement operator. | ||
| 32 | */ | ||
| 33 | template<class IC, class I, class T> | ||
| 34 | - struct bidirectional_iterator_base: | ||
| 35 | - public std::iterator<IC, T> { | ||
| 36 | + struct bidirectional_iterator_base { | ||
| 37 | + typedef IC iterator_category; | ||
| 38 | + typedef T value_type; | ||
| 39 | + typedef std::ptrdiff_t difference_type; | ||
| 40 | + typedef T* pointer; | ||
| 41 | + typedef T& reference; | ||
| 42 | typedef I derived_iterator_type; | ||
| 43 | typedef T derived_value_type; | ||
| 44 | |||
| 45 | @@ -200,8 +208,12 @@ namespace boost { namespace numeric { namespace ublas { | ||
| 46 | */ | ||
| 47 | template<class IC, class I, class T, class D = std::ptrdiff_t> | ||
| 48 | // ISSUE the default for D seems rather dangerous as it can easily be (silently) incorrect | ||
| 49 | - struct random_access_iterator_base: | ||
| 50 | - public std::iterator<IC, T> { | ||
| 51 | + struct random_access_iterator_base { | ||
| 52 | + typedef IC iterator_category; | ||
| 53 | + typedef T value_type; | ||
| 54 | + typedef D difference_type; | ||
| 55 | + typedef T* pointer; | ||
| 56 | + typedef T& reference; | ||
| 57 | typedef I derived_iterator_type; | ||
| 58 | typedef T derived_value_type; | ||
| 59 | typedef D derived_difference_type; | ||
