|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61303 - trunk/libs/spirit/example/scheme/utree/detail
From: hartmut.kaiser_at_[hidden]
Date: 2010-04-15 18:59:02
Author: hkaiser
Date: 2010-04-15 18:59:01 EDT (Thu, 15 Apr 2010)
New Revision: 61303
URL: http://svn.boost.org/trac/boost/changeset/61303
Log:
Spirit: fixed utree issues
Text files modified:
trunk/libs/spirit/example/scheme/utree/detail/utree_detail2.hpp | 2 +-
trunk/libs/spirit/example/scheme/utree/detail/utree_detail3.hpp | 13 ++++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
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-04-15 18:59:01 EDT (Thu, 15 Apr 2010)
@@ -65,7 +65,7 @@
// if it fits, store it in-situ; small_string_size minus the length
// of the string is placed in buff[small_string_size - 1]
str = buff;
- buff[small_string_size - 1] = max_string_len - size;
+ buff[small_string_size - 1] = static_cast<char>(max_string_len - size);
info() &= ~0x1;
}
else
Modified: trunk/libs/spirit/example/scheme/utree/detail/utree_detail3.hpp
==============================================================================
--- trunk/libs/spirit/example/scheme/utree/detail/utree_detail3.hpp (original)
+++ trunk/libs/spirit/example/scheme/utree/detail/utree_detail3.hpp 2010-04-15 18:59:01 EDT (Thu, 15 Apr 2010)
@@ -28,12 +28,13 @@
SCHEME_GET_UTREE_TYPE(utf8_string_range, utree_type::string_type);
SCHEME_GET_UTREE_TYPE(utf8_string, utree_type::string_type);
SCHEME_GET_UTREE_TYPE(utf8_symbol_range, utree_type::symbol_type);
- SCHEME_GET_UTREE_TYPE(utf8_symbol, utree_type::string_type);
+ SCHEME_GET_UTREE_TYPE(utf8_symbol, utree_type::symbol_type);
SCHEME_GET_UTREE_TYPE(binary_range, utree_type::binary_type);
SCHEME_GET_UTREE_TYPE(boost::iterator_range<utree::iterator>,
utree_type::list_type);
SCHEME_GET_UTREE_TYPE(boost::iterator_range<utree::const_iterator>,
utree_type::list_type);
+ SCHEME_GET_UTREE_TYPE(utree, utree_type::reference_type);
#undef SCHEME_GET_UTREE_TYPE
@@ -140,6 +141,16 @@
return type(x.s.str(), x.s.size());
}
};
+
+ template <>
+ struct get_impl<utree>
+ {
+ typedef utree const& type;
+ static type call(utree const& x)
+ {
+ return x.which() == utree_type::reference_type ? *x.p : x;
+ }
+ };
}
}
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