$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r50407 - in sandbox/SOC/2006/tree/trunk: . boost/tree boost/tree/detail/algorithm libs/tree/test
From: ockham_at_[hidden]
Date: 2008-12-29 16:31:18
Author: bernhard.reiter
Date: 2008-12-29 16:31:17 EST (Mon, 29 Dec 2008)
New Revision: 50407
URL: http://svn.boost.org/trac/boost/changeset/50407
Log:
Start refactoring concepts.
Text files modified: 
   sandbox/SOC/2006/tree/trunk/TODO                                       |     3 +                                       
   sandbox/SOC/2006/tree/trunk/boost/tree/algorithm.hpp                   |    15 +++++-                                  
   sandbox/SOC/2006/tree/trunk/boost/tree/cursor_archetypes.hpp           |     5 +                                       
   sandbox/SOC/2006/tree/trunk/boost/tree/cursor_concepts.hpp             |    75 ++++++++++++++++++++---------------     
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/inorder.hpp    |    26 ++++++------                            
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterative.hpp  |    12 ++--                                    
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/postorder.hpp  |    18 ++++----                                
   sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/preorder.hpp   |    18 ++++----                                
   sandbox/SOC/2006/tree/trunk/boost/tree/forest_tree.hpp                 |     4                                         
   sandbox/SOC/2006/tree/trunk/boost/tree/iterator.hpp                    |     6 +-                                      
   sandbox/SOC/2006/tree/trunk/libs/tree/test/algorithm_concepts_test.cpp |    83 ++++++++++++++++----------------------- 
   11 files changed, 137 insertions(+), 128 deletions(-)
Modified: sandbox/SOC/2006/tree/trunk/TODO
==============================================================================
--- sandbox/SOC/2006/tree/trunk/TODO	(original)
+++ sandbox/SOC/2006/tree/trunk/TODO	2008-12-29 16:31:17 EST (Mon, 29 Dec 2008)
@@ -14,6 +14,7 @@
 [section TODO]
 
 General:
+* Improve cursor_archetype. Currently, there's trouble eg with constructors.
 * Remove a cursor's cursor, const_cursor, iterator and const_iterator typedefs?
   The latter two only make sense in a range algorithm context, where they might actually be
   useful. (The former two are just aliases for completeness' sake.)
@@ -179,6 +180,8 @@
 
 Documentation:
 
+* Make docs more coherent. If we're using doxygen for API documentation, don't
+  duplicate that information via quickbook!
 * Include examples output (requires some Jamfile tweaking)!
 * Add a tree visualisation of the documentation structure (as some kind of frontispiece)
   to the docs!
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/algorithm.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/algorithm.hpp	(original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/algorithm.hpp	2008-12-29 16:31:17 EST (Mon, 29 Dec 2008)
@@ -82,8 +82,12 @@
     return c;
 }
 
-template <class AscendingCursor>
-typename AscendingCursor::size_type index(AscendingCursor const& cur)
+template <class Cursor>
+BOOST_CONCEPT_REQUIRES(
+    ((Descendor<Cursor>))
+    ((Ascendor<Cursor>)),
+    (typename Cursor::size_type)) // return type
+index(Cursor const& cur)
 {
     return std::distance(cur.parent().begin(), cur);
 }
@@ -96,8 +100,13 @@
         c.to_end();
 }
 
+
 template <class BinaryCursor>
-void to_forest_parent(BinaryCursor& c)
+BOOST_CONCEPT_REQUIRES(
+    ((Descendor<BinaryCursor>))
+    ((Ascendor<BinaryCursor>)),
+    (void)) // return type
+to_forest_parent(BinaryCursor& c)
 {
     while (index(c))
         c.to_parent();
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/cursor_archetypes.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/cursor_archetypes.hpp	(original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/cursor_archetypes.hpp	2008-12-29 16:31:17 EST (Mon, 29 Dec 2008)
@@ -62,6 +62,7 @@
 
 // Ideally derive from ascendor_archetype.
 // The problem: begin() and end() return the wrong type! 
+// FIXME: constructors etc
 template <
     class Value
   , class AccessCategory
@@ -75,7 +76,7 @@
 //, public descendor_archetype
 {
 private:
-    typedef class cursor_archetype<Value
+    typedef cursor_archetype<Value
                      , AccessCategory
                      , HorizontalTraversal
                      , descending_vertical_traversal_tag> self_type;
@@ -104,7 +105,7 @@
 //, public ascendor_archetype
 {
 private:
-    typedef class cursor_archetype<Value
+    typedef cursor_archetype<Value
                      , AccessCategory
                      , HorizontalTraversal
                      , ascending_vertical_traversal_tag> self_type;
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/cursor_concepts.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/cursor_concepts.hpp	(original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/cursor_concepts.hpp	2008-12-29 16:31:17 EST (Mon, 29 Dec 2008)
@@ -17,68 +17,79 @@
 
 namespace boost_concepts {
 
-// TODO: Adapt concept requirements for algorithms according to archetypes!
-
-
-// Even split up into two types: one with only to_begin() and to_end(), and
-// one with also begin() and end() ?
-// I think we're lacking some requirements imposed on the return types of these
-// member functions, but that might overlap with iterator requirements. 
+/** 
+ * @brief Descendor concept
+ * Note that the existence of begin() and end() member functions follows quite
+ * naturally from the existence of to_begin() and to_end(), plus
+ * CopyConstructibility of X, which is quite a natural requirement for
+ * cursors.
+ */
 template <class X>
 struct Descendor
 {
 public:
     BOOST_CONCEPT_USAGE(Descendor)
     {
-        d.to_begin();
-        d.begin();
-        d.to_end();
-        d.end();
+        X& rb = d.to_begin();
+        rb.to_begin();  // Avoid compiler warning about unused variable
+
+        X b = d.begin();
+
+        X& re = d.to_end();
+        re.to_end();    // Avoid compiler warning about unused variable
+        
+        X e = d.end();
+
+        bool m = b.empty();
+        m = false;      // Avoid compiler warning about unused variable
     }
     
 private:
     X d;
-    
 };
 
-template <class X>
-struct DescendingCursor
-  : Descendor<X>, LvalueIterator<X>
-{
-};
 
-// Derive from DescendingCursor or not?
-// See eg Knuth 2.3.3, p 353.
+/** 
+ * @brief Ascendor concept
+ * Note that the existence of a parent() member function follows quite
+ * naturally from the existence of to_parent(), plus
+ * CopyConstructibility of X, which is quite a natural requirement for
+ * cursors.
+ * 
+ * Ascendor is not derived from Descendor, as there is no obviuos requirement
+ * for it, so these things are best kept separate. For a use case of an
+ * Ascendor-but-not-Descendor, see eg Knuth 2.3.3, (page 353)
+ */
 template <class X>
 struct Ascendor
 {
 public:
     BOOST_CONCEPT_USAGE(Ascendor)
     {
-        a.to_parent();
-        a.parent();
+        X& rp = a.to_parent();
+        rp.to_parent();     // Avoid compiler warning about unused variable
+
+        X p = a.parent();
     }
 private:
     X a;
 };
 
+/** 
+ * @brief RootTracker concept
+ * Keeps track of a (subtree) root.
+ */
 template <class X>
-struct AscendingCursor
-  : Ascendor<X>, LvalueIterator<X>
-{
-};
-
-template <class X>
-struct RootTrackingCursor
-  : AscendingCursor<X>
+struct RootTracker
+  : Ascendor<X>
 {
-    BOOST_CONCEPT_USAGE(RootTrackingCursor)
+    BOOST_CONCEPT_USAGE(RootTracker)
     {
-        b = r.is_root();
+        bool b = r.is_root();
+        b = false;          // Avoid compiler warning about unused variable
     }
 private:
     X r;
-    bool b;
 };
 
 } // namespace boost_concepts
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/inorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/inorder.hpp	(original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/inorder.hpp	2008-12-29 16:31:17 EST (Mon, 29 Dec 2008)
@@ -40,8 +40,8 @@
 template <class MultiwayCursor>
 inline
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<MultiwayCursor>))
-    ((RootTrackingCursor<MultiwayCursor>)),
+    ((Descendor<MultiwayCursor>))
+    ((RootTracker<MultiwayCursor>)),
     (void)) // return type
 forward(inorder, MultiwayCursor& c)
 {
@@ -62,8 +62,8 @@
 template <class MultiwayCursor>
 inline
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<MultiwayCursor>))
-    ((RootTrackingCursor<MultiwayCursor>)),
+    ((Descendor<MultiwayCursor>))
+    ((RootTracker<MultiwayCursor>)),
     (void)) // return type
 back(inorder, MultiwayCursor& c)
 {
@@ -87,7 +87,7 @@
  */
 template <class Cursor>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<Cursor>)),
