Skip to content

Commit

Permalink
Add standard iterator typedefs
Browse files Browse the repository at this point in the history
Boost 1.55 seem to need these:

/usr/local/include/boost/iterator/iterator_traits.hpp:36:64: error: no type named 'reference' in 'boost::detail::iterator_traits<npge::FileReader::const_iterator>'
    typedef typename boost::detail::iterator_traits<Iterator>::reference type;
...
/tmp/npge/src/algo/ImportBlastHits.cpp:144:5: error: no matching function for call to 'deref'
    BOOST_FOREACH (std::istream& input_file, file_reader_) {
  • Loading branch information
AMDmi3 committed Jul 15, 2015
1 parent 62c3dd5 commit 3538bb3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/algo/FileReader.hpp
Expand Up @@ -36,6 +36,13 @@ class FileReader {
public:
/** Iterator class manages file open/close */
class const_iterator : public std::iterator<frci_tag, std::istream> {
public:
typedef std::istream value_type;
typedef int difference_type;
typedef std::istream* pointer;
typedef std::istream& reference;
typedef std::forward_iterator_tag iterator_category;

public:
/** Go to next element */
const_iterator& operator++();
Expand Down

0 comments on commit 3538bb3

Please sign in to comment.