|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54456 - in sandbox/monotonic: boost/heterogenous libs/monotonic/test/clones
From: christian.schladetsch_at_[hidden]
Date: 2009-06-28 04:22:59
Author: cschladetsch
Date: 2009-06-28 04:22:58 EDT (Sun, 28 Jun 2009)
New Revision: 54456
URL: http://svn.boost.org/trac/boost/changeset/54456
Log:
changed header orders
Text files modified:
sandbox/monotonic/boost/heterogenous/abstract_allocator.hpp | 4 +++-
sandbox/monotonic/boost/heterogenous/base.hpp | 2 +-
sandbox/monotonic/libs/monotonic/test/clones/tests.cpp | 13 +++++++++++++
3 files changed, 17 insertions(+), 2 deletions(-)
Modified: sandbox/monotonic/boost/heterogenous/abstract_allocator.hpp
==============================================================================
--- sandbox/monotonic/boost/heterogenous/abstract_allocator.hpp (original)
+++ sandbox/monotonic/boost/heterogenous/abstract_allocator.hpp 2009-06-28 04:22:58 EDT (Sun, 28 Jun 2009)
@@ -12,7 +12,7 @@
{
namespace heterogenous
{
- /// base class for (wrapped) allocators that may be used with cloneable::base
+ /// base class for (wrapped) allocators that may be used with heterogenous::common_base
struct abstract_allocator
{
typedef char *pointer;
@@ -26,6 +26,8 @@
} // namespace boost
+#include <boost/heterogenous/detail/suffix.hpp>
+
#endif // BOOST_HETEROGENOUS_ABSTRACT_ALLOCATOR_HPP
//EOF
Modified: sandbox/monotonic/boost/heterogenous/base.hpp
==============================================================================
--- sandbox/monotonic/boost/heterogenous/base.hpp (original)
+++ sandbox/monotonic/boost/heterogenous/base.hpp 2009-06-28 04:22:58 EDT (Sun, 28 Jun 2009)
@@ -17,7 +17,7 @@
/// base of the given derived type
template <class Derived>
- struct base : common_base
+ struct base : /*virtual */common_base
{
typedef Derived derived_type;
typedef base<derived_type> this_type;
Modified: sandbox/monotonic/libs/monotonic/test/clones/tests.cpp
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/clones/tests.cpp (original)
+++ sandbox/monotonic/libs/monotonic/test/clones/tests.cpp 2009-06-28 04:22:58 EDT (Sun, 28 Jun 2009)
@@ -39,6 +39,19 @@
explicit derived3(float f, int n, std::string const &s) : real(f), num(n), str(s) { }
};
+// naive way of allowing reuse in derived types: factor out the implementation
+struct derived4_impl
+{
+};
+
+struct derived4 : derived4_impl, base<derived4>
+{
+};
+
+struct derived5 : derived4_impl, base<derived5>
+{
+};
+
int main()
{
// there is a problem with static_move_ptr<>
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