+    ((Descendor<Cursor>)),
     (void)) // return type
 to_first(inorder, Cursor& c)
 {
@@ -117,7 +117,7 @@
  */
 template <class MultiwayCursor, class Op>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<MultiwayCursor>)),
+    ((Descendor<MultiwayCursor>)),
     (void)) // return type
 for_each_recursive(inorder, MultiwayCursor s, Op& f)
 {
@@ -147,7 +147,7 @@
  */
 template <class MultiwayCursor, class Op>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<MultiwayCursor>)),
+    ((Descendor<MultiwayCursor>)),
     (Op)) // return type
 for_each(inorder, MultiwayCursor s, Op f, descending_vertical_traversal_tag)
 {
@@ -180,8 +180,8 @@
  */
 template <class InCursor, class OutCursor, class Op>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<InCursor>))
-    ((DescendingCursor<OutCursor>))
+    ((Descendor<InCursor>))
+    ((Descendor<OutCursor>))
     /*((UnaryFunction<Op>))*/,
     (OutCursor)) // return type
 transform(inorder, InCursor s, OutCursor t, Op op, descending_vertical_traversal_tag)
@@ -220,7 +220,7 @@
 //[ lower_bound
 template <class MultiwayCursor, class T>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<MultiwayCursor>)),
+    ((Descendor<MultiwayCursor>)),
     (MultiwayCursor)) // return type
 lower_bound(MultiwayCursor x, T const& val)
 //]
@@ -248,7 +248,7 @@
 //[ lower_bound_cmp
 template <class MultiwayCursor, class T, class Cmp>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<MultiwayCursor>))
+    ((Descendor<MultiwayCursor>))
     /*((LessThanComparable<Cmp>))*/, // Problem with balanced_tree
     (MultiwayCursor)) // return type
 lower_bound(MultiwayCursor x, T const& val, Cmp cmp)
@@ -276,7 +276,7 @@
 //[ upper_bound
 template <class MultiwayCursor, class T>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<MultiwayCursor>)),
+    ((Descendor<MultiwayCursor>)),
     (MultiwayCursor)) // return type
 upper_bound(MultiwayCursor x, T const& val)
 //]
@@ -304,7 +304,7 @@
 //[ upper_bound_cmp
 template <class MultiwayCursor, class T, class Cmp>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<MultiwayCursor>))
+    ((Descendor<MultiwayCursor>))
     ((LessThanComparable<Cmp>)),
     (MultiwayCursor)) // return type
 upper_bound(MultiwayCursor x, T const& val, Cmp cmp)
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterative.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterative.hpp	(original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/iterative.hpp	2008-12-29 16:31:17 EST (Mon, 29 Dec 2008)
@@ -29,8 +29,8 @@
 
 template <class Order, class Cursor, class Op>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<Cursor>))
-    ((AscendingCursor<Cursor>)),
+    ((Descendor<Cursor>))
+    ((Ascendor<Cursor>)),
     (Op)) // return type
 for_each(Order, Cursor is, Op f, ascending_vertical_traversal_tag)
 {
@@ -47,10 +47,10 @@
 
 template <class Order, class InCursor, class OutCursor, class Op>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<InCursor>))
-    ((AscendingCursor<InCursor>))
-    ((DescendingCursor<OutCursor>))
-    ((AscendingCursor<OutCursor>)),
+    ((Descendor<InCursor>))
+    ((Ascendor<InCursor>))
+    ((Descendor<OutCursor>))
+    ((Ascendor<OutCursor>)),
     (OutCursor)) // return type
 transform (Order, InCursor is, OutCursor t, Op op
                    , ascending_vertical_traversal_tag)
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/postorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/postorder.hpp	(original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/postorder.hpp	2008-12-29 16:31:17 EST (Mon, 29 Dec 2008)
@@ -37,8 +37,8 @@
 template <class Cursor>
 inline
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<Cursor>))
-    ((RootTrackingCursor<Cursor>)),
+    ((Descendor<Cursor>))
+    ((RootTracker<Cursor>)),
     (void)) // return type
 forward(postorder, Cursor& c)
 {
@@ -71,8 +71,8 @@
 template <class Cursor>
 inline
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<Cursor>))
-    ((RootTrackingCursor<Cursor>)),
+    ((Descendor<Cursor>))
+    ((RootTracker<Cursor>)),
     (void)) // return type
 back(postorder, Cursor& c)
 {
@@ -110,7 +110,7 @@
  */
 template <class Cursor>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<Cursor>)),
+    ((Descendor<Cursor>)),
     (void)) // return type
 to_first(postorder, Cursor& c)
 {
@@ -147,7 +147,7 @@
  */
 template <class Cursor, class Op>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<Cursor>)),
+    ((Descendor<Cursor>)),
     (void)) // return type
 for_each_recursive(postorder, Cursor s, Op& f)
 {
@@ -175,7 +175,7 @@
  */
 template <class Cursor, class Op>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<Cursor>)),
+    ((Descendor<Cursor>)),
     (Op)) // return type
 for_each(postorder, Cursor s, Op f, descending_vertical_traversal_tag)
 {
@@ -208,8 +208,8 @@
  */
 template <class InCursor, class OutCursor, class Op>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<InCursor>))
-    ((DescendingCursor<OutCursor>)),
+    ((Descendor<InCursor>))
+    ((Descendor<OutCursor>)),
     (OutCursor)) // return type
 transform(postorder, InCursor s, OutCursor t, Op op, descending_vertical_traversal_tag)
 {
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/preorder.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/preorder.hpp	(original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/detail/algorithm/preorder.hpp	2008-12-29 16:31:17 EST (Mon, 29 Dec 2008)
@@ -37,8 +37,8 @@
 template <typename Cursor>
 inline
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<Cursor>))
-    ((RootTrackingCursor<Cursor>)),
+    ((Descendor<Cursor>))
+    ((RootTracker<Cursor>)),
     (void)) // return type
 forward(preorder, Cursor& c)
 {
@@ -78,8 +78,8 @@
 template <class Cursor>
 inline
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<Cursor>))
-    ((RootTrackingCursor<Cursor>)),
+    ((Descendor<Cursor>))
+    ((RootTracker<Cursor>)),
     (void)) // return type
 back(preorder, Cursor& c)
 {
@@ -113,7 +113,7 @@
  */
 template <class Cursor>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<Cursor>)),
+    ((Descendor<Cursor>)),
     (void)) // return type
 to_first(preorder, Cursor& c)
 {
@@ -142,7 +142,7 @@
  */
 template <class Cursor, class Op>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<Cursor>)),
+    ((Descendor<Cursor>)),
     (void)) // return type
 for_each_recursive(preorder, Cursor s, Op& f)
 {
@@ -170,7 +170,7 @@
  */
 template <class Cursor, class Op>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<Cursor>)),
