Skip to content

Commit 3538bb3

Browse files
committed
Add standard iterator typedefs
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_) {
1 parent 62c3dd5 commit 3538bb3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎src/algo/FileReader.hpp‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ class FileReader {
3636
public:
3737
/** Iterator class manages file open/close */
3838
class const_iterator : public std::iterator<frci_tag, std::istream> {
39+
public:
40+
typedef std::istream value_type;
41+
typedef int difference_type;
42+
typedef std::istream* pointer;
43+
typedef std::istream& reference;
44+
typedef std::forward_iterator_tag iterator_category;
45+
3946
public:
4047
/** Go to next element */
4148
const_iterator& operator++();

0 commit comments

Comments
 (0)