Commit Graph

10 Commits

Author SHA1 Message Date
Nikita Kniazev
d3e14ccf04 Classic: Fixed position_iterator forming reference to local
When underlying iterator returns by value the corresponding position_iterator
was providing iterator_adaptor with a reference type what lead to returning
a reference to a local variable in dereference operator.

Made a custom trait because it is a way more elegant than:
```cpp
    typedef typename boost::mpl::if_c<
        boost::is_reference<reference>::value,
        typename boost::add_reference<
            typename boost::add_const<
                typename boost::remove_reference<reference>::type
            >::type
        >::type,
        typename boost::add_const<reference>::type
    >::type const_reference_type;
```

Fixes https://svn.boost.org/trac10/ticket/9737.
2018-11-23 03:19:03 +03:00
Daniela Engert
8edbebe8b3
Inheriting std::iterator is deprecated in c++17
Boost's iterator.hpp is deprecated, too. It does nothing but pulling std::iterator into namespace boost and including standard headers 'iterator' and 'cstddef'. Therefore get rid of all of that and replace inheritance by lifting std::iterator's members into the derived class.
2017-12-29 19:35:56 +01:00
Daniel James
35e056c974 Avoid comparing default initialised iterators in position_iterator.
[SVN r49666]
2008-11-09 19:12:05 +00:00
Daniel James
3374392764 Remove tabs.
[SVN r49235]
2008-10-09 22:26:02 +00:00
Daniel James
bbd5584421 Change position_iterator so that it doesn't count '\n\r' as a single
newline and doesn't change the sequence at all (which was conflicting
with spirit's newline handling).

[SVN r49234]
2008-10-09 22:16:26 +00:00
Daniel James
db190604c2 Add some extra checks to position_iterator tests, and fix an incorrect character count.
[SVN r49233]
2008-10-09 22:16:11 +00:00
Daniel James
ffadf75e91 position_iterator is a forward iterator, so tag it appropriately. 'operator-' was giving incorrect results when there were windows newlines which can cause all sorts of problems.
[SVN r49232]
2008-10-09 22:15:57 +00:00
Hartmut Kaiser
0ac381dcf3 Fixed Spirit Classic namespace switching.
[SVN r44371]
2008-04-13 16:28:27 +00:00
Hartmut Kaiser
d011669e57 Changed SpiritV1 header files to have a classic_ prefix
[SVN r44196]
2008-04-11 22:01:55 +00:00
Joel de Guzman
994d4e48cc moving stuff to classic spirit
[SVN r44163]
2008-04-10 23:51:31 +00:00