+    ((Descendor<Cursor>)),
     (Op)) // return type
 for_each(preorder, Cursor s, Op f, descending_vertical_traversal_tag)
 {
@@ -205,8 +205,8 @@
  */
 template <class InCursor, class OutCursor, class Op>
 BOOST_CONCEPT_REQUIRES(
-    ((DescendingCursor<InCursor>))
-    ((DescendingCursor<OutCursor>)),
+    ((Descendor<InCursor>))
+    ((Descendor<OutCursor>)),
     (OutCursor)) // return type
 transform(preorder, InCursor s, OutCursor t, Op op, descending_vertical_traversal_tag)
 {
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/forest_tree.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/forest_tree.hpp	(original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/forest_tree.hpp	2008-12-29 16:31:17 EST (Mon, 29 Dec 2008)
@@ -37,8 +37,8 @@
 class forest_tree {
 
 BOOST_CONCEPT_ASSERT((DefaultConstructible<T>));
-BOOST_CONCEPT_ASSERT((DescendingCursor< typename binary_tree<T>::cursor >));
-BOOST_CONCEPT_ASSERT((DescendingCursor< typename binary_tree<T>::const_cursor >));
+BOOST_CONCEPT_ASSERT((Descendor< typename binary_tree<T>::cursor >));
+BOOST_CONCEPT_ASSERT((Descendor< typename binary_tree<T>::const_cursor >));
 //BOOST_CONCEPT_ASSERT((SameType<T, typename Hierarchy::value_type>)); 
 // Is there a SameType concept in BCCL?
 
Modified: sandbox/SOC/2006/tree/trunk/boost/tree/iterator.hpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/boost/tree/iterator.hpp	(original)
+++ sandbox/SOC/2006/tree/trunk/boost/tree/iterator.hpp	2008-12-29 16:31:17 EST (Mon, 29 Dec 2008)
@@ -43,7 +43,7 @@
       , boost::use_default
       , typename Order::iterator_category
     > {
-BOOST_CONCEPT_ASSERT((RootTrackingCursor<Cursor>));
+BOOST_CONCEPT_ASSERT((RootTracker<Cursor>));
 
  private:
     struct enabler {};
@@ -92,7 +92,7 @@
  */
 template <class Order, class Cursor>
 BOOST_CONCEPT_REQUIRES(
-    ((AscendingCursor<Cursor>)),
+    ((Ascendor<Cursor>)),
     (iterator< Order, root_tracking_cursor<Cursor> >)) // return type
 //iterator< Order, root_tracking_cursor<Cursor> >
 begin(Order, Cursor c)
@@ -110,7 +110,7 @@
  */
 template <class Order, class Cursor>
 BOOST_CONCEPT_REQUIRES(
-    ((AscendingCursor<Cursor>)),
+    ((Ascendor<Cursor>)),
     (iterator< Order, root_tracking_cursor<Cursor> >)) // return type
 //iterator<Order, root_tracking_cursor<Cursor> >
 end(Order, Cursor c)
Modified: sandbox/SOC/2006/tree/trunk/libs/tree/test/algorithm_concepts_test.cpp
==============================================================================
--- sandbox/SOC/2006/tree/trunk/libs/tree/test/algorithm_concepts_test.cpp	(original)
+++ sandbox/SOC/2006/tree/trunk/libs/tree/test/algorithm_concepts_test.cpp	2008-12-29 16:31:17 EST (Mon, 29 Dec 2008)
@@ -27,7 +27,7 @@
     boost::detail::dummy_constructor dummy_cons;
     cursor_archetype< boost::null_archetype<>
                       , boost::iterator_archetypes::readable_lvalue_iterator_t // Really lvalue?
-                      , boost::forward_traversal_tag
+                      , boost::forward_traversal_tag    // Lesser requirement!
                       , boost::tree::descending_vertical_traversal_tag
                       > c;
     boost::unary_function_archetype< boost::null_archetype<> , boost::null_archetype<> > 
@@ -36,54 +36,39 @@
     boost::tree::for_each(Order(), c, f);
 }
 
-//BOOST_AUTO_TEST_CASE_TEMPLATE( test_std_copy, Order, orders )
-//{
-//    boost::detail::dummy_constructor dummy_cons;
-//    boost::iterator_archetype< boost::null_archetype<>
-//                      , boost::iterator_archetypes::readable_lvalue_iterator_t // Really lvalue?
-//                      , boost::forward_traversal_tag
-//                      > i;
-//    boost::iterator_archetype< boost::null_archetype<>
-//                      , boost::iterator_archetypes::writable_iterator_t // Really lvalue?
-//                      , boost::forward_traversal_tag
-//                      > o(dummy_cons);
-//    
-//    std::copy(i, i, o);
-//}
-
-//BOOST_AUTO_TEST_CASE_TEMPLATE( test_copy, Order, orders )
-//{
-//    cursor_archetype< boost::null_archetype<>
-//                      , boost::iterator_archetypes::readable_iterator_t // Really lvalue?
-//                      , boost::forward_traversal_tag
-//                      , boost::tree::descending_vertical_traversal_tag
-//                      > i;
-//    cursor_archetype< boost::assignable_archetype<>
-//                      , boost::iterator_archetypes::writable_iterator_t // Really lvalue?
-//                      , boost::forward_traversal_tag
-//                      , boost::tree::descending_vertical_traversal_tag
-//                      > o;
-//    
-//    boost::tree::copy(Order(), i, o);
-//}
+BOOST_AUTO_TEST_CASE_TEMPLATE( test_copy, Order, orders )
+{
+    cursor_archetype< int // Really int?
+                      , boost::iterator_archetypes::readable_iterator_t
+                      , boost::forward_traversal_tag
+                      , boost::tree::descending_vertical_traversal_tag
+                      > i;
+    cursor_archetype< int // Really int?
+                      , boost::iterator_archetypes::writable_iterator_t
+                      , boost::forward_traversal_tag
+                      , boost::tree::descending_vertical_traversal_tag
+                      > o;
+    
+    o = boost::tree::copy(Order(), i, o);
+}
 
-//BOOST_AUTO_TEST_CASE_TEMPLATE( test_transform, Order, orders )
-//{
-//    boost::detail::dummy_constructor dummy_cons;
-//    cursor_archetype< boost::null_archetype<>
-//                      , boost::iterator_archetypes::readable_lvalue_iterator_t // Really lvalue?
-//                      , boost::forward_traversal_tag
-//                      , boost::tree::descending_vertical_traversal_tag
-//                      > i;
-//    cursor_archetype< boost::assignable_archetype<>
-//                      , boost::iterator_archetypes::writable_lvalue_iterator_t // Really lvalue?
-//                      , boost::forward_traversal_tag
-//                      , boost::tree::descending_vertical_traversal_tag
-//                      > o;
-//    boost::unary_function_archetype< boost::null_archetype<> , boost::null_archetype<> > 
-//      f(dummy_cons);
-//    
-//    boost::tree::transform(Order(), i, o, f);
-//}
+BOOST_AUTO_TEST_CASE_TEMPLATE( test_transform, Order, orders )
+{
+    boost::detail::dummy_constructor dummy_cons;
+    cursor_archetype< int // Really int?
+                      , boost::iterator_archetypes::readable_iterator_t
+                      , boost::forward_traversal_tag
+                      , boost::tree::descending_vertical_traversal_tag
+                      > i;
+    cursor_archetype< int // Really int?
+                      , boost::iterator_archetypes::writable_iterator_t 
+                      , boost::forward_traversal_tag
+                      , boost::tree::descending_vertical_traversal_tag
+                      > o;
+    boost::unary_function_archetype< int , int > // Really int?
+      f(dummy_cons);
+    
+    o = boost::tree::transform(Order(), i, o, f);
+}
 
 BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file