Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2008-06-25 06:38:17


Hello,

currently any_test and doc_any_hook fail on Tru64/CXX with the following
errors:

cxx: Error: ../boost/intrusive/detail/any_node_and_algorithms.hpp, line
276: class template "boost::intrusive::any_algorithms<VoidPointer>" has no
member "unlink_not_available_for_any_hooks"
           (notmember)
       any_algorithms<VoidPointer>::unlink_not_available_for_any_hooks();
-----------------------------------^
cxx: Error: ../boost/intrusive/detail/any_node_and_algorithms.hpp, line
283: class template "boost::intrusive::any_algorithms<VoidPointer>" has no
member "swap_nodes_not_available_for_any_hooks"
           (notmember)
       any_algorithms<VoidPointer>::swap_nodes_not_available_for_any_hooks();
-----------------------------------^

AFAICT this is the only EDG based compiler which tests in strict Ansi mode,
adding -strict_ansi to the other EDG based compilers (acc for example)
would probably lead to the same error.

Attached patch contains a proposed fix for this. It checks for __EDG__ and
__STD_STRICT_ANSI to enable the fix and works for me locally.

The patch should replace the compile error by a link error, because in
strict Ansi mode EDG doesn't allow you to refer to non-existing names.

OK to apply?

Regards,
Markus

Index: detail/any_node_and_algorithms.hpp
===================================================================
--- detail/any_node_and_algorithms.hpp (revision 46676)
+++ detail/any_node_and_algorithms.hpp (working copy)
@@ -269,6 +269,11 @@
    static bool unique(const_node_ptr node)
    { return 0 == node->node_ptr_1; }
 
+
+#if defined(__EDG__) && defined(__STD_STRICT_ANSI)
+ static void unlink(node_ptr);
+ static void swap_nodes(node_ptr l, node_ptr r);
+#else
    static void unlink(node_ptr)
    {
       //Auto-unlink hooks and unlink() call for safe hooks are not
@@ -282,6 +287,7 @@
       //what algorithm they must use from unlink them from the container
       any_algorithms<VoidPointer>::swap_nodes_not_available_for_any_hooks();
    }
+#endif
 };
 
 } //namespace intrusive


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk