diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-11-10 09:11:38 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-11-10 09:11:38 +0100 |
commit | 0105146915c62f732841bb63d5c2046ed7cb3864 (patch) | |
tree | 12f2839d055640caa41528880cd242d7cb65b0fe /Eigen/src/Core/StlIterators.h | |
parent | 93f9988a7ee347ebf07375a39c8313e67987bb0d (diff) |
Fix warning in c++03
Diffstat (limited to 'Eigen/src/Core/StlIterators.h')
-rw-r--r-- | Eigen/src/Core/StlIterators.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Eigen/src/Core/StlIterators.h b/Eigen/src/Core/StlIterators.h index 131a95085..4f25a60c4 100644 --- a/Eigen/src/Core/StlIterators.h +++ b/Eigen/src/Core/StlIterators.h @@ -23,8 +23,9 @@ protected: typedef indexed_based_stl_iterator_base<typename traits::non_const_iterator> non_const_iterator; typedef indexed_based_stl_iterator_base<typename traits::const_iterator> const_iterator; typedef typename internal::conditional<internal::is_const<XprType>::value,non_const_iterator,const_iterator>::type other_iterator; - friend const_iterator; - friend non_const_iterator; + // NOTE: in C++03 we cannot declare friend classes through typedefs because we need to write friend class: + friend class indexed_based_stl_iterator_base<typename traits::const_iterator>; + friend class indexed_based_stl_iterator_base<typename traits::non_const_iterator>; public: typedef Index difference_type; typedef std::random_access_iterator_tag iterator_category; @@ -99,8 +100,9 @@ class pointer_based_stl_iterator typedef pointer_based_stl_iterator<typename internal::remove_const<XprType>::type> non_const_iterator; typedef pointer_based_stl_iterator<typename internal::add_const<XprType>::type> const_iterator; typedef typename internal::conditional<internal::is_const<XprType>::value,non_const_iterator,const_iterator>::type other_iterator; - friend const_iterator; - friend non_const_iterator; + // NOTE: in C++03 we cannot declare friend classes through typedefs because we need to write friend class: + friend class pointer_based_stl_iterator<typename internal::add_const<XprType>::type>; + friend class pointer_based_stl_iterator<typename internal::remove_const<XprType>::type>; public: typedef Index difference_type; typedef typename XprType::Scalar value_type; |