From c676dc82d8d959377622a61ceab6354bab7a2baa Mon Sep 17 00:00:00 2001 From: David Coeurjolly Date: Fri, 7 Nov 2014 13:27:55 +0100 Subject: [PATCH 1/3] Iterator category fix for boost1.57 --- src/DGtal/base/Common.h | 1 + src/DGtal/base/IteratorCirculatorTraits.h | 39 +++++++++++++++++------ 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/DGtal/base/Common.h b/src/DGtal/base/Common.h index 0a524f6997..bcd20a3f30 100644 --- a/src/DGtal/base/Common.h +++ b/src/DGtal/base/Common.h @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include diff --git a/src/DGtal/base/IteratorCirculatorTraits.h b/src/DGtal/base/IteratorCirculatorTraits.h index 729d6081c2..322f58f7dd 100644 --- a/src/DGtal/base/IteratorCirculatorTraits.h +++ b/src/DGtal/base/IteratorCirculatorTraits.h @@ -246,20 +246,39 @@ struct ToDGtalCategory { typedef RandomAccessCategory Category; }; -template <> -struct ToDGtalCategory > { - typedef ForwardCategory Category; -}; -template <> -struct ToDGtalCategory > { + + +#if (((BOOST_VERSION /100000)==1) && ((BOOST_VERSION / 100 % 1000 )<57)) + template <> + struct ToDGtalCategory > { + typedef ForwardCategory Category; + }; + template <> + struct ToDGtalCategory > { typedef BidirectionalCategory Category; -}; + }; -template <> -struct ToDGtalCategory > { + template <> + struct ToDGtalCategory > { typedef RandomAccessCategory Category; -}; + }; +#else + template <> + struct ToDGtalCategory > { + typedef ForwardCategory Category; + }; + template <> + struct ToDGtalCategory > { + typedef BidirectionalCategory Category; + }; + + template <> + struct ToDGtalCategory > { + typedef RandomAccessCategory Category; + }; +#endif + ///////////////////////////////////////////////////////////////////////////// /** From ccda571efa5ee5539618cb7ef25314ae6a89a84c Mon Sep 17 00:00:00 2001 From: David Coeurjolly Date: Fri, 7 Nov 2014 14:17:07 +0100 Subject: [PATCH 2/3] changelog --- ChangeLog.md | 9 +++++++-- src/DGtal/base/IteratorCirculatorTraits.h | 5 ----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 0222cdd1a4..554f27d544 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -14,8 +14,13 @@ - *Configuration* - Fix issue #925, detection of Eigen3 (3.1 minimum) and also issue - #924, DGtal configuration file when using Eigen3. - (Jacques-Olivier Lachaud, [#926](https://github.com/DGtal-team/DGtal/pull/926)) + #924, DGtal configuration file when using Eigen3. (Jacques-Olivier + Lachaud, [#926](https://github.com/DGtal-team/DGtal/pull/926)) + +- *Base* + - Iterator category fix for boost > 1.57 (David Coeurjolly, + [#926](https://github.com/DGtal-team/DGtal/pull/926)) + # DGtal 0.8 diff --git a/src/DGtal/base/IteratorCirculatorTraits.h b/src/DGtal/base/IteratorCirculatorTraits.h index 322f58f7dd..9858f38142 100644 --- a/src/DGtal/base/IteratorCirculatorTraits.h +++ b/src/DGtal/base/IteratorCirculatorTraits.h @@ -330,11 +330,6 @@ struct IteratorCirculatorTraits } // namespace DGtal - -/////////////////////////////////////////////////////////////////////////////// -// Includes inline functions. -//#include "DGtal/base/IteratorCirculatorTraits.ih" - // // /////////////////////////////////////////////////////////////////////////////// From 07393093062a8ba30321ff9cf396c50b2687b7e2 Mon Sep 17 00:00:00 2001 From: David Coeurjolly Date: Fri, 7 Nov 2014 14:37:28 +0100 Subject: [PATCH 3/3] changelog updated --- ChangeLog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 554f27d544..da434671db 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -19,7 +19,7 @@ - *Base* - Iterator category fix for boost > 1.57 (David Coeurjolly, - [#926](https://github.com/DGtal-team/DGtal/pull/926)) + [#938](https://github.com/DGtal-team/DGtal/pull/938))