summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-10 21:14:44 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-10 21:14:44 -0400
commit7de6050269bea6e2f699428c7476ddbbbcadfd6a (patch)
treea8d5de9ff6df6a5b822a8a3aecf63f614a81c9d1
parent557c8af9fe22dea048090aeb6eb9458701a66be8 (diff)
downloadfork-ledger-7de6050269bea6e2f699428c7476ddbbbcadfd6a.tar.gz
fork-ledger-7de6050269bea6e2f699428c7476ddbbbcadfd6a.tar.bz2
fork-ledger-7de6050269bea6e2f699428c7476ddbbbcadfd6a.zip
A fix for users of Boost 1.35.
-rw-r--r--src/value.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/value.h b/src/value.h
index c49846d6..79f34d55 100644
--- a/src/value.h
+++ b/src/value.h
@@ -473,7 +473,11 @@ private:
void set_type(type_t new_type) {
assert(new_type >= VOID && new_type <= POINTER);
if (new_type == VOID) {
+#if BOOST_VERSION >= 103700
storage.reset();
+#else
+ storage = intrusive_ptr<storage_t>();
+#endif
assert(is_null());
} else {
_clear();
@@ -826,16 +830,27 @@ public:
assert(! is_null());
if (! is_sequence()) {
+#if BOOST_VERSION >= 103700
+ storage.reset();
+#else
+ storage = intrusive_ptr<storage_t>();
+#endif
storage.reset();
} else {
as_sequence_lval().pop_back();
const sequence_t& seq(as_sequence());
std::size_t new_size = seq.size();
- if (new_size == 0)
+ if (new_size == 0) {
+#if BOOST_VERSION >= 103700
storage.reset();
- else if (new_size == 1)
+#else
+ storage = intrusive_ptr<storage_t>();
+#endif
+ }
+ else if (new_size == 1) {
*this = seq.front();
+ }
}
}