|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66443 - in trunk/libs/spirit/example/scheme: output utree/detail
From: admin_at_[hidden]
Date: 2010-11-07 15:12:34
Author: wash
Date: 2010-11-07 15:12:33 EST (Sun, 07 Nov 2010)
New Revision: 66443
URL: http://svn.boost.org/trac/boost/changeset/66443
Log:
Reduces the number of outstanding compiler errors for the Scheme sexpr output
code on GCC/Clang toolchains. I believe we're down to one outstanding issue here.
Hartmut/JdG please revert this if it's a problem. The main change to the vanilla
utree is making the list iterators random access, because some of the output code
calls for RA iterators. This is kludgy, but we'll (hopefully) be replacing the
old utree implementation soon enough.
Text files modified:
trunk/libs/spirit/example/scheme/output/sexpr.hpp | 2 +-
trunk/libs/spirit/example/scheme/utree/detail/utree_detail2.hpp | 26 ++++++++++++++++++++++++--
2 files changed, 25 insertions(+), 3 deletions(-)
Modified: trunk/libs/spirit/example/scheme/output/sexpr.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/output/sexpr.hpp (original)
+++ trunk/libs/spirit/example/scheme/output/sexpr.hpp 2010-11-07 15:12:33 EST (Sun, 07 Nov 2010)
@@ -37,7 +37,7 @@
{
uint_generator<unsigned char, 16> hex2;
- start = double_
+ start %= double_
| int_
| bool_
| string_
Modified: trunk/libs/spirit/example/scheme/utree/detail/utree_detail2.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/utree/detail/utree_detail2.hpp (original)
+++ trunk/libs/spirit/example/scheme/utree/detail/utree_detail2.hpp 2010-11-07 15:12:33 EST (Sun, 07 Nov 2010)
@@ -144,7 +144,7 @@
: public boost::iterator_facade<
node_iterator<Value>
, Value
- , boost::bidirectional_traversal_tag
+ , boost::random_access_traversal_tag
>
{
public:
@@ -188,6 +188,17 @@
return node->val;
}
+ void advance (typename node_iterator::difference_type n)
+ {
+ std::advance(*this, n);
+ }
+
+ template<typename Iterator>
+ typename node_iterator::difference_type distance_to(Iterator const& other)
+ const {
+ return std::distance(*this, node_iterator(other));
+ }
+
list::node* node;
list::node* prev;
};
@@ -197,7 +208,7 @@
: public boost::iterator_facade<
node_iterator<boost::reference_wrapper<Value> >
, boost::reference_wrapper<Value>
- , boost::bidirectional_traversal_tag
+ , boost::random_access_traversal_tag
>
{
public:
@@ -243,6 +254,17 @@
return curr;
}
+ void advance (typename node_iterator::difference_type n)
+ {
+ std::advance(*this, n);
+ }
+
+ template<typename Iterator>
+ typename node_iterator::difference_type distance_to(Iterator const& other)
+ const {
+ return std::distance(*this, node_iterator(other));
+ }
+
list::node* node;
list::node* prev;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk