aboutsummaryrefslogtreecommitdiff
path: root/common/container/change-tracking
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-02-12 11:03:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-02-12 11:03:06 +0200
commiteb61314cc5c8d224cb3bc47f40d725b7a01bb064 (patch)
treea7e50b14ac234c51ac44d5af4123c9d7bfd1e7e0 /common/container/change-tracking
parentbe7e2755e5f187af7bd9902576379421c2a06e2a (diff)
Workarounds for non-standard Sun CC STL
Diffstat (limited to 'common/container/change-tracking')
-rw-r--r--common/container/change-tracking/driver.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/common/container/change-tracking/driver.cxx b/common/container/change-tracking/driver.cxx
index b4f09ad..eaf23e1 100644
--- a/common/container/change-tracking/driver.cxx
+++ b/common/container/change-tracking/driver.cxx
@@ -58,8 +58,9 @@ static counting_tracer tr;
// complete std::vector interface.
//
-#if defined (HAVE_CXX11)
-#if defined (__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 7
+#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
+#if !defined (HAVE_CXX11) || \
+ (defined (__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 7)
struct item {};
template class odb::vector<item>;
template class odb::vector_iterator<odb::vector<item>,
@@ -101,9 +102,11 @@ main (int argc, char* argv[])
if (i != ov.end ())
i = ov.end ();
+#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
vector::const_reverse_iterator j (ov.rbegin ());
if (j != ov.rend ())
j = ov.rend ();
+#endif
}
auto_ptr<database> db (create_database (argc, argv));
@@ -369,16 +372,23 @@ main (int argc, char* argv[])
{
o.s.begin ().modify () += 'a';
+#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
o.s.rbegin ().modify () += 'c';
+#endif
transaction t (db->begin ());
tr.reset (t);
db->update (o);
+#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
assert (tr.u == 3 && tr.t == 3);
+#else
+ assert (tr.u == 2 && tr.t == 2);
+#endif
assert (*db->load<object> ("1") == o);
t.commit ();
}
+#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
{
(o.s.rbegin () + 1).modify (1) += 'a';
(o.s.rbegin () + 1).modify (-1) += 'c';
@@ -390,6 +400,7 @@ main (int argc, char* argv[])
assert (*db->load<object> ("1") == o);
t.commit ();
}
+#endif
{
o.s.mbegin ();