Skip to content

Commit

Permalink
Merge pull request #938 from dcoeurjo/boost157
Browse files Browse the repository at this point in the history
Boost157
  • Loading branch information
kerautret committed Nov 18, 2014
2 parents 70f8ced + 0739309 commit 9db659d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 17 deletions.
9 changes: 7 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,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:/DGtal-team/DGtal/pull/926))
#924, DGtal configuration file when using Eigen3. (Jacques-Olivier
Lachaud, [#926](https:/DGtal-team/DGtal/pull/926))

- *Base*
- Iterator category fix for boost > 1.57 (David Coeurjolly,
[#938](https:/DGtal-team/DGtal/pull/938))



# DGtal 0.8
Expand Down
1 change: 1 addition & 0 deletions src/DGtal/base/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <iostream>
#include <exception>
#include <algorithm>
#include <boost/version.hpp>
#include <boost/concept_check.hpp>
#include <boost/static_assert.hpp>
#include <boost/concept/assert.hpp>
Expand Down
44 changes: 29 additions & 15 deletions src/DGtal/base/IteratorCirculatorTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,20 +246,39 @@ struct ToDGtalCategory<boost::random_access_traversal_tag> {
typedef RandomAccessCategory Category;
};

template <>
struct ToDGtalCategory<boost::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::forward_traversal_tag> > {
typedef ForwardCategory Category;
};

template <>
struct ToDGtalCategory<boost::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::bidirectional_traversal_tag> > {


#if (((BOOST_VERSION /100000)==1) && ((BOOST_VERSION / 100 % 1000 )<57))
template <>
struct ToDGtalCategory<boost::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::forward_traversal_tag> > {
typedef ForwardCategory Category;
};
template <>
struct ToDGtalCategory<boost::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::bidirectional_traversal_tag> > {
typedef BidirectionalCategory Category;
};
};

template <>
struct ToDGtalCategory<boost::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::random_access_traversal_tag> > {
template <>
struct ToDGtalCategory<boost::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::random_access_traversal_tag> > {
typedef RandomAccessCategory Category;
};
};
#else
template <>
struct ToDGtalCategory<boost::iterators::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::forward_traversal_tag> > {
typedef ForwardCategory Category;
};
template <>
struct ToDGtalCategory<boost::iterators::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::bidirectional_traversal_tag> > {
typedef BidirectionalCategory Category;
};

template <>
struct ToDGtalCategory<boost::iterators::detail::iterator_category_with_traversal<std::input_iterator_tag,boost::random_access_traversal_tag> > {
typedef RandomAccessCategory Category;
};
#endif


/////////////////////////////////////////////////////////////////////////////
/**
Expand Down Expand Up @@ -311,11 +330,6 @@ struct IteratorCirculatorTraits<T const*>

} // namespace DGtal


///////////////////////////////////////////////////////////////////////////////
// Includes inline functions.
//#include "DGtal/base/IteratorCirculatorTraits.ih"

// //
///////////////////////////////////////////////////////////////////////////////

Expand Down

0 comments on commit 9db659d

Please sign in to comment.