Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2007-09-14 18:24:47


Author: danieljames
Date: 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
New Revision: 39287
URL: http://svn.boost.org/trac/boost/changeset/39287

Log:
Merge from trunk.

Added:
   branches/hash/boost/python/converter/pytype_function.hpp
      - copied unchanged from r39286, /trunk/boost/python/converter/pytype_function.hpp
   branches/hash/boost/python/detail/python_type.hpp
      - copied unchanged from r39286, /trunk/boost/python/detail/python_type.hpp
   branches/hash/boost/python/detail/unwind_type.hpp
      - copied unchanged from r39286, /trunk/boost/python/detail/unwind_type.hpp
   branches/hash/boost/python/object/function_doc_signature.hpp
      - copied unchanged from r39286, /trunk/boost/python/object/function_doc_signature.hpp
   branches/hash/boost/type_traits/is_complex.hpp
      - copied unchanged from r39286, /trunk/boost/type_traits/is_complex.hpp
   branches/hash/boost/type_traits/make_signed.hpp
      - copied unchanged from r39286, /trunk/boost/type_traits/make_signed.hpp
   branches/hash/boost/type_traits/make_unsigned.hpp
      - copied unchanged from r39286, /trunk/boost/type_traits/make_unsigned.hpp
   branches/hash/boost/typeof/dmc/
      - copied from r39286, /trunk/boost/typeof/dmc/
   branches/hash/boost/typeof/dmc/typeof_impl.hpp
      - copied unchanged from r39286, /trunk/boost/typeof/dmc/typeof_impl.hpp
   branches/hash/doc/html/minimal.css
      - copied unchanged from r39286, /trunk/doc/html/minimal.css
   branches/hash/libs/python/doc/v2/function_doc_signature.html
      - copied unchanged from r39286, /trunk/libs/python/doc/v2/function_doc_signature.html
   branches/hash/libs/python/doc/v2/pytype_function.html
      - copied unchanged from r39286, /trunk/libs/python/doc/v2/pytype_function.html
   branches/hash/libs/python/src/object/function_doc_signature.cpp
      - copied unchanged from r39286, /trunk/libs/python/src/object/function_doc_signature.cpp
   branches/hash/libs/python/test/a_map_indexing_suite.cpp
      - copied unchanged from r39286, /trunk/libs/python/test/a_map_indexing_suite.cpp
   branches/hash/libs/python/test/pytype_function.cpp
      - copied unchanged from r39286, /trunk/libs/python/test/pytype_function.cpp
   branches/hash/libs/python/test/pytype_function.py
      - copied unchanged from r39286, /trunk/libs/python/test/pytype_function.py
   branches/hash/libs/system/doc/index.html
      - copied unchanged from r39286, /trunk/libs/system/doc/index.html
   branches/hash/libs/system/doc/reference.html
      - copied unchanged from r39286, /trunk/libs/system/doc/reference.html
   branches/hash/libs/system/test/header_only_test.cpp
      - copied unchanged from r39286, /trunk/libs/system/test/header_only_test.cpp
   branches/hash/libs/type_traits/doc/add_const.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/add_const.qbk
   branches/hash/libs/type_traits/doc/add_cv.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/add_cv.qbk
   branches/hash/libs/type_traits/doc/add_pointer.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/add_pointer.qbk
   branches/hash/libs/type_traits/doc/add_reference.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/add_reference.qbk
   branches/hash/libs/type_traits/doc/add_volatile.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/add_volatile.qbk
   branches/hash/libs/type_traits/doc/aligned_storage.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/aligned_storage.qbk
   branches/hash/libs/type_traits/doc/alignment_of.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/alignment_of.qbk
   branches/hash/libs/type_traits/doc/alignment_traits.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/alignment_traits.qbk
   branches/hash/libs/type_traits/doc/background.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/background.qbk
   branches/hash/libs/type_traits/doc/credits.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/credits.qbk
   branches/hash/libs/type_traits/doc/decay.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/decay.qbk
   branches/hash/libs/type_traits/doc/decomposing_func.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/decomposing_func.qbk
   branches/hash/libs/type_traits/doc/examples.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/examples.qbk
   branches/hash/libs/type_traits/doc/extent.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/extent.qbk
   branches/hash/libs/type_traits/doc/floating_point_promotion.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/floating_point_promotion.qbk
   branches/hash/libs/type_traits/doc/function_traits.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/function_traits.qbk
   branches/hash/libs/type_traits/doc/has_nothrow_assign.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/has_nothrow_assign.qbk
   branches/hash/libs/type_traits/doc/has_nothrow_constructor.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/has_nothrow_constructor.qbk
   branches/hash/libs/type_traits/doc/has_nothrow_copy.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/has_nothrow_copy.qbk
   branches/hash/libs/type_traits/doc/has_trivial_assign.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/has_trivial_assign.qbk
   branches/hash/libs/type_traits/doc/has_trivial_constructor.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/has_trivial_constructor.qbk
   branches/hash/libs/type_traits/doc/has_trivial_copy.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/has_trivial_copy.qbk
   branches/hash/libs/type_traits/doc/has_trivial_destructor.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/has_trivial_destructor.qbk
   branches/hash/libs/type_traits/doc/has_virtual_destructor.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/has_virtual_destructor.qbk
   branches/hash/libs/type_traits/doc/html/
      - copied from r39286, /trunk/libs/type_traits/doc/html/
   branches/hash/libs/type_traits/doc/html/boost_typetraits/
      - copied from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/
   branches/hash/libs/type_traits/doc/html/boost_typetraits/background.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/background.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/category/
      - copied from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/category/
   branches/hash/libs/type_traits/doc/html/boost_typetraits/category.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/category.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/category/alignment.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/category/alignment.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/category/background.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/category/background.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/category/function.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/category/function.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/category/transform.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/category/transform.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/category/value_traits/
      - copied from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/category/value_traits/
   branches/hash/libs/type_traits/doc/html/boost_typetraits/category/value_traits.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/category/value_traits.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/category/value_traits/primary.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/category/value_traits/primary.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/category/value_traits/properties.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/category/value_traits/properties.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/category/value_traits/relate.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/category/value_traits/relate.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/credits.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/credits.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/examples/
      - copied from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/examples/
   branches/hash/libs/type_traits/doc/html/boost_typetraits/examples.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/examples.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/examples/copy.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/examples/copy.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/examples/destruct.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/examples/destruct.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/examples/fill.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/examples/fill.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/examples/iter.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/examples/iter.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/examples/to_double.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/examples/to_double.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/intrinsics.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/intrinsics.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/intro.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/intro.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/mpl.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/mpl.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/
      - copied from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/add_const.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_const.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/add_cv.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_cv.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/add_pointer.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_pointer.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/add_reference.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_reference.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/add_volatile.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/add_volatile.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/aligned_storage.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/aligned_storage.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/alignment_of.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/alignment_of.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/decay.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/decay.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/extent.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/extent.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/floating_point_promotion.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/floating_point_promotion.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/function_traits.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/function_traits.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/has_nothrow_assign.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/has_nothrow_assign.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/has_nothrow_constructor.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/has_nothrow_constructor.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/has_nothrow_copy.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/has_nothrow_copy.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/has_trivial_assign.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/has_trivial_assign.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/has_trivial_constructor.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/has_trivial_constructor.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/has_trivial_copy.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/has_trivial_copy.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/has_trivial_def_cons.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/has_trivial_def_cons.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/has_trivial_destructor.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/has_trivial_destructor.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/has_virtual_destructor.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/has_virtual_destructor.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/integral_constant.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/integral_constant.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/integral_promotion.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/integral_promotion.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_abstract.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_abstract.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_arithmetic.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_arithmetic.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_array.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_array.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_base_of.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_base_of.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_class.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_class.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_complex.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_complex.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_compound.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_compound.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_const.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_const.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_convertible.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_convertible.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_empty.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_empty.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_enum.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_enum.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_floating_point.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_floating_point.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_function.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_function.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_fundamental.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_fundamental.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_integral.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_integral.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_member_function_pointer.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_member_function_pointer.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_member_object_pointer.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_member_object_pointer.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_member_pointer.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_member_pointer.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_object.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_object.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_pod.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_pod.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_pointer.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_pointer.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_polymorphic.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_polymorphic.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_reference.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_reference.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_same.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_same.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_scalar.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_scalar.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_signed.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_signed.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_stateless.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_stateless.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_union.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_union.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_unsigned.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_unsigned.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_void.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_void.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/is_volatile.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/is_volatile.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/make_signed.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/make_signed.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/make_unsigned.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/make_unsigned.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/promote.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/promote.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/rank.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/rank.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/remove_all_extents.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_all_extents.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/remove_const.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_const.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/remove_cv.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_cv.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/remove_extent.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_extent.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/remove_pointer.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_pointer.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/remove_reference.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_reference.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/remove_volatile.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/remove_volatile.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/reference/type_with_alignment.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/reference/type_with_alignment.html
   branches/hash/libs/type_traits/doc/html/boost_typetraits/user_defined.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/boost_typetraits/user_defined.html
   branches/hash/libs/type_traits/doc/html/index.html
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/html/index.html
   branches/hash/libs/type_traits/doc/integral_constant.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/integral_constant.qbk
   branches/hash/libs/type_traits/doc/integral_promotion.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/integral_promotion.qbk
   branches/hash/libs/type_traits/doc/intrinsics.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/intrinsics.qbk
   branches/hash/libs/type_traits/doc/is_abstract.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_abstract.qbk
   branches/hash/libs/type_traits/doc/is_arithmetic.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_arithmetic.qbk
   branches/hash/libs/type_traits/doc/is_array.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_array.qbk
   branches/hash/libs/type_traits/doc/is_base_of.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_base_of.qbk
   branches/hash/libs/type_traits/doc/is_class.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_class.qbk
   branches/hash/libs/type_traits/doc/is_complex.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_complex.qbk
   branches/hash/libs/type_traits/doc/is_compound.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_compound.qbk
   branches/hash/libs/type_traits/doc/is_const.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_const.qbk
   branches/hash/libs/type_traits/doc/is_convertible.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_convertible.qbk
   branches/hash/libs/type_traits/doc/is_empty.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_empty.qbk
   branches/hash/libs/type_traits/doc/is_enum.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_enum.qbk
   branches/hash/libs/type_traits/doc/is_floating_point.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_floating_point.qbk
   branches/hash/libs/type_traits/doc/is_function.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_function.qbk
   branches/hash/libs/type_traits/doc/is_fundamental.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_fundamental.qbk
   branches/hash/libs/type_traits/doc/is_integral.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_integral.qbk
   branches/hash/libs/type_traits/doc/is_member_function_pointer.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_member_function_pointer.qbk
   branches/hash/libs/type_traits/doc/is_member_object_pointer.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_member_object_pointer.qbk
   branches/hash/libs/type_traits/doc/is_member_pointer.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_member_pointer.qbk
   branches/hash/libs/type_traits/doc/is_object.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_object.qbk
   branches/hash/libs/type_traits/doc/is_pod.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_pod.qbk
   branches/hash/libs/type_traits/doc/is_pointer.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_pointer.qbk
   branches/hash/libs/type_traits/doc/is_polymorphic.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_polymorphic.qbk
   branches/hash/libs/type_traits/doc/is_reference.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_reference.qbk
   branches/hash/libs/type_traits/doc/is_same.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_same.qbk
   branches/hash/libs/type_traits/doc/is_scalar.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_scalar.qbk
   branches/hash/libs/type_traits/doc/is_signed.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_signed.qbk
   branches/hash/libs/type_traits/doc/is_stateless.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_stateless.qbk
   branches/hash/libs/type_traits/doc/is_union.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_union.qbk
   branches/hash/libs/type_traits/doc/is_unsigned.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_unsigned.qbk
   branches/hash/libs/type_traits/doc/is_void.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_void.qbk
   branches/hash/libs/type_traits/doc/is_volatile.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/is_volatile.qbk
   branches/hash/libs/type_traits/doc/make_signed.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/make_signed.qbk
   branches/hash/libs/type_traits/doc/make_unsigned.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/make_unsigned.qbk
   branches/hash/libs/type_traits/doc/mpl.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/mpl.qbk
   branches/hash/libs/type_traits/doc/promote.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/promote.qbk
   branches/hash/libs/type_traits/doc/rank.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/rank.qbk
   branches/hash/libs/type_traits/doc/remove_all_extents.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/remove_all_extents.qbk
   branches/hash/libs/type_traits/doc/remove_const.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/remove_const.qbk
   branches/hash/libs/type_traits/doc/remove_cv.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/remove_cv.qbk
   branches/hash/libs/type_traits/doc/remove_extent.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/remove_extent.qbk
   branches/hash/libs/type_traits/doc/remove_pointer.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/remove_pointer.qbk
   branches/hash/libs/type_traits/doc/remove_reference.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/remove_reference.qbk
   branches/hash/libs/type_traits/doc/remove_volatile.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/remove_volatile.qbk
   branches/hash/libs/type_traits/doc/transform_traits.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/transform_traits.qbk
   branches/hash/libs/type_traits/doc/type_with_alignment.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/type_with_alignment.qbk
   branches/hash/libs/type_traits/doc/user_defined.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/user_defined.qbk
   branches/hash/libs/type_traits/doc/value_traits.qbk
      - copied unchanged from r39286, /trunk/libs/type_traits/doc/value_traits.qbk
   branches/hash/libs/type_traits/test/is_complex_test.cpp
      - copied unchanged from r39286, /trunk/libs/type_traits/test/is_complex_test.cpp
   branches/hash/libs/type_traits/test/make_signed_test.cpp
      - copied unchanged from r39286, /trunk/libs/type_traits/test/make_signed_test.cpp
   branches/hash/libs/type_traits/test/make_unsigned_test.cpp
      - copied unchanged from r39286, /trunk/libs/type_traits/test/make_unsigned_test.cpp
   branches/hash/more/report-oct-2007.html
      - copied unchanged from r39286, /trunk/more/report-oct-2007.html
   branches/hash/tools/build/v2/test/free_features_request.py
      - copied unchanged from r39286, /trunk/tools/build/v2/test/free_features_request.py
   branches/hash/tools/regression/boost_svn_export_archive.sh
      - copied unchanged from r39286, /trunk/tools/regression/boost_svn_export_archive.sh
   branches/hash/tools/regression/xsl_reports/build_results.sh
      - copied unchanged from r39286, /trunk/tools/regression/xsl_reports/build_results.sh
Removed:
   branches/hash/boost/filesystem/cerrno.hpp
   branches/hash/libs/system/build/Jamfile
   branches/hash/libs/system/doc/error_code.html
   branches/hash/libs/system/doc/system_error.html
Properties modified:
   branches/hash/ (props changed)
Text files modified:
   branches/hash/Jamroot | 3
   branches/hash/boost/asio/buffer.hpp | 7
   branches/hash/boost/asio/detail/epoll_reactor.hpp | 21
   branches/hash/boost/asio/detail/kqueue_reactor.hpp | 31
   branches/hash/boost/asio/detail/null_event.hpp | 9
   branches/hash/boost/asio/detail/posix_event.hpp | 40
   branches/hash/boost/asio/detail/posix_mutex.hpp | 10
   branches/hash/boost/asio/detail/posix_thread.hpp | 3
   branches/hash/boost/asio/detail/posix_tss_ptr.hpp | 3
   branches/hash/boost/asio/detail/reactive_socket_service.hpp | 8
   branches/hash/boost/asio/detail/scoped_lock.hpp | 12
   branches/hash/boost/asio/detail/socket_ops.hpp | 9
   branches/hash/boost/asio/detail/socket_types.hpp | 1
   branches/hash/boost/asio/detail/strand_service.hpp | 8
   branches/hash/boost/asio/detail/task_io_service.hpp | 99
   branches/hash/boost/asio/detail/win_event.hpp | 21
   branches/hash/boost/asio/detail/win_iocp_io_service.hpp | 14
   branches/hash/boost/asio/detail/win_iocp_socket_service.hpp | 52
   branches/hash/boost/asio/detail/win_mutex.hpp | 5
   branches/hash/boost/asio/detail/win_thread.hpp | 4
   branches/hash/boost/asio/detail/win_tss_ptr.hpp | 4
   branches/hash/boost/asio/detail/winsock_init.hpp | 3
   branches/hash/boost/asio/detail/wrapped_handler.hpp | 14
   branches/hash/boost/asio/error.hpp | 598 +++----
   branches/hash/boost/asio/impl/io_service.ipp | 4
   branches/hash/boost/asio/impl/read_until.ipp | 18
   branches/hash/boost/asio/io_service.hpp | 2
   branches/hash/boost/asio/ip/basic_endpoint.hpp | 32
   branches/hash/boost/asio/ssl/detail/openssl_operation.hpp | 4
   branches/hash/boost/cerrno.hpp | 150 +
   branches/hash/boost/concept/detail/has_constraints.hpp | 10
   branches/hash/boost/config/compiler/borland.hpp | 2
   branches/hash/boost/config/compiler/gcc.hpp | 6
   branches/hash/boost/config/compiler/hp_acc.hpp | 3
   branches/hash/boost/config/compiler/intel.hpp | 5
   branches/hash/boost/config/compiler/sunpro_cc.hpp | 6
   branches/hash/boost/config/compiler/visualc.hpp | 2
   branches/hash/boost/config/platform/hpux.hpp | 9
   branches/hash/boost/config/stdlib/roguewave.hpp | 13
   branches/hash/boost/config/suffix.hpp | 2
   branches/hash/boost/date_time/compiler_config.hpp | 2
   branches/hash/boost/date_time/format_date_parser.hpp | 2
   branches/hash/boost/date_time/time_facet.hpp | 2
   branches/hash/boost/detail/lightweight_mutex.hpp | 4
   branches/hash/boost/filesystem/convenience.hpp | 35
   branches/hash/boost/filesystem/operations.hpp | 15
   branches/hash/boost/filesystem/path.hpp | 84
   branches/hash/boost/function/function_base.hpp | 25
   branches/hash/boost/function/function_template.hpp | 303 ++-
   branches/hash/boost/graph/max_cardinality_matching.hpp | 309 ++-
   branches/hash/boost/integer.hpp | 2
   branches/hash/boost/iostreams/detail/push.hpp | 4
   branches/hash/boost/mpi/communicator.hpp | 6
   branches/hash/boost/mpi/status.hpp | 12
   branches/hash/boost/mpl/aux_/integral_wrapper.hpp | 2
   branches/hash/boost/numeric/ublas/lu.hpp | 6
   branches/hash/boost/parameter/aux_/arg_list.hpp | 5
   branches/hash/boost/python/converter/as_to_python_function.hpp | 3
   branches/hash/boost/python/converter/builtin_converters.hpp | 48
   branches/hash/boost/python/converter/pyobject_traits.hpp | 3
   branches/hash/boost/python/converter/pyobject_type.hpp | 5
   branches/hash/boost/python/converter/registrations.hpp | 9
   branches/hash/boost/python/converter/registry.hpp | 6
   branches/hash/boost/python/converter/shared_ptr_from_python.hpp | 9
   branches/hash/boost/python/default_call_policies.hpp | 7
   branches/hash/boost/python/detail/caller.hpp | 45
   branches/hash/boost/python/detail/config.hpp | 4
   branches/hash/boost/python/detail/defaults_def.hpp | 2
   branches/hash/boost/python/detail/defaults_gen.hpp | 4
   branches/hash/boost/python/detail/make_keyword_range_fn.hpp | 3
   branches/hash/boost/python/detail/signature.hpp | 28
   branches/hash/boost/python/docstring_options.hpp | 73
   branches/hash/boost/python/enum.hpp | 8
   branches/hash/boost/python/implicit.hpp | 9
   branches/hash/boost/python/init.hpp | 6
   branches/hash/boost/python/lvalue_from_pytype.hpp | 17
   branches/hash/boost/python/make_constructor.hpp | 10
   branches/hash/boost/python/object/class_metadata.hpp | 16
   branches/hash/boost/python/object/class_wrapper.hpp | 13
   branches/hash/boost/python/object/enum_base.hpp | 4
   branches/hash/boost/python/object/function.hpp | 2
   branches/hash/boost/python/object/make_holder.hpp | 10
   branches/hash/boost/python/object/make_ptr_instance.hpp | 7
   branches/hash/boost/python/object/py_function.hpp | 23
   branches/hash/boost/python/object_core.hpp | 3
   branches/hash/boost/python/opaque_pointer_converter.hpp | 8
   branches/hash/boost/python/return_arg.hpp | 14
   branches/hash/boost/python/to_python_converter.hpp | 71
   branches/hash/boost/python/to_python_indirect.hpp | 12
   branches/hash/boost/python/to_python_value.hpp | 56
   branches/hash/boost/range/as_literal.hpp | 2
   branches/hash/boost/regex/config.hpp | 2
   branches/hash/boost/shared_ptr.hpp | 2
   branches/hash/boost/system/config.hpp | 2
   branches/hash/boost/system/error_code.hpp | 637 +++++++
   branches/hash/boost/system/system_error.hpp | 63
   branches/hash/boost/tr1/detail/config.hpp | 56
   branches/hash/boost/type_traits.hpp | 4
   branches/hash/boost/type_traits/has_nothrow_constructor.hpp | 1
   branches/hash/boost/type_traits/has_nothrow_copy.hpp | 1
   branches/hash/boost/type_traits/has_trivial_constructor.hpp | 1
   branches/hash/boost/type_traits/has_trivial_copy.hpp | 1
   branches/hash/boost/type_traits/is_base_and_derived.hpp | 8
   branches/hash/boost/type_traits/is_signed.hpp | 4
   branches/hash/boost/type_traits/is_unsigned.hpp | 4
   branches/hash/boost/typeof/typeof.hpp | 10
   branches/hash/boost/utility/value_init.hpp | 84 +
   branches/hash/boost/xpressive/detail/core/action.hpp | 2
   branches/hash/boost/xpressive/detail/core/peeker.hpp | 4
   branches/hash/boost/xpressive/detail/static/transforms/as_marker.hpp | 2
   branches/hash/boost/xpressive/detail/static/transforms/as_matcher.hpp | 2
   branches/hash/boost/xpressive/detail/static/transforms/as_quantifier.hpp | 8
   branches/hash/boost/xpressive/detail/utility/symbols.hpp | 171 +
   branches/hash/boost/xpressive/regex_primitives.hpp | 26
   branches/hash/doc/Jamfile.v2 | 5
   branches/hash/doc/src/boost.xml | 12
   branches/hash/libs/asio/example/allocation/Jamfile.v2 | 2
   branches/hash/libs/asio/example/buffers/Jamfile.v2 | 2
   branches/hash/libs/asio/example/chat/Jamfile.v2 | 2
   branches/hash/libs/asio/example/echo/Jamfile.v2 | 2
   branches/hash/libs/asio/example/http/client/Jamfile.v2 | 2
   branches/hash/libs/asio/example/http/server/Jamfile.v2 | 2
   branches/hash/libs/asio/example/http/server/connection.cpp | 3
   branches/hash/libs/asio/example/http/server2/Jamfile.v2 | 2
   branches/hash/libs/asio/example/http/server2/connection.cpp | 3
   branches/hash/libs/asio/example/http/server3/Jamfile.v2 | 2
   branches/hash/libs/asio/example/http/server3/connection.cpp | 3
   branches/hash/libs/asio/example/invocation/Jamfile.v2 | 2
   branches/hash/libs/asio/example/iostreams/Jamfile.v2 | 2
   branches/hash/libs/asio/example/multicast/Jamfile.v2 | 2
   branches/hash/libs/asio/example/serialization/Jamfile.v2 | 2
   branches/hash/libs/asio/example/services/Jamfile.v2 | 2
   branches/hash/libs/asio/example/socks4/Jamfile.v2 | 2
   branches/hash/libs/asio/example/ssl/Jamfile.v2 | 2
   branches/hash/libs/asio/example/timeouts/Jamfile.v2 | 2
   branches/hash/libs/asio/example/timers/Jamfile.v2 | 2
   branches/hash/libs/asio/example/tutorial/Jamfile.v2 | 2
   branches/hash/libs/asio/test/Jamfile | 5
   branches/hash/libs/asio/test/Jamfile.v2 | 2
   branches/hash/libs/asio/test/error.cpp | 4
   branches/hash/libs/asio/test/ip/v6_only.cpp | 6
   branches/hash/libs/asio/test/is_read_buffered.cpp | 16
   branches/hash/libs/asio/test/is_write_buffered.cpp | 16
   branches/hash/libs/asio/test/ssl/Jamfile.v2 | 2
   branches/hash/libs/config/test/Jamfile.v2 | 3
   branches/hash/libs/filesystem/build/Jamfile.v2 | 10
   branches/hash/libs/filesystem/src/operations.cpp | 208 +
   branches/hash/libs/filesystem/src/path.cpp | 58
   branches/hash/libs/filesystem/test/Jamfile.v2 | 5
   branches/hash/libs/filesystem/test/convenience_test.cpp | 96 +
   branches/hash/libs/filesystem/test/operations_test.cpp | 70
   branches/hash/libs/filesystem/test/path_test.cpp | 2
   branches/hash/libs/graph/test/Jamfile.v2 | 2
   branches/hash/libs/graph/test/cycle_ratio_tests.cpp | 5
   branches/hash/libs/intrusive/doc/intrusive.qbk | 2
   branches/hash/libs/mpi/src/communicator.cpp | 2
   branches/hash/libs/numeric/ublas/doc/overview.htm | 2
   branches/hash/libs/python/build/Jamfile.v2 | 1
   branches/hash/libs/python/doc/news.html | 38
   branches/hash/libs/python/doc/v2/CallPolicies.html | 14
   branches/hash/libs/python/doc/v2/ResultConverter.html | 21
   branches/hash/libs/python/doc/v2/configuration.html | 35
   branches/hash/libs/python/doc/v2/default_call_policies.html | 3
   branches/hash/libs/python/doc/v2/docstring_options.html | 57
   branches/hash/libs/python/doc/v2/enum.html | 8
   branches/hash/libs/python/doc/v2/reference.html | 60
   branches/hash/libs/python/doc/v2/return_arg.html | 2
   branches/hash/libs/python/doc/v2/to_python_converter.html | 27
   branches/hash/libs/python/example/std_pair.cpp | 5
   branches/hash/libs/python/src/converter/builtin_converters.cpp | 20
   branches/hash/libs/python/src/converter/registry.cpp | 52
   branches/hash/libs/python/src/dict.cpp | 10
   branches/hash/libs/python/src/list.cpp | 10
   branches/hash/libs/python/src/object/enum.cpp | 7
   branches/hash/libs/python/src/object/function.cpp | 43
   branches/hash/libs/python/src/str.cpp | 10
   branches/hash/libs/python/src/tuple.cpp | 11
   branches/hash/libs/python/test/Jamfile.v2 | 3
   branches/hash/libs/python/test/args.cpp | 24
   branches/hash/libs/python/test/args.py | 66
   branches/hash/libs/python/test/auto_ptr.py | 18
   branches/hash/libs/python/test/back_reference.py | 3
   branches/hash/libs/python/test/data_members.cpp | 3
   branches/hash/libs/python/test/defaults.cpp | 6
   branches/hash/libs/python/test/defaults.py | 35
   branches/hash/libs/python/test/docstring.cpp | 53
   branches/hash/libs/python/test/docstring.py | 115
   branches/hash/libs/python/test/implicit.py | 13
   branches/hash/libs/python/test/keywords_test.py | 4
   branches/hash/libs/python/test/m1.cpp | 5
   branches/hash/libs/python/test/map_indexing_suite.cpp | 69
   branches/hash/libs/python/test/newtest.py | 2
   branches/hash/libs/python/test/pickle1.cpp | 3
   branches/hash/libs/python/test/pickle2.cpp | 3
   branches/hash/libs/python/test/pickle3.cpp | 3
   branches/hash/libs/python/test/pickle4.cpp | 3
   branches/hash/libs/python/test/shared_ptr.cpp | 17
   branches/hash/libs/regex/example/Jamfile.v2 | 5
   branches/hash/libs/regex/example/snippets/regex_split_example_2.cpp | 1
   branches/hash/libs/regex/example/snippets/regex_token_iterator_eg_2.cpp | 1
   branches/hash/libs/regex/test/regress/test_regex_search.hpp | 37
   branches/hash/libs/serialization/test/A.hpp | 5
   branches/hash/libs/system/build/Jamfile.v2 | 4
   branches/hash/libs/system/src/error_code.cpp | 499 +++--
   branches/hash/libs/system/test/Jamfile.v2 | 17
   branches/hash/libs/system/test/error_code_test.cpp | 213 ++
   branches/hash/libs/system/test/error_code_user_test.cpp | 377 ++++
   branches/hash/libs/system/test/system_error_test.cpp | 44
   branches/hash/libs/tr1/test/Jamfile.v2 | 3
   branches/hash/libs/type_traits/cxx_type_traits.htm | 9
   branches/hash/libs/type_traits/doc/Jamfile.v2 | 51
   branches/hash/libs/type_traits/doc/type_traits.qbk | 3108 ++-------------------------------------
   branches/hash/libs/type_traits/index.html | 10
   branches/hash/libs/typeof/doc/typeof.qbk | 10
   branches/hash/libs/wave/samples/cpp_tokens/slex_token.hpp | 2
   branches/hash/libs/wave/test/build/Jamfile.v2 | 4
   branches/hash/more/formal_review_schedule.html | 35
   branches/hash/regression/.htaccess | 2
   branches/hash/status/Jamfile.v2 | 1
   branches/hash/status/explicit-failures-markup.xml | 16
   branches/hash/tools/build/v2/build-system.jam | 10
   branches/hash/tools/build/v2/build/project.jam | 7
   branches/hash/tools/build/v2/build/targets.jam | 12
   branches/hash/tools/build/v2/build/toolset.jam | 14
   branches/hash/tools/build/v2/build/virtual-target.jam | 93
   branches/hash/tools/build/v2/doc/src/faq.xml | 12
   branches/hash/tools/build/v2/test/BoostBuild.py | 147 +
   branches/hash/tools/build/v2/test/TestCmd.py | 6
   branches/hash/tools/build/v2/test/build_dir.py | 4
   branches/hash/tools/build/v2/test/gcc_runtime.py | 2
   branches/hash/tools/build/v2/test/project_glob.py | 33
   branches/hash/tools/build/v2/test/rebuilds.py | 3
   branches/hash/tools/build/v2/test/remove_requirement.py | 4
   branches/hash/tools/build/v2/test/test_all.py | 18
   branches/hash/tools/build/v2/test/tree.py | 10
   branches/hash/tools/build/v2/tools/builtin.jam | 8
   branches/hash/tools/build/v2/tools/gcc.jam | 75
   branches/hash/tools/build/v2/tools/types/lib.jam | 4
   branches/hash/tools/build/v2/user-config.jam | 2
   branches/hash/tools/build/v2/util/path.jam | 2
   branches/hash/tools/jam/src/builtins.c | 21
   branches/hash/tools/jam/src/jam.c | 5
   branches/hash/tools/regression/xsl_reports/email_maintainers.py | 39
   243 files changed, 5100 insertions(+), 5045 deletions(-)

Modified: branches/hash/Jamroot
==============================================================================
--- branches/hash/Jamroot (original)
+++ branches/hash/Jamroot 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -402,7 +402,8 @@
             {
                 noversion-file =
                   [ MATCH "(.*)-[0-9_]+([.]so)[.0-9]*" : $(name) ]
- [ MATCH "(.*)-[0-9_]+([.]a)" : $(name) ] ;
+ [ MATCH "(.*)-[0-9_]+([.]a)" : $(name) ]
+ [ MATCH "(.*)-[0-9_]+([.]dll[.]a)" : $(name) ] ;
             }
                         
             local new-name =

Modified: branches/hash/boost/asio/buffer.hpp
==============================================================================
--- branches/hash/boost/asio/buffer.hpp (original)
+++ branches/hash/boost/asio/buffer.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -543,9 +543,10 @@
         ? N * sizeof(PodType) : max_size_in_bytes));
 }
 
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) \
+ || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
 
-// Borland C++ thinks the overloads:
+// Borland C++ and Sun Studio think the overloads:
 //
 // unspecified buffer(boost::array<PodType, N>& array ...);
 //
@@ -611,6 +612,7 @@
 }
 
 #else // BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+ // || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
 
 /// Create a new modifiable buffer that represents the given POD array.
 template <typename PodType, std::size_t N>
@@ -651,6 +653,7 @@
 }
 
 #endif // BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+ // || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
 
 /// Create a new non-modifiable buffer that represents the given POD array.
 template <typename PodType, std::size_t N>

Modified: branches/hash/boost/asio/detail/epoll_reactor.hpp
==============================================================================
--- branches/hash/boost/asio/detail/epoll_reactor.hpp (original)
+++ branches/hash/boost/asio/detail/epoll_reactor.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -158,7 +158,8 @@
       int result = epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev);
       if (result != 0)
       {
- boost::system::error_code ec(errno, boost::system::native_ecat);
+ boost::system::error_code ec(errno,
+ boost::asio::error::system_category);
         read_op_queue_.dispatch_all_operations(descriptor, ec);
       }
     }
@@ -191,7 +192,8 @@
       int result = epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev);
       if (result != 0)
       {
- boost::system::error_code ec(errno, boost::system::native_ecat);
+ boost::system::error_code ec(errno,
+ boost::asio::error::system_category);
         write_op_queue_.dispatch_all_operations(descriptor, ec);
       }
     }
@@ -220,7 +222,8 @@
       int result = epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev);
       if (result != 0)
       {
- boost::system::error_code ec(errno, boost::system::native_ecat);
+ boost::system::error_code ec(errno,
+ boost::asio::error::system_category);
         except_op_queue_.dispatch_all_operations(descriptor, ec);
       }
     }
@@ -251,7 +254,8 @@
       int result = epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev);
       if (result != 0)
       {
- boost::system::error_code ec(errno, boost::system::native_ecat);
+ boost::system::error_code ec(errno,
+ boost::asio::error::system_category);
         write_op_queue_.dispatch_all_operations(descriptor, ec);
         except_op_queue_.dispatch_all_operations(descriptor, ec);
       }
@@ -428,7 +432,8 @@
         int result = epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev);
         if (result != 0)
         {
- ec = boost::system::error_code(errno, boost::system::native_ecat);
+ ec = boost::system::error_code(errno,
+ boost::asio::error::system_category);
           read_op_queue_.dispatch_all_operations(descriptor, ec);
           write_op_queue_.dispatch_all_operations(descriptor, ec);
           except_op_queue_.dispatch_all_operations(descriptor, ec);
@@ -486,8 +491,10 @@
     int fd = epoll_create(epoll_size);
     if (fd == -1)
     {
- boost::throw_exception(boost::system::system_error(
- boost::system::error_code(errno, boost::system::native_ecat),
+ boost::throw_exception(
+ boost::system::system_error(
+ boost::system::error_code(errno,
+ boost::asio::error::system_category),
             "epoll"));
     }
     return fd;

Modified: branches/hash/boost/asio/detail/kqueue_reactor.hpp
==============================================================================
--- branches/hash/boost/asio/detail/kqueue_reactor.hpp (original)
+++ branches/hash/boost/asio/detail/kqueue_reactor.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -151,7 +151,8 @@
       EV_SET(&event, descriptor, EVFILT_READ, EV_ADD, 0, 0, 0);
       if (::kevent(kqueue_fd_, &event, 1, 0, 0, 0) == -1)
       {
- boost::system::error_code ec(errno, boost::system::native_ecat);
+ boost::system::error_code ec(errno,
+ boost::asio::error::system_category);
         read_op_queue_.dispatch_all_operations(descriptor, ec);
       }
     }
@@ -177,7 +178,8 @@
       EV_SET(&event, descriptor, EVFILT_WRITE, EV_ADD, 0, 0, 0);
       if (::kevent(kqueue_fd_, &event, 1, 0, 0, 0) == -1)
       {
- boost::system::error_code ec(errno, boost::system::native_ecat);
+ boost::system::error_code ec(errno,
+ boost::asio::error::system_category);
         write_op_queue_.dispatch_all_operations(descriptor, ec);
       }
     }
@@ -202,7 +204,8 @@
         EV_SET(&event, descriptor, EVFILT_READ, EV_ADD, EV_OOBAND, 0, 0);
       if (::kevent(kqueue_fd_, &event, 1, 0, 0, 0) == -1)
       {
- boost::system::error_code ec(errno, boost::system::native_ecat);
+ boost::system::error_code ec(errno,
+ boost::asio::error::system_category);
         except_op_queue_.dispatch_all_operations(descriptor, ec);
       }
     }
@@ -225,7 +228,8 @@
       EV_SET(&event, descriptor, EVFILT_WRITE, EV_ADD, 0, 0, 0);
       if (::kevent(kqueue_fd_, &event, 1, 0, 0, 0) == -1)
       {
- boost::system::error_code ec(errno, boost::system::native_ecat);
+ boost::system::error_code ec(errno,
+ boost::asio::error::system_category);
         write_op_queue_.dispatch_all_operations(descriptor, ec);
       }
     }
@@ -239,7 +243,8 @@
         EV_SET(&event, descriptor, EVFILT_READ, EV_ADD, EV_OOBAND, 0, 0);
       if (::kevent(kqueue_fd_, &event, 1, 0, 0, 0) == -1)
       {
- boost::system::error_code ec(errno, boost::system::native_ecat);
+ boost::system::error_code ec(errno,
+ boost::asio::error::system_category);
         except_op_queue_.dispatch_all_operations(descriptor, ec);
         write_op_queue_.dispatch_all_operations(descriptor, ec);
       }
@@ -393,7 +398,7 @@
         if (events[i].flags & EV_ERROR)
         {
           boost::system::error_code error(
- events[i].data, boost::system::native_ecat);
+ events[i].data, boost::asio::error::system_category);
           except_op_queue_.dispatch_all_operations(descriptor, error);
           read_op_queue_.dispatch_all_operations(descriptor, error);
         }
@@ -423,7 +428,8 @@
           EV_SET(&event, descriptor, EVFILT_READ, EV_DELETE, 0, 0, 0);
         if (::kevent(kqueue_fd_, &event, 1, 0, 0, 0) == -1)
         {
- boost::system::error_code error(errno, boost::system::native_ecat);
+ boost::system::error_code error(errno,
+ boost::asio::error::system_category);
           except_op_queue_.dispatch_all_operations(descriptor, error);
           read_op_queue_.dispatch_all_operations(descriptor, error);
         }
@@ -435,7 +441,7 @@
         if (events[i].flags & EV_ERROR)
         {
           boost::system::error_code error(
- events[i].data, boost::system::native_ecat);
+ events[i].data, boost::asio::error::system_category);
           write_op_queue_.dispatch_all_operations(descriptor, error);
         }
         else
@@ -452,7 +458,8 @@
           EV_SET(&event, descriptor, EVFILT_WRITE, EV_DELETE, 0, 0, 0);
         if (::kevent(kqueue_fd_, &event, 1, 0, 0, 0) == -1)
         {
- boost::system::error_code error(errno, boost::system::native_ecat);
+ boost::system::error_code error(errno,
+ boost::asio::error::system_category);
           write_op_queue_.dispatch_all_operations(descriptor, error);
         }
       }
@@ -506,8 +513,10 @@
     int fd = kqueue();
     if (fd == -1)
     {
- boost::throw_exception(boost::system::system_error(
- boost::system::error_code(errno, boost::system::native_ecat),
+ boost::throw_exception(
+ boost::system::system_error(
+ boost::system::error_code(errno,
+ boost::asio::error::system_category),
             "kqueue"));
     }
     return fd;

Modified: branches/hash/boost/asio/detail/null_event.hpp
==============================================================================
--- branches/hash/boost/asio/detail/null_event.hpp (original)
+++ branches/hash/boost/asio/detail/null_event.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -44,17 +44,20 @@
   }
 
   // Signal the event.
- void signal()
+ template <typename Lock>
+ void signal(Lock&)
   {
   }
 
   // Reset the event.
- void clear()
+ template <typename Lock>
+ void clear(Lock&)
   {
   }
 
   // Wait for the event to become signalled.
- void wait()
+ template <typename Lock>
+ void wait(Lock&)
   {
   }
 };

Modified: branches/hash/boost/asio/detail/posix_event.hpp
==============================================================================
--- branches/hash/boost/asio/detail/posix_event.hpp (original)
+++ branches/hash/boost/asio/detail/posix_event.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -25,10 +25,12 @@
 #if defined(BOOST_HAS_PTHREADS)
 
 #include <boost/asio/detail/push_options.hpp>
+#include <boost/assert.hpp>
 #include <boost/throw_exception.hpp>
 #include <pthread.h>
 #include <boost/asio/detail/pop_options.hpp>
 
+#include <boost/asio/error.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 
 namespace boost {
@@ -43,21 +45,11 @@
   posix_event()
     : signalled_(false)
   {
- int error = ::pthread_mutex_init(&mutex_, 0);
+ int error = ::pthread_cond_init(&cond_, 0);
     if (error != 0)
     {
       boost::system::system_error e(
- boost::system::error_code(error, boost::system::native_ecat),
- "event");
- boost::throw_exception(e);
- }
-
- error = ::pthread_cond_init(&cond_, 0);
- if (error != 0)
- {
- ::pthread_mutex_destroy(&mutex_);
- boost::system::system_error e(
- boost::system::error_code(error, boost::system::native_ecat),
+ boost::system::error_code(error, boost::asio::error::system_category),
           "event");
       boost::throw_exception(e);
     }
@@ -67,37 +59,37 @@
   ~posix_event()
   {
     ::pthread_cond_destroy(&cond_);
- ::pthread_mutex_destroy(&mutex_);
   }
 
   // Signal the event.
- void signal()
+ template <typename Lock>
+ void signal(Lock& lock)
   {
- ::pthread_mutex_lock(&mutex_); // Ignore EINVAL and EDEADLK.
+ BOOST_ASSERT(lock.locked());
+ (void)lock;
     signalled_ = true;
     ::pthread_cond_signal(&cond_); // Ignore EINVAL.
- ::pthread_mutex_unlock(&mutex_); // Ignore EINVAL and EPERM.
   }
 
   // Reset the event.
- void clear()
+ template <typename Lock>
+ void clear(Lock& lock)
   {
- ::pthread_mutex_lock(&mutex_); // Ignore EINVAL and EDEADLK.
+ BOOST_ASSERT(lock.locked());
+ (void)lock;
     signalled_ = false;
- ::pthread_mutex_unlock(&mutex_); // Ignore EINVAL and EPERM.
   }
 
   // Wait for the event to become signalled.
- void wait()
+ template <typename Lock>
+ void wait(Lock& lock)
   {
- ::pthread_mutex_lock(&mutex_); // Ignore EINVAL and EDEADLK.
+ BOOST_ASSERT(lock.locked());
     while (!signalled_)
- ::pthread_cond_wait(&cond_, &mutex_); // Ignore EINVAL.
- ::pthread_mutex_unlock(&mutex_); // Ignore EINVAL and EPERM.
+ ::pthread_cond_wait(&cond_, &lock.mutex().mutex_); // Ignore EINVAL.
   }
 
 private:
- ::pthread_mutex_t mutex_;
   ::pthread_cond_t cond_;
   bool signalled_;
 };

Modified: branches/hash/boost/asio/detail/posix_mutex.hpp
==============================================================================
--- branches/hash/boost/asio/detail/posix_mutex.hpp (original)
+++ branches/hash/boost/asio/detail/posix_mutex.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -29,6 +29,7 @@
 #include <pthread.h>
 #include <boost/asio/detail/pop_options.hpp>
 
+#include <boost/asio/error.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 #include <boost/asio/detail/scoped_lock.hpp>
 
@@ -36,6 +37,8 @@
 namespace asio {
 namespace detail {
 
+class posix_event;
+
 class posix_mutex
   : private noncopyable
 {
@@ -49,7 +52,7 @@
     if (error != 0)
     {
       boost::system::system_error e(
- boost::system::error_code(error, boost::system::native_ecat),
+ boost::system::error_code(error, boost::asio::error::system_category),
           "mutex");
       boost::throw_exception(e);
     }
@@ -68,7 +71,7 @@
     if (error != 0)
     {
       boost::system::system_error e(
- boost::system::error_code(error, boost::system::native_ecat),
+ boost::system::error_code(error, boost::asio::error::system_category),
           "mutex");
       boost::throw_exception(e);
     }
@@ -81,13 +84,14 @@
     if (error != 0)
     {
       boost::system::system_error e(
- boost::system::error_code(error, boost::system::native_ecat),
+ boost::system::error_code(error, boost::asio::error::system_category),
           "mutex");
       boost::throw_exception(e);
     }
   }
 
 private:
+ friend class posix_event;
   ::pthread_mutex_t mutex_;
 };
 

Modified: branches/hash/boost/asio/detail/posix_thread.hpp
==============================================================================
--- branches/hash/boost/asio/detail/posix_thread.hpp (original)
+++ branches/hash/boost/asio/detail/posix_thread.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -30,6 +30,7 @@
 #include <pthread.h>
 #include <boost/asio/detail/pop_options.hpp>
 
+#include <boost/asio/error.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 
 namespace boost {
@@ -53,7 +54,7 @@
     if (error != 0)
     {
       boost::system::system_error e(
- boost::system::error_code(error, boost::system::native_ecat),
+ boost::system::error_code(error, boost::asio::error::system_category),
           "thread");
       boost::throw_exception(e);
     }

Modified: branches/hash/boost/asio/detail/posix_tss_ptr.hpp
==============================================================================
--- branches/hash/boost/asio/detail/posix_tss_ptr.hpp (original)
+++ branches/hash/boost/asio/detail/posix_tss_ptr.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -29,6 +29,7 @@
 #include <pthread.h>
 #include <boost/asio/detail/pop_options.hpp>
 
+#include <boost/asio/error.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 
 namespace boost {
@@ -47,7 +48,7 @@
     if (error != 0)
     {
       boost::system::system_error e(
- boost::system::error_code(error, boost::system::native_ecat),
+ boost::system::error_code(error, boost::asio::error::system_category),
           "tss");
       boost::throw_exception(e);
     }

Modified: branches/hash/boost/asio/detail/reactive_socket_service.hpp
==============================================================================
--- branches/hash/boost/asio/detail/reactive_socket_service.hpp (original)
+++ branches/hash/boost/asio/detail/reactive_socket_service.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -158,7 +158,7 @@
 
     if (int err = reactor_.register_descriptor(sock.get()))
     {
- ec = boost::system::error_code(err, boost::system::native_ecat);
+ ec = boost::system::error_code(err, boost::asio::error::system_category);
       return ec;
     }
 
@@ -182,7 +182,7 @@
 
     if (int err = reactor_.register_descriptor(native_socket))
     {
- ec = boost::system::error_code(err, boost::system::native_ecat);
+ ec = boost::system::error_code(err, boost::asio::error::system_category);
       return ec;
     }
 
@@ -1125,7 +1125,7 @@
     bool operator()(const boost::system::error_code& result)
     {
       // Check whether the operation was successful.
- if (result != 0)
+ if (result)
       {
         io_service_.post(bind_handler(handler_, result, 0));
         return true;
@@ -1490,7 +1490,7 @@
       if (connect_error)
       {
         ec = boost::system::error_code(connect_error,
- boost::system::native_ecat);
+ boost::asio::error::system_category);
         io_service_.post(bind_handler(handler_, ec));
         return true;
       }

Modified: branches/hash/boost/asio/detail/scoped_lock.hpp
==============================================================================
--- branches/hash/boost/asio/detail/scoped_lock.hpp (original)
+++ branches/hash/boost/asio/detail/scoped_lock.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -64,6 +64,18 @@
     }
   }
 
+ // Test whether the lock is held.
+ bool locked() const
+ {
+ return locked_;
+ }
+
+ // Get the underlying mutex.
+ Mutex& mutex()
+ {
+ return mutex_;
+ }
+
 private:
   // The underlying mutex.
   Mutex& mutex_;

Modified: branches/hash/boost/asio/detail/socket_ops.hpp
==============================================================================
--- branches/hash/boost/asio/detail/socket_ops.hpp (original)
+++ branches/hash/boost/asio/detail/socket_ops.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -53,9 +53,10 @@
     boost::system::error_code& ec)
 {
 #if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
- ec = boost::system::error_code(WSAGetLastError(), boost::system::native_ecat);
+ ec = boost::system::error_code(WSAGetLastError(),
+ boost::asio::error::system_category);
 #else
- ec = boost::system::error_code(errno, boost::system::native_ecat);
+ ec = boost::system::error_code(errno, boost::asio::error::system_category);
 #endif
   return return_value;
 }
@@ -1519,10 +1520,10 @@
   default: // Possibly the non-portable EAI_SYSTEM.
 #if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
     return boost::system::error_code(
- WSAGetLastError(), boost::system::native_ecat);
+ WSAGetLastError(), boost::asio::error::system_category);
 #else
     return boost::system::error_code(
- errno, boost::system::native_ecat);
+ errno, boost::asio::error::system_category);
 #endif
   }
 }

Modified: branches/hash/boost/asio/detail/socket_types.hpp
==============================================================================
--- branches/hash/boost/asio/detail/socket_types.hpp (original)
+++ branches/hash/boost/asio/detail/socket_types.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -98,6 +98,7 @@
 # include <arpa/inet.h>
 # include <netdb.h>
 # include <net/if.h>
+# include <limits.h>
 # if defined(__sun)
 # include <sys/filio.h>
 # include <sys/sockio.h>

Modified: branches/hash/boost/asio/detail/strand_service.hpp
==============================================================================
--- branches/hash/boost/asio/detail/strand_service.hpp (original)
+++ branches/hash/boost/asio/detail/strand_service.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -417,14 +417,14 @@
     }
     else
     {
- boost::asio::detail::mutex::scoped_lock lock(impl->mutex_);
-
       // Allocate and construct an object to wrap the handler.
       typedef handler_wrapper<Handler> value_type;
       typedef handler_alloc_traits<Handler, value_type> alloc_traits;
       raw_handler_ptr<alloc_traits> raw_ptr(handler);
       handler_ptr<alloc_traits> ptr(raw_ptr, handler);
 
+ boost::asio::detail::mutex::scoped_lock lock(impl->mutex_);
+
       if (impl->current_handler_ == 0)
       {
         // This handler now has the lock, so can be dispatched immediately.
@@ -457,14 +457,14 @@
   template <typename Handler>
   void post(implementation_type& impl, Handler handler)
   {
- boost::asio::detail::mutex::scoped_lock lock(impl->mutex_);
-
     // Allocate and construct an object to wrap the handler.
     typedef handler_wrapper<Handler> value_type;
     typedef handler_alloc_traits<Handler, value_type> alloc_traits;
     raw_handler_ptr<alloc_traits> raw_ptr(handler);
     handler_ptr<alloc_traits> ptr(raw_ptr, handler);
 
+ boost::asio::detail::mutex::scoped_lock lock(impl->mutex_);
+
     if (impl->current_handler_ == 0)
     {
       // This handler now has the lock, so can be dispatched immediately.

Modified: branches/hash/boost/asio/detail/task_io_service.hpp
==============================================================================
--- branches/hash/boost/asio/detail/task_io_service.hpp (original)
+++ branches/hash/boost/asio/detail/task_io_service.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -40,6 +40,7 @@
     : boost::asio::detail::service_base<task_io_service<Task> >(io_service),
       mutex_(),
       task_(use_service<Task>(io_service)),
+ task_interrupted_(true),
       outstanding_work_(0),
       handler_queue_(&task_handler_),
       handler_queue_end_(&task_handler_),
@@ -80,8 +81,7 @@
     typename call_stack<task_io_service>::context ctx(this);
 
     idle_thread_info this_idle_thread;
- this_idle_thread.prev = &this_idle_thread;
- this_idle_thread.next = &this_idle_thread;
+ this_idle_thread.next = 0;
 
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
@@ -98,8 +98,7 @@
     typename call_stack<task_io_service>::context ctx(this);
 
     idle_thread_info this_idle_thread;
- this_idle_thread.prev = &this_idle_thread;
- this_idle_thread.next = &this_idle_thread;
+ this_idle_thread.next = 0;
 
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
 
@@ -134,7 +133,7 @@
   void stop()
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
- stop_all_threads();
+ stop_all_threads(lock);
   }
 
   // Reset in preparation for a subsequent run invocation.
@@ -156,7 +155,7 @@
   {
     boost::asio::detail::mutex::scoped_lock lock(mutex_);
     if (--outstanding_work_ == 0)
- stop_all_threads();
+ stop_all_threads(lock);
   }
 
   // Request invocation of the given handler.
@@ -201,9 +200,14 @@
     ++outstanding_work_;
 
     // Wake up a thread to execute the handler.
- if (!interrupt_one_idle_thread())
- if (task_handler_.next_ == 0 && handler_queue_end_ != &task_handler_)
+ if (!interrupt_one_idle_thread(lock))
+ {
+ if (!task_interrupted_)
+ {
+ task_interrupted_ = true;
         task_.interrupt();
+ }
+ }
   }
 
 private:
@@ -214,7 +218,7 @@
   {
     if (outstanding_work_ == 0 && !stopped_)
     {
- stop_all_threads();
+ stop_all_threads(lock);
       ec = boost::system::error_code();
       return 0;
     }
@@ -230,11 +234,14 @@
         handler_queue_ = h->next_;
         if (handler_queue_ == 0)
           handler_queue_end_ = 0;
- bool more_handlers = (handler_queue_ != 0);
- lock.unlock();
+ h->next_ = 0;
 
         if (h == &task_handler_)
         {
+ bool more_handlers = (handler_queue_ != 0);
+ task_interrupted_ = more_handlers || polling;
+ lock.unlock();
+
           // If the task has already run and we're polling then we're done.
           if (task_has_run && polling)
           {
@@ -252,6 +259,7 @@
         }
         else
         {
+ lock.unlock();
           handler_cleanup c(lock, *this);
 
           // Invoke the handler. May throw an exception.
@@ -264,31 +272,10 @@
       else if (this_idle_thread)
       {
         // Nothing to run right now, so just wait for work to do.
- if (first_idle_thread_)
- {
- this_idle_thread->next = first_idle_thread_;
- this_idle_thread->prev = first_idle_thread_->prev;
- first_idle_thread_->prev->next = this_idle_thread;
- first_idle_thread_->prev = this_idle_thread;
- }
+ this_idle_thread->next = first_idle_thread_;
         first_idle_thread_ = this_idle_thread;
- this_idle_thread->wakeup_event.clear();
- lock.unlock();
- this_idle_thread->wakeup_event.wait();
- lock.lock();
- if (this_idle_thread->next == this_idle_thread)
- {
- first_idle_thread_ = 0;
- }
- else
- {
- if (first_idle_thread_ == this_idle_thread)
- first_idle_thread_ = this_idle_thread->next;
- this_idle_thread->next->prev = this_idle_thread->prev;
- this_idle_thread->prev->next = this_idle_thread->next;
- this_idle_thread->next = this_idle_thread;
- this_idle_thread->prev = this_idle_thread;
- }
+ this_idle_thread->wakeup_event.clear(lock);
+ this_idle_thread->wakeup_event.wait(lock);
       }
       else
       {
@@ -302,39 +289,44 @@
   }
 
   // Stop the task and all idle threads.
- void stop_all_threads()
+ void stop_all_threads(
+ boost::asio::detail::mutex::scoped_lock& lock)
   {
     stopped_ = true;
- interrupt_all_idle_threads();
- if (task_handler_.next_ == 0 && handler_queue_end_ != &task_handler_)
+ interrupt_all_idle_threads(lock);
+ if (!task_interrupted_)
+ {
+ task_interrupted_ = true;
       task_.interrupt();
+ }
   }
 
   // Interrupt a single idle thread. Returns true if a thread was interrupted,
   // false if no running thread could be found to interrupt.
- bool interrupt_one_idle_thread()
+ bool interrupt_one_idle_thread(
+ boost::asio::detail::mutex::scoped_lock& lock)
   {
     if (first_idle_thread_)
     {
- first_idle_thread_->wakeup_event.signal();
- first_idle_thread_ = first_idle_thread_->next;
+ idle_thread_info* idle_thread = first_idle_thread_;
+ first_idle_thread_ = idle_thread->next;
+ idle_thread->next = 0;
+ idle_thread->wakeup_event.signal(lock);
       return true;
     }
     return false;
   }
 
   // Interrupt all idle threads.
- void interrupt_all_idle_threads()
+ void interrupt_all_idle_threads(
+ boost::asio::detail::mutex::scoped_lock& lock)
   {
- if (first_idle_thread_)
+ while (first_idle_thread_)
     {
- first_idle_thread_->wakeup_event.signal();
- idle_thread_info* current_idle_thread = first_idle_thread_->next;
- while (current_idle_thread != first_idle_thread_)
- {
- current_idle_thread->wakeup_event.signal();
- current_idle_thread = current_idle_thread->next;
- }
+ idle_thread_info* idle_thread = first_idle_thread_;
+ first_idle_thread_ = idle_thread->next;
+ idle_thread->next = 0;
+ idle_thread->wakeup_event.signal(lock);
     }
   }
 
@@ -440,6 +432,7 @@
     {
       // Reinsert the task at the end of the handler queue.
       lock_.lock();
+ task_io_service_.task_interrupted_ = true;
       task_io_service_.task_handler_.next_ = 0;
       if (task_io_service_.handler_queue_end_)
       {
@@ -478,7 +471,7 @@
     {
       lock_.lock();
       if (--task_io_service_.outstanding_work_ == 0)
- task_io_service_.stop_all_threads();
+ task_io_service_.stop_all_threads(lock_);
     }
 
   private:
@@ -503,6 +496,9 @@
     }
   } task_handler_;
 
+ // Whether the task has been interrupted.
+ bool task_interrupted_;
+
   // The count of unfinished work.
   int outstanding_work_;
 
@@ -522,7 +518,6 @@
   struct idle_thread_info
   {
     event wakeup_event;
- idle_thread_info* prev;
     idle_thread_info* next;
   };
 

Modified: branches/hash/boost/asio/detail/win_event.hpp
==============================================================================
--- branches/hash/boost/asio/detail/win_event.hpp (original)
+++ branches/hash/boost/asio/detail/win_event.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -24,10 +24,12 @@
 
 #if defined(BOOST_WINDOWS)
 
+#include <boost/asio/error.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 #include <boost/asio/detail/socket_types.hpp>
 
 #include <boost/asio/detail/push_options.hpp>
+#include <boost/assert.hpp>
 #include <boost/throw_exception.hpp>
 #include <boost/asio/detail/pop_options.hpp>
 
@@ -47,7 +49,8 @@
     {
       DWORD last_error = ::GetLastError();
       boost::system::system_error e(
- boost::system::error_code(last_error, boost::system::native_ecat),
+ boost::system::error_code(last_error,
+ boost::asio::error::system_category),
           "event");
       boost::throw_exception(e);
     }
@@ -60,21 +63,31 @@
   }
 
   // Signal the event.
- void signal()
+ template <typename Lock>
+ void signal(Lock& lock)
   {
+ BOOST_ASSERT(lock.locked());
+ (void)lock;
     ::SetEvent(event_);
   }
 
   // Reset the event.
- void clear()
+ template <typename Lock>
+ void clear(Lock& lock)
   {
+ BOOST_ASSERT(lock.locked());
+ (void)lock;
     ::ResetEvent(event_);
   }
 
   // Wait for the event to become signalled.
- void wait()
+ template <typename Lock>
+ void wait(Lock& lock)
   {
+ BOOST_ASSERT(lock.locked());
+ lock.unlock();
     ::WaitForSingleObject(event_, INFINITE);
+ lock.lock();
   }
 
 private:

Modified: branches/hash/boost/asio/detail/win_iocp_io_service.hpp
==============================================================================
--- branches/hash/boost/asio/detail/win_iocp_io_service.hpp (original)
+++ branches/hash/boost/asio/detail/win_iocp_io_service.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -64,7 +64,8 @@
     {
       DWORD last_error = ::GetLastError();
       boost::system::system_error e(
- boost::system::error_code(last_error, boost::system::native_ecat),
+ boost::system::error_code(last_error,
+ boost::asio::error::system_category),
           "iocp");
       boost::throw_exception(e);
     }
@@ -174,7 +175,8 @@
       {
         DWORD last_error = ::GetLastError();
         boost::system::system_error e(
- boost::system::error_code(last_error, boost::system::native_ecat),
+ boost::system::error_code(last_error,
+ boost::asio::error::system_category),
             "pqcs");
         boost::throw_exception(e);
       }
@@ -229,7 +231,8 @@
     {
       DWORD last_error = ::GetLastError();
       boost::system::system_error e(
- boost::system::error_code(last_error, boost::system::native_ecat),
+ boost::system::error_code(last_error,
+ boost::asio::error::system_category),
           "pqcs");
       boost::throw_exception(e);
     }
@@ -248,7 +251,8 @@
     {
       DWORD last_error = ::GetLastError();
       boost::system::system_error e(
- boost::system::error_code(last_error, boost::system::native_ecat),
+ boost::system::error_code(last_error,
+ boost::asio::error::system_category),
           "pqcs");
       boost::throw_exception(e);
     }
@@ -313,7 +317,7 @@
           {
             DWORD last_error = ::GetLastError();
             ec = boost::system::error_code(last_error,
- boost::system::native_ecat);
+ boost::asio::error::system_category);
             return 0;
           }
 

Modified: branches/hash/boost/asio/detail/win_iocp_socket_service.hpp
==============================================================================
--- branches/hash/boost/asio/detail/win_iocp_socket_service.hpp (original)
+++ branches/hash/boost/asio/detail/win_iocp_socket_service.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -338,7 +338,8 @@
       if (!cancel_io_ex(sock_as_handle, 0))
       {
         DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error, boost::system::native_ecat);
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::system_category);
       }
       else
       {
@@ -359,7 +360,8 @@
       if (!::CancelIo(sock_as_handle))
       {
         DWORD last_error = ::GetLastError();
- ec = boost::system::error_code(last_error, boost::system::native_ecat);
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::system_category);
       }
       else
       {
@@ -665,7 +667,8 @@
         last_error = WSAECONNRESET;
       else if (last_error == ERROR_PORT_UNREACHABLE)
         last_error = WSAECONNREFUSED;
- ec = boost::system::error_code(last_error, boost::system::native_ecat);
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::system_category);
       return 0;
     }
 
@@ -716,7 +719,8 @@
 #endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
 
       // Map non-portable errors to their portable counterparts.
- boost::system::error_code ec(last_error, boost::system::native_ecat);
+ boost::system::error_code ec(last_error,
+ boost::asio::error::system_category);
       if (ec.value() == ERROR_NETNAME_DELETED)
       {
         if (handler_op->cancel_token_.expired())
@@ -818,7 +822,8 @@
     {
       boost::asio::io_service::work work(this->io_service());
       ptr.reset();
- boost::system::error_code ec(last_error, boost::system::native_ecat);
+ boost::system::error_code ec(last_error,
+ boost::asio::error::system_category);
       iocp_service_.post(bind_handler(handler, ec, bytes_transferred));
     }
     else
@@ -862,7 +867,8 @@
       DWORD last_error = ::WSAGetLastError();
       if (last_error == ERROR_PORT_UNREACHABLE)
         last_error = WSAECONNREFUSED;
- ec = boost::system::error_code(last_error, boost::system::native_ecat);
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::system_category);
       return 0;
     }
 
@@ -911,7 +917,8 @@
 #endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
 
       // Map non-portable errors to their portable counterparts.
- boost::system::error_code ec(last_error, boost::system::native_ecat);
+ boost::system::error_code ec(last_error,
+ boost::asio::error::system_category);
       if (ec.value() == ERROR_PORT_UNREACHABLE)
       {
         ec = boost::asio::error::connection_refused;
@@ -994,7 +1001,8 @@
     {
       boost::asio::io_service::work work(this->io_service());
       ptr.reset();
- boost::system::error_code ec(last_error, boost::system::native_ecat);
+ boost::system::error_code ec(last_error,
+ boost::asio::error::system_category);
       iocp_service_.post(bind_handler(handler, ec, bytes_transferred));
     }
     else
@@ -1048,7 +1056,8 @@
         last_error = WSAECONNRESET;
       else if (last_error == ERROR_PORT_UNREACHABLE)
         last_error = WSAECONNREFUSED;
- ec = boost::system::error_code(last_error, boost::system::native_ecat);
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::system_category);
       return 0;
     }
     if (bytes_transferred == 0)
@@ -1106,7 +1115,8 @@
 #endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
 
       // Map non-portable errors to their portable counterparts.
- boost::system::error_code ec(last_error, boost::system::native_ecat);
+ boost::system::error_code ec(last_error,
+ boost::asio::error::system_category);
       if (ec.value() == ERROR_NETNAME_DELETED)
       {
         if (handler_op->cancel_token_.expired())
@@ -1213,7 +1223,8 @@
     {
       boost::asio::io_service::work work(this->io_service());
       ptr.reset();
- boost::system::error_code ec(last_error, boost::system::native_ecat);
+ boost::system::error_code ec(last_error,
+ boost::asio::error::system_category);
       iocp_service_.post(bind_handler(handler, ec, bytes_transferred));
     }
     else
@@ -1259,7 +1270,8 @@
       DWORD last_error = ::WSAGetLastError();
       if (last_error == ERROR_PORT_UNREACHABLE)
         last_error = WSAECONNREFUSED;
- ec = boost::system::error_code(last_error, boost::system::native_ecat);
+ ec = boost::system::error_code(last_error,
+ boost::asio::error::system_category);
       return 0;
     }
     if (bytes_transferred == 0)
@@ -1325,7 +1337,8 @@
 #endif // defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
 
       // Map non-portable errors to their portable counterparts.
- boost::system::error_code ec(last_error, boost::system::native_ecat);
+ boost::system::error_code ec(last_error,
+ boost::asio::error::system_category);
       if (ec.value() == ERROR_PORT_UNREACHABLE)
       {
         ec = boost::asio::error::connection_refused;
@@ -1419,7 +1432,8 @@
     {
       boost::asio::io_service::work work(this->io_service());
       ptr.reset();
- boost::system::error_code ec(last_error, boost::system::native_ecat);
+ boost::system::error_code ec(last_error,
+ boost::asio::error::system_category);
       iocp_service_.post(bind_handler(handler, ec, bytes_transferred));
     }
     else
@@ -1656,7 +1670,8 @@
       ptr.reset();
 
       // Call the handler.
- boost::system::error_code ec(last_error, boost::system::native_ecat);
+ boost::system::error_code ec(last_error,
+ boost::asio::error::system_category);
       asio_handler_invoke_helpers::invoke(
           detail::bind_handler(handler, ec), &handler);
     }
@@ -1756,7 +1771,8 @@
       {
         boost::asio::io_service::work work(this->io_service());
         ptr.reset();
- boost::system::error_code ec(last_error, boost::system::native_ecat);
+ boost::system::error_code ec(last_error,
+ boost::asio::error::system_category);
         iocp_service_.post(bind_handler(handler, ec));
       }
     }
@@ -1832,8 +1848,8 @@
       // If connection failed then post the handler with the error code.
       if (connect_error)
       {
- ec = boost::system::error_code(
- connect_error, boost::system::native_ecat);
+ ec = boost::system::error_code(connect_error,
+ boost::asio::error::system_category);
         io_service_.post(bind_handler(handler_, ec));
         return true;
       }

Modified: branches/hash/boost/asio/detail/win_mutex.hpp
==============================================================================
--- branches/hash/boost/asio/detail/win_mutex.hpp (original)
+++ branches/hash/boost/asio/detail/win_mutex.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -24,6 +24,7 @@
 
 #if defined(BOOST_WINDOWS)
 
+#include <boost/asio/error.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 #include <boost/asio/detail/socket_types.hpp>
 #include <boost/asio/detail/scoped_lock.hpp>
@@ -49,7 +50,7 @@
     if (error != 0)
     {
       boost::system::system_error e(
- boost::system::error_code(error, boost::system::native_ecat),
+ boost::system::error_code(error, boost::asio::error::system_category),
           "mutex");
       boost::throw_exception(e);
     }
@@ -68,7 +69,7 @@
     if (error != 0)
     {
       boost::system::system_error e(
- boost::system::error_code(error, boost::system::native_ecat),
+ boost::system::error_code(error, boost::asio::error::system_category),
           "mutex");
       boost::throw_exception(e);
     }

Modified: branches/hash/boost/asio/detail/win_thread.hpp
==============================================================================
--- branches/hash/boost/asio/detail/win_thread.hpp (original)
+++ branches/hash/boost/asio/detail/win_thread.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -24,6 +24,7 @@
 
 #if defined(BOOST_WINDOWS)
 
+#include <boost/asio/error.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 #include <boost/asio/detail/socket_types.hpp>
 
@@ -55,7 +56,8 @@
     {
       DWORD last_error = ::GetLastError();
       boost::system::system_error e(
- boost::system::error_code(last_error, boost::system::native_ecat),
+ boost::system::error_code(last_error,
+ boost::asio::error::system_category),
           "thread");
       boost::throw_exception(e);
     }

Modified: branches/hash/boost/asio/detail/win_tss_ptr.hpp
==============================================================================
--- branches/hash/boost/asio/detail/win_tss_ptr.hpp (original)
+++ branches/hash/boost/asio/detail/win_tss_ptr.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -24,6 +24,7 @@
 
 #if defined(BOOST_WINDOWS)
 
+#include <boost/asio/error.hpp>
 #include <boost/asio/detail/noncopyable.hpp>
 #include <boost/asio/detail/socket_types.hpp>
 
@@ -48,7 +49,8 @@
     {
       DWORD last_error = ::GetLastError();
       boost::system::system_error e(
- boost::system::error_code(last_error, boost::system::native_ecat),
+ boost::system::error_code(last_error,
+ boost::asio::error::system_category),
           "tss");
       boost::throw_exception(e);
     }

Modified: branches/hash/boost/asio/detail/winsock_init.hpp
==============================================================================
--- branches/hash/boost/asio/detail/winsock_init.hpp (original)
+++ branches/hash/boost/asio/detail/winsock_init.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -86,7 +86,8 @@
     if (this != &instance_ && ref_->result() != 0)
     {
       boost::system::system_error e(
- boost::system::error_code(ref_->result(), boost::system::native_ecat),
+ boost::system::error_code(ref_->result(),
+ boost::asio::error::system_category),
           "winsock");
       boost::throw_exception(e);
     }

Modified: branches/hash/boost/asio/detail/wrapped_handler.hpp
==============================================================================
--- branches/hash/boost/asio/detail/wrapped_handler.hpp (original)
+++ branches/hash/boost/asio/detail/wrapped_handler.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -17,6 +17,10 @@
 
 #include <boost/asio/detail/push_options.hpp>
 
+#include <boost/asio/detail/push_options.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/asio/detail/pop_options.hpp>
+
 #include <boost/asio/detail/bind_handler.hpp>
 #include <boost/asio/detail/handler_alloc_helpers.hpp>
 #include <boost/asio/detail/handler_invoke_helpers.hpp>
@@ -31,7 +35,9 @@
 public:
   typedef void result_type;
 
- wrapped_handler(Dispatcher& dispatcher, Handler handler)
+ wrapped_handler(
+ typename boost::add_reference<Dispatcher>::type dispatcher,
+ Handler handler)
     : dispatcher_(dispatcher),
       handler_(handler)
   {
@@ -118,7 +124,7 @@
   }
 
 //private:
- Dispatcher& dispatcher_;
+ Dispatcher dispatcher_;
   Handler handler_;
 };
 
@@ -172,9 +178,9 @@
         function, this_handler->handler_));
 }
 
-template <typename Function, typename Dispatcher, typename Handler>
+template <typename Function, typename Handler, typename Context>
 inline void asio_handler_invoke(const Function& function,
- rewrapped_handler<Dispatcher, Handler>* this_handler)
+ rewrapped_handler<Handler, Context>* this_handler)
 {
   asio_handler_invoke_helpers::invoke(
       function, &this_handler->context_);

Modified: branches/hash/boost/asio/error.hpp
==============================================================================
--- branches/hash/boost/asio/error.hpp (original)
+++ branches/hash/boost/asio/error.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -37,493 +37,372 @@
 /// INTERNAL ONLY.
 # define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) implementation_defined
 #elif defined(BOOST_WINDOWS) || defined(__CYGWIN__)
-# define BOOST_ASIO_NATIVE_ERROR(e) \
- boost::system::error_code(e, \
- boost::system::native_ecat)
-# define BOOST_ASIO_SOCKET_ERROR(e) \
- boost::system::error_code(WSA ## e, \
- boost::system::native_ecat)
-# define BOOST_ASIO_NETDB_ERROR(e) \
- boost::system::error_code(WSA ## e, \
- boost::system::native_ecat)
-# define BOOST_ASIO_GETADDRINFO_ERROR(e) \
- boost::system::error_code(WSA ## e, \
- boost::system::native_ecat)
-# define BOOST_ASIO_MISC_ERROR(e) \
- boost::system::error_code(e, \
- boost::asio::detail::error_base<T>::misc_ecat())
+# define BOOST_ASIO_NATIVE_ERROR(e) e
+# define BOOST_ASIO_SOCKET_ERROR(e) WSA ## e
+# define BOOST_ASIO_NETDB_ERROR(e) WSA ## e
+# define BOOST_ASIO_GETADDRINFO_ERROR(e) WSA ## e
 # define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_win
 #else
-# define BOOST_ASIO_NATIVE_ERROR(e) \
- boost::system::error_code(e, \
- boost::system::native_ecat)
-# define BOOST_ASIO_SOCKET_ERROR(e) \
- boost::system::error_code(e, \
- boost::system::native_ecat)
-# define BOOST_ASIO_NETDB_ERROR(e) \
- boost::system::error_code(e, \
- boost::asio::detail::error_base<T>::netdb_ecat())
-# define BOOST_ASIO_GETADDRINFO_ERROR(e) \
- boost::system::error_code(e, \
- boost::asio::detail::error_base<T>::addrinfo_ecat())
-# define BOOST_ASIO_MISC_ERROR(e) \
- boost::system::error_code(e, \
- boost::asio::detail::error_base<T>::misc_ecat())
+# define BOOST_ASIO_NATIVE_ERROR(e) e
+# define BOOST_ASIO_SOCKET_ERROR(e) e
+# define BOOST_ASIO_NETDB_ERROR(e) e
+# define BOOST_ASIO_GETADDRINFO_ERROR(e) e
 # define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_posix
 #endif
 
 namespace boost {
 namespace asio {
+namespace error {
 
-namespace detail {
-
-/// Hack to keep asio library header-file-only.
-template <typename T>
-class error_base
+enum basic_errors
 {
-public:
-#if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
- static boost::system::error_category netdb_ecat();
- static int netdb_ed(const boost::system::error_code& ec);
- static std::string netdb_md(const boost::system::error_code& ec);
- static boost::system::wstring_t netdb_wmd(
- const boost::system::error_code& ec);
-
- static boost::system::error_category addrinfo_ecat();
- static int addrinfo_ed(const boost::system::error_code& ec);
- static std::string addrinfo_md(const boost::system::error_code& ec);
- static boost::system::wstring_t addrinfo_wmd(
- const boost::system::error_code& ec);
-#endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
-
- static boost::system::error_category misc_ecat();
- static int misc_ed(const boost::system::error_code& ec);
- static std::string misc_md(const boost::system::error_code& ec);
- static boost::system::wstring_t misc_wmd(const boost::system::error_code& ec);
-
- static boost::system::error_category ssl_ecat();
- static int ssl_ed(const boost::system::error_code& ec);
- static std::string ssl_md(const boost::system::error_code& ec);
- static boost::system::wstring_t ssl_wmd(const boost::system::error_code& ec);
-
   /// Permission denied.
- static const boost::system::error_code access_denied;
+ access_denied = BOOST_ASIO_SOCKET_ERROR(EACCES),
 
   /// Address family not supported by protocol.
- static const boost::system::error_code address_family_not_supported;
+ address_family_not_supported = BOOST_ASIO_SOCKET_ERROR(EAFNOSUPPORT),
 
   /// Address already in use.
- static const boost::system::error_code address_in_use;
+ address_in_use = BOOST_ASIO_SOCKET_ERROR(EADDRINUSE),
 
   /// Transport endpoint is already connected.
- static const boost::system::error_code already_connected;
-
- /// Already open.
- static const boost::system::error_code already_open;
+ already_connected = BOOST_ASIO_SOCKET_ERROR(EISCONN),
 
   /// Operation already in progress.
- static const boost::system::error_code already_started;
+ already_started = BOOST_ASIO_SOCKET_ERROR(EALREADY),
 
   /// A connection has been aborted.
- static const boost::system::error_code connection_aborted;
+ connection_aborted = BOOST_ASIO_SOCKET_ERROR(ECONNABORTED),
 
   /// Connection refused.
- static const boost::system::error_code connection_refused;
+ connection_refused = BOOST_ASIO_SOCKET_ERROR(ECONNREFUSED),
 
   /// Connection reset by peer.
- static const boost::system::error_code connection_reset;
+ connection_reset = BOOST_ASIO_SOCKET_ERROR(ECONNRESET),
 
   /// Bad file descriptor.
- static const boost::system::error_code bad_descriptor;
-
- /// End of file or stream.
- static const boost::system::error_code eof;
+ bad_descriptor = BOOST_ASIO_SOCKET_ERROR(EBADF),
 
   /// Bad address.
- static const boost::system::error_code fault;
-
- /// Host not found (authoritative).
- static const boost::system::error_code host_not_found;
-
- /// Host not found (non-authoritative).
- static const boost::system::error_code host_not_found_try_again;
+ fault = BOOST_ASIO_SOCKET_ERROR(EFAULT),
 
   /// No route to host.
- static const boost::system::error_code host_unreachable;
+ host_unreachable = BOOST_ASIO_SOCKET_ERROR(EHOSTUNREACH),
 
   /// Operation now in progress.
- static const boost::system::error_code in_progress;
+ in_progress = BOOST_ASIO_SOCKET_ERROR(EINPROGRESS),
 
   /// Interrupted system call.
- static const boost::system::error_code interrupted;
+ interrupted = BOOST_ASIO_SOCKET_ERROR(EINTR),
 
   /// Invalid argument.
- static const boost::system::error_code invalid_argument;
+ invalid_argument = BOOST_ASIO_SOCKET_ERROR(EINVAL),
 
   /// Message too long.
- static const boost::system::error_code message_size;
+ message_size = BOOST_ASIO_SOCKET_ERROR(EMSGSIZE),
 
   /// Network is down.
- static const boost::system::error_code network_down;
+ network_down = BOOST_ASIO_SOCKET_ERROR(ENETDOWN),
 
   /// Network dropped connection on reset.
- static const boost::system::error_code network_reset;
+ network_reset = BOOST_ASIO_SOCKET_ERROR(ENETRESET),
 
   /// Network is unreachable.
- static const boost::system::error_code network_unreachable;
+ network_unreachable = BOOST_ASIO_SOCKET_ERROR(ENETUNREACH),
 
   /// Too many open files.
- static const boost::system::error_code no_descriptors;
+ no_descriptors = BOOST_ASIO_SOCKET_ERROR(EMFILE),
 
   /// No buffer space available.
- static const boost::system::error_code no_buffer_space;
-
- /// The query is valid but does not have associated address data.
- static const boost::system::error_code no_data;
+ no_buffer_space = BOOST_ASIO_SOCKET_ERROR(ENOBUFS),
 
   /// Cannot allocate memory.
- static const boost::system::error_code no_memory;
+ no_memory = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(ERROR_OUTOFMEMORY),
+ BOOST_ASIO_NATIVE_ERROR(ENOMEM)),
 
   /// Operation not permitted.
- static const boost::system::error_code no_permission;
+ no_permission = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(ERROR_ACCESS_DENIED),
+ BOOST_ASIO_NATIVE_ERROR(EPERM)),
 
   /// Protocol not available.
- static const boost::system::error_code no_protocol_option;
-
- /// A non-recoverable error occurred.
- static const boost::system::error_code no_recovery;
+ no_protocol_option = BOOST_ASIO_SOCKET_ERROR(ENOPROTOOPT),
 
   /// Transport endpoint is not connected.
- static const boost::system::error_code not_connected;
-
- /// Element not found.
- static const boost::system::error_code not_found;
+ not_connected = BOOST_ASIO_SOCKET_ERROR(ENOTCONN),
 
   /// Socket operation on non-socket.
- static const boost::system::error_code not_socket;
+ not_socket = BOOST_ASIO_SOCKET_ERROR(ENOTSOCK),
 
   /// Operation cancelled.
- static const boost::system::error_code operation_aborted;
+ operation_aborted = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(ERROR_OPERATION_ABORTED),
+ BOOST_ASIO_NATIVE_ERROR(ECANCELED)),
 
   /// Operation not supported.
- static const boost::system::error_code operation_not_supported;
-
- /// The service is not supported for the given socket type.
- static const boost::system::error_code service_not_found;
-
- /// The socket type is not supported.
- static const boost::system::error_code socket_type_not_supported;
+ operation_not_supported = BOOST_ASIO_SOCKET_ERROR(EOPNOTSUPP),
 
   /// Cannot send after transport endpoint shutdown.
- static const boost::system::error_code shut_down;
+ shut_down = BOOST_ASIO_SOCKET_ERROR(ESHUTDOWN),
 
   /// Connection timed out.
- static const boost::system::error_code timed_out;
+ timed_out = BOOST_ASIO_SOCKET_ERROR(ETIMEDOUT),
 
   /// Resource temporarily unavailable.
- static const boost::system::error_code try_again;
+ try_again = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(ERROR_RETRY),
+ BOOST_ASIO_NATIVE_ERROR(EAGAIN)),
 
   /// The socket is marked non-blocking and the requested operation would block.
- static const boost::system::error_code would_block;
-
-private:
- error_base();
+ would_block = BOOST_ASIO_SOCKET_ERROR(EWOULDBLOCK)
 };
 
-#if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
-
-template <typename T>
-boost::system::error_category error_base<T>::netdb_ecat()
+enum netdb_errors
 {
- static boost::system::error_category ecat =
- boost::system::error_code::new_category(&error_base<T>::netdb_ed,
- &error_base<T>::netdb_md, &error_base<T>::netdb_wmd);
- return ecat;
-}
+ /// Host not found (authoritative).
+ host_not_found = BOOST_ASIO_NETDB_ERROR(HOST_NOT_FOUND),
 
-template <typename T>
-int error_base<T>::netdb_ed(const boost::system::error_code&)
-{
- return EOTHER;
-}
+ /// Host not found (non-authoritative).
+ host_not_found_try_again = BOOST_ASIO_NETDB_ERROR(TRY_AGAIN),
 
-template <typename T>
-std::string error_base<T>::netdb_md(const boost::system::error_code& ec)
-{
- if (ec == error_base<T>::host_not_found)
- return "Host not found (authoritative)";
- if (ec == error_base<T>::host_not_found_try_again)
- return "Host not found (non-authoritative), try again later";
- if (ec == error_base<T>::no_data)
- return "The query is valid, but it does not have associated data";
- if (ec == error_base<T>::no_recovery)
- return "A non-recoverable error occurred during database lookup";
- return "EINVAL";
-}
+ /// The query is valid but does not have associated address data.
+ no_data = BOOST_ASIO_NETDB_ERROR(NO_DATA),
 
-template <typename T>
-boost::system::wstring_t error_base<T>::netdb_wmd(
- const boost::system::error_code& ec)
-{
- if (ec == error_base<T>::host_not_found)
- return L"Host not found (authoritative)";
- if (ec == error_base<T>::host_not_found_try_again)
- return L"Host not found (non-authoritative), try again later";
- if (ec == error_base<T>::no_data)
- return L"The query is valid, but it does not have associated data";
- if (ec == error_base<T>::no_recovery)
- return L"A non-recoverable error occurred during database lookup";
- return L"EINVAL";
-}
+ /// A non-recoverable error occurred.
+ no_recovery = BOOST_ASIO_NETDB_ERROR(NO_RECOVERY)
+};
 
-template <typename T>
-boost::system::error_category error_base<T>::addrinfo_ecat()
+enum addrinfo_errors
 {
- static boost::system::error_category ecat =
- boost::system::error_code::new_category(&error_base<T>::addrinfo_ed,
- &error_base<T>::addrinfo_md, &error_base<T>::addrinfo_wmd);
- return ecat;
-}
+ /// The service is not supported for the given socket type.
+ service_not_found = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(WSATYPE_NOT_FOUND),
+ BOOST_ASIO_GETADDRINFO_ERROR(EAI_SERVICE)),
 
-template <typename T>
-int error_base<T>::addrinfo_ed(const boost::system::error_code&)
-{
- return EOTHER;
-}
+ /// The socket type is not supported.
+ socket_type_not_supported = BOOST_ASIO_WIN_OR_POSIX(
+ BOOST_ASIO_NATIVE_ERROR(WSAESOCKTNOSUPPORT),
+ BOOST_ASIO_GETADDRINFO_ERROR(EAI_SOCKTYPE))
+};
 
-template <typename T>
-std::string error_base<T>::addrinfo_md(const boost::system::error_code& ec)
+enum misc_errors
 {
- if (ec == error_base<T>::service_not_found)
- return "Service not found";
- if (ec == error_base<T>::socket_type_not_supported)
- return "Socket type not supported";
- return "EINVAL";
-}
+ /// Already open.
+ already_open = 1,
 
-template <typename T>
-boost::system::wstring_t error_base<T>::addrinfo_wmd(
- const boost::system::error_code& ec)
-{
- if (ec == error_base<T>::service_not_found)
- return L"Service not found";
- if (ec == error_base<T>::socket_type_not_supported)
- return L"Socket type not supported";
- return L"EINVAL";
-}
+ /// End of file or stream.
+ eof,
 
-#endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
+ /// Element not found.
+ not_found
+};
 
-template <typename T>
-boost::system::error_category error_base<T>::misc_ecat()
-{
- static boost::system::error_category ecat =
- boost::system::error_code::new_category(&error_base<T>::misc_ed,
- &error_base<T>::misc_md, &error_base<T>::misc_wmd);
- return ecat;
-}
+namespace detail {
 
-template <typename T>
-int error_base<T>::misc_ed(const boost::system::error_code&)
+inline const boost::system::error_category& get_system_category()
 {
- return EOTHER;
+ return boost::system::system_category;
 }
 
-template <typename T>
-std::string error_base<T>::misc_md(const boost::system::error_code& ec)
+#if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
+
+class netdb_category : public boost::system::error_category
 {
- if (ec == error_base<T>::already_open)
- return "Already open";
- if (ec == error_base<T>::eof)
- return "End of file";
- if (ec == error_base<T>::not_found)
- return "Element not found";
- return "EINVAL";
-}
+public:
+ const char* name() const
+ {
+ return "asio.netdb";
+ }
+
+ std::string message(int value) const
+ {
+ if (value == error::host_not_found)
+ return "Host not found (authoritative)";
+ if (value == error::host_not_found_try_again)
+ return "Host not found (non-authoritative), try again later";
+ if (value == error::no_data)
+ return "The query is valid, but it does not have associated data";
+ if (value == error::no_recovery)
+ return "A non-recoverable error occurred during database lookup";
+ return "asio.netdb error";
+ }
+};
 
-template <typename T>
-boost::system::wstring_t error_base<T>::misc_wmd(
- const boost::system::error_code& ec)
+inline const boost::system::error_category& get_netdb_category()
 {
- if (ec == error_base<T>::already_open)
- return L"Already open";
- if (ec == error_base<T>::eof)
- return L"End of file";
- if (ec == error_base<T>::not_found)
- return L"Element not found";
- return L"EINVAL";
+ static netdb_category instance;
+ return instance;
 }
 
-template <typename T>
-boost::system::error_category error_base<T>::ssl_ecat()
+class addrinfo_category : public boost::system::error_category
 {
- static boost::system::error_category ecat =
- boost::system::error_code::new_category(&error_base<T>::ssl_ed,
- &error_base<T>::ssl_md, &error_base<T>::ssl_wmd);
- return ecat;
-}
+public:
+ const char* name() const
+ {
+ return "asio.addrinfo";
+ }
+
+ std::string message(int value) const
+ {
+ if (value == error::service_not_found)
+ return "Service not found";
+ if (value == error::socket_type_not_supported)
+ return "Socket type not supported";
+ return "asio.addrinfo error";
+ }
+};
 
-template <typename T>
-int error_base<T>::ssl_ed(const boost::system::error_code&)
+inline const boost::system::error_category& get_addrinfo_category()
 {
- return EOTHER;
+ static addrinfo_category instance;
+ return instance;
 }
 
-template <typename T>
-std::string error_base<T>::ssl_md(const boost::system::error_code&)
+#else // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
+
+inline const boost::system::error_category& get_netdb_category()
 {
- return "SSL error";
+ return get_system_category();
 }
 
-template <typename T>
-boost::system::wstring_t error_base<T>::ssl_wmd(
- const boost::system::error_code&)
+inline const boost::system::error_category& get_addrinfo_category()
 {
- return L"SSL error";
+ return get_system_category();
 }
 
-template <typename T> const boost::system::error_code
-error_base<T>::access_denied = BOOST_ASIO_SOCKET_ERROR(EACCES);
-
-template <typename T> const boost::system::error_code
-error_base<T>::address_family_not_supported = BOOST_ASIO_SOCKET_ERROR(
- EAFNOSUPPORT);
-
-template <typename T> const boost::system::error_code
-error_base<T>::address_in_use = BOOST_ASIO_SOCKET_ERROR(EADDRINUSE);
-
-template <typename T> const boost::system::error_code
-error_base<T>::already_connected = BOOST_ASIO_SOCKET_ERROR(EISCONN);
-
-template <typename T> const boost::system::error_code
-error_base<T>::already_open = BOOST_ASIO_MISC_ERROR(1);
-
-template <typename T> const boost::system::error_code
-error_base<T>::already_started = BOOST_ASIO_SOCKET_ERROR(EALREADY);
-
-template <typename T> const boost::system::error_code
-error_base<T>::connection_aborted = BOOST_ASIO_SOCKET_ERROR(ECONNABORTED);
-
-template <typename T> const boost::system::error_code
-error_base<T>::connection_refused = BOOST_ASIO_SOCKET_ERROR(ECONNREFUSED);
-
-template <typename T> const boost::system::error_code
-error_base<T>::connection_reset = BOOST_ASIO_SOCKET_ERROR(ECONNRESET);
-
-template <typename T> const boost::system::error_code
-error_base<T>::bad_descriptor = BOOST_ASIO_SOCKET_ERROR(EBADF);
-
-template <typename T> const boost::system::error_code
-error_base<T>::eof = BOOST_ASIO_MISC_ERROR(2);
-
-template <typename T> const boost::system::error_code
-error_base<T>::fault = BOOST_ASIO_SOCKET_ERROR(EFAULT);
-
-template <typename T> const boost::system::error_code
-error_base<T>::host_not_found = BOOST_ASIO_NETDB_ERROR(HOST_NOT_FOUND);
-
-template <typename T> const boost::system::error_code
-error_base<T>::host_not_found_try_again = BOOST_ASIO_NETDB_ERROR(TRY_AGAIN);
-
-template <typename T> const boost::system::error_code
-error_base<T>::host_unreachable = BOOST_ASIO_SOCKET_ERROR(EHOSTUNREACH);
-
-template <typename T> const boost::system::error_code
-error_base<T>::in_progress = BOOST_ASIO_SOCKET_ERROR(EINPROGRESS);
-
-template <typename T> const boost::system::error_code
-error_base<T>::interrupted = BOOST_ASIO_SOCKET_ERROR(EINTR);
-
-template <typename T> const boost::system::error_code
-error_base<T>::invalid_argument = BOOST_ASIO_SOCKET_ERROR(EINVAL);
-
-template <typename T> const boost::system::error_code
-error_base<T>::message_size = BOOST_ASIO_SOCKET_ERROR(EMSGSIZE);
-
-template <typename T> const boost::system::error_code
-error_base<T>::network_down = BOOST_ASIO_SOCKET_ERROR(ENETDOWN);
+#endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
 
-template <typename T> const boost::system::error_code
-error_base<T>::network_reset = BOOST_ASIO_SOCKET_ERROR(ENETRESET);
+class misc_category : public boost::system::error_category
+{
+public:
+ const char* name() const
+ {
+ return "asio.misc";
+ }
+
+ std::string message(int value) const
+ {
+ if (value == error::already_open)
+ return "Already open";
+ if (value == error::eof)
+ return "End of file";
+ if (value == error::not_found)
+ return "Element not found";
+ return "asio.misc error";
+ }
+};
 
-template <typename T> const boost::system::error_code
-error_base<T>::network_unreachable = BOOST_ASIO_SOCKET_ERROR(ENETUNREACH);
+inline const boost::system::error_category& get_misc_category()
+{
+ static misc_category instance;
+ return instance;
+}
 
-template <typename T> const boost::system::error_code
-error_base<T>::no_descriptors = BOOST_ASIO_SOCKET_ERROR(EMFILE);
+class ssl_category : public boost::system::error_category
+{
+public:
+ const char* name() const
+ {
+ return "asio.ssl";
+ }
+
+ std::string message(int value) const
+ {
+ return "asio.ssl error";
+ }
+};
 
-template <typename T> const boost::system::error_code
-error_base<T>::no_buffer_space = BOOST_ASIO_SOCKET_ERROR(ENOBUFS);
+inline const boost::system::error_category& get_ssl_category()
+{
+ static ssl_category instance;
+ return instance;
+}
 
-template <typename T> const boost::system::error_code
-error_base<T>::no_data = BOOST_ASIO_NETDB_ERROR(NO_DATA);
+} // namespace detail
 
-template <typename T> const boost::system::error_code
-error_base<T>::no_memory = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(ERROR_OUTOFMEMORY),
- BOOST_ASIO_NATIVE_ERROR(ENOMEM));
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1400)
 
-template <typename T> const boost::system::error_code
-error_base<T>::no_permission = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(ERROR_ACCESS_DENIED),
- BOOST_ASIO_NATIVE_ERROR(EPERM));
+static const boost::system::error_category& system_category
+ = boost::asio::error::detail::get_system_category();
+static const boost::system::error_category& netdb_category
+ = boost::asio::error::detail::get_netdb_category();
+static const boost::system::error_category& addrinfo_category
+ = boost::asio::error::detail::get_addrinfo_category();
+static const boost::system::error_category& misc_category
+ = boost::asio::error::detail::get_misc_category();
+static const boost::system::error_category& ssl_category
+ = boost::asio::error::detail::get_ssl_category();
 
-template <typename T> const boost::system::error_code
-error_base<T>::no_protocol_option = BOOST_ASIO_SOCKET_ERROR(ENOPROTOOPT);
+#else
 
-template <typename T> const boost::system::error_code
-error_base<T>::no_recovery = BOOST_ASIO_NETDB_ERROR(NO_RECOVERY);
+namespace
+{
+ const boost::system::error_category& system_category
+ = boost::asio::error::detail::get_system_category();
+ const boost::system::error_category& netdb_category
+ = boost::asio::error::detail::get_netdb_category();
+ const boost::system::error_category& addrinfo_category
+ = boost::asio::error::detail::get_addrinfo_category();
+ const boost::system::error_category& misc_category
+ = boost::asio::error::detail::get_misc_category();
+ const boost::system::error_category& ssl_category
+ = boost::asio::error::detail::get_ssl_category();
+} // namespace
 
-template <typename T> const boost::system::error_code
-error_base<T>::not_connected = BOOST_ASIO_SOCKET_ERROR(ENOTCONN);
+#endif
 
-template <typename T> const boost::system::error_code
-error_base<T>::not_found = BOOST_ASIO_MISC_ERROR(3);
+} // namespace error
+} // namespace asio
 
-template <typename T> const boost::system::error_code
-error_base<T>::not_socket = BOOST_ASIO_SOCKET_ERROR(ENOTSOCK);
+namespace system {
 
-template <typename T> const boost::system::error_code
-error_base<T>::operation_aborted = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(ERROR_OPERATION_ABORTED),
- BOOST_ASIO_NATIVE_ERROR(ECANCELED));
+template<> struct is_error_code_enum<boost::asio::error::basic_errors>
+{
+ static const bool value = true;
+};
 
-template <typename T> const boost::system::error_code
-error_base<T>::operation_not_supported = BOOST_ASIO_SOCKET_ERROR(EOPNOTSUPP);
+template<> struct is_error_code_enum<boost::asio::error::netdb_errors>
+{
+ static const bool value = true;
+};
 
-template <typename T> const boost::system::error_code
-error_base<T>::service_not_found = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(WSATYPE_NOT_FOUND),
- BOOST_ASIO_GETADDRINFO_ERROR(EAI_SERVICE));
+template<> struct is_error_code_enum<boost::asio::error::addrinfo_errors>
+{
+ static const bool value = true;
+};
 
-template <typename T> const boost::system::error_code
-error_base<T>::socket_type_not_supported = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(WSAESOCKTNOSUPPORT),
- BOOST_ASIO_GETADDRINFO_ERROR(EAI_SOCKTYPE));
+template<> struct is_error_code_enum<boost::asio::error::misc_errors>
+{
+ static const bool value = true;
+};
 
-template <typename T> const boost::system::error_code
-error_base<T>::shut_down = BOOST_ASIO_SOCKET_ERROR(ESHUTDOWN);
+} // namespace system
 
-template <typename T> const boost::system::error_code
-error_base<T>::timed_out = BOOST_ASIO_SOCKET_ERROR(ETIMEDOUT);
+namespace asio {
+namespace error {
 
-template <typename T> const boost::system::error_code
-error_base<T>::try_again = BOOST_ASIO_WIN_OR_POSIX(
- BOOST_ASIO_NATIVE_ERROR(ERROR_RETRY),
- BOOST_ASIO_NATIVE_ERROR(EAGAIN));
+inline boost::system::error_code make_error_code(basic_errors e)
+{
+ return boost::system::error_code(static_cast<int>(e), system_category);
+}
 
-template <typename T> const boost::system::error_code
-error_base<T>::would_block = BOOST_ASIO_SOCKET_ERROR(EWOULDBLOCK);
+inline boost::system::error_code make_error_code(netdb_errors e)
+{
+ return boost::system::error_code(static_cast<int>(e), netdb_category);
+}
 
-} // namespace detail
+inline boost::system::error_code make_error_code(addrinfo_errors e)
+{
+ return boost::system::error_code(static_cast<int>(e), addrinfo_category);
+}
 
-/// Contains error constants.
-class error : public boost::asio::detail::error_base<error>
+inline boost::system::error_code make_error_code(misc_errors e)
 {
-private:
- error();
-};
+ return boost::system::error_code(static_cast<int>(e), misc_category);
+}
 
+} // namespace error
 } // namespace asio
 } // namespace boost
 
@@ -531,7 +410,6 @@
 #undef BOOST_ASIO_SOCKET_ERROR
 #undef BOOST_ASIO_NETDB_ERROR
 #undef BOOST_ASIO_GETADDRINFO_ERROR
-#undef BOOST_ASIO_MISC_ERROR
 #undef BOOST_ASIO_WIN_OR_POSIX
 
 

Modified: branches/hash/boost/asio/impl/io_service.ipp
==============================================================================
--- branches/hash/boost/asio/impl/io_service.ipp (original)
+++ branches/hash/boost/asio/impl/io_service.ipp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -129,11 +129,11 @@
 #if defined(GENERATING_DOCUMENTATION)
 unspecified
 #else
-inline detail::wrapped_handler<io_service, Handler>
+inline detail::wrapped_handler<io_service&, Handler>
 #endif
 io_service::wrap(Handler handler)
 {
- return detail::wrapped_handler<io_service, Handler>(*this, handler);
+ return detail::wrapped_handler<io_service&, Handler>(*this, handler);
 }
 
 inline io_service::work::work(boost::asio::io_service& io_service)

Modified: branches/hash/boost/asio/impl/read_until.ipp
==============================================================================
--- branches/hash/boost/asio/impl/read_until.ipp (original)
+++ branches/hash/boost/asio/impl/read_until.ipp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -312,7 +312,8 @@
       if (streambuf_.size() == streambuf_.max_size())
       {
         std::size_t bytes = 0;
- handler_(error::not_found, bytes);
+ boost::system::error_code ec(error::not_found);
+ handler_(ec, bytes);
         return;
       }
 
@@ -389,7 +390,8 @@
   // No match. Check if buffer is full.
   if (b.size() == b.max_size())
   {
- s.io_service().post(detail::bind_handler(handler, error::not_found, 0));
+ boost::system::error_code ec(error::not_found);
+ s.io_service().post(detail::bind_handler(handler, ec, 0));
     return;
   }
 
@@ -470,7 +472,8 @@
       if (streambuf_.size() == streambuf_.max_size())
       {
         std::size_t bytes = 0;
- handler_(error::not_found, bytes);
+ boost::system::error_code ec(error::not_found);
+ handler_(ec, bytes);
         return;
       }
 
@@ -560,7 +563,8 @@
   // Check if buffer is full.
   if (b.size() == b.max_size())
   {
- s.io_service().post(detail::bind_handler(handler, error::not_found, 0));
+ boost::system::error_code ec(error::not_found);
+ s.io_service().post(detail::bind_handler(handler, ec, 0));
     return;
   }
 
@@ -642,7 +646,8 @@
       if (streambuf_.size() == streambuf_.max_size())
       {
         std::size_t bytes = 0;
- handler_(error::not_found, bytes);
+ boost::system::error_code ec(error::not_found);
+ handler_(ec, bytes);
         return;
       }
 
@@ -732,7 +737,8 @@
   // Check if buffer is full.
   if (b.size() == b.max_size())
   {
- s.io_service().post(detail::bind_handler(handler, error::not_found, 0));
+ boost::system::error_code ec(error::not_found);
+ s.io_service().post(detail::bind_handler(handler, ec, 0));
     return;
   }
 

Modified: branches/hash/boost/asio/io_service.hpp
==============================================================================
--- branches/hash/boost/asio/io_service.hpp (original)
+++ branches/hash/boost/asio/io_service.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -321,7 +321,7 @@
 #if defined(GENERATING_DOCUMENTATION)
   unspecified
 #else
- detail::wrapped_handler<io_service, Handler>
+ detail::wrapped_handler<io_service&, Handler>
 #endif
   wrap(Handler handler);
 

Modified: branches/hash/boost/asio/ip/basic_endpoint.hpp
==============================================================================
--- branches/hash/boost/asio/ip/basic_endpoint.hpp (original)
+++ branches/hash/boost/asio/ip/basic_endpoint.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -173,7 +173,7 @@
   /// The protocol associated with the endpoint.
   protocol_type protocol() const
   {
- if (is_v4())
+ if (is_v4(data_))
       return InternetProtocol::v4();
     return InternetProtocol::v6();
   }
@@ -193,7 +193,7 @@
   /// Get the underlying size of the endpoint in the native type.
   size_type size() const
   {
- if (is_v4())
+ if (is_v4(data_))
       return sizeof(boost::asio::detail::sockaddr_in4_type);
     else
       return sizeof(boost::asio::detail::sockaddr_in6_type);
@@ -219,7 +219,7 @@
   /// the host's byte order.
   unsigned short port() const
   {
- if (is_v4())
+ if (is_v4(data_))
     {
       return boost::asio::detail::socket_ops::network_to_host_short(
           reinterpret_cast<const boost::asio::detail::sockaddr_in4_type&>(
@@ -237,7 +237,7 @@
   /// the host's byte order.
   void port(unsigned short port_num)
   {
- if (is_v4())
+ if (is_v4(data_))
     {
       reinterpret_cast<boost::asio::detail::sockaddr_in4_type&>(data_).sin_port
         = boost::asio::detail::socket_ops::host_to_network_short(port_num);
@@ -253,7 +253,7 @@
   boost::asio::ip::address address() const
   {
     using namespace std; // For memcpy.
- if (is_v4())
+ if (is_v4(data_))
     {
       const boost::asio::detail::sockaddr_in4_type& data
         = reinterpret_cast<const boost::asio::detail::sockaddr_in4_type&>(
@@ -307,14 +307,26 @@
 
 private:
   // Helper function to determine whether the endpoint is IPv4.
- bool is_v4() const
- {
 #if defined(_AIX)
- return data_.__ss_family == AF_INET;
+ template <typename T, unsigned char (T::*)> struct is_v4_helper {};
+
+ template <typename T>
+ static bool is_v4(const T& ss, is_v4_helper<T, &T::ss_family>* = 0)
+ {
+ return ss.ss_family == AF_INET;
+ }
+
+ template <typename T>
+ static bool is_v4(const T& ss, is_v4_helper<T, &T::__ss_family>* = 0)
+ {
+ return ss.__ss_family == AF_INET;
+ }
 #else
- return data_.ss_family == AF_INET;
-#endif
+ static bool is_v4(const boost::asio::detail::sockaddr_storage_type& ss)
+ {
+ return ss.ss_family == AF_INET;
   }
+#endif
 
   // The underlying IP socket address.
   boost::asio::detail::sockaddr_storage_type data_;

Modified: branches/hash/boost/asio/ssl/detail/openssl_operation.hpp
==============================================================================
--- branches/hash/boost/asio/ssl/detail/openssl_operation.hpp (original)
+++ branches/hash/boost/asio/ssl/detail/openssl_operation.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -175,12 +175,12 @@
       if (error_code == SSL_ERROR_SYSCALL)
       {
         return handler_(boost::system::error_code(
- sys_error_code, boost::system::native_ecat), rc);
+ sys_error_code, boost::asio::error::system_category), rc);
       }
       else
       {
         return handler_(boost::system::error_code(
- error_code, boost::asio::error::ssl_ecat()), rc);
+ error_code, boost::asio::error::ssl_category), rc);
       }
     }
 

Modified: branches/hash/boost/cerrno.hpp
==============================================================================
--- branches/hash/boost/cerrno.hpp (original)
+++ branches/hash/boost/cerrno.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1,14 +1,14 @@
-// Boost Filesystem cerrno.hpp header --------------------------------------//
+// Boost cerrno.hpp header -------------------------------------------------//
 
-// © Copyright Beman Dawes 2005.
+// Copyright Beman Dawes 2005.
 // Use, modification, and distribution is subject to the Boost Software
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-// See library home page at http://www.boost.org/libs/filesystem
+// See library home page at http://www.boost.org/libs/system
 
-#ifndef BOOST_FILESYSTEM_CERRNO_HPP
-#define BOOST_FILESYSTEM_CERRNO_HPP
+#ifndef BOOST_CERRNO_HPP
+#define BOOST_CERRNO_HPP
 
 #include <cerrno>
 
@@ -190,8 +190,142 @@
 #define EILSEQ 9945
 #endif
 
-#define EBADHANDLE 9998 // bad handle
-#define EOTHER 9999 // Other error not translatable
- // to a POSIX errno value
+// Windows Mobile doesn't appear to define these:
+
+#ifndef E2BIG
+#define E2BIG 9946
+#endif
+
+#ifndef EDOM
+#define EDOM 9947
+#endif
+
+#ifndef EFAULT
+#define EFAULT 9948
+#endif
+
+#ifndef EBADF
+#define EBADF 9949
+#endif
+
+#ifndef EPIPE
+#define EPIPE 9950
+#endif
+
+#ifndef EXDEV
+#define EXDEV 9951
+#endif
+
+#ifndef EBUSY
+#define EBUSY 9952
+#endif
+
+#ifndef ENOTEMPTY
+#define ENOTEMPTY 9953
+#endif
+
+#ifndef ENOEXEC
+#define ENOEXEC 9954
+#endif
+
+#ifndef EEXIST
+#define EEXIST 9955
+#endif
+
+#ifndef EFBIG
+#define EFBIG 9956
+#endif
+
+#ifndef ENAMETOOLONG
+#define ENAMETOOLONG 9957
+#endif
+
+#ifndef ENOTTY
+#define ENOTTY 9958
+#endif
+
+#ifndef EINTR
+#define EINTR 9959
+#endif
+
+#ifndef ESPIPE
+#define ESPIPE 9960
+#endif
+
+#ifndef EIO
+#define EIO 9961
+#endif
+
+#ifndef EISDIR
+#define EISDIR 9962
+#endif
+
+#ifndef ECHILD
+#define ECHILD 9963
+#endif
+
+#ifndef ENOLCK
+#define ENOLCK 9964
+#endif
+
+#ifndef ENOSPC
+#define ENOSPC 9965
+#endif
+
+#ifndef ENXIO
+#define ENXIO 9966
+#endif
+
+#ifndef ENODEV
+#define ENODEV 9967
+#endif
+
+#ifndef ENOENT
+#define ENOENT 9968
+#endif
+
+#ifndef ESRCH
+#define ESRCH 9969
+#endif
+
+#ifndef ENOTDIR
+#define ENOTDIR 9970
+#endif
+
+#ifndef ENOMEM
+#define ENOMEM 9971
+#endif
+
+#ifndef EPERM
+#define EPERM 9972
+#endif
+
+#ifndef EACCES
+#define EACCES 9973
+#endif
+
+#ifndef EROFS
+#define EROFS 9974
+#endif
+
+#ifndef EDEADLK
+#define EDEADLK 9975
+#endif
+
+#ifndef EAGAIN
+#define EAGAIN 9976
+#endif
+
+#ifndef ENFILE
+#define ENFILE 9977
+#endif
+
+#ifndef EMFILE
+#define EMFILE 9978
+#endif
+
+#ifndef EMLINK
+#define EMLINK 9979
+#endif
 
 #endif // include guard

Modified: branches/hash/boost/concept/detail/has_constraints.hpp
==============================================================================
--- branches/hash/boost/concept/detail/has_constraints.hpp (original)
+++ branches/hash/boost/concept/detail/has_constraints.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -5,7 +5,7 @@
 # define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
 
 # include <boost/mpl/bool.hpp>
-
+# include <boost/detail/workaround.hpp>
 namespace boost { namespace concept {
 
 namespace detail
@@ -19,9 +19,17 @@
   template <class Model, void (Model::*)()>
   struct wrap_constraints {};
     
+#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580)
+ // Work around the following bogus error in Sun Studio 11, by
+ // turning off the has_constraints function entirely:
+ // Error: complex expression not allowed in dependent template
+ // argument expression
+ inline no has_constraints_(...);
+#else
   template <class Model>
   inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
   inline no has_constraints_(...);
+#endif
 }
 
 // This would be called "detail::has_constraints," but it has a strong

Modified: branches/hash/boost/config/compiler/borland.hpp
==============================================================================
--- branches/hash/boost/config/compiler/borland.hpp (original)
+++ branches/hash/boost/config/compiler/borland.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -83,6 +83,8 @@
 # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
 # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
 # define BOOST_NO_IS_ABSTRACT
+# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
 
 # ifdef NDEBUG
       // fix broken <cstring> so that Boost.test works:

Modified: branches/hash/boost/config/compiler/gcc.hpp
==============================================================================
--- branches/hash/boost/config/compiler/gcc.hpp (original)
+++ branches/hash/boost/config/compiler/gcc.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -55,6 +55,12 @@
 # define BOOST_NO_IS_ABSTRACT
 # endif
 #endif
+#if __GNUC__ < 4
+//
+// All problems to gcc-3.x and earlier here:
+//
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#endif
 
 #ifndef __EXCEPTIONS
 # define BOOST_NO_EXCEPTIONS

Modified: branches/hash/boost/config/compiler/hp_acc.hpp
==============================================================================
--- branches/hash/boost/config/compiler/hp_acc.hpp (original)
+++ branches/hash/boost/config/compiler/hp_acc.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -12,8 +12,7 @@
 
 // HP aCC C++ compiler setup:
 
-#if (((__HP_aCC >= 61200) && defined(__EDG__)) ||\
- ((__HP_aCC >= 38000) && defined(__hpxstd98)))
+#if defined(__EDG__)
 #include "boost/config/compiler/common_edg.hpp"
 #endif
 

Modified: branches/hash/boost/config/compiler/intel.hpp
==============================================================================
--- branches/hash/boost/config/compiler/intel.hpp (original)
+++ branches/hash/boost/config/compiler/intel.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -99,7 +99,10 @@
 # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
 # endif
 #endif
-
+#if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32)
+// GCC or VC emulation:
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#endif
 //
 // Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T
 // set correctly, if we don't do this now, we will get errors later

Modified: branches/hash/boost/config/compiler/sunpro_cc.hpp
==============================================================================
--- branches/hash/boost/config/compiler/sunpro_cc.hpp (original)
+++ branches/hash/boost/config/compiler/sunpro_cc.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -69,6 +69,12 @@
 # define BOOST_NO_IS_ABSTRACT
 # endif
 
+//
+// Issues that effect all known versions:
+//
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+
+
 #define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC)
 
 //

Modified: branches/hash/boost/config/compiler/visualc.hpp
==============================================================================
--- branches/hash/boost/config/compiler/visualc.hpp (original)
+++ branches/hash/boost/config/compiler/visualc.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -56,6 +56,7 @@
 # define BOOST_NO_SFINAE
 # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
 # define BOOST_NO_IS_ABSTRACT
+# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
 // TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)?
 # if (_MSC_VER > 1200)
 # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
@@ -71,6 +72,7 @@
 
 #if _MSC_VER <= 1400 // 1400 == VC++ 8.0
 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
 #endif
 
 #ifndef _NATIVE_WCHAR_T_DEFINED

Modified: branches/hash/boost/config/platform/hpux.hpp
==============================================================================
--- branches/hash/boost/config/platform/hpux.hpp (original)
+++ branches/hash/boost/config/platform/hpux.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -2,7 +2,7 @@
 // (C) Copyright Jens Maurer 2001 - 2003.
 // (C) Copyright David Abrahams 2002.
 // (C) Copyright Toon Knapen 2003.
-// (C) Copyright Boris Gubenko 2006.
+// (C) Copyright Boris Gubenko 2006 - 2007.
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -36,7 +36,6 @@
 # define BOOST_HAS_PTHREADS
 # endif
 #elif defined(__HP_aCC) && !defined(BOOST_DISABLE_THREADS)
-//# define BOOST_HAS_THREADS
 # define BOOST_HAS_PTHREADS
 #endif
 
@@ -73,7 +72,9 @@
 # define BOOST_HAS_SIGACTION
 #endif
 #ifndef BOOST_HAS_NRVO
-# define BOOST_HAS_NRVO
+# ifndef __parisc
+# define BOOST_HAS_NRVO
+# endif
 #endif
 #ifndef BOOST_HAS_LOG1P
 # define BOOST_HAS_LOG1P
@@ -81,5 +82,3 @@
 #ifndef BOOST_HAS_EXPM1
 # define BOOST_HAS_EXPM1
 #endif
-
-

Modified: branches/hash/boost/config/stdlib/roguewave.hpp
==============================================================================
--- branches/hash/boost/config/stdlib/roguewave.hpp (original)
+++ branches/hash/boost/config/stdlib/roguewave.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1,6 +1,7 @@
 // (C) Copyright John Maddock 2001 - 2003.
 // (C) Copyright Jens Maurer 2001.
 // (C) Copyright David Abrahams 2003.
+// (C) Copyright Boris Gubenko 2007.
 // Use, modification and distribution are subject to the
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -132,3 +133,15 @@
 # undef BOOST_HAS_LONG_LONG
 #endif
 
+//
+// Define macros specific to RW V2.2 on HP-UX
+//
+#if defined(__HP_aCC) && (BOOST_RWSTD_VER == 0x02020100)
+# ifndef __HP_TC1_MAKE_PAIR
+# define __HP_TC1_MAKE_PAIR
+# endif
+# ifndef _HP_INSTANTIATE_STD2_VL
+# define _HP_INSTANTIATE_STD2_VL
+# endif
+#endif
+

Modified: branches/hash/boost/config/suffix.hpp
==============================================================================
--- branches/hash/boost/config/suffix.hpp (original)
+++ branches/hash/boost/config/suffix.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -564,5 +564,3 @@
 #endif
 
 
-
-

Modified: branches/hash/boost/date_time/compiler_config.hpp
==============================================================================
--- branches/hash/boost/date_time/compiler_config.hpp (original)
+++ branches/hash/boost/date_time/compiler_config.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -140,7 +140,7 @@
 #if defined(BOOST_HAS_THREADS)
 # if defined(_MSC_VER) || defined(__MWERKS__) || defined(__MINGW32__) || defined(__BORLANDC__)
      //no reentrant posix functions (eg: localtime_r)
-# else
+# elif (!defined(__hpux) || (defined(__hpux) && defined(_REENTRANT)))
 # define BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS
 # endif
 #endif

Modified: branches/hash/boost/date_time/format_date_parser.hpp
==============================================================================
--- branches/hash/boost/date_time/format_date_parser.hpp (original)
+++ branches/hash/boost/date_time/format_date_parser.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -87,7 +87,7 @@
 inline
 int_type
 var_string_to_int(std::istreambuf_iterator<charT>& itr,
- std::istreambuf_iterator<charT>& stream_end,
+ std::istreambuf_iterator<charT>& /* stream_end */,
                   unsigned int max_length)
 {
   typedef std::basic_string<charT> string_type;

Modified: branches/hash/boost/date_time/time_facet.hpp
==============================================================================
--- branches/hash/boost/date_time/time_facet.hpp (original)
+++ branches/hash/boost/date_time/time_facet.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -197,7 +197,7 @@
 #endif
 
     //! sets default formats for ptime, local_date_time, and time_duration
- explicit time_facet(::size_t a_ref = 0)
+ explicit time_facet(::size_t /* a_ref */ = 0)
       //: base_type(standard_format),
       : base_type(default_time_format),
         m_time_duration_format(string_type(duration_sign_negative_only) + default_time_duration_format)

Modified: branches/hash/boost/detail/lightweight_mutex.hpp
==============================================================================
--- branches/hash/boost/detail/lightweight_mutex.hpp (original)
+++ branches/hash/boost/detail/lightweight_mutex.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -30,10 +30,10 @@
 
 #if !defined(BOOST_HAS_THREADS)
 # include <boost/detail/lwm_nop.hpp>
-#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
-# include <boost/detail/lwm_win32_cs.hpp>
 #elif defined(BOOST_HAS_PTHREADS)
 # include <boost/detail/lwm_pthreads.hpp>
+#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
+# include <boost/detail/lwm_win32_cs.hpp>
 #else
 // Use #define BOOST_DISABLE_THREADS to avoid the error
 # error Unrecognized threading platform

Deleted: branches/hash/boost/filesystem/cerrno.hpp
==============================================================================
--- branches/hash/boost/filesystem/cerrno.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
+++ (empty file)
@@ -1,23 +0,0 @@
-// Boost Filesystem cerrno.hpp header --------------------------------------//
-
-// Copyright Beman Dawes 2005.
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See library home page at http://www.boost.org/libs/filesystem
-
-#ifndef BOOST_FILESYSTEM_CERRNO_HPP
-#define BOOST_FILESYSTEM_CERRNO_HPP
-
-#include <cerrno>
-
-#if defined __BORLANDC__
-#define ENOSYS 9997
-#endif
-
-#define EBADHANDLE 9998 // bad handle
-#define EOTHER 9999 // Other error not translatable
- // to a POSIX errno value
-
-#endif // include guard

Modified: branches/hash/boost/filesystem/convenience.hpp
==============================================================================
--- branches/hash/boost/filesystem/convenience.hpp (original)
+++ branches/hash/boost/filesystem/convenience.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1,7 +1,7 @@
 // boost/filesystem/convenience.hpp ----------------------------------------//
 
-// © Copyright Beman Dawes, 2002-2005
-// © Copyright Vladimir Prus, 2002
+// Copyright Beman Dawes, 2002-2005
+// Copyright Vladimir Prus, 2002
 // Use, modification, and distribution is subject to the Boost Software
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
@@ -14,7 +14,7 @@
 #define BOOST_FILESYSTEM_CONVENIENCE_HPP
 
 #include <boost/filesystem/operations.hpp>
-#include <boost/cerrno.hpp>
+#include <boost/system/error_code.hpp>
 #include <vector>
 #include <stack>
 
@@ -45,7 +45,8 @@
            if ( !ph.empty() && !is_directory(ph) )
                boost::throw_exception( basic_filesystem_error<Path>(
                  "boost::filesystem::create_directories", ph,
- boost::system::error_code(EEXIST, boost::system::errno_ecat) ) );
+ boost::system::make_error_code(
+ boost::system::posix::file_exists ) ) );
            return false;
          }
 
@@ -188,6 +189,7 @@
 
       bool equal( const basic_recursive_directory_iterator & rhs ) const
         { return m_imp == rhs.m_imp; }
+
     };
 
     typedef basic_recursive_directory_iterator<path> recursive_directory_iterator;
@@ -204,6 +206,8 @@
       : m_imp( new detail::recur_dir_itr_imp<Path> )
     {
       m_imp->m_stack.push( basic_directory_iterator<Path>( dir_path ) );
+ if ( m_imp->m_stack.top () == basic_directory_iterator<Path>() )
+ { m_imp.reset (); }
     }
 
     template<class Path>
@@ -212,8 +216,10 @@
         system::error_code & ec )
       : m_imp( new detail::recur_dir_itr_imp<Path> )
     {
- m_imp->m_stack.push( basic_directory_iterator<Path>( dir_path, std::nothrow ) );
       m_imp->m_no_throw = true;
+ m_imp->m_stack.push( basic_directory_iterator<Path>( dir_path, ec ) );
+ if ( m_imp->m_stack.top () == basic_directory_iterator<Path>() )
+ { m_imp.reset (); }
     }
 
     // increment
@@ -224,15 +230,15 @@
       
       static const basic_directory_iterator<Path> end_itr;
 
- if ( m_imp->m_no_push ) m_imp->m_no_push = false;
+ if ( m_imp->m_no_push )
+ { m_imp->m_no_push = false; }
       else if ( is_directory( m_imp->m_stack.top()->status() ) )
       {
         system::error_code ec;
         m_imp->m_stack.push(
           m_imp->m_no_throw
             ? basic_directory_iterator<Path>( *m_imp->m_stack.top(), ec )
- : basic_directory_iterator<Path>( *m_imp->m_stack.top() )
- );
+ : basic_directory_iterator<Path>( *m_imp->m_stack.top() ) );
         if ( m_imp->m_stack.top() != end_itr )
         {
           ++m_imp->m_level;
@@ -258,8 +264,17 @@
       BOOST_ASSERT( m_imp.get() && "pop on end iterator" );
       BOOST_ASSERT( m_imp->m_level > 0 && "pop with level < 1" );
 
- m_imp->m_stack.pop();
- --m_imp->m_level;
+ static const basic_directory_iterator<Path> end_itr;
+
+ do
+ {
+ m_imp->m_stack.pop();
+ --m_imp->m_level;
+ }
+ while ( !m_imp->m_stack.empty()
+ && ++m_imp->m_stack.top() == end_itr );
+
+ if ( m_imp->m_stack.empty() ) m_imp.reset(); // done, so make end iterator
     }
 
   } // namespace filesystem

Modified: branches/hash/boost/filesystem/operations.hpp
==============================================================================
--- branches/hash/boost/filesystem/operations.hpp (original)
+++ branches/hash/boost/filesystem/operations.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -160,6 +160,8 @@
         last_write_time_api( const std::string & ph, std::time_t new_value );
       BOOST_FILESYSTEM_DECL system::error_code
         get_current_path_api( std::string & ph );
+ BOOST_FILESYSTEM_DECL system::error_code
+ set_current_path_api( const std::string & ph );
       BOOST_FILESYSTEM_DECL query_pair
         create_directory_api( const std::string & ph );
       BOOST_FILESYSTEM_DECL system::error_code
@@ -200,6 +202,8 @@
         last_write_time_api( const std::wstring & ph, std::time_t new_value );
       BOOST_FILESYSTEM_DECL system::error_code
         get_current_path_api( std::wstring & ph );
+ BOOST_FILESYSTEM_DECL system::error_code
+ set_current_path_api( const std::wstring & ph );
       BOOST_FILESYSTEM_DECL query_pair
         create_directory_api( const std::wstring & ph );
 # ifdef BOOST_FS_HARD_LINK
@@ -506,6 +510,15 @@
     }
 
     template< class Path >
+ void current_path( const Path & ph )
+ {
+ system::error_code ec( detail::set_current_path_api( ph.string() ) );
+ if ( ec )
+ boost::throw_exception( basic_filesystem_error<Path>(
+ "boost::filesystem::current_path", ph, ec ) );
+ }
+
+ template< class Path >
     const Path & initial_path()
     {
       static Path init_path;
@@ -991,7 +1004,7 @@
        m_symlink_status = symlink_st;
      }
 
- const Path & path() const { return m_path; }
+ const Path & path() const { return m_path; }
       file_status status() const;
       file_status status( system::error_code & ec ) const;
       file_status symlink_status() const;

Modified: branches/hash/boost/filesystem/path.hpp
==============================================================================
--- branches/hash/boost/filesystem/path.hpp (original)
+++ branches/hash/boost/filesystem/path.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1,6 +1,6 @@
 // boost/filesystem/path.hpp -----------------------------------------------//
 
-// Copyright Beman Dawes 2002-2005
+// Copyright Beman Dawes 2002-2005
 
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -566,6 +566,53 @@
     }
 # endif
 
+ // basic_filesystem_error helpers --------------------------------------//
+
+ // Originally choice of implementation was done via specialization of
+ // basic_filesystem_error::what(). Several compilers (GCC, aCC, etc.)
+ // couldn't handle that, so the choice is now accomplished by overloading.
+
+ namespace detail
+ {
+ // BOOST_FILESYSTEM_DECL version works for VC++ but not GCC. Go figure!
+ inline
+ const char * what( const char * sys_err_what,
+ const path & path1, const path & path2, std::string & target )
+ {
+ try
+ {
+ if ( target.empty() )
+ {
+ target = sys_err_what;
+ if ( !path1.empty() )
+ {
+ target += ": \"";
+ target += path1.file_string();
+ target += "\"";
+ }
+ if ( !path2.empty() )
+ {
+ target += ", \"";
+ target += path2.file_string();
+ target += "\"";
+ }
+ }
+ return target.c_str();
+ }
+ catch (...)
+ {
+ return sys_err_what;
+ }
+ }
+
+ template<class Path>
+ const char * what( const char * sys_err_what,
+ const Path & path1, const Path & path2, std::string & target )
+ {
+ return sys_err_what;
+ }
+ }
+
     // basic_filesystem_error ----------------------------------------------//
 
     template<class Path>
@@ -599,7 +646,13 @@
         return m_imp_ptr.get() ? m_imp_ptr->m_path2 : empty_path ;
       }
 
- const char * what() const throw() { return system_error::what(); }
+ const char * what() const throw()
+ {
+ if ( !m_imp_ptr.get() )
+ return system_error::what();
+ return detail::what( system_error::what(), m_imp_ptr->m_path1,
+ m_imp_ptr->m_path2, m_imp_ptr->m_what );
+ }
 
     private:
       struct m_imp
@@ -611,33 +664,6 @@
       boost::shared_ptr<m_imp> m_imp_ptr;
     };
 
-// This specialization is causing problems with GCC, aCC (HP-UX)
-// and cxx on Alpha platforms.
-#if !(defined(__GNUC__) || defined(__HP_aCC) || \
- (defined(__DECCXX) && defined(__alpha)))
- template<> const char * basic_filesystem_error<path>::what() const throw()
- {
- if ( !m_imp_ptr.get() ) return system_error::what();
- if ( m_imp_ptr->m_what.empty() )
- {
- m_imp_ptr->m_what = system_error::what();
- if ( !path1().empty() )
- {
- m_imp_ptr->m_what += ": \"";
- m_imp_ptr->m_what += path1().file_string();
- m_imp_ptr->m_what += "\"";
- }
- if ( !path2().empty() )
- {
- m_imp_ptr->m_what += ", \"";
- m_imp_ptr->m_what += path2().file_string();
- m_imp_ptr->m_what += "\"";
- }
- }
- return m_imp_ptr->m_what.c_str();
- }
-#endif
-
     typedef basic_filesystem_error<path> filesystem_error;
 
 # ifndef BOOST_FILESYSTEM_NARROW_ONLY

Modified: branches/hash/boost/function/function_base.hpp
==============================================================================
--- branches/hash/boost/function/function_base.hpp (original)
+++ branches/hash/boost/function/function_base.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -30,6 +30,11 @@
 #endif
 #include <boost/function_equal.hpp>
 
+#if defined(BOOST_MSVC)
+# pragma warning( push )
+# pragma warning( disable : 4793 ) // complaint about native code generation
+#endif
+
 // Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info.
 #ifdef BOOST_NO_EXCEPTION_STD_NAMESPACE
 // Embedded VC++ does not have type_info in namespace std
@@ -206,8 +211,8 @@
       struct reference_manager
       {
         static inline void
- get(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op)
+ manage(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op)
         {
           switch (op) {
           case clone_functor_tag:
@@ -376,6 +381,15 @@
                   mpl::bool_<(function_allows_small_object_optimization<functor_type>::value)>());
         }
 
+ // For member pointers, we treat them as function objects with
+ // the small-object optimization always enabled.
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, member_ptr_tag)
+ {
+ manager(in_buffer, out_buffer, op, mpl::true_());
+ }
+
       public:
         /* Dispatch to an appropriate manager based on whether we have a
            function pointer or a function object pointer. */
@@ -464,7 +478,6 @@
        */
       struct vtable_base
       {
- vtable_base() : manager(0) { }
         void (*manager)(const function_buffer& in_buffer,
                         function_buffer& out_buffer,
                         functor_manager_operation_type op);
@@ -566,7 +579,7 @@
 #endif
 
 public: // should be protected, but GCC 2.95.3 will fail to allow access
- detail::function::vtable_base* vtable;
+ const detail::function::vtable_base* vtable;
   mutable detail::function::function_buffer functor;
 };
 
@@ -741,4 +754,8 @@
 #undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL
 #undef BOOST_FUNCTION_COMPARE_TYPE_ID
 
+#if defined(BOOST_MSVC)
+# pragma warning( pop )
+#endif
+
 #endif // BOOST_FUNCTION_BASE_HEADER

Modified: branches/hash/boost/function/function_template.hpp
==============================================================================
--- branches/hash/boost/function/function_template.hpp (original)
+++ branches/hash/boost/function/function_template.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -54,12 +54,20 @@
   BOOST_JOIN(function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
 #define BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER \
   BOOST_JOIN(void_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_MEMBER_INVOKER \
+ BOOST_JOIN(member_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_VOID_MEMBER_INVOKER \
+ BOOST_JOIN(void_member_invoker,BOOST_FUNCTION_NUM_ARGS)
 #define BOOST_FUNCTION_GET_FUNCTION_INVOKER \
   BOOST_JOIN(get_function_invoker,BOOST_FUNCTION_NUM_ARGS)
 #define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER \
   BOOST_JOIN(get_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
 #define BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER \
   BOOST_JOIN(get_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_GET_MEMBER_INVOKER \
+ BOOST_JOIN(get_member_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_GET_INVOKER \
+ BOOST_JOIN(get_invoker,BOOST_FUNCTION_NUM_ARGS)
 #define BOOST_FUNCTION_VTABLE BOOST_JOIN(basic_vtable,BOOST_FUNCTION_NUM_ARGS)
 
 #ifndef BOOST_NO_VOID_RETURNS
@@ -181,6 +189,44 @@
         }
       };
 
+#if BOOST_FUNCTION_NUM_ARGS > 0
+ /* Handle invocation of member pointers. */
+ template<
+ typename MemberPtr,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_MEMBER_INVOKER
+ {
+ static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_PARMS)
+
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS);
+ }
+ };
+
+ template<
+ typename MemberPtr,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_VOID_MEMBER_INVOKER
+ {
+ static BOOST_FUNCTION_VOID_RETURN_TYPE
+ invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_PARMS)
+
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(&function_obj_ptr.data);
+ BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS));
+ }
+ };
+#endif
+
       template<
         typename FunctionPtr,
         typename R BOOST_FUNCTION_COMMA
@@ -244,12 +290,130 @@
>::type type;
       };
 
+#if BOOST_FUNCTION_NUM_ARGS > 0
+ /* Retrieve the appropriate invoker for a member pointer. */
+ template<
+ typename MemberPtr,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_GET_MEMBER_INVOKER
+ {
+ typedef typename mpl::if_c<(is_void<R>::value),
+ BOOST_FUNCTION_VOID_MEMBER_INVOKER<
+ MemberPtr,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >,
+ BOOST_FUNCTION_MEMBER_INVOKER<
+ MemberPtr,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >
+ >::type type;
+ };
+#endif
+
+ /* Given the tag returned by get_function_tag, retrieve the
+ actual invoker that will be used for the given function
+ object.
+
+ Each specialization contains an "apply" nested class template
+ that accepts the function object, return type, function
+ argument types, and allocator. The resulting "apply" class
+ contains two typedefs, "invoker_type" and "manager_type",
+ which correspond to the invoker and manager types. */
+ template<typename Tag>
+ struct BOOST_FUNCTION_GET_INVOKER { };
+
+ /* Retrieve the invoker for a function pointer. */
+ template<>
+ struct BOOST_FUNCTION_GET_INVOKER<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
+ typename Allocator>
+ struct apply
+ {
+ typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER<
+ FunctionPtr,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >::type
+ invoker_type;
+
+ typedef functor_manager<FunctionPtr, Allocator> manager_type;
+ };
+ };
+
+#if BOOST_FUNCTION_NUM_ARGS > 0
+ /* Retrieve the invoker for a member pointer. */
+ template<>
+ struct BOOST_FUNCTION_GET_INVOKER<member_ptr_tag>
+ {
+ template<typename MemberPtr,
+ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
+ typename Allocator>
+ struct apply
+ {
+ typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER<
+ MemberPtr,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >::type
+ invoker_type;
+
+ typedef functor_manager<MemberPtr, Allocator> manager_type;
+ };
+ };
+#endif
+
+ /* Retrieve the invoker for a function object. */
+ template<>
+ struct BOOST_FUNCTION_GET_INVOKER<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
+ typename Allocator>
+ struct apply
+ {
+ typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
+ FunctionObj,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >::type
+ invoker_type;
+
+ typedef functor_manager<FunctionObj, Allocator> manager_type;
+ };
+ };
+
+ /* Retrieve the invoker for a reference to a function object. */
+ template<>
+ struct BOOST_FUNCTION_GET_INVOKER<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
+ typename Allocator>
+ struct apply
+ {
+ typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER<
+ typename RefWrapper::type,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >::type
+ invoker_type;
+
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+
       /**
        * vtable for a specific boost::function instance.
        */
       template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
                typename Allocator>
- struct BOOST_FUNCTION_VTABLE : vtable_base
+ struct BOOST_FUNCTION_VTABLE
       {
 #ifndef BOOST_NO_VOID_RETURNS
         typedef R result_type;
@@ -262,50 +426,24 @@
                                             BOOST_FUNCTION_TEMPLATE_ARGS);
 
         template<typename F>
- BOOST_FUNCTION_VTABLE(F f) : vtable_base(), invoker(0)
- {
- init(f);
- }
-
- template<typename F>
- bool assign_to(F f, function_buffer& functor)
+ bool assign_to(const F& f, function_buffer& functor) const
         {
           typedef typename get_function_tag<F>::type tag;
           return assign_to(f, functor, tag());
         }
 
- void clear(function_buffer& functor)
+ void clear(function_buffer& functor) const
         {
- if (manager)
- manager(functor, functor, destroy_functor_tag);
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
         }
 
       private:
- template<typename F>
- void init(F f)
- {
- typedef typename get_function_tag<F>::type tag;
- init(f, tag());
- }
-
         // Function pointers
         template<typename FunctionPtr>
- void init(FunctionPtr /*f*/, function_ptr_tag)
- {
- typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER<
- FunctionPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >::type
- actual_invoker_type;
-
- invoker = &actual_invoker_type::invoke;
- manager = &functor_manager<FunctionPtr, Allocator>::manage;
- }
-
- template<typename FunctionPtr>
         bool
- assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag)
+ assign_to(FunctionPtr f, function_buffer& functor,
+ function_ptr_tag) const
         {
           this->clear(functor);
           if (f) {
@@ -321,22 +459,13 @@
         // Member pointers
 #if BOOST_FUNCTION_NUM_ARGS > 0
         template<typename MemberPtr>
- void init(MemberPtr f, member_ptr_tag)
- {
- // DPG TBD: Add explicit support for member function
- // objects, so we invoke through mem_fn() but we retain the
- // right target_type() values.
- this->init(mem_fn(f));
- }
-
- template<typename MemberPtr>
- bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag)
+ bool
+ assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
         {
- // DPG TBD: Add explicit support for member function
- // objects, so we invoke through mem_fn() but we retain the
- // right target_type() values.
           if (f) {
- this->assign_to(mem_fn(f), functor);
+ // Always use the small-object optimization for member
+ // pointers.
+ assign_functor(f, functor, mpl::true_());
             return true;
           } else {
             return false;
@@ -345,24 +474,11 @@
 #endif // BOOST_FUNCTION_NUM_ARGS > 0
 
         // Function objects
- template<typename FunctionObj>
- void init(FunctionObj /*f*/, function_obj_tag)
- {
- typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
- FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >::type
- actual_invoker_type;
-
- invoker = &actual_invoker_type::invoke;
- manager = &functor_manager<FunctionObj, Allocator>::manage;
- }
-
         // Assign to a function object using the small object optimization
         template<typename FunctionObj>
         void
- assign_functor(FunctionObj f, function_buffer& functor, mpl::true_)
+ assign_functor(const FunctionObj& f, function_buffer& functor,
+ mpl::true_) const
         {
           new ((void*)&functor.data) FunctionObj(f);
         }
@@ -370,7 +486,8 @@
         // Assign to a function object allocated on the heap.
         template<typename FunctionObj>
         void
- assign_functor(FunctionObj f, function_buffer& functor, mpl::false_)
+ assign_functor(const FunctionObj& f, function_buffer& functor,
+ mpl::false_) const
         {
 #ifndef BOOST_NO_STD_ALLOCATOR
           typedef typename Allocator::template rebind<FunctionObj>::other
@@ -390,7 +507,8 @@
 
         template<typename FunctionObj>
         bool
- assign_to(FunctionObj f, function_buffer& functor, function_obj_tag)
+ assign_to(const FunctionObj& f, function_buffer& functor,
+ function_obj_tag) const
         {
           if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
             assign_functor(f, functor,
@@ -403,24 +521,9 @@
 
         // Reference to a function object
         template<typename FunctionObj>
- void
- init(const reference_wrapper<FunctionObj>& /*f*/, function_obj_ref_tag)
- {
- typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER<
- FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >::type
- actual_invoker_type;
-
- invoker = &actual_invoker_type::invoke;
- manager = &reference_manager<FunctionObj>::get;
- }
-
- template<typename FunctionObj>
         bool
         assign_to(const reference_wrapper<FunctionObj>& f,
- function_buffer& functor, function_obj_ref_tag)
+ function_buffer& functor, function_obj_ref_tag) const
         {
           if (!boost::detail::function::has_empty_target(f.get_pointer())) {
             // DPG TBD: We might need to detect constness of
@@ -435,6 +538,7 @@
         }
 
       public:
+ vtable_base base;
         invoker_type invoker;
       };
     } // end namespace function
@@ -538,7 +642,7 @@
       if (this->empty())
         boost::throw_exception(bad_function_call());
 
- return static_cast<vtable_type*>(vtable)->invoker
+ return reinterpret_cast<const vtable_type*>(vtable)->invoker
                (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS);
     }
 #else
@@ -562,12 +666,16 @@
     operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
     {
       this->clear();
+#ifndef BOOST_NO_EXCEPTIONS
       try {
         this->assign_to(f);
       } catch (...) {
         vtable = 0;
         throw;
       }
+#else
+ this->assign_to(f);
+#endif
       return *this;
     }
 
@@ -593,12 +701,16 @@
         return *this;
 
       this->clear();
+#ifndef BOOST_NO_EXCEPTIONS
       try {
         this->assign_to_own(f);
       } catch (...) {
         vtable = 0;
         throw;
       }
+#else
+ this->assign_to_own(f);
+#endif
       return *this;
     }
 
@@ -616,7 +728,7 @@
     void clear()
     {
       if (vtable) {
- static_cast<vtable_type*>(vtable)->clear(this->functor);
+ reinterpret_cast<const vtable_type*>(vtable)->clear(this->functor);
         vtable = 0;
       }
     }
@@ -651,10 +763,24 @@
     }
 
     template<typename Functor>
- void assign_to(Functor f)
+ void assign_to(const Functor& f)
     {
- static vtable_type stored_vtable(f);
- if (stored_vtable.assign_to(f, functor)) vtable = &stored_vtable;
+ using detail::function::vtable_base;
+
+ typedef typename detail::function::get_function_tag<Functor>::type tag;
+ typedef detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS, Allocator>
+ handler_type;
+
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+
+ if (stored_vtable.assign_to(f, functor)) vtable = &stored_vtable.base;
       else vtable = 0;
     }
   };
@@ -689,7 +815,7 @@
     if (this->empty())
       boost::throw_exception(bad_function_call());
 
- return static_cast<vtable_type*>(vtable)->invoker
+ return reinterpret_cast<const vtable_type*>(vtable)->invoker
              (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS);
   }
 #endif
@@ -806,6 +932,7 @@
 
 // Cleanup after ourselves...
 #undef BOOST_FUNCTION_VTABLE
+#undef BOOST_FUNCTION_GET_INVOKER
 #undef BOOST_FUNCTION_DEFAULT_ALLOCATOR
 #undef BOOST_FUNCTION_COMMA
 #undef BOOST_FUNCTION_FUNCTION
@@ -815,10 +942,12 @@
 #undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
 #undef BOOST_FUNCTION_FUNCTION_REF_INVOKER
 #undef BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER
+#undef BOOST_FUNCTION_MEMBER_INVOKER
+#undef BOOST_FUNCTION_VOID_MEMBER_INVOKER
 #undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
 #undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
 #undef BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER
-#undef BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER
+#undef BOOST_FUNCTION_GET_MEMBER_INVOKER
 #undef BOOST_FUNCTION_TEMPLATE_PARMS
 #undef BOOST_FUNCTION_TEMPLATE_ARGS
 #undef BOOST_FUNCTION_PARMS

Modified: branches/hash/boost/graph/max_cardinality_matching.hpp
==============================================================================
--- branches/hash/boost/graph/max_cardinality_matching.hpp (original)
+++ branches/hash/boost/graph/max_cardinality_matching.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -45,10 +45,10 @@
 
     for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
       {
- vertex_descriptor_t v = *vi;
- if (get(mate,v) != graph_traits<Graph>::null_vertex()
+ vertex_descriptor_t v = *vi;
+ if (get(mate,v) != graph_traits<Graph>::null_vertex()
             && get(vm,v) < get(vm,get(mate,v)))
- ++size_of_matching;
+ ++size_of_matching;
       }
     return size_of_matching;
   }
@@ -76,10 +76,10 @@
     vertex_iterator_t vi, vi_end;
     for( tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
       {
- vertex_descriptor_t v = *vi;
- if (get(mate,v) != graph_traits<Graph>::null_vertex()
+ vertex_descriptor_t v = *vi;
+ if (get(mate,v) != graph_traits<Graph>::null_vertex()
             && v != get(mate,get(mate,v)))
- return false;
+ return false;
       }
     return true;
   }
@@ -188,7 +188,7 @@
     {
       vertex_iterator_t vi, vi_end;
       for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
- mate[*vi] = get(arg_mate, *vi);
+ mate[*vi] = get(arg_mate, *vi);
     }
 
 
@@ -206,25 +206,25 @@
       
       vertex_iterator_t vi, vi_end;
       for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
- {
- vertex_descriptor_t u = *vi;
+ {
+ vertex_descriptor_t u = *vi;
       
- origin[u] = u;
- pred[u] = u;
- ancestor_of_v[u] = 0;
- ancestor_of_w[u] = 0;
- ds.make_set(u);
+ origin[u] = u;
+ pred[u] = u;
+ ancestor_of_v[u] = 0;
+ ancestor_of_w[u] = 0;
+ ds.make_set(u);
       
- if (mate[u] == graph_traits<Graph>::null_vertex())
+ if (mate[u] == graph_traits<Graph>::null_vertex())
         {
           vertex_state[u] = graph::detail::V_EVEN;
           out_edge_iterator_t ei, ei_end;
           for(tie(ei,ei_end) = out_edges(u,g); ei != ei_end; ++ei)
- even_edges.push_back( *ei );
+ even_edges.push_back( *ei );
         }
- else
- vertex_state[u] = graph::detail::V_UNREACHED;
- }
+ else
+ vertex_state[u] = graph::detail::V_UNREACHED;
+ }
     
       //end initializations
     
@@ -234,40 +234,41 @@
       bool found_alternating_path = false;
       
       while(!even_edges.empty() && !found_alternating_path)
- {
- // since we push even edges onto the back of the list as
- // they're discovered, taking them off the back will search
- // for augmenting paths depth-first.
- edge_descriptor_t current_edge = even_edges.back();
- even_edges.pop_back();
-
- v = source(current_edge,g);
- w = target(current_edge,g);
-
- vertex_descriptor_t v_prime = origin[ds.find_set(v)];
- vertex_descriptor_t w_prime = origin[ds.find_set(w)];
-
- // because of the way we put all of the edges on the queue,
- // v_prime should be labeled V_EVEN; the following is a
- // little paranoid but it could happen...
- if (vertex_state[v_prime] != graph::detail::V_EVEN)
+ {
+ // since we push even edges onto the back of the list as
+ // they're discovered, taking them off the back will search
+ // for augmenting paths depth-first.
+ edge_descriptor_t current_edge = even_edges.back();
+ even_edges.pop_back();
+
+ v = source(current_edge,g);
+ w = target(current_edge,g);
+
+ vertex_descriptor_t v_prime = origin[ds.find_set(v)];
+ vertex_descriptor_t w_prime = origin[ds.find_set(w)];
+
+ // because of the way we put all of the edges on the queue,
+ // v_prime should be labeled V_EVEN; the following is a
+ // little paranoid but it could happen...
+ if (vertex_state[v_prime] != graph::detail::V_EVEN)
         {
           std::swap(v_prime,w_prime);
           std::swap(v,w);
         }
 
- if (vertex_state[w_prime] == graph::detail::V_UNREACHED)
+ if (vertex_state[w_prime] == graph::detail::V_UNREACHED)
         {
           vertex_state[w_prime] = graph::detail::V_ODD;
           vertex_state[mate[w_prime]] = graph::detail::V_EVEN;
           out_edge_iterator_t ei, ei_end;
           for( tie(ei,ei_end) = out_edges(mate[w_prime], g); ei != ei_end; ++ei)
- even_edges.push_back(*ei);
+ even_edges.push_back(*ei);
           pred[w_prime] = v;
         }
- //w_prime == v_prime can happen below if we get an edge that has been
- //shrunk into a blossom
- else if (vertex_state[w_prime] == graph::detail::V_EVEN && w_prime != v_prime)
+
+ //w_prime == v_prime can happen below if we get an edge that has been
+ //shrunk into a blossom
+ else if (vertex_state[w_prime] == graph::detail::V_EVEN && w_prime != v_prime)
         {
           vertex_descriptor_t w_up = w_prime;
           vertex_descriptor_t v_up = v_prime;
@@ -291,42 +292,42 @@
               w_free_ancestor == graph_traits<Graph>::null_vertex()
               )
              )
- {
- ancestor_of_w[w_up] = timestamp;
- ancestor_of_v[v_up] = timestamp;
-
- if (w_free_ancestor == graph_traits<Graph>::null_vertex())
- w_up = parent(w_up);
- if (v_free_ancestor == graph_traits<Graph>::null_vertex())
- v_up = parent(v_up);
+ {
+ ancestor_of_w[w_up] = timestamp;
+ ancestor_of_v[v_up] = timestamp;
+
+ if (w_free_ancestor == graph_traits<Graph>::null_vertex())
+ w_up = parent(w_up);
+ if (v_free_ancestor == graph_traits<Graph>::null_vertex())
+ v_up = parent(v_up);
           
- if (mate[v_up] == graph_traits<Graph>::null_vertex())
- v_free_ancestor = v_up;
- if (mate[w_up] == graph_traits<Graph>::null_vertex())
- w_free_ancestor = w_up;
+ if (mate[v_up] == graph_traits<Graph>::null_vertex())
+ v_free_ancestor = v_up;
+ if (mate[w_up] == graph_traits<Graph>::null_vertex())
+ w_free_ancestor = w_up;
           
- if (ancestor_of_w[v_up] == timestamp)
+ if (ancestor_of_w[v_up] == timestamp)
+ nearest_common_ancestor = v_up;
+ else if (ancestor_of_v[w_up] == timestamp)
+ nearest_common_ancestor = w_up;
+ else if (v_free_ancestor == w_free_ancestor &&
+ v_free_ancestor != graph_traits<Graph>::null_vertex())
             nearest_common_ancestor = v_up;
- else if (ancestor_of_v[w_up] == timestamp)
- nearest_common_ancestor = w_up;
- else if (v_free_ancestor == w_free_ancestor &&
- v_free_ancestor != graph_traits<Graph>::null_vertex())
- nearest_common_ancestor = v_up;
- }
+ }
           
           if (nearest_common_ancestor == graph_traits<Graph>::null_vertex())
- found_alternating_path = true; //to break out of the loop
+ found_alternating_path = true; //to break out of the loop
           else
- {
- //shrink the blossom
- link_and_set_bridges(w_prime, nearest_common_ancestor, std::make_pair(w,v));
- link_and_set_bridges(v_prime, nearest_common_ancestor, std::make_pair(v,w));
- }
+ {
+ //shrink the blossom
+ link_and_set_bridges(w_prime, nearest_common_ancestor, std::make_pair(w,v));
+ link_and_set_bridges(v_prime, nearest_common_ancestor, std::make_pair(v,w));
+ }
         }
- }
+ }
       
       if (!found_alternating_path)
- return false;
+ return false;
 
       // retrieve the augmenting path and put it in aug_path
       reversed_retrieve_augmenting_path(v, v_free_ancestor);
@@ -335,14 +336,14 @@
       // augment the matching along aug_path
       vertex_descriptor_t a,b;
       while (!aug_path.empty())
- {
- a = aug_path.front();
- aug_path.pop_front();
- b = aug_path.front();
- aug_path.pop_front();
- mate[a] = b;
- mate[b] = a;
- }
+ {
+ a = aug_path.front();
+ aug_path.pop_front();
+ b = aug_path.front();
+ aug_path.pop_front();
+ mate[a] = b;
+ mate[b] = a;
+ }
       
       return true;
       
@@ -356,7 +357,7 @@
     {
       vertex_iterator_t vi,vi_end;
       for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
- put(pm, *vi, mate[*vi]);
+ put(pm, *vi, mate[*vi]);
     }
 
 
@@ -367,7 +368,7 @@
     {
       vertex_iterator_t vi,vi_end;
       for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
- put(pm, *vi, vertex_state[origin[ds.find_set(*vi)]]);
+ put(pm, *vi, vertex_state[origin[ds.find_set(*vi)]]);
     }
 
 
@@ -379,11 +380,11 @@
     {
       if (vertex_state[x] == graph::detail::V_EVEN
           && mate[x] != graph_traits<Graph>::null_vertex())
- return mate[x];
+ return mate[x];
       else if (vertex_state[x] == graph::detail::V_ODD)
- return origin[ds.find_set(pred[x])];
+ return origin[ds.find_set(pred[x])];
       else
- return x;
+ return x;
     }
     
     
@@ -394,18 +395,18 @@
                   vertex_pair_t the_bridge)
     {
       for(vertex_descriptor_t v = x; v != stop_vertex; v = parent(v))
- {
- ds.union_set(v, stop_vertex);
- origin[ds.find_set(stop_vertex)] = stop_vertex;
+ {
+ ds.union_set(v, stop_vertex);
+ origin[ds.find_set(stop_vertex)] = stop_vertex;
 
- if (vertex_state[v] == graph::detail::V_ODD)
+ if (vertex_state[v] == graph::detail::V_ODD)
         {
           bridge[v] = the_bridge;
           out_edge_iterator_t oei, oei_end;
           for(tie(oei, oei_end) = out_edges(v,g); oei != oei_end; ++oei)
- even_edges.push_back(*oei);
+ even_edges.push_back(*oei);
         }
- }
+ }
     }
     
 
@@ -426,19 +427,19 @@
     void retrieve_augmenting_path(vertex_descriptor_t v, vertex_descriptor_t w)
     {
       if (v == w)
- aug_path.push_back(v);
+ aug_path.push_back(v);
       else if (vertex_state[v] == graph::detail::V_EVEN)
- {
- aug_path.push_back(v);
- aug_path.push_back(mate[v]);
- retrieve_augmenting_path(pred[mate[v]], w);
- }
+ {
+ aug_path.push_back(v);
+ aug_path.push_back(mate[v]);
+ retrieve_augmenting_path(pred[mate[v]], w);
+ }
       else //vertex_state[v] == graph::detail::V_ODD
- {
- aug_path.push_back(v);
- reversed_retrieve_augmenting_path(bridge[v].first, mate[v]);
- retrieve_augmenting_path(bridge[v].second, w);
- }
+ {
+ aug_path.push_back(v);
+ reversed_retrieve_augmenting_path(bridge[v].first, mate[v]);
+ retrieve_augmenting_path(bridge[v].second, w);
+ }
     }
 
 
@@ -447,19 +448,19 @@
     {
 
       if (v == w)
- aug_path.push_back(v);
+ aug_path.push_back(v);
       else if (vertex_state[v] == graph::detail::V_EVEN)
- {
- reversed_retrieve_augmenting_path(pred[mate[v]], w);
- aug_path.push_back(mate[v]);
- aug_path.push_back(v);
- }
+ {
+ reversed_retrieve_augmenting_path(pred[mate[v]], w);
+ aug_path.push_back(mate[v]);
+ aug_path.push_back(v);
+ }
       else //vertex_state[v] == graph::detail::V_ODD
- {
- reversed_retrieve_augmenting_path(bridge[v].second, w);
- retrieve_augmenting_path(bridge[v].first, mate[v]);
- aug_path.push_back(v);
- }
+ {
+ reversed_retrieve_augmenting_path(bridge[v].second, w);
+ retrieve_augmenting_path(bridge[v].first, mate[v]);
+ aug_path.push_back(v);
+ }
     }
 
     
@@ -520,23 +521,23 @@
     {
       vertex_iterator_t vi, vi_end;
       for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
- put(mate, *vi, graph_traits<Graph>::null_vertex());
+ put(mate, *vi, graph_traits<Graph>::null_vertex());
             
       edge_iterator_t ei, ei_end;
       for( tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
- {
- edge_descriptor_t e = *ei;
- vertex_descriptor_t u = source(e,g);
- vertex_descriptor_t v = target(e,g);
+ {
+ edge_descriptor_t e = *ei;
+ vertex_descriptor_t u = source(e,g);
+ vertex_descriptor_t v = target(e,g);
       
- if (get(mate,u) == get(mate,v))
+ if (get(mate,u) == get(mate,v))
         //only way equality can hold is if
- // mate[u] == mate[v] == null_vertex
+ // mate[u] == mate[v] == null_vertex
         {
           put(mate,u,v);
           put(mate,v,u);
         }
- }
+ }
     }
   };
   
@@ -581,9 +582,9 @@
       less_than_by_degree(const Graph& g): m_g(g) {}
       bool operator() (const vertex_pair_t x, const vertex_pair_t y)
       {
- return
- out_degree(PairSelector::select_vertex(x), m_g)
- < out_degree(PairSelector::select_vertex(y), m_g);
+ return
+ out_degree(PairSelector::select_vertex(x), m_g)
+ < out_degree(PairSelector::select_vertex(y), m_g);
       }
     private:
       const Graph& m_g;
@@ -598,17 +599,17 @@
       directed_edges_vector_t edge_list;
       vertex_iterator_t vi, vi_end;
       for(tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi)
- put(mate, *vi, graph_traits<Graph>::null_vertex());
+ put(mate, *vi, graph_traits<Graph>::null_vertex());
 
       edge_iterator_t ei, ei_end;
       for(tie(ei, ei_end) = edges(g); ei != ei_end; ++ei)
- {
- edge_descriptor_t e = *ei;
- vertex_descriptor_t u = source(e,g);
- vertex_descriptor_t v = target(e,g);
- edge_list.push_back(std::make_pair(u,v));
- edge_list.push_back(std::make_pair(v,u));
- }
+ {
+ edge_descriptor_t e = *ei;
+ vertex_descriptor_t u = source(e,g);
+ vertex_descriptor_t v = target(e,g);
+ edge_list.push_back(std::make_pair(u,v));
+ edge_list.push_back(std::make_pair(v,u));
+ }
       
       //sort the edges by the degree of the target, then (using a
       //stable sort) by degree of the source
@@ -619,14 +620,14 @@
       
       //construct the extra greedy matching
       for(typename directed_edges_vector_t::const_iterator itr = edge_list.begin(); itr != edge_list.end(); ++itr)
- {
- if (get(mate,itr->first) == get(mate,itr->second))
+ {
+ if (get(mate,itr->first) == get(mate,itr->second))
         //only way equality can hold is if mate[itr->first] == mate[itr->second] == null_vertex
         {
           put(mate, itr->first, itr->second);
           put(mate, itr->second, itr->first);
         }
- }
+ }
     }
   };
 
@@ -642,7 +643,7 @@
     {
       vertex_iterator_t vi, vi_end;
       for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
- put(mate, *vi, graph_traits<Graph>::null_vertex());
+ put(mate, *vi, graph_traits<Graph>::null_vertex());
     }
   };
   
@@ -666,29 +667,29 @@
     {
     public:
       odd_components_counter(SizeType& c_count):
- m_count(c_count)
+ m_count(c_count)
       {
- m_count = 0;
+ m_count = 0;
       }
       
       template <class Vertex, class Graph>
       void start_vertex(Vertex v, Graph&)
- {
- addend = -1;
+ {
+ m_parity = false;
       }
       
       template <class Vertex, class Graph>
       void discover_vertex(Vertex u, Graph&)
       {
- addend *= -1;
- m_count += addend;
+ m_parity = !m_parity;
+ m_parity ? ++m_count : --m_count;
       }
       
     protected:
       SizeType& m_count;
       
     private:
- SizeType addend;
+ bool m_parity;
       
     };
 
@@ -728,21 +729,27 @@
     typedef typename map_vertex_to_<vertex_descriptor_t>::type
       vertex_to_vertex_map_t;
 
+
     template <typename VertexStateMap>
     struct non_odd_vertex {
       //this predicate is used to create a filtered graph that
       //excludes vertices labeled "graph::detail::V_ODD"
       non_odd_vertex() : vertex_state(0) { }
- non_odd_vertex(VertexStateMap* arg_vertex_state)
+
+ non_odd_vertex(VertexStateMap* arg_vertex_state)
         : vertex_state(arg_vertex_state) { }
- template <typename Vertex>
- bool operator()(const Vertex& v) const {
- BOOST_ASSERT(vertex_state);
- return get(*vertex_state, v) != graph::detail::V_ODD;
+
+ template <typename Vertex>
+ bool operator()(const Vertex& v) const
+ {
+ BOOST_ASSERT(vertex_state);
+ return get(*vertex_state, v) != graph::detail::V_ODD;
       }
+
       VertexStateMap* vertex_state;
     };
 
+
     static bool verify_matching(const Graph& g, MateMap mate, VertexIndexMap vm)
     {
       //For any graph G, let o(G) be the number of connected
@@ -763,7 +770,7 @@
 
       //first, make sure it's a valid matching
       if (!is_a_matching(g,mate,vm))
- return false;
+ return false;
 
       //We'll try to augment the matching once. This serves two
       //purposes: first, if we find some augmenting path, the matching
@@ -775,7 +782,7 @@
       edmonds_augmenting_path_finder<Graph,MateMap,VertexIndexMap>
         augmentor(g,mate,vm);
       if (augmentor.augment_matching())
- return false;
+ return false;
 
       std::vector<int> vertex_state_vector(num_vertices(g));
       vertex_to_int_map_t vertex_state(vertex_state_vector.begin(), vm);
@@ -785,8 +792,8 @@
       v_size_t num_odd_vertices = 0;
       vertex_iterator_t vi, vi_end;
       for(tie(vi,vi_end) = vertices(g); vi != vi_end; ++vi)
- if (vertex_state[*vi] == graph::detail::V_ODD)
- ++num_odd_vertices;
+ if (vertex_state[*vi] == graph::detail::V_ODD)
+ ++num_odd_vertices;
 
       //count the number of connected components with odd cardinality
       //in the graph without graph::detail::V_ODD vertices
@@ -798,9 +805,9 @@
       depth_first_search(fg, visitor(occ).vertex_index_map(vm));
 
       if (2 * matching_size(g,mate,vm) == num_vertices(g) + num_odd_vertices - num_odd_components)
- return true;
+ return true;
       else
- return false;
+ return false;
     }
   };
 
@@ -822,7 +829,7 @@
     bool not_maximum_yet = true;
     while(not_maximum_yet)
       {
- not_maximum_yet = augmentor.augment_matching();
+ not_maximum_yet = augmentor.augment_matching();
       }
     augmentor.get_current_matching(mate);
 

Modified: branches/hash/boost/integer.hpp
==============================================================================
--- branches/hash/boost/integer.hpp (original)
+++ branches/hash/boost/integer.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -34,7 +34,7 @@
   template< int Category > struct int_least_helper {}; // default is empty
 
   // specializatons: 1=long, 2=int, 3=short, 4=signed char,
- // 6=unsigned long, 7=unsigned int, 8=unsigned short, 9=unsigned long
+ // 6=unsigned long, 7=unsigned int, 8=unsigned short, 9=unsigned char
   // no specializations for 0 and 5: requests for a type > long are in error
   template<> struct int_least_helper<1> { typedef long least; };
   template<> struct int_least_helper<2> { typedef int least; };

Modified: branches/hash/boost/iostreams/detail/push.hpp
==============================================================================
--- branches/hash/boost/iostreams/detail/push.hpp (original)
+++ branches/hash/boost/iostreams/detail/push.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -28,7 +28,7 @@
 #include <boost/type_traits/is_convertible.hpp>
 
 //
-// Macro: BOOST_IOSTREAMS_DEFINE_PUSH_CONSTRUCTOR(mode, name, helper).
+// Macro: BOOST_IOSTREAMS_DEFINE_PUSH_CONSTRUCTOR(name, mode, ch, helper).
 // Description: Defines overloads with name 'name' which forward to a function
 // 'helper' which takes a filter or devide by const reference.
 //
@@ -37,7 +37,7 @@
     /**/
 
 //
-// Macro: BOOST_IOSTREAMS_DEFINE_PUSH_CONSTRUCTOR(mode, name, helper).
+// Macro: BOOST_IOSTREAMS_DEFINE_PUSH(name, mode, ch, helper).
 // Description: Defines constructors which forward to a function
 // 'helper' which takes a filter or device by const reference.
 //

Modified: branches/hash/boost/mpi/communicator.hpp
==============================================================================
--- branches/hash/boost/mpi/communicator.hpp (original)
+++ branches/hash/boost/mpi/communicator.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1071,13 +1071,13 @@
  ************************************************************************/
 // Count elements in a message
 template<typename T>
-inline optional<int> status::count()
+inline optional<int> status::count() const
 {
   return count_impl<T>(is_mpi_datatype<T>());
 }
 
 template<typename T>
-optional<int> status::count_impl(mpl::true_)
+optional<int> status::count_impl(mpl::true_) const
 {
   if (m_count != -1)
     return m_count;
@@ -1093,7 +1093,7 @@
 }
 
 template<typename T>
-inline optional<int> status::count_impl(mpl::false_)
+inline optional<int> status::count_impl(mpl::false_) const
 {
   if (m_count == -1)
     return optional<int>();

Modified: branches/hash/boost/mpi/status.hpp
==============================================================================
--- branches/hash/boost/mpi/status.hpp (original)
+++ branches/hash/boost/mpi/status.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -54,7 +54,7 @@
    * Determine whether the communication associated with this object
    * has been successfully cancelled.
   */
- bool cancelled();
+ bool cancelled() const;
 
   /**
    * Determines the number of elements of type @c T contained in the
@@ -66,7 +66,7 @@
    * @returns the number of @c T elements in the message, if it can be
    * determined.
    */
- template<typename T> optional<int> count();
+ template<typename T> optional<int> count() const;
 
   /**
    * References the underlying @c MPI_Status
@@ -82,18 +82,18 @@
   /**
    * INTERNAL ONLY
    */
- template<typename T> optional<int> count_impl(mpl::true_);
+ template<typename T> optional<int> count_impl(mpl::true_) const;
 
   /**
    * INTERNAL ONLY
    */
- template<typename T> optional<int> count_impl(mpl::false_);
+ template<typename T> optional<int> count_impl(mpl::false_) const;
 
  public: // friend templates are not portable
 
   /// INTERNAL ONLY
- MPI_Status m_status;
- int m_count;
+ mutable MPI_Status m_status;
+ mutable int m_count;
 
   friend class communicator;
   friend class request;

Modified: branches/hash/boost/mpl/aux_/integral_wrapper.hpp
==============================================================================
--- branches/hash/boost/mpl/aux_/integral_wrapper.hpp (original)
+++ branches/hash/boost/mpl/aux_/integral_wrapper.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -65,7 +65,7 @@
     typedef AUX_WRAPPER_INST(prior_value) prior;
 #elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \
     || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \
- || BOOST_WORKAROUND(__HP_aCC, <= 53800)
+ || (BOOST_WORKAROUND(__HP_aCC, <= 53800) && (BOOST_WORKAROUND(__hpxstd98, != 1)))
     typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)) ) next;
     typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)) ) prior;
 #else

Modified: branches/hash/boost/numeric/ublas/lu.hpp
==============================================================================
--- branches/hash/boost/numeric/ublas/lu.hpp (original)
+++ branches/hash/boost/numeric/ublas/lu.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -101,7 +101,8 @@
             matrix_column<M> mci (column (m, i));
             matrix_row<M> mri (row (m, i));
             if (m (i, i) != value_type/*zero*/()) {
- project (mci, range (i + 1, size1)) *= value_type (1) / m (i, i);
+ value_type m_inv = value_type (1) / m (i, i);
+ project (mci, range (i + 1, size1)) *= m_inv;
             } else if (singular == 0) {
                 singular = i + 1;
             }
@@ -144,7 +145,8 @@
                 } else {
                     BOOST_UBLAS_CHECK (pm (i) == i_norm_inf, external_logic ());
                 }
- project (mci, range (i + 1, size1)) *= value_type (1) / m (i, i);
+ value_type m_inv = value_type (1) / m (i, i);
+ project (mci, range (i + 1, size1)) *= m_inv;
             } else if (singular == 0) {
                 singular = i + 1;
             }

Modified: branches/hash/boost/parameter/aux_/arg_list.hpp
==============================================================================
--- branches/hash/boost/parameter/aux_/arg_list.hpp (original)
+++ branches/hash/boost/parameter/aux_/arg_list.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -11,6 +11,7 @@
 #include <boost/parameter/aux_/default.hpp>
 #include <boost/parameter/aux_/parameter_requirements.hpp>
 #include <boost/parameter/aux_/yesno.hpp>
+#include <boost/parameter/aux_/maybe.hpp>
 #include <boost/parameter/config.hpp>
 
 #include <boost/mpl/apply.hpp>
@@ -158,10 +159,6 @@
 template <class KW, class T>
 struct tagged_argument;
 
-// Forward declaration for arg_list::operator[], with
-// IS_XXX helper
-struct maybe_base;
-
 template <class T>
 struct is_maybe
   : is_base_and_derived<maybe_base, T>

Modified: branches/hash/boost/python/converter/as_to_python_function.hpp
==============================================================================
--- branches/hash/boost/python/converter/as_to_python_function.hpp (original)
+++ branches/hash/boost/python/converter/as_to_python_function.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -39,6 +39,9 @@
         // but c'est la vie.
         return ToPython::convert(*const_cast<T*>(static_cast<T const*>(x)));
     }
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ static PyTypeObject const * get_pytype() { return ToPython::get_pytype(); }
+#endif
 };
 
 }}} // namespace boost::python::converter

Modified: branches/hash/boost/python/converter/builtin_converters.hpp
==============================================================================
--- branches/hash/boost/python/converter/builtin_converters.hpp (original)
+++ branches/hash/boost/python/converter/builtin_converters.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -47,7 +47,7 @@
 }
 
 // Use expr to create the PyObject corresponding to x
-# define BOOST_PYTHON_RETURN_TO_PYTHON_BY_VALUE(T, expr) \
+# define BOOST_PYTHON_RETURN_TO_PYTHON_BY_VALUE(T, expr, pytype)\
     template <> struct to_python_value<T&> \
         : detail::builtin_to_python \
     { \
@@ -55,6 +55,10 @@
         { \
             return (expr); \
         } \
+ inline PyTypeObject const* get_pytype() const \
+ { \
+ return (pytype); \
+ } \
     }; \
     template <> struct to_python_value<T const&> \
         : detail::builtin_to_python \
@@ -63,6 +67,10 @@
         { \
             return (expr); \
         } \
+ inline PyTypeObject const* get_pytype() const \
+ { \
+ return (pytype); \
+ } \
     };
 
 # define BOOST_PYTHON_ARG_TO_PYTHON_BY_VALUE(T, expr) \
@@ -77,25 +85,25 @@
     }
 
 // Specialize argument and return value converters for T using expr
-# define BOOST_PYTHON_TO_PYTHON_BY_VALUE(T, expr) \
- BOOST_PYTHON_RETURN_TO_PYTHON_BY_VALUE(T,expr) \
+# define BOOST_PYTHON_TO_PYTHON_BY_VALUE(T, expr, pytype) \
+ BOOST_PYTHON_RETURN_TO_PYTHON_BY_VALUE(T,expr, pytype) \
         BOOST_PYTHON_ARG_TO_PYTHON_BY_VALUE(T,expr)
 
 // Specialize converters for signed and unsigned T to Python Int
 # define BOOST_PYTHON_TO_INT(T) \
- BOOST_PYTHON_TO_PYTHON_BY_VALUE(signed T, ::PyInt_FromLong(x)) \
+ BOOST_PYTHON_TO_PYTHON_BY_VALUE(signed T, ::PyInt_FromLong(x), &PyInt_Type) \
     BOOST_PYTHON_TO_PYTHON_BY_VALUE( \
         unsigned T \
         , static_cast<unsigned long>(x) > static_cast<unsigned long>( \
                 (std::numeric_limits<long>::max)()) \
         ? ::PyLong_FromUnsignedLong(x) \
- : ::PyInt_FromLong(x))
+ : ::PyInt_FromLong(x), &PyInt_Type)
 
 // Bool is not signed.
 #if PY_VERSION_HEX >= 0x02030000
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(bool, ::PyBool_FromLong(x))
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(bool, ::PyBool_FromLong(x), &PyBool_Type)
 #else
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(bool, ::PyInt_FromLong(x))
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(bool, ::PyInt_FromLong(x), &PyInt_Type)
 #endif
   
 // note: handles signed char and unsigned char, but not char (see below)
@@ -108,25 +116,25 @@
 // using Python's macro instead of Boost's - we don't seem to get the
 // config right all the time.
 # ifdef HAVE_LONG_LONG
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(signed BOOST_PYTHON_LONG_LONG, ::PyLong_FromLongLong(x))
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(unsigned BOOST_PYTHON_LONG_LONG, ::PyLong_FromUnsignedLongLong(x))
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(signed BOOST_PYTHON_LONG_LONG, ::PyLong_FromLongLong(x), &PyInt_Type)
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(unsigned BOOST_PYTHON_LONG_LONG, ::PyLong_FromUnsignedLongLong(x), &PyInt_Type)
 # endif
     
 # undef BOOST_TO_PYTHON_INT
 
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(char, converter::do_return_to_python(x))
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(char const*, converter::do_return_to_python(x))
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::string, ::PyString_FromStringAndSize(x.data(),implicit_cast<ssize_t>(x.size())))
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(char, converter::do_return_to_python(x), &PyString_Type)
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(char const*, converter::do_return_to_python(x), &PyString_Type)
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::string, ::PyString_FromStringAndSize(x.data(),implicit_cast<ssize_t>(x.size())), &PyString_Type)
 #if defined(Py_USING_UNICODE) && !defined(BOOST_NO_STD_WSTRING)
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::wstring, ::PyUnicode_FromWideChar(x.data(),implicit_cast<ssize_t>(x.size())))
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::wstring, ::PyUnicode_FromWideChar(x.data(),implicit_cast<ssize_t>(x.size())), &PyString_Type)
 # endif
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(float, ::PyFloat_FromDouble(x))
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(double, ::PyFloat_FromDouble(x))
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(long double, ::PyFloat_FromDouble(x))
-BOOST_PYTHON_RETURN_TO_PYTHON_BY_VALUE(PyObject*, converter::do_return_to_python(x))
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::complex<float>, ::PyComplex_FromDoubles(x.real(), x.imag()))
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::complex<double>, ::PyComplex_FromDoubles(x.real(), x.imag()))
-BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::complex<long double>, ::PyComplex_FromDoubles(x.real(), x.imag()))
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(float, ::PyFloat_FromDouble(x), &PyFloat_Type)
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(double, ::PyFloat_FromDouble(x), &PyFloat_Type)
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(long double, ::PyFloat_FromDouble(x), &PyFloat_Type)
+BOOST_PYTHON_RETURN_TO_PYTHON_BY_VALUE(PyObject*, converter::do_return_to_python(x), 0)
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::complex<float>, ::PyComplex_FromDoubles(x.real(), x.imag()), &PyComplex_Type)
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::complex<double>, ::PyComplex_FromDoubles(x.real(), x.imag()), &PyComplex_Type)
+BOOST_PYTHON_TO_PYTHON_BY_VALUE(std::complex<long double>, ::PyComplex_FromDoubles(x.real(), x.imag()), &PyComplex_Type)
 
 # undef BOOST_PYTHON_RETURN_TO_PYTHON_BY_VALUE
 # undef BOOST_PYTHON_ARG_TO_PYTHON_BY_VALUE

Modified: branches/hash/boost/python/converter/pyobject_traits.hpp
==============================================================================
--- branches/hash/boost/python/converter/pyobject_traits.hpp (original)
+++ branches/hash/boost/python/converter/pyobject_traits.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -18,6 +18,9 @@
     // All objects are convertible to PyObject
     static bool check(PyObject*) { return true; }
     static PyObject* checked_downcast(PyObject* x) { return x; }
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ static PyTypeObject const* get_pytype() { return 0; }
+#endif
 };
 
 //

Modified: branches/hash/boost/python/converter/pyobject_type.hpp
==============================================================================
--- branches/hash/boost/python/converter/pyobject_type.hpp (original)
+++ branches/hash/boost/python/converter/pyobject_type.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -14,7 +14,7 @@
 // Used as a base class for specializations which need to provide
 // Python type checking capability.
 template <class Object, PyTypeObject* pytype>
-struct pyobject_type
+struct pyobject_type
 {
     static bool check(PyObject* x)
     {
@@ -27,6 +27,9 @@
             (checked_downcast_impl)(x, pytype)
             );
     }
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ static PyTypeObject const* get_pytype() { return pytype; }
+#endif
 };
 
 }}} // namespace boost::python::converter

Modified: branches/hash/boost/python/converter/registrations.hpp
==============================================================================
--- branches/hash/boost/python/converter/registrations.hpp (original)
+++ branches/hash/boost/python/converter/registrations.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -27,6 +27,7 @@
 {
     convertible_function convertible;
     constructor_function construct;
+ PyTypeObject const* (*expected_pytype)();
     rvalue_from_python_chain* next;
 };
 
@@ -43,6 +44,11 @@
     // exception if no class has been registered.
     PyTypeObject* get_class_object() const;
 
+ // Return common denominator of the python class objects,
+ // convertable to target. Inspects the m_class_object and the value_chains.
+ PyTypeObject const* expected_from_python_type() const;
+ PyTypeObject const* to_python_target_type() const;
+
  public: // data members. So sue me.
     const python::type_info target_type;
 
@@ -57,6 +63,8 @@
 
     // The unique to_python converter for the associated C++ type.
     to_python_function_t m_to_python;
+ PyTypeObject const* (*m_to_python_target_type)();
+
 
     // True iff this type is a shared_ptr. Needed for special rvalue
     // from_python handling.
@@ -77,6 +85,7 @@
       , rvalue_chain(0)
       , m_class_object(0)
       , m_to_python(0)
+ , m_to_python_target_type(0)
       , is_shared_ptr(is_shared_ptr)
 {}
 

Modified: branches/hash/boost/python/converter/registry.hpp
==============================================================================
--- branches/hash/boost/python/converter/registry.hpp (original)
+++ branches/hash/boost/python/converter/registry.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -27,16 +27,17 @@
   // Return a pointer to the corresponding registration, if one exists
   BOOST_PYTHON_DECL registration const* query(type_info);
   
- BOOST_PYTHON_DECL void insert(to_python_function_t, type_info);
+ BOOST_PYTHON_DECL void insert(to_python_function_t, type_info, PyTypeObject const* (*to_python_target_type)() = 0);
 
   // Insert an lvalue from_python converter
- BOOST_PYTHON_DECL void insert(void* (*convert)(PyObject*), type_info);
+ BOOST_PYTHON_DECL void insert(void* (*convert)(PyObject*), type_info, PyTypeObject const* (*expected_pytype)() = 0);
 
   // Insert an rvalue from_python converter
   BOOST_PYTHON_DECL void insert(
       convertible_function
       , constructor_function
       , type_info
+ , PyTypeObject const* (*expected_pytype)() = 0
       );
   
   // Insert an rvalue from_python converter at the tail of the
@@ -45,6 +46,7 @@
       convertible_function
       , constructor_function
       , type_info
+ , PyTypeObject const* (*expected_pytype)() = 0
       );
 }
 

Modified: branches/hash/boost/python/converter/shared_ptr_from_python.hpp
==============================================================================
--- branches/hash/boost/python/converter/shared_ptr_from_python.hpp (original)
+++ branches/hash/boost/python/converter/shared_ptr_from_python.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -10,6 +10,9 @@
 # include <boost/python/converter/from_python.hpp>
 # include <boost/python/converter/rvalue_from_python_data.hpp>
 # include <boost/python/converter/registered.hpp>
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+# include <boost/python/converter/pytype_function.hpp>
+#endif
 # include <boost/shared_ptr.hpp>
 
 namespace boost { namespace python { namespace converter {
@@ -19,7 +22,11 @@
 {
     shared_ptr_from_python()
     {
- converter::registry::insert(&convertible, &construct, type_id<shared_ptr<T> >());
+ converter::registry::insert(&convertible, &construct, type_id<shared_ptr<T> >()
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ , &converter::expected_from_python_type_direct<T>::get_pytype
+#endif
+ );
     }
 
  private:

Modified: branches/hash/boost/python/default_call_policies.hpp
==============================================================================
--- branches/hash/boost/python/default_call_policies.hpp (original)
+++ branches/hash/boost/python/default_call_policies.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -13,6 +13,7 @@
 # include <boost/type_traits/is_pointer.hpp>
 # include <boost/type_traits/is_reference.hpp>
 # include <boost/mpl/or.hpp>
+# include <boost/mpl/front.hpp>
 
 namespace boost { namespace python {
 
@@ -49,6 +50,12 @@
 
     typedef default_result_converter result_converter;
     typedef PyObject* argument_package;
+
+ template <class Sig>
+ struct extract_return_type : mpl::front<Sig>
+ {
+ };
+
 };
 
 struct default_result_converter

Modified: branches/hash/boost/python/detail/caller.hpp
==============================================================================
--- branches/hash/boost/python/detail/caller.hpp (original)
+++ branches/hash/boost/python/detail/caller.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -11,12 +11,15 @@
 # include <boost/python/type_id.hpp>
 # include <boost/python/handle.hpp>
 
+# include <boost/detail/indirect_traits.hpp>
+
 # include <boost/python/detail/invoke.hpp>
 # include <boost/python/detail/signature.hpp>
 # include <boost/python/detail/preprocessor.hpp>
 
 # include <boost/python/arg_from_python.hpp>
 # include <boost/python/converter/context_result_converter.hpp>
+# include <boost/python/converter/builtin_converters.hpp>
 
 # include <boost/preprocessor/iterate.hpp>
 # include <boost/preprocessor/cat.hpp>
@@ -89,6 +92,27 @@
 {
     return ResultConverter();
 }
+
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+template <class ResultConverter>
+struct converter_target_type
+{
+ static PyTypeObject const *get_pytype()
+ {
+ return create_result_converter((PyObject*)0, (ResultConverter *)0, (ResultConverter *)0).get_pytype();
+ }
+};
+
+template < >
+struct converter_target_type <void_result_to_python >
+{
+ static PyTypeObject const *get_pytype()
+ {
+ return 0;
+ }
+};
+#endif
+
     
 template <unsigned> struct caller_arity;
 
@@ -203,11 +227,26 @@
 
         static unsigned min_arity() { return N; }
         
- static signature_element const* signature()
+ static py_func_sig_info signature()
         {
- return detail::signature<Sig>::elements();
+ const signature_element * sig = detail::signature<Sig>::elements();
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+
+ typedef BOOST_DEDUCED_TYPENAME Policies::template extract_return_type<Sig>::type rtype;
+ typedef typename select_result_converter<Policies, rtype>::type result_converter;
+
+ static const signature_element ret = {
+ (boost::is_void<rtype>::value ? "void" : type_id<rtype>().name())
+ , &detail::converter_target_type<result_converter>::get_pytype
+ , boost::detail::indirect_traits::is_reference_to_non_const<rtype>::value
+ };
+ py_func_sig_info res = {sig, &ret };
+#else
+ py_func_sig_info res = {sig, sig };
+#endif
+
+ return res;
         }
-
      private:
         compressed_pair<F,Policies> m_data;
     };

Modified: branches/hash/boost/python/detail/config.hpp
==============================================================================
--- branches/hash/boost/python/detail/config.hpp (original)
+++ branches/hash/boost/python/detail/config.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -134,4 +134,8 @@
 #include <boost/config/auto_link.hpp>
 #endif // auto-linking disabled
 
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+#define BOOST_PYTHON_SUPPORTS_PY_SIGNATURES // enables smooth transition
+#endif
+
 #endif // CONFIG_DWA052200_H_

Modified: branches/hash/boost/python/detail/defaults_def.hpp
==============================================================================
--- branches/hash/boost/python/detail/defaults_def.hpp (original)
+++ branches/hash/boost/python/detail/defaults_def.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -168,7 +168,7 @@
           char const* doc)
       {
           // define the NTH stub function of stubs
- define_stub_function<N>::define(name, stubs, kw, policies, name_space, 0);
+ define_stub_function<N>::define(name, stubs, kw, policies, name_space, doc);
 
           if (kw.second > kw.first)
               --kw.second;

Modified: branches/hash/boost/python/detail/defaults_gen.hpp
==============================================================================
--- branches/hash/boost/python/detail/defaults_gen.hpp (original)
+++ branches/hash/boost/python/detail/defaults_gen.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -248,7 +248,7 @@
         BOOST_PYTHON_GEN_MEM_FUNCTION( \
             fname, void_return_type, n_args, n_dflts, ;) \
                                                                                         \
- BOOST_PYTHON_OVERLOAD_CONSTRUCTORS(fstubs_name, n_args, n_dflts) \
+ BOOST_PYTHON_OVERLOAD_CONSTRUCTORS(fstubs_name, n_args + 1, n_dflts) \
     };
 
 # else // !defined(BOOST_NO_VOID_RETURNS)
@@ -273,7 +273,7 @@
             fname, non_void_return_type, n_args, n_dflts, return) \
                                                                                         \
         typedef non_void_return_type void_return_type; \
- BOOST_PYTHON_OVERLOAD_CONSTRUCTORS(fstubs_name, n_args, n_dflts) \
+ BOOST_PYTHON_OVERLOAD_CONSTRUCTORS(fstubs_name, n_args + 1, n_dflts) \
     };
 
 # endif // !defined(BOOST_NO_VOID_RETURNS)

Modified: branches/hash/boost/python/detail/make_keyword_range_fn.hpp
==============================================================================
--- branches/hash/boost/python/detail/make_keyword_range_fn.hpp (original)
+++ branches/hash/boost/python/detail/make_keyword_range_fn.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -57,6 +57,9 @@
     , Holder* = 0
     , ArgList* = 0, Arity* = 0)
 {
+#if !defined( BOOST_PYTHON_NO_PY_SIGNATURES) && defined( BOOST_PYTHON_PY_SYGNATURES_PROPER_INIT_SELF_TYPE)
+ python_class<BOOST_DEDUCED_TYPENAME Holder::value_type>::register_();
+#endif
     return detail::make_keyword_range_function(
         objects::make_holder<Arity::value>
             ::template apply<Holder,ArgList>::execute

Modified: branches/hash/boost/python/detail/signature.hpp
==============================================================================
--- branches/hash/boost/python/detail/signature.hpp (original)
+++ branches/hash/boost/python/detail/signature.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -12,6 +12,7 @@
 
 # include <boost/python/detail/preprocessor.hpp>
 # include <boost/python/detail/indirect_traits.hpp>
+# include <boost/python/converter/pytype_function.hpp>
 
 # include <boost/preprocessor/iterate.hpp>
 # include <boost/preprocessor/iteration/local.hpp>
@@ -24,9 +25,16 @@
 struct signature_element
 {
     char const* basename;
+ converter::pytype_function pytype_f;
     bool lvalue;
 };
 
+struct py_func_sig_info
+{
+ signature_element const *signature;
+ signature_element const *ret;
+};
+
 template <unsigned> struct signature_arity;
 
 # define BOOST_PP_ITERATION_PARAMS_1 \
@@ -68,15 +76,25 @@
         {
             static signature_element const result[N+2] = {
                 
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+# define BOOST_PP_LOCAL_MACRO(i) \
+ { \
+ type_id<BOOST_DEDUCED_TYPENAME mpl::at_c<Sig,i>::type>().name() \
+ , &converter::expected_pytype_for_arg<BOOST_DEDUCED_TYPENAME mpl::at_c<Sig,i>::type>::get_pytype \
+ , indirect_traits::is_reference_to_non_const<BOOST_DEDUCED_TYPENAME mpl::at_c<Sig,i>::type>::value \
+ },
+#else
 # define BOOST_PP_LOCAL_MACRO(i) \
- { \
- type_id<BOOST_DEDUCED_TYPENAME mpl::at_c<Sig,i>::type>().name() \
- , indirect_traits::is_reference_to_non_const<BOOST_DEDUCED_TYPENAME mpl::at_c<Sig,i>::type>::value \
- },
+ { \
+ type_id<BOOST_DEDUCED_TYPENAME mpl::at_c<Sig,i>::type>().name() \
+ , 0 \
+ , indirect_traits::is_reference_to_non_const<BOOST_DEDUCED_TYPENAME mpl::at_c<Sig,i>::type>::value \
+ },
+#endif
                 
 # define BOOST_PP_LOCAL_LIMITS (0, N)
 # include BOOST_PP_LOCAL_ITERATE()
- {0,0}
+ {0,0,0}
             };
             return result;
         }

Modified: branches/hash/boost/python/docstring_options.hpp
==============================================================================
--- branches/hash/boost/python/docstring_options.hpp (original)
+++ branches/hash/boost/python/docstring_options.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -17,23 +17,38 @@
       docstring_options(bool show_all=true)
       {
           previous_show_user_defined_ = show_user_defined_;
- previous_show_signatures_ = show_signatures_;
+ previous_show_py_signatures_ = show_py_signatures_;
+ previous_show_cpp_signatures_ = show_cpp_signatures_;
           show_user_defined_ = show_all;
- show_signatures_ = show_all;
+ show_cpp_signatures_ = show_all;
+ show_py_signatures_ = show_all;
       }
 
       docstring_options(bool show_user_defined, bool show_signatures)
       {
           previous_show_user_defined_ = show_user_defined_;
- previous_show_signatures_ = show_signatures_;
+ previous_show_cpp_signatures_ = show_cpp_signatures_;
+ previous_show_py_signatures_ = show_py_signatures_;
           show_user_defined_ = show_user_defined;
- show_signatures_ = show_signatures;
+ show_cpp_signatures_ = show_signatures;
+ show_py_signatures_ = show_signatures;
+ }
+
+ docstring_options(bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures)
+ {
+ previous_show_user_defined_ = show_user_defined_;
+ previous_show_cpp_signatures_ = show_cpp_signatures_;
+ previous_show_py_signatures_ = show_py_signatures_;
+ show_user_defined_ = show_user_defined;
+ show_cpp_signatures_ = show_cpp_signatures;
+ show_py_signatures_ = show_py_signatures;
       }
 
       ~docstring_options()
       {
           show_user_defined_ = previous_show_user_defined_;
- show_signatures_ = previous_show_signatures_;
+ show_cpp_signatures_ = previous_show_cpp_signatures_;
+ show_py_signatures_ = previous_show_py_signatures_;
       }
 
       void
@@ -43,32 +58,68 @@
       enable_user_defined() { show_user_defined_ = true; }
 
       void
- disable_signatures() { show_signatures_ = false; }
+ disable_py_signatures()
+ {
+ show_py_signatures_ = false;
+ }
 
       void
- enable_signatures() { show_signatures_ = true; }
+ enable_py_signatures()
+ {
+ show_py_signatures_ = true;
+ }
+
+ void
+ disable_cpp_signatures()
+ {
+ show_cpp_signatures_ = false;
+ }
+
+ void
+ enable_cpp_signatures()
+ {
+ show_cpp_signatures_ = true;
+ }
+
+ void
+ disable_signatures()
+ {
+ show_cpp_signatures_ = false;
+ show_py_signatures_ = false;
+ }
+
+ void
+ enable_signatures()
+ {
+ show_cpp_signatures_ = true;
+ show_py_signatures_ = true;
+ }
 
       void
       disable_all()
       {
         show_user_defined_ = false;
- show_signatures_ = false;
+ show_cpp_signatures_ = false;
+ show_py_signatures_ = false;
       }
 
       void
       enable_all()
       {
         show_user_defined_ = true;
- show_signatures_ = true;
+ show_cpp_signatures_ = true;
+ show_py_signatures_ = true;
       }
 
       friend struct objects::function;
 
   private:
       static volatile bool show_user_defined_;
- static volatile bool show_signatures_;
+ static volatile bool show_cpp_signatures_;
+ static volatile bool show_py_signatures_;
       bool previous_show_user_defined_;
- bool previous_show_signatures_;
+ bool previous_show_cpp_signatures_;
+ bool previous_show_py_signatures_;
 };
 
 }} // namespace boost::python

Modified: branches/hash/boost/python/enum.hpp
==============================================================================
--- branches/hash/boost/python/enum.hpp (original)
+++ branches/hash/boost/python/enum.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -19,7 +19,7 @@
     typedef objects::enum_base base;
 
     // Declare a new enumeration type in the current scope()
- enum_(char const* name);
+ enum_(char const* name, char const* doc = 0);
 
     // Add a new enumeration value with the given name and value.
     inline enum_<T>& value(char const* name, T);
@@ -34,13 +34,15 @@
 };
 
 template <class T>
-inline enum_<T>::enum_(char const* name)
+inline enum_<T>::enum_(char const* name, char const* doc )
     : base(
         name
         , &enum_<T>::to_python
         , &enum_<T>::convertible_from_python
         , &enum_<T>::construct
- , type_id<T>())
+ , type_id<T>()
+ , doc
+ )
 {
 }
 

Modified: branches/hash/boost/python/implicit.hpp
==============================================================================
--- branches/hash/boost/python/implicit.hpp (original)
+++ branches/hash/boost/python/implicit.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -9,6 +9,9 @@
 # include <boost/type.hpp>
 # include <boost/python/converter/implicit.hpp>
 # include <boost/python/converter/registry.hpp>
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+# include <boost/python/converter/pytype_function.hpp>
+#endif
 # include <boost/python/type_id.hpp>
 
 namespace boost { namespace python {
@@ -21,7 +24,11 @@
     converter::registry::push_back(
           &functions::convertible
         , &functions::construct
- , type_id<Target>());
+ , type_id<Target>()
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ , &converter::expected_from_python_type_direct<Source>::get_pytype
+#endif
+ );
 }
 
 }} // namespace boost::python

Modified: branches/hash/boost/python/init.hpp
==============================================================================
--- branches/hash/boost/python/init.hpp (original)
+++ branches/hash/boost/python/init.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -245,7 +245,7 @@
         : base(doc_, kw.range())
     {
         typedef typename detail::error::more_keywords_than_init_arguments<
- N, n_arguments::value
+ N, n_arguments::value + 1
>::too_many_keywords assertion;
     }
 
@@ -254,7 +254,7 @@
         : base(doc_, kw.range())
     {
         typedef typename detail::error::more_keywords_than_init_arguments<
- N, n_arguments::value
+ N, n_arguments::value + 1
>::too_many_keywords assertion;
     }
 
@@ -363,7 +363,7 @@
           , char const* doc
           , detail::keyword_range keywords)
       {
- detail::def_init_aux(cl, args, NArgs(), policies, 0, keywords);
+ detail::def_init_aux(cl, args, NArgs(), policies, doc, keywords);
 
           if (keywords.second > keywords.first)
               --keywords.second;

Modified: branches/hash/boost/python/lvalue_from_pytype.hpp
==============================================================================
--- branches/hash/boost/python/lvalue_from_pytype.hpp (original)
+++ branches/hash/boost/python/lvalue_from_pytype.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -6,6 +6,9 @@
 # define LVALUE_FROM_PYTYPE_DWA2002130_HPP
 
 # include <boost/python/detail/prefix.hpp>
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+# include <boost/python/converter/pytype_function.hpp>
+#endif
 
 # include <boost/python/type_id.hpp>
 # include <boost/python/converter/registry.hpp>
@@ -81,12 +84,17 @@
 // Extractor's static execute function from Python objects whose type
 // object is python_type.
 template <class Extractor, PyTypeObject const* python_type>
-struct lvalue_from_pytype
+struct lvalue_from_pytype
 {
     lvalue_from_pytype()
     {
- converter::registry::insert(
- &extract, detail::extractor_type_id(&Extractor::execute));
+ converter::registry::insert
+ ( &extract
+ , detail::extractor_type_id(&Extractor::execute)
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ , &get_pytype
+#endif
+ );
     }
  private:
     static void* extract(PyObject* op)
@@ -98,6 +106,9 @@
             : 0
             ;
     }
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ static PyTypeObject const*get_pytype() { return python_type; }
+#endif
 };
 
 }} // namespace boost::python

Modified: branches/hash/boost/python/make_constructor.hpp
==============================================================================
--- branches/hash/boost/python/make_constructor.hpp (original)
+++ branches/hash/boost/python/make_constructor.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -104,6 +104,14 @@
       
       // If the BasePolicy_ supplied a result converter it would be
       // ignored; issue an error if it's not the default.
+#if defined _MSC_VER && _MSC_VER < 1300
+ typedef is_same<
+ typename BasePolicy_::result_converter
+ , default_result_converter
+ > same_result_converter;
+ //see above for explanation
+ BOOST_STATIC_ASSERT(same_result_converter::value) ;
+#else
       BOOST_MPL_ASSERT_MSG(
          (is_same<
               typename BasePolicy_::result_converter
@@ -112,7 +120,7 @@
         , MAKE_CONSTRUCTOR_SUPPLIES_ITS_OWN_RESULT_CONVERTER_THAT_WOULD_OVERRIDE_YOURS
         , (typename BasePolicy_::result_converter)
       );
-
+#endif
       typedef constructor_result_converter result_converter;
       typedef offset_args<typename BasePolicy_::argument_package, mpl::int_<1> > argument_package;
   };

Modified: branches/hash/boost/python/object/class_metadata.hpp
==============================================================================
--- branches/hash/boost/python/object/class_metadata.hpp (original)
+++ branches/hash/boost/python/object/class_metadata.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -238,6 +238,14 @@
     //
     inline static void maybe_register_pointer_to_python(void*,void*,void*) {}
 
+#ifndef BOOST_PYTHON_NO_PY_SYGNATURES
+ inline static void maybe_register_pointer_to_python(void*,void*,mpl::true_*)
+ {
+ objects::copy_class_object(python::type_id<T>(), python::type_id<back_reference<T const &> >());
+ objects::copy_class_object(python::type_id<T>(), python::type_id<back_reference<T &> >());
+ }
+#endif
+
     template <class T2>
     inline static void maybe_register_pointer_to_python(T2*, mpl::false_*, mpl::false_*)
     {
@@ -247,6 +255,10 @@
               , make_ptr_instance<T2, pointer_holder<held_type, T2> >
>()
         );
+#ifndef BOOST_PYTHON_NO_PY_SYGNATURES
+ // explicit qualification of type_id makes msvc6 happy
+ objects::copy_class_object(python::type_id<T2>(), python::type_id<held_type>());
+#endif
     }
     //
     // Support for registering to-python converters
@@ -258,6 +270,10 @@
     inline static void maybe_register_class_to_python(T2*, mpl::false_)
     {
         python::detail::force_instantiate(class_cref_wrapper<T2, make_instance<T2, holder> >());
+#ifndef BOOST_PYTHON_NO_PY_SYGNATURES
+ // explicit qualification of type_id makes msvc6 happy
+ objects::copy_class_object(python::type_id<T2>(), python::type_id<held_type>());
+#endif
     }
 
     //

Modified: branches/hash/boost/python/object/class_wrapper.hpp
==============================================================================
--- branches/hash/boost/python/object/class_wrapper.hpp (original)
+++ branches/hash/boost/python/object/class_wrapper.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -6,6 +6,9 @@
 # define CLASS_WRAPPER_DWA20011221_HPP
 
 # include <boost/python/to_python_converter.hpp>
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+# include <boost/python/converter/pytype_function.hpp>
+#endif
 # include <boost/ref.hpp>
 
 namespace boost { namespace python { namespace objects {
@@ -19,22 +22,28 @@
 
 template <class Src, class MakeInstance>
 struct class_cref_wrapper
- : to_python_converter<Src,class_cref_wrapper<Src,MakeInstance> >
+ : to_python_converter<Src,class_cref_wrapper<Src,MakeInstance> ,true>
 {
     static PyObject* convert(Src const& x)
     {
         return MakeInstance::execute(boost::ref(x));
     }
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ static PyTypeObject const *get_pytype() { return converter::registered_pytype_direct<Src>::get_pytype(); }
+#endif
 };
 
 template <class Src, class MakeInstance>
 struct class_value_wrapper
- : to_python_converter<Src,class_value_wrapper<Src,MakeInstance> >
+ : to_python_converter<Src,class_value_wrapper<Src,MakeInstance> ,true>
 {
     static PyObject* convert(Src x)
     {
         return MakeInstance::execute(x);
     }
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ static PyTypeObject const *get_pytype() { return MakeInstance::get_pytype(); }
+#endif
 };
 
 }}} // namespace boost::python::objects

Modified: branches/hash/boost/python/object/enum_base.hpp
==============================================================================
--- branches/hash/boost/python/object/enum_base.hpp (original)
+++ branches/hash/boost/python/object/enum_base.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -21,7 +21,9 @@
         , converter::to_python_function_t
         , converter::convertible_function
         , converter::constructor_function
- , type_info);
+ , type_info
+ , const char *doc = 0
+ );
 
     void add_value(char const* name, long value);
     void export_values();

Modified: branches/hash/boost/python/object/function.hpp
==============================================================================
--- branches/hash/boost/python/object/function.hpp (original)
+++ branches/hash/boost/python/object/function.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -14,6 +14,7 @@
 
 namespace boost { namespace python { namespace objects {
 
+
 struct BOOST_PYTHON_DECL function : PyObject
 {
     function(
@@ -53,6 +54,7 @@
     object m_doc;
     object m_arg_names;
     unsigned m_nkeyword_values;
+ friend class function_doc_signature_generator;
 };
 
 //

Modified: branches/hash/boost/python/object/make_holder.hpp
==============================================================================
--- branches/hash/boost/python/object/make_holder.hpp (original)
+++ branches/hash/boost/python/object/make_holder.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -11,6 +11,10 @@
 # include <boost/python/detail/prefix.hpp>
 
 # include <boost/python/object/instance.hpp>
+# include <boost/python/converter/registry.hpp>
+#if !defined( BOOST_PYTHON_NO_PY_SIGNATURES) && defined( BOOST_PYTHON_PY_SYGNATURES_PROPER_INIT_SELF_TYPE)
+# include <boost/python/detail/python_type.hpp>
+#endif
 
 # include <boost/python/object/forward.hpp>
 # include <boost/python/detail/preprocessor.hpp>
@@ -74,7 +78,11 @@
 # endif
         
         static void execute(
- PyObject* p
+#if !defined( BOOST_PYTHON_NO_PY_SIGNATURES) && defined( BOOST_PYTHON_PY_SYGNATURES_PROPER_INIT_SELF_TYPE)
+ boost::python::detail::python_class<BOOST_DEDUCED_TYPENAME Holder::value_type> *p
+#else
+ PyObject *p
+#endif
             BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z(1, N, t, a))
         {
             typedef instance<Holder> instance_t;

Modified: branches/hash/boost/python/object/make_ptr_instance.hpp
==============================================================================
--- branches/hash/boost/python/object/make_ptr_instance.hpp (original)
+++ branches/hash/boost/python/object/make_ptr_instance.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -29,7 +29,12 @@
     {
         return get_class_object_impl(get_pointer(x));
     }
-
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ static inline PyTypeObject const* get_pytype()
+ {
+ return converter::registered<T>::converters.get_class_object();
+ }
+#endif
  private:
     template <class U>
     static inline PyTypeObject* get_class_object_impl(U const volatile* p)

Modified: branches/hash/boost/python/object/py_function.hpp
==============================================================================
--- branches/hash/boost/python/object/py_function.hpp (original)
+++ branches/hash/boost/python/object/py_function.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -23,7 +23,7 @@
     virtual PyObject* operator()(PyObject*, PyObject*) = 0;
     virtual unsigned min_arity() const = 0;
     virtual unsigned max_arity() const;
- virtual python::detail::signature_element const* signature() const = 0;
+ virtual python::detail::py_func_sig_info signature() const = 0;
 };
 
 template <class Caller>
@@ -43,7 +43,7 @@
         return m_caller.min_arity();
     }
     
- virtual python::detail::signature_element const* signature() const
+ virtual python::detail::py_func_sig_info signature() const
     {
         return m_caller.signature();
     }
@@ -69,9 +69,11 @@
         return mpl::size<Sig>::value - 1;
     }
     
- virtual python::detail::signature_element const* signature() const
+ virtual python::detail::py_func_sig_info signature() const
     {
- return python::detail::signature<Sig>::elements();
+ python::detail::signature_element const* sig = python::detail::signature<Sig>::elements();
+ python::detail::py_func_sig_info res = {sig, sig};
+ return res;
     }
 
  private:
@@ -102,9 +104,11 @@
         return m_max_arity;
     }
     
- virtual python::detail::signature_element const* signature() const
+ virtual python::detail::py_func_sig_info signature() const
     {
- return python::detail::signature<Sig>::elements();
+ python::detail::signature_element const* sig = python::detail::signature<Sig>::elements();
+ python::detail::py_func_sig_info res = {sig, sig};
+ return res;
     }
 
  private:
@@ -151,7 +155,12 @@
 
     python::detail::signature_element const* signature() const
     {
- return m_impl->signature();
+ return m_impl->signature().signature;
+ }
+
+ python::detail::signature_element const& get_return_type() const
+ {
+ return *m_impl->signature().ret;
     }
     
  private:

Modified: branches/hash/boost/python/object_core.hpp
==============================================================================
--- branches/hash/boost/python/object_core.hpp (original)
+++ branches/hash/boost/python/object_core.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -470,6 +470,9 @@
       {
           return python::detail::new_non_null_reference(x);
       }
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ static PyTypeObject const *get_pytype() {return 0;}
+#endif
   };
 }
 

Modified: branches/hash/boost/python/opaque_pointer_converter.hpp
==============================================================================
--- branches/hash/boost/python/opaque_pointer_converter.hpp (original)
+++ branches/hash/boost/python/opaque_pointer_converter.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -93,8 +93,13 @@
 
         if ((existing == 0) || (existing->m_to_python == 0))
         {
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ converter::registry::insert(&extract, type_id<Pointee>(), &get_pytype);
+ converter::registry::insert(&wrap, type_id<Pointee*>(), &get_pytype);
+#else
             converter::registry::insert(&extract, type_id<Pointee>());
             converter::registry::insert(&wrap, type_id<Pointee*>());
+#endif
         }
     }
 
@@ -105,6 +110,9 @@
     };
     
     static PyTypeObject type_object;
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ static PyTypeObject const *get_pytype(){return &type_object; }
+#endif
 };
 
 template <class Pointee>

Modified: branches/hash/boost/python/return_arg.hpp
==============================================================================
--- branches/hash/boost/python/return_arg.hpp (original)
+++ branches/hash/boost/python/return_arg.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -8,10 +8,15 @@
 # include <boost/python/detail/none.hpp>
 # include <boost/python/detail/value_arg.hpp>
 
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+# include <boost/python/converter/pytype_function.hpp>
+#endif
+
 # include <boost/type_traits/add_reference.hpp>
 # include <boost/type_traits/add_const.hpp>
 
 # include <boost/mpl/int.hpp>
+# include <boost/mpl/at.hpp>
 
 # include <boost/static_assert.hpp>
 # include <boost/python/refcount.hpp>
@@ -44,6 +49,9 @@
               {
                   return none();
               }
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ PyTypeObject const *get_pytype() const { return converter::expected_pytype_for_arg<T>::get_pytype() ; }
+#endif
           };
       };
   };
@@ -82,6 +90,12 @@
         Py_DECREF(result);
         return incref( detail::get(mpl::int_<arg_pos-1>(),args) );
     }
+
+ template <class Sig>
+ struct extract_return_type : mpl::at_c<Sig, arg_pos>
+ {
+ };
+
 };
 
 template <

Modified: branches/hash/boost/python/to_python_converter.hpp
==============================================================================
--- branches/hash/boost/python/to_python_converter.hpp (original)
+++ branches/hash/boost/python/to_python_converter.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -9,13 +9,67 @@
 
 # include <boost/python/converter/registry.hpp>
 # include <boost/python/converter/as_to_python_function.hpp>
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+# include <boost/python/converter/pytype_function.hpp>
+#endif
 # include <boost/python/type_id.hpp>
 
 namespace boost { namespace python {
 
-template <class T, class Conversion>
-struct to_python_converter
+#if 0 //get_pytype member detection
+namespace detail
 {
+ typedef char yes_type;
+ typedef struct {char a[2]; } no_type;
+ template<PyTypeObject const * (*f)()> struct test_get_pytype1 { };
+ template<PyTypeObject * (*f)()> struct test_get_pytype2 { };
+
+ template<class T> yes_type tester(test_get_pytype1<&T::get_pytype>*);
+
+ template<class T> yes_type tester(test_get_pytype2<&T::get_pytype>*);
+
+ template<class T> no_type tester(...);
+
+ template<class T>
+ struct test_get_pytype_base
+ {
+ BOOST_STATIC_CONSTANT(bool, value= (sizeof(detail::tester<T>(0)) == sizeof(yes_type)));
+ };
+
+ template<class T>
+ struct test_get_pytype : boost::mpl::bool_<test_get_pytype_base<T>::value>
+ {
+ };
+
+}
+#endif
+
+template < class T, class Conversion, bool has_get_pytype=false >
+struct to_python_converter
+{
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+#if 0 //defined _MSC_VER && _MSC_VER >=1310
+ //probably other compilers could come here as well
+ typedef typename detail::test_get_pytype<Conversion> HasGetPytype;
+#else
+ typedef boost::mpl::bool_<has_get_pytype> HasGetPytype;
+#endif
+
+ static PyTypeObject const* get_pytype_1(boost::mpl::true_ *)
+ {
+ return Conversion::get_pytype();
+ }
+
+ static PyTypeObject const* get_pytype_1(boost::mpl::false_ *)
+ {
+ return 0;
+ }
+ static PyTypeObject const* get_pytype_impl()
+ {
+ return get_pytype_1((HasGetPytype*)0);
+ }
+#endif
+
     to_python_converter();
 };
 
@@ -23,18 +77,23 @@
 // implementation
 //
 
-template <class T, class Conversion>
-to_python_converter<T,Conversion>::to_python_converter()
+template <class T, class Conversion ,bool has_get_pytype>
+to_python_converter<T,Conversion, has_get_pytype>::to_python_converter()
 {
     typedef converter::as_to_python_function<
         T, Conversion
> normalized;
-
+
     converter::registry::insert(
         &normalized::convert
- , type_id<T>());
+ , type_id<T>()
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ , &get_pytype_impl
+#endif
+ );
 }
 
 }} // namespace boost::python
 
 #endif // TO_PYTHON_CONVERTER_DWA200221_HPP
+

Modified: branches/hash/boost/python/to_python_indirect.hpp
==============================================================================
--- branches/hash/boost/python/to_python_indirect.hpp (original)
+++ branches/hash/boost/python/to_python_indirect.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -12,6 +12,10 @@
 
 # include <boost/python/detail/none.hpp>
 
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+# include <boost/python/converter/pytype_function.hpp>
+#endif
+
 # include <boost/python/refcount.hpp>
 
 # include <boost/type_traits/is_pointer.hpp>
@@ -36,7 +40,13 @@
     {
         return this->execute(const_cast<U&>(ref), is_pointer<U>());
     }
-
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ inline PyTypeObject const*
+ get_pytype()const
+ {
+ return converter::registered_pytype<T>::get_pytype();
+ }
+#endif
  private:
     template <class U>
     inline PyObject* execute(U* ptr, mpl::true_) const

Modified: branches/hash/boost/python/to_python_value.hpp
==============================================================================
--- branches/hash/boost/python/to_python_value.hpp (original)
+++ branches/hash/boost/python/to_python_value.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -9,12 +9,12 @@
 
 # include <boost/python/refcount.hpp>
 # include <boost/python/tag.hpp>
+# include <boost/python/handle.hpp>
 
 # include <boost/python/converter/registry.hpp>
 # include <boost/python/converter/registered.hpp>
 # include <boost/python/converter/builtin_converters.hpp>
 # include <boost/python/converter/object_manager.hpp>
-# include <boost/python/converter/object_manager.hpp>
 # include <boost/python/converter/shared_ptr_to_python.hpp>
 
 # include <boost/python/detail/value_is_shared_ptr.hpp>
@@ -24,17 +24,57 @@
 
 # include <boost/mpl/if.hpp>
 # include <boost/mpl/or.hpp>
+# include <boost/type_traits/is_const.hpp>
 
 namespace boost { namespace python {
 
 namespace detail
 {
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+
+template <bool is_const_ref>
+struct object_manager_get_pytype
+{
+ template <class U>
+ static PyTypeObject const* get( U& (*p)() =0)
+ {
+ return converter::object_manager_traits<U>::get_pytype();
+ }
+};
+
+template <>
+struct object_manager_get_pytype<true>
+{
+ template <class U>
+ static PyTypeObject const* get( U const& (*p)() =0)
+ {
+ return converter::object_manager_traits<U>::get_pytype();
+ }
+};
+
+#endif
+
   template <class T>
   struct object_manager_to_python_value
   {
       typedef typename value_arg<T>::type argument_type;
     
       PyObject* operator()(argument_type) const;
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ typedef boost::mpl::bool_<is_handle<T>::value> is_t_handle;
+ typedef boost::detail::indirect_traits::is_reference_to_const<T> is_t_const;
+ PyTypeObject const* get_pytype() const {
+ return get_pytype_aux((is_t_handle*)0);
+ }
+
+ inline static PyTypeObject const* get_pytype_aux(mpl::true_*) {return converter::object_manager_traits<T>::get_pytype();}
+
+ inline static PyTypeObject const* get_pytype_aux(mpl::false_* )
+ {
+ return object_manager_get_pytype<is_t_const::value>::get((T(*)())0);
+ }
+
+#endif
 
       // This information helps make_getter() decide whether to try to
       // return an internal reference or not. I don't like it much,
@@ -49,6 +89,9 @@
       typedef typename value_arg<T>::type argument_type;
     
       PyObject* operator()(argument_type) const;
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ PyTypeObject const* get_pytype() const {return converter::registered<T>::converters.to_python_target_type();}
+#endif
 
       // This information helps make_getter() decide whether to try to
       // return an internal reference or not. I don't like it much,
@@ -62,11 +105,20 @@
       typedef typename value_arg<T>::type argument_type;
     
       PyObject* operator()(argument_type) const;
-
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ PyTypeObject const* get_pytype() const {return get_pytype((boost::type<argument_type>*)0);}
+#endif
       // This information helps make_getter() decide whether to try to
       // return an internal reference or not. I don't like it much,
       // but it will have to serve for now.
       BOOST_STATIC_CONSTANT(bool, uses_registry = false);
+ private:
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ template <class U>
+ PyTypeObject const* get_pytype(boost::type<shared_ptr<U> &> *) const {return converter::registered<U>::converters.to_python_target_type();}
+ template <class U>
+ PyTypeObject const* get_pytype(boost::type<const shared_ptr<U> &> *) const {return converter::registered<U>::converters.to_python_target_type();}
+#endif
   };
 }
 

Modified: branches/hash/boost/range/as_literal.hpp
==============================================================================
--- branches/hash/boost/range/as_literal.hpp (original)
+++ branches/hash/boost/range/as_literal.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -66,7 +66,7 @@
         }
         
         template< class T >
- inline long is_char_ptr( T r )
+ inline long is_char_ptr( T /* r */ )
         {
             return 0L;
         }

Modified: branches/hash/boost/regex/config.hpp
==============================================================================
--- branches/hash/boost/regex/config.hpp (original)
+++ branches/hash/boost/regex/config.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -158,7 +158,7 @@
  * of the non-inline functions in the library, so that users can still link to the lib,
  * irrespective of whether their own code is built with /Zc:wchar_t.
  */
-#if defined(__cplusplus) && (defined(BOOST_MSVC) || defined(__ICL)) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) && defined(BOOST_WINDOWS) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+#if defined(__cplusplus) && (defined(BOOST_MSVC) || defined(__ICL)) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) && defined(BOOST_WINDOWS) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) && !defined(BOOST_RWSTD_VER)
 # define BOOST_REGEX_HAS_OTHER_WCHAR_T
 # ifdef BOOST_MSVC
 # pragma warning(push)

Modified: branches/hash/boost/shared_ptr.hpp
==============================================================================
--- branches/hash/boost/shared_ptr.hpp (original)
+++ branches/hash/boost/shared_ptr.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -383,7 +383,7 @@
 
     // implicit conversion to "bool"
 
-#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530)
+#if ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530) ) || defined(__CINT__)
 
     operator bool () const
     {

Modified: branches/hash/boost/system/config.hpp
==============================================================================
--- branches/hash/boost/system/config.hpp (original)
+++ branches/hash/boost/system/config.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -28,7 +28,7 @@
 // enable dynamic linking on Windows ---------------------------------------//
 
 //# if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)) && defined(__BORLANDC__) && defined(__WIN32__)
-//# error Dynamic linking Boost.Filesystem does not work for Borland; use static linking instead
+//# error Dynamic linking Boost.System does not work for Borland; use static linking instead
 //# endif
 
 #ifdef BOOST_HAS_DECLSPEC // defined in config system

Modified: branches/hash/boost/system/error_code.hpp
==============================================================================
--- branches/hash/boost/system/error_code.hpp (original)
+++ branches/hash/boost/system/error_code.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1,22 +1,33 @@
 // boost/system/error_code.hpp ---------------------------------------------//
 
-// Copyright Beman Dawes 2006
+// Copyright Beman Dawes 2006, 2007
+// Copyright Christoper Kohlhoff 2007
 
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-// See library home page at http://www.boost.org/libs/filesystem
+// See library home page at http://www.boost.org/libs/system
 
-#ifndef BOOST_SYSTEM_ERROR_CODE_HPP
-#define BOOST_SYSTEM_ERROR_CODE_HPP
+#ifndef BOOST_ERROR_CODE_HPP
+#define BOOST_ERROR_CODE_HPP
 
 #include <boost/system/config.hpp>
 #include <boost/cstdint.hpp>
 #include <boost/assert.hpp>
 #include <boost/operators.hpp>
-#include <boost/detail/identifier.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <ostream>
 #include <string>
 #include <stdexcept>
+#include <functional>
+
+// TODO: undef these macros if not already defined
+#include <boost/cerrno.hpp>
+
+# ifdef BOOST_WINDOWS_API
+# include <winerror.h>
+# endif
 
 #include <boost/config/abi_prefix.hpp> // must be the last #include
 
@@ -24,125 +35,623 @@
 {
   namespace system
   {
-# ifndef BOOST_NO_STD_WSTRING // workaround Cygwin's lack of wstring_t
- typedef std::wstring wstring_t;
-# else
- typedef std::basic_string<wchar_t> wstring_t;
-# endif
 
     class error_code;
+ class error_condition;
 
- // typedefs for registering additional decoders -------------------------//
+ // "Concept" helpers ---------------------------------------------------//
 
- typedef int (*errno_decoder)( const error_code & );
- typedef std::string (*message_decoder)( const error_code & );
- typedef wstring_t (*wmessage_decoder)( const error_code & );
+ template< class T >
+ struct is_error_code_enum { static const bool value = false; };
+
+ template< class T >
+ struct is_error_condition_enum { static const bool value = false; };
+
+ // portable error_conditions -------------------------------------------//
+
+ namespace posix
+ {
+
+ enum posix_errno
+ {
+ success = 0,
+ address_family_not_supported = EAFNOSUPPORT,
+ address_in_use = EADDRINUSE,
+ address_not_available = EADDRNOTAVAIL,
+ already_connected = EISCONN,
+ argument_list_too_long = E2BIG,
+ argument_out_of_domain = EDOM,
+ bad_address = EFAULT,
+ bad_file_descriptor = EBADF,
+ bad_message = EBADMSG,
+ broken_pipe = EPIPE,
+ connection_aborted = ECONNABORTED,
+ connection_already_in_progress = EALREADY,
+ connection_refused = ECONNREFUSED,
+ connection_reset = ECONNRESET,
+ cross_device_link = EXDEV,
+ destination_address_required = EDESTADDRREQ,
+ device_or_resource_busy = EBUSY,
+ directory_not_empty = ENOTEMPTY,
+ executable_format_error = ENOEXEC,
+ file_exists = EEXIST,
+ file_too_large = EFBIG,
+ filename_too_long = ENAMETOOLONG,
+ function_not_supported = ENOSYS,
+ host_unreachable = EHOSTUNREACH,
+ identifier_removed = EIDRM,
+ illegal_byte_sequence = EILSEQ,
+ inappropriate_io_control_operation = ENOTTY,
+ interrupted = EINTR,
+ invalid_argument = EINVAL,
+ invalid_seek = ESPIPE,
+ io_error = EIO,
+ is_a_directory = EISDIR,
+ message_size = EMSGSIZE,
+ network_down = ENETDOWN,
+ network_reset = ENETRESET,
+ network_unreachable = ENETUNREACH,
+ no_buffer_space = ENOBUFS,
+ no_child_process = ECHILD,
+ no_link = ENOLINK,
+ no_lock_available = ENOLCK,
+ no_message_available = ENODATA,
+ no_message = ENOMSG,
+ no_protocol_option = ENOPROTOOPT,
+ no_space_on_device = ENOSPC,
+ no_stream_resources = ENOSR,
+ no_such_device_or_address = ENXIO,
+ no_such_device = ENODEV,
+ no_such_file_or_directory = ENOENT,
+ no_such_process = ESRCH,
+ not_a_directory = ENOTDIR,
+ not_a_socket = ENOTSOCK,
+ not_a_stream = ENOSTR,
+ not_connected = ENOTCONN,
+ not_enough_memory = ENOMEM,
+ not_supported = ENOTSUP,
+ operation_canceled = ECANCELED,
+ operation_in_progress = EINPROGRESS,
+ operation_not_permitted = EPERM,
+ operation_not_supported = EOPNOTSUPP,
+ operation_would_block = EWOULDBLOCK,
+ owner_dead = EOWNERDEAD,
+ permission_denied = EACCES,
+ protocol_error = EPROTO,
+ protocol_not_supported = EPROTONOSUPPORT,
+ read_only_file_system = EROFS,
+ resource_deadlock_would_occur = EDEADLK,
+ resource_unavailable_try_again = EAGAIN,
+ result_out_of_range = ERANGE,
+ state_not_recoverable = ENOTRECOVERABLE,
+ stream_timeout = ETIME,
+ text_file_busy = ETXTBSY,
+ timed_out = ETIMEDOUT,
+ too_many_files_open_in_system = ENFILE,
+ too_many_files_open = EMFILE,
+ too_many_links = EMLINK,
+ too_many_synbolic_link_levels = ELOOP,
+ value_too_large = EOVERFLOW,
+ wrong_protocol_type = EPROTOTYPE
+ };
+
+ } // namespace posix
+
+ template<> struct is_error_condition_enum<posix::posix_errno>
+ { static const bool value = true; };
 
     // class error_category ------------------------------------------------//
 
- class BOOST_SYSTEM_DECL error_category
- : public boost::detail::identifier< uint_least32_t, error_category >
+ class error_category : public noncopyable
     {
     public:
- error_category()
- : boost::detail::identifier< uint_least32_t, error_category >(0){}
- explicit error_category( value_type v )
- : boost::detail::identifier< uint_least32_t, error_category >(v){}
+ virtual ~error_category(){}
+ virtual const char * name() const; // see implementation note below
+ virtual std::string message( int ev ) const; // see implementation note below
+ virtual error_condition default_error_condition( int ev ) const;
+ virtual bool equivalent( int code, const error_condition & condition ) const;
+ virtual bool equivalent( const error_code & code, int condition ) const;
+
+ bool operator==(const error_category & rhs) const { return this == &rhs; }
+ bool operator!=(const error_category & rhs) const { return this != &rhs; }
+ bool operator<( const error_category & rhs ) const
+ {
+ return std::less<const error_category*>()( this, &rhs );
+ }
     };
 
     // predefined error categories -----------------------------------------//
 
- const error_category errno_ecat(0); // unspecified value
+ BOOST_SYSTEM_DECL extern const error_category & posix_category;
+ BOOST_SYSTEM_DECL extern const error_category & system_category;
 
-# ifdef BOOST_WINDOWS_API
- const error_category native_ecat(1); // unspecified value
-# else
- const error_category native_ecat(0); // unspecified value
-# endif
+ // deprecated synonyms
+ BOOST_SYSTEM_DECL extern const error_category & errno_ecat; // posix_category
+ BOOST_SYSTEM_DECL extern const error_category & native_ecat; // system_category
 
- // class error_code ----------------------------------------------------//
+ // class error_condition -----------------------------------------------//
+
+ // error_conditions are portable, error_codes are system or lib specific
 
- class BOOST_SYSTEM_DECL error_code
+ class error_condition
     {
     public:
- typedef boost::int_least32_t value_type;
 
       // constructors:
- error_code()
- : m_value(0), m_category(errno_ecat) {}
- error_code( value_type val, error_category cat )
- : m_value(val), m_category(cat) {}
+ error_condition() : m_val(0), m_cat(&posix_category) {}
+ error_condition( int val, const error_category & cat ) : m_val(val), m_cat(&cat) {}
+
+ template <class ConditionEnum>
+ error_condition(ConditionEnum e,
+ typename boost::enable_if<is_error_condition_enum<ConditionEnum> >::type* = 0)
+ {
+ *this = make_error_condition(e);
+ }
+
+ // modifiers:
+
+ void assign( int val, const error_category & cat )
+ {
+ m_val = val;
+ m_cat = &cat;
+ }
+
+ template<typename ConditionEnum>
+ typename boost::enable_if<is_error_condition_enum<ConditionEnum>, error_condition>::type &
+ operator=( ConditionEnum val )
+ {
+ *this = make_error_condition(val);
+ return *this;
+ }
 
+ void clear()
+ {
+ m_val = 0;
+ m_cat = &posix_category;
+ }
 
       // observers:
- value_type value() const { return m_value; }
- error_category category() const { return m_category; }
- int to_errno() const; // name chosen to limit surprises
- // see Kohlhoff Jun 28 '06
- std::string message() const;
- wstring_t wmessage() const;
+ int value() const { return m_val; }
+ const error_category & category() const { return *m_cat; }
+ std::string message() const { return m_cat->message(value()); }
+
+ typedef void (*unspecified_bool_type)();
+ static void unspecified_bool_true() {}
 
- void assign( value_type val, const error_category & cat )
+ operator unspecified_bool_type() const // true if error
       {
- m_value = val;
- m_category = cat;
+ return m_val == 0 ? 0 : unspecified_bool_true;
+ }
+
+ bool operator!() const // true if no error
+ {
+ return m_val == 0;
       }
 
       // relationals:
- bool operator==( const error_code & rhs ) const
+ // the more symmetrical non-member syntax allows enum
+ // conversions work for both rhs and lhs.
+ inline friend bool operator==( const error_condition & lhs,
+ const error_condition & rhs )
+ {
+ return lhs.m_cat == rhs.m_cat && lhs.m_val == rhs.m_val;
+ }
+
+ inline friend bool operator<( const error_condition & lhs,
+ const error_condition & rhs )
+ // the more symmetrical non-member syntax allows enum
+ // conversions work for both rhs and lhs.
       {
- return value() == rhs.value() && category() == rhs.category();
+ return lhs.m_cat < rhs.m_cat
+ || (lhs.m_cat == rhs.m_cat && lhs.m_val < rhs.m_val);
       }
- bool operator!=( const error_code & rhs ) const
+
+ private:
+ int m_val;
+ const error_category * m_cat;
+
+ };
+
+ // class error_code ----------------------------------------------------//
+
+ // We want error_code to be a value type that can be copied without slicing
+ // and without requiring heap allocation, but we also want it to have
+ // polymorphic behavior based on the error category. This is achieved by
+ // abstract base class error_category supplying the polymorphic behavior,
+ // and error_code containing a pointer to an object of a type derived
+ // from error_category.
+ class error_code
+ {
+ public:
+
+ // constructors:
+ error_code() : m_val(0), m_cat(&system_category) {}
+ error_code( int val, const error_category & cat ) : m_val(val), m_cat(&cat) {}
+
+ template <class CodeEnum>
+ error_code(CodeEnum e,
+ typename boost::enable_if<is_error_code_enum<CodeEnum> >::type* = 0)
       {
- return !(*this == rhs);
+ *this = make_error_code(e);
+ }
+
+ // modifiers:
+ void assign( int val, const error_category & cat )
+ {
+ m_val = val;
+ m_cat = &cat;
+ }
+
+ template<typename CodeEnum>
+ typename boost::enable_if<is_error_code_enum<CodeEnum>, error_code>::type &
+ operator=( CodeEnum val )
+ {
+ *this = make_error_code(val);
+ return *this;
       }
- bool operator<( const error_code & rhs ) const
+
+ void clear()
       {
- return category() < rhs.category()
- || ( category() == rhs.category() && value() < rhs.value() );
+ m_val = 0;
+ m_cat = &system_category;
       }
- bool operator<=( const error_code & rhs ) const { return *this == rhs || *this < rhs; }
- bool operator> ( const error_code & rhs ) const { return !(*this <= rhs); }
- bool operator>=( const error_code & rhs ) const { return !(*this < rhs); }
+
+ // observers:
+ int value() const { return m_val; }
+ const error_category & category() const { return *m_cat; }
+ error_condition default_error_condition() const { return m_cat->default_error_condition(value()); }
+ std::string message() const { return m_cat->message(value()); }
 
       typedef void (*unspecified_bool_type)();
       static void unspecified_bool_true() {}
 
       operator unspecified_bool_type() const // true if error
       {
- return m_value == value_type() ? 0 : unspecified_bool_true;
+ return m_val == 0 ? 0 : unspecified_bool_true;
       }
 
       bool operator!() const // true if no error
       {
- return m_value == value_type();
+ return m_val == 0;
       }
 
- // statics:
- static error_category new_category( errno_decoder ed = 0,
- message_decoder md = 0, wmessage_decoder wmd = 0 );
- static bool get_decoders( error_category cat, errno_decoder & ed,
- message_decoder & md, wmessage_decoder & wmd );
+ // relationals:
+ inline friend bool operator==( const error_code & lhs,
+ const error_code & rhs )
+ // the more symmetrical non-member syntax allows enum
+ // conversions work for both rhs and lhs.
+ {
+ return lhs.m_cat == rhs.m_cat && lhs.m_val == rhs.m_val;
+ }
+
+ inline friend bool operator<( const error_code & lhs,
+ const error_code & rhs )
+ // the more symmetrical non-member syntax allows enum
+ // conversions work for both rhs and lhs.
+ {
+ return lhs.m_cat < rhs.m_cat
+ || (lhs.m_cat == rhs.m_cat && lhs.m_val < rhs.m_val);
+ }
+
+ private:
+ int m_val;
+ const error_category * m_cat;
 
- private:
- value_type m_value;
- error_category m_category;
     };
 
     // non-member functions ------------------------------------------------//
 
+ inline bool operator!=( const error_code & lhs,
+ const error_code & rhs )
+ {
+ return !(lhs == rhs);
+ }
+
+ inline bool operator!=( const error_condition & lhs,
+ const error_condition & rhs )
+ {
+ return !(lhs == rhs);
+ }
+
+ inline bool operator==( const error_code & code,
+ const error_condition & condition )
+ {
+ return code.category().equivalent( code.value(), condition )
+ || condition.category().equivalent( code, condition.value() );
+ }
+
+ inline bool operator!=( const error_code & lhs,
+ const error_condition & rhs )
+ {
+ return !(lhs == rhs);
+ }
+
+ inline bool operator==( const error_condition & condition,
+ const error_code & code )
+ {
+ return condition.category().equivalent( code, condition.value() )
+ || code.category().equivalent( code.value(), condition );
+ }
+
+ inline bool operator!=( const error_condition & lhs,
+ const error_code & rhs )
+ {
+ return !(lhs == rhs);
+ }
+
+ // TODO: both of these may move elsewhere, but the LWG hasn't spoken yet.
+
+ template <class charT, class traits>
+ inline std::basic_ostream<charT,traits>&
+ operator<< (std::basic_ostream<charT,traits>& os, error_code ec)
+ {
+ os << ec.category().name() << ':' << ec.value();
+ return os;
+ }
+
     inline std::size_t hash_value( const error_code & ec )
     {
       return static_cast<std::size_t>(ec.value())
- + (static_cast<std::size_t>(ec.category().value()) << 16 );
+ + reinterpret_cast<std::size_t>(&ec.category());
+ }
+
+ // make_* functions for posix::posix_errno -----------------------------//
+
+ // explicit conversion:
+ inline error_code make_error_code( posix::posix_errno e )
+ { return error_code( e, posix_category ); }
+
+ // implicit conversion:
+ inline error_condition make_error_condition( posix::posix_errno e )
+ { return error_condition( e, posix_category ); }
+
+ // error_category default implementation -------------------------------//
+
+ inline error_condition error_category::default_error_condition( int ev ) const
+ {
+ return error_condition( ev, *this );
+ }
+
+ inline bool error_category::equivalent( int code,
+ const error_condition & condition ) const
+ {
+ return default_error_condition( code ) == condition;
+ }
+
+ inline bool error_category::equivalent( const error_code & code,
+ int condition ) const
+ {
+ return *this == code.category() && code.value() == condition;
     }
 
+ // error_category implementation note: VC++ 8.0 objects to name() and
+ // message() being pure virtual functions. Thus these implementations.
+ inline const char * error_category::name() const
+ {
+ return "error: should never be called";
+ }
+
+ inline std::string error_category::message( int ev ) const
+ {
+ static std::string s("error: should never be called");
+ return s;
+ }
+
+ // ----------------------------------------------------------------------//
+
+ // Operating system specific interfaces --------------------------------//
+
+
+ // The interface is divided into general and system-specific portions to
+ // meet these requirements:
+ //
+ // * Code calling an operating system API can create an error_code with
+ // a single category (system_category), even for POSIX-like operating
+ // systems that return some POSIX errno values and some native errno
+ // values. This code should not have to pay the cost of distinguishing
+ // between categories, since it is not yet known if that is needed.
+ //
+ // * Users wishing to write system-specific code should be given enums for
+ // at least the common error cases.
+ //
+ // * System specific code should fail at compile time if moved to another
+ // operating system.
+
+#ifdef BOOST_POSIX_API
+
+ // POSIX-based systems -------------------------------------------------//
+
+ // To construct an error_code after a API error:
+ //
+ // error_code( errno, system_category )
+
+ // User code should use the portable "posix" enums for POSIX errors; this
+ // allows such code to be portable to non-POSIX systems. For the non-POSIX
+ // errno values that POSIX-based systems typically provide in addition to
+ // POSIX values, use the system specific enums below.
+
+# ifdef __CYGWIN__
+
+ namespace cygwin
+ {
+ enum cygwin_errno
+ {
+ no_net = ENONET,
+ no_package = ENOPKG,
+ no_share = ENOSHARE
+ };
+ } // namespace cygwin
+
+ template<> struct is_error_code_enum<cygwin::cygwin_errno>
+ { static const bool value = true; };
+
+ inline error_code make_error_code(cygwin::cygwin_errno e)
+ { return error_code( e, system_category ); }
+
+# elif defined(linux) || defined(__linux) || defined(__linux__)
+
+ namespace Linux // linux lowercase name preempted by use as predefined macro
+ {
+ enum linux_error
+ {
+ advertise_error = EADV,
+ bad_exchange = EBADE,
+ bad_file_number = EBADFD,
+ bad_font_format = EBFONT,
+ bad_request_code = EBADRQC,
+ bad_request_descriptor = EBADR,
+ bad_slot = EBADSLT,
+ channel_range = ECHRNG,
+ communication_error = ECOMM,
+ dot_dot_error = EDOTDOT,
+ exchange_full = EXFULL,
+ host_down = EHOSTDOWN,
+ is_named_file_type= EISNAM,
+ key_expired = EKEYEXPIRED,
+ key_rejected = EKEYREJECTED,
+ key_revoked = EKEYREVOKED,
+ level2_halt= EL2HLT,
+ level2_no_syncronized= EL2NSYNC,
+ level3_halt = EL3HLT,
+ level3_reset = EL3RST,
+ link_range = ELNRNG,
+ medium_type = EMEDIUMTYPE,
+ no_anode= ENOANO,
+ no_block_device = ENOTBLK,
+ no_csi = ENOCSI,
+ no_key = ENOKEY,
+ no_medium = ENOMEDIUM,
+ no_network = ENONET,
+ no_package = ENOPKG,
+ not_avail = ENAVAIL,
+ not_named_file_type= ENOTNAM,
+ not_recoverable = ENOTRECOVERABLE,
+ not_unique = ENOTUNIQ,
+ owner_dead = EOWNERDEAD,
+ protocol_no_supported = EPFNOSUPPORT,
+ remote_address_changed = EREMCHG,
+ remote_io_error = EREMOTEIO,
+ remote_object = EREMOTE,
+ restart_needed = ERESTART,
+ shared_library_access = ELIBACC,
+ shared_library_bad = ELIBBAD,
+ shared_library_execute = ELIBEXEC,
+ shared_library_max_ = ELIBMAX,
+ shared_library_section= ELIBSCN,
+ shutdown = ESHUTDOWN,
+ socket_type_not_supported = ESOCKTNOSUPPORT,
+ srmount_error = ESRMNT,
+ stream_pipe_error = ESTRPIPE,
+ too_many_references = ETOOMANYREFS,
+ too_many_users = EUSERS,
+ unattached = EUNATCH,
+ unclean = EUCLEAN
+ };
+ } // namespace Linux
+
+ template<> struct is_error_code_enum<Linux::linux_error>
+ { static const bool value = true; };
+
+ inline error_code make_error_code(Linux::linux_error e)
+ { return error_code( e, system_category ); }
+
+# endif
+
+ // TODO: Add more POSIX-based operating systems here
+
+
+#elif defined(BOOST_WINDOWS_API)
+
+ // Microsoft Windows ---------------------------------------------------//
+
+ // To construct an error_code after a API error:
+ //
+ // error_code( ::GetLastError(), system_category )
+
+ namespace windows
+ {
+ enum windows_error
+ {
+ success = 0,
+ // These names and values are based on Windows winerror.h
+ invalid_function = ERROR_INVALID_FUNCTION,
+ file_not_found = ERROR_FILE_NOT_FOUND,
+ path_not_found = ERROR_PATH_NOT_FOUND,
+ too_many_open_files = ERROR_TOO_MANY_OPEN_FILES,
+ access_denied = ERROR_ACCESS_DENIED,
+ invalid_handle = ERROR_INVALID_HANDLE,
+ arena_trashed = ERROR_ARENA_TRASHED,
+ not_enough_memory = ERROR_NOT_ENOUGH_MEMORY,
+ invalid_block = ERROR_INVALID_BLOCK,
+ bad_environment = ERROR_BAD_ENVIRONMENT,
+ bad_format = ERROR_BAD_FORMAT,
+ invalid_access = ERROR_INVALID_ACCESS,
+ outofmemory = ERROR_OUTOFMEMORY,
+ invalid_drive = ERROR_INVALID_DRIVE,
+ current_directory = ERROR_CURRENT_DIRECTORY,
+ not_same_device = ERROR_NOT_SAME_DEVICE,
+ no_more_files = ERROR_NO_MORE_FILES,
+ write_protect = ERROR_WRITE_PROTECT,
+ bad_unit = ERROR_BAD_UNIT,
+ not_ready = ERROR_NOT_READY,
+ bad_command = ERROR_BAD_COMMAND,
+ crc = ERROR_CRC,
+ bad_length = ERROR_BAD_LENGTH,
+ seek = ERROR_SEEK,
+ not_dos_disk = ERROR_NOT_DOS_DISK,
+ sector_not_found = ERROR_SECTOR_NOT_FOUND,
+ out_of_paper = ERROR_OUT_OF_PAPER,
+ write_fault = ERROR_WRITE_FAULT,
+ read_fault = ERROR_READ_FAULT,
+ gen_failure = ERROR_GEN_FAILURE,
+ sharing_violation = ERROR_SHARING_VIOLATION,
+ lock_violation = ERROR_LOCK_VIOLATION,
+ wrong_disk = ERROR_WRONG_DISK,
+ sharing_buffer_exceeded = ERROR_SHARING_BUFFER_EXCEEDED,
+ handle_eof = ERROR_HANDLE_EOF,
+ handle_disk_full= ERROR_HANDLE_DISK_FULL,
+ rem_not_list = ERROR_REM_NOT_LIST,
+ dup_name = ERROR_DUP_NAME,
+ bad_net_path = ERROR_BAD_NETPATH,
+ network_busy = ERROR_NETWORK_BUSY,
+ // ...
+ file_exists = ERROR_FILE_EXISTS,
+ cannot_make = ERROR_CANNOT_MAKE,
+ // ...
+ broken_pipe = ERROR_BROKEN_PIPE,
+ open_failed = ERROR_OPEN_FAILED,
+ buffer_overflow = ERROR_BUFFER_OVERFLOW,
+ disk_full= ERROR_DISK_FULL,
+ // ...
+ lock_failed = ERROR_LOCK_FAILED,
+ busy = ERROR_BUSY,
+ cancel_violation = ERROR_CANCEL_VIOLATION,
+ already_exists = ERROR_ALREADY_EXISTS
+ // ...
+
+ // TODO: add more Windows errors
+ };
+ } // namespace windows
+
+ template<> struct is_error_code_enum<windows::windows_error>
+ { static const bool value = true; };
+
+ inline error_code make_error_code(windows::windows_error e)
+ { return error_code( e, system_category ); }
+
+#else
+# error BOOST_POSIX_API or BOOST_WINDOWS_API must be defined
+#endif
+
   } // namespace system
 } // namespace boost
 
 #include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
 
-#endif // BOOST_SYSTEM_ERROR_CODE_HPP
+# ifdef BOOST_ERROR_CODE_HEADER_ONLY
+# include <boost/../libs/system/src/error_code.cpp>
+# endif
+
+#endif // BOOST_ERROR_CODE_HPP
 
 

Modified: branches/hash/boost/system/system_error.hpp
==============================================================================
--- branches/hash/boost/system/system_error.hpp (original)
+++ branches/hash/boost/system/system_error.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -17,58 +17,51 @@
 {
   namespace system
   {
- enum message_action { append_message, no_message };
-
     // class system_error --------------------------------------------------//
 
     class system_error : public std::runtime_error
     {
     public:
- explicit system_error( error_code ec )
- : std::runtime_error(std::string()), m_error_code(ec),
- m_append_message(true) {}
-
- system_error( error_code ec, const std::string & what_arg,
- message_action ma = append_message )
- : std::runtime_error(what_arg), m_error_code(ec),
- m_append_message(ma==append_message) {}
-
- system_error( error_code::value_type ev, error_category ecat )
- : std::runtime_error(std::string()), m_error_code(ev,ecat),
- m_append_message(true) {}
-
- system_error( error_code::value_type ev, error_category ecat,
- const std::string & what_arg, message_action ma = append_message )
- : std::runtime_error(what_arg), m_error_code(ev,ecat),
- m_append_message(ma==append_message) {}
+ system_error( error_code ec )
+ : std::runtime_error(""), m_error_code(ec) {}
+ system_error( error_code ec, const std::string & what_arg )
+ : std::runtime_error(what_arg), m_error_code(ec) {}
+ system_error( int ev, const error_category & ecat,
+ const std::string & what_arg )
+ : std::runtime_error(what_arg), m_error_code(ev,ecat) {}
+ system_error( int ev, const error_category & ecat )
+ : std::runtime_error(""), m_error_code(ev,ecat) {}
 
       virtual ~system_error() throw() {}
 
- const error_code & code() const throw() { return m_error_code; }
+ const error_code & code() const throw() { return m_error_code; }
+ const char * what() const throw();
 
- const char * what() const throw()
- // see http://www.boost.org/more/error_handling.html for lazy build rationale
+ private:
+ error_code m_error_code;
+ mutable std::string m_what;
+ };
+
+ // implementation ------------------------------------------------------//
+
+ inline const char * system_error::what() const throw()
+ // see http://www.boost.org/more/error_handling.html for lazy build rationale
+ {
+ if ( m_what.empty() )
       {
- if ( !m_error_code || !m_append_message ) return runtime_error::what();
- if ( m_what.empty() )
+ try
         {
- try
+ m_what = this->runtime_error::what();
+ if ( m_error_code )
           {
- m_what = runtime_error::what();
             if ( !m_what.empty() ) m_what += ": ";
             m_what += m_error_code.message();
           }
- catch (...) { return runtime_error::what(); }
         }
- return m_what.c_str();
+ catch (...) { return runtime_error::what(); }
       }
-
-
- private:
- error_code m_error_code;
- mutable std::string m_what;
- bool m_append_message;
- };
+ return m_what.c_str();
+ }
 
   } // namespace system
 } // namespace boost

Modified: branches/hash/boost/tr1/detail/config.hpp
==============================================================================
--- branches/hash/boost/tr1/detail/config.hpp (original)
+++ branches/hash/boost/tr1/detail/config.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -3,6 +3,31 @@
 // Boost Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+/*
+ * The gcc include path logic is derived from STLport:
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Copyright (c) 1996-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Copyright (c) 1997
+ * Moscow Center for SPARC Technology
+ *
+ * Copyright (c) 1999-2003
+ * Boris Fomitchev
+ *
+ * This material is provided "as is", with absolutely no warranty expressed
+ * or implied. Any use is at your own risk.
+ *
+ * Permission to use or copy this software for any purpose is hereby granted
+ * without fee, provided the above notices are retained on all copies.
+ * Permission to modify the code and to distribute modified code is granted,
+ * provided the above notices are retained, and a notice that the code was
+ * modified is included with the above copyright notice.
+ *
+ */
 
 #ifndef BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
 # define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED
@@ -24,12 +49,35 @@
 # else
 # define BOOST_TR1_STD_HEADER(name) <../stlport/name>
 # endif
+
 # elif defined(__HP_aCC)
+ // HP aCC include path:
 # define BOOST_TR1_STD_HEADER(name) <../include_std/name>
+
 # elif defined(__DECCXX)
 # define BOOST_TR1_STD_HEADER(name) <../cxx/name>
+
 # elif defined(__BORLANDC__) && __BORLANDC__ >= 0x570
 # define BOOST_TR1_STD_HEADER(name) <../include/dinkumware/name>
+
+# elif defined(__GNUC__) && __GNUC__ >= 3
+# if ( (__GNUC__ == 3 ) && ((__GNUC_MINOR__ == 0) || ((__GNUC_MINOR__ < 3) && defined(__APPLE_CC__))))
+# define BOOST_TR1_STD_HEADER(name) <../g++-v3/name>
+# else
+# if ( ((__GNUC__ == 4 ) || (__GNUC_MINOR__ >= 3)) && defined(__APPLE_CC__))
+# define BOOST_TR1_STD_HEADER(name) <../c++/name>
+ /*
+ * Before version 3.4.0 the 0 patch level was not part of the include path:
+ */
+# elif defined (__GNUC_PATCHLEVEL__) && ((__GNUC_PATCHLEVEL__ > 0) || \
+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
+ (__GNUC__ > 3))
+# define BOOST_TR1_STD_HEADER(name) <../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__/name>
+# else
+# define BOOST_TR1_STD_HEADER(name) <../__GNUC__.__GNUC_MINOR__/name>
+# endif
+# endif
+
 # else
 # define BOOST_TR1_STD_HEADER(name) <../include/name>
 # endif
@@ -50,7 +98,12 @@
 //
 // Find our actual std lib:
 //
-#ifdef BOOST_HAS_INCLUDE_NEXT
+#if defined(BOOST_HAS_INCLUDE_NEXT) && !defined(linux)
+//
+// We don't take this branch on Linux as we may be installed in
+// /usr/include, in which case #include_next won't work as our
+// include path will occur AFTER the regular std lib one :-(
+//
 # ifndef BOOST_TR1_NO_RECURSION
 # define BOOST_TR1_NO_RECURSION
 # define BOOST_TR1_NO_CONFIG_RECURSION
@@ -136,3 +189,4 @@
 
 #endif
 
+

Modified: branches/hash/boost/type_traits.hpp
==============================================================================
--- branches/hash/boost/type_traits.hpp (original)
+++ branches/hash/boost/type_traits.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -75,6 +75,10 @@
 #include "boost/type_traits/integral_promotion.hpp"
 #include "boost/type_traits/promote.hpp"
 #endif
+#include <boost/type_traits/make_unsigned.hpp>
+#include <boost/type_traits/make_signed.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/type_traits/is_complex.hpp>
 
 #include "boost/type_traits/ice.hpp"
 

Modified: branches/hash/boost/type_traits/has_nothrow_constructor.hpp
==============================================================================
--- branches/hash/boost/type_traits/has_nothrow_constructor.hpp (original)
+++ branches/hash/boost/type_traits/has_nothrow_constructor.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -30,6 +30,7 @@
 }
 
 BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_constructor,T,::boost::detail::has_nothrow_constructor_imp<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_default_constructor,T,::boost::detail::has_nothrow_constructor_imp<T>::value)
 
 } // namespace boost
 

Modified: branches/hash/boost/type_traits/has_nothrow_copy.hpp
==============================================================================
--- branches/hash/boost/type_traits/has_nothrow_copy.hpp (original)
+++ branches/hash/boost/type_traits/has_nothrow_copy.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -30,6 +30,7 @@
 }
 
 BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy,T,::boost::detail::has_nothrow_copy_imp<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy_constructor,T,::boost::detail::has_nothrow_copy_imp<T>::value)
 
 } // namespace boost
 

Modified: branches/hash/boost/type_traits/has_trivial_constructor.hpp
==============================================================================
--- branches/hash/boost/type_traits/has_trivial_constructor.hpp (original)
+++ branches/hash/boost/type_traits/has_trivial_constructor.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -34,6 +34,7 @@
 } // namespace detail
 
 BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_constructor,T,::boost::detail::has_trivial_ctor_impl<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_default_constructor,T,::boost::detail::has_trivial_ctor_impl<T>::value)
 
 } // namespace boost
 

Modified: branches/hash/boost/type_traits/has_trivial_copy.hpp
==============================================================================
--- branches/hash/boost/type_traits/has_trivial_copy.hpp (original)
+++ branches/hash/boost/type_traits/has_trivial_copy.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -40,6 +40,7 @@
 } // namespace detail
 
 BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy,T,::boost::detail::has_trivial_copy_impl<T>::value)
+BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy_constructor,T,::boost::detail::has_trivial_copy_impl<T>::value)
 
 } // namespace boost
 

Modified: branches/hash/boost/type_traits/is_base_and_derived.hpp
==============================================================================
--- branches/hash/boost/type_traits/is_base_and_derived.hpp (original)
+++ branches/hash/boost/type_traits/is_base_and_derived.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -15,6 +15,7 @@
 #include <boost/type_traits/detail/ice_and.hpp>
 #include <boost/type_traits/remove_cv.hpp>
 #include <boost/config.hpp>
+#include <boost/static_assert.hpp>
 
 // should be the last #include
 #include <boost/type_traits/detail/bool_trait_def.hpp>
@@ -128,6 +129,13 @@
 template<typename B, typename D>
 struct is_base_and_derived_impl2
 {
+ //
+ // May silently do the wrong thing with incomplete types
+ // unless we trap them here:
+ //
+ BOOST_STATIC_ASSERT(sizeof(B));
+ BOOST_STATIC_ASSERT(sizeof(D));
+
     struct Host
     {
 #if !BOOST_WORKAROUND(BOOST_MSVC, == 1310)

Modified: branches/hash/boost/type_traits/is_signed.hpp
==============================================================================
--- branches/hash/boost/type_traits/is_signed.hpp (original)
+++ branches/hash/boost/type_traits/is_signed.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -11,6 +11,7 @@
 #define BOOST_TT_IS_SIGNED_HPP_INCLUDED
 
 #include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 #include <boost/type_traits/is_enum.hpp>
 #include <boost/type_traits/detail/ice_or.hpp>
 
@@ -26,7 +27,8 @@
 template <class T>
 struct is_signed_helper
 {
- BOOST_STATIC_CONSTANT(bool, value = (static_cast<T>(-1) < 0));
+ typedef typename remove_cv<T>::type no_cv_t;
+ BOOST_STATIC_CONSTANT(bool, value = (static_cast<no_cv_t>(-1) < 0));
 };
 
 template <bool integral_type>

Modified: branches/hash/boost/type_traits/is_unsigned.hpp
==============================================================================
--- branches/hash/boost/type_traits/is_unsigned.hpp (original)
+++ branches/hash/boost/type_traits/is_unsigned.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -12,6 +12,7 @@
 
 #include <boost/type_traits/is_integral.hpp>
 #include <boost/type_traits/is_enum.hpp>
+#include <boost/type_traits/remove_cv.hpp>
 #include <boost/type_traits/detail/ice_or.hpp>
 
 // should be the last #include
@@ -26,7 +27,8 @@
 template <class T>
 struct is_ununsigned_helper
 {
- BOOST_STATIC_CONSTANT(bool, value = (static_cast<T>(-1) > 0));
+ typedef typename remove_cv<T>::type no_cv_t;
+ BOOST_STATIC_CONSTANT(bool, value = (static_cast<no_cv_t>(-1) > 0));
 };
 
 template <bool integral_type>

Modified: branches/hash/boost/typeof/typeof.hpp
==============================================================================
--- branches/hash/boost/typeof/typeof.hpp (original)
+++ branches/hash/boost/typeof/typeof.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -10,7 +10,7 @@
 #endif
 
 #if defined(BOOST_TYPEOF_EMULATION) && defined(BOOST_TYPEOF_NATIVE)
-# error both typeof emulation and native mode requested
+# error both typeof emulation and native mode requested
 #endif
 
 #if defined(__COMO__)
@@ -76,6 +76,14 @@
 # endif
 # endif
 
+#elif defined __DMC__
+# ifndef BOOST_TYPEOF_EMULATION
+# ifndef BOOST_TYPEOF_NATIVE
+# define BOOST_TYPEOF_NATIVE
+# endif
+# include <boost/typeof/dmc/typeof_impl.hpp>
+# define MSVC_TYPEOF_HACK
+# endif
 #elif defined(_MSC_VER)
 # if (_MSC_VER <= 1300) // 6.5, 7.0
 # ifndef BOOST_TYPEOF_EMULATION

Modified: branches/hash/boost/utility/value_init.hpp
==============================================================================
--- branches/hash/boost/utility/value_init.hpp (original)
+++ branches/hash/boost/utility/value_init.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1,10 +1,11 @@
-// (C) 2002, Fernando Luis Cacciola Carballal.
+// (C) Copyright 2002-2007, Fernando Luis Cacciola Carballal.
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 // 21 Ago 2002 (Created) Fernando Cacciola
+// 07 Set 2007 (Worked around MSVC++ bug) Fernando Cacciola, Niels Dekker
 //
 #ifndef BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
 #define BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
@@ -13,6 +14,75 @@
 #include <boost/type_traits/cv_traits.hpp>
 #include <boost/detail/workaround.hpp>
 
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500) )
+// Microsoft Visual C++ does not correctly support value initialization, as reported by
+// Pavel Kuznetsov (MetaCommunications Engineering), 7/28/2005, Feedback ID 100744,
+// Feedback Title: Value-initialization in new-expression
+// https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=100744
+// The report was closed at 11/14/2006, and its status was set to "Closed (Won't Fix)".
+// Luckily, even in the presence of this compiler bug, boost::value_initialized will still
+// do its job correctly, when using the following workaround:
+#define BOOST_UTILITY_VALUE_INIT_WORKAROUND
+#endif
+
+#ifdef BOOST_UTILITY_VALUE_INIT_WORKAROUND
+#include <boost/aligned_storage.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <cstring>
+#include <new>
+
+namespace boost {
+
+namespace vinit_detail {
+
+template<class T>
+class const_T_base
+{
+ protected :
+
+ const_T_base()
+ {
+ std::memset(&x, 0, sizeof(x));
+ new (&x) T();
+ }
+
+ ~const_T_base() { get().T::~T(); }
+
+ T & get() const
+ {
+ void const * ptr = &x;
+ return *static_cast<T*>(ptr);
+ }
+
+ private :
+ typename ::boost::aligned_storage<sizeof(T), ::boost::alignment_of<T>::value>::type x;
+} ;
+
+template<class T>
+class non_const_T_base
+{
+ protected :
+
+ non_const_T_base()
+ {
+ std::memset(&x, 0, sizeof(x));
+ new (&x) T();
+ }
+
+ ~non_const_T_base() { get().T::~T(); }
+
+ T & get() const
+ {
+ void * ptr = &x;
+ return *static_cast<T*>(ptr);
+ }
+
+ private :
+ mutable typename ::boost::aligned_storage<sizeof(T), ::boost::alignment_of<T>::value>::type x;
+} ;
+
+#else
+
 namespace boost {
 
 namespace vinit_detail {
@@ -23,20 +93,26 @@
   protected :
 
    const_T_base() : x() {}
+ T & get() const { return x; }
 
+ private :
    T x ;
 } ;
 
 template<class T>
-struct non_const_T_base
+class non_const_T_base
 {
   protected :
 
    non_const_T_base() : x() {}
+ T & get() const { return x; }
 
+ private :
    mutable T x ;
 } ;
 
+#endif
+
 template<class T>
 struct select_base
 {
@@ -57,9 +133,9 @@
 
     value_initialized() {}
 
- operator T&() const { return this->x ; }
+ operator T&() const { return this->get(); }
 
- T& data() const { return this->x ; }
+ T& data() const { return this->get(); }
 
 } ;
 

Modified: branches/hash/boost/xpressive/detail/core/action.hpp
==============================================================================
--- branches/hash/boost/xpressive/detail/core/action.hpp (original)
+++ branches/hash/boost/xpressive/detail/core/action.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -25,7 +25,7 @@
     struct actionable
     {
         virtual ~actionable() {}
- virtual void execute(action_args_type *action_args) const {}
+ virtual void execute(action_args_type *) const {}
 
         actionable()
           : next(0)

Modified: branches/hash/boost/xpressive/detail/core/peeker.hpp
==============================================================================
--- branches/hash/boost/xpressive/detail/core/peeker.hpp (original)
+++ branches/hash/boost/xpressive/detail/core/peeker.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -175,14 +175,14 @@
     }
 
     template<typename Xpr, bool Greedy>
- mpl::false_ accept(optional_matcher<Xpr, Greedy> const &xpr)
+ mpl::false_ accept(optional_matcher<Xpr, Greedy> const &)
     {
         this->fail(); // a union of xpr and next
         return mpl::false_();
     }
 
     template<typename Xpr, bool Greedy>
- mpl::false_ accept(optional_mark_matcher<Xpr, Greedy> const &xpr)
+ mpl::false_ accept(optional_mark_matcher<Xpr, Greedy> const &)
     {
         this->fail(); // a union of xpr and next
         return mpl::false_();

Modified: branches/hash/boost/xpressive/detail/static/transforms/as_marker.hpp
==============================================================================
--- branches/hash/boost/xpressive/detail/static/transforms/as_marker.hpp (original)
+++ branches/hash/boost/xpressive/detail/static/transforms/as_marker.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -71,7 +71,7 @@
 
         template<typename Expr, typename State, typename Visitor>
         static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &, Visitor &visitor)
+ call(Expr const &expr, State const &, Visitor &)
         {
             int mark_nbr = get_mark_number(proto::left(expr));
             mark_begin_matcher begin(mark_nbr);

Modified: branches/hash/boost/xpressive/detail/static/transforms/as_matcher.hpp
==============================================================================
--- branches/hash/boost/xpressive/detail/static/transforms/as_matcher.hpp (original)
+++ branches/hash/boost/xpressive/detail/static/transforms/as_matcher.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -36,7 +36,7 @@
 
         template<typename Expr, typename State, typename Visitor>
         static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
+ call(Expr const &expr, State const &, Visitor &visitor)
         {
             return visitor.call(proto::arg(expr));
         }

Modified: branches/hash/boost/xpressive/detail/static/transforms/as_quantifier.hpp
==============================================================================
--- branches/hash/boost/xpressive/detail/static/transforms/as_quantifier.hpp (original)
+++ branches/hash/boost/xpressive/detail/static/transforms/as_quantifier.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -77,7 +77,7 @@
 
         template<typename Expr, typename State, typename Visitor>
         static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
+ call(Expr const &expr, State const &, Visitor &visitor)
         {
             typename apply<Expr, State, Visitor>::xpr_type const &xpr =
                 grammar_type::call(expr, true_xpression(), visitor);
@@ -199,7 +199,7 @@
 
         template<typename Expr, typename State, typename Visitor>
         static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
+ call(Expr const &expr, State const &, Visitor &visitor)
         {
             return typename apply<Expr, State, Visitor>::type(
                 Grammar::call(expr, alternate_end_xpression(), visitor)
@@ -226,7 +226,7 @@
 
         template<typename Expr, typename State, typename Visitor>
         static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
+ call(Expr const &expr, State const &, Visitor &visitor)
         {
             int mark_number = proto::arg(proto::left(expr)).mark_number_;
             return typename apply<Expr, State, Visitor>::type(
@@ -270,7 +270,7 @@
 
         template<typename Expr, typename State, typename Visitor>
         static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
+ call(Expr const &expr, State const &, Visitor &)
         {
             typename apply<Expr, State, Visitor>::type that = {expr};
             return that;

Modified: branches/hash/boost/xpressive/detail/utility/symbols.hpp
==============================================================================
--- branches/hash/boost/xpressive/detail/utility/symbols.hpp (original)
+++ branches/hash/boost/xpressive/detail/utility/symbols.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -21,8 +21,7 @@
 #include <boost/range/iterator.hpp>
 #include <boost/range/begin.hpp>
 #include <boost/range/end.hpp>
-#include <boost/intrusive_ptr.hpp>
-#include <boost/xpressive/detail/utility/counted_base.hpp>
+#include <boost/shared_ptr.hpp>
 
 namespace boost { namespace xpressive { namespace detail
 {
@@ -40,67 +39,85 @@
         typedef typename range_iterator<key_type const>::type key_iterator;
         typedef value_type const *result_type;
 
- symbols()
- : root(0)
- {}
-
- // copies of this symbols table share the TST
+ // copies of this symbol table share the TST
 
         template<typename Trans>
         void load(Map const &map, Trans trans)
         {
- if(0 == this->root)
- {
- iterator begin = boost::begin(map);
- iterator end = boost::end(map);
- for(; begin != end; ++begin)
- {
- key_iterator kbegin = boost::begin(begin->first);
- key_iterator kend = boost::end(begin->first);
- this->root = this->insert(this->root, kbegin, kend, &begin->second, trans);
- }
+ iterator begin = boost::begin(map);
+ iterator end = boost::end(map);
+ node* root_p = this->root.get();
+ for(; begin != end; ++begin)
+ {
+ key_iterator kbegin = boost::begin(begin->first);
+ key_iterator kend = boost::end(begin->first);
+ root_p = this->insert(root_p, kbegin, kend, &begin->second, trans);
             }
+ this->root.reset(root_p);
         }
 
         template<typename BidiIter, typename Trans>
         result_type operator ()(BidiIter &begin, BidiIter end, Trans trans) const
         {
- return this->search(begin, end, trans);
+ return this->search(begin, end, trans, this->root.get());
         }
 
         template<typename Sink>
         void peek(Sink const &sink) const
         {
- this->peek_(this->root, sink);
+ this->peek_(this->root.get(), sink);
         }
 
     private:
- struct node;
- typedef intrusive_ptr<node> node_ptr;
-
+ ///////////////////////////////////////////////////////////////////////////////
+ // struct node : a node in the TST.
+ // The "eq" field stores the result pointer when ch is zero.
+ //
         struct node
- : counted_base<node>
+ : boost::noncopyable
         {
- node()
- : counted_base<node>()
- , ch(0)
+ node(char_type c)
+ : ch(c)
               , lo(0)
               , eq(0)
               , hi(0)
- , result(0)
+ , tau(0)
             {}
 
+ ~node()
+ {
+ delete lo;
+ if (ch)
+ delete eq;
+ delete hi;
+ }
+
+ void swap(node& that)
+ {
+ std::swap(ch, that.ch);
+ std::swap(lo, that.lo);
+ std::swap(eq, that.eq);
+ std::swap(hi, that.hi);
+ std::swap(tau, that.tau);
+ }
+
             char_type ch;
- node_ptr lo;
- node_ptr eq;
- node_ptr hi;
- result_type result;
+ node* lo;
+ union
+ {
+ node* eq;
+ result_type result;
+ };
+ node* hi;
+ long tau;
         };
 
+ ///////////////////////////////////////////////////////////////////////////////
+ // insert : insert a string into the TST
+ //
         template<typename Trans>
- node_ptr insert(node_ptr const &pp, key_iterator &begin, key_iterator end, result_type r, Trans trans) const
+ node* insert(node* p, key_iterator &begin, key_iterator end, result_type r, Trans trans) const
         {
- node_ptr p = pp;
             char_type c1 = 0;
 
             if(begin != end)
@@ -110,8 +127,7 @@
 
             if(!p)
             {
- p = new node;
- p->ch = c1;
+ p = new node(c1);
             }
 
             if(c1 < p->ch)
@@ -137,46 +153,97 @@
             return p;
         }
 
+ ///////////////////////////////////////////////////////////////////////////////
+ // conditional rotation : the goal is to minimize the overall
+ // weighted path length of each binary search tree
+ //
+ bool const cond_rotation(bool left, node* const i, node* const j) const
+ {
+ // don't rotate top node in binary search tree
+ if (i == j)
+ return false;
+ // calculate psi (the rotation condition)
+ node* const k = (left ? i->hi : i->lo);
+ long psi = 2*i->tau - j->tau - (k ? k->tau : 0);
+ if (psi <= 0)
+ return false;
+
+ // recalculate the tau values
+ j->tau += -i->tau + (k ? k->tau : 0);
+ i->tau += j->tau - (k ? k->tau : 0);
+ // fixup links and swap nodes
+ if (left)
+ {
+ j->lo = k;
+ i->hi = i;
+ }
+ else
+ {
+ j->hi = k;
+ i->lo = i;
+ }
+ (*i).swap(*j);
+ return true;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////////
+ // search : find a string in the TST
+ //
         template<typename BidiIter, typename Trans>
- result_type search(BidiIter &begin, BidiIter end, Trans trans) const
+ result_type search(BidiIter &begin, BidiIter end, Trans trans, node* p) const
         {
- const node* p = this->root.get();
- result_type r = (0 == p->ch ? p->result : 0);
- if (begin == end)
- return r;
-
- BidiIter isave = begin;
- char_type c1 = trans(*begin);
+ result_type r = 0;
+ node* p2 = p;
+ bool left = false;
+ char_type c1 = (begin != end ? trans(*begin) : 0);
             while(p)
             {
+ ++p->tau;
                 if(c1 == p->ch)
                 {
- ++begin;
- p = p->eq.get();
+ // conditional rotation test
+ if (this->cond_rotation(left, p, p2))
+ p = p2;
                     if (0 == p->ch)
                     {
- isave = begin;
+ // it's a match!
                         r = p->result;
                     }
                     if(begin == end)
                         break;
- c1 = trans(*begin);
+ ++begin;
+ p = p->eq;
+ // search for the longest match first
+ r = search(begin,end,trans,p);
+ if (0 == r)
+ {
+ // search for a match ending here
+ r = search(end,end,trans,p);
+ if (0 == r)
+ {
+ --begin;
+ }
+ }
+ break;
                 }
                 else if(c1 < p->ch)
                 {
- p = p->lo.get();
+ left = true;
+ p2 = p;
+ p = p->lo;
                 }
                 else // (c1 > p->ch)
                 {
- p = p->hi.get();
+ left = false;
+ p2 = p;
+ p = p->hi;
                 }
             }
- begin = isave;
             return r;
         }
 
         template<typename Sink>
- void peek_(node_ptr const &p, Sink const &sink) const
+ void peek_(node const *const &p, Sink const &sink) const
         {
             if(p)
             {
@@ -186,7 +253,7 @@
             }
         }
 
- node_ptr root;
+ boost::shared_ptr<node> root;
     };
 
 }}} // namespace boost::xpressive::detail

Modified: branches/hash/boost/xpressive/regex_primitives.hpp
==============================================================================
--- branches/hash/boost/xpressive/regex_primitives.hpp (original)
+++ branches/hash/boost/xpressive/regex_primitives.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -139,14 +139,14 @@
 unsigned int const inf = UINT_MAX-1;
 
 /// INTERNAL ONLY (for backwards compatibility)
-proto::terminal<detail::epsilon_matcher>::type const epsilon = {};
+proto::terminal<detail::epsilon_matcher>::type const epsilon = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief Successfully matches nothing.
 ///
 /// Successfully matches a zero-width sequence. nil always succeeds and
 /// never consumes any characters.
-proto::terminal<detail::epsilon_matcher>::type const nil = {};
+proto::terminal<detail::epsilon_matcher>::type const nil = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief Matches an alpha-numeric character.
@@ -273,7 +273,7 @@
 ///
 /// For the character sequence [begin, end), 'bos' matches the
 /// zero-width sub-sequence [begin, begin).
-proto::terminal<detail::assert_bos_matcher>::type const bos = {};
+proto::terminal<detail::assert_bos_matcher>::type const bos = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief End of sequence assertion.
@@ -284,7 +284,7 @@
 /// \attention Unlike the perl end of sequence assertion \$, 'eos' will
 /// not match at the position [end-1, end-1) if *(end-1) is '\\n'. To
 /// get that behavior, use (!_n >> eos).
-proto::terminal<detail::assert_eos_matcher>::type const eos = {};
+proto::terminal<detail::assert_eos_matcher>::type const eos = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief Beginning of line assertion.
@@ -292,7 +292,7 @@
 /// 'bol' matches the zero-width sub-sequence
 /// immediately following a logical newline sequence. The regex traits
 /// is used to determine what constitutes a logical newline sequence.
-proto::terminal<detail::assert_bol_placeholder>::type const bol = {};
+proto::terminal<detail::assert_bol_placeholder>::type const bol = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief End of line assertion.
@@ -300,7 +300,7 @@
 /// 'eol' matches the zero-width sub-sequence
 /// immediately preceeding a logical newline sequence. The regex traits
 /// is used to determine what constitutes a logical newline sequence.
-proto::terminal<detail::assert_eol_placeholder>::type const eol = {};
+proto::terminal<detail::assert_eol_placeholder>::type const eol = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief Beginning of word assertion.
@@ -308,7 +308,7 @@
 /// 'bow' matches the zero-width sub-sequence
 /// immediately following a non-word character and preceeding a word character.
 /// The regex traits are used to determine what constitutes a word character.
-proto::terminal<detail::assert_word_begin>::type const bow = {};
+proto::terminal<detail::assert_word_begin>::type const bow = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief End of word assertion.
@@ -316,7 +316,7 @@
 /// 'eow' matches the zero-width sub-sequence
 /// immediately following a word character and preceeding a non-word character.
 /// The regex traits are used to determine what constitutes a word character.
-proto::terminal<detail::assert_word_end>::type const eow = {};
+proto::terminal<detail::assert_word_end>::type const eow = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief Word boundary assertion.
@@ -326,7 +326,7 @@
 /// constitutes a word character. To match a non-word boundary, use ~_b.
 ///
 /// \attention _b is like \\b in perl. ~_b is like \\B in perl.
-proto::terminal<detail::assert_word_boundary>::type const _b = {};
+proto::terminal<detail::assert_word_boundary>::type const _b = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief Matches a word character.
@@ -374,7 +374,7 @@
 /// line separator class, as determined by the regex traits, or the '\\r\\n' sequence.
 /// For the purpose of back-tracking, '\\r\\n' is treated as a unit.
 /// To match any one character that is not a logical newline, use ~_ln.
-detail::logical_newline_xpression const _ln = {};
+detail::logical_newline_xpression const _ln = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief Matches any one character.
@@ -383,7 +383,7 @@
 /// '_' matches any one character, including the newline.
 ///
 /// \attention To match any character except the newline, use ~_n
-proto::terminal<detail::any_matcher>::type const _ = {};
+proto::terminal<detail::any_matcher>::type const _ = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief Reference to the current regex object
@@ -392,7 +392,7 @@
 /// identifier is a short-hand for the current regex object. For instance,
 /// sregex rx = '(' >> (self | nil) >> ')'; will create a regex object that
 /// matches balanced parens such as "((()))".
-proto::terminal<detail::self_placeholder>::type const self = {};
+proto::terminal<detail::self_placeholder>::type const self = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief Used to create character sets.
@@ -409,7 +409,7 @@
 ///
 /// Sets can be composed of other, possibly complemented, sets. For instance,
 /// set[ ~digit | ~(set= 'a','b','c') ].
-detail::set_initializer_type const set = {};
+detail::set_initializer_type const set = {{}};
 
 ///////////////////////////////////////////////////////////////////////////////
 /// \brief Sub-match placeholder, like $& in Perl

Modified: branches/hash/doc/Jamfile.v2
==============================================================================
--- branches/hash/doc/Jamfile.v2 (original)
+++ branches/hash/doc/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -11,7 +11,7 @@
     <dependency>../libs/algorithm/string/doc//autodoc.xml
     <dependency>../libs/logic/doc//reference.xml
     <dependency>../libs/functional/hash/doc//hash
- <dependency>../libs/type_traits/doc//type_traits
+ #<dependency>../libs/type_traits/doc//type_traits
     <dependency>../libs/static_assert/doc//static_assert
     <dependency>../libs/tr1/doc//tr1
     <dependency>../libs/math/doc//math
@@ -36,7 +36,7 @@
     ## Add path references to the QuickBook generated docs...
 
     <implicit-dependency>../libs/functional/hash/doc//hash
- <implicit-dependency>../libs/type_traits/doc//type_traits
+ #<implicit-dependency>../libs/type_traits/doc//type_traits
     <implicit-dependency>../libs/static_assert/doc//static_assert
     <implicit-dependency>../libs/tr1/doc//tr1
     <implicit-dependency>../libs/math/doc//math
@@ -60,3 +60,4 @@
 explicit css ;
 install images : [ glob src/images/*.png ] : <location>html/images ;
 explicit images ;
+

Modified: branches/hash/doc/src/boost.xml
==============================================================================
--- branches/hash/doc/src/boost.xml (original)
+++ branches/hash/doc/src/boost.xml 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -681,7 +681,16 @@
      </libraryinfo>
    </library>
 
- <xi:include href="type_traits.xml"/>
+ <library name="Type Traits" dirname="type_traits" html-only="1">
+ <libraryinfo>
+ <author>
+ <firstname>John</firstname>
+ <surname>Maddock</surname>
+ </author>
+ <librarypurpose>Meta-programming support library.</librarypurpose>
+ <librarycategory name="category:generic"/>
+ </libraryinfo>
+ </library>
  
    <xi:include href="typeof.xml"/>
 
@@ -743,3 +752,4 @@
   
   <xi:include href="using.xml"/>
 </boostbook>
+

Modified: branches/hash/libs/asio/example/allocation/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/allocation/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/allocation/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -25,6 +25,8 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;

Modified: branches/hash/libs/asio/example/buffers/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/buffers/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/buffers/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -25,6 +25,8 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;

Modified: branches/hash/libs/asio/example/chat/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/chat/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/chat/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -26,8 +26,10 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;
 
 exe chat_server : chat_server.cpp ;

Modified: branches/hash/libs/asio/example/echo/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/echo/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/echo/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -26,8 +26,10 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;
 
 exe async_tcp_echo_server : async_tcp_echo_server.cpp ;

Modified: branches/hash/libs/asio/example/http/client/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/http/client/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/http/client/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -25,8 +25,10 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;
 
 exe async_client : async_client.cpp ;

Modified: branches/hash/libs/asio/example/http/server/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/http/server/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/http/server/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -34,6 +34,8 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;

Modified: branches/hash/libs/asio/example/http/server/connection.cpp
==============================================================================
--- branches/hash/libs/asio/example/http/server/connection.cpp (original)
+++ branches/hash/libs/asio/example/http/server/connection.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -85,7 +85,8 @@
   if (!e)
   {
     // Initiate graceful connection closure.
- socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both);
+ boost::system::error_code ignored_ec;
+ socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignored_ec);
   }
 
   if (e != boost::asio::error::operation_aborted)

Modified: branches/hash/libs/asio/example/http/server2/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/http/server2/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/http/server2/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -34,6 +34,8 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;

Modified: branches/hash/libs/asio/example/http/server2/connection.cpp
==============================================================================
--- branches/hash/libs/asio/example/http/server2/connection.cpp (original)
+++ branches/hash/libs/asio/example/http/server2/connection.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -79,7 +79,8 @@
   if (!e)
   {
     // Initiate graceful connection closure.
- socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both);
+ boost::system::error_code ignored_ec;
+ socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignored_ec);
   }
 
   // No new asynchronous operations are started. This means that all shared_ptr

Modified: branches/hash/libs/asio/example/http/server3/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/http/server3/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/http/server3/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -33,6 +33,8 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;

Modified: branches/hash/libs/asio/example/http/server3/connection.cpp
==============================================================================
--- branches/hash/libs/asio/example/http/server3/connection.cpp (original)
+++ branches/hash/libs/asio/example/http/server3/connection.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -84,7 +84,8 @@
   if (!e)
   {
     // Initiate graceful connection closure.
- socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both);
+ boost::system::error_code ignored_ec;
+ socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignored_ec);
   }
 
   // No new asynchronous operations are started. This means that all shared_ptr

Modified: branches/hash/libs/asio/example/invocation/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/invocation/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/invocation/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -25,6 +25,8 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;

Modified: branches/hash/libs/asio/example/iostreams/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/iostreams/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/iostreams/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -25,8 +25,10 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;
 
 exe daytime_client : daytime_client.cpp ;

Modified: branches/hash/libs/asio/example/multicast/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/multicast/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/multicast/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -25,8 +25,10 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;
 
 exe receiver : receiver.cpp ;

Modified: branches/hash/libs/asio/example/serialization/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/serialization/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/serialization/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -26,8 +26,10 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;
 
 exe client : client.cpp ;

Modified: branches/hash/libs/asio/example/services/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/services/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/services/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -27,6 +27,8 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;

Modified: branches/hash/libs/asio/example/socks4/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/socks4/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/socks4/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -25,6 +25,8 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;

Modified: branches/hash/libs/asio/example/ssl/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/ssl/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/ssl/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -36,8 +36,10 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
     <library>ssl
     <library>crypto
   ;

Modified: branches/hash/libs/asio/example/timeouts/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/timeouts/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/timeouts/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -25,8 +25,10 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;
 
 exe accept_timeout : accept_timeout.cpp ;

Modified: branches/hash/libs/asio/example/timers/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/timers/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/timers/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -25,8 +25,10 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;
 
 if [ os.name ] = NT

Modified: branches/hash/libs/asio/example/tutorial/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/example/tutorial/Jamfile.v2 (original)
+++ branches/hash/libs/asio/example/tutorial/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -26,8 +26,10 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;
 
 obj timer1.obj : timer1/timer.cpp ;

Modified: branches/hash/libs/asio/test/Jamfile
==============================================================================
--- branches/hash/libs/asio/test/Jamfile (original)
+++ branches/hash/libs/asio/test/Jamfile 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -8,6 +8,7 @@
 subproject libs/asio/test ;
 
 project boost : $(BOOST_ROOT) ;
+project boost_system : $(BOOST_SYSTEM_ROOT) ;
 
 # bring in the rules for testing
 import testing ;
@@ -25,8 +26,8 @@
 
 template asio_unit_test
   : <lib>@boost/libs/thread/build/boost_thread
- <lib>@boost/libs/system/build/boost_system
- : <include>../../..
+ <lib>@boost_system/libs/system/build/boost_system
+ : <include>../../.. <include>@boost <include>@boost_system
     <define>BOOST_ALL_NO_LIB=1
     <threading>multi
     <mingw><*><find-library>ws2_32

Modified: branches/hash/libs/asio/test/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/test/Jamfile.v2 (original)
+++ branches/hash/libs/asio/test/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -36,10 +36,12 @@
     <os>SOLARIS:<define>__EXTENSIONS__
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>cw:<library>ws2_32
     <os>NT,<toolset>cw:<library>mswsock
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;
 
 test-suite "asio" :

Modified: branches/hash/libs/asio/test/error.cpp
==============================================================================
--- branches/hash/libs/asio/test/error.cpp (original)
+++ branches/hash/libs/asio/test/error.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -24,8 +24,8 @@
   boost::system::error_code error(code);
   BOOST_CHECK(code == error);
 
- BOOST_CHECK(code == 0 || error);
- BOOST_CHECK(code == 0 || !!error);
+ BOOST_CHECK(!code || error);
+ BOOST_CHECK(!code || !!error);
 
   boost::system::error_code error2(error);
   BOOST_CHECK(error == error2);

Modified: branches/hash/libs/asio/test/ip/v6_only.cpp
==============================================================================
--- branches/hash/libs/asio/test/ip/v6_only.cpp (original)
+++ branches/hash/libs/asio/test/ip/v6_only.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -73,9 +73,13 @@
   io_service ios;
   boost::system::error_code ec;
 
+ ip::tcp::endpoint ep_v6(ip::address_v6::loopback(), 0);
   ip::tcp::acceptor acceptor_v6(ios);
- acceptor_v6.open(ip::tcp::v6(), ec);
+ acceptor_v6.open(ep_v6.protocol(), ec);
+ acceptor_v6.bind(ep_v6, ec);
   bool have_v6 = !ec;
+ acceptor_v6.close(ec);
+ acceptor_v6.open(ep_v6.protocol(), ec);
 
   if (have_v6)
   {

Modified: branches/hash/libs/asio/test/is_read_buffered.cpp
==============================================================================
--- branches/hash/libs/asio/test/is_read_buffered.cpp (original)
+++ branches/hash/libs/asio/test/is_read_buffered.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -29,8 +29,6 @@
 public:
   typedef boost::asio::io_service io_service_type;
 
- typedef boost::asio::error error_type;
-
   typedef test_stream lowest_layer_type;
 
   test_stream(boost::asio::io_service& io_service)
@@ -54,16 +52,17 @@
     return 0;
   }
 
- template <typename Const_Buffers, typename Error_Handler>
- size_t write(const Const_Buffers&, Error_Handler)
+ template <typename Const_Buffers>
+ size_t write(const Const_Buffers&, boost::system::error_code& ec)
   {
+ ec = boost::system::error_code();
     return 0;
   }
 
   template <typename Const_Buffers, typename Handler>
   void async_write(const Const_Buffers&, Handler handler)
   {
- boost::asio::error error;
+ boost::system::error_code error;
     io_service_.post(boost::asio::detail::bind_handler(handler, error, 0));
   }
 
@@ -73,16 +72,17 @@
     return 0;
   }
 
- template <typename Mutable_Buffers, typename Error_Handler>
- size_t read(const Mutable_Buffers&, Error_Handler error_handler)
+ template <typename Mutable_Buffers>
+ size_t read(const Mutable_Buffers&, boost::system::error_code& ec)
   {
+ ec = boost::system::error_code();
     return 0;
   }
 
   template <typename Mutable_Buffers, typename Handler>
   void async_read(const Mutable_Buffers&, Handler handler)
   {
- boost::asio::error error;
+ boost::system::error_code error;
     io_service_.post(boost::asio::detail::bind_handler(handler, error, 0));
   }
 

Modified: branches/hash/libs/asio/test/is_write_buffered.cpp
==============================================================================
--- branches/hash/libs/asio/test/is_write_buffered.cpp (original)
+++ branches/hash/libs/asio/test/is_write_buffered.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -29,8 +29,6 @@
 public:
   typedef boost::asio::io_service io_service_type;
 
- typedef boost::asio::error error_type;
-
   typedef test_stream lowest_layer_type;
 
   test_stream(boost::asio::io_service& io_service)
@@ -54,16 +52,17 @@
     return 0;
   }
 
- template <typename Const_Buffers, typename Error_Handler>
- size_t write(const Const_Buffers&, Error_Handler)
+ template <typename Const_Buffers>
+ size_t write(const Const_Buffers&, boost::system::error_code& ec)
   {
+ ec = boost::system::error_code();
     return 0;
   }
 
   template <typename Const_Buffers, typename Handler>
   void async_write(const Const_Buffers&, Handler handler)
   {
- boost::asio::error error;
+ boost::system::error_code error;
     io_service_.post(boost::asio::detail::bind_handler(handler, error, 0));
   }
 
@@ -73,16 +72,17 @@
     return 0;
   }
 
- template <typename Mutable_Buffers, typename Error_Handler>
- size_t read(const Mutable_Buffers&, Error_Handler error_handler)
+ template <typename Mutable_Buffers>
+ size_t read(const Mutable_Buffers&, boost::system::error_code& ec)
   {
+ ec = boost::system::error_code();
     return 0;
   }
 
   template <typename Mutable_Buffers, typename Handler>
   void async_read(const Mutable_Buffers&, Handler handler)
   {
- boost::asio::error error;
+ boost::system::error_code error;
     io_service_.post(boost::asio::detail::bind_handler(handler, error, 0));
   }
 

Modified: branches/hash/libs/asio/test/ssl/Jamfile.v2
==============================================================================
--- branches/hash/libs/asio/test/ssl/Jamfile.v2 (original)
+++ branches/hash/libs/asio/test/ssl/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -36,8 +36,10 @@
     <threading>multi
     <os>SOLARIS:<library>socket
     <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0500
     <os>NT,<toolset>gcc:<library>ws2_32
     <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
   ;
 
 test-suite "asio-ssl" :

Modified: branches/hash/libs/config/test/Jamfile.v2
==============================================================================
--- branches/hash/libs/config/test/Jamfile.v2 (original)
+++ branches/hash/libs/config/test/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -17,7 +17,7 @@
 run config_info.cpp ;
 run math_info.cpp : : : <toolset>borland:<runtime-link>static ;
 run config_test.cpp ;
-run limits_test.cpp ;
+run limits_test.cpp ../../test/build//boost_test_exec_monitor ;
 run abi/abi_test.cpp abi/main.cpp ;
 
 test-suite "BOOST_HAS_TWO_ARG_USE_FACET" :
@@ -357,3 +357,4 @@
 [ run no_wchar_t_pass.cpp ]
 [ compile-fail no_wchar_t_fail.cpp ] ;
 
+

Modified: branches/hash/libs/filesystem/build/Jamfile.v2
==============================================================================
--- branches/hash/libs/filesystem/build/Jamfile.v2 (original)
+++ branches/hash/libs/filesystem/build/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -9,8 +9,10 @@
 # See library home page at http://www.boost.org/libs/filesystem
 
 project boost/filesystem
- :
- source-location ../src
+ : source-location ../src
+ : usage-requirements # pass these requirement to dependents (i.e. users)
+ <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1
+ <link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1
     ;
 
 SOURCES =
@@ -21,8 +23,8 @@
     $(SOURCES).cpp
     ../../system/build//boost_system
     :
- <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1 # tell source we're building dll's
- <link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1 # tell source we're building static lib's
+ <link>shared:<define>BOOST_ALL_DYN_LINK=1 # tell source we're building dll's
+ <link>static:<define>BOOST_All_STATIC_LINK=1 # tell source we're building static lib's
     ;
 
 install dist-lib

Modified: branches/hash/libs/filesystem/src/operations.cpp
==============================================================================
--- branches/hash/libs/filesystem/src/operations.cpp (original)
+++ branches/hash/libs/filesystem/src/operations.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -16,7 +16,10 @@
 
 #define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r() needs this
 
+#if !(defined(__HP_aCC) && defined(_ILP32) && \
+ !defined(_STATVFS_ACPP_PROBLEMS_FIXED))
 #define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect,
+#endif
 #define __USE_FILE_OFFSET64 // but that is harmless on Windows and on POSIX
       // 64-bit systems or on 32-bit systems which don't have files larger
       // than can be represented by a traditional POSIX/UNIX off_t type.
@@ -42,35 +45,38 @@
 
 namespace fs = boost::filesystem;
 using boost::system::error_code;
-using boost::system::errno_ecat;
-using boost::system::native_ecat;
+using boost::system::system_category;
 
 # if defined(BOOST_WINDOWS_API)
-# include "windows.h"
+# include <windows.h>
 # if defined(__BORLANDC__) || defined(__MWERKS__)
 # if defined(__BORLANDC__)
         using std::time_t;
 # endif
-# include "utime.h"
+# include <utime.h>
 # else
-# include "sys/utime.h"
+# include <sys/utime.h>
 # endif
 
 # else // BOOST_POSIX_API
 # include <sys/types.h>
-# ifndef __APPLE__
+# if !defined(__APPLE__) && !defined(__OpenBSD__)
 # include <sys/statvfs.h>
 # define BOOST_STATVFS statvfs
 # define BOOST_STATVFS_F_FRSIZE vfs.f_frsize
 # else
+#ifdef __OpenBSD__
+# include <sys/param.h>
+#endif
 # include <sys/mount.h>
 # define BOOST_STATVFS statfs
 # define BOOST_STATVFS_F_FRSIZE static_cast<boost::uintmax_t>( vfs.f_bsize )
 # endif
-# include "dirent.h"
-# include "unistd.h"
-# include "fcntl.h"
-# include "utime.h"
+# include <dirent.h>
+# include <unistd.h>
+# include <fcntl.h>
+# include <utime.h>
+# include "limits.h"
 # endif
 
 // BOOST_FILESYSTEM_STATUS_CACHE enables file_status cache in
@@ -99,7 +105,7 @@
 
 namespace
 {
- static const fs::directory_iterator end_itr;
+ const fs::directory_iterator end_itr;
   bool is_empty_directory( const std::string & dir_path )
   {
     return fs::directory_iterator(fs::path(dir_path)) == end_itr;
@@ -120,7 +126,7 @@
   inline DWORD get_file_attributes( const wchar_t * ph )
     { return ::GetFileAttributesW( ph ); }
 
- static const fs::wdirectory_iterator wend_itr;
+ const fs::wdirectory_iterator wend_itr;
   bool is_empty_directory( const std::wstring & dir_path )
   {
     return fs::wdirectory_iterator(fs::wpath(dir_path)) == wend_itr;
@@ -143,6 +149,9 @@
   inline DWORD get_current_directory( DWORD sz, wchar_t * buf )
     { return ::GetCurrentDirectoryW( sz, buf ); }
 
+ inline bool set_current_directory( const wchar_t * buf )
+ { return ::SetCurrentDirectoryW( buf ) != 0 ; }
+
   inline bool get_free_disk_space( const std::wstring & ph,
     PULARGE_INTEGER avail, PULARGE_INTEGER total, PULARGE_INTEGER free )
     { return ::GetDiskFreeSpaceExW( ph.c_str(), avail, total, free ) != 0; }
@@ -178,7 +187,7 @@
     DWORD attr( get_file_attributes( ph.c_str() ) );
     if ( attr == 0xFFFFFFFF )
     {
- ec = error_code( ::GetLastError(), native_ecat );
+ ec = error_code( ::GetLastError(), system_category );
       if ((ec.value() == ERROR_FILE_NOT_FOUND)
         || (ec.value() == ERROR_PATH_NOT_FOUND)
         || (ec.value() == ERROR_INVALID_NAME) // "tools/jam/src/:sys:stat.h", "//foo"
@@ -206,7 +215,7 @@
   {
     WIN32_FILE_ATTRIBUTE_DATA fad;
     if ( get_file_attributes_ex( ph.c_str(), fad ) == 0 )
- return std::make_pair( error_code( ::GetLastError(), native_ecat ), false );
+ return std::make_pair( error_code( ::GetLastError(), system_category ), false );
     return std::make_pair( error_code(),
       ( fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
         ? is_empty_directory( ph )
@@ -276,14 +285,14 @@
         { return std::make_pair( error_code(), false ); }
       assert( p1.handle == INVALID_HANDLE_VALUE
         && p2.handle == INVALID_HANDLE_VALUE );
- { return std::make_pair( error_code( error1, errno_ecat), false ); }
+ { return std::make_pair( error_code( error1, system_category), false ); }
     }
     // at this point, both handles are known to be valid
     BY_HANDLE_FILE_INFORMATION info1, info2;
     if ( !::GetFileInformationByHandle( p1.handle, &info1 ) )
- { return std::make_pair( error_code( ::GetLastError(), native_ecat ), false ); }
+ { return std::make_pair( error_code( ::GetLastError(), system_category ), false ); }
     if ( !::GetFileInformationByHandle( p2.handle, &info2 ) )
- { return std::make_pair( error_code( ::GetLastError(), native_ecat ), false ); }
+ { return std::make_pair( error_code( ::GetLastError(), system_category ), false ); }
     // In theory, volume serial numbers are sufficient to distinguish between
     // devices, but in practice VSN's are sometimes duplicated, so last write
     // time and file size are also checked.
@@ -306,9 +315,9 @@
     WIN32_FILE_ATTRIBUTE_DATA fad;
     // by now, intmax_t is 64-bits on all Windows compilers
     if ( get_file_attributes_ex( ph.c_str(), fad ) == 0 )
- return std::make_pair( error_code( ::GetLastError(), native_ecat ), 0 );
+ return std::make_pair( error_code( ::GetLastError(), system_category ), 0 );
     if ( (fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) !=0 )
- return std::make_pair( error_code( ERROR_FILE_NOT_FOUND, native_ecat), 0 );
+ return std::make_pair( error_code( ERROR_FILE_NOT_FOUND, system_category), 0 );
     return std::make_pair( error_code(),
       (static_cast<boost::uintmax_t>(fad.nFileSizeHigh)
         << (sizeof(fad.nFileSizeLow)*8))
@@ -340,7 +349,7 @@
     }
     else
     {
- result.first = error_code( ::GetLastError(), native_ecat );
+ result.first = error_code( ::GetLastError(), system_category );
       result.second.capacity = result.second.free
         = result.second.available = 0;
     }
@@ -361,11 +370,22 @@
     typedef typename String::value_type value_type;
     boost::scoped_array<value_type> buf( new value_type[sz] );
     if ( get_current_directory( sz, buf.get() ) == 0 )
- return error_code( ::GetLastError(), native_ecat );
+ return error_code( ::GetLastError(), system_category );
     ph = buf.get();
     return error_code();
   }
 
+ inline bool set_current_directory( const char * buf )
+ { return ::SetCurrentDirectoryA( buf ) != 0; }
+
+ template< class String >
+ error_code
+ set_current_path_template( const String & ph )
+ {
+ return error_code( set_current_directory( ph.c_str() )
+ ? 0 : ::GetLastError(), system_category );
+ }
+
   inline std::size_t get_full_path_name(
     const std::string & ph, std::size_t len, char * buf, char ** p )
   {
@@ -384,13 +404,13 @@
     typename String::value_type * pfn;
     std::size_t len = get_full_path_name( ph,
       buf_size , buf, &pfn );
- if ( len == 0 ) return error_code( ::GetLastError(), native_ecat );
+ if ( len == 0 ) return error_code( ::GetLastError(), system_category );
     if ( len > buf_size )
     {
       typedef typename String::value_type value_type;
       boost::scoped_array<value_type> big_buf( new value_type[len] );
       if ( (len=get_full_path_name( ph, len , big_buf.get(), &pfn ))
- == 0 ) return error_code( ::GetLastError(), native_ecat );
+ == 0 ) return error_code( ::GetLastError(), system_category );
       big_buf[len] = '\0';
       target = big_buf.get();
       return error_code();
@@ -409,9 +429,9 @@
         FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
         OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0 ) );
     if ( hw.handle == INVALID_HANDLE_VALUE )
- return error_code( ::GetLastError(), native_ecat );
+ return error_code( ::GetLastError(), system_category );
     return error_code( ::GetFileTime( hw.handle, 0, 0, &last_write_time ) != 0
- ? 0 : ::GetLastError(), native_ecat );
+ ? 0 : ::GetLastError(), system_category );
   }
 
   template<class String>
@@ -423,9 +443,9 @@
         FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
         OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0 ) );
     if ( hw.handle == INVALID_HANDLE_VALUE )
- return error_code( ::GetLastError(), native_ecat );
+ return error_code( ::GetLastError(), system_category );
     return error_code( ::SetFileTime( hw.handle, 0, 0, &last_write_time ) != 0
- ? 0 : ::GetLastError(), native_ecat );
+ ? 0 : ::GetLastError(), system_category );
   }
 
   // these constants come from inspecting some Microsoft sample code
@@ -490,11 +510,11 @@
     if ( fs::is_directory( sf ) )
     {
       if ( !remove_directory( ph ) )
- return error_code(::GetLastError(), native_ecat);
+ return error_code(::GetLastError(), system_category);
     }
     else
     {
- if ( !delete_file( ph ) ) return error_code(::GetLastError(), native_ecat);
+ if ( !delete_file( ph ) ) return error_code(::GetLastError(), system_category);
     }
     return error_code();
   }
@@ -508,7 +528,7 @@
   {
     error_code error, dummy;
     if ( create_directory( dir_ph ) ) return std::make_pair( error, true );
- error = error_code( ::GetLastError(), native_ecat );
+ error = error_code( ::GetLastError(), system_category );
     // an error here may simply mean the postcondition is already met
     if ( error.value() == ERROR_ALREADY_EXISTS
       && fs::is_directory( fs::detail::status_api( dir_ph, dummy ) ) )
@@ -529,7 +549,7 @@
     const String & from_ph )
   {
     return error_code( create_hard_link( to_ph.c_str(), from_ph.c_str() )
- ? 0 : ::GetLastError(), native_ecat );
+ ? 0 : ::GetLastError(), system_category );
   }
 #endif
 
@@ -548,9 +568,9 @@
       BOOST_FILESYSTEM_DECL error_code not_found_error()
       {
 # ifdef BOOST_WINDOWS_API
- return error_code(ERROR_PATH_NOT_FOUND, native_ecat);
+ return error_code(ERROR_PATH_NOT_FOUND, system_category);
 # else
- return error_code(ENOENT, errno_ecat);
+ return error_code(ENOENT, system_category);
 # endif
       }
 
@@ -601,6 +621,11 @@
       get_current_path_api( std::wstring & ph )
         { return get_current_path_template( ph ); }
 
+ BOOST_FILESYSTEM_DECL
+ error_code
+ set_current_path_api( const std::wstring & ph )
+ { return set_current_path_template( ph ); }
+
       BOOST_FILESYSTEM_DECL error_code
         get_full_path_name_api( const std::wstring & ph, std::wstring & target )
          { return get_full_path_name_template( ph, target ); }
@@ -627,7 +652,7 @@
       BOOST_FILESYSTEM_DECL error_code
       create_symlink_api( const std::wstring & to_ph,
         const std::wstring & from_ph )
- { return error_code( ERROR_NOT_SUPPORTED, native_ecat ); }
+ { return error_code( ERROR_NOT_SUPPORTED, system_category ); }
 
       BOOST_FILESYSTEM_DECL error_code
       remove_api( const std::wstring & ph ) { return remove_template( ph ); }
@@ -636,14 +661,14 @@
       rename_api( const std::wstring & from, const std::wstring & to )
       {
         return error_code( ::MoveFileW( from.c_str(), to.c_str() )
- ? 0 : ::GetLastError(), native_ecat );
+ ? 0 : ::GetLastError(), system_category );
       }
 
       BOOST_FILESYSTEM_DECL error_code
       copy_file_api( const std::wstring & from, const std::wstring & to )
       {
         return error_code( ::CopyFileW( from.c_str(), to.c_str(), /*fail_if_exists=*/true )
- ? 0 : ::GetLastError(), native_ecat );
+ ? 0 : ::GetLastError(), system_category );
       }
 
       BOOST_FILESYSTEM_DECL bool create_file_api( const std::wstring & ph,
@@ -719,7 +744,7 @@
         {
           handle = 0;
           return error_code( ::GetLastError() == ERROR_FILE_NOT_FOUND
- ? 0 : ::GetLastError(), native_ecat );
+ ? 0 : ::GetLastError(), system_category );
         }
         target = data.cFileName;
         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
@@ -737,7 +762,7 @@
         {
           int error = ::GetLastError();
           dir_itr_close( handle );
- return error_code( error == ERROR_NO_MORE_FILES ? 0 : error, native_ecat );
+ return error_code( error == ERROR_NO_MORE_FILES ? 0 : error, system_category );
         }
         target = data.cFileName;
         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
@@ -774,6 +799,11 @@
       get_current_path_api( std::string & ph )
         { return get_current_path_template( ph ); }
 
+ BOOST_FILESYSTEM_DECL
+ error_code
+ set_current_path_api( const std::string & ph )
+ { return set_current_path_template( ph ); }
+
       BOOST_FILESYSTEM_DECL error_code
         get_full_path_name_api( const std::string & ph, std::string & target )
          { return get_full_path_name_template( ph, target ); }
@@ -802,7 +832,7 @@
       BOOST_FILESYSTEM_DECL error_code
       create_symlink_api( const std::string & to_ph,
         const std::string & from_ph )
- { return error_code( ERROR_NOT_SUPPORTED, native_ecat ); }
+ { return error_code( ERROR_NOT_SUPPORTED, system_category ); }
 
       BOOST_FILESYSTEM_DECL error_code
       remove_api( const std::string & ph ) { return remove_template( ph ); }
@@ -811,14 +841,14 @@
       rename_api( const std::string & from, const std::string & to )
       {
         return error_code( ::MoveFileA( from.c_str(), to.c_str() )
- ? 0 : ::GetLastError(), native_ecat );
+ ? 0 : ::GetLastError(), system_category );
       }
 
       BOOST_FILESYSTEM_DECL error_code
       copy_file_api( const std::string & from, const std::string & to )
       {
         return error_code( ::CopyFileA( from.c_str(), to.c_str(), /*fail_if_exists=*/true )
- ? 0 : ::GetLastError(), native_ecat );
+ ? 0 : ::GetLastError(), system_category );
       }
 
       BOOST_FILESYSTEM_DECL error_code
@@ -840,7 +870,7 @@
         {
           handle = 0;
           return error_code( ::GetLastError() == ERROR_FILE_NOT_FOUND
- ? 0 : ::GetLastError(), native_ecat );
+ ? 0 : ::GetLastError(), system_category );
         }
         target = data.cFileName;
         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
@@ -856,7 +886,7 @@
         {
           bool ok = ::FindClose( handle ) != 0;
           handle = 0;
- return error_code( ok ? 0 : ::GetLastError(), native_ecat );
+ return error_code( ok ? 0 : ::GetLastError(), system_category );
         }
         return error_code();
       }
@@ -870,7 +900,7 @@
         {
           int error = ::GetLastError();
           dir_itr_close( handle );
- return error_code( error == ERROR_NO_MORE_FILES ? 0 : error, native_ecat );
+ return error_code( error == ERROR_NO_MORE_FILES ? 0 : error, system_category );
         }
         target = data.cFileName;
         if ( data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY )
@@ -892,7 +922,7 @@
             ec = error_code();
             return fs::file_status( fs::file_not_found );
           }
- ec = error_code( errno, errno_ecat );
+ ec = error_code( errno, system_category );
           return fs::file_status( fs::status_unknown );
         }
         ec = error_code();
@@ -922,7 +952,7 @@
             ec = error_code();
             return fs::file_status( fs::file_not_found );
           }
- ec = error_code( errno, errno_ecat );
+ ec = error_code( errno, system_category );
           return fs::file_status( fs::status_unknown );
         }
         ec = error_code();
@@ -957,7 +987,7 @@
       {
         struct stat path_stat;
         if ( (::stat( ph.c_str(), &path_stat )) != 0 )
- return std::make_pair( error_code( errno, errno_ecat ), false );
+ return std::make_pair( error_code( errno, system_category ), false );
         return std::make_pair( error_code(), S_ISDIR( path_stat.st_mode )
           ? is_empty_directory( ph )
           : path_stat.st_size == 0 );
@@ -971,7 +1001,7 @@
         struct stat s1;
         int e1( ::stat( ph1.c_str(), &s1 ) );
         if ( e1 != 0 || e2 != 0 )
- return std::make_pair( error_code( e1 != 0 && e2 != 0 ? errno : 0, errno_ecat ), false );
+ return std::make_pair( error_code( e1 != 0 && e2 != 0 ? errno : 0, system_category ), false );
         // at this point, both stats are known to be valid
         return std::make_pair( error_code(),
             s1.st_dev == s2.st_dev
@@ -988,9 +1018,9 @@
       {
         struct stat path_stat;
         if ( ::stat( ph.c_str(), &path_stat ) != 0 )
- return std::make_pair( error_code( errno, errno_ecat ), 0 );
+ return std::make_pair( error_code( errno, system_category ), 0 );
         if ( !S_ISREG( path_stat.st_mode ) )
- return std::make_pair( error_code( EPERM, errno_ecat ), 0 );
+ return std::make_pair( error_code( EPERM, system_category ), 0 );
         return std::make_pair( error_code(),
           static_cast<boost::uintmax_t>(path_stat.st_size) );
       }
@@ -1002,7 +1032,7 @@
         space_pair result;
         if ( ::BOOST_STATVFS( ph.c_str(), &vfs ) != 0 )
         {
- result.first = error_code( errno, errno_ecat );
+ result.first = error_code( errno, system_category );
           result.second.capacity = result.second.free
             = result.second.available = 0;
         }
@@ -1024,7 +1054,7 @@
       {
         struct stat path_stat;
         if ( ::stat( ph.c_str(), &path_stat ) != 0 )
- return std::make_pair( error_code( errno, errno_ecat ), 0 );
+ return std::make_pair( error_code( errno, system_category ), 0 );
         return std::make_pair( error_code(), path_stat.st_mtime );
       }
 
@@ -1033,11 +1063,11 @@
       {
         struct stat path_stat;
         if ( ::stat( ph.c_str(), &path_stat ) != 0 )
- return error_code( errno, errno_ecat );
+ return error_code( errno, system_category );
         ::utimbuf buf;
         buf.actime = path_stat.st_atime; // utime() updates access time too:-(
         buf.modtime = new_value;
- return error_code( ::utime( ph.c_str(), &buf ) != 0 ? errno : 0, errno_ecat );
+ return error_code( ::utime( ph.c_str(), &buf ) != 0 ? errno : 0, system_category );
       }
 
       BOOST_FILESYSTEM_DECL error_code
@@ -1054,7 +1084,7 @@
 # if defined(__MSL__) && (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
               && errno != 0
 # endif
- ) return error_code( errno, errno_ecat );
+ ) return error_code( errno, system_category );
           }
           else
           {
@@ -1065,6 +1095,13 @@
         return error_code();
       }
 
+ BOOST_FILESYSTEM_DECL error_code
+ set_current_path_api( const std::string & ph )
+ {
+ return error_code( ::chdir( ph.c_str() )
+ ? errno : 0, system_category );
+ }
+
       BOOST_FILESYSTEM_DECL fs::detail::query_pair
       create_directory_api( const std::string & ph )
       {
@@ -1074,7 +1111,7 @@
         error_code dummy;
         if ( ec != EEXIST
           || !fs::is_directory( status_api( ph, dummy ) ) )
- { return std::make_pair( error_code( ec, errno_ecat ), false ); }
+ { return std::make_pair( error_code( ec, system_category ), false ); }
         return std::make_pair( error_code(), false );
       }
 
@@ -1083,7 +1120,7 @@
           const std::string & from_ph )
       {
         return error_code( ::link( to_ph.c_str(), from_ph.c_str() ) == 0
- ? 0 : errno, errno_ecat );
+ ? 0 : errno, system_category );
       }
 
       BOOST_FILESYSTEM_DECL error_code
@@ -1091,7 +1128,7 @@
           const std::string & from_ph )
       {
         return error_code( ::symlink( to_ph.c_str(), from_ph.c_str() ) == 0
- ? 0 : errno, errno_ecat );
+ ? 0 : errno, system_category );
       }
 
       BOOST_FILESYSTEM_DECL error_code
@@ -1116,7 +1153,7 @@
           // shall fail and set errno to EEXIST or ENOTEMPTY."
           // Linux uses ENOTEMPTY, Solaris uses EEXIST.
           if ( error == EEXIST ) error = ENOTEMPTY;
- return error_code( error, errno_ecat );
+ return error_code( error, system_category );
         }
         return error_code();
       }
@@ -1127,9 +1164,9 @@
         // POSIX is too permissive so must check
         error_code dummy;
         if ( fs::exists( status_api( to, dummy ) ) )
- return error_code( EEXIST, errno_ecat );
+ return error_code( EEXIST, system_category );
         return error_code( std::rename( from.c_str(), to.c_str() ) != 0
- ? errno : 0, errno_ecat );
+ ? errno : 0, system_category );
       }
 
       BOOST_FILESYSTEM_DECL error_code
@@ -1149,7 +1186,7 @@
                                 from_stat.st_mode )) < 0 )
         {
           if ( infile >= 0 ) ::close( infile );
- return error_code( errno, errno_ecat );
+ return error_code( errno, system_category );
         }
 
         ssize_t sz, sz_read=1, sz_write;
@@ -1174,7 +1211,32 @@
         if ( ::close( infile) < 0 ) sz_read = -1;
         if ( ::close( outfile) < 0 ) sz_read = -1;
 
- return error_code( sz_read < 0 ? errno : 0, errno_ecat );
+ return error_code( sz_read < 0 ? errno : 0, system_category );
+ }
+
+ // this code is based on Stevens and Rago, Advanced Programming in the
+ // UNIX envirnment, 2nd Ed., ISBN 0-201-43307-9, page 49
+ error_code path_max( std::size_t & result )
+ {
+# ifdef PATH_MAX
+ static std::size_t max = PATH_MAX;
+# else
+ static std::size_t max = 0;
+# endif
+ if ( max == 0 )
+ {
+ errno = 0;
+ long tmp = ::pathconf( "/", _PC_NAME_MAX );
+ if ( tmp < 0 )
+ {
+ if ( errno == 0 ) // indeterminate
+ max = 4096; // guess
+ else return error_code( errno, system_category );
+ }
+ else max = static_cast<std::size_t>( tmp + 1 ); // relative root
+ }
+ result = max;
+ return error_code();
       }
 
       BOOST_FILESYSTEM_DECL error_code
@@ -1182,15 +1244,17 @@
         const std::string & dir, std::string & target,
         file_status &, file_status & )
       {
- static const std::string dummy_first_name( "." );
         if ( (handle = ::opendir( dir.c_str() )) == 0 )
- return error_code( errno, errno_ecat );
- target = dummy_first_name;
- long pc_name_max( ::pathconf( dir.c_str(), _PC_NAME_MAX ) );
- if ( pc_name_max == -1L ) return error_code( errno, errno_ecat );
+ return error_code( errno, system_category );
+ target = std::string( "." ); // string was static but caused trouble
+ // when iteration called from dtor, after
+ // static had already been destroyed
+ std::size_t path_size;
+ error_code ec = path_max( path_size );
+ if ( ec ) return ec;
         dirent de;
         buffer = std::malloc( (sizeof(dirent) - sizeof(de.d_name))
- + static_cast<std::size_t>( pc_name_max ) + 1 );
+ + path_size + 1 ); // + 1 for "/0"
         return error_code();
       }
 
@@ -1202,7 +1266,7 @@
         if ( handle == 0 ) return error_code();
         DIR * h( static_cast<DIR*>(handle) );
         handle = 0;
- return error_code( ::closedir( h ) == 0 ? 0 : errno, errno_ecat );
+ return error_code( ::closedir( h ) == 0 ? 0 : errno, system_category );
       }
 
       // warning: the only dirent member updated is d_name
@@ -1215,7 +1279,7 @@
           && defined(_POSIX_THREAD_SAFE_FUNCTIONS) \
           && defined(_SC_THREAD_SAFE_FUNCTIONS) \
           && (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0) \
- && (!defined(__HP_aCC) || (defined(__HP_aCC) && defined(_REENTRANT)))
+ && (!defined(__hpux) || (defined(__hpux) && defined(_REENTRANT)))
           if ( ::sysconf( _SC_THREAD_SAFE_FUNCTIONS ) >= 0 )
             { return ::readdir_r( dirp, entry, result ); }
     # endif
@@ -1238,7 +1302,7 @@
         dirent * result;
         int return_code;
         if ( (return_code = readdir_r_simulator( static_cast<DIR*>(handle),
- entry, &result )) != 0 ) return error_code( errno, errno_ecat );
+ entry, &result )) != 0 ) return error_code( errno, system_category );
         if ( result == 0 ) return dir_itr_close( handle, buffer );
         target = entry->d_name;
 # ifdef BOOST_FILESYSTEM_STATUS_CACHE

Modified: branches/hash/libs/filesystem/src/path.cpp
==============================================================================
--- branches/hash/libs/filesystem/src/path.cpp (original)
+++ branches/hash/libs/filesystem/src/path.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -22,6 +22,7 @@
 
 #include <locale>
 #include <boost/cerrno.hpp>
+#include <boost/system/error_code.hpp>
 
 namespace
 {
@@ -36,10 +37,16 @@
     return lc;
   }
 
- const std::codecvt<wchar_t, char, std::mbstate_t> *
- converter(
+ const std::codecvt<wchar_t, char, std::mbstate_t> *&
+ converter()
+ {
+ static const std::codecvt<wchar_t, char, std::mbstate_t> *
+ cvtr(
        &std::use_facet<std::codecvt<wchar_t, char, std::mbstate_t> >
         ( loc() ) );
+ return cvtr;
+ }
+
   bool locked(false);
 } // unnamed namespace
 
@@ -52,7 +59,7 @@
       if ( locked ) return false;
       locked = true;
       loc() = new_loc;
- converter = &std::use_facet
+ converter() = &std::use_facet
         <std::codecvt<wchar_t, char, std::mbstate_t> >( loc() );
       return true;
     }
@@ -62,9 +69,42 @@
       if ( locked ) boost::throw_exception(
         wfilesystem_error(
           "boost::filesystem::wpath_traits::imbue() after lockdown",
- system::error_code(EOTHER, system::errno_ecat) ) );
+ system::make_error_code( system::posix::not_supported ) ) );
       imbue( new_loc, std::nothrow );
     }
+
+ //namespace detail
+ //{
+ // BOOST_FILESYSTEM_DECL
+ // const char * what( const char * sys_err_what,
+ // const path & path1, const path & path2, std::string & target)
+ // {
+ // try
+ // {
+ // if ( target.empty() )
+ // {
+ // target = sys_err_what;
+ // if ( !path1.empty() )
+ // {
+ // target += ": \"";
+ // target += path1.file_string();
+ // target += "\"";
+ // }
+ // if ( !path2.empty() )
+ // {
+ // target += ", \"";
+ // target += path2.file_string();
+ // target += "\"";
+ // }
+ // }
+ // return target.c_str();
+ // }
+ // catch (...)
+ // {
+ // return sys_err_what;
+ // }
+ // }
+ //}
     
 # ifdef BOOST_POSIX_API
 
@@ -76,17 +116,17 @@
       const internal_string_type & src )
     {
       locked = true;
- std::size_t work_size( converter->max_length() * (src.size()+1) );
+ std::size_t work_size( converter()->max_length() * (src.size()+1) );
       boost::scoped_array<char> work( new char[ work_size ] );
       std::mbstate_t state;
       const internal_string_type::value_type * from_next;
       external_string_type::value_type * to_next;
- if ( converter->out(
+ if ( converter()->out(
         state, src.c_str(), src.c_str()+src.size(), from_next, work.get(),
         work.get()+work_size, to_next ) != std::codecvt_base::ok )
         boost::throw_exception( boost::filesystem::wfilesystem_error(
           "boost::filesystem::wpath::to_external conversion error",
- ph, system::error_code( EINVAL, system::errno_ecat ) ) );
+ ph, system::error_code( system::posix::invalid_argument, system::system_category ) ) );
       *to_next = '\0';
       return external_string_type( work.get() );
     }
@@ -100,12 +140,12 @@
       std::mbstate_t state;
       const external_string_type::value_type * from_next;
       internal_string_type::value_type * to_next;
- if ( converter->in(
+ if ( converter()->in(
         state, src.c_str(), src.c_str()+src.size(), from_next, work.get(),
         work.get()+work_size, to_next ) != std::codecvt_base::ok )
         boost::throw_exception( boost::filesystem::wfilesystem_error(
           "boost::filesystem::wpath::to_internal conversion error",
- system::error_code( EINVAL, system::errno_ecat ) ) );
+ system::error_code( system::posix::invalid_argument, system::system_category ) ) );
       *to_next = L'\0';
       return internal_string_type( work.get() );
     }

Modified: branches/hash/libs/filesystem/test/Jamfile.v2
==============================================================================
--- branches/hash/libs/filesystem/test/Jamfile.v2 (original)
+++ branches/hash/libs/filesystem/test/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -8,6 +8,7 @@
     : requirements
       <library>/boost/filesystem//boost_filesystem
       <define>BOOST_ALL_NO_LIB
+ <toolset>msvc:<asynch-exceptions>on
     ;
 
    test-suite "filesystem" :
@@ -16,7 +17,7 @@
                  <runtime-link>static <link>static
        ]
        [ run path_test.cpp ../../system/build
- : : : <define>BOOST_FILESYSTEM_DYN_LINK
+ : : : <define>BOOST_FILESYSTEM_DYN_LINK <define>BOOST_SYSTEM_DYN_LINK
                : path_test_dll
        ]
        [ run operations_test.cpp
@@ -24,7 +25,7 @@
                   <runtime-link>static <link>static
        ]
        [ run operations_test.cpp ../../system/build
- : : : <define>BOOST_FILESYSTEM_DYN_LINK
+ : : : <define>BOOST_FILESYSTEM_DYN_LINK <define>BOOST_SYSTEM_DYN_LINK
          : operations_test_dll
        ]
        [ run fstream_test.cpp

Modified: branches/hash/libs/filesystem/test/convenience_test.cpp
==============================================================================
--- branches/hash/libs/filesystem/test/convenience_test.cpp (original)
+++ branches/hash/libs/filesystem/test/convenience_test.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -18,6 +18,7 @@
 #include <boost/filesystem/convenience.hpp>
 namespace fs = boost::filesystem;
 using fs::path;
+namespace sys = boost::system;
 
 #include <boost/test/minimal.hpp>
 #include <boost/bind.hpp>
@@ -45,7 +46,15 @@
     }
     return false;
   }
+
+ void create_recursive_iterator( const fs::path & ph )
+ {
+ fs::recursive_directory_iterator it( ph );
+ }
 }
+
+// --------------------------------------------------------------------------//
+
 int test_main( int, char*[] )
 {
   path::default_name_check( fs::no_check ); // names below not valid on all O/S's
@@ -63,13 +72,13 @@
   BOOST_CHECK( fs::exists( "xx" ) );
   BOOST_CHECK( fs::is_directory( "xx" ) );
 
- BOOST_CHECK( fs::create_directories( "xx/ww/zz" ) );
+ BOOST_CHECK( fs::create_directories( "xx/yy/zz" ) );
   BOOST_CHECK( fs::exists( "xx" ) );
- BOOST_CHECK( fs::exists( "xx/ww" ) );
- BOOST_CHECK( fs::exists( "xx/ww/zz" ) );
+ BOOST_CHECK( fs::exists( "xx/yy" ) );
+ BOOST_CHECK( fs::exists( "xx/yy/zz" ) );
   BOOST_CHECK( fs::is_directory( "xx" ) );
- BOOST_CHECK( fs::is_directory( "xx/ww" ) );
- BOOST_CHECK( fs::is_directory( "xx/ww/zz" ) );
+ BOOST_CHECK( fs::is_directory( "xx/yy" ) );
+ BOOST_CHECK( fs::is_directory( "xx/yy/zz" ) );
 
   path is_a_file( "xx/uu" );
   {
@@ -109,5 +118,82 @@
   // see the rationale in html docs for explanation why this works
   BOOST_CHECK( fs::change_extension("", ".png").string() == ".png" );
 
+// recursive_directory_iterator tests ----------------------------------------//
+
+ sys::error_code ec;
+ fs::recursive_directory_iterator it( "/no-such-path", ec );
+ BOOST_CHECK( ec );
+ BOOST_CHECK( throws_fs_error(
+ boost::bind( create_recursive_iterator, "/no-such-path" ) ) );
+
+ fs::remove( "xx/uu" );
+
+#ifdef BOOST_WINDOWS_API
+ // These tests depends on ordering of directory entries, and that's guaranteed
+ // on Windows but not necessarily on other operating systems
+ {
+ std::ofstream f( "xx/yya" );
+ BOOST_CHECK( !!f );
+ }
+
+ for ( it = fs::recursive_directory_iterator( "xx" );
+ it != fs::recursive_directory_iterator(); ++it )
+ { std::cout << *it << '\n'; }
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_CHECK( it->path() == "xx/yy" );
+ BOOST_CHECK( it.level() == 0 );
+ ++it;
+ BOOST_CHECK( it->path() == "xx/yy/zz" );
+ BOOST_CHECK( it.level() == 1 );
+ it.pop();
+ BOOST_CHECK( it->path() == "xx/yya" );
+ BOOST_CHECK( it.level() == 0 );
+ it++;
+ BOOST_CHECK( it == fs::recursive_directory_iterator() );
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_CHECK( it->path() == "xx/yy" );
+ it.no_push();
+ ++it;
+ BOOST_CHECK( it->path() == "xx/yya" );
+ ++it;
+ BOOST_CHECK( it == fs::recursive_directory_iterator() );
+
+ fs::remove( "xx/yya" );
+#endif
+
+ it = fs::recursive_directory_iterator( "xx/yy/zz" );
+ BOOST_CHECK( it == fs::recursive_directory_iterator() );
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_CHECK( it->path() == "xx/yy" );
+ BOOST_CHECK( it.level() == 0 );
+ ++it;
+ BOOST_CHECK( it->path() == "xx/yy/zz" );
+ BOOST_CHECK( it.level() == 1 );
+ it++;
+ BOOST_CHECK( it == fs::recursive_directory_iterator() );
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_CHECK( it->path() == "xx/yy" );
+ it.no_push();
+ ++it;
+ BOOST_CHECK( it == fs::recursive_directory_iterator() );
+
+ it = fs::recursive_directory_iterator( "xx" );
+ BOOST_CHECK( it->path() == "xx/yy" );
+ ++it;
+ it.pop();
+ BOOST_CHECK( it == fs::recursive_directory_iterator() );
+
+
+
+ // nothrow wrong. see imp. Make sure failed basic_directory_iterator
+ // ctor creates the end iterator.
+
+
+
+
   return 0;
 }

Modified: branches/hash/libs/filesystem/test/operations_test.cpp
==============================================================================
--- branches/hash/libs/filesystem/test/operations_test.cpp (original)
+++ branches/hash/libs/filesystem/test/operations_test.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -16,7 +16,7 @@
 
 #include <boost/filesystem/operations.hpp>
 #include <boost/filesystem/convenience.hpp>
-#include <boost/filesystem/cerrno.hpp>
+#include <boost/cerrno.hpp>
 namespace fs = boost::filesystem;
 
 #include <boost/config.hpp>
@@ -26,7 +26,7 @@
 
 using boost::bind;
 using boost::system::error_code;
-using boost::system::errno_ecat;
+using boost::system::system_category;
 using boost::system::system_error;
 
 #include <fstream>
@@ -71,7 +71,7 @@
     std::ofstream f( ph.file_string().c_str() );
     if ( !f )
       throw fs::filesystem_error( "operations_test create_file",
- ph, error_code(errno, errno_ecat) );
+ ph, error_code(errno, system_category) );
     if ( !contents.empty() ) f << contents;
   }
 
@@ -80,7 +80,7 @@
     std::ifstream f( ph.file_string().c_str() );
     if ( !f )
       throw fs::filesystem_error( "operations_test verify_file",
- ph, error_code(errno, errno_ecat) );
+ ph, error_code(errno, system_category) );
     std::string contents;
     f >> contents;
     if ( contents != expected )
@@ -101,10 +101,10 @@
         std::cout << "\n" << ex.what() << "\n";
       }
       if ( en == 0
- || en == ex.code().to_errno() ) return true;
+ || en == ex.code().default_error_condition().value() ) return true;
       std::cout
         << "\nWarning: line " << line
- << " exception reports iso() " << ex.code().to_errno()
+ << " exception reports default_error_condition().value() " << ex.code().default_error_condition().value()
         << ", should be " << en
         << "\n value() is " << ex.code().value()
         << std::endl;
@@ -160,7 +160,7 @@
       if ( report_throws ) std::cout << x.what() << std::endl;
       if ( platform == "Windows" )
         BOOST_CHECK( std::strcmp( x.what(),
- "boost::filesystem::create_directory: The system cannot find the path specified." ) == 0 );
+ "boost::filesystem::create_directory: The system cannot find the path specified" ) == 0 );
     }
     BOOST_CHECK( exception_thrown );
 
@@ -176,8 +176,12 @@
       if ( platform == "Windows" )
       {
         bool ok ( std::strcmp( x.what(),
- "boost::filesystem::create_directory: The system cannot find the path specified.: \"no-such-dir\\foo\\bar\"" ) == 0 );
+ "boost::filesystem::create_directory: The system cannot find the path specified: \"no-such-dir\\foo\\bar\"" ) == 0 );
         BOOST_CHECK( ok );
+ if ( !ok )
+ {
+ std::cout << "what returns \"" << x.what() << "\"" << std::endl;
+ }
       }
     }
     BOOST_CHECK( exception_thrown );
@@ -194,8 +198,12 @@
       if ( platform == "Windows" )
       {
         bool ok ( std::strcmp( x.what(),
- "boost::filesystem::create_directory: The system cannot find the path specified.: \"no-such-dir\\foo\\bar\"" ) == 0 );
+ "boost::filesystem::create_directory: The system cannot find the path specified: \"no-such-dir\\foo\\bar\"" ) == 0 );
         BOOST_CHECK( ok );
+ if ( !ok )
+ {
+ std::cout << "what returns \"" << x.what() << "\"" << std::endl;
+ }
       }
     }
     BOOST_CHECK( exception_thrown );
@@ -222,7 +230,7 @@
                ? "Windows"
                : "POSIX";
 # endif
- std::cout << "API is " << platform << '\n';
+ std::cout << "API is " << platform << std::endl;
 
   exception_tests();
 
@@ -325,26 +333,12 @@
   {
     BOOST_CHECK( ex.path1().string() == " no-way, Jose" );
   }
-
- BOOST_CHECK( fs::create_directory( dir ) );
-
   // several functions give unreasonable results if uintmax_t isn't 64-bits
   std::cout << "sizeof(boost::uintmax_t) = " << sizeof(boost::uintmax_t) << '\n';
   BOOST_CHECK( sizeof( boost::uintmax_t ) >= 8 );
 
- // make some reasonable assuptions for testing purposes
- fs::space_info spi( fs::space( dir ) );
- BOOST_CHECK( spi.capacity > 1000000 );
- BOOST_CHECK( spi.free > 1000 );
- BOOST_CHECK( spi.capacity > spi.free );
- BOOST_CHECK( spi.free >= spi.available );
-
- // it is convenient to display space, but older VC++ versions choke
-# if !defined(BOOST_MSVC) || _MSC_VER >= 1300 // 1300 == VC++ 7.0
- std::cout << " capacity = " << spi.capacity << '\n';
- std::cout << " free = " << spi.free << '\n';
- std::cout << "available = " << spi.available << '\n';
-# endif
+ // create a directory, then check it for consistency
+ BOOST_CHECK( fs::create_directory( dir ) );
 
   BOOST_CHECK( fs::exists( dir ) );
   BOOST_CHECK( BOOST_FS_IS_EMPTY( dir ) );
@@ -359,6 +353,30 @@
   BOOST_CHECK( !fs::is_other( stat ) );
   BOOST_CHECK( !fs::is_symlink( stat ) );
 
+ // set the current directory, then check it for consistency
+ fs::path original_dir = fs::current_path<fs::path>();
+ BOOST_CHECK( dir != original_dir );
+ fs::current_path( dir );
+ BOOST_CHECK( fs::current_path<fs::path>() == dir );
+ BOOST_CHECK( fs::current_path<fs::path>() != original_dir );
+ fs::current_path( original_dir );
+ BOOST_CHECK( fs::current_path<fs::path>() == original_dir );
+ BOOST_CHECK( fs::current_path<fs::path>() != dir );
+
+ // make some reasonable assuptions for testing purposes
+ fs::space_info spi( fs::space( dir ) );
+ BOOST_CHECK( spi.capacity > 1000000 );
+ BOOST_CHECK( spi.free > 1000 );
+ BOOST_CHECK( spi.capacity > spi.free );
+ BOOST_CHECK( spi.free >= spi.available );
+
+ // it is convenient to display space, but older VC++ versions choke
+# if !defined(BOOST_MSVC) || _MSC_VER >= 1300 // 1300 == VC++ 7.0
+ std::cout << " capacity = " << spi.capacity << '\n';
+ std::cout << " free = " << spi.free << '\n';
+ std::cout << "available = " << spi.available << '\n';
+# endif
+
   if ( platform == "Windows" )
     BOOST_CHECK( CHECK_EXCEPTION( bind( BOOST_BND(fs::file_size), dir ),
       ENOENT ) );

Modified: branches/hash/libs/filesystem/test/path_test.cpp
==============================================================================
--- branches/hash/libs/filesystem/test/path_test.cpp (original)
+++ branches/hash/libs/filesystem/test/path_test.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -180,7 +180,7 @@
   void exception_tests()
   {
     const std::string str_1("string-1");
- boost::system::error_code ec( 12345, boost::system::errno_ecat);
+ boost::system::error_code ec( 12345, boost::system::system_category);
     try { throw fs::filesystem_error( str_1, ec ); }
     catch ( const fs::filesystem_error & ex )
     {

Modified: branches/hash/libs/graph/test/Jamfile.v2
==============================================================================
--- branches/hash/libs/graph/test/Jamfile.v2 (original)
+++ branches/hash/libs/graph/test/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -105,7 +105,7 @@
 
     [ run kolmogorov_max_flow_test.cpp ]
 
- [ run cycle_ratio_tests.cpp ../build//boost_graph ]
+ [ run cycle_ratio_tests.cpp ../build//boost_graph : cycle_ratio_s382.90.dot ]
 
     [ run basic_planarity_test.cpp ]
 

Modified: branches/hash/libs/graph/test/cycle_ratio_tests.cpp
==============================================================================
--- branches/hash/libs/graph/test/cycle_ratio_tests.cpp (original)
+++ branches/hash/libs/graph/test/cycle_ratio_tests.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -180,6 +180,9 @@
 
 int test_main(int argc, char* argv[])
 {
+ std::string input_file = "cycle_ratio_s382.90.dot";
+ if (argc > 1) input_file = argv[1];
+
         const double epsilon = 0.00000001;
         double min_cr, max_cr; ///Minimum and maximum cycle ratio
         typedef std::vector<graph_traits<GraphInt>::edge_descriptor> ccInt_t;
@@ -236,7 +239,7 @@
         std::cout << '\n';
         tg.clear();
 
- /**/read_data("cycle_ratio_s382.90.dot", tg);
+ /**/read_data(input_file.c_str(), tg);
         min_cr = minimum_cycle_ratio(tg, vim, ew1m, ew2m, get(edge_index,tg), &cc, 2);
         std::cout << "Minimum cycle ratio is " << min_cr << "\n";
         BOOST_CHECK(std::abs(min_cr - 0.33333333333) < epsilon );

Modified: branches/hash/libs/intrusive/doc/intrusive.qbk
==============================================================================
--- branches/hash/libs/intrusive/doc/intrusive.qbk (original)
+++ branches/hash/libs/intrusive/doc/intrusive.qbk 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -2513,7 +2513,7 @@
 * [*Joaquín M. López Muñoz] for his thorough review, help, and ideas.
 
 * [*Cory Nelson], [*Daniel James], [*Dave Harris], [*Guillaume Melquiond],
- [*Henri Bavestrello], [*Hervé Brönnimann], [*Kai Brüning], [*Kevin Sopp]
+ [*Henri Bavestrello], [*Hervé Brönnimann], [*Kai Brüning], [*Kevin Sopp],
    [*Paul Rose], [*Pavel Vozelinek], [*Howard Hinnant], [*Olaf Krzikalla],
    [*Samuel Debionne], [*Stjepan Rajko], [*Thorsten Ottosen], [*Tobias Schwinger],
    [*Tom Brinkman] and [*Steven Watanabe]

Modified: branches/hash/libs/mpi/src/communicator.cpp
==============================================================================
--- branches/hash/libs/mpi/src/communicator.cpp (original)
+++ branches/hash/libs/mpi/src/communicator.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -15,7 +15,7 @@
 /***************************************************************************
  * status *
  ***************************************************************************/
-bool status::cancelled()
+bool status::cancelled() const
 {
   int flag = 0;
   BOOST_MPI_CHECK_RESULT(MPI_Test_cancelled, (&m_status, &flag));

Modified: branches/hash/libs/numeric/ublas/doc/overview.htm
==============================================================================
--- branches/hash/libs/numeric/ublas/doc/overview.htm (original)
+++ branches/hash/libs/numeric/ublas/doc/overview.htm 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -305,7 +305,7 @@
 <tr>
 <td><code>i_amax</code></td>
 <td><code>norm_inf (x)<br />
-norm_inf_index (x)</code></td>
+index_norm_inf (x)</code></td>
 <td><em>max |x</em><sub><em>i</em></sub><em>|</em></td>
 <td>Computes the <em>l<sub>2</sub></em> (maximum) norm of a vector.<br />
 BLAS computes the index of the first element having this

Modified: branches/hash/libs/python/build/Jamfile.v2
==============================================================================
--- branches/hash/libs/python/build/Jamfile.v2 (original)
+++ branches/hash/libs/python/build/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -45,6 +45,7 @@
     wrapper.cpp
     import.cpp
     exec.cpp
+ object/function_doc_signature.cpp
     : # requirements
         <link>static:<define>BOOST_PYTHON_STATIC_LIB
         <define>BOOST_PYTHON_SOURCE

Modified: branches/hash/libs/python/doc/news.html
==============================================================================
--- branches/hash/libs/python/doc/news.html (original)
+++ branches/hash/libs/python/doc/news.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -32,7 +32,43 @@
   <hr>
 
   <dl class="page-index">
- <dt>Current CVS</dt>
+ <dt>Current SVN</dt>
+
+ <dd>
+ <ul>
+ <li>Pythonic signatures are now automatically appended to the
+ docstrings.
+
+ <li>Use <a href="v2/docstring_options.html"
+ ><code>docstring_options.hpp</code></a> header
+ control the content of docstrings.
+
+ <li>This new feature increases the size of the modules by about 14%.
+ If this is not acceptable it can be turned off by defining the macro
+ BOOST_PYTHON_NO_PY_SIGNATURES. Modules compiled with and without the macro
+ defined are compatible.
+ </li>
+ <li> If BOOST_PYTHON_NO_PY_SIGNATURES is undefined, this version defines the
+ macro BOOST_PYTHON_SUPPORTS_PY_SIGNATURES. This allows writing code that will compile
+ with older version of Boost.Python (see here).
+ </li>
+ <li>By defining BOOST_PYTHON_PY_SIGNATURES_PROPER_INIT_SELF_TYPE, and at a cost
+ of another 14% size increase, proper pythonic type is generated for the "self"
+ parameter of the __init__ methods.
+ </li>
+
+ <li> To support this new feature changes were made to the
+ to_python_converter.hpp,
+ default_call_policies,
+ ResultConverter,
+ CallPolicies and some others.
+ Efforts were made not to have interface breaking changes.
+ </li>
+
+ </ul>
+ </dd>
+
+ <dt>12 May 2007 - 1.34.0 release</dt>
 
     <dd>
       <ul>

Modified: branches/hash/libs/python/doc/v2/CallPolicies.html
==============================================================================
--- branches/hash/libs/python/doc/v2/CallPolicies.html (original)
+++ branches/hash/libs/python/doc/v2/CallPolicies.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -8,7 +8,7 @@
     <meta name="generator" content=
     "HTML Tidy for Windows (vers 1st August 2002), see www.w3.org">
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <link rel="stylesheet" type="text/css" href=../../../../boost.css>
+ <link rel="stylesheet" type="text/css" href="../../../../boost.css">
 
     <title>Boost.Python - CallPolicies Concept</title>
   </head>
@@ -60,6 +60,7 @@
 
       <li><code>postcall</code> - Python argument tuple and result management
       after the wrapped object is invoked</li>
+ <li><code>extract_return_type</code> - metafunction for extracting the return type from a given signature type sequence</li>
     </ol>
 
     <h2><a name="composition"></a>CallPolicies Composition</h2>
@@ -132,7 +133,16 @@
         reference count must be decremented; if another existing object is
         returned, its reference count must be incremented.</td>
       </tr>
- </table>
+ <tr>
+ <td valign="top"><code>P::extract_return_type</code></td>
+
+ <td>A model of <a href=
+ "../../../doc/refmanual/metafunction.html">Metafunction</a>.</td>
+
+ <td>An MPL unary <a href=
+ "../../../mpl/doc/refmanual/metafunction.html">Metafunction</a> used extract the return type from a given signature. By default it is derived from mpl::front.</td>
+ </tr>
+ </table>
     Models of CallPolicies are required to be <a href=
     "../../../utility/CopyConstructible.html">CopyConstructible</a>.
     <hr>

Modified: branches/hash/libs/python/doc/v2/ResultConverter.html
==============================================================================
--- branches/hash/libs/python/doc/v2/ResultConverter.html (original)
+++ branches/hash/libs/python/doc/v2/ResultConverter.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1,10 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
 <!-- Copyright David Abrahams 2006. Distributed under the Boost -->
 <!-- Software License, Version 1.0. (See accompanying -->
 <!-- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -->
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" type="text/css" href=../../../../boost.css>
+<link rel="stylesheet" type="text/css" href="../../../../boost.css">
 <title>Boost.Python - ResultConverter Concept</title>
 </head>
 <body link="#0000ff" vlink="#800080">
@@ -24,10 +26,12 @@
 <dl class="page-index">
   <dt>Introduction</dt>
   <dt>Concept Requirements</dt>
- <dl class="page-index">
- <dt>ResultConverter Concept</dt>
- <dt>ResultConverterGenerator Concept</dt>
- </dl>
+ <dd>
+ <dl class="page-index">
+ <dt>ResultConverter Concept</dt>
+ <dt>ResultConverterGenerator Concept</dt>
+ </dl>
+ </dd>
 </dl>
 
 <h2><a name="introduction"></a>Introduction</h2>
@@ -79,6 +83,13 @@
     href="http://www.python.org/doc/current/api/exceptionHandling.html#l2h-71">PyErr_Occurred</a>
     should return non-zero.</td>
   </tr>
+ <tr>
+ <td valign="top"><code>c.get_pytype()</code></td>
+ <td><code>PyTypeObject const*</code></td>
+ <td>A pointer to a Python Type object corresponding to result of the conversion,
+ or <code>0</code>. Used for documentation generation. If <code>0</code> is returned
+ the generated type in the documentation will be <b>object</b> .</td>
+ </tr>
 </table>
 
 <h3><a name="ResultConverterGenerator-concept"></a>ResultConverterGenerator Concept</h3>

Modified: branches/hash/libs/python/doc/v2/configuration.html
==============================================================================
--- branches/hash/libs/python/doc/v2/configuration.html (original)
+++ branches/hash/libs/python/doc/v2/configuration.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -139,6 +139,41 @@
         compares <code>typeid(T).name()</code> instead of using and comparing
         the <code>std::type_info</code> objects directly.</td>
       </tr>
+ <tr>
+ <td valign="top"><code>BOOST_PYTHON_NO_PY_SIGNATURES</code></td>
+
+ <td valign="top" align="center"><i>not&nbsp;defined</i></td>
+
+ <td valign="top">If defined for a module no pythonic signatures are generated
+ for the docstrings of the module functions, and no python type is associated with any
+ of the converters registered by the module. This also reduces the binary size of the
+ module by about 14% (gcc compiled).<br>
+ If defined for the boost_python runtime library, the default for the
+ <code>docstring_options.enable_py_signatures()</code> is set to <code>false</code>.
+ </td>
+
+ </tr>
+ <tr>
+ <td valign="top"><code>BOOST_PYTHON_SUPPORTS_PY_SIGNATURES</code></td>
+
+ <td valign="top" align="center"><i>defined if <code>BOOST_PYTHON_NO_PY_SIGNATURES</code> is undefined</i></td>
+
+ <td valign="top">This macro is defined to enable a smooth transition from older Boost.Python versions
+ which do not support pythonic signatures. For example usage see
+ here.
+ </td>
+
+ </tr>
+ <tr>
+ <td valign="top"><code>BOOST_PYTHON_PY_SIGNATURES_PROPER_INIT_SELF_TYPE</code></td>
+
+ <td valign="top" align="center"><i>not&nbsp;defined</i></td>
+
+ <td valign="top">If defined the python type of <code>__init__</code> method "self" parameters
+ is properly generated, otherwise <code><b>object</b></code> is used. It is undefined
+ by default because it increases the binary size of the module by about 14% (gcc compiled).</td>
+
+ </tr>
     </table>
     <hr>
 

Modified: branches/hash/libs/python/doc/v2/default_call_policies.html
==============================================================================
--- branches/hash/libs/python/doc/v2/default_call_policies.html (original)
+++ branches/hash/libs/python/doc/v2/default_call_policies.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -82,6 +82,7 @@
         static PyObject* postcall(PyObject*, PyObject* result);
         typedef <a href=
 "#default_result_converter-spec">default_result_converter</a> result_converter;
+ template &lt;class Sig&gt; struct extract_return_type : mpl::front&lt;Sig&gt;{};
     };
 }}
 </pre>
@@ -161,7 +162,7 @@
 
     <p>Revised
     <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
- 13 November, 2002
+ 11 June, 2007
   <!--webbot bot="Timestamp" endspan i-checksum="39359" -->
 
 

Modified: branches/hash/libs/python/doc/v2/docstring_options.html
==============================================================================
--- branches/hash/libs/python/doc/v2/docstring_options.html (original)
+++ branches/hash/libs/python/doc/v2/docstring_options.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -103,6 +103,8 @@
 
           docstring_options(bool show_user_defined, bool show_signatures);
 
+ docstring_options(bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures);
+
           ~docstring_options();
 
           void
@@ -118,6 +120,18 @@
           enable_signatures();
 
           void
+ disable_py_signatures();
+
+ void
+ enable_py_signatures();
+
+ void
+ disable_cpp_signatures();
+
+ void
+ enable_cpp_signatures();
+
+ void
           disable_all();
 
           void
@@ -139,7 +153,7 @@
     object which controls the appearance of function and
     member-function docstrings defined in the code that follows. If
     <code>show_all</code> is <code>true</code>, both the
- user-defined docstrings and the automatically generated C++
+ user-defined docstrings and the automatically generated Python and C++
     signatures are shown. If <code>show_all</code> is
     <code>false</code> the <code>__doc__</code> attributes are
     <code>None</code>.</dt>
@@ -154,12 +168,29 @@
     member-function docstrings defined in the code that follows.
     Iff <code>show_user_defined</code> is <code>true</code>, the
     user-defined docstrings are shown. Iff
- <code>show_signatures</code> is <code>true</code>, C++
+ <code>show_signatures</code> is <code>true</code>, Python and C++
     signatures are automatically added. If both
     <code>show_user_defined</code> and <code>show_signatures</code>
     are <code>false</code>, the <code>__doc__</code> attributes are
     <code>None</code>.</dt>
   </dl>
+ <pre>
+docstring_options(bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures);
+</pre>
+
+ <dl class="function-semantics">
+ <dt><b>Effects:</b> Constructs a <code>docstring_options</code>
+ object which controls the appearance of function and
+ member-function docstrings defined in the code that follows.
+ Iff <code>show_user_defined</code> is <code>true</code>, the
+ user-defined docstrings are shown. Iff
+ <code>show_py_signatures</code> is <code>true</code>, Python
+ signatures are automatically added. Iff
+ <code>show_cpp_signatures</code> is <code>true</code>, C++
+ signatures are automatically added. If all parameters are
+ <code>false</code>, the <code>__doc__</code> attributes are
+ <code>None</code>.</dt>
+ </dl>
 
   <h4><a name="docstring_options-spec-dtors" id=
   "docstring_options-spec-dtors"></a>Class
@@ -186,6 +217,10 @@
 void enable_user_defined();
 void disable_signatures();
 void enable_signatures();
+void disable_py_signatures();
+void enable_py_signatures();
+void disable_cpp_signatures();
+void enable_cpp_signatures();
 void disable_all();
 void enable_all();
 </pre>
@@ -196,7 +231,7 @@
     <code>*_user_defined()</code> and <code>*_signatures()</code>
     member functions are provided for fine-grained control. The
     <code>*_all()</code> member functions are convenient shortcuts
- to manipulate both settings simultaneously.</dt>
+ to manipulate all settings simultaneously.</dt>
   </dl>
 
   <h2><a name="examples" id="examples"></a>Examples</h2>
@@ -219,7 +254,7 @@
   <pre>
 &gt;&gt;&gt; import demo
 &gt;&gt;&gt; print demo.foo.__doc__
-foo doc
+foo() -&gt; None : foo doc
 C++ signature:
     foo(void) -&gt; void
 </pre>If compiled with
@@ -253,21 +288,33 @@
     def("foo3", foo3, arg("f"), "foo3 doc");
     doc_options.enable_user_defined();
     def("foo4", foo4, arg("d"), "foo4 doc");
+ doc_options.enable_py_signatures();
+ def("foo5", foo4, arg("d"), "foo5 doc");
+ doc_options.disable_py_signatures();
+ doc_options.enable_cpp_signatures();
+ def("foo6", foo4, arg("d"), "foo6 doc");
 }
 </pre>Python code:
   <pre>
 &gt;&gt;&gt; import demo
 &gt;&gt;&gt; print demo.foo1.__doc__
-foo1 doc
+foo1( (int)i) -&gt; int : foo1 doc
 C++ signature:
     foo1(int i) -&gt; int
 &gt;&gt;&gt; print demo.foo2.__doc__
+foo2( (int)l) -&gt; int :
 C++ signature:
     foo2(long l) -&gt; int
 &gt;&gt;&gt; print demo.foo3.__doc__
 None
 &gt;&gt;&gt; print demo.foo4.__doc__
 foo4 doc
+&gt;&gt;&gt; print demo.foo5.__doc__
+foo5( (float)d) -&gt; int : foo5 doc
+&gt;&gt;&gt; print demo.foo6.__doc__
+foo6 doc
+C++ signature:
+ foo6(double d) -&gt; int
 </pre>
 
   <h4>Wrapping from multiple C++ scopes</h4>

Modified: branches/hash/libs/python/doc/v2/enum.html
==============================================================================
--- branches/hash/libs/python/doc/v2/enum.html (original)
+++ branches/hash/libs/python/doc/v2/enum.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -89,7 +89,7 @@
   template &lt;class T&gt;
   class enum_ : public object
   {
- enum_(char const* name);
+ enum_(char const* name, char const* doc = 0);
     enum_&lt;T&gt;&amp; value(char const* name, T);
     enum_&lt;T&gt;&amp; export_values();
   };
@@ -99,7 +99,7 @@
     <h4><a name="enum_-spec-ctors"></a>Class template <code>enum_</code>
     constructors</h4>
 <pre>
-enum_(char const* name);
+enum_(char const* name, char const* doc=0);
 </pre>
 
     <dl class="function-semantics">
@@ -131,7 +131,7 @@
 
       <dt><b>Effects:</b> adds an instance of the wrapped enumeration
       type with value <code>x</code> to the type's dictionary as the
- <code>name</code>d attribute</dt>.
+ <code>name</code>d attribute.</dt>
 
       <dt><b>Returns:</b> <code>*this</code></dt>
 
@@ -146,7 +146,7 @@
       <dt><b>Effects:</b> sets attributes in the current <a
         href="scope.html#scope-spec"><code>scope</code></a> with the
         same names and values as all enumeration values exposed so far
- by calling <code>value()</code></dt>.
+ by calling <code>value()</code>.</dt>
 
       <dt><b>Returns:</b> <code>*this</code></dt>
 

Modified: branches/hash/libs/python/doc/v2/reference.html
==============================================================================
--- branches/hash/libs/python/doc/v2/reference.html (original)
+++ branches/hash/libs/python/doc/v2/reference.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -610,6 +610,66 @@
       </dd>
 
       <dd>
+ <a name="function_documentation"></a>
+
+ <h3>Function documentation</h3>
+
+ <dl class="index">
+ <dt><a href=
+ "function_doc_signature.html">function_doc_signature.hpp</a></dt>
+
+ <dd>
+ <dl class="index">
+ <dt><a href=
+ "function_doc_signature.html#classes">Classes</a></dt>
+
+ <dd>
+ <dl class="index">
+ <dt><a href=
+ "function_doc_signature.html#function_doc_signature_generator-spec">function_doc_signature_generator</a></dt>
+
+ </dl>
+ </dd>
+ </dl>
+ </dd>
+ </dl>
+ <dl class="index">
+ <dt><a href=
+ "pytype_function.html">pytype_function.hpp</a></dt>
+
+ <dd>
+ <dl class="index">
+ <dt><a href=
+ "pytype_function.html#classes">Classes</a></dt>
+
+ <dd>
+ <dl class="index">
+ <dt><a href=
+ "pytype_function.html#wrap_pytype-spec">wrap_pytype</a></dt>
+
+ </dl>
+ <dl class="index">
+ <dt><a href=
+ "pytype_function.html#expected_from_python_type-spec">expected_from_python_type</a></dt>
+
+ </dl>
+ <dl class="index">
+ <dt><a href=
+ "pytype_function.html#to_python_target_type-spec">to_python_target_type</a></dt>
+
+ </dl>
+ <dl class="index">
+ <dt><a href=
+ "pytype_function.html#registered_pytype-spec">registered_pytype</a></dt>
+
+ </dl>
+ </dd>
+ </dl>
+ </dd>
+ </dl>
+ </dd>
+
+ <dd>
         <a name="models_of_call_policies"></a>
 
         <h3>Models of CallPolicies</h3>

Modified: branches/hash/libs/python/doc/v2/return_arg.html
==============================================================================
--- branches/hash/libs/python/doc/v2/return_arg.html (original)
+++ branches/hash/libs/python/doc/v2/return_arg.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -125,6 +125,8 @@
    {
       static PyObject* postcall(PyObject*, PyObject* result);
       struct result_converter{ template &lt;class T&gt; struct apply; };
+ template &lt;class Sig&gt; struct extract_return_type : mpl::at_c&lt;Sig, arg_pos&gt;{};
+
    };
 }}
 </pre>

Modified: branches/hash/libs/python/doc/v2/to_python_converter.html
==============================================================================
--- branches/hash/libs/python/doc/v2/to_python_converter.html (original)
+++ branches/hash/libs/python/doc/v2/to_python_converter.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -108,6 +108,23 @@
         <td>A class type whose static member function <code>convert</code>
         does the real work of the conversion.</td>
       </tr>
+ <tr>
+ <td><code>bool has_get_pytype = false</code></td>
+
+ <td>
+ <code>PyTypeObject const * p = Conversion::get_pytype() </code>.</td>
+
+ <td><b>Optional member</b> - if <code>Conversion</code> has <code>get_pytype</code> member supply
+ <code>true</code> for this parameters.
+ If present <code>get_pytype</code> is used to document the return type
+ of functions using this conversion. The <code>get_pytype</code> may be implemented
+ using the classes and functions
+ from pytype_function.hpp
+ <b>NOTE :</b> For backward compatibility this parameter may be passed after
+ checking if <code>BOOST_PYTHON_SUPPORTS_PY_SIGNATURES</code> is defined (see
+ here).
+ </td>
+ </tr>
     </table>
 
     <h4><a name="to_python_converter-spec-synopsis"></a>Class template
@@ -115,7 +132,7 @@
 <pre>
 namespace boost { namespace python
 {
- template &lt;class T, class Conversion&gt;
+ template &lt;class T, class Conversion, bool convertion_has_get_pytype_member=false&gt;
   struct to_python_converter
   {
       to_python_converter();
@@ -160,12 +177,16 @@
     {
         return PyObject_New(noddy_NoddyObject, &amp;noddy_NoddyType);
     }
+ static PyTypeObject const* get_pytype()
+ {
+ return &amp;noddy_NoddyType;
+ }
 };
 
 BOOST_PYTHON_MODULE(to_python_converter)
 {
     def("make_tag", make_tag);
- to_python_converter&lt;tag, tag_to_noddy&gt;();
+ to_python_converter&lt;tag, tag_to_noddy, true&gt;(); //"true" because tag_to_noddy has member get_pytype
 }
 </pre>
 
@@ -195,7 +216,7 @@
 
     <p>Revised
     <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
- 13 November, 2002
+ 11 June, 2007
   <!--webbot bot="Timestamp" endspan i-checksum="39359" -->
     </p>
 

Modified: branches/hash/libs/python/example/std_pair.cpp
==============================================================================
--- branches/hash/libs/python/example/std_pair.cpp (original)
+++ branches/hash/libs/python/example/std_pair.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -18,6 +18,7 @@
       return boost::python::incref(
         boost::python::make_tuple(p.first, p.second).ptr());
     }
+ static PyTypeObject const *get_pytype () {return &PyTuple_Type; }
   };
 
   // Helper for convenience.
@@ -28,7 +29,9 @@
     {
       boost::python::to_python_converter<
         std::pair<T1, T2>,
- std_pair_to_tuple<T1, T2> >();
+ std_pair_to_tuple<T1, T2>,
+ true //std_pair_to_tuple has get_pytype
+ >();
     }
   };
 

Modified: branches/hash/libs/python/src/converter/builtin_converters.cpp
==============================================================================
--- branches/hash/libs/python/src/converter/builtin_converters.cpp (original)
+++ branches/hash/libs/python/src/converter/builtin_converters.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -16,6 +16,7 @@
 #include <boost/python/converter/registry.hpp>
 #include <boost/python/converter/registrations.hpp>
 #include <boost/python/converter/shared_ptr_deleter.hpp>
+#include <boost/python/converter/pytype_function.hpp>
 
 #include <boost/cast.hpp>
 #include <string>
@@ -56,6 +57,7 @@
               &slot_rvalue_from_python<T,SlotPolicy>::convertible
               , &slot_rvalue_from_python<T,SlotPolicy>::construct
               , type_id<T>()
+ , &SlotPolicy::get_pytype
               );
       }
       
@@ -100,6 +102,7 @@
           return (PyInt_Check(obj) || PyLong_Check(obj))
               ? &number_methods->nb_int : 0;
       }
+ static PyTypeObject const* get_pytype() { return &PyInt_Type;}
   };
 
   template <class T>
@@ -135,6 +138,7 @@
           return (PyInt_Check(obj) || PyLong_Check(obj))
               ? &py_object_identity : 0;
       }
+ static PyTypeObject const* get_pytype() { return &PyInt_Type;}
   };
 
   template <class T>
@@ -173,6 +177,7 @@
           else
               return 0;
       }
+ static PyTypeObject const* get_pytype() { return &PyInt_Type;}
   };
   
   struct long_long_rvalue_from_python : long_long_rvalue_from_python_base
@@ -228,6 +233,15 @@
       {
           return PyObject_IsTrue(intermediate);
       }
+
+ static PyTypeObject const* get_pytype()
+ {
+#if PY_VERSION_HEX >= 0x02030000
+ return &PyBool_Type;
+#else
+ return &PyInt_Type;
+#endif
+ }
   };
 
   // A SlotPolicy for extracting floating types from Python objects.
@@ -259,6 +273,7 @@
               return PyFloat_AS_DOUBLE(intermediate);
           }
       }
+ static PyTypeObject const* get_pytype() { return &PyFloat_Type;}
   };
 
   // A SlotPolicy for extracting C++ strings from Python objects.
@@ -276,6 +291,7 @@
       {
           return std::string(PyString_AsString(intermediate),PyString_Size(intermediate));
       }
+ static PyTypeObject const* get_pytype() { return &PyString_Type;}
   };
 
 #if defined(Py_USING_UNICODE) && !defined(BOOST_NO_STD_WSTRING)
@@ -316,6 +332,7 @@
           }
           return result;
       }
+ static PyTypeObject const* get_pytype() { return &PyUnicode_Type;}
   };
 #endif
 
@@ -346,6 +363,7 @@
               return PyFloat_AS_DOUBLE(intermediate);
           }
       }
+ static PyTypeObject const* get_pytype() { return &PyComplex_Type;}
   };
 }
 
@@ -411,7 +429,7 @@
     slot_rvalue_from_python<std::complex<long double>,complex_rvalue_from_python>();
     
     // Add an lvalue converter for char which gets us char const*
- registry::insert(convert_to_cstring,type_id<char>());
+ registry::insert(convert_to_cstring,type_id<char>(),&converter::wrap_pytype<&PyString_Type>::get_pytype);
 
     // Register by-value converters to std::string, std::wstring
 #if defined(Py_USING_UNICODE) && !defined(BOOST_NO_STD_WSTRING)

Modified: branches/hash/libs/python/src/converter/registry.cpp
==============================================================================
--- branches/hash/libs/python/src/converter/registry.cpp (original)
+++ branches/hash/libs/python/src/converter/registry.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -20,6 +20,35 @@
 #endif
 
 namespace boost { namespace python { namespace converter {
+BOOST_PYTHON_DECL PyTypeObject const* registration::expected_from_python_type() const
+{
+ if (this->m_class_object != 0)
+ return this->m_class_object;
+
+ std::set<PyTypeObject const*> pool;
+
+ for(rvalue_from_python_chain* r = rvalue_chain; r ; r=r->next)
+ if(r->expected_pytype)
+ pool.insert(r->expected_pytype());
+
+ //for now I skip the search for common base
+ if (pool.size()==1)
+ return *pool.begin();
+
+ return 0;
+
+}
+
+BOOST_PYTHON_DECL PyTypeObject const* registration::to_python_target_type() const
+{
+ if (this->m_class_object != 0)
+ return this->m_class_object;
+
+ if (this->m_to_python_target_type != 0)
+ return this->m_to_python_target_type();
+
+ return 0;
+}
 
 BOOST_PYTHON_DECL PyTypeObject* registration::get_class_object() const
 {
@@ -168,15 +197,15 @@
 
 namespace registry
 {
- void insert(to_python_function_t f, type_info source_t)
+ void insert(to_python_function_t f, type_info source_t, PyTypeObject const* (*to_python_target_type)())
   {
 # ifdef BOOST_PYTHON_TRACE_REGISTRY
       std::cout << "inserting to_python " << source_t << "\n";
 # endif
- to_python_function_t& slot = get(source_t)->m_to_python;
+ entry* slot = get(source_t);
       
- assert(slot == 0); // we have a problem otherwise
- if (slot != 0)
+ assert(slot->m_to_python == 0); // we have a problem otherwise
+ if (slot->m_to_python != 0)
       {
           std::string msg = (
               std::string("to-Python converter for ")
@@ -189,11 +218,12 @@
               throw_error_already_set();
           }
       }
- slot = f;
+ slot->m_to_python = f;
+ slot->m_to_python_target_type = to_python_target_type;
   }
 
   // Insert an lvalue from_python converter
- void insert(convertible_function convert, type_info key)
+ void insert(convertible_function convert, type_info key, PyTypeObject const* (*exp_pytype)())
   {
 # ifdef BOOST_PYTHON_TRACE_REGISTRY
       std::cout << "inserting lvalue from_python " << key << "\n";
@@ -204,13 +234,14 @@
       registration->next = found->lvalue_chain;
       found->lvalue_chain = registration;
       
- insert(convert, 0, key);
+ insert(convert, 0, key,exp_pytype);
   }
 
   // Insert an rvalue from_python converter
   void insert(void* (*convertible)(PyObject*)
               , constructor_function construct
- , type_info key)
+ , type_info key
+ , PyTypeObject const* (*exp_pytype)())
   {
 # ifdef BOOST_PYTHON_TRACE_REGISTRY
       std::cout << "inserting rvalue from_python " << key << "\n";
@@ -219,6 +250,7 @@
       rvalue_from_python_chain *registration = new rvalue_from_python_chain;
       registration->convertible = convertible;
       registration->construct = construct;
+ registration->expected_pytype = exp_pytype;
       registration->next = found->rvalue_chain;
       found->rvalue_chain = registration;
   }
@@ -226,7 +258,8 @@
   // Insert an rvalue from_python converter
   void push_back(void* (*convertible)(PyObject*)
               , constructor_function construct
- , type_info key)
+ , type_info key
+ , PyTypeObject const* (*exp_pytype)())
   {
 # ifdef BOOST_PYTHON_TRACE_REGISTRY
       std::cout << "push_back rvalue from_python " << key << "\n";
@@ -238,6 +271,7 @@
       rvalue_from_python_chain *registration = new rvalue_from_python_chain;
       registration->convertible = convertible;
       registration->construct = construct;
+ registration->expected_pytype = exp_pytype;
       registration->next = 0;
       *found = registration;
   }

Modified: branches/hash/libs/python/src/dict.cpp
==============================================================================
--- branches/hash/libs/python/src/dict.cpp (original)
+++ branches/hash/libs/python/src/dict.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -171,4 +171,14 @@
     }
 }
 
+static struct register_dict_pytype_ptr
+{
+ register_dict_pytype_ptr()
+ {
+ const_cast<converter::registration &>(
+ converter::registry::lookup(boost::python::type_id<boost::python::dict>())
+ ).m_class_object = &PyDict_Type;
+ }
+}register_dict_pytype_ptr_;
+
 }}} // namespace boost::python

Modified: branches/hash/libs/python/src/list.cpp
==============================================================================
--- branches/hash/libs/python/src/list.cpp (original)
+++ branches/hash/libs/python/src/list.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -137,4 +137,14 @@
     return result;
 }
 
+static struct register_list_pytype_ptr
+{
+ register_list_pytype_ptr()
+ {
+ const_cast<converter::registration &>(
+ converter::registry::lookup(boost::python::type_id<boost::python::list>())
+ ).m_class_object = &PyList_Type;
+ }
+}register_list_pytype_ptr_;
+
 }}} // namespace boost::python

Modified: branches/hash/libs/python/src/object/enum.cpp
==============================================================================
--- branches/hash/libs/python/src/object/enum.cpp (original)
+++ branches/hash/libs/python/src/object/enum.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -121,7 +121,7 @@
 
 namespace
 {
- object new_enum_type(char const* name)
+ object new_enum_type(char const* name, char const *doc)
   {
       if (enum_type_object.tp_dict == 0)
       {
@@ -143,6 +143,8 @@
       object module_name = module_prefix();
       if (module_name)
          d["__module__"] = module_name;
+ if (doc)
+ d["__doc__"] = doc;
       
       object result = (object(metatype))(name, make_tuple(base), d);
       
@@ -158,8 +160,9 @@
     , converter::convertible_function convertible
     , converter::constructor_function construct
     , type_info id
+ , char const *doc
     )
- : object(new_enum_type(name))
+ : object(new_enum_type(name, doc))
 {
     converter::registration& converters
         = const_cast<converter::registration&>(

Modified: branches/hash/libs/python/src/object/function.cpp
==============================================================================
--- branches/hash/libs/python/src/object/function.cpp (original)
+++ branches/hash/libs/python/src/object/function.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -6,6 +6,7 @@
 #include <boost/python/docstring_options.hpp>
 #include <boost/python/object/function_object.hpp>
 #include <boost/python/object/function_handle.hpp>
+#include <boost/python/object/function_doc_signature.hpp>
 #include <boost/python/errors.hpp>
 #include <boost/python/str.hpp>
 #include <boost/python/object_attributes.hpp>
@@ -17,6 +18,7 @@
 #include <boost/python/ssize_t.hpp>
 
 #include <boost/python/detail/signature.hpp>
+#include <boost/python/detail/none.hpp>
 #include <boost/mpl/vector/vector10.hpp>
 
 #include <boost/bind.hpp>
@@ -30,7 +32,12 @@
 
 namespace boost { namespace python {
   volatile bool docstring_options::show_user_defined_ = true;
- volatile bool docstring_options::show_signatures_ = true;
+ volatile bool docstring_options::show_cpp_signatures_ = true;
+#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
+ volatile bool docstring_options::show_py_signatures_ = true;
+#else
+ volatile bool docstring_options::show_py_signatures_ = false;
+#endif
 }}
 
 namespace boost { namespace python { namespace objects {
@@ -411,6 +418,12 @@
     add_to_namespace(name_space, name_, attribute, 0);
 }
 
+namespace detail
+{
+ extern char py_signature_tag[];
+ extern char cpp_signature_tag[];
+}
+
 void function::add_to_namespace(
     object const& name_space, char const* name_, object const& attribute, char const* doc)
 {
@@ -487,6 +500,7 @@
         throw_error_already_set();
 
     object mutable_attribute(attribute);
+/*
     if (doc != 0 && docstring_options::show_user_defined_)
     {
         // Accumulate documentation
@@ -517,6 +531,28 @@
         mutable_attribute.attr("__doc__") += str("\n ").join(make_tuple(
           "C++ signature:", f->signature(true)));
     }
+ */
+ str _doc;
+
+ if (docstring_options::show_py_signatures_)
+ {
+ _doc += str(reinterpret_cast<const char*>(detail::py_signature_tag));
+ }
+ if (doc != 0 && docstring_options::show_user_defined_)
+ _doc += doc;
+
+ if (docstring_options::show_cpp_signatures_)
+ {
+ if(len(_doc))
+ _doc += "\n "+str(reinterpret_cast<const char*>(detail::cpp_signature_tag));
+ else
+ _doc += " "+str(reinterpret_cast<const char*>(detail::cpp_signature_tag));
+ }
+ if(_doc)
+ {
+ object mutable_attribute(attribute);
+ mutable_attribute.attr("__doc__")= _doc;
+ }
 }
 
 BOOST_PYTHON_DECL void add_to_namespace(
@@ -591,7 +627,10 @@
     static PyObject* function_get_doc(PyObject* op, void*)
     {
         function* f = downcast<function>(op);
- return python::incref(f->doc().ptr());
+ list signatures = function_doc_signature_generator::function_doc_signatures(f);
+ if(!signatures) return python::detail::none();
+ signatures.reverse();
+ return python::incref( str("\n ").join(signatures).ptr());
     }
     
     static int function_set_doc(PyObject* op, PyObject* doc, void*)

Modified: branches/hash/libs/python/src/str.cpp
==============================================================================
--- branches/hash/libs/python/src/str.cpp (original)
+++ branches/hash/libs/python/src/str.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -349,5 +349,15 @@
 BOOST_PYTHON_DEFINE_STR_METHOD(translate, 1)
 BOOST_PYTHON_DEFINE_STR_METHOD(translate, 2)
 BOOST_PYTHON_DEFINE_STR_METHOD(upper, 0)
+
+static struct register_str_pytype_ptr
+{
+ register_str_pytype_ptr()
+ {
+ const_cast<converter::registration &>(
+ converter::registry::lookup(boost::python::type_id<boost::python::str>())
+ ).m_class_object = &PyString_Type;
+ }
+}register_str_pytype_ptr_;
     
 }}} // namespace boost::python

Modified: branches/hash/libs/python/src/tuple.cpp
==============================================================================
--- branches/hash/libs/python/src/tuple.cpp (original)
+++ branches/hash/libs/python/src/tuple.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -21,4 +21,15 @@
     : object(call(sequence))
 {}
 
+static struct register_tuple_pytype_ptr
+{
+ register_tuple_pytype_ptr()
+ {
+ const_cast<converter::registration &>(
+ converter::registry::lookup(boost::python::type_id<boost::python::tuple>())
+ ).m_class_object = &PyTuple_Type;
+ }
+}register_tuple_pytype_ptr_;
+
+
 }}} // namespace boost::python

Modified: branches/hash/libs/python/test/Jamfile.v2
==============================================================================
--- branches/hash/libs/python/test/Jamfile.v2 (original)
+++ branches/hash/libs/python/test/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -135,6 +135,7 @@
 [ bpl-test nested ]
 
 [ bpl-test docstring ]
+[ bpl-test pytype_function ]
 
 [ bpl-test vector_indexing_suite ]
 
@@ -147,7 +148,7 @@
     <toolset>hp_cxx:<build>no ]
 
 [ python-extension map_indexing_suite_ext
- : map_indexing_suite.cpp int_map_indexing_suite.cpp
+ : map_indexing_suite.cpp int_map_indexing_suite.cpp a_map_indexing_suite.cpp
     /boost/python//boost_python ]
 [ bpl-test
     map_indexing_suite : map_indexing_suite.py map_indexing_suite_ext ]

Modified: branches/hash/libs/python/test/args.cpp
==============================================================================
--- branches/hash/libs/python/test/args.cpp (original)
+++ branches/hash/libs/python/test/args.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -51,7 +51,7 @@
 
 BOOST_PYTHON_MODULE(args_ext)
 {
- def("f", f, args("x", "y", "z")
+ def("f", f, (arg("x")=1, arg("y")=4.25, arg("z")="wow")
         , "This is f's docstring"
         );
 
@@ -72,24 +72,24 @@
         .def("raw", raw_function(raw_func))
         ;
             
- class_<X>("X", "This is X's docstring")
- .def(init<int, optional<int> >(args("a0", "a1")))
+ class_<X>("X", "This is X's docstring", init<>(args("self")))
+ .def(init<int, optional<int> >(args("self", "a0", "a1")))
         .def("f", &X::f
              , "This is X.f's docstring"
- , args("x", "y", "z"))
+ , args("self","x", "y", "z"))
 
         // Just to prove that all the different argument combinations work
- .def("inner0", &X::inner, return_internal_reference<>(), args("n"), "docstring")
- .def("inner1", &X::inner, return_internal_reference<>(), "docstring", args("n"))
+ .def("inner0", &X::inner, return_internal_reference<>(), args("self", "n"), "docstring")
+ .def("inner1", &X::inner, return_internal_reference<>(), "docstring", args("self", "n"))
 
- .def("inner2", &X::inner, args("n"), return_internal_reference<>(), "docstring")
- .def("inner3", &X::inner, "docstring", return_internal_reference<>(), args("n"))
+ .def("inner2", &X::inner, args("self", "n"), return_internal_reference<>(), "docstring")
+ .def("inner3", &X::inner, "docstring", return_internal_reference<>(), args("self", "n"))
 
- .def("inner4", &X::inner, args("n"), "docstring", return_internal_reference<>())
- .def("inner5", &X::inner, "docstring", args("n"), return_internal_reference<>())
+ .def("inner4", &X::inner, args("self", "n"), "docstring", return_internal_reference<>())
+ .def("inner5", &X::inner, "docstring", args("self", "n"), return_internal_reference<>())
 
- .def("f1", &X::f, X_f_overloads(args("x", "y", "z")))
- .def("f2", &X::f, X_f_overloads(args("x", "y", "z"), "f2's docstring"))
+ .def("f1", &X::f, X_f_overloads(args("self", "x", "y", "z")))
+ .def("f2", &X::f, X_f_overloads(args("self", "x", "y", "z"), "f2's docstring"))
         ;
 
     def("inner", &X::inner, "docstring", args("self", "n"), return_internal_reference<>());

Modified: branches/hash/libs/python/test/args.py
==============================================================================
--- branches/hash/libs/python/test/args.py (original)
+++ branches/hash/libs/python/test/args.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -84,24 +84,24 @@
 (2, 4.25, 'wow')
>>> q.f1()
 (1, 4.25, 'wow')
->>> q.f2.__doc__.splitlines()[-4]
-"f2's docstring"
+>>> q.f2.__doc__.splitlines()[-3]
+"f2( (X)self [, (int)x [, (float)y [, (str)z]]]) -> tuple : f2's docstring"
 
->>> X.f.__doc__.splitlines()[:3]
-["This is X.f's docstring", '', 'C++ signature:']
+>>> X.f.__doc__.splitlines()[:2]
+["f( (X)self, (int)x, (float)y, (str)z) -> tuple : This is X.f's docstring", ' C++ signature:']
 
>>> xfuncs = (X.inner0, X.inner1, X.inner2, X.inner3, X.inner4, X.inner5)
>>> for f in xfuncs:
 ... print f(q,1).value(),
 ... print f(q, n = 1).value(),
 ... print f(q, n = 0).value(),
-... print f.__doc__.splitlines()[:3]
-1 1 0 ['docstring', '', 'C++ signature:']
-1 1 0 ['docstring', '', 'C++ signature:']
-1 1 0 ['docstring', '', 'C++ signature:']
-1 1 0 ['docstring', '', 'C++ signature:']
-1 1 0 ['docstring', '', 'C++ signature:']
-1 1 0 ['docstring', '', 'C++ signature:']
+... print f.__doc__.splitlines()[:2]
+1 1 0 ['inner0( (X)self, (bool)n) -> Y : docstring', ' C++ signature:']
+1 1 0 ['inner1( (X)self, (bool)n) -> Y : docstring', ' C++ signature:']
+1 1 0 ['inner2( (X)self, (bool)n) -> Y : docstring', ' C++ signature:']
+1 1 0 ['inner3( (X)self, (bool)n) -> Y : docstring', ' C++ signature:']
+1 1 0 ['inner4( (X)self, (bool)n) -> Y : docstring', ' C++ signature:']
+1 1 0 ['inner5( (X)self, (bool)n) -> Y : docstring', ' C++ signature:']
 
>>> x = X(a1 = 44, a0 = 22)
>>> x.inner0(0).value()
@@ -136,49 +136,9 @@
     import sys
     status = run()[0]
     if (status == 0): print "Done."
+ import args_ext
+ help(args_ext)
     sys.exit(status)
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

Modified: branches/hash/libs/python/test/auto_ptr.py
==============================================================================
--- branches/hash/libs/python/test/auto_ptr.py (original)
+++ branches/hash/libs/python/test/auto_ptr.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -64,6 +64,24 @@
 ... except TypeError: pass
 ... else: print 'expected a TypeError exception'
 
+>>> print look.__doc__.splitlines()[0]
+look( (X)arg1) -> int :
+
+>>> print steal.__doc__.splitlines()[0]
+steal( (X)arg1) -> int :
+
+>>> print maybe_steal.__doc__.splitlines()[0]
+maybe_steal( (X)arg1, (bool)arg2) -> int :
+
+>>> print make.__doc__.splitlines()[0]
+make() -> X :
+
+>>> print callback.__doc__.splitlines()[0]
+callback( (object)arg1) -> X :
+
+>>> print extract.__doc__.splitlines()[0]
+extract( (object)arg1) -> X :
+
 '''
 
 def run(args = None):

Modified: branches/hash/libs/python/test/back_reference.py
==============================================================================
--- branches/hash/libs/python/test/back_reference.py (original)
+++ branches/hash/libs/python/test/back_reference.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -16,6 +16,9 @@
>>> assert y_identity(y) is y
>>> y_equality(y, y)
 1
+
+>>> print y_identity.__doc__.splitlines()[0]
+y_identity( (Y)arg1) -> object :
 '''
 
 def run(args = None):

Modified: branches/hash/libs/python/test/data_members.cpp
==============================================================================
--- branches/hash/libs/python/test/data_members.cpp (original)
+++ branches/hash/libs/python/test/data_members.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -52,7 +52,7 @@
 Y Var::static2(0);
 
 // Compilability regression tests
-namespace
+namespace boost_python_test
 {
   struct trivial
   {
@@ -86,6 +86,7 @@
 
 BOOST_PYTHON_MODULE(data_members_ext)
 {
+ using namespace boost_python_test;
     class_<X>("X", init<int>())
         .def("value", &X::value)
         .def("set", &X::set)

Modified: branches/hash/libs/python/test/defaults.cpp
==============================================================================
--- branches/hash/libs/python/test/defaults.cpp (original)
+++ branches/hash/libs/python/test/defaults.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -159,10 +159,10 @@
         .def("get_state", &Y::get_state)
         ;
 
- class_<X>("X")
+ class_<X>("X",no_init)
 
- .def(init<int, optional<char, std::string, double> >("doc of init"))
- .def(init<std::string, bool>()[default_call_policies()]) // what's a good policy here?
+ .def(init<optional<int, char, std::string, double> >("doc of init", args("self", "a", "b", "c", "d")))
+ .def(init<std::string, bool>(args("self", "s", "b"))[default_call_policies()]) // what's a good policy here?
         .def("get_state", &X::get_state)
         .def("bar", &X::bar, X_bar_stubs())
         .def("bar2", &X::bar2, X_bar_stubs2("doc of X::bar2")[return_internal_reference<>()])

Modified: branches/hash/libs/python/test/defaults.py
==============================================================================
--- branches/hash/libs/python/test/defaults.py (original)
+++ branches/hash/libs/python/test/defaults.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -113,28 +113,19 @@
 ... doc = obj.__doc__.splitlines()
 ... return "\\n".join(["|"+doc[i] for i in args])
 
->>> print selected_doc(X.__init__, 0, 3, 6, 9, 11, 12, 14, 17)
-|C++ signature:
-|C++ signature:
-|C++ signature:
-|C++ signature:
-|
-|doc of init
-|C++ signature:
-|C++ signature:
-
->>> print selected_doc(Y.__init__, 0, 2)
-|doc of Y init
-|C++ signature:
-
->>> print selected_doc(X.bar2, 0, 3, 6, 9, 11, 12, 14)
-|C++ signature:
-|C++ signature:
-|C++ signature:
-|C++ signature:
-|
-|doc of X::bar2
-|C++ signature:
+>>> print selected_doc(X.__init__, 0, 1, 3, 4)
+|__init__( (object)self [, (int)a [, (str)b [, (str)c [, (float)d]]]]) -> None : doc of init
+| C++ signature:
+| __init__( (object)self, (str)s, (bool)b) -> None :
+| C++ signature:
+
+>>> print selected_doc(Y.__init__, 0, 1)
+|__init__( (object)arg1) -> None : doc of Y init
+| C++ signature:
+
+>>> print selected_doc(X.bar2, 0, 1)
+|bar2( (X)arg1 [, (int)arg2 [, (str)arg3 [, (str)arg4 [, (float)arg5]]]]) -> Y : doc of X::bar2
+| C++ signature:
 
 """
 def run(args = None):

Modified: branches/hash/libs/python/test/docstring.cpp
==============================================================================
--- branches/hash/libs/python/test/docstring.cpp (original)
+++ branches/hash/libs/python/test/docstring.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -43,55 +43,74 @@
               , init<int>(
                   "this is the __init__ function\n"
                   "its documentation has two lines."
+ , args("self", "value")
                 )
 
         )
         .def("value", &X::value,
- "gets the value of the object")
+ "gets the value of the object"
+ , args("self"))
         .def( "value", &X::value,
- "also gets the value of the object")
+ "also gets the value of the object"
+ , args("self"))
         ;
 
     def("create", create, return_value_policy<manage_new_object>(),
- "creates a new X object");
+ "creates a new X object", args("value"));
 
- def("fact", fact, "compute the factorial");
+ def("fact", fact, "compute the factorial", args("n"));
 
     {
       docstring_options doc_options;
       doc_options.disable_user_defined();
- def("fact_usr_off_1", fact, "usr off 1");
+ def("fact_usr_off_1", fact, "usr off 1", args("n"));
       doc_options.enable_user_defined();
- def("fact_usr_on_1", fact, "usr on 1");
+ def("fact_usr_on_1", fact, "usr on 1", args("n"));
       doc_options.disable_user_defined();
- def("fact_usr_off_2", fact, "usr off 2");
+ def("fact_usr_off_2", fact, "usr off 2", args("n"));
     }
- def("fact_usr_on_2", fact, "usr on 2");
+ def("fact_usr_on_2", fact, "usr on 2", args("n"));
 
     {
       docstring_options doc_options(true, false);
- def("fact_sig_off_1", fact, "sig off 1");
+ def("fact_sig_off_1", fact, "sig off 1", args("n"));
       doc_options.enable_signatures();
- def("fact_sig_on_1", fact, "sig on 1");
+ def("fact_sig_on_1", fact, "sig on 1", args("n"));
       doc_options.disable_signatures();
- def("fact_sig_off_2", fact, "sig off 2");
+ def("fact_sig_off_2", fact, "sig off 2", args("n"));
     }
- def("fact_sig_on_2", fact, "sig on 2");
+ def("fact_sig_on_2", fact, "sig on 2", args("n"));
 
     {
       docstring_options doc_options(false);
- def("fact_usr_off_sig_off_1", fact, "usr off sig off 1");
+ def("fact_usr_off_sig_off_1", fact, "usr off sig off 1", args("n"));
       {
         docstring_options nested_doc_options;
- def("fact_usr_on_sig_on_1", fact, "usr on sig on 1");
+ def("fact_usr_on_sig_on_1", fact, "usr on sig on 1", args("n"));
         nested_doc_options.disable_all();
         nested_doc_options.enable_user_defined();
- def("fact_usr_on_sig_off_1", fact, "usr on sig off 1");
+ def("fact_usr_on_sig_off_1", fact, "usr on sig off 1", args("n"));
         nested_doc_options.enable_all();
- def("fact_usr_on_sig_on_2", fact, "usr on sig on 2");
+ def("fact_usr_on_sig_on_2", fact, "usr on sig on 2", args("n"));
       }
- def("fact_usr_off_sig_off_2", fact, "usr off sig off 2");
+ def("fact_usr_off_sig_off_2", fact, "usr off sig off 2", args("n"));
     }
+
+ {
+ docstring_options doc_options(true);
+ doc_options.disable_cpp_signatures();
+ def("fact_usr_on_psig_on_csig_off_1", fact, "usr on psig on csig off 1", args("n"));
+ doc_options.enable_cpp_signatures();
+ doc_options.disable_py_signatures();
+ def("fact_usr_on_psig_off_csig_on_1", fact, "usr on psig off csig on 1", args("n"));
+ doc_options.enable_py_signatures();
+ doc_options.disable_user_defined();
+ doc_options.disable_cpp_signatures();
+ def("fact_usr_off_psig_on_csig_off_1", fact, "usr off psig on csig off 1", args("n"));
+ doc_options.enable_cpp_signatures();
+ doc_options.disable_py_signatures();
+ def("fact_usr_off_psig_off_csig_on_1", fact, "usr off psig off csig on 1", args("n"));
+ }
 }
 
 #include "module_tail.cpp"

Modified: branches/hash/libs/python/test/docstring.py
==============================================================================
--- branches/hash/libs/python/test/docstring.py (original)
+++ branches/hash/libs/python/test/docstring.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -8,82 +8,99 @@
 ... doc = obj.__doc__.splitlines()
 ... return "\\n".join(["|"+doc[i] for i in args])
 
->>> print selected_doc(X.__init__, 0, 1, 3)
-|this is the __init__ function
+>>> print selected_doc(X.__init__, 0, 1, 2)
+|__init__( (object)self, (int)value) -> None : this is the __init__ function
 |its documentation has two lines.
-|C++ signature:
+| C++ signature:
 
->>> print selected_doc(X.value, 0, 2, 4, 5, 7)
-|gets the value of the object
-|C++ signature:
-|
-|also gets the value of the object
-|C++ signature:
-
->>> print selected_doc(create, 0, 2)
-|creates a new X object
-|C++ signature:
-
->>> print selected_doc(fact, 0, 2)
-|compute the factorial
-|C++ signature:
+>>> print selected_doc(X.value, 0, 1, 3, 4)
+|value( (X)self) -> int : gets the value of the object
+| C++ signature:
+| value( (X)self) -> int : also gets the value of the object
+| C++ signature:
+
+>>> print selected_doc(create, 0, 1)
+|create( (int)value) -> X : creates a new X object
+| C++ signature:
+
+>>> print selected_doc(fact, 0, 1)
+|fact( (int)n) -> int : compute the factorial
+| C++ signature:
 
>>> len(fact_usr_off_1.__doc__.splitlines())
-2
->>> print selected_doc(fact_usr_off_1, 0)
-|C++ signature:
+3
+>>> print selected_doc(fact_usr_off_1, 0, 1)
+|fact_usr_off_1( (int)n) -> int :
+| C++ signature:
>>> len(fact_usr_on_1.__doc__.splitlines())
-4
->>> print selected_doc(fact_usr_on_1, 0, 2)
-|usr on 1
-|C++ signature:
+3
+>>> print selected_doc(fact_usr_on_1, 0, 1)
+|fact_usr_on_1( (int)n) -> int : usr on 1
+| C++ signature:
>>> len(fact_usr_off_2.__doc__.splitlines())
-2
->>> print selected_doc(fact_usr_off_2, 0)
-|C++ signature:
+3
+>>> print selected_doc(fact_usr_off_2, 0,1)
+|fact_usr_off_2( (int)n) -> int :
+| C++ signature:
>>> len(fact_usr_on_2.__doc__.splitlines())
-4
->>> print selected_doc(fact_usr_on_2, 0, 2)
-|usr on 2
-|C++ signature:
+3
+>>> print selected_doc(fact_usr_on_2, 0, 1)
+|fact_usr_on_2( (int)n) -> int : usr on 2
+| C++ signature:
+
 
>>> len(fact_sig_off_1.__doc__.splitlines())
 1
>>> print selected_doc(fact_sig_off_1, 0)
 |sig off 1
>>> len(fact_sig_on_1.__doc__.splitlines())
-4
->>> print selected_doc(fact_sig_on_1, 0, 2)
-|sig on 1
-|C++ signature:
+3
+>>> print selected_doc(fact_sig_on_1, 0, 1)
+|fact_sig_on_1( (int)n) -> int : sig on 1
+| C++ signature:
+
>>> len(fact_sig_off_2.__doc__.splitlines())
 1
>>> print selected_doc(fact_sig_off_2, 0)
 |sig off 2
>>> len(fact_sig_on_2.__doc__.splitlines())
-4
->>> print selected_doc(fact_sig_on_2, 0, 2)
-|sig on 2
-|C++ signature:
+3
+>>> print selected_doc(fact_sig_on_2, 0, 1)
+|fact_sig_on_2( (int)n) -> int : sig on 2
+| C++ signature:
+
 
>>> print fact_usr_off_sig_off_1.__doc__
 None
>>> len(fact_usr_on_sig_on_1.__doc__.splitlines())
-4
->>> print selected_doc(fact_usr_on_sig_on_1, 0, 2)
-|usr on sig on 1
-|C++ signature:
+3
+>>> print selected_doc(fact_usr_on_sig_on_1, 0, 1)
+|fact_usr_on_sig_on_1( (int)n) -> int : usr on sig on 1
+| C++ signature:
+
>>> len(fact_usr_on_sig_off_1.__doc__.splitlines())
 1
>>> print selected_doc(fact_usr_on_sig_off_1, 0)
 |usr on sig off 1
>>> len(fact_usr_on_sig_on_2.__doc__.splitlines())
-4
->>> print selected_doc(fact_usr_on_sig_on_2, 0, 2)
-|usr on sig on 2
-|C++ signature:
->>> print fact_usr_off_sig_off_2.__doc__
-None
+3
+>>> print selected_doc(fact_usr_on_sig_on_2, 0, 1)
+|fact_usr_on_sig_on_2( (int)n) -> int : usr on sig on 2
+| C++ signature:
+
+>>> print fact_usr_on_psig_on_csig_off_1.__doc__
+fact_usr_on_psig_on_csig_off_1( (int)n) -> int : usr on psig on csig off 1
+
+>>> print selected_doc(fact_usr_on_psig_off_csig_on_1, 0, 1)
+|usr on psig off csig on 1
+| C++ signature:
+
+>>> print fact_usr_off_psig_on_csig_off_1.__doc__
+fact_usr_off_psig_on_csig_off_1( (int)n) -> int
+
+>>> print selected_doc(fact_usr_off_psig_off_csig_on_1,0)
+| C++ signature:
+
 
 '''
 

Modified: branches/hash/libs/python/test/implicit.py
==============================================================================
--- branches/hash/libs/python/test/implicit.py (original)
+++ branches/hash/libs/python/test/implicit.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -13,6 +13,19 @@
>>> try: make_x('fool')
 ... except TypeError: pass
 ... else: print 'no error'
+
+>>> print x_value.__doc__.splitlines()[0]
+x_value( (X)arg1) -> int :
+
+>>> print make_x.__doc__.splitlines()[0]
+make_x( (object)arg1) -> X :
+
+>>> print X.value.__doc__.splitlines()[0]
+value( (X)arg1) -> int :
+
+>>> print X.set.__doc__.splitlines()[0]
+set( (X)arg1, (object)arg2) -> None :
+
 '''
 
 def run(args = None):

Modified: branches/hash/libs/python/test/keywords_test.py
==============================================================================
--- branches/hash/libs/python/test/keywords_test.py (original)
+++ branches/hash/libs/python/test/keywords_test.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -80,8 +80,8 @@
>>> f.set(1,1.0,"1")
>>> f.a(), f.b(), f.n()
 (1, 1.0, '1')
->>> f.set2.__doc__.splitlines()[-4]
-"set2's docstring"
+>>> f.set2.__doc__.splitlines()[-3]
+"set2( (Bar)arg1 [, (int)arg2 [, (float)arg3 [, (str)arg4]]]) -> None : set2's docstring"
 '''
 
 

Modified: branches/hash/libs/python/test/m1.cpp
==============================================================================
--- branches/hash/libs/python/test/m1.cpp (original)
+++ branches/hash/libs/python/test/m1.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -13,6 +13,7 @@
 #include <boost/python/to_python_converter.hpp>
 #include <boost/python/errors.hpp>
 #include <boost/python/manage_new_object.hpp>
+#include <boost/python/converter/pytype_function.hpp>
 #include <string.h>
 #include "simple_type.hpp"
 #include "complicated.hpp"
@@ -170,7 +171,8 @@
 
 // Wrap a simple by copying it into a Simple
 struct simple_to_python
- : to_python_converter<simple, simple_to_python>
+ : to_python_converter<simple, simple_to_python, true>
+ //, boost::python::converter::wrap_pytype<&SimpleType>
 {
     static PyObject* convert(simple const& x)
     {
@@ -178,6 +180,7 @@
         p->x = x;
         return (PyObject*)p;
     }
+ static PyTypeObject const *get_pytype(){return &SimpleType; }
 };
 
 struct int_from_noddy

Modified: branches/hash/libs/python/test/map_indexing_suite.cpp
==============================================================================
--- branches/hash/libs/python/test/map_indexing_suite.cpp (original)
+++ branches/hash/libs/python/test/map_indexing_suite.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -26,61 +26,6 @@
     return "gotya " + x.s;
 }
 
-struct A
-{
- int value;
- A() : value(0){};
- A(int v) : value(v) {};
-};
-
-bool operator==(const A& v1, const A& v2)
-{
- return (v1.value == v2.value);
-}
-
-struct B
-{
- A a;
-};
-
-// Converter from A to python int
-struct AToPython
-{
- static PyObject* convert(const A& s)
- {
- return boost::python::incref(boost::python::object((int)s.value).ptr());
- }
-};
-
-// Conversion from python int to A
-struct AFromPython
-{
- AFromPython()
- {
- boost::python::converter::registry::push_back(
- &convertible,
- &construct,
- boost::python::type_id< A >());
- }
-
- static void* convertible(PyObject* obj_ptr)
- {
- if (!PyInt_Check(obj_ptr)) return 0;
- return obj_ptr;
- }
-
- static void construct(
- PyObject* obj_ptr,
- boost::python::converter::rvalue_from_python_stage1_data* data)
- {
- void* storage = (
- (boost::python::converter::rvalue_from_python_storage< A >*)
- data)-> storage.bytes;
-
- new (storage) A((int)PyInt_AsLong(obj_ptr));
- data->convertible = storage;
- }
-};
 
 BOOST_PYTHON_MODULE(map_indexing_suite_ext)
 {
@@ -115,17 +60,9 @@
         .def(map_indexing_suite<std::map<std::string, boost::shared_ptr<X> >, true>())
     ;
 
- to_python_converter< A , AToPython >();
- AFromPython();
-
- class_< std::map<int, A> >("AMap")
- .def(map_indexing_suite<std::map<int, A>, true >())
- ;
-
- class_< B >("B")
- .add_property("a", make_getter(&B::a, return_value_policy<return_by_value>()),
- make_setter(&B::a, return_value_policy<return_by_value>()))
- ;
+ void a_map_indexing_suite(); // moved to a_map_indexing_suite.cpp to
+ a_map_indexing_suite(); // avoid MSVC 6/7 internal structure overflow
+
 }
 
 #include "module_tail.cpp"

Modified: branches/hash/libs/python/test/newtest.py
==============================================================================
--- branches/hash/libs/python/test/newtest.py (original)
+++ branches/hash/libs/python/test/newtest.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -183,6 +183,8 @@
>>> dd = take_d(d_as_a)
>>> dd.name()
 'D'
+>>> print g.__doc__.splitlines()[0]
+g( (Simple)arg1) -> Simple :
 
 """
 

Modified: branches/hash/libs/python/test/pickle1.cpp
==============================================================================
--- branches/hash/libs/python/test/pickle1.cpp (original)
+++ branches/hash/libs/python/test/pickle1.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -19,7 +19,7 @@
 
 #include <string>
 
-namespace {
+namespace boost_python_test {
 
   // A friendly class.
   class world
@@ -52,6 +52,7 @@
 BOOST_PYTHON_MODULE(pickle1_ext)
 {
   using namespace boost::python;
+ using namespace boost_python_test;
   class_<world>("world", init<const std::string&>())
       .def("greet", &world::greet)
       .def_pickle(world_pickle_suite())

Modified: branches/hash/libs/python/test/pickle2.cpp
==============================================================================
--- branches/hash/libs/python/test/pickle2.cpp (original)
+++ branches/hash/libs/python/test/pickle2.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -28,7 +28,7 @@
 #include <boost/python/tuple.hpp>
 #include <boost/python/extract.hpp>
 
-namespace { // Avoid cluttering the global namespace.
+namespace boost_python_test {
 
   // A friendly class.
   class world
@@ -88,6 +88,7 @@
 
 BOOST_PYTHON_MODULE(pickle2_ext)
 {
+ using namespace boost_python_test;
     boost::python::class_<world>(
         "world", boost::python::init<const std::string&>())
         .def("greet", &world::greet)

Modified: branches/hash/libs/python/test/pickle3.cpp
==============================================================================
--- branches/hash/libs/python/test/pickle3.cpp (original)
+++ branches/hash/libs/python/test/pickle3.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -29,7 +29,7 @@
 # define make_tuple boost::python::make_tuple
 #endif
 
-namespace { // Avoid cluttering the global namespace.
+namespace boost_python_test {
 
   // A friendly class.
   class world
@@ -100,6 +100,7 @@
 
 BOOST_PYTHON_MODULE(pickle3_ext)
 {
+ using namespace boost_python_test;
     boost::python::class_<world>(
         "world", boost::python::init<const std::string&>())
         .def("greet", &world::greet)

Modified: branches/hash/libs/python/test/pickle4.cpp
==============================================================================
--- branches/hash/libs/python/test/pickle4.cpp (original)
+++ branches/hash/libs/python/test/pickle4.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -15,7 +15,7 @@
 
 #include <string>
 
-namespace {
+namespace boost_python_test {
 
   // A friendly class.
   class world
@@ -35,6 +35,7 @@
 BOOST_PYTHON_MODULE(pickle4_ext)
 {
   using namespace boost::python;
+ using namespace boost_python_test;
   class_<world>("world", init<const std::string&>())
       .enable_pickling()
       .def("greet", &world::greet)

Modified: branches/hash/libs/python/test/shared_ptr.cpp
==============================================================================
--- branches/hash/libs/python/test/shared_ptr.cpp (original)
+++ branches/hash/libs/python/test/shared_ptr.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -43,6 +43,7 @@
     }
 
     static shared_ptr<T> get() { return storage; }
+ static shared_ptr<T> &get1() { return storage; }
         
     static int look_store()
     {
@@ -71,6 +72,8 @@
             .staticmethod("identity")
             .def("null", &null)
             .staticmethod("null")
+ .def("get1", &get1, return_internal_reference<>())
+ .staticmethod("get1")
             .def("get", &get)
             .staticmethod("get")
             .def("count", &T::count)
@@ -154,6 +157,14 @@
 
 // ------
 
+// from Neal Becker
+
+struct Test {
+ boost::shared_ptr<X> x;
+};
+// ------
+
+
 BOOST_PYTHON_MODULE(shared_ptr_ext)
 {
     class_<A, boost::shared_ptr<A_Wrapper>, boost::noncopyable>("A")
@@ -193,6 +204,12 @@
             .def("value", &Z::value)
             .def("v", &Z::v, &ZWrap::default_v)
         );
+
+// from Neal Becker
+ class_<Test> ("Test")
+ .def_readonly ("x", &Test::x, "x")
+ ;
+// ------
 }
 
 #include "module_tail.cpp"

Modified: branches/hash/libs/regex/example/Jamfile.v2
==============================================================================
--- branches/hash/libs/regex/example/Jamfile.v2 (original)
+++ branches/hash/libs/regex/example/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -45,9 +45,9 @@
 [ regex-test-run snippets/regex_replace_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
 [ regex-test-run snippets/regex_search_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
 [ regex-test-run snippets/regex_split_example_1.cpp : -auto ]
-[ regex-test-run snippets/regex_split_example_2.cpp : $(BOOST_ROOT)/libs/regex/doc/index.html ]
+[ regex-test-run snippets/regex_split_example_2.cpp : $(BOOST_ROOT)/libs/regex/doc/html/index.html ]
 [ regex-test-run snippets/regex_token_iterator_eg_1.cpp : -auto ]
-[ regex-test-run snippets/regex_token_iterator_eg_2.cpp : $(BOOST_ROOT)/libs/regex/doc/index.html ]
+[ regex-test-run snippets/regex_token_iterator_eg_2.cpp : $(BOOST_ROOT)/libs/regex/doc/html/index.html ]
 [ regex-test-run snippets/regex_iterator_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
 [ run snippets/captures_example.cpp
   ../test/captures//boost_regex_extra
@@ -64,3 +64,4 @@
 
 
 
+

Modified: branches/hash/libs/regex/example/snippets/regex_split_example_2.cpp
==============================================================================
--- branches/hash/libs/regex/example/snippets/regex_split_example_2.cpp (original)
+++ branches/hash/libs/regex/example/snippets/regex_split_example_2.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -84,4 +84,3 @@
 }
 
 
-

Modified: branches/hash/libs/regex/example/snippets/regex_token_iterator_eg_2.cpp
==============================================================================
--- branches/hash/libs/regex/example/snippets/regex_token_iterator_eg_2.cpp (original)
+++ branches/hash/libs/regex/example/snippets/regex_token_iterator_eg_2.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -87,4 +87,3 @@
 }
 
 
-

Modified: branches/hash/libs/regex/test/regress/test_regex_search.hpp
==============================================================================
--- branches/hash/libs/regex/test/regress/test_regex_search.hpp (original)
+++ branches/hash/libs/regex/test/regress/test_regex_search.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -19,6 +19,9 @@
 #ifndef BOOST_REGEX_REGRESS_REGEX_SEARCH_HPP
 #define BOOST_REGEX_REGRESS_REGEX_SEARCH_HPP
 #include "info.hpp"
+#ifdef TEST_ROPE
+#include <rope>
+#endif
 //
 // this file implements a test for a regular expression that should compile,
 // followed by a search for that expression:
@@ -119,6 +122,40 @@
          BOOST_REGEX_TEST_ERROR("Unexpected match was found when using the match_any flag.", charT);
       }
    }
+#ifdef TEST_ROPE
+ std::rope<charT> rsearch_text;
+ for(unsigned i = 0; i < search_text.size(); ++i)
+ {
+ std::rope<charT> c(search_text[i]);
+ if(++i != search_text.size())
+ {
+ c.append(search_text[i]);
+ if(++i != search_text.size())
+ {
+ c.append(search_text[i]);
+ }
+ }
+ rsearch_text.append(c);
+ }
+ boost::match_results<std::rope<charT>::const_iterator> rwhat;
+ if(boost::regex_search(
+ rsearch_text.begin(),
+ rsearch_text.end(),
+ rwhat,
+ r,
+ opts))
+ {
+ test_result(rwhat, rsearch_text.begin(), answer_table);
+ }
+ else
+ {
+ if(answer_table[0] >= 0)
+ {
+ // we should have had a match but didn't:
+ BOOST_REGEX_TEST_ERROR("Expected match was not found.", charT);
+ }
+ }
+#endif
 }
 
 template<class charT, class traits>

Modified: branches/hash/libs/serialization/test/A.hpp
==============================================================================
--- branches/hash/libs/serialization/test/A.hpp (original)
+++ branches/hash/libs/serialization/test/A.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -22,6 +22,7 @@
 #include <cstddef> // size_t
 
 #include <boost/config.hpp>
+
 #if defined(BOOST_NO_STDC_NAMESPACE)
 namespace std{
     using ::rand;
@@ -133,7 +134,9 @@
     friend std::istream & operator>>(std::istream & is, A & a);
 };
 
-BOOST_TEST_DONT_PRINT_LOG_VALUE(A);
+#ifdef BOOST_TEST_DONT_PRINT_LOG_VALUE
+BOOST_TEST_DONT_PRINT_LOG_VALUE(A)
+#endif
 
 template<class S>
 void randomize(S &x)

Deleted: branches/hash/libs/system/build/Jamfile
==============================================================================
--- branches/hash/libs/system/build/Jamfile 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
+++ (empty file)
@@ -1,56 +0,0 @@
-# Boost System Library Build Jamfile
-
-# (C) Copyright Beman Dawes 2002, 2006
-
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or www.boost.org/LICENSE_1_0.txt)
-
-# See library home page at http://www.boost.org/libs/system
-
-subproject libs/system/build ;
-
-SOURCES = error_code ;
-
-lib boost_system
- : ../src/$(SOURCES).cpp
- : # build requirements
- <define>BOOST_SYSTEM_STATIC_LINK
- <sysinclude>$(BOOST_AUX_ROOT) <sysinclude>$(BOOST_ROOT)
- # common-variant-tag ensures that the library will
- # be named according to the rules used by the install
- # and auto-link features:
- common-variant-tag
- : debug release # build variants
- ;
-
-dll boost_system
- : ../src/$(SOURCES).cpp
- : # build requirements
- <define>BOOST_SYSTEM_DYN_LINK=1 # tell source we're building dll's
- <runtime-link>dynamic # build only for dynamic runtimes
- <sysinclude>$(BOOST_AUX_ROOT) <sysinclude>$(BOOST_ROOT)
- # common-variant-tag ensures that the library will
- # be named according to the rules used by the install
- # and auto-link features:
- common-variant-tag
- : debug release # build variants
- ;
-
-install system lib
- : <lib>boost_system <dll>boost_system
- ;
-
-stage stage/lib : <lib>boost_system <dll>boost_system
- :
- # copy to a path rooted at BOOST_ROOT:
- <locate>$(BOOST_ROOT)
- # make sure the names of the libraries are correctly named:
- common-variant-tag
- # add this target to the "stage" and "all" psuedo-targets:
- <target>stage
- <target>all
- :
- debug release
- ;
-
-# end

Modified: branches/hash/libs/system/build/Jamfile.v2
==============================================================================
--- branches/hash/libs/system/build/Jamfile.v2 (original)
+++ branches/hash/libs/system/build/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -9,6 +9,9 @@
 
 project boost/system
     : source-location ../src
+ : usage-requirements # pass these requirement to dependents (i.e. users)
+ <link>shared:<define>BOOST_SYSTEM_DYN_LINK=1
+ <link>static:<define>BOOST_SYSTEM_STATIC_LINK=1
     ;
 
 SOURCES = error_code ;

Deleted: branches/hash/libs/system/doc/error_code.html
==============================================================================
--- branches/hash/libs/system/doc/error_code.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
+++ (empty file)
@@ -1,265 +0,0 @@
-<html>
-
-<head>
-<meta http-equiv="Content-Language" content="en-us">
-<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
-<meta name="ProgId" content="FrontPage.Editor.Document">
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<title>Boost class error_code documentation
-</title>
-</head>
-
-<body bgcolor="#FFFFFF">
-
-<h1>Header boost/system/error_code.hpp</h1>
-<p>Introduction<br>
-Synopsis<br>
-Class error_category<br>
-&nbsp;&nbsp;&nbsp; Members<br>
-Class error_code<br>
-&nbsp;&nbsp;&nbsp; Members<br>
-Non-member functions<br>
-Acknowledgments</p>
-<h2><a name="Introduction">Introduction</a></h2>
-<p>This header provides components used to report errors from the operating
-system or other low-level application program interface (API). It is based on the <i>Diagnostics</i> portion of the TR2 filesystem
-proposal.</p>
-<p>Class <code>error_code</code> encapsulates an error
-code, usually one returned by an API. Class <code>
-error_category</code> encapsulates
-an identifier for&nbsp;a
-particular kind of error code. Users or
-third-parties may add additional error categories.</p>
-<h2><a name="Synopsis">Synopsis</a></h2>
-<pre>namespace boost
-{
- namespace system
- {
- class error_code;
-
- typedef int (*errno_decoder)( const error_code & );
- typedef std::string (*message_decoder)( const error_code & );
- typedef wstring_t (*wmessage_decoder)( const error_code & );
-
- class error_category : public identifier< uint_least32_t, error_category >
- {
- public:
- error_category();
- explicit error_category( value_type v );
- };
-
- const error_category errno_ecat = <i>unspecified-value</i>;
- const error_category native_ecat = <i>unspecified-value</i>;
-
- class error_code
- {
- public:
- typedef boost::int_least32_t value_type;
-
- // constructors:
- error_code();
- error_code( value_type val, error_category cat );
- void assign(value_type val, error_category cat);
-
- // observers:
- value_type value() const;
- error_category category() const;
- int to_errno() const; // name chosen to limit surprises
- // see Kohlhoff June 28 '06 boost posting
- std::string message() const;
- std::wstring wmessage() const;
-
- // relationals:
- bool operator==( const error_code & rhs ) const;
- bool operator!=( const error_code & rhs ) const;
- bool operator< ( const error_code & rhs ) const;
- bool operator<=( const error_code & rhs ) const;
- bool operator> ( const error_code & rhs ) const;
- bool operator>=( const error_code & rhs ) const;
-
- operator unspecified-bool-type() const;
- bool operator!() const;
-
- // statics:
- static error_category new_category( errno_decoder ed = 0,
- message_decoder md = 0, wmessage_decoder wmd = 0 );
- static bool get_decoders( error_category cat, errno_decoder & ed,
- message_decoder & md, wmessage_decoder & wmd );
-
- };
-
- std::size_t hash_value( const error_code & ec );
-
- } // namespace system
-} // namespace boost</pre>
-<h2><a name="Class-error_category">Class <code>error_category</code></a></h2>
-<p>Class <code>error_category</code>
-encapsulates an identifier for&nbsp;a
-particular kind of error code. Users or
-third-parties may add additional error categories.</p>
-<p>For inherited members, see <a href="../../utility/doc/identifier.html">
-identifier documentation</a>.</p>
-<h3><a name="Class-error_category-members">Class <code>error_category</code>
-members</a></h3>
-<pre>error_category();</pre>
-<blockquote>
- <p><i>Effects:</i> Constructs an object of class <code>error_category</code>.</p>
- <p><i>Postcondition:</i> <code>value() == value_type()</code>.</p>
-</blockquote>
-<pre>explicit error_category( value_type v );</pre>
-<blockquote>
- <p><i>Effects:</i> Constructs an object of class <code>error_category</code>.</p>
- <p><i>Postcondition:</i> <code>value() == v</code>.</p>
-</blockquote>
-<h2><a name="Class-error_code">Class <code>error_code</code></a></h2>
-<p>The value contained by an <code>error_code</code> object is the underlying
-API error code itself if the API error code type can be stored in <code>
-value_type</code> without loss of any actual values and if 0 represents no
-error. Otherwise, the value is an integer that maps to the API error code, with
-the exact method of mapping unspecified.</p>
-<h3><a name="Class-error_code-members">Class <code>error_code</code> members</a></h3>
-<pre><a name="error_code">error_code</a>();</pre>
-<blockquote>
- <p><i>Effects:</i> Constructs an object of class <code>error_code</code>.</p>
- <p><i>Postcondition:</i> <code>value() == 0 &amp;&amp; category() == errno_ecat</code>.</p>
-</blockquote>
-<pre><a name="error_code-2">error_code</a>( value_type val, error_category cat );</pre>
-<blockquote>
- <p><i>Effects:</i> Constructs an object of class <code>error_code</code>.</p>
- <p><i>Postcondition:</i> <code>value() == val &amp;&amp; category() == cat</code>.</p>
-</blockquote>
-<pre>void <a name="error_code-assign">assign</a>(value_type val, error_category cat);</pre>
-<blockquote>
- <p><i>Postconditions:</i> <code>value() == val &amp;&amp; category() == cat</code>.</p>
-</blockquote>
-<pre>value_type <a name="value">value</a>() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>value()</code> as specified by <i>postconditions</i>&nbsp;of the most
-recent <code>assign</code>, if any, or of the constructor.</p>
-</blockquote>
-<pre>error_category <a name="category">category</a>() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>category()</code> as specified by <i>postconditions</i>&nbsp;of the most
-recent <code>assign</code>, if any, or of the constructor.</p>
-</blockquote>
-<pre>int <a name="to_errno">to_errno</a>() const;</pre>
-<blockquote>
-<p><i>Effects: </i>&nbsp;<code>errno_decoder ed;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message_decoder md;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wmessage_decoder wmd;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool ok( get_decoders( category(), ed, md,
-wmd ) );</code></p>
-<p><i>Returns:</i>&nbsp; If <code>ok &amp;&amp; ed</code>, <code>ed(*this)</code>,
-otherwise <code>EOTHER</code>.</p>
-<p><i>[Note:</i> The intent is to return the <a href="http://www.unix.org/single_unix_specification/">
-ISO/IEC 9945:2003, <i>Portable Operating System Interface (POSIX)</i></a> error
-number that the implementation determines most closely corresponds to <code>
-value()</code>. <i>--end note.]</i></p>
-</blockquote>
-<pre>std::string <a name="message">message</a>() const;</pre>
-<blockquote>
-<p><i>Effects: </i>&nbsp;<code>errno_decoder ed;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message_decoder md;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wmessage_decoder wmd;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool ok( get_decoders( category(), ed, md,
-wmd ) );</code></p>
-<p><i>Returns:</i>&nbsp; If <code>ok &amp;&amp; md</code>, <code>md(*this)</code>,
-otherwise <code>std::string()</code>.</p>
-<p><i>Remarks:</i> If <code>category() == errno_ec</code>, the string is as
-returned by <code>strerror()</code>. Otherwise, the method used by the
-implementation to determine the string is unspecified.</p>
-<p><i>[Note:</i> The intent is to return a locale sensitive string that describes the error
-corresponding to <code>value()</code>.&nbsp; <i>--end note.]</i></p>
-</blockquote>
-<pre>wstring_t <a name="wmessage">wmessage</a>() const;</pre>
-<blockquote>
-<p><i>Effects: </i>&nbsp;<code>errno_decoder ed;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; message_decoder md;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wmessage_decoder wmd;<br>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool ok( get_decoders( category(), ed, md,
-wmd ) );</code></p>
-<p><i>Returns:</i>&nbsp; If <code>ok &amp;&amp; wmd</code>, <code>wmd(*this)</code>,
-otherwise <code>std::wstring()</code>.</p>
-<p><i>Remarks:</i> If <code>category() == errno_ec</code>, the string is as
-returned by <code>strerror()</code>. Otherwise, the method used by the
-implementation to determine the string is unspecified.</p>
-<p><i>[Note:</i> The intent is to return a locale sensitive string that describes the error
-corresponding to <code>value()</code>.&nbsp; <i>--end note.]</i></p>
-</blockquote>
-<pre>bool <a name="operator-eq">operator</a>==(const error_code &amp; rhs) const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>value() == rhs.value() &amp;&amp; category() == rhs.category()</code>.</p>
-</blockquote>
-<pre>bool <a name="operator-ne">operator!</a>=(const error_code &amp; rhs) const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>!(*this == rhs)</code>.</p>
-</blockquote>
-<pre>bool <a name="operator-lt">operator</a>&lt;(const error_code &amp; rhs) const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>category() &lt; rhs.category() || ( category() ==
- rhs.category() &amp;&amp; value() &lt; rhs.value() )</code>.</p>
-</blockquote>
-<pre>bool <a name="operator-le">operator</a>&lt;=(const error_code &amp; rhs) const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>*this == rhs || *this &lt; rhs</code>.</p>
-</blockquote>
-<pre>bool <a name="operator-gt">operator</a>&gt;(const error_code &amp; rhs) const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>!(*this &lt;= rhs)</code>.</p>
-</blockquote>
-<pre>bool <a name="operator-ge">operator</a>&gt;=(const error_code &amp; rhs) const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>!(*this &lt; rhs)</code>.</p>
-</blockquote>
-<pre><a name="operator-unspecified-bool-type">operator <i>unspecified-bool-type</i></a>() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>&nbsp;value() != value_type() ? <i>unspecified-bool-type</i>
- : 0</code>.</p>
-<p><i>Throws:</i> nothing.</p>
-<p>[ <i>Note: </i>This conversion can be used in contexts where a <code>bool</code>
-is expected (e.g., an <code>if</code> condition); however, implicit conversions
-(e.g., to <code>int</code>) that can occur with <code>bool</code> are not
-allowed, eliminating some sources of user error. One possible implementation
-choice for this type is pointer-to-member. <i>—end note </i>]</p>
-</blockquote>
-<pre>bool <a name="operator-bang">operator!</a>() const;</pre>
-<blockquote>
- <p><i>Returns:</i> <code>&nbsp;value() == value_type()</code>.</p>
-</blockquote>
-<pre>static error_category <a name="new_category">new_category</a>( errno_decoder ed = 0, message_decoder md = 0, wmessage_decoder wmd = 0 );</pre>
-<blockquote>
- <p><i>Effects:</i> Constructs a new <code>error_category</code> object.<code>
- </code>Creates an association between the object and <code>ed</code>,&nbsp;
- <code>md</code>, and <code>wmd</code>.</p>
- <p><i>Returns:</i> The object.</p>
-</blockquote>
-<pre>static bool <a name="get_decoders">get_decoders</a>( error_category cat, errno_decoder &amp; ed, message_decoder &amp; md, wmessage_decoder &amp; wmd );</pre>
-<blockquote>
- <p><i>Effects:</i> If <code>cat</code> was created by <code>new_category()</code>,
- sets <code>ed</code>,&nbsp; <code>md</code>, and <code>wmd</code>
- to the respective values associated with <code>cat</code> by <code>
- new_category()</code>. Otherwise, no effects.</p>
- <p><i>Returns:</i> If <code>cat</code> was created by <code>new_category()</code>,
- <code>true</code>, otherwise <code>false</code>.</p>
-</blockquote>
-<h2><a name="Non-member">Non-member</a> functions</h2>
-<pre>std::size_t <a name="hash_value">hash_value</a>( const error_code &amp; ec );</pre>
-<blockquote>
- <p><i>Returns: </i>&nbsp;A hash value representing <code>ec</code>.</p>
-</blockquote>
- <h2><a name="Acknowledgements">Acknowledgements</a></h2>
- <p>Christopher Kohlhoff and Peter Dimov made important contributions to the
- design. Comments and suggestions were also received from Pavel Vozenilek,
- Gennaro Prota, Dave Abrahams, Jeff Garland, Iain Hanson, Oliver Kowalke, and
- Oleg Abrosimov.</p>
-<hr>
-<p>Last revised:
-<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->06 September, 2006<!--webbot bot="Timestamp" endspan i-checksum="39349" --></p>
-<p>© Copyright Beman Dawes, 2006</p>
-<p>Distributed under the Boost Software License, Version 1.0. (See accompanying
-file LICENSE_1_0.txt or copy at
-www.boost.org/ LICENSE_1_0.txt)</p>
-
-</body>
-
-</html>
\ No newline at end of file

Deleted: branches/hash/libs/system/doc/system_error.html
==============================================================================
--- branches/hash/libs/system/doc/system_error.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
+++ (empty file)
@@ -1,127 +0,0 @@
-<html>
-
-<head>
-<meta http-equiv="Content-Language" content="en-us">
-<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
-<meta name="ProgId" content="FrontPage.Editor.Document">
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-<title>Boost system/system_error.hpp documentation
-</title>
-</head>
-
-<body bgcolor="#FFFFFF">
-
-<h1>Header boost/system/system_error.hpp</h1>
-<p>Introduction<br>
-Synopsis<br>
-Class system_error<br>
-&nbsp;&nbsp;&nbsp; Members<br>
-Acknowledgements</p>
-<h2><a name="Introduction">Introduction</a></h2>
-<p>This header provides components used to report errors originating from the
-operating system or other low-level application program interfaces (API's). It is based on the <i>Diagnostics</i>
-portion of the TR2 filesystem proposal.</p>
-<h2><a name="Synopsis">Synopsis</a></h2>
-<pre>namespace boost
-{
- namespace system
- {
- enum message_action { append_message, no_message };
-
- class system_error : public std::runtime_error
- {
- public:
- explicit system_error( error_code ec );
-
- system_error( error_code ec, const std::string &amp; what_arg,
- message_action ma = append_message );
-
- system_error( error_code::value_type ev, error_category ecat );
-
- system_error( error_code::value_type ev, error_category ecat,
- const std::string &amp; what_arg, message_action ma = append_message );
-
- virtual ~system_error() throw() {}
-
- const error_code &amp; code() const throw();
-
- const char * what() const throw();
-
- private:
- error_code m_error_code; // for exposition only
- bool m_append_message; // for exposition only
- mutable std::string m_what; // for exposition only
- };
- } // namespace system
-} // namespace boost</pre>
-<h2><a name="Class-system_error">Class <code>system_error</code></a></h2>
-<p>Class <code>system_error</code> defines
-the type of an object that may be thrown as
-an exception to report errors originating from the operating system or other
-low-level API's, or used as a base class for more refined exception classes. It
-encapsulates an <code>error_code</code> object.</p>
-<blockquote>
-<p><i>[Note:</i> A single low-level class, rather than a higher level exception
-class hierarchy, is provided to allow users access to low-level error codes
-originating from the operating system or other low-level API's, and to
-accommodate the open-ended set of errors that may be reported by such API's. <i>
---end note.]</i></p>
-</blockquote>
-<h2><a name="Class-system_error-members">Class <code>system_error</code> Members</a></h2>
-<p><code>explicit <a name="system_error-1">system_error</a>( error_code ec );</code></p>
-<blockquote>
- <p><i>Effects:</i> Constructs an object of class <code>system_error</code>.</p>
- <p><i>Postcondition:</i> <code>code() == ec &amp;&amp; *runtime_error::what() == '\0'
- &amp;&amp; </code><code>m_append_message</code>.</p>
-</blockquote>
-<pre><a name="system_error-2">system_error</a>( error_code ec, const std::string &amp; what_arg, message_action ma = append_message );</pre>
-<blockquote>
- <p><i>Effects:</i> Constructs an object of class <code>system_error</code>.</p>
- <p><i>Postcondition:</i> <code>code() == ec &amp;&amp; std::string(runtime_error::what())
- == </code><code>what_arg</code><code> &amp;&amp; m_append_message == ma</code>.</p>
-</blockquote>
-<pre><a name="system_error-3">system_error</a>( error_code::value_type ev, error_category ecat );</pre>
-<blockquote>
- <p><i>Effects:</i> Constructs an object of class <code>system_error</code>.</p>
- <p><i>Postcondition:</i> <code>code() == error_code(ev,ecat) &amp;&amp; *runtime_error::what()
- == '\0' &amp;&amp; m_append_message</code>.</p>
-</blockquote>
-<pre><a name="system_error-4">system_error</a>( error_code::value_type ev, error_category ecat,
- const std::string &amp; what_arg, message_action ma = append_message );</pre>
-<blockquote>
- <p><i>Effects:</i> Constructs an object of class <code>system_error</code>.</p>
- <p><i>Postcondition:</i> <code>code() == error_code(ev,ecat) &amp;&amp; std::string(runtime_error::what())
- == </code><code>what_arg</code><code> &amp;&amp; m_append_message == ma</code>.</p>
-</blockquote>
-<pre>const error_code &amp; <a name="code">code</a>() const throw();</pre>
-<blockquote>
- <p><i>Returns: </i>&nbsp;<code>m_error_code</code></p>
-</blockquote>
-<pre>const char * <a name="what">what</a>() const throw();</pre>
-<blockquote>
- <p><i>Returns: </i>If <code>!m_error_code || !m_append_message</code>, <code>
- runtime_error::what()</code>. Otherwise, a string as if computed by:</p>
- <blockquote>
- <pre>m_what = runtime_error::what();
-if ( !m_what.empty() ) m_what += &quot;: &quot;;
-m_what += m_error_code.message();
-return m_what.c_str();</pre>
- </blockquote>
-</blockquote>
- <h2><a name="Acknowledgements">Acknowledgements</a></h2>
- <p>Christopher Kohlhoff and Peter Dimov made important contributions to the
- design. Comments and suggestions were also received from Pavel Vozenilek,
- Gennaro Prota, Dave Abrahams, Jeff Garland, Iain Hanson, Jeremy Day, Bo
- Persson, Oliver Kowalke, and
- Oleg Abrosimov.</p>
-<hr>
-<p>Last revised:
-<!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B, %Y" startspan -->22 July, 2006<!--webbot bot="Timestamp" endspan i-checksum="21146" --></p>
-<p>© Copyright Beman Dawes, 2006</p>
-<p>Distributed under the Boost Software License, Version 1.0. (See accompanying
-file LICENSE_1_0.txt or copy at
-www.boost.org/ LICENSE_1_0.txt)</p>
-
-</body>
-
-</html>
\ No newline at end of file

Modified: branches/hash/libs/system/src/error_code.cpp
==============================================================================
--- branches/hash/libs/system/src/error_code.cpp (original)
+++ branches/hash/libs/system/src/error_code.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -30,15 +30,12 @@
 #include <cassert>
 
 using namespace boost::system;
+using namespace boost::system::posix;
 
 #include <cstring> // for strerror/strerror_r
 
-# ifdef BOOST_NO_STDC_NAMESPACE
- namespace std { using ::strerror; }
-# endif
-
 # if defined( BOOST_WINDOWS_API )
-# include "windows.h"
+# include <windows.h>
 # ifndef ERROR_INCORRECT_SIZE
 # define ERROR_INCORRECT_SIZE ERROR_BAD_ARGUMENTS
 # endif
@@ -49,75 +46,282 @@
 namespace
 {
 
-#ifdef BOOST_WINDOWS_API
- struct native_to_errno_t
+ struct system_to_posix_t
   {
- boost::int32_t native_value;
- int to_errno;
+ int system_value;
+ boost::system::posix::posix_errno posix_value;
   };
 
- const native_to_errno_t native_to_errno[] =
+ const system_to_posix_t system_to_posix[] =
   {
+
+#ifdef BOOST_POSIX_API
+ // POSIX-like O/S -> posix_errno decode table ----------------------------//
+
+ // most common errors first to speed sequential search
+ { ENOENT, no_such_file_or_directory },
+ { EACCES, permission_denied },
+ { EINVAL, invalid_argument },
+
+ // rest are alphabetical for easy maintenance
+ { 0, success },
+ { E2BIG, argument_list_too_long },
+ { EADDRINUSE, address_in_use },
+ { EADDRNOTAVAIL, address_not_available },
+ { EAFNOSUPPORT, address_family_not_supported },
+ { EAGAIN, resource_unavailable_try_again },
+ { EALREADY, connection_already_in_progress },
+ { EBADF, bad_file_descriptor },
+ { EBADMSG, bad_message },
+ { EBUSY, device_or_resource_busy },
+ { ECANCELED, operation_canceled },
+ { ECHILD, no_child_process },
+ { ECONNABORTED, connection_aborted },
+ { ECONNREFUSED, connection_refused },
+ { ECONNRESET, connection_reset },
+ { EDEADLK, resource_deadlock_would_occur },
+ { EDESTADDRREQ, destination_address_required },
+ { EDOM, argument_out_of_domain },
+ { EEXIST, file_exists },
+ { EFAULT, bad_address },
+ { EFBIG, file_too_large },
+ { EHOSTUNREACH, host_unreachable },
+ { EIDRM, identifier_removed },
+ { EILSEQ, illegal_byte_sequence },
+ { EINPROGRESS, operation_in_progress },
+ { EINTR, interrupted },
+ { EIO, io_error },
+ { EISCONN, already_connected },
+ { EISDIR, is_a_directory },
+ { ELOOP, too_many_synbolic_link_levels },
+ { EMFILE, too_many_files_open },
+ { EMLINK, too_many_links },
+ { EMSGSIZE, message_size },
+ { ENAMETOOLONG, filename_too_long },
+ { ENETDOWN, network_down },
+ { ENETRESET, network_reset },
+ { ENETUNREACH, network_unreachable },
+ { ENFILE, too_many_files_open_in_system },
+ { ENOBUFS, no_buffer_space },
+ { ENODATA, no_message_available },
+ { ENODEV, no_such_device },
+ { ENOEXEC, executable_format_error },
+ { ENOLCK, no_lock_available },
+ { ENOLINK, no_link },
+ { ENOMEM, not_enough_memory },
+ { ENOMSG, no_message },
+ { ENOPROTOOPT, no_protocol_option },
+ { ENOSPC, no_space_on_device },
+ { ENOSR, no_stream_resources },
+ { ENOSTR, not_a_stream },
+ { ENOSYS, function_not_supported },
+ { ENOTCONN, not_connected },
+ { ENOTDIR, not_a_directory },
+ { ENOTEMPTY, directory_not_empty },
+ { ENOTRECOVERABLE, state_not_recoverable },
+ { ENOTSOCK, not_a_socket },
+ { ENOTSUP, not_supported },
+ { ENOTTY, inappropriate_io_control_operation },
+ { ENXIO, no_such_device_or_address },
+ { EOPNOTSUPP, operation_not_supported },
+ { EOVERFLOW, value_too_large },
+ { EOWNERDEAD, owner_dead },
+ { EPERM, operation_not_permitted },
+ { EPIPE, broken_pipe },
+ { EPROTO, protocol_error },
+ { EPROTONOSUPPORT, protocol_not_supported },
+ { EPROTOTYPE, wrong_protocol_type },
+ { ERANGE, result_out_of_range },
+ { EROFS, read_only_file_system },
+ { ESPIPE, invalid_seek },
+ { ESRCH, no_such_process },
+ { ETIME, stream_timeout },
+ { ETIMEDOUT, timed_out },
+ { ETXTBSY, text_file_busy },
+ { EWOULDBLOCK, operation_would_block },
+ { EXDEV, cross_device_link }
+
+#else
+
+ // Windows system -> posix_errno decode table ----------------------------//
+
     // see WinError.h comments for descriptions of errors
     
     // most common errors first to speed sequential search
- { ERROR_FILE_NOT_FOUND, ENOENT },
- { ERROR_PATH_NOT_FOUND, ENOENT },
+ { ERROR_FILE_NOT_FOUND, no_such_file_or_directory },
+ { ERROR_PATH_NOT_FOUND, no_such_file_or_directory },
 
     // rest are alphabetical for easy maintenance
- { 0, 0 }, // no error
- { ERROR_ACCESS_DENIED, EACCES },
- { ERROR_ALREADY_EXISTS, EEXIST },
- { ERROR_BAD_UNIT, ENODEV },
- { ERROR_BUFFER_OVERFLOW, ENAMETOOLONG },
- { ERROR_BUSY, EBUSY },
- { ERROR_BUSY_DRIVE, EBUSY },
- { ERROR_CANNOT_MAKE, EACCES },
- { ERROR_CANTOPEN, EIO },
- { ERROR_CANTREAD, EIO },
- { ERROR_CANTWRITE, EIO },
- { ERROR_CURRENT_DIRECTORY, EACCES },
- { ERROR_DEV_NOT_EXIST, ENODEV },
- { ERROR_DEVICE_IN_USE, EBUSY },
- { ERROR_DIR_NOT_EMPTY, ENOTEMPTY },
- { ERROR_DIRECTORY, EINVAL }, // WinError.h: "The directory name is invalid"
- { ERROR_DISK_FULL, ENOSPC },
- { ERROR_FILE_EXISTS, EEXIST },
- { ERROR_HANDLE_DISK_FULL, ENOSPC },
- { ERROR_INVALID_ACCESS, EACCES },
- { ERROR_INVALID_DRIVE, ENODEV },
- { ERROR_INVALID_FUNCTION, ENOSYS },
- { ERROR_INVALID_HANDLE, EBADHANDLE },
- { ERROR_INVALID_NAME, EINVAL },
- { ERROR_LOCK_VIOLATION, EACCES },
- { ERROR_LOCKED, EACCES },
- { ERROR_NEGATIVE_SEEK, EINVAL },
- { ERROR_NOACCESS, EACCES },
- { ERROR_NOT_ENOUGH_MEMORY, ENOMEM },
- { ERROR_NOT_READY, EAGAIN },
- { ERROR_NOT_SAME_DEVICE, EXDEV },
- { ERROR_OPEN_FAILED, EIO },
- { ERROR_OPEN_FILES, EBUSY },
- { ERROR_OUTOFMEMORY, ENOMEM },
- { ERROR_READ_FAULT, EIO },
- { ERROR_SEEK, EIO },
- { ERROR_SHARING_VIOLATION, EACCES },
- { ERROR_TOO_MANY_OPEN_FILES, ENFILE },
- { ERROR_WRITE_FAULT, EIO },
- { ERROR_WRITE_PROTECT, EROFS }
+ { 0, success },
+ { ERROR_ACCESS_DENIED, permission_denied },
+ { ERROR_ALREADY_EXISTS, file_exists },
+ { ERROR_BAD_UNIT, no_such_device },
+ { ERROR_BUFFER_OVERFLOW, filename_too_long },
+ { ERROR_BUSY, device_or_resource_busy },
+ { ERROR_BUSY_DRIVE, device_or_resource_busy },
+ { ERROR_CANNOT_MAKE, permission_denied },
+ { ERROR_CANTOPEN, io_error },
+ { ERROR_CANTREAD, io_error },
+ { ERROR_CANTWRITE, io_error },
+ { ERROR_CURRENT_DIRECTORY, permission_denied },
+ { ERROR_DEV_NOT_EXIST, no_such_device },
+ { ERROR_DEVICE_IN_USE, device_or_resource_busy },
+ { ERROR_DIR_NOT_EMPTY, directory_not_empty },
+ { ERROR_DIRECTORY, invalid_argument }, // WinError.h: "The directory name is invalid"
+ { ERROR_DISK_FULL, no_space_on_device },
+ { ERROR_FILE_EXISTS, file_exists },
+ { ERROR_HANDLE_DISK_FULL, no_space_on_device },
+ { ERROR_INVALID_ACCESS, permission_denied },
+ { ERROR_INVALID_DRIVE, no_such_device },
+ { ERROR_INVALID_FUNCTION, function_not_supported },
+ { ERROR_INVALID_HANDLE, invalid_argument },
+ { ERROR_INVALID_NAME, invalid_argument },
+ { ERROR_LOCK_VIOLATION, no_lock_available },
+ { ERROR_LOCKED, no_lock_available },
+ { ERROR_NEGATIVE_SEEK, invalid_argument },
+ { ERROR_NOACCESS, permission_denied },
+ { ERROR_NOT_ENOUGH_MEMORY, not_enough_memory },
+ { ERROR_NOT_READY, resource_unavailable_try_again },
+ { ERROR_NOT_SAME_DEVICE, cross_device_link },
+ { ERROR_OPEN_FAILED, io_error },
+ { ERROR_OPEN_FILES, device_or_resource_busy },
+ { ERROR_OUTOFMEMORY, not_enough_memory },
+ { ERROR_READ_FAULT, io_error },
+ { ERROR_SEEK, io_error },
+ { ERROR_SHARING_VIOLATION, permission_denied },
+ { ERROR_TOO_MANY_OPEN_FILES, too_many_files_open },
+ { ERROR_WRITE_FAULT, io_error },
+ { ERROR_WRITE_PROTECT, permission_denied }
+
+#endif
+ };
+
+ // standard error categories -------------------------------------------//
+
+ class posix_error_category : public error_category
+ {
+ public:
+ const char * name() const;
+ std::string message( int ev ) const;
   };
 
- int windows_ed( const error_code & ec )
+ class system_error_category : public error_category
   {
- const native_to_errno_t * cur = native_to_errno;
+ public:
+ const char * name() const;
+ posix::posix_errno posix( int ev ) const;
+ std::string message( int ev ) const;
+ error_condition default_error_condition( int ev ) const;
+ };
+
+ const posix_error_category posix_category_const;
+ const system_error_category system_category_const;
+
+ // posix_error_category implementation ---------------------------------//
+
+ const char * posix_error_category::name() const
+ {
+ return "POSIX";
+ }
+
+ std::string posix_error_category::message( int ev ) const
+ {
+ // strerror_r is preferred because it is always thread safe,
+ // however, we fallback to strerror in certain cases because:
+ // -- Windows doesn't provide strerror_r.
+ // -- HP and Sundo provide strerror_r on newer systems, but there is
+ // no way to tell if is available at runtime and in any case their
+ // versions of strerror are thread safe anyhow.
+ // -- Linux only sometimes provides strerror_r.
+ // -- Tru64 provides strerror_r only when compiled -pthread.
+ // -- VMS doesn't provide strerror_r, but on this platform, strerror is
+ // thread safe.
+ # if defined(BOOST_WINDOWS_API) || defined(__hpux) || defined(__sun)\
+ || (defined(__linux) && (!defined(__USE_XOPEN2K) || defined(BOOST_SYSTEM_USE_STRERROR)))\
+ || (defined(__osf__) && !defined(_REENTRANT))\
+ || (defined(__vms))
+ const char * c_str = std::strerror( ev );
+ return std::string( c_str ? c_str : "invalid_argument" );
+ # else
+ char buf[64];
+ char * bp = buf;
+ std::size_t sz = sizeof(buf);
+ # if defined(__CYGWIN__) || defined(__USE_GNU)
+ // Oddball version of strerror_r
+ const char * c_str = strerror_r( ev, bp, sz );
+ return std::string( c_str ? c_str : "invalid_argument" );
+ # else
+ // POSIX version of strerror_r
+ int result;
+ for (;;)
+ {
+ // strerror_r returns 0 on success, otherwise ERANGE if buffer too small,
+ // invalid_argument if ev not a valid error number
+ if ( (result = strerror_r( ev, bp, sz )) == 0 )
+ break;
+ else
+ {
+ # if defined(__linux)
+ // Linux strerror_r returns -1 on error, with error number in errno
+ result = errno;
+ # endif
+ if ( result != ERANGE ) break;
+ if ( sz > sizeof(buf) ) std::free( bp );
+ sz *= 2;
+ if ( (bp = static_cast<char*>(std::malloc( sz ))) == 0 )
+ return std::string( "ENOMEM" );
+ }
+ }
+ try
+ {
+ std::string msg( ( result == invalid_argument ) ? "invalid_argument" : bp );
+ if ( sz > sizeof(buf) ) std::free( bp );
+ sz = 0;
+ return msg;
+ }
+ catch(...)
+ {
+ if ( sz > sizeof(buf) ) std::free( bp );
+ throw;
+ }
+ # endif
+ # endif
+ }
+ // system_error_category implementation --------------------------------//
+
+ const char * system_error_category::name() const
+ {
+ return "system";
+ }
+
+ posix_errno system_error_category::posix( int ev ) const
+ {
+ const system_to_posix_t * cur = system_to_posix;
     do
     {
- if ( ec.value() == cur->native_value ) return cur->to_errno;
+ if ( ev == cur->system_value )
+ return cur->posix_value;
       ++cur;
- } while ( cur != native_to_errno + sizeof(native_to_errno)/sizeof(native_to_errno_t) );
- return EOTHER;
+ } while ( cur != system_to_posix
+ + sizeof(system_to_posix)/sizeof(system_to_posix_t) );
+ return static_cast<posix::posix_errno>(-1);
+ }
+
+ error_condition system_error_category::default_error_condition( int ev ) const
+ {
+ int tmp = posix(ev);
+ return tmp >= 0
+ ? error_condition( tmp, posix_category )
+ : error_condition( ev, system_category );
   }
 
+# if !defined( BOOST_WINDOWS_API )
+
+ std::string system_error_category::message( int ev ) const
+ {
+ return posix_category.message( ev );
+ }
+# else
 // TODO:
   
 //Some quick notes on the implementation (sorry for the noise if
@@ -133,8 +337,7 @@
 //
 //Cheers,
 //Chris
-
- std::string windows_md( const error_code & ec )
+ std::string system_error_category::message( int ev ) const
   {
     LPVOID lpMsgBuf;
     ::FormatMessageA(
@@ -142,7 +345,7 @@
         FORMAT_MESSAGE_FROM_SYSTEM |
         FORMAT_MESSAGE_IGNORE_INSERTS,
         NULL,
- ec.value(),
+ ev,
         MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
         (LPSTR) &lpMsgBuf,
         0,
@@ -153,185 +356,31 @@
     while ( str.size()
       && (str[str.size()-1] == '\n' || str[str.size()-1] == '\r') )
         str.erase( str.size()-1 );
+ if ( str.size() && str[str.size()-1] == '.' )
+ { str.erase( str.size()-1 ); }
     return str;
   }
-
- wstring_t windows_wmd( const error_code & ec )
- {
- LPVOID lpMsgBuf;
- ::FormatMessageW(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- ec.value(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
- (LPWSTR) &lpMsgBuf,
- 0,
- NULL
- );
- wstring_t str( static_cast<LPCWSTR>(lpMsgBuf) );
- ::LocalFree( lpMsgBuf ); // free the buffer
- while ( str.size()
- && (str[str.size()-1] == L'\n' || str[str.size()-1] == L'\r') )
- str.erase( str.size()-1 );
- return str;
- }
-
-#endif
-
- int errno_ed( const error_code & ec ) { return ec.value(); }
-
- std::string errno_md( const error_code & ec )
- {
- // strerror_r is preferred because it is always thread safe,
- // however, we fallback to strerror in certain cases because:
- // -- Windows doesn't provide strerror_r.
- // -- HP and Sundo provide strerror_r on newer systems, but there is
- // no way to tell if is available at runtime and in any case their
- // versions of strerror are thread safe anyhow.
- // -- Linux only sometimes provides strerror_r.
- // -- Tru64 provides strerror_r only when compiled -pthread.
- // -- VMS doesn't provide strerror_r, but on this platform, strerror is
- // thread safe.
-# if defined(BOOST_WINDOWS_API) || defined(__hpux) || defined(__sun)\
- || (defined(__linux) && (!defined(__USE_XOPEN2K) || defined(BOOST_SYSTEM_USE_STRERROR)))\
- || (defined(__osf__) && !defined(_REENTRANT))\
- || (defined(__vms))
- const char * c_str = std::strerror( ec.value() );
- return std::string( c_str ? c_str : "EINVAL" );
-# else
- char buf[64];
- char * bp = buf;
- std::size_t sz = sizeof(buf);
-# if defined(__CYGWIN__) || defined(__USE_GNU)
- // Oddball version of strerror_r
- const char * c_str = strerror_r( ec.value(), bp, sz );
- return std::string( c_str ? c_str : "EINVAL" );
-# else
- // POSIX version of strerror_r
- int result;
- for (;;)
- {
- // strerror_r returns 0 on success, otherwise ERANGE if buffer too small,
- // EINVAL if ec.value() not a valid error number
- if ( (result = strerror_r( ec.value(), bp, sz )) == 0 )
- break;
- else
- {
-# if defined(__linux)
- // Linux strerror_r returns -1 on error, with error number in errno
- result = errno;
-# endif
- if ( result != ERANGE ) break;
- if ( sz > sizeof(buf) ) std::free( bp );
- sz *= 2;
- if ( (bp = static_cast<char*>(std::malloc( sz ))) == 0 )
- return std::string( "ENOMEM" );
- }
- }
- try
- {
- std::string msg( ( result == EINVAL ) ? "EINVAL" : bp );
- if ( sz > sizeof(buf) ) std::free( bp );
- sz = 0;
- return msg;
- }
- catch(...)
- {
- if ( sz > sizeof(buf) ) std::free( bp );
- throw;
- }
-# endif
 # endif
- }
-
- wstring_t errno_wmd( const error_code & ec )
- {
- // TODO: Implement this:
- assert( 0 && "sorry, not implemented yet" );
- wstring_t str;
- return str;
- }
 
- struct decoder_element
- {
- errno_decoder ed;
- message_decoder md;
- wmessage_decoder wmd;
-
- decoder_element( errno_decoder ed_,
- message_decoder md_, wmessage_decoder wmd_ )
- : ed(ed_), md(md_), wmd(wmd_) {}
-
- decoder_element() : ed(0), md(0), wmd(0) {}
- };
-
- typedef std::vector< decoder_element > decoder_vec_type;
-
- decoder_vec_type & decoder_vec()
- {
- static const decoder_element init_decoders[] =
-#ifdef BOOST_WINDOWS_API
- { decoder_element( errno_ed, errno_md, errno_wmd ),
- decoder_element( windows_ed, windows_md, windows_wmd) };
-#else
- { decoder_element( errno_ed, errno_md, errno_wmd ) };
-#endif
-
- static decoder_vec_type dv( init_decoders,
- init_decoders + sizeof(init_decoders)/sizeof(decoder_element));
- return dv;
- }
 } // unnamed namespace
 
 namespace boost
 {
   namespace system
   {
- error_category error_code::new_category(
- errno_decoder ed, message_decoder md, wmessage_decoder wmd )
- {
- decoder_vec().push_back( decoder_element( ed, md, wmd ) );
- return error_category( static_cast<value_type>(decoder_vec().size()) - 1 );
- }
 
- bool error_code::get_decoders( error_category cat,
- errno_decoder & ed, message_decoder & md, wmessage_decoder & wmd )
- {
- if ( cat.value() < decoder_vec().size() )
- {
- ed = decoder_vec()[cat.value()].ed;
- md = decoder_vec()[cat.value()].md;
- wmd = decoder_vec()[cat.value()].wmd;
- return true;
- }
- return false;
- }
+ BOOST_SYSTEM_DECL const error_category & posix_category
+ = posix_category_const;
 
- int error_code::to_errno() const
- {
- return (m_category.value() < decoder_vec().size()
- && decoder_vec()[m_category.value()].ed)
- ? decoder_vec()[m_category.value()].ed( *this )
- : EOTHER;
- }
+ BOOST_SYSTEM_DECL const error_category & system_category
+ = system_category_const;
 
- std::string error_code::message() const
- {
- return (m_category.value() < decoder_vec().size()
- && decoder_vec()[m_category.value()].md)
- ? decoder_vec()[m_category.value()].md( *this )
- : std::string( "API error" );
- }
+ // deprecated synonyms
+ BOOST_SYSTEM_DECL const error_category & errno_ecat
+ = posix_category_const;
 
- wstring_t error_code::wmessage() const
- {
- return (m_category.value() < decoder_vec().size()
- && decoder_vec()[m_category.value()].wmd)
- ? decoder_vec()[m_category.value()].wmd( *this )
- : wstring_t( L"API error" );
- }
+ BOOST_SYSTEM_DECL const error_category & native_ecat
+ = system_category_const;
 
   } // namespace system
 } // namespace boost

Modified: branches/hash/libs/system/test/Jamfile.v2
==============================================================================
--- branches/hash/libs/system/test/Jamfile.v2 (original)
+++ branches/hash/libs/system/test/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -11,12 +11,16 @@
     : requirements
       <library>/boost/system//boost_system
       <define>BOOST_ALL_NO_LIB
+ <toolset>msvc:<asynch-exceptions>on
     ;
 
    test-suite "system"
        : [ run error_code_test.cpp
- : : : <define>BOOST_SYSTEM_STATIC_LINK
- <runtime-link>static <link>static
+ : # command line
+ : # input files
+ : # requirements
+ <define>BOOST_SYSTEM_STATIC_LINK
+ <link>static
          ]
          [ run error_code_test.cpp
            : : : <define>BOOST_SYSTEM_DYN_LINK
@@ -24,18 +28,21 @@
          ]
          [ run error_code_user_test.cpp
            : : : <define>BOOST_SYSTEM_STATIC_LINK
- <runtime-link>static <link>static
+ <link>static
          ]
          [ run error_code_user_test.cpp
            : : : <define>BOOST_SYSTEM_DYN_LINK
                  : error_code_user_test_dll
          ]
          [ run system_error_test.cpp
- : : : <define>BOOST_ESYSTEM_STATIC_LINK
- <runtime-link>static <link>static
+ : : : <define>BOOST_SYSTEM_STATIC_LINK
+ <link>static
          ]
          [ run system_error_test.cpp
             : : : <define>BOOST_SYSTEM_DYN_LINK
                   : system_error_test_dll
          ]
+ [ run header_only_test.cpp
+ : : : <link>static
+ ]
          ;

Modified: branches/hash/libs/system/test/error_code_test.cpp
==============================================================================
--- branches/hash/libs/system/test/error_code_test.cpp (original)
+++ branches/hash/libs/system/test/error_code_test.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -10,7 +10,7 @@
 //----------------------------------------------------------------------------//
 
 // VC++ 8.0 warns on usage of certain Standard Library and API functions that
-// can be cause buffer overruns or other possible security issues if misused.
+// can cause buffer overruns or other possible security issues if misused.
 // See http://msdn.microsoft.com/msdnmag/issues/05/05/SafeCandC/default.aspx
 // But the wording of the warning is misleading and unsettling, there are no
 // portable alternative functions, and VC++ 8.0's own libraries use the
@@ -20,6 +20,12 @@
 
 #include <boost/test/minimal.hpp>
 #include <boost/system/error_code.hpp>
+#include <iostream>
+#include <sstream>
+#include <string>
+#include <cstring>
+#include <functional>
+#include <boost/cerrno.hpp>
 
 // Although using directives are not the best programming practice, testing
 // with a boost::system using directive increases use scenario coverage.
@@ -27,86 +33,185 @@
 
 # if defined( BOOST_WINDOWS_API )
 # include "winerror.h"
-# include <boost/cerrno.hpp>
+# define BOOST_ACCESS_ERROR_MACRO ERROR_ACCESS_DENIED
+# elif defined( BOOST_POSIX_API )
+# define BOOST_ACCESS_ERROR_MACRO EACCES
+# else
+# error "Only supported for POSIX and Windows"
 # endif
 
+namespace
+{
+ void check_ostream( error_code ec, const char * expected )
+ {
+ std::stringstream ss;
+ std::string s;
+
+ ss << ec;
+ ss >> s;
+ BOOST_CHECK( s == expected );
+ }
+}
+
 // test_main ---------------------------------------------------------------//
 
-// TODO: supply a build jam file
-// TODO: supply a test jam file
-// TODO: same for bjam v2
-// TODO: add message decoder tests
+// TODO: add hash_value tests
 
 int test_main( int, char ** )
 {
- error_code ec;
- error_code ec_0_native( 0, native_ecat );
- error_code ec_0_errno( 0, errno_ecat );
- error_code ec_1_native( 1, native_ecat );
- error_code ec_1_errno( 1, errno_ecat );
 
+ std::cout << "General tests...\n";
+ // unit tests:
+
+ BOOST_CHECK( posix_category == posix_category );
+ BOOST_CHECK( system_category == system_category );
+ BOOST_CHECK( posix_category != system_category );
+ BOOST_CHECK( system_category != posix_category );
+
+ if ( std::less<const error_category*>()( &posix_category, &system_category ) )
+ {
+ BOOST_CHECK( posix_category < system_category );
+ BOOST_CHECK( !(system_category < posix_category) );
+ }
+ else
+ {
+ BOOST_CHECK( system_category < posix_category );
+ BOOST_CHECK( !(posix_category < system_category) );
+ }
+
+
+ error_code ec;
+ error_condition dec;
   BOOST_CHECK( !ec );
   BOOST_CHECK( ec.value() == 0 );
- BOOST_CHECK( ec.to_errno() == 0 );
-
- BOOST_CHECK( !ec_0_native );
- BOOST_CHECK( ec_0_native.value() == 0 );
- BOOST_CHECK( ec_0_native.to_errno() == 0 );
-
- BOOST_CHECK( !ec_0_errno );
- BOOST_CHECK( ec_0_errno.value() == 0 );
- BOOST_CHECK( ec_0_errno.to_errno() == 0 );
- BOOST_CHECK( ec == ec_0_errno );
- BOOST_CHECK( native_ecat != errno_ecat || ec_0_native == ec_0_errno );
- BOOST_CHECK( native_ecat == errno_ecat || ec_0_native != ec_0_errno );
-
- BOOST_CHECK( ec_1_native );
- BOOST_CHECK( ec_1_native.value() == 1 );
- BOOST_CHECK( ec_1_native.value() != 0 );
- BOOST_CHECK( ec_1_native.to_errno() != 0 );
- BOOST_CHECK( ec != ec_1_native );
- BOOST_CHECK( ec_0_native != ec_1_native );
- BOOST_CHECK( ec_0_errno != ec_1_native );
-
- BOOST_CHECK( ec_1_errno );
- BOOST_CHECK( ec_1_errno.value() == 1 );
- BOOST_CHECK( ec_1_errno.to_errno() == 1 );
- BOOST_CHECK( ec_1_errno.to_errno() != 0 );
- BOOST_CHECK( ec != ec_1_errno );
- BOOST_CHECK( ec_0_native != ec_1_errno );
- BOOST_CHECK( ec_0_errno != ec_1_errno );
+ dec = ec.default_error_condition();
+ BOOST_CHECK( dec.value() == 0 );
+ BOOST_CHECK( dec.category() == posix_category );
+ BOOST_CHECK( ec == posix::success );
+ BOOST_CHECK( ec.category() == system_category );
+ BOOST_CHECK( std::strcmp( ec.category().name(), "system") == 0 );
+ BOOST_CHECK( !(ec < error_code( 0, system_category )) );
+ BOOST_CHECK( !(error_code( 0, system_category ) < ec) );
+ BOOST_CHECK( ec < error_code( 1, system_category ) );
+ BOOST_CHECK( !(error_code( 1, system_category ) < ec) );
+
+ error_code ec_0_system( 0, system_category );
+ BOOST_CHECK( !ec_0_system );
+ BOOST_CHECK( ec_0_system.value() == 0 );
+ dec = ec_0_system.default_error_condition();
+ BOOST_CHECK( dec.value() == 0 );
+ BOOST_CHECK( dec.category() == posix_category );
+ BOOST_CHECK( ec_0_system == posix::success );
+ BOOST_CHECK( ec_0_system.category() == system_category );
+ BOOST_CHECK( std::strcmp( ec_0_system.category().name(), "system") == 0 );
+ check_ostream( ec_0_system, "system:0" );
+
+ BOOST_CHECK( ec_0_system == ec );
+
+ error_code ec_1_system( 1, system_category );
+ BOOST_CHECK( ec_1_system );
+ BOOST_CHECK( ec_1_system.value() == 1 );
+ BOOST_CHECK( ec_1_system.value() != 0 );
+ BOOST_CHECK( ec != ec_1_system );
+ BOOST_CHECK( ec_0_system != ec_1_system );
+ check_ostream( ec_1_system, "system:1" );
+
+ ec = error_code( BOOST_ACCESS_ERROR_MACRO, system_category );
+ BOOST_CHECK( ec );
+ BOOST_CHECK( ec.value() == BOOST_ACCESS_ERROR_MACRO );
+ dec = ec.default_error_condition();
+ BOOST_CHECK( dec.value() == static_cast<int>(posix::permission_denied) );
+ BOOST_CHECK( dec.category() == posix_category );
+ BOOST_CHECK( dec == error_condition( posix::permission_denied, posix_category ) );
+ BOOST_CHECK( dec == posix::permission_denied );
+ BOOST_CHECK( posix::permission_denied == dec );
+ BOOST_CHECK( ec == posix::permission_denied );
+ BOOST_CHECK( ec.category() == system_category );
+ BOOST_CHECK( std::strcmp( ec.category().name(), "system") == 0 );
+
+ // test the explicit make_error_code conversion for posix
+ ec = make_error_code( posix::bad_message );
+ BOOST_CHECK( ec );
+ BOOST_CHECK( ec == posix::bad_message );
+ BOOST_CHECK( posix::bad_message == ec );
+ BOOST_CHECK( ec != posix::permission_denied );
+ BOOST_CHECK( posix::permission_denied != ec );
+ BOOST_CHECK( ec.category() == posix_category );
+
+ // test the deprecated predefined error_category synonyms
+ BOOST_CHECK( &system_category == &native_ecat );
+ BOOST_CHECK( &posix_category == &errno_ecat );
+ BOOST_CHECK( system_category == native_ecat );
+ BOOST_CHECK( posix_category == errno_ecat );
 
 #ifdef BOOST_WINDOWS_API
- BOOST_CHECK( ec != ec_0_native );
-
- // these tests probe the Windows to_errno decoder
+ std::cout << "Windows tests...\n";
+ // these tests probe the Windows posix decoder
   // test the first entry in the decoder table:
- ec = error_code( ERROR_FILE_NOT_FOUND, native_ecat );
+ ec = error_code( ERROR_FILE_NOT_FOUND, system_category );
   BOOST_CHECK( ec.value() == ERROR_FILE_NOT_FOUND );
- BOOST_CHECK( ec.to_errno() == ENOENT );
+ BOOST_CHECK( ec == posix::no_such_file_or_directory );
+ BOOST_CHECK( ec.default_error_condition().value() == posix::no_such_file_or_directory );
+ BOOST_CHECK( ec.default_error_condition().category() == posix_category );
 
   // test the second entry in the decoder table:
- ec = error_code( ERROR_PATH_NOT_FOUND, native_ecat );
+ ec = error_code( ERROR_PATH_NOT_FOUND, system_category );
   BOOST_CHECK( ec.value() == ERROR_PATH_NOT_FOUND );
- BOOST_CHECK( ec.to_errno() == ENOENT );
+ BOOST_CHECK( ec == posix::no_such_file_or_directory );
+ BOOST_CHECK( ec.default_error_condition().value() == posix::no_such_file_or_directory );
+ BOOST_CHECK( ec.default_error_condition().category() == posix_category );
 
   // test the third entry in the decoder table:
- ec = error_code( ERROR_ACCESS_DENIED, native_ecat );
+ ec = error_code( ERROR_ACCESS_DENIED, system_category );
   BOOST_CHECK( ec.value() == ERROR_ACCESS_DENIED );
- BOOST_CHECK( ec.to_errno() == EACCES );
+ BOOST_CHECK( ec == posix::permission_denied );
+ BOOST_CHECK( ec.default_error_condition().value() == posix::permission_denied );
+ BOOST_CHECK( ec.default_error_condition().category() == posix_category );
 
   // test the last regular entry in the decoder table:
- ec = error_code( ERROR_WRITE_PROTECT, native_ecat );
+ ec = error_code( ERROR_WRITE_PROTECT, system_category );
   BOOST_CHECK( ec.value() == ERROR_WRITE_PROTECT );
- BOOST_CHECK( ec.to_errno() == EROFS );
+ BOOST_CHECK( ec == posix::permission_denied );
+ BOOST_CHECK( ec.default_error_condition().value() == posix::permission_denied );
+ BOOST_CHECK( ec.default_error_condition().category() == posix_category );
 
   // test not-in-table condition:
- ec = error_code( 1234567890, native_ecat );
+ ec = error_code( 1234567890, system_category );
   BOOST_CHECK( ec.value() == 1234567890 );
- BOOST_CHECK( ec.to_errno() == EOTHER );
+ BOOST_CHECK( ec.default_error_condition().value() == 1234567890 );
+ BOOST_CHECK( ec.default_error_condition().category() == system_category );
+
+#else // POSIX
+
+ std::cout << "POSIX tests...\n";
+ ec = error_code( EACCES, system_category );
+ BOOST_CHECK( ec == error_code( posix::permission_denied, system_category ) );
+ BOOST_CHECK( error_code( posix::permission_denied, system_category ) == ec );
+ BOOST_CHECK( ec == posix::permission_denied );
+ BOOST_CHECK( posix::permission_denied == ec );
+ BOOST_CHECK( ec.default_error_condition().value() == posix::permission_denied );
+ BOOST_CHECK( ec.default_error_condition().category() == posix_category );
+
+# ifdef __CYGWIN__
+
+ std::cout << "Cygwin tests...\n";
+ ec = cygwin::no_package;
+ BOOST_CHECK( ec == cygwin::no_package );
+ BOOST_CHECK( ec == error_code( ENOPKG, system_category ) );
+ BOOST_CHECK( ec == error_code( cygwin::no_package, system_category ) );
+ BOOST_CHECK( ec.default_error_condition().category() == system_category );
+
+# elif defined(linux) || defined(__linux) || defined(__linux__)
+
+ std::cout << "Linux tests...\n";
+ ec = Linux::dot_dot_error;
+ BOOST_CHECK( ec == Linux::dot_dot_error );
+ BOOST_CHECK( ec == error_code( EDOTDOT, system_category ) );
+ BOOST_CHECK( ec == error_code( Linux::dot_dot_error, system_category ) );
+ BOOST_CHECK( ec.default_error_condition().category() == system_category );
+
+# endif
 
-#else
- BOOST_CHECK( ec == ec_0_native );
 #endif
   
   return 0;

Modified: branches/hash/libs/system/test/error_code_user_test.cpp
==============================================================================
--- branches/hash/libs/system/test/error_code_user_test.cpp (original)
+++ branches/hash/libs/system/test/error_code_user_test.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -8,85 +8,384 @@
 // See library home page at http://www.boost.org/libs/system
 
 // ------------------------------------------------------------------------ //
-// This code demonstrates creation and use of a new category of error codes.
 
-// The motivation was a Boost posting by Christopher Kohlhoff on June 28, 2006.
+// This program demonstrates creation and use of new categories of error
+// codes. Several scenarios are demonstrated and tested.
+
+// Motivation was a Boost posting by Christopher Kohlhoff on June 28, 2006.
 
 #include <boost/system/error_code.hpp>
 #include <boost/cerrno.hpp>
+#include <string>
+#include <cstdio>
+#include <boost/test/minimal.hpp>
+
+#ifdef BOOST_POSIX_API
+# include <sys/stat.h>
+#else
+# include <windows.h>
+#endif
+
+// ------------------------------------------------------------------------ //
+
+// Library 1: User function passes through an error code from the
+// operating system.
+
+
+boost::system::error_code my_mkdir( const std::string & path )
+{
+ return boost::system::error_code(
+# ifdef BOOST_POSIX_API
+ ::mkdir( path.c_str(), S_IRWXU|S_IRWXG|S_IROTH|S_IXOTH ) == 0 ? 0 : errno,
+# else
+ ::CreateDirectoryA( path.c_str(), 0 ) != 0 ? 0 : ::GetLastError(),
+# endif
+ boost::system::system_category );
+}
 
 // ------------------------------------------------------------------------ //
 
-// header asio.hpp
+// Library 2: User function passes through errno from the C-runtime.
+
+#include <cstdio>
+
+boost::system::error_code my_remove( const std::string & path )
+{
+ return boost::system::error_code(
+ ::remove( path.c_str() ) == 0 ? 0 : errno,
+ boost::system::posix_category ); // OK for both Windows and POSIX
+ // Alternatively, could use posix_category
+ // on Windows and system_category on
+ // POSIX-based systems.
+}
+
+// ------------------------------------------------------------------------ //
+
+// Library 3: Library uses enum to identify library specific errors.
+
+// This particular example is for a library within the parent namespace. For
+// an example of a library not within the parent namespace, see library 4.
+
+// header lib3.hpp:
 
-#define BOO_BOO 12345 // this could also be a constant; a macro is used for
- // illustration because many older API's define errors
- // via macro.
 namespace boost
 {
- namespace asio
+ namespace lib3
   {
- // asio declares have its own error_category:
- extern system::error_category asio_error;
+ // lib3 has its own error_category:
+ extern const boost::system::error_category & lib3_error_category;
     
- namespace error
+ enum error
     {
- extern boost::system::error_code boo_boo;
- }
+ boo_boo=123,
+ big_boo_boo
+ };
 
- void boo_boo( boost::system::error_code & ec );
   }
+
+ namespace system
+ {
+ template<> struct is_error_code_enum<boost::lib3::error>
+ { static const bool value = true; };
+
+ inline error_code make_error_code(boost::lib3::error e)
+ { return error_code(e,boost::lib3::lib3_error_category); }
+ }
+
 }
 
-// ------------------------------------------------------------------------ //
+// implementation file lib3.cpp:
 
-// implementation file asio.cpp:
+// #include <lib3.hpp>
 
 namespace boost
 {
- namespace asio
+ namespace lib3
   {
+ class lib3_error_category_imp : public boost::system::error_category
+ {
+ public:
+ const char * name() const
+ {
+ return "lib3";
+ }
+
+ boost::system::error_condition default_error_condition( int ev ) const
+ {
+ return ev == boo_boo
+ ? boost::system::error_condition( boost::system::posix::io_error,
+ boost::system::posix_category )
+ : boost::system::error_condition( ev,
+ boost::lib3::lib3_error_category );
+ }
+
+ std::string message( int ev ) const
+ {
+ if ( ev == boo_boo ) return std::string("boo boo");
+ if ( ev == big_boo_boo ) return std::string("big boo boo");
+ return std::string("unknown error");
+ }
+ };
+
+ const lib3_error_category_imp lib3_error_category_const;
+
+ const boost::system::error_category & lib3_error_category
+ = lib3_error_category_const;
+ }
+}
+
+// ------------------------------------------------------------------------ //
+
+// Library 4: Library uses const error_code's to identify library specific
+// errors.
+
+// This particular example is for a library not within the parent namespace.
+// For an example of a library within the parent namespace, see library 3.
+
+// header lib4.hpp:
 
- system::error_category asio_error = system::error_code::new_category();
+namespace lib4
+{
+ // lib4 has its own error_category:
+ extern const boost::system::error_category & lib4_error_category;
+
+ extern const boost::system::error_code boo_boo;
+ extern const boost::system::error_code big_boo_boo;
+}
+
+// implementation file lib4.cpp:
 
- namespace error
+// #include <lib4.hpp>
+
+namespace lib4
+{
+ class lib4_error_category_imp : public boost::system::error_category
+ {
+ public:
+ const char * name() const
     {
- boost::system::error_code boo_boo( BOO_BOO, asio_error );
+ return "lib4";
     }
 
- // function sets ec arg to boo_boo
- void boo_boo( boost::system::error_code & ec )
+ boost::system::error_condition default_error_condition( int ev ) const
     {
- ec = error::boo_boo;
+ return ev == boo_boo.value()
+ ? boost::system::error_condition( boost::system::posix::io_error,
+ boost::system::posix_category )
+ : boost::system::error_condition( ev, lib4::lib4_error_category );
     }
- }
+
+ std::string message( int ev ) const
+ {
+ if ( ev == boo_boo.value() ) return std::string("boo boo");
+ if ( ev == big_boo_boo.value() ) return std::string("big boo boo");
+ return std::string("unknown error");
+ }
+ };
+
+ const lib4_error_category_imp lib4_error_category_const;
+
+ const boost::system::error_category & lib4_error_category
+ = lib4_error_category_const;
+
+ const boost::system::error_code boo_boo( 456, lib4_error_category );
+ const boost::system::error_code big_boo_boo( 789, lib4_error_category );
+
 }
 
 // ------------------------------------------------------------------------ //
 
-// a user program:
+// Chris Kolhoff's Test3, modified to work with error_code.hpp
 
+// Test3
+// =====
+// Define error classes to check for success, permission_denied and
+// out_of_memory, but add additional mappings for a user-defined error category.
+//
+
+//namespace test3 {
+
+// enum user_err
+// {
+// user_success = 0,
+// user_permission_denied,
+// user_out_of_memory
+// };
+//
+// class user_error_category_imp : public boost::system::error_category
+// {
+// public:
+// const std::string & name() const
+// {
+// static std::string s( "test3" );
+// return s;
+// }
+//
+// boost::system::error_code portable_error_code( int ev ) const
+// {
+// switch (ev)
+// {
+// case user_success:
+// return boost::system::error_code(boost::system::posix::success, boost::system::posix_category);
+// case user_permission_denied:
+// return boost::system::error_code(boost::system::posix::permission_denied, boost::system::posix_category);
+// case user_out_of_memory:
+// return boost::system::error_code(boost::system::posix::not_enough_memory, boost::system::posix_category);
+// default:
+// break;
+// }
+// return boost::system::error_code(boost::system::posix::no_posix_equivalent, boost::system::posix_category);
+// }
+//
+// };
+//
+// const user_error_category_imp user_error_category_const;
+//
+// const boost::system::error_category & user_error_category
+// = user_error_category_const;
+//
+// inline boost::system::error_code make_error_code(user_err e)
+// {
+// return boost::system::error_code(e, user_error_category);
+// }
+//
+// // test code
+//
+// void check_success(const boost::system::error_code& ec, bool expect)
+// {
+// BOOST_CHECK( (ec == boost::system::posix::success) == expect );
+// if (ec == boost::system::posix::success)
+// std::cout << "yes... " << (expect ? "ok" : "fail") << '\n';
+// else
+// std::cout << "no... " << (expect ? "fail" : "ok") << '\n';
+// }
+//
+// void check_permission_denied(const boost::system::error_code& ec, bool expect)
+// {
+// BOOST_CHECK( (ec == boost::system::posix::permission_denied) == expect );
+// if (ec == boost::system::posix::permission_denied)
+// std::cout << "yes... " << (expect ? "ok" : "fail") << '\n';
+// else
+// std::cout << "no... " << (expect ? "fail" : "ok") << '\n';
+// }
+//
+// void check_out_of_memory(const boost::system::error_code& ec, bool expect)
+// {
+// BOOST_CHECK( (ec == boost::system::posix::not_enough_memory) == expect );
+// if (ec == boost::system::posix::not_enough_memory)
+// std::cout << "yes... " << (expect ? "ok" : "fail") << '\n';
+// else
+// std::cout << "no... " << (expect ? "fail" : "ok") << '\n';
+// }
+//
+// void run()
+// {
+// printf("Test3\n");
+// printf("=====\n");
+// boost::system::error_code ec;
+// check_success(ec, true);
+// check_success(boost::system::posix::success, true);
+// check_success(boost::system::posix::permission_denied, false);
+// check_success(boost::system::posix::not_enough_memory, false);
+// check_success(user_success, true);
+// check_success(user_permission_denied, false);
+// check_success(user_out_of_memory, false);
+// check_permission_denied(ec, false);
+// check_permission_denied(boost::system::posix::success, false);
+// check_permission_denied(boost::system::posix::permission_denied, true);
+// check_permission_denied(boost::system::posix::not_enough_memory, false);
+// check_permission_denied(user_success, false);
+// check_permission_denied(user_permission_denied, true);
+// check_permission_denied(user_out_of_memory, false);
+// check_out_of_memory(ec, false);
+// check_out_of_memory(boost::system::posix::success, false);
+// check_out_of_memory(boost::system::posix::permission_denied, false);
+// check_out_of_memory(boost::system::posix::not_enough_memory, true);
+// check_out_of_memory(user_success, false);
+// check_out_of_memory(user_permission_denied, false);
+// check_out_of_memory(user_out_of_memory, true);
+//
+//# ifdef BOOST_WINDOWS_API
+// check_success(boost::system::windows::success, true);
+// check_success(boost::system::windows::access_denied, false);
+// check_success(boost::system::windows::not_enough_memory, false);
+// check_permission_denied(boost::system::windows::success, false);
+// check_permission_denied(boost::system::windows::access_denied, true);
+// check_permission_denied(boost::system::windows::not_enough_memory, false);
+// check_out_of_memory(boost::system::windows::success, false);
+// check_out_of_memory(boost::system::windows::access_denied, false);
+// check_out_of_memory(boost::system::windows::not_enough_memory, true);
+//# endif
+//
+// printf("\n");
+// }
+//
+//} // namespace test3
 
-// #include <asio.hpp>
-#include <boost/test/minimal.hpp>
+
+
+// ------------------------------------------------------------------------ //
 
 int test_main( int, char *[] )
 {
   boost::system::error_code ec;
- boost::asio::boo_boo( ec );
+
+ // Library 1 tests:
+
+ ec = my_mkdir( "/no-such-file-or-directory/will-not-succeed" );
+ std::cout << "ec.value() is " << ec.value() << '\n';
+
+ BOOST_CHECK( ec );
+ BOOST_CHECK( ec == boost::system::posix::no_such_file_or_directory );
+ BOOST_CHECK( ec.category() == boost::system::system_category );
+
+ // Library 2 tests:
+
+ ec = my_remove( "/no-such-file-or-directory" );
+ std::cout << "ec.value() is " << ec.value() << '\n';
+
+ BOOST_CHECK( ec );
+ BOOST_CHECK( ec == boost::system::posix::no_such_file_or_directory );
+ BOOST_CHECK( ec.category() == boost::system::posix_category );
+
+ // Library 3 tests:
+
+ ec = boost::lib3::boo_boo;
+ std::cout << "ec.value() is " << ec.value() << '\n';
 
   BOOST_CHECK( ec );
- BOOST_CHECK( ec == boost::asio::error::boo_boo );
- BOOST_CHECK( ec.value() == BOO_BOO );
- BOOST_CHECK( ec.category() == boost::asio::asio_error );
-
- // a real user can't rely on the value of an error_category object's value,
- // but in this test program that value is known, so test for it.
- BOOST_CHECK( ec.category().value() == boost::system::native_ecat.value()+1 );
-
- // asio did not supply decoders, so test the defaults
- BOOST_CHECK( ec.to_errno() == EOTHER );
- BOOST_CHECK( ec.message() == "API error" );
- BOOST_CHECK( ec.wmessage() == L"API error" );
+ BOOST_CHECK( ec == boost::lib3::boo_boo );
+ BOOST_CHECK( ec.value() == boost::lib3::boo_boo );
+ BOOST_CHECK( ec.category() == boost::lib3::lib3_error_category );
+
+ BOOST_CHECK( ec == boost::system::posix::io_error );
+
+ boost::system::error_code ec3( boost::lib3::boo_boo+100,
+ boost::lib3::lib3_error_category );
+ BOOST_CHECK( ec3.category() == boost::lib3::lib3_error_category );
+ BOOST_CHECK( ec3.default_error_condition().category()
+ == boost::lib3::lib3_error_category );
+
+ // Library 4 tests:
+
+ ec = lib4::boo_boo;
+ std::cout << "ec.value() is " << ec.value() << '\n';
+
+ BOOST_CHECK( ec );
+ BOOST_CHECK( ec == lib4::boo_boo );
+ BOOST_CHECK( ec.value() == lib4::boo_boo.value() );
+ BOOST_CHECK( ec.category() == lib4::lib4_error_category );
+
+ BOOST_CHECK( ec == boost::system::posix::io_error );
+
+ boost::system::error_code ec4( lib4::boo_boo.value()+100,
+ lib4::lib4_error_category );
+ BOOST_CHECK( ec4.default_error_condition().category()
+ == lib4::lib4_error_category );
+
+ // Test 3
+
+ //test3::run();
+
   return 0;
 }

Modified: branches/hash/libs/system/test/system_error_test.cpp
==============================================================================
--- branches/hash/libs/system/test/system_error_test.cpp (original)
+++ branches/hash/libs/system/test/system_error_test.cpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -10,7 +10,7 @@
 //----------------------------------------------------------------------------//
 
 // VC++ 8.0 warns on usage of certain Standard Library and API functions that
-// can be cause buffer overruns or other possible security issues if misused.
+// can cause buffer overruns or other possible security issues if misused.
 // See http://msdn.microsoft.com/msdnmag/issues/05/05/SafeCandC/default.aspx
 // But the wording of the warning is misleading and unsettling, there are no
 // portable alternative functions, and VC++ 8.0's own libraries use the
@@ -23,24 +23,23 @@
 #include <iostream>
 
 #ifdef BOOST_WINDOWS_API
-# include <winerror.h>
+#include <winerror.h>
 #endif
 
 using boost::system::system_error;
 using boost::system::error_code;
-using boost::system::errno_ecat;
-using boost::system::no_message;
+using boost::system::system_category;
 
 #define TEST(x,v,w) test(#x,x,v,w)
 
 namespace
 {
   void test( const char * desc, const system_error & ex,
- error_code::value_type v, const char * str )
+ int v, const char * str )
   {
     std::cout << "test " << desc << "\n what() returns \"" << ex.what() << "\"\n";
     BOOST_CHECK( ex.code().value() == v );
- BOOST_CHECK( ex.code().category() == errno_ecat );
+ BOOST_CHECK( ex.code().category() == system_category );
 # ifdef BOOST_WINDOWS_API
     BOOST_CHECK( std::string( ex.what() ) == str );
     if ( std::string( ex.what() ) != str )
@@ -56,29 +55,22 @@
 {
   // all combinations of constructors:
 
- system_error se_0( error_code(0, errno_ecat) );
- system_error se_1( 1, errno_ecat );
- system_error se_0_m( error_code(0, errno_ecat), "se_0_m" );
- system_error se_1_m( 1, errno_ecat, "se_1_m" );
- system_error se_0_nm( error_code(0, errno_ecat), "" );
- system_error se_1_nm( 1, errno_ecat, "" );
- system_error se_0_m_im( error_code(0, errno_ecat), "se_0_m_im", no_message );
- system_error se_1_m_im( 1, errno_ecat, "se_1_m_im", no_message );
- system_error se_0_nm_im( error_code(0, errno_ecat), "", no_message );
- system_error se_1_nm_im( 1, errno_ecat, "", no_message );
- system_error se_1u_m( uvalue, errno_ecat, "se_1u_m" );
+ system_error se_0_m( error_code(0, system_category), "se_0_m" );
+ system_error se_1_m( 1, system_category, "se_1_m" );
+ system_error se_0_nm( error_code(0, system_category), "" );
+ system_error se_1_nm( 1, system_category, "" );
+ system_error se_0_nmx( error_code(0, system_category), "" );
+ system_error se_1_nmx( 1, system_category, "" );
+ system_error se_1u_m( uvalue, system_category, "se_1u_m" );
 
- TEST( se_0, 0, "" );
- TEST( se_1, 1, "Operation not permitted" );
   TEST( se_0_m, 0, "se_0_m" );
- TEST( se_1_m, 1, "se_1_m: Operation not permitted" );
+ TEST( se_1_m, 1, "se_1_m: Incorrect function" );
   TEST( se_0_nm, 0, "" );
- TEST( se_1_nm, 1, "Operation not permitted" );
- TEST( se_0_m_im, 0, "se_0_m_im" );
- TEST( se_1_m_im, 1, "se_1_m_im" );
- TEST( se_0_nm_im, 0, "" );
- TEST( se_1_nm_im, 1, "" );
- TEST( se_1u_m, 1, "se_1u_m: Operation not permitted" );
+ TEST( se_1_nm, 1, "Incorrect function" );
+ TEST( se_0_nmx, 0, "" );
+ TEST( se_1_nmx, 1, "Incorrect function" );
+ TEST( se_1u_m, 1, "se_1u_m: Incorrect function" );
+
 
   return 0;
 }

Modified: branches/hash/libs/tr1/test/Jamfile.v2
==============================================================================
--- branches/hash/libs/tr1/test/Jamfile.v2 (original)
+++ branches/hash/libs/tr1/test/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -11,6 +11,8 @@
     <include>$(BOOST_ROOT)/boost/tr1/tr1
     # Borland's broken include mechanism needs these extra headers:
     <toolset>borland:<include>$(BOOST_ROOT)/boost/tr1/tr1/bcc32
+ # Sunpro's broken include mechanism needs these extra headers:
+ <include>$(BOOST_ROOT)/boost/tr1/tr1/sun
     ;
 
 
@@ -85,3 +87,4 @@
 
 
 
+

Modified: branches/hash/libs/type_traits/cxx_type_traits.htm
==============================================================================
--- branches/hash/libs/type_traits/cxx_type_traits.htm (original)
+++ branches/hash/libs/type_traits/cxx_type_traits.htm 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1,13 +1,11 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
   <head>
- <meta http-equiv="refresh" content="0; URL=../../doc/html/boost_typetraits/background.html">
+ <meta http-equiv="refresh" content="0; URL=doc/html/boost_typetraits/background.html">
   </head>
- <body>
+ <body><P>
     Automatic redirection failed, please go to
- ../../doc/html/boost_typetraits/background.html
- or view the online version at
- http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/boost_typetraits/background.html
+ doc/html/boost_typetraits/background.html.</P>
       <P>Copyright&nbsp;John Maddock 2006</P>
       <P>Distributed under the Boost Software License, Version 1.0. (See accompanying file <A href="../../LICENSE_1_0.txt">
             LICENSE_1_0.txt</A> or copy at www.boost.org/LICENSE_1_0.txt).</P>
@@ -17,3 +15,4 @@
 
 
 
+

Modified: branches/hash/libs/type_traits/doc/Jamfile.v2
==============================================================================
--- branches/hash/libs/type_traits/doc/Jamfile.v2 (original)
+++ branches/hash/libs/type_traits/doc/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -10,10 +10,53 @@
     :
         type_traits
     :
- <xsl:param>nav.layout=none
- <xsl:param>navig.graphics=0
+ # Path for links to Boost:
+ <xsl:param>boost.root=../../../../
+ # Path for libraries index:
+ <xsl:param>boost.libraries=../../../libraries.htm
+ # Use the main Boost stylesheet:
+ <xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
+
+ # Some general style settings:
+ <xsl:param>table.footnote.number.format=1
+ <xsl:param>footnote.number.format=1
+
+ # HTML options first:
+ # Use graphics not text for navigation:
+ <xsl:param>navig.graphics=1
+ # How far down we chunk nested sections, basically all of them:
+ <xsl:param>chunk.section.depth=10
+ # Don't put the first section on the same page as the TOC:
+ <xsl:param>chunk.first.sections=1
+ # How far down sections get TOC's
+ <xsl:param>toc.section.depth=10
+ # Max depth in each TOC:
+ <xsl:param>toc.max.depth=4
+ # How far down we go with TOC's
+ <xsl:param>generate.section.toc.level=10
+
+ # PDF Options:
+ # TOC Generation: this is needed for FOP-0.9 and later:
+ # <xsl:param>fop1.extensions=1
+ <xsl:param>xep.extensions=1
+ # TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
+ <xsl:param>fop.extensions=0
+ # No indent on body text:
+ <xsl:param>body.start.indent=0pt
+ # Margin size:
+ <xsl:param>page.margin.inner=0.5in
+ # Margin size:
+ <xsl:param>page.margin.outer=0.5in
+ # Paper type = A4
+ <xsl:param>paper.type=A4
+ # Yes, we want graphics for admonishments:
+ <xsl:param>admon.graphics=1
+ # Set this one for PDF generation *only*:
+ # default pnd graphics are awful in PDF form,
+ # better use SVG's instead:
+ # <xsl:param>admon.graphics.extension=".svg"
     ;
 
-install html : ../../../doc/html/boostbook.css ;
-install ../ : ../../../boost.png ;
+#install html : ../../../doc/html/boostbook.css ;
+#install ../ : ../../../boost.png ;
 

Modified: branches/hash/libs/type_traits/doc/type_traits.qbk
==============================================================================
--- branches/hash/libs/type_traits/doc/type_traits.qbk (original)
+++ branches/hash/libs/type_traits/doc/type_traits.qbk 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1,4 +1,5 @@
 [library Boost.TypeTraits
+ [quickbook 1.4]
     [copyright 2000 2006 Adobe Systems Inc, David Abrahams, Steve Cleary,
     Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat Marcus,
     Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen,
@@ -17,86 +18,98 @@
     [last-revision $Date$]
 ]
 
+
 [def __boost_root ../../../../]
-[def __tof '''<replaceable><link linkend="boost_typetraits.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.integral_constant">false_type</link></replaceable>''']
+[def __tof '''<replaceable><link linkend="boost_typetraits.reference.integral_constant">true_type</link>-or-<link linkend="boost_typetraits.reference.integral_constant">false_type</link></replaceable>''']
 [def __below '''<replaceable>see-below</replaceable>''']
-[def __true_type [link boost_typetraits.integral_constant true_type]]
-[def __false_type [link boost_typetraits.integral_constant false_type]]
-[def __integral_constant [link boost_typetraits.integral_constant integral_constant]]
+[def __true_type [link boost_typetraits.reference.integral_constant true_type]]
+[def __false_type [link boost_typetraits.reference.integral_constant false_type]]
+[def __integral_constant [link boost_typetraits.reference.integral_constant integral_constant]]
 [def __inherit [*Inherits:]]
 [def __std_ref [*C++ Standard Reference:]]
 [def __header [*Header:]]
 [def __compat [*Compiler Compatibility:]]
 [def __examples [*Examples:]]
 [def __type [*type:]]
-[def __transform_workaround [link transform.broken_compiler_workarounds_ compiler workarounds]]
+[def __transform_workaround [link boost_typetraits.category.transform.broken_compiler_workarounds_ compiler workarounds]]
 [def __intrinsics [link boost_typetraits.intrinsics intrinsics]]
 
-[def __is_void [link boost_typetraits.is_void is_void]]
-[def __is_integral [link boost_typetraits.is_integral is_integral]]
-[def __is_floating_point [link boost_typetraits.is_floating_point is_floating_point]]
-[def __is_pointer [link boost_typetraits.is_pointer is_pointer]]
-[def __is_reference [link boost_typetraits.is_reference is_reference]]
-[def __is_member_pointer [link boost_typetraits.is_member_pointer is_member_pointer]]
-[def __is_array [link boost_typetraits.is_array is_array]]
-[def __is_union [link boost_typetraits.is_union is_union]]
-[def __is_class [link boost_typetraits.is_class is_class]]
-[def __is_enum [link boost_typetraits.is_enum is_enum]]
-[def __is_enum [link boost_typetraits.is_enum is_enum]]
-[def __is_function [link boost_typetraits.is_function is_function]]
-
-[def __is_arithmetic [link boost_typetraits.is_arithmetic is_arithmetic]]
-[def __is_fundamental [link boost_typetraits.is_fundamental is_fundamental]]
-[def __is_object [link boost_typetraits.is_object is_object]]
-[def __is_scalar [link boost_typetraits.is_scalar is_scalar]]
-[def __is_compound [link boost_typetraits.is_compound is_compound]]
-[def __is_member_function_pointer [link boost_typetraits.is_member_function_pointer is_member_function_pointer]]
-[def __is_member_object_pointer [link boost_typetraits.is_member_object_pointer is_member_object_pointer]]
-
-[def __alignment_of [link boost_typetraits.alignment_of alignment_of]]
-[def __rank [link boost_typetraits.rank rank]]
-[def __extent [link boost_typetraits.extent extent]]
-[def __is_empty [link boost_typetraits.is_empty is_empty]]
-[def __is_const [link boost_typetraits.is_const is_const]]
-[def __is_volatile [link boost_typetraits.is_volatile is_volatile]]
-[def __is_abstract [link boost_typetraits.is_abstract is_abstract]]
-[def __is_polymorphic [link boost_typetraits.is_polymorphic is_polymorphic]]
-[def __has_virtual_destructor [link boost_typetraits.has_virtual_destructor has_virtual_destructor]]
-[def __is_pod [link boost_typetraits.is_pod is_pod]]
-[def __has_trivial_constructor [link boost_typetraits.has_trivial_constructor has_trivial_constructor]]
-[def __has_trivial_copy [link boost_typetraits.has_trivial_copy has_trivial_copy]]
-[def __has_trivial_assign [link boost_typetraits.has_trivial_assign has_trivial_assign]]
-[def __has_trivial_destructor [link boost_typetraits.has_trivial_destructor has_trivial_destructor]]
-[def __is_stateless [link boost_typetraits.is_stateless is_stateless]]
-[def __has_nothrow_constructor [link boost_typetraits.has_nothrow_constructor has_nothrow_constructor]]
-[def __has_nothrow_copy [link boost_typetraits.has_nothrow_copy has_nothrow_copy]]
-[def __has_nothrow_assign [link boost_typetraits.has_nothrow_assign has_nothrow_assign]]
-
-[def __is_base_of [link boost_typetraits.is_base_of is_base_of]]
-[def __is_convertible [link boost_typetraits.is_convertible is_convertible]]
-[def __is_same [link boost_typetraits.is_same is_same]]
-
-[def __remove_const [link boost_typetraits.remove_const remove_const]]
-[def __remove_volatile [link boost_typetraits.remove_volatile remove_volatile]]
-[def __remove_cv [link boost_typetraits.remove_cv remove_cv]]
-[def __remove_reference [link boost_typetraits.remove_reference remove_reference]]
-[def __remove_extent [link boost_typetraits.remove_extent remove_extent]]
-[def __remove_all_extents [link boost_typetraits.remove_all_extents remove_all_extents]]
-[def __remove_pointer [link boost_typetraits.remove_pointer remove_pointer]]
-[def __add_reference [link boost_typetraits.add_reference add_reference]]
-[def __add_pointer [link boost_typetraits.add_pointer add_pointer]]
-[def __add_const [link boost_typetraits.add_const add_const]]
-[def __add_volatile [link boost_typetraits.add_volatile add_volatile]]
-[def __add_cv [link boost_typetraits.add_cv add_cv]]
-
-[def __type_with_alignment [link boost_typetraits.type_with_alignment type_with_alignment]]
-[def __aligned_storage [link boost_typetraits.aligned_storage aligned_storage]]
-
-[def __function_traits [link boost_typetraits.function_traits function_traits]]
-
-[def __promote [link boost_typetraits.promote promote]]
-[def __integral_promotion [link boost_typetraits.integral_promotion integral_promotion]]
-[def __floating_point_promotion [link boost_typetraits.floating_point_promotion floating_point_promotion]]
+[def __is_void [link boost_typetraits.reference.is_void is_void]]
+[def __is_integral [link boost_typetraits.reference.is_integral is_integral]]
+[def __is_floating_point [link boost_typetraits.reference.is_floating_point is_floating_point]]
+[def __is_pointer [link boost_typetraits.reference.is_pointer is_pointer]]
+[def __is_reference [link boost_typetraits.reference.is_reference is_reference]]
+[def __is_member_pointer [link boost_typetraits.reference.is_member_pointer is_member_pointer]]
+[def __is_array [link boost_typetraits.reference.is_array is_array]]
+[def __is_union [link boost_typetraits.reference.is_union is_union]]
+[def __is_class [link boost_typetraits.reference.is_class is_class]]
+[def __is_enum [link boost_typetraits.reference.is_enum is_enum]]
+[def __is_enum [link boost_typetraits.reference.is_enum is_enum]]
+[def __is_function [link boost_typetraits.reference.is_function is_function]]
+
+[def __is_arithmetic [link boost_typetraits.reference.is_arithmetic is_arithmetic]]
+[def __is_fundamental [link boost_typetraits.reference.is_fundamental is_fundamental]]
+[def __is_object [link boost_typetraits.reference.is_object is_object]]
+[def __is_scalar [link boost_typetraits.reference.is_scalar is_scalar]]
+[def __is_compound [link boost_typetraits.reference.is_compound is_compound]]
+[def __is_member_function_pointer [link boost_typetraits.reference.is_member_function_pointer is_member_function_pointer]]
+[def __is_member_object_pointer [link boost_typetraits.reference.is_member_object_pointer is_member_object_pointer]]
+
+[def __alignment_of [link boost_typetraits.reference.alignment_of alignment_of]]
+[def __rank [link boost_typetraits.reference.rank rank]]
+[def __extent [link boost_typetraits.reference.extent extent]]
+[def __is_empty [link boost_typetraits.reference.is_empty is_empty]]
+[def __is_const [link boost_typetraits.reference.is_const is_const]]
+[def __is_volatile [link boost_typetraits.reference.is_volatile is_volatile]]
+[def __is_abstract [link boost_typetraits.reference.is_abstract is_abstract]]
+[def __is_polymorphic [link boost_typetraits.reference.is_polymorphic is_polymorphic]]
+[def __is_signed [link boost_typetraits.reference.is_signed is_signed]]
+[def __is_unsigned [link boost_typetraits.reference.is_unsigned is_unsigned]]
+[def __has_virtual_destructor [link boost_typetraits.reference.has_virtual_destructor has_virtual_destructor]]
+[def __is_pod [link boost_typetraits.reference.is_pod is_pod]]
+[def __has_trivial_constructor [link boost_typetraits.reference.has_trivial_constructor has_trivial_constructor]]
+[def __has_trivial_copy [link boost_typetraits.reference.has_trivial_copy has_trivial_copy]]
+[def __has_trivial_default_constructor [link boost_typetraits.reference.has_trivial_constructor has_trivial_default_constructor]]
+[def __has_trivial_copy_constructor [link boost_typetraits.reference.has_trivial_copy has_trivial_copy_constructor]]
+[def __has_trivial_assign [link boost_typetraits.reference.has_trivial_assign has_trivial_assign]]
+[def __has_trivial_destructor [link boost_typetraits.reference.has_trivial_destructor has_trivial_destructor]]
+[def __is_stateless [link boost_typetraits.reference.is_stateless is_stateless]]
+[def __has_nothrow_constructor [link boost_typetraits.reference.has_nothrow_constructor has_nothrow_constructor]]
+[def __has_nothrow_copy [link boost_typetraits.reference.has_nothrow_copy has_nothrow_copy]]
+[def __has_nothrow_default_constructor [link boost_typetraits.reference.has_nothrow_constructor has_nothrow_default_constructor]]
+[def __has_nothrow_copy_constructor [link boost_typetraits.reference.has_nothrow_copy has_nothrow_copy_constructor]]
+[def __has_nothrow_assign [link boost_typetraits.reference.has_nothrow_assign has_nothrow_assign]]
+
+[def __is_base_of [link boost_typetraits.reference.is_base_of is_base_of]]
+[def __is_convertible [link boost_typetraits.reference.is_convertible is_convertible]]
+[def __is_same [link boost_typetraits.reference.is_same is_same]]
+
+[def __remove_const [link boost_typetraits.reference.remove_const remove_const]]
+[def __remove_volatile [link boost_typetraits.reference.remove_volatile remove_volatile]]
+[def __remove_cv [link boost_typetraits.reference.remove_cv remove_cv]]
+[def __remove_reference [link boost_typetraits.reference.remove_reference remove_reference]]
+[def __remove_extent [link boost_typetraits.reference.remove_extent remove_extent]]
+[def __remove_all_extents [link boost_typetraits.reference.remove_all_extents remove_all_extents]]
+[def __remove_pointer [link boost_typetraits.reference.remove_pointer remove_pointer]]
+[def __add_reference [link boost_typetraits.reference.add_reference add_reference]]
+[def __add_pointer [link boost_typetraits.reference.add_pointer add_pointer]]
+[def __add_const [link boost_typetraits.reference.add_const add_const]]
+[def __add_volatile [link boost_typetraits.reference.add_volatile add_volatile]]
+[def __add_cv [link boost_typetraits.reference.add_cv add_cv]]
+
+[def __type_with_alignment [link boost_typetraits.reference.type_with_alignment type_with_alignment]]
+[def __aligned_storage [link boost_typetraits.reference.aligned_storage aligned_storage]]
+
+[def __function_traits [link boost_typetraits.reference.function_traits function_traits]]
+
+[def __promote [link boost_typetraits.reference.promote promote]]
+[def __integral_promotion [link boost_typetraits.reference.integral_promotion integral_promotion]]
+[def __floating_point_promotion [link boost_typetraits.reference.floating_point_promotion floating_point_promotion]]
+
+[def __make_signed [link boost_typetraits.reference.make_signed make_signed]]
+[def __make_unsigned [link boost_typetraits.reference.make_unsigned make_unsigned]]
+[def __decay [link boost_typetraits.reference.decay decay]]
+[def __is_complex [link boost_typetraits.reference.is_complex is_complex]]
 
 [section:intro Introduction]
 
@@ -117,2881 +130,110 @@
 
 [endsect]
 
-[section:background Background and Tutorial]
-
-The following is an updated version of the article "C++ Type traits"
-by John Maddock and Steve Cleary that appeared in the October 2000
-issue of [@http://www.ddj.com Dr Dobb's Journal].
-
-Generic programming (writing code which works with any data type meeting a
-set of requirements) has become the method of choice for providing reusable code.
-However, there are times in generic programming when "generic" just isn't
-good enough - sometimes the differences between types are too large for an
-efficient generic implementation. This is when the traits technique
-becomes important - by encapsulating those properties that need to be
-considered on a type by type basis inside a traits class, we can
-minimize the amount of code that has to differ from one type to another,
-and maximize the amount of generic code.
-
-Consider an example: when working with character strings, one common operation is
-to determine the length of a null terminated string. Clearly it's possible to
-write generic code that can do this, but it turns out that there are much more
-efficient methods available: for example, the C library functions `strlen` and
-`wcslen` are usually written in assembler, and with suitable hardware support
-can be considerably faster than a generic version written in C++.
-The authors of the C++ standard library realized this, and abstracted the
-properties of `char` and `wchar_t` into the class `char_traits`. Generic code
-that works with character strings can simply use `char_traits<>::length` to
-determine the length of a null terminated string, safe in the knowledge
-that specializations of `char_traits` will use the most appropriate method
-available to them.
-
-[h4 Type Traits]
-
-Class `char_traits` is a classic example of a collection of type specific
-properties wrapped up in a single class - what Nathan Myers termed a
-/baggage class/[link background.references \[1\]]. In the Boost type-traits library, we[link background.references \[2\]] have written a
-set of very specific traits classes, each of which encapsulate a single trait
-from the C++ type system; for example, is a type a pointer or a reference type?
-Or does a type have a trivial constructor, or a const-qualifier?
-The type-traits classes share a unified design: each class inherits from a
-the type __true_type if the type has the specified property and inherits from
-__false_type otherwise. As we will show, these classes can be used in
-generic programming to determine the properties of a given type and introduce
-optimizations that are appropriate for that case.
-
-The type-traits library also contains a set of classes that perform a
-specific transformation on a type; for example, they can remove a
-top-level const or volatile qualifier from a type. Each class that
-performs a transformation defines a single typedef-member `type`
-that is the result of the transformation. All of the type-traits
-classes are defined inside namespace `boost`; for brevity, namespace-qualification
-is omitted in most of the code samples given.
-
-[h4 Implementation]
-
-There are far too many separate classes contained in the type-traits library
-to give a full implementation here - see the source code in the Boost library
-for the full details - however, most of the implementation is fairly repetitive
-anyway, so here we will just give you a flavor for how some of the classes are
-implemented. Beginning with possibly the simplest class in the library,
-`is_void<T>` inherits from `__true_type` only if `T` is `void`.
-
- template <typename T>
- struct __is_void : public __false_type{};
-
- template <>
- struct __is_void<void> : public __true_type{};
-
-Here we define a primary version of the template class `__is_void`, and
-provide a full-specialization when `T` is `void`. While full specialization
-of a template class is an important technique, sometimes we need a
-solution that is halfway between a fully generic solution, and a full
-specialization. This is exactly the situation for which the standards committee
-defined partial template-class specialization. As an example, consider the
-class `boost::is_pointer<T>`: here we needed a primary version that handles
-all the cases where T is not a pointer, and a partial specialization to
-handle all the cases where T is a pointer:
-
- template <typename T>
- struct __is_pointer : public __false_type{};
-
- template <typename T>
- struct __is_pointer<T*> : public __true_type{};
-
-The syntax for partial specialization is somewhat arcane and could easily
-occupy an article in its own right; like full specialization, in order to
-write a partial specialization for a class, you must first declare the
-primary template. The partial specialization contains an extra <...> after the
-class name that contains the partial specialization parameters; these define
-the types that will bind to that partial specialization rather than the
-default template. The rules for what can appear in a partial specialization
-are somewhat convoluted, but as a rule of thumb if you can legally write two
-function overloads of the form:
-
- void foo(T);
- void foo(U);
-
-Then you can also write a partial specialization of the form:
-
- template <typename T>
- class c{ /*details*/ };
-
- template <typename T>
- class c<U>{ /*details*/ };
-
-This rule is by no means foolproof, but it is reasonably simple to remember
-and close enough to the actual rule to be useful for everyday use.
-
-As a more complex example of partial specialization consider the class
-`remove_extent<T>`. This class defines a single typedef-member `type` that
-is the same type as T but with any top-level array bounds removed;
-this is an example of a traits class that performs a transformation on a type:
-
- template <typename T>
- struct __remove_extent
- { typedef T type; };
-
- template <typename T, std::size_t N>
- struct __remove_extent<T[N]>
- { typedef T type; };
-
-The aim of `__remove_extent` is this: imagine a generic algorithm that is
-passed an array type as a template parameter, `__remove_extent` provides a
-means of determining the underlying type of the array. For example
-`remove_extent<int[4][5]>::type` would evaluate to the type `int[5]`.
-This example also shows that the number of template parameters in a
-partial specialization does not have to match the number in the
-default template. However, the number of parameters that appear after the
-class name do have to match the number and type of the parameters in the
-default template.
-
-[h4 Optimized copy]
-
-As an example of how the type traits classes can be used, consider the
-standard library algorithm copy:
-
- template<typename Iter1, typename Iter2>
- Iter2 copy(Iter1 first, Iter1 last, Iter2 out);
-
-Obviously, there's no problem writing a generic version of copy that works
-for all iterator types `Iter1` and `Iter2`; however, there are some
-circumstances when the copy operation can best be performed by a call to
-`memcpy`. In order to implement copy in terms of `memcpy` all of the
-following conditions need to be met:
-
-* Both of the iterator types `Iter1` and `Iter2` must be pointers.
-* Both `Iter1` and `Iter2` must point to the same type - excluding const and
-volatile-qualifiers.
-* The type pointed to by `Iter1` must have a trivial assignment operator.
-
-By trivial assignment operator we mean that the type is either a scalar type[link background.references \[3\]] or:
-
-* The type has no user defined assignment operator.
-* The type does not have any data members that are references.
-* All base classes, and all data member objects must have trivial assignment operators.
-
-If all these conditions are met then a type can be copied using `memcpy`
-rather than using a compiler generated assignment operator. The type-traits
-library provides a class `__has_trivial_assign`, such that
-`has_trivial_assign<T>::value` is true only if T has a trivial assignment operator.
-This class "just works" for scalar types, but has to be explicitly
-specialised for class/struct types that also happen to have a trivial assignment
-operator. In other words if __has_trivial_assign gives the wrong answer,
-it will give the "safe" wrong answer - that trivial assignment is not allowable.
-
-The code for an optimized version of copy that uses `memcpy` where appropriate is
-given in [link boost_typetraits.copy the examples]. The code begins by defining a template
-function `do_copy` that performs a "slow but safe" copy. The last parameter passed
-to this function may be either a `__true_type` or a `__false_type`. Following that
-there is an overload of do_copy that uses `memcpy`: this time the iterators are required
-to actually be pointers to the same type, and the final parameter must be a
-`__true_type`. Finally, the version of `copy` calls `do_copy`, passing
-`__has_trivial_assign<value_type>()` as the final parameter: this will dispatch
-to the optimized version where appropriate, otherwise it will call the
-"slow but safe version".
-
-[h4 Was it worth it?]
-
-It has often been repeated in these columns that "premature optimization is the
-root of all evil" [link background.references \[4\]]. So the question must be asked: was our optimization
-premature? To put this in perspective the timings for our version of copy
-compared a conventional generic copy[link background.references \[5\]] are shown in table 1.
-
-Clearly the optimization makes a difference in this case; but, to be fair,
-the timings are loaded to exclude cache miss effects - without this
-accurate comparison between algorithms becomes difficult. However, perhaps
-we can add a couple of caveats to the premature optimization rule:
-
-*If you use the right algorithm for the job in the first place then optimization
-will not be required; in some cases, memcpy is the right algorithm.
-*If a component is going to be reused in many places by many people then
-optimizations may well be worthwhile where they would not be so for a single
-case - in other words, the likelihood that the optimization will be
-absolutely necessary somewhere, sometime is that much higher.
-Just as importantly the perceived value of the stock implementation will be
-higher: there is no point standardizing an algorithm if users reject it on
-the grounds that there are better, more heavily optimized versions available.
-
-[table Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)
-
-[[Version] [T] [Time]]
-[["Optimized" copy] [char] [0.99]]
-[[Conventional copy] [char] [8.07]]
-[["Optimized" copy] [int] [2.52]]
-[[Conventional copy] [int] [8.02]]
-]
-
-[h4 Pair of References]
-The optimized copy example shows how type traits may be used to perform
-optimization decisions at compile-time. Another important usage of type traits
-is to allow code to compile that otherwise would not do so unless excessive
-partial specialization is used. This is possible by delegating partial
-specialization to the type traits classes. Our example for this form of
-usage is a pair that can hold references [link background.references \[6\]].
-
-First, let us examine the definition of `std::pair`, omitting the
-comparison operators, default constructor, and template copy constructor for
-simplicity:
-
- template <typename T1, typename T2>
- struct pair
- {
- typedef T1 first_type;
- typedef T2 second_type;
-
- T1 first;
- T2 second;
-
- pair(const T1 & nfirst, const T2 & nsecond)
- :first(nfirst), second(nsecond) { }
- };
-
-Now, this "pair" cannot hold references as it currently stands, because the
-constructor would require taking a reference to a reference, which is
-currently illegal [link background.references \[7\]]. Let us consider what the constructor's parameters
-would have to be in order to allow "pair" to hold non-reference types,
-references, and constant references:
-
-[table Required Constructor Argument Types
-[[Type of `T1`] [Type of parameter to initializing constructor]]
-[[T] [const T &]]
-[[T &] [T &]]
-[[const T &] [const T &]]
-]
-
-A little familiarity with the type traits classes allows us to construct a
-single mapping that allows us to determine the type of parameter from the
-type of the contained class. The type traits classes provide a
-transformation __add_reference, which adds a reference to its type,
-unless it is already a reference.
-
-[table Using add_reference to synthesize the correct constructor type
-[[Type of `T1`] [Type of `const T1`] [Type of `add_reference<const T1>::type`]]
-[[T] [const T] [const T &]]
-[[T &] [T & \[8\]] [T &]]
-[[const T &] [const T &] [const T &]]
-]
-
-This allows us to build a primary template definition for `pair` that can
-contain non-reference types, reference types, and constant reference types:
-
- template <typename T1, typename T2>
- struct pair
- {
- typedef T1 first_type;
- typedef T2 second_type;
-
- T1 first;
- T2 second;
-
- pair(boost::__add_reference<const T1>::type nfirst,
- boost::__add_reference<const T2>::type nsecond)
- :first(nfirst), second(nsecond) { }
- };
-
-Add back in the standard comparison operators, default constructor,
-and template copy constructor (which are all the same), and you have a
-`std::pair` that can hold reference types!
-
-This same extension could have been done using partial template specialization
-of `pair`, but to specialize `pair` in this way would require three partial
-specializations, plus the primary template. Type traits allows us to
-define a single primary template that adjusts itself auto-magically to
-any of these partial specializations, instead of a brute-force partial
-specialization approach. Using type traits in this fashion allows
-programmers to delegate partial specialization to the type traits classes,
-resulting in code that is easier to maintain and easier to understand.
-
-[h4 Conclusion]
-
-We hope that in this article we have been able to give you some idea of
-what type-traits are all about. A more complete listing of the available
-classes are in the boost documentation, along with further examples using
-type traits. Templates have enabled C++ uses to take the advantage of the
-code reuse that generic programming brings; hopefully this article has
-shown that generic programming does not have to sink to the lowest common
-denominator, and that templates can be optimal as well as generic.
-
-[h4 Acknowledgements]
-
-The authors would like to thank Beman Dawes and Howard Hinnant for their
-helpful comments when preparing this article.
-
-[h4 References]
-
-# Nathan C. Myers, C++ Report, June 1995.
-# The type traits library is based upon contributions by Steve Cleary, Beman Dawes, Howard Hinnant and John Maddock: it can be found at www.boost.org.
-# A scalar type is an arithmetic type (i.e. a built-in integer or floating point type), an enumeration type, a pointer, a pointer to member, or a const- or volatile-qualified version of one of these types.
-# This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg 268.
-# The test code is available as part of the boost utility library (see algo_opt_examples.cpp), the code was compiled with gcc 2.95 with all optimisations turned on, tests were conducted on a 400MHz Pentium II machine running Microsoft Windows 98.
-# John Maddock and Howard Hinnant have submitted a "compressed_pair" library to Boost, which uses a technique similar to the one described here to hold references. Their pair also uses type traits to determine if any of the types are empty, and will derive instead of contain to conserve space -- hence the name "compressed".
-# This is actually an issue with the C++ Core Language Working Group (issue #106), submitted by Bjarne Stroustrup. The tentative resolution is to allow a "reference to a reference to T" to mean the same thing as a "reference to T", but only in template instantiation, in a method similar to multiple cv-qualifiers.
-# For those of you who are wondering why this shouldn't be const-qualified, remember that references are always implicitly constant (for example, you can't re-assign a reference). Remember also that "const T &" is something completely different. For this reason, cv-qualifiers on template type arguments that are references are ignored.
-
-[endsect]
+[include background.qbk]
 
 [section:category Type Traits by Category]
-[section:value_traits Type Traits that Describe the Properties of a Type]
-
-These traits are all /value traits/, which is to say the traits classes all
-inherit from __integral_constant, and are used to access some numerical
-property of a type. Often this is a simple true or false Boolean value,
-but in a few cases may be some other integer value (for example when dealing
-with type alignments, or array bounds: see `__alignment_of`, `__rank` and `__extent`).
-
-[section:primary Categorizing a Type]
-
-These traits identify what "kind" of type some type `T` is. These are split into
-two groups: primary traits which are all mutually exclusive, and composite traits
-that are compositions of one or more primary traits.
-
-For any given type, exactly one primary type trait will inherit from
-__true_type, and all the others will inherit from __false_type, in other
-words these traits are mutually exclusive.
-
-This means that `__is_integral<T>::value` and `__is_floating_point<T>::value`
-will only ever be true for built-in types; if you want to check for a
-user-defined class type that behaves "as if" it is an integral or floating point type,
-then use the `std::numeric_limits template` instead.
-
-[*Synopsis:]
-
- template <class T>
- struct __is_array<T>;
-
- template <class T>
- struct __is_class<T>;
-
- template <class T>
- struct __is_enum<T>;
-
- template <class T>
- struct __is_floating_point<T>;
-
- template <class T>
- struct __is_function<T>;
-
- template <class T>
- struct __is_integral<T>;
-
- template <class T>
- struct __is_member_function_pointer<T>;
-
- template <class T>
- struct __is_member_object_pointer<T>;
-
- template <class T>
- struct __is_pointer<T>;
-
- template <class T>
- struct __is_reference<T>;
-
- template <class T>
- struct __is_union<T>;
-
- template <class T>
- struct __is_void<T>;
-
-The following traits are made up of the union of one or more type
-categorizations. A type may belong to more than one of these categories,
-in addition to one of the primary categories.
-
- template <class T>
- struct __is_arithmetic;
-
- template <class T>
- struct __is_compound;
-
- template <class T>
- struct __is_fundamental;
-
- template <class T>
- struct __is_member_pointer;
-
- template <class T>
- struct __is_object;
-
- template <class T>
- struct __is_scalar;
-
-[endsect]
-
-[section:properties General Type Properties]
-
-The following templates describe the general properties of a type.
-
-[*Synopsis:]
-
- template <class T>
- struct __alignment_of;
-
- template <class T>
- struct __has_nothrow_assign;
-
- template <class T>
- struct __has_nothrow_constructor;
-
- template <class T>
- struct __has_nothrow_copy;
-
- template <class T>
- struct __has_trivial_assign;
-
- template <class T>
- struct __has_trivial_constructor;
-
- template <class T>
- struct __has_trivial_copy;
-
- template <class T>
- struct __has_trivial_destructor;
-
- template <class T>
- struct __has_virtual_destructor;
-
- template <class T>
- struct __is_abstract;
-
- template <class T>
- struct __is_const;
-
- template <class T>
- struct __is_empty;
-
- template <class T>
- struct __is_stateless;
-
- template <class T>
- struct __is_pod;
-
- template <class T>
- struct __is_polymorphic;
-
- template <class T>
- struct __is_volatile;
-
- template <class T, std::size_t N = 0>
- struct __extent;
-
- template <class T>
- struct __rank;
-
-[endsect]
-
-[section:relate Relationships Between Two Types]
-
-These templates determine the whether there is a relationship
-between two types:
-
-[*Synopsis:]
-
- template <class Base, class Derived>
- struct __is_base_of;
-
- template <class From, class To>
- struct __is_convertible;
-
- template <class T, class U>
- struct __is_same;
-
-[endsect]
-
-[endsect]
-[section:transform Type Traits that Transform One Type to Another]
-
-The following templates transform one type to another,
-based upon some well-defined rule.
-Each template has a single member called `type` that is the
-result of applying the transformation to the template argument `T`.
-
-[*Synopsis:]
-
- template <class T>
- struct __add_const;
-
- template <class T>
- struct __add_cv;
-
- template <class T>
- struct __add_pointer;
-
- template <class T>
- struct __add_reference;
-
- template <class T>
- struct __add_volatile;
-
- template <class T>
- struct __floating_point_promotion;
-
- template <class T>
- struct __integral_promotion;
-
- template <class T>
- struct __promote;
-
- template <class T>
- struct __remove_all_extents;
-
- template <class T>
- struct __remove_const;
-
- template <class T>
- struct __remove_cv;
-
- template <class T>
- struct __remove_extent;
-
- template <class T>
- struct __remove_pointer;
-
- template <class T>
- struct __remove_reference;
-
- template <class T>
- struct __remove_volatile;
-
-[h4 Broken Compiler Workarounds:]
-
-For all of these templates support for partial specialization of class templates is
-required to correctly implement the transformation.
-On the other hand, practice shows that many of the templates from this
-category are very useful, and often essential for implementing some
-generic libraries. Lack of these templates is often one of the major
-limiting factors in porting those libraries to compilers that do not yet
-support this language feature. As some of these compilers are going to be
-around for a while, and at least one of them is very wide-spread,
-it was decided that the library should provide workarounds where possible.
-
-The basic idea behind the workaround is to manually define full
-specializations of all type transformation templates for all fundamental types,
-and all their 1st and 2nd rank cv-[un]qualified derivative pointer types, and to
-provide a user-level macro that will define all the explicit specializations needed
-for any user-defined type T.
-
-The first part guarantees the successful compilation of something like this:
-
- BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value));
- BOOST_STATIC_ASSERT((is_same<char const, remove_reference<char const&>::type>::value));
- BOOST_STATIC_ASSERT((is_same<char volatile, remove_reference<char volatile&>::type>::value));
- BOOST_STATIC_ASSERT((is_same<char const volatile, remove_reference<char const volatile&>::type>::value));
- BOOST_STATIC_ASSERT((is_same<char*, remove_reference<char*&>::type>::value));
- BOOST_STATIC_ASSERT((is_same<char const*, remove_reference<char const*&>::type>::value));
- ...
- BOOST_STATIC_ASSERT((is_same<char const volatile* const volatile* const volatile, remove_reference<char const volatile* const volatile* const volatile&>::type>::value));
-
-and the second part provides the library's users with a mechanism to make the
-above code work not only for `char`, `int` or other built-in type,
-but for their own types as well:
-
- namespace myspace{
- struct MyClass {};
- }
- // declare this at global scope:
- BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(myspace::MyClass)
- // transformations on myspace::MyClass now work:
- BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_reference<myspace::MyClass&>::type>::value));
- BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_const<myspace::MyClass const>::type>::value));
- // etc.
-
-Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates
-to nothing on those compilers that *do* support partial specialization.
-
-[endsect]
-
-[section:alignment Synthesizing Types with Specific Alignments]
-
-Some low level memory management routines need to synthesize a POD type with
-specific alignment properties. The template `__type_with_alignment` finds the smallest
-type with a specified alignment, while template `__aligned_storage` creates a type
-with a specific size and alignment.
-
-[*Synopsis]
-
- template <std::size_t Align>
- struct __type_with_alignment;
-
- template <std::size_t Size, std::size_t Align>
- struct __aligned_storage;
-
-[endsect]
-
-[section:function Decomposing Function Types]
-
-The class template __function_traits extracts information from function types
-(see also __is_function). This traits class allows you to tell how many arguments
-a function takes, what those argument types are, and what the return type is.
-
-[*Synopsis]
-
- template <std::size_t Align>
- struct __function_traits;
-
-[endsect]
-
-[endsect]
-
-[section:user_defined User Defined Specializations]
-
-Occationally the end user may need to provide their own specialization
-for one of the type traits - typically where intrinsic compiler support
-is required to implement a specific trait fully.
-These specializations should derive from boost::__true_type or boost::__false_type
-as appropriate:
-
- #include <boost/type_traits/is_pod.hpp>
- #include <boost/type_traits/is_class.hpp>
- #include <boost/type_traits/is_union.hpp>
-
- struct my_pod{};
- struct my_union
- {
- char c;
- int i;
- };
-
- namespace boost
- {
- template<>
- struct __is_pod<my_pod> : public __true_type{};
-
- template<>
- struct __is_pod<my_union> : public __true_type{};
-
- template<>
- struct __is_union<my_union> : public __true_type{};
-
- template<>
- struct __is_class<my_union> : public __false_type{};
- }
-
-[endsect]
-
-[section:intrinsics Support for Compiler Intrinsics]
-
-There are some traits that can not be implemented within the current C++ language:
-to make these traits "just work" with user defined types, some kind of additional
-help from the compiler is required. Currently (May 2005) MWCW 9 and Visual C++ 8
-provide the necessary intrinsics, and other compilers will no doubt follow in due
-course.
-
-The Following traits classes always need compiler support to do the right thing
-for all types
-(but all have safe fallback positions if this support is unavailable):
-
-* __is_union
-* __is_pod
-* __has_trivial_constructor
-* __has_trivial_copy
-* __has_trivial_assign
-* __has_trivial_destructor
-* __has_nothrow_constructor
-* __has_nothrow_copy
-* __has_nothrow_assign
-* __has_virtual_destructor
-
-The following traits classes can't be portably implemented in the C++ language,
-although in practice, the implementations do in fact do the right thing on all
-the compilers we know about:
-
-* __is_empty
-* __is_polymorphic
-
-The following traits classes are dependent on one or more of the above:
-
-* __is_class
-* __is_stateless
-
-The hooks for compiler-intrinsic support are defined in
-[@../../boost/type_traits/intrinsics.hpp boost/type_traits/intrinsics.hpp], adding support for new compilers is simply
-a matter of defining one of more of the following macros:
-
-[table Macros for Compiler Intrinsics
- [[BOOST_IS_UNION(T)][Should evaluate to true if T is a union type]]
- [[BOOST_IS_POD(T)][Should evaluate to true if T is a POD type]]
- [[BOOST_IS_EMPTY(T)][Should evaluate to true if T is an empty struct or union]]
- [[BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)][Should evaluate to true if the default constructor for T is trivial (i.e. has no effect)]]
- [[BOOST_HAS_TRIVIAL_COPY(T)][Should evaluate to true if T has a trivial copy constructor (and can therefore be replaced by a call to memcpy)]]
- [[BOOST_HAS_TRIVIAL_ASSIGN(T)][Should evaluate to true if T has a trivial assignment operator (and can therefore be replaced by a call to memcpy)]]
- [[BOOST_HAS_TRIVIAL_DESTRUCTOR(T)][Should evaluate to true if T has a trivial destructor (i.e. ~T() has no effect)]]
- [[BOOST_HAS_NOTHROW_CONSTRUCTOR(T)][Should evaluate to true if `T x;` can not throw]]
- [[BOOST_HAS_NOTHROW_COPY(T)][Should evaluate to true if `T(t)` can not throw]]
- [[BOOST_HAS_NOTHROW_ASSIGN(T)][Should evaluate to true if `T t, u; t = u` can not throw]]
- [[BOOST_HAS_VIRTUAL_DESTRUCTOR(T)][Should evaluate to true T has a virtual destructor]]
-]
-
-[endsect]
-
-[section:mpl MPL Interoperability]
-
-All the value based traits in this library conform to MPL's requirements
-for an [@../../libs/mpl/doc/refmanual/integral-constant.html Integral Constant type]: that includes a number of rather intrusive
-workarounds for broken compilers.
-
-Purely as an implementation detail, this
-means that `__true_type` inherits from [@../../libs/mpl/doc/refmanual/bool.html `boost::mpl::true_`], `__false_type` inherits
-from [@../../libs/mpl/doc/refmanual/bool.html `boost::mpl::false_`], and `__integral_constant<T, v>` inherits from
-[@../../libs/mpl/doc/refmanual/integral-c.html `boost::mpl::integral_c<T,v>`] (provided `T` is not `bool`)
-
-[endsect]
-
-[section:examples Examples]
-
-[section:copy An Optimized Version of std::copy]
-
-Demonstrates a version of `std::copy` that uses `__has_trivial_assign` to
-determine whether to use `memcpy` to optimise the copy operation
-(see [@../../libs/type_traits/examples/copy_example.cpp copy_example.cpp]):
-
- //
- // opt::copy
- // same semantics as std::copy
- // calls memcpy where appropriate.
- //
-
- namespace detail{
-
- template<typename I1, typename I2, bool b>
- I2 copy_imp(I1 first, I1 last, I2 out, const boost::__integral_constant<bool, b>&)
- {
- while(first != last)
- {
- *out = *first;
- ++out;
- ++first;
- }
- return out;
- }
-
- template<typename T>
- T* copy_imp(const T* first, const T* last, T* out, const boost::__true_type&)
- {
- memcpy(out, first, (last-first)*sizeof(T));
- return out+(last-first);
- }
-
-
- }
-
- template<typename I1, typename I2>
- inline I2 copy(I1 first, I1 last, I2 out)
- {
- //
- // We can copy with memcpy if T has a trivial assignment operator,
- // and if the iterator arguments are actually pointers (this last
- // requirement we detect with overload resolution):
- //
- typedef typename std::iterator_traits<I1>::value_type value_type;
- return detail::copy_imp(first, last, out, boost::__has_trivial_assign<value_type>());
- }
-
-
-[endsect]
-
-[section:fill An Optimised Version of std::fill]
-
-Demonstrates a version of `std::fill` that uses `__has_trivial_assign` to
-determine whether to use `memset` to optimise the fill operation
-(see [@../../libs/type_traits/examples/fill_example.cpp fill_example.cpp]):
-
- //
- // fill
- // same as std::fill, but uses memset where appropriate
- //
- namespace detail{
-
- template <typename I, typename T, bool b>
- void do_fill(I first, I last, const T& val, const boost::__integral_constant<bool, b>&)
- {
- while(first != last)
- {
- *first = val;
- ++first;
- }
- }
-
- template <typename T>
- void do_fill(T* first, T* last, const T& val, const boost::__true_type&)
- {
- std::memset(first, val, last-first);
- }
-
- }
-
- template <class I, class T>
- inline void fill(I first, I last, const T& val)
- {
- //
- // We can do an optimised fill if T has a trivial assignment
- // operator and if it's size is one:
- //
- typedef boost::__integral_constant<bool,
- ::boost::__has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type;
- detail::do_fill(first, last, val, truth_type());
- }
-
-
-[endsect]
-
-[section:destruct An Example that Omits Destructor Calls For Types with Trivial Destructors]
-
-Demonstrates a simple algorithm that uses `__has_trivial_destruct` to
-determine whether to destructors need to be called
-(see [@../../libs/type_traits/examples/trivial_destructor_example.cpp trivial_destructor_example.cpp]):
-
- //
- // algorithm destroy_array:
- // The reverse of std::unitialized_copy, takes a block of
- // initialized memory and calls destructors on all objects therein.
- //
-
- namespace detail{
-
- template <class T>
- void do_destroy_array(T* first, T* last, const boost::__false_type&)
- {
- while(first != last)
- {
- first->~T();
- ++first;
- }
- }
-
- template <class T>
- inline void do_destroy_array(T* first, T* last, const boost::__true_type&)
- {
- }
-
- } // namespace detail
-
- template <class T>
- inline void destroy_array(T* p1, T* p2)
- {
- detail::do_destroy_array(p1, p2, ::boost::__has_trivial_destructor<T>());
- }
 
+[include value_traits.qbk]
+[include transform_traits.qbk]
+[include alignment_traits.qbk]
+[include decomposing_func.qbk]
 
 [endsect]
 
-[section:iter An improved Version of std::iter_swap]
-
-Demonstrates a version of `std::iter_swap` that use type traits to
-determine whether an it's arguments are proxying iterators or not,
-if they're not then it just does a `std::swap` of it's dereferenced
-arguments (the
-same as `std::iter_swap` does), however if they are proxying iterators
-then takes special care over the swap to ensure that the algorithm
-works correctly for both proxying iterators, and even iterators of
-different types
-(see [@../../libs/type_traits/examples/iter_swap_example.cpp iter_swap_example.cpp]):
-
- //
- // iter_swap:
- // tests whether iterator is a proxying iterator or not, and
- // uses optimal form accordingly:
- //
- namespace detail{
-
- template <typename I>
- static void do_swap(I one, I two, const boost::__false_type&)
- {
- typedef typename std::iterator_traits<I>::value_type v_t;
- v_t v = *one;
- *one = *two;
- *two = v;
- }
- template <typename I>
- static void do_swap(I one, I two, const boost::__true_type&)
- {
- using std::swap;
- swap(*one, *two);
- }
-
- }
-
- template <typename I1, typename I2>
- inline void iter_swap(I1 one, I2 two)
- {
- //
- // See is both arguments are non-proxying iterators,
- // and if both iterator the same type:
- //
- typedef typename std::iterator_traits<I1>::reference r1_t;
- typedef typename std::iterator_traits<I2>::reference r2_t;
-
- typedef boost::__integral_constant<bool,
- ::boost::__is_reference<r1_t>::value
- && ::boost::__is_reference<r2_t>::value
- && ::boost::__is_same<r1_t, r2_t>::value> truth_type;
-
- detail::do_swap(one, two, truth_type());
- }
-
-
-[endsect]
-
-[section:to_double Convert Numeric Types and Enums to double]
-
-Demonstrates a conversion of
-[@../../libs/numeric/conversion/doc/definitions.html#numtypes Numeric Types]
-and enum types to double:
-
- template<class T>
- inline double to_double(T const& value)
- {
- typedef typename boost::promote<T>::type promoted;
- return boost::numeric::converter<double,promoted>::convert(value);
- }
-
-[endsect]
-
-[endsect]
+[include user_defined.qbk]
+[include intrinsics.qbk]
+[include mpl.qbk]
+[include examples.qbk]
 
 [section:reference Alphabetical Reference]
 
-[section:add_const add_const]
-
- template <class T>
- struct add_const
- {
- typedef __below type;
- };
-
-__type The same type as `T const` for all `T`.
-
-__std_ref 3.9.3.
-
-__compat If the compiler does not support partial specialization of class-templates
-then this template will compile, but the member `type` will always be the same as
-type `T` except where __transform_workaround have been applied.
-
-__header ` #include <boost/type_traits/add_const.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`add_const<int>::type`][`int const`]]
-
-[[`add_const<int&>::type`] [`int&`]]
-
-[[`add_const<int*>::type`] [`int* const`]]
-
-[[`add_const<int const>::type`] [`int const`]]
-
-]
-
-[endsect]
-
-[section:add_cv add_cv]
-
- template <class T>
- struct add_cv
- {
- typedef __below type;
- };
-
-__type The same type as `T const volatile` for all `T`.
-
-__std_ref 3.9.3.
-
-__compat If the compiler does not support partial specialization of class-templates
-then this template will compile, but the member `type` will always be the same as
-type `T` except where __transform_workaround have been applied.
-
-__header ` #include <boost/type_traits/add_cv.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`add_cv<int>::type`][`int const volatile`]]
-
-[[`add_cv<int&>::type`] [`int&`]]
-
-[[`add_cv<int*>::type`] [`int* const volatile`]]
-
-[[`add_cv<int const>::type`] [`int const volatile`]]
-
-]
-
-[endsect]
-
-[section:add_pointer add_pointer]
-
- template <class T>
- struct add_pointer
- {
- typedef __below type;
- };
-
-__type The same type as `remove_reference<T>::type*`.
-
-The rationale for this template
-is that it produces the same type as `TYPEOF(&t)`,
-where `t` is an object of type `T`.
-
-__std_ref 8.3.1.
-
-__compat If the compiler does not support partial specialization of class-templates
-then this template will compile, but the member `type` will always be the same as
-type `T` except where __transform_workaround have been applied.
-
-__header ` #include <boost/type_traits/add_pointer.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`add_pointer<int>::type`][`int*`]]
-
-[[`add_pointer<int const&>::type`] [`int const*`]]
-
-[[`add_pointer<int*>::type`] [`int**`]]
-
-[[`add_pointer<int*&>::type`] [`int**`]]
-
-]
-
-[endsect]
-
-[section:add_reference add_reference]
-
- template <class T>
- struct add_reference
- {
- typedef __below type;
- };
-
-__type If `T` is not a reference type then `T&`, otherwise `T`.
-
-__std_ref 8.3.2.
-
-__compat If the compiler does not support partial specialization of class-templates
-then this template will compile, but the member `type` will always be the same as
-type `T` except where __transform_workaround have been applied.
-
-__header ` #include <boost/type_traits/add_reference.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`add_reference<int>::type`][`int&`]]
-
-[[`add_reference<int const&>::type`] [`int const&`]]
-
-[[`add_reference<int*>::type`] [`int*&`]]
-
-[[`add_reference<int*&>::type`] [`int*&`]]
-
-]
-
-[endsect]
-
-[section:add_volatile add_volatile]
-
- template <class T>
- struct add_volatile
- {
- typedef __below type;
- };
-
-__type The same type as `T volatile` for all `T`.
-
-__std_ref 3.9.3.
-
-__compat If the compiler does not support partial specialization of class-templates
-then this template will compile, but the member `type` will always be the same as
-type `T` except where __transform_workaround have been applied.
-
-__header ` #include <boost/type_traits/add_volatile.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`add_volatile<int>::type`][`int volatile`]]
-
-[[`add_volatile<int&>::type`] [`int&`]]
-
-[[`add_volatile<int*>::type`] [`int* volatile`]]
-
-[[`add_volatile<int const>::type`] [`int const volatile`]]
-
-]
-
-[endsect]
-
-[section:aligned_storage aligned_storage]
-
- template <std::size_t Size, std::size_t Align>
- struct aligned_storage
- {
- typedef __below type;
- };
-
-__type a built-in or POD type with size `Size` and an alignment
-that is a multiple of `Align`.
-
-__header ` #include <boost/type_traits/aligned_storage.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[endsect]
-
-[section:alignment_of alignment_of]
- template <class T>
- struct alignment_of : public __integral_constant<std::size_t, ALIGNOF(T)> {};
-
-__inherit Class template alignment_of inherits from
-`__integral_constant<std::size_t, ALIGNOF(T)>`, where `ALIGNOF(T)` is the
-alignment of type T.
-
-['Note: strictly speaking you should only rely on
-the value of `ALIGNOF(T)` being a multiple of the true alignment of T, although
-in practice it does compute the correct value in all the cases we know about.]
-
-__header ` #include <boost/type_traits/alignment_of.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`alignment_of<int>` inherits from `__integral_constant<std::size_t, ALIGNOF(int)>`.]
-
-[:`alignment_of<char>::type` is the type `__integral_constant<std::size_t, ALIGNOF(char)>`.]
-
-[:`alignment_of<double>::value` is an integral constant
-expression with value `ALIGNOF(double)`.]
-
-[:`alignment_of<T>::value_type` is the type `std::size_t`.]
-
-[endsect]
-
-[section:extent extent]
- template <class T, std::size_t N = 0>
- struct extent : public __integral_constant<std::size_t, EXTENT(T,N)> {};
-
-__inherit Class template extent inherits from `__integral_constant<std::size_t, EXTENT(T,N)>`,
-where `EXTENT(T,N)` is the number of elements in the N'th array dimention of type `T`.
-
-If `T` is not an array type, or if `N > __rank<T>::value`, or if the N'th array bound
-is incomplete, then `EXTENT(T,N)` is zero.
-
-__header ` #include <boost/type_traits/extent.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`extent<int[1]>` inherits from `__integral_constant<std::size_t, 1>`.]
-
-[:`extent<double[2][3][4], 1>::type` is the type `__integral_constant<std::size_t, 3>`.]
-
-[:`extent<int[4]>::value` is an integral constant
-expression that evaluates to /4/.]
-
-[:`extent<int[][2]>::value` is an integral constant
-expression that evaluates to /0/.]
-
-[:`extent<int[][2], 1>::value` is an integral constant
-expression that evaluates to /2/.]
-
-[:`extent<int*>::value` is an integral constant
-expression that evaluates to /0/.]
-
-[:`extent<T>::value_type` is the type `std::size_t`.]
-
-[endsect]
-
-[section:floating_point_promotion floating_point_promotion]
-
- template <class T>
- struct floating_point_promotion
- {
- typedef __below type;
- };
-
-__type If floating point promotion can be applied to an rvalue of type `T`,
-then applies floating point promotion to `T` and keeps cv-qualifiers of `T`,
-otherwise leaves `T` unchanged.
-
-__std_ref 4.6.
-
-__header ` #include <boost/type_traits/floating_point_promotion.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`floating_point_promotion<float const>::type`][`double const`]]
-
-[[`floating_point_promotion<float&>::type`][`float&`]]
-
-[[`floating_point_promotion<short>::type`][`short`]]
-
-]
-
-[endsect]
-
-[section:function_traits function_traits]
-[def __argN '''arg<replaceable>N</replaceable>_type''']
-
- template <class T>
- struct function_traits
- {
- static const std::size_t arity = __below;
- typedef __below result_type;
- typedef __below __argN;
- };
-
-The class template function_traits will only compile if:
-
-* The compiler supports partial specialization of class templates.
-* The template argument `T` is a /function type/, note that this ['[*is not]]
-the same thing as a /pointer to a function/.
-
-[table Function Traits Members
-[[Member] [Description]]
-[[`function_traits<T>::arity`]
- [An integral constant expression that gives the number of arguments accepted by the function type `F`.]]
-[[`function_traits<T>::result_type`]
- [The type returned by function type `F`.]]
-[[`function_traits<T>::__argN`]
- [The '''<replaceable>N</replaceable>th''' argument type of function type `F`, where `1 <= N <= arity` of `F`.]]
-]
-
-[table Examples
-[[Expression] [Result]]
-[[`function_traits<void (void)>::arity`] [An integral constant expression that has the value 0.]]
-[[`function_traits<long (int)>::arity`] [An integral constant expression that has the value 1.]]
-[[`function_traits<long (int, long, double, void*)>::arity`] [An integral constant expression that has the value 4.]]
-[[`function_traits<void (void)>::result_type`] [The type `void`.]]
-[[`function_traits<long (int)>::result_type`] [The type `long`.]]
-[[`function_traits<long (int)>::arg1_type`] [The type `int`.]]
-[[`function_traits<long (int, long, double, void*)>::arg4_type`] [The type `void*`.]]
-[[`function_traits<long (int, long, double, void*)>::arg5_type`] [A compiler error: there is no `arg4_type` since there are only three arguments.]]
-[[`function_traits<long (*)(void)>::arity`] [A compiler error: argument type is a /function pointer/, and not a /function type/.]]
-
-]
-
-[endsect]
-
-[section:has_nothrow_assign has_nothrow_assign]
-
- template <class T>
- struct has_nothrow_assign : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) type with a non-throwing assignment-operator
-then inherits from __true_type, otherwise inherits from __false_type. Type `T`
-must be a complete type.
-
-__compat If the compiler does not support partial-specialization of class
-templates, then this template can not be used with function types.
-
-Without some (as yet unspecified) help from the compiler,
-`has_nothrow_assign` will never report that a class or struct has a
-non-throwing assignment-operator; this is always safe, if possibly sub-optimal.
-Currently (May 2005) only Visual C++ 8 has the necessary compiler support to ensure that this
-trait "just works".
-
-__header ` #include <boost/type_traits/has_nothrow_assign.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[endsect]
-
-[section:has_nothrow_constructor has_nothrow_constructor]
- template <class T>
- struct has_nothrow_constructor : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) type with a non-throwing default-constructor
-then inherits from __true_type, otherwise inherits from __false_type. Type `T`
-must be a complete type.
-
-__compat If the compiler does not support partial-specialization of class
-templates, then this template can not be used with function types.
-
-Without some (as yet unspecified) help from the compiler,
-`has_nothrow_constructor` will never report that a class or struct has a
-non-throwing default-constructor; this is always safe, if possibly sub-optimal.
-Currently (May 2005) only Visual C++ 8 has the necessary compiler __intrinsics to ensure that this
-trait "just works".
-
-__header ` #include <boost/type_traits/has_nothrow_constructor.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[endsect]
-
-[section:has_nothrow_copy has_nothrow_copy]
- template <class T>
- struct has_nothrow_copy : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) type with a non-throwing copy-constructor
-then inherits from __true_type, otherwise inherits from __false_type. Type `T`
-must be a complete type.
-
-__compat If the compiler does not support partial-specialization of class
-templates, then this template can not be used with function types.
-
-Without some (as yet unspecified) help from the compiler,
-`has_nothrow_copy` will never report that a class or struct has a
-non-throwing copy-constructor; this is always safe, if possibly sub-optimal.
-Currently (May 2005) only Visual C++ 8 has the necessary compiler __intrinsics to ensure that this
-trait "just works".
-
-__header ` #include <boost/type_traits/has_nothrow_copy.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[endsect]
-
-[section:has_trivial_assign has_trivial_assign]
- template <class T>
- struct has_trivial_assign : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) type with a trivial assignment-operator
-then inherits from __true_type, otherwise inherits from __false_type.
-
-If a type has a trivial assignment-operator then the operator has the same effect
-as copying the bits of one object to the other:
-calls to the operator can be safely replaced with a call to `memcpy`.
-
-__compat If the compiler does not support partial-specialization of class
-templates, then this template can not be used with function types.
-
-Without some (as yet unspecified) help from the compiler,
-has_trivial_assign will never report that a user-defined class or struct has a
-trivial constructor; this is always safe, if possibly sub-optimal. Currently
-(May 2005) only MWCW 9 and Visual C++ 8 have the necessary compiler __intrinsics to detect
-user-defined classes with trivial constructors.
-
-__std_ref 12.8p11.
-
-__header ` #include <boost/type_traits/has_trivial_assign.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`has_trivial_assign<int>` inherits from `__true_type`.]
-
-[:`has_trivial_assign<char*>::type` is the type `__true_type`.]
-
-[:`has_trivial_assign<int (*)(long)>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`has_trivial_assign<MyClass>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`has_trivial_assign<T>::value_type` is the type `bool`.]
+[include add_const.qbk]
+[include add_cv.qbk]
+[include add_pointer.qbk]
+[include add_reference.qbk]
+[include add_volatile.qbk]
+[include aligned_storage.qbk]
+[include alignment_of.qbk]
+[include decay.qbk]
+[include extent.qbk]
+[include floating_point_promotion.qbk]
+[include function_traits.qbk]
+
+[include has_nothrow_assign.qbk]
+[include has_nothrow_constructor.qbk]
+[include has_nothrow_copy.qbk]
+[section:has_nothrow_cp_cons has_nothrow_copy_constructor]
+See __has_nothrow_copy.
+[endsect]
+[section:has_no_throw_def_cons has_nothrow_default_constructor]
+See __has_nothrow_constructor.
+[endsect]
+[include has_trivial_assign.qbk]
+[include has_trivial_constructor.qbk]
+[include has_trivial_copy.qbk]
+[section:has_trivial_cp_cons has_trivial_copy_constructor]
+See __has_trivial_copy.
+[endsect]
+[section:has_trivial_def_cons has_trivial_default_constructor]
+See __has_trivial_constructor.
+[endsect]
+[include has_trivial_destructor.qbk]
+[include has_virtual_destructor.qbk]
+
+[include integral_constant.qbk]
+[include integral_promotion.qbk]
+
+[include is_abstract.qbk]
+[include is_arithmetic.qbk]
+[include is_array.qbk]
+[include is_base_of.qbk]
+[include is_class.qbk]
+[include is_complex.qbk]
+[include is_compound.qbk]
+[include is_const.qbk]
+[include is_convertible.qbk]
+[include is_empty.qbk]
+[include is_enum.qbk]
+[include is_floating_point.qbk]
+[include is_function.qbk]
+[include is_fundamental.qbk]
+[include is_integral.qbk]
+[include is_member_function_pointer.qbk]
+[include is_member_object_pointer.qbk]
+[include is_member_pointer.qbk]
+[include is_object.qbk]
+[include is_pod.qbk]
+[include is_pointer.qbk]
+[include is_polymorphic.qbk]
+[include is_same.qbk]
+[include is_scalar.qbk]
+[include is_signed.qbk]
+[include is_stateless.qbk]
+[include is_reference.qbk]
+[include is_union.qbk]
+[include is_unsigned.qbk]
+[include is_void.qbk]
+[include is_volatile.qbk]
+
+[include make_signed.qbk]
+[include make_unsigned.qbk]
+
+[include promote.qbk]
+[include rank.qbk]
+
+[include remove_all_extents.qbk]
+[include remove_const.qbk]
+[include remove_cv.qbk]
+[include remove_extent.qbk]
+[include remove_pointer.qbk]
+[include remove_reference.qbk]
+[include remove_volatile.qbk]
+[include type_with_alignment.qbk]
 
 [endsect]
 
-[section:has_trivial_constructor has_trivial_constructor]
- template <class T>
- struct has_trivial_constructor : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) type with a trivial default-constructor
-then inherits from __true_type, otherwise inherits from __false_type.
-
-If a type has a trivial default-constructor then the constructor have no effect:
-calls to the constructor can be safely omitted. Note that using meta-programming
-to omit a call to a single trivial-constructor call is of no benefit whatsoever.
-However, if loops and/or exception handling code can also be omitted, then some
-benefit in terms of code size and speed can be obtained.
-
-__compat If the compiler does not support partial-specialization of class
-templates, then this template can not be used with function types.
-
-Without some (as yet unspecified) help from the compiler,
-has_trivial_constructor will never report that a user-defined class or struct has a
-trivial constructor; this is always safe, if possibly sub-optimal. Currently
-(May 2005) only MWCW 9 and Visual C++ 8 have the necessary compiler __intrinsics to detect
-user-defined classes with trivial constructors.
-
-__std_ref 12.1p6.
-
-__header ` #include <boost/type_traits/has_trivial_constructor.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`has_trivial_constructor<int>` inherits from `__true_type`.]
-
-[:`has_trivial_constructor<char*>::type` is the type `__true_type`.]
-
-[:`has_trivial_constructor<int (*)(long)>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`has_trivial_constructor<MyClass>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`has_trivial_constructor<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:has_trivial_copy has_trivial_copy]
- template <class T>
- struct has_trivial_copy : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) type with a trivial copy-constructor
-then inherits from __true_type, otherwise inherits from __false_type.
-
-If a type has a trivial copy-constructor then the constructor has the same effect
-as copying the bits of one object to the other:
-calls to the constructor can be safely replaced with a call to `memcpy`.
-
-__compat If the compiler does not support partial-specialization of class
-templates, then this template can not be used with function types.
-
-Without some (as yet unspecified) help from the compiler,
-has_trivial_copy will never report that a user-defined class or struct has a
-trivial constructor; this is always safe, if possibly sub-optimal. Currently
-(May 2005) only MWCW 9 and Visual C++ 8 have the necessary compiler __intrinsics to detect
-user-defined classes with trivial constructors.
-
-__std_ref 12.8p6.
-
-__header ` #include <boost/type_traits/has_trivial_copy.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`has_trivial_copy<int>` inherits from `__true_type`.]
-
-[:`has_trivial_copy<char*>::type` is the type `__true_type`.]
-
-[:`has_trivial_copy<int (*)(long)>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`has_trivial_copy<MyClass>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`has_trivial_copy<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:has_trivial_destructor has_trivial_destructor]
- template <class T>
- struct has_trivial_destructor : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) type with a trivial destructor
-then inherits from __true_type, otherwise inherits from __false_type.
-
-If a type has a trivial destructor then the destructor has no effect:
-calls to the destructor can be safely omitted. Note that using meta-programming
-to omit a call to a single trivial-constructor call is of no benefit whatsoever.
-However, if loops and/or exception handling code can also be omitted, then some
-benefit in terms of code size and speed can be obtained.
-
-__compat If the compiler does not support partial-specialization of class
-templates, then this template can not be used with function types.
-
-Without some (as yet unspecified) help from the compiler,
-has_trivial_destructor will never report that a user-defined class or struct has a
-trivial destructor; this is always safe, if possibly sub-optimal. Currently
-(May 2005) only MWCW 9 and Visual C++ 8 have the necessary compiler __intrinsics to detect
-user-defined classes with trivial constructors.
-
-__std_ref 12.4p3.
-
-__header ` #include <boost/type_traits/has_trivial_destructor.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`has_trivial_destructor<int>` inherits from `__true_type`.]
-
-[:`has_trivial_destructor<char*>::type` is the type `__true_type`.]
-
-[:`has_trivial_destructor<int (*)(long)>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`has_trivial_destructor<MyClass>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`has_trivial_destructor<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:has_virtual_destructor has_virtual_destructor]
- template <class T>
- struct has_virtual_destructor : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) type with a virtual destructor
-then inherits from __true_type, otherwise inherits from __false_type.
-
-__compat This trait is provided for completeness, since it's part of the
-Technical Report on C++ Library Extensions. However, there is currently no
-way to portably implement this trait. The default version provided
-always inherits from __false_type, and has to be explicitly specialized for
-types with virtual destructors unless the compiler used has compiler __intrinsics
-that enable the trait to do the right thing: currently (May 2005) only Visual C++
-8 has the necessary __intrinsics.
-
-__std_ref 12.4.
-
-__header ` #include <boost/type_traits/has_virtual_destructor.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[endsect]
-
-[section:integral_constant integral_constant]
- template <class T, T val>
- struct integral_constant
- {
- typedef integral_constant<T, val> type;
- typedef T value_type;
- static const T value = val;
- };
-
- typedef integral_constant<bool, true> true_type;
- typedef integral_constant<bool, false> false_type;
-
-Class template `integral_constant` is the common base class for all the value-based
-type traits. The two typedef's `true_type` and `false_type` are provided for
-convenience: most of the value traits are Boolean properties and so will inherit from
-one of these.
-
-[endsect]
-
-[section:integral_promotion integral_promotion]
-
- template <class T>
- struct integral_promotion
- {
- typedef __below type;
- };
-
-__type If integral promotion can be applied to an rvalue of type `T`, then
-applies integral promotion to `T` and keeps cv-qualifiers of `T`,
-otherwise leaves `T` unchanged.
-
-__std_ref 4.5 except 4.5/3 (integral bit-field).
-
-__header ` #include <boost/type_traits/integral_promotion.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`integral_promotion<short const>::type`][`int const`]]
-
-[[`integral_promotion<short&>::type`][`short&`]]
-
-[[`integral_promotion<enum std::float_round_style>::type`][`int`]]
-
-]
-
-[endsect]
-
-[section:is_abstract is_abstract]
- template <class T>
- struct is_abstract : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) abstract type then inherits from
-__true_type, otherwise inherits from __false_type.
-
-__std_ref 10.3.
-
-__header ` #include <boost/type_traits/is_abstract.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__compat The compiler must support DR337 (as of April 2005: GCC 3.4, VC++ 7.1 (and later),
- Intel C++ 7 (and later), and Comeau 4.3.2).
-Otherwise behaves the same as __is_polymorphic;
-this is the "safe fallback position" for which polymorphic types are always
-regarded as potentially abstract. The macro BOOST_NO_IS_ABSTRACT is used to
-signify that the implementation is buggy, users should check for this in their
-own code if the "safe fallback" is not suitable for their particular use-case.
-
-__examples
-
-[:Given: `class abc{ virtual ~abc() = 0; };` ]
-
-[:`is_abstract<abc>` inherits from `__true_type`.]
-
-[:`is_abstract<abc>::type` is the type `__true_type`.]
-
-[:`is_abstract<abc const>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_abstract<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_arithmetic is_arithmetic]
- template <class T>
- struct is_arithmetic : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) arithmetic type then inherits from
-__true_type, otherwise inherits from __false_type. Arithmetic types include
-integral and floating point types (see also __is_integral and __is_floating_point).
-
-__std_ref 3.9.1p8.
-
-__header ` #include <boost/type_traits/is_arithmetic.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_arithmetic<int>` inherits from `__true_type`.]
-
-[:`is_arithmetic<char>::type` is the type `__true_type`.]
-
-[:`is_arithmetic<double>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_arithmetic<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_array is_array]
- template <class T>
- struct is_array : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) array type then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.2 and 8.3.4.
-
-__header ` #include <boost/type_traits/is_array.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__compat If the compiler does not support
-partial-specialization of class templates, then this template
-can give the wrong result with function types.
-
-__examples
-
-[:`is_array<int[2]>` inherits from `__true_type`.]
-
-[:`is_array<char[2][3]>::type` is the type `__true_type`.]
-
-[:`is_array<double[]>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_array<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_base_of is_base_of]
- template <class Base, class Derived>
- struct is_base_of : public __tof {};
-
-__inherit If Base is base class of type Derived or if both types are the same
-then inherits from __true_type,
-otherwise inherits from __false_type.
-
-This template will detect non-public base classes, and ambiguous base classes.
-
-Note that `is_base_of<X,X>` will always inherit from __true_type. [*This is the
-case even if `X` is not a class type]. This is a change in behaviour
-from Boost-1.33 in order to track the Technical Report on C++ Library Extensions.
-
-Types `Base` and `Derived` must not be incomplete types.
-
-__std_ref 10.
-
-__header ` #include <boost/type_traits/is_base_of.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__compat If the compiler does not support partial-specialization of class templates,
-then this template can not be used with function types. There are some older compilers
-which will produce compiler errors if `Base` is a private base class of `Derived`, or if
-`Base` is an ambiguous base of `Derived`. These compilers include Borland C++, older
-versions of Sun Forte C++, Digital Mars C++, and older versions of EDG based compilers.
-
-__examples
-
-[:Given: ` class Base{}; class Derived : public Base{};` ]
-
-[:`is_base_of<Base, Derived>` inherits from `__true_type`.]
-
-[:`is_base_of<Base, Derived>::type` is the type `__true_type`.]
-
-[:`is_base_of<Base, Derived>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_base_of<Base, Derived>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_base_of<Base, Base>::value` is an integral constant
-expression that evaluates to /true/: a class is regarded as it's own base.]
-
-[:`is_base_of<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_class is_class]
- template <class T>
- struct is_class : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) class type then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.2 and 9.2.
-
-__header ` #include <boost/type_traits/is_class.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__compat Without (some as yet unspecified) help from the compiler,
-we cannot distinguish between union and class types, as a result this type
-will erroneously inherit from __true_type for union types. See also __is_union.
-Currently (May 2005) only Visual C++ 8 has the necessary compiler __intrinsics to
-correctly identify union types, and therefore make is_class function correctly.
-
-__examples
-
-[:Given: `class MyClass;` then:]
-
-[:`is_class<MyClass>` inherits from `__true_type`.]
-
-[:`is_class<MyClass const>::type` is the type `__true_type`.]
-
-[:`is_class<MyClass>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_class<MyClass&>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_class<MyClass*>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_class<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_compound is_compound]
- template <class T>
- struct is_compound : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) compound type then inherits from __true_type,
-otherwise inherits from __false_type. Any type that is not a fundamental type is
-a compound type (see also __is_fundamental).
-
-__std_ref 3.9.2.
-
-__header ` #include <boost/type_traits/is_compound.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_compound<MyClass>` inherits from `__true_type`.]
-
-[:`is_compound<MyEnum>::type` is the type `__true_type`.]
-
-[:`is_compound<int*>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_compound<int&>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_compound<int>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_compound<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_const is_const]
- template <class T>
- struct is_const : public __tof {};
-
-__inherit If T is a (top level) const-qualified type then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.3.
-
-__header ` #include <boost/type_traits/is_const.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_const<int const>` inherits from `__true_type`.]
-
-[:`is_const<int const volatile>::type` is the type `__true_type`.]
-
-[:`is_const<int* const>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_const<int const*>::value` is an integral constant
-expression that evaluates to /false/: the const-qualifier is not
-at the top level in this case.]
-
-[:`is_const<int const&>::value` is an integral constant
-expression that evaluates to /false/: the const-qualifier is not
-at the top level in this case.]
-
-[:`is_const<int>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_const<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_convertible is_convertible]
- template <class From, class To>
- struct is_convertible : public __tof {};
-
-__inherit If an imaginary lvalue of type `From` is convertible to type `To` then
-inherits from __true_type, otherwise inherits from __false_type.
-
-Type From must not be an incomplete type.
-
-Type To must not be an incomplete, or function type.
-
-No types are considered to be convertible to array types or abstract-class types.
-
-This template can not detect whether a converting-constructor is `public` or not: if
-type `To` has a `private` converting constructor from type `From` then instantiating
-`is_convertible<From, To>` will produce a compiler error. For this reason `is_convertible`
-can not be used to determine whether a type has a `public` copy-constructor or not.
-
-This template will also produce compiler errors if the conversion is ambiguous,
-for example:
-
- struct A {};
- struct B : A {};
- struct C : A {};
- struct D : B, C {};
- // This produces a compiler error, the conversion is ambiguous:
- bool const y = boost::is_convertible<D*,A*>::value;
-
-__std_ref 4 and 8.5.
-
-__compat This template is currently broken with Borland C++ Builder 5 (and earlier),
-for constructor-based conversions, and for the Metrowerks 7 (and earlier)
-compiler in all cases. If the compiler does not support `__is_abstract`, then the
-template parameter `To` must not be an abstract type.
-
-__header ` #include <boost/type_traits/is_convertible.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_convertible<int, double>` inherits from `__true_type`.]
-
-[:`is_convertible<const int, double>::type` is the type `__true_type`.]
-
-[:`is_convertible<int* const, int*>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_convertible<int const*, int*>::value` is an integral constant
-expression that evaluates to /false/: the conversion would require a `const_cast`.]
-
-[:`is_convertible<int const&, long>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_convertible<int>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_convertible<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_empty is_empty]
- template <class T>
- struct is_empty : public __tof {};
-
-__inherit If T is an empty class type then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 10p5.
-
-__header ` #include <boost/type_traits/is_empty.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__compat In order to correctly detect empty classes this trait relies on either:
-
-* the compiler implementing zero sized empty base classes, or
-* the compiler providing __intrinsics to detect empty classes.
-
-Can not be used with incomplete types.
-
-Can not be used with union types, until is_union can be made to work.
-
-If the compiler does not support partial-specialization of class templates,
-then this template can not be used with abstract types.
-
-__examples
-
-[:Given: `struct empty_class {};` ]
-
-[:`is_empty<empty_class>` inherits from `__true_type`.]
-
-[:`is_empty<empty_class const>::type` is the type `__true_type`.]
-
-[:`is_empty<empty_class>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_empty<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_enum is_enum]
- template <class T>
- struct is_enum : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) enum type then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.2 and 7.2.
-
-__header ` #include <boost/type_traits/is_enum.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__compat Requires a correctly functioning __is_convertible template;
- this means that is_enum is currently broken under Borland C++ Builder 5,
- and for the Metrowerks compiler prior to version 8, other compilers
- should handle this template just fine.
-
-__examples
-
-[:Given: `enum my_enum { one, two };` ]
-
-[:`is_enum<my_enum>` inherits from `__true_type`.]
-
-[:`is_enum<my_enum const>::type` is the type `__true_type`.]
-
-[:`is_enum<my_enum>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_enum<my_enum&>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_enum<my_enum*>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_enum<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_floating_point is_floating_point]
- template <class T>
- struct is_floating_point : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) floating point type then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.1p8.
-
-__header ` #include <boost/type_traits/is_floating_point.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_floating_point<float>` inherits from `__true_type`.]
-
-[:`is_floating_point<double>::type` is the type `__true_type`.]
-
-[:`is_floating_point<long double>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_floating_point<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_function is_function]
-
- template <class T>
- struct is_function : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) function type then inherits from __true_type,
-otherwise inherits from __false_type. Note that this template does not detect /pointers
-to functions/, or /references to functions/, these are detected by __is_pointer and
-__is_reference respectively:
-
- typedef int f1(); // f1 is of function type.
- typedef int (f2*)(); // f2 is a pointer to a function.
- typedef int (f3&)(); // f3 is a reference to a function.
-
-__std_ref 3.9.2p1 and 8.3.5.
-
-__header ` #include <boost/type_traits/is_function.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_function<int (void)>` inherits from `__true_type`.]
-
-[:`is_function<long (double, int)>::type` is the type `__true_type`.]
-
-[:`is_function<long (double, int)>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_function<long (*)(double, int)>::value` is an integral constant
-expression that evaluates to /false/: the argument in this case is a pointer type,
-not a function type.]
-
-[:`is_function<long (&)(double, int)>::value` is an integral constant
-expression that evaluates to /false/: the argument in this case is a
-reference to a function, not a function type.]
-
-[:`is_function<long (MyClass::*)(double, int)>::value` is an integral constant
-expression that evaluates to /false/: the argument in this case is a pointer
-to a member function.]
-
-[:`is_function<T>::value_type` is the type `bool`.]
-
-[tip Don't confuse function-types with pointers to functions:\n\n
-`typedef int f(double);`\n\n
-defines a function type,\n\n
-`f foo;`\n\n
-declares a prototype for a function of type `f`,\n\n
-`f* pf = foo;`\n
-`f& fr = foo;`\n\n
-declares a pointer and a reference to the function `foo`.\n\n
-If you want to detect whether some type is a pointer-to-function then use:\n\n
-`__is_function<__remove_pointer<T>::type>::value && __is_pointer<T>::value`\n\n
-or for pointers to member functions you can just use __is_member_function_pointer directly.]
-
-[endsect]
-
-[section:is_fundamental is_fundamental]
- template <class T>
- struct is_fundamental : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) fundamental type then inherits from __true_type,
-otherwise inherits from __false_type. Fundamental types include integral, floating
-point and void types (see also __is_integral, __is_floating_point and __is_void)
-
-__std_ref 3.9.1.
-
-__header ` #include <boost/type_traits/is_fundamental.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_fundamental<int)>` inherits from `__true_type`.]
-
-[:`is_fundamental<double const>::type` is the type `__true_type`.]
-
-[:`is_fundamental<void>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_fundamental<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_integral is_integral]
- template <class T>
- struct is_integral : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) integral type then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.1p7.
-
-__header ` #include <boost/type_traits/is_integral.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_integral<int>` inherits from `__true_type`.]
-
-[:`is_integral<const char>::type` is the type `__true_type`.]
-
-[:`is_integral<long>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_integral<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_member_function_pointer is_member_function_pointer]
- template <class T>
- struct is_member_function_pointer : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) pointer to a member function
-then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.2 and 8.3.3.
-
-__header ` #include <boost/type_traits/is_member_function_pointer.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_member_function_pointer<int (MyClass::*)(void)>` inherits from `__true_type`.]
-
-[:`is_member_function_pointer<int (MyClass::*)(char)>::type` is the type `__true_type`.]
-
-[:`is_member_function_pointer<int (MyClass::*)(void)const>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_member_function_pointer<int (MyClass::*)>::value` is an integral constant
-expression that evaluates to /false/: the argument in this case is a pointer to
-a data member and not a member function, see __is_member_object_pointer
-and __is_member_pointer]
-
-[:`is_member_function_pointer<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_member_object_pointer is_member_object_pointer]
- template <class T>
- struct is_member_object_pointer : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) pointer to a member object (a data member)
-then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.2 and 8.3.3.
-
-__header ` #include <boost/type_traits/is_member_object_pointer.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_member_object_pointer<int (MyClass::*)>` inherits from `__true_type`.]
-
-[:`is_member_object_pointer<double (MyClass::*)>::type` is the type `__true_type`.]
-
-[:`is_member_object_pointer<const int (MyClass::*)>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_member_object_pointer<int (MyClass::*)(void)>::value` is an integral constant
-expression that evaluates to /false/: the argument in this case is a pointer to
-a member function and not a member object, see __is_member_function_pointer
-and __is_member_pointer]
-
-[:`is_member_object_pointer<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_member_pointer is_member_pointer]
- template <class T>
- struct is_member_pointer : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) pointer to a member (either a function
-or a data member)
-then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.2 and 8.3.3.
-
-__header ` #include <boost/type_traits/is_member_pointer.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_member_pointer<int (MyClass::*)>` inherits from `__true_type`.]
-
-[:`is_member_pointer<int (MyClass::*)(char)>::type` is the type `__true_type`.]
-
-[:`is_member_pointer<int (MyClass::*)(void)const>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_member_pointer<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_object is_object]
- template <class T>
- struct is_object : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) object type
-then inherits from __true_type,
-otherwise inherits from __false_type. All types are object types except
-references, void, and function types.
-
-__std_ref 3.9p9.
-
-__header ` #include <boost/type_traits/is_object.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_object<int>` inherits from `__true_type`.]
-
-[:`is_object<int*>::type` is the type `__true_type`.]
-
-[:`is_object<int (*)(void)>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_object<int (MyClass::*)(void)const>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_object<int &>::value` is an integral constant
-expression that evaluates to /false/: reference types are not objects]
-
-[:`is_object<int (double)>::value` is an integral constant
-expression that evaluates to /false/: function types are not objects]
-
-[:`is_object<const void>::value` is an integral constant
-expression that evaluates to /false/: void is not an object type]
-
-[:`is_object<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_pod is_pod]
- template <class T>
- struct is_pod : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) POD type then inherits from __true_type,
-otherwise inherits from __false_type.
-
-POD stands for "Plain old data".
-Arithmetic types, and enumeration types,
-a pointers and pointer to members are all PODs. Classes and unions can also
-be POD's if they have no non-static data members that are of reference or
-non-POD type, no user defined constructors, no user defined assignment
-operators, no private or protected non-static data members,
-no virtual functions and no base classes. Finally, a cv-qualified POD is
-still a POD, as is an array of PODs.
-
-__std_ref 3.9p10 and 9p4 (Note that POD's are also aggregates, see 8.5.1).
-
-__compat If the compiler does not support partial-specialization
-of class templates, then this template can not be used with function types.
-
-Without some (as yet unspecified) help from the compiler, is_pod will
-never report that a class or struct is a POD; this is always safe,
-if possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have the
-necessary compiler-__intrinsics.
-
-__header ` #include <boost/type_traits/is_pod.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_pod<int>` inherits from `__true_type`.]
-
-[:`is_pod<char*>::type` is the type `__true_type`.]
-
-[:`is_pod<int (*)(long)>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_pod<MyClass>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_pod<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_pointer is_pointer]
- template <class T>
- struct is_pointer : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) pointer type (includes function pointers,
-but excludes pointers to members) then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.2p2 and 8.3.1.
-
-__header ` #include <boost/type_traits/is_pointer.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_pointer<int*>` inherits from `__true_type`.]
-
-[:`is_pointer<char* const>::type` is the type `__true_type`.]
-
-[:`is_pointer<int (*)(long)>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_pointer<int (MyClass::*)(long)>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_pointer<int (MyClass::*)>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_pointer<T>::value_type` is the type `bool`.]
-
-[important `is_pointer` detects "real" pointer types only, and /not/ smart pointers.
-Users should not specialise `is_pointer` for smart pointer types, as doing so may cause
-Boost (and other third party) code to fail to function correctly.
-Users wanting a trait to detect smart pointers should create their own.
-However, note that there is no way in general to auto-magically detect smart pointer types,
-so such a trait would have to be partially specialised for each supported smart pointer type.]
-
-[endsect]
-
-[section:is_polymorphic is_polymorphic]
- template <class T>
- struct is_polymorphic : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) polymorphic type
-then inherits from __true_type,
-otherwise inherits from __false_type. Type `T` must be a complete type.
-
-__std_ref 10.3.
-
-__compat The implementation requires some knowledge of the compilers ABI,
-it does actually seem to work with the majority of compilers though.
-
-__header ` #include <boost/type_traits/is_polymorphic.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[: Given: `class poly{ virtual ~poly(); };` ]
-
-[:`is_polymorphic<poly>` inherits from `__true_type`.]
-
-[:`is_polymorphic<poly const>::type` is the type `__true_type`.]
-
-[:`is_polymorphic<poly>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_polymorphic<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_same is_same]
- template <class T, class U>
- struct is_same : public __tof {};
-
-__inherit If T and U are the same types then inherits from
-__true_type, otherwise inherits from __false_type.
-
-__header ` #include <boost/type_traits/is_same.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__compat If the compiler does not support partial-specialization of class templates,
-then this template can not be used with abstract, incomplete or function types.
-
-__examples
-
-[:`is_same<int, int>` inherits from `__true_type`.]
-
-[:`is_same<int, int>::type` is the type `__true_type`.]
-
-[:`is_same<int, int>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_same<int const, int>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_same<int&, int>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_same<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_scalar is_scalar]
- template <class T>
- struct is_scalar : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) scalar type then inherits from
-__true_type, otherwise inherits from __false_type. Scalar types include
-integral, floating point, enumeration, pointer, and pointer-to-member types.
-
-__std_ref 3.9p10.
-
-__header ` #include <boost/type_traits/is_scalar.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__compat If the compiler does not support partial-specialization of class templates,
-then this template can not be used with function types.
-
-__examples
-
-[:`is_scalar<int*>` inherits from `__true_type`.]
-
-[:`is_scalar<int>::type` is the type `__true_type`.]
-
-[:`is_scalar<double>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_scalar<int (*)(long)>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_scalar<int (MyClass::*)(long)>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_scalar<int (MyClass::*)>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_scalar<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_stateless is_stateless]
- template <class T>
- struct is_stateless : public __tof {};
-
-__inherit Ff T is a stateless type then inherits from __true_type, otherwise
-from __false_type.
-
-Type T must be a complete type.
-
-A stateless type is a type that has no storage and whose constructors and
-destructors are trivial. That means that `is_stateless` only inherits from
-__true_type if the following expression is `true`:
-
- ::boost::has_trivial_constructor<T>::value
- && ::boost::has_trivial_copy<T>::value
- && ::boost::has_trivial_destructor<T>::value
- && ::boost::is_class<T>::value
- && ::boost::is_empty<T>::value
-
-__std_ref 3.9p10.
-
-__header ` #include <boost/type_traits/is_stateless.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__compat If the compiler does not support partial-specialization of class templates,
-then this template can not be used with function types.
-
-Without some (as yet unspecified) help from the compiler, is_stateless will never
-report that a class or struct is stateless; this is always safe,
-if possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have the necessary
-compiler __intrinsics to make this template work automatically.
-
-[endsect]
-
-[section:is_reference is_reference]
- template <class T>
- struct is_reference : public __tof {};
-
-__inherit If T is a reference pointer type then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.2 and 8.3.2.
-
-__compat If the compiler does not
-support partial-specialization of class templates,
-then this template may report the wrong result for function types,
-and for types that are both const and volatile qualified.
-
-__header ` #include <boost/type_traits/is_reference.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_reference<int&>` inherits from `__true_type`.]
-
-[:`is_reference<int const&>::type` is the type `__true_type`.]
-
-[:`is_reference<int (&)(long)>::value` is an integral constant
-expression that evaluates to /true/ (the argument in this case is
-a reference to a function).]
-
-[:`is_reference<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_union is_union]
- template <class T>
- struct is_union : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) union type then inherits from __true_type,
-otherwise inherits from __false_type. Currently requires some kind of compiler
-support, otherwise unions are identified as classes.
-
-__std_ref 3.9.2 and 9.5.
-
-__compat Without (some as yet unspecified) help from the
-compiler, we cannot distinguish between union and class types using only standard C++,
-as a result this type will never inherit from __true_type, unless the user explicitly
-specializes the template for their user-defined union types, or unless the compiler
-supplies some unspecified intrinsic that implements this functionality. Currently
-(May 2005) only Visual C++ 8 has the necessary compiler __intrinsics to make this
-trait "just work" without user intervention.
-
-__header ` #include <boost/type_traits/is_union.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_union<void>` inherits from `__true_type`.]
-
-[:`is_union<const void>::type` is the type `__true_type`.]
-
-[:`is_union<void>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_union<void*>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_union<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_void is_void]
- template <class T>
- struct is_void : public __tof {};
-
-__inherit If T is a (possibly cv-qualified) void type then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.1p9.
-
-__header ` #include <boost/type_traits/is_void.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_void<void>` inherits from `__true_type`.]
-
-[:`is_void<const void>::type` is the type `__true_type`.]
-
-[:`is_void<void>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_void<void*>::value` is an integral constant
-expression that evaluates to /false/.]
-
-[:`is_void<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:is_volatile is_volatile]
- template <class T>
- struct is_volatile : public __tof {};
-
-__inherit If T is a (top level) volatile-qualified type then inherits from __true_type,
-otherwise inherits from __false_type.
-
-__std_ref 3.9.3.
-
-__header ` #include <boost/type_traits/is_volatile.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`is_volatile<volatile int>` inherits from `__true_type`.]
-
-[:`is_volatile<const volatile int>::type` is the type `__true_type`.]
-
-[:`is_volatile<int* volatile>::value` is an integral constant
-expression that evaluates to /true/.]
-
-[:`is_volatile<int volatile*>::value` is an integral constant
-expression that evaluates to /false/: the volatile qualifier is not
-at the top level in this case.]
-
-[:`is_volatile<T>::value_type` is the type `bool`.]
-
-[endsect]
-
-[section:promote promote]
-
- template <class T>
- struct promote
- {
- typedef __below type;
- };
-
-__type If integral or floating point promotion can be applied to an rvalue
-of type `T`, then applies integral and floating point promotions to `T` and
-keeps cv-qualifiers of `T`, otherwise leaves `T` unchanged. See also
-__integral_promotion and __floating_point_promotion.
-
-__std_ref 4.5 except 4.5/3 (integral bit-field) and 4.6.
-
-__header ` #include <boost/type_traits/promote.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`promote<short volatile>::type`][`int volatile`]]
-
-[[`promote<float const>::type`][`double const`]]
-
-[[`promote<short&>::type`][`short&`]]
-
-]
-
-[endsect]
-
-[section:rank rank]
- template <class T>
- struct rank : public __integral_constant<std::size_t, RANK(T)> {};
-
-__inherit Class template rank inherits from `__integral_constant<std::size_t, RANK(T)>`,
-where `RANK(T)` is the number of array dimensions in type `T`.
-
-If `T` is not an array type, then `RANK(T)` is zero.
-
-__header ` #include <boost/type_traits/rank.hpp>` or ` #include <boost/type_traits.hpp>`
-
-__examples
-
-[:`rank<int[]>` inherits from `__integral_constant<std::size_t, 1>`.]
-
-[:`rank<double[2][3][4]>::type` is the type `__integral_constant<std::size_t, 3>`.]
-
-[:`rank<int[1]>::value` is an integral constant
-expression that evaluates to /1/.]
-
-[:`rank<int[][2]>::value` is an integral constant
-expression that evaluates to /2/.]
-
-[:`rank<int*>::value` is an integral constant
-expression that evaluates to /0/.]
-
-[:`rank<T>::value_type` is the type `std::size_t`.]
-
-[endsect]
-
-[section:remove_all_extents remove_all_extents]
-
- template <class T>
- struct remove_all_extents
- {
- typedef __below type;
- };
-
-__type If `T` is an array type, then removes all of the array bounds on `T`, otherwise
-leaves `T` unchanged.
-
-__std_ref 8.3.4.
-
-__compat If the compiler does not support partial specialization of class-templates
-then this template will compile, but the member `type` will always be the same as
-type `T` except where __transform_workaround have been applied.
-
-__header ` #include <boost/type_traits/remove_all_extents.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`remove_all_extents<int>::type`][`int`]]
-
-[[`remove_all_extents<int const[2]>::type`] [`int const`]]
-
-[[`remove_all_extents<int[][2]>::type`] [`int`]]
-
-[[`remove_all_extents<int[2][3][4]>::type`] [`int`]]
-
-[[`remove_all_extents<int const*>::type`] [`int const*`]]
-
-]
-
-[endsect]
-
-[section:remove_const remove_const]
-
- template <class T>
- struct remove_const
- {
- typedef __below type;
- };
-
-__type The same type as `T`, but with any /top level/ const-qualifier removed.
-
-__std_ref 3.9.3.
-
-__compat If the compiler does not support partial specialization of class-templates
-then this template will compile, but the member `type` will always be the same as
-type `T` except where __transform_workaround have been applied.
-
-__header ` #include <boost/type_traits/remove_const.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`remove_const<int>::type`][`int`]]
-
-[[`remove_const<int const>::type`] [`int`]]
-
-[[`remove_const<int const volatile>::type`] [`int volatile`]]
-
-[[`remove_const<int const&>::type`] [`int const&`]]
-
-[[`remove_const<int const*>::type`] [`int const*`]]
-
-]
-
-[endsect]
-
-[section:remove_cv remove_cv]
-
- template <class T>
- struct remove_cv
- {
- typedef __below type;
- };
-
-__type The same type as `T`, but with any /top level/ cv-qualifiers removed.
-
-__std_ref 3.9.3.
-
-__compat If the compiler does not support partial specialization of class-templates
-then this template will compile, but the member `type` will always be the same as
-type `T` except where __transform_workaround have been applied.
-
-__header ` #include <boost/type_traits/remove_cv.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`remove_cv<int>::type`][`int`]]
-
-[[`remove_cv<int const>::type`] [`int`]]
-
-[[`remove_cv<int const volatile>::type`] [`int`]]
-
-[[`remove_cv<int const&>::type`] [`int const&`]]
-
-[[`remove_cv<int const*>::type`] [`int const*`]]
-
-]
-
-[endsect]
-
-[section:remove_extent remove_extent]
-
- template <class T>
- struct remove_extent
- {
- typedef __below type;
- };
-
-__type If `T` is an array type, then removes the topmost array bound,
-otherwise leaves `T` unchanged.
-
-__std_ref 8.3.4.
-
-__compat If the compiler does not support partial specialization of class-templates
-then this template will compile, but the member `type` will always be the same as
-type `T` except where __transform_workaround have been applied.
-
-__header ` #include <boost/type_traits/remove_extent.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`remove_extent<int>::type`][`int`]]
-
-[[`remove_extent<int const[2]>::type`] [`int const`]]
-
-[[`remove_extent<int[2][4]>::type`] [`int[4]`]]
-
-[[`remove_extent<int[][2]>::type`] [`int[2]`]]
-
-[[`remove_extent<int const*>::type`] [`int const*`]]
-
-]
-
-[endsect]
-
-[section:remove_pointer remove_pointer]
-
- template <class T>
- struct remove_pointer
- {
- typedef __below type;
- };
-
-__type The same type as `T`, but with any pointer modifier removed.
-
-__std_ref 8.3.1.
-
-__compat If the compiler does not support partial specialization of class-templates
-then this template will compile, but the member `type` will always be the same as
-type `T` except where __transform_workaround have been applied.
-
-__header ` #include <boost/type_traits/remove_pointer.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`remove_pointer<int>::type`][`int`]]
-
-[[`remove_pointer<int const*>::type`] [`int const`]]
-
-[[`remove_pointer<int const**>::type`] [`int const*`]]
-
-[[`remove_pointer<int&>::type`] [`int&`]]
-
-[[`remove_pointer<int*&>::type`] [`int*&`]]
-
-]
-
-[endsect]
-
-[section:remove_reference remove_reference]
-
- template <class T>
- struct remove_reference
- {
- typedef __below type;
- };
-
-__type The same type as `T`, but with any reference modifier removed.
-
-__std_ref 8.3.2.
-
-__compat If the compiler does not support partial specialization of class-templates
-then this template will compile, but the member `type` will always be the same as
-type `T` except where __transform_workaround have been applied.
-
-__header ` #include <boost/type_traits/remove_reference.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`remove_reference<int>::type`][`int`]]
-
-[[`remove_reference<int const&>::type`] [`int const`]]
-
-[[`remove_reference<int*>::type`] [`int*`]]
-
-[[`remove_reference<int*&>::type`] [`int*`]]
-
-]
-
-[endsect]
-
-[section:remove_volatile remove_volatile]
-
- template <class T>
- struct remove_volatile
- {
- typedef __below type;
- };
-
-__type The same type as `T`, but with any /top level/ volatile-qualifier removed.
-
-__std_ref 3.9.3.
-
-__compat If the compiler does not support partial specialization of class-templates
-then this template will compile, but the member `type` will always be the same as
-type `T` except where __transform_workaround have been applied.
-
-__header ` #include <boost/type_traits/remove_volatile.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[table Examples
-
-[ [Expression] [Result Type]]
-
-[[`remove_volatile<int>::type`][`int`]]
-
-[[`remove_volatile<int volatile>::type`] [`int`]]
-
-[[`remove_volatile<int const volatile>::type`] [`int const`]]
-
-[[`remove_volatile<int volatile&>::type`] [`int const&`]]
-
-[[`remove_volatile<int volatile*>::type`] [`int const*`]]
-
-]
-
-[endsect]
-
-[section:type_with_alignment type_with_alignment]
-
- template <std::size_t Align>
- struct type_with_alignment
- {
- typedef __below type;
- };
-
-__type a built-in or POD type with an alignment
-that is a multiple of `Align`.
-
-__header ` #include <boost/type_traits/type_with_alignment.hpp>` or ` #include <boost/type_traits.hpp>`
-
-[endsect]
-
-[endsect]
-
-[section:credits Credits]
-
-This documentation was pulled together by John Maddock, using
-[@../../tools/quickbook/doc/html/index.html Boost.Quickbook]
-and [@boostbook.html Boost.DocBook].
-
-The original version of this library was created by Steve Cleary,
-Beman Dawes, Howard Hinnant, and John Maddock. John Maddock is the
-current maintainer of the library.
-
-This version of type traits library is based on contributions by
-Adobe Systems Inc, David Abrahams, Steve Cleary,
-Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat Marcus,
-Itay Maman, John Maddock, Thorsten Ottosen, Robert Ramey and Jeremy Siek.
-
-Mat Marcus and Jesse Jones invented, and
-[@http://opensource.adobe.com/project4/project.shtml published a paper describing],
-the partial specialization workarounds used in this library.
-
-Aleksey Gurtovoy added MPL integration to the library.
-
-The __is_convertible template is based on code originally devised by
-Andrei Alexandrescu, see
-"[@http://www.cuj.com/experts/1810/alexandr.htm?topic=experts
-Generic<Programming>: Mappings between Types and Values]".
-
-The latest version of this library and documentation can be found at
-[@http://www.boost.org www.boost.org]. Bugs, suggestions and discussion
-should be directed to boost_at_[hidden]
-(see [@http://www.boost.org/more/mailing_lists.htm#main
-www.boost.org/more/mailing_lists.htm#main] for subscription details).
-
-[endsect]
+[include credits.qbk]
 
 
 

Modified: branches/hash/libs/type_traits/index.html
==============================================================================
--- branches/hash/libs/type_traits/index.html (original)
+++ branches/hash/libs/type_traits/index.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1,13 +1,11 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
   <head>
- <meta http-equiv="refresh" content="0; URL=../../doc/html/boost_typetraits.html">
+ <meta http-equiv="refresh" content="0; URL=doc/html/index.html">
   </head>
   <body>
- Automatic redirection failed, please go to
- ../../doc/html/boost_typetraits.html
- or view the online version at
- http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/boost_typetraits.html
+ <P>Automatic redirection failed, please go to
+ doc/html/index.html.</P>
       <P>Copyright&nbsp;John Maddock 2001</P>
       <P>Distributed under the Boost Software License, Version 1.0. (See accompanying file <A href="../../LICENSE_1_0.txt">
             LICENSE_1_0.txt</A> or copy at www.boost.org/LICENSE_1_0.txt).</P>
@@ -17,3 +15,5 @@
 
 
 
+
+

Modified: branches/hash/libs/typeof/doc/typeof.qbk
==============================================================================
--- branches/hash/libs/typeof/doc/typeof.qbk (original)
+++ branches/hash/libs/typeof/doc/typeof.qbk 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -644,12 +644,14 @@
     //Use the base class to access the type.
     typedef typeof_access::id2type::type type;
  
-This method has also been adapted to VC7.0, where the nested class
+Peder Holt adapted this method to VC7.0, where the nested class
 is a template class that is specialized in the derived class.
-The loopholes have been fixed in VC8.0 though, so on this compiler
-this method doesn't work.
+
+In VC8.0, it seemed that all the bug-featire had been fixed, but
+Steven Watanabe managed to implement a more rigorous version of the VC7.0 fix that
+enables 'typeof' to be supported 'natively' here as well.
  
-For this and many other compilers neither native `typeof` support
+For many other compilers neither native `typeof` support
 nor the trick described above is an option. For such compilers
 the emulation method is the only way of implementing `typeof`.
 

Modified: branches/hash/libs/wave/samples/cpp_tokens/slex_token.hpp
==============================================================================
--- branches/hash/libs/wave/samples/cpp_tokens/slex_token.hpp (original)
+++ branches/hash/libs/wave/samples/cpp_tokens/slex_token.hpp 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -55,7 +55,7 @@
     operator token_id() const { return id; }
     string_type const &get_value() const { return value; }
     position_type const &get_position() const { return pos; }
- bool is_eoi() const { id == T_EOI; }
+ bool is_eoi() const { return id == T_EOI; }
 
     void set_token_id (token_id id_) { id = id_; }
     void set_value (string_type const &newval) { value = newval; }

Modified: branches/hash/libs/wave/test/build/Jamfile.v2
==============================================================================
--- branches/hash/libs/wave/test/build/Jamfile.v2 (original)
+++ branches/hash/libs/wave/test/build/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -37,8 +37,8 @@
         <threading>single
         <variant>debug
         <define>BOOST_LIB_DIAGNOSTIC=1
- <define>BOOST_ALL_NO_LIB=1
- <link>shared:<define>BOOST_ALL_DYN_LINK=1
+ <define>BOOST_ALL_NO_LIB=1
+ <link>shared:<define>BOOST_ALL_DYN_LINK=1
     ;
 
 for local source in $(SOURCES)

Modified: branches/hash/more/formal_review_schedule.html
==============================================================================
--- branches/hash/more/formal_review_schedule.html (original)
+++ branches/hash/more/formal_review_schedule.html 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -82,6 +82,22 @@
     <td>-</td>
   </tr>
 
+ <tr>
+ <td>Property Map (fast-track)</td>
+ <td>Andrew Sutton</td>
+ <td></td>
+ <td>Jeremy Siek</td>
+ <td>-</td>
+ </tr>
+
+ <tr>
+ <td>Graph (fast-track)</td>
+ <td>Andrew Sutton</td>
+ <td></td>
+ <td>Jeremy Siek</td>
+ <td>-</td>
+ </tr>
+
 </table>
 
 <h2>Past Review Results and Milestones</h2>
@@ -97,6 +113,14 @@
   </tr>
 
   <tr>
+ <td>Review Wizard Status Report</td>
+ <td></td>
+ <td>Ronald Garcia</td>
+ <td>2007 October 14</td>
+ <td>Report</td>
+ </tr>
+
+ <tr>
     <td>Scope Exit</td>
     <td>Alexander Nasonov</td>
     <td>Jody Hagins</td>
@@ -260,6 +284,7 @@
     <td><a href="http://lists.boost.org/boost-announce/2006/04/0086.php">
         Accepted -- Added to CVS</a></td>
   </tr>
+
   <tr>
     <td>Review Wizard Status Report</td>
     <td></td>
@@ -354,7 +379,7 @@
     <td>John Maddock</td>
     <td>Beman Dawes</td>
     <td>2005 September 24 - 2005 October 5</td>
- <td>Accepted -- Added to CVS</td>
+ <td>Accepted -- Added in 1.34</td>
   </tr>
 
   <tr>
@@ -362,7 +387,7 @@
     <td>Eric Niebler</td>
     <td>Thomas Witt</td>
     <td> 2005 September 8 - 2005 September 18</td>
- <td>Accepted -- Added to CVS</td>
+ <td>Accepted -- Added in 1.34</td>
   </tr>
 
   <tr>
@@ -388,7 +413,7 @@
     <td>Arkadiy Vertleyb and Peder Holt</td>
     <td>Andy Little</td>
     <td>2005 May 20 - 2005 May 30</td>
- <td>Accepted -- Added to CVS</td>
+ <td>Accepted -- Added in 1.34</td>
   </tr>
 
   <tr>
@@ -405,7 +430,7 @@
     <td>Eric Niebler</td>
     <td>Gennadiy Rozental</td>
     <td>2005 April 25 - 2005 May 1</td>
- <td>Accepted -- Added to CVS</td>
+ <td>Accepted -- Added in 1.34</td>
   </tr>
 
   <tr>
@@ -421,7 +446,7 @@
     <td>Andreas Huber</td>
     <td>Pavel Vozenilek</td>
     <td>2005 Feb 23 - 2005 March 9</td>
- <td>Accepted -- Added to CVS</td>
+ <td>Accepted -- Added in 1.34</td>
   </tr>
   <tr>
     <td>Wave</td>

Modified: branches/hash/regression/.htaccess
==============================================================================
--- branches/hash/regression/.htaccess (original)
+++ branches/hash/regression/.htaccess 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -2,5 +2,5 @@
 
 #~ RewriteRule ^(.+)\.cpp$ http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/boost/boost/$1.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup [R,L]
 
-RewriteRule ^developement(/.*) http://engineering.meta-comm.com/boost-regression/trunk$1 [R,L]
+RewriteRule ^developement(/.*) http://beta.boost.org/development/tests/trunk$1 [R,L]
 RewriteRule ^release(/.*) http://engineering.meta-comm.com/boost-regression/1_34_1$1 [R,L]

Modified: branches/hash/status/Jamfile.v2
==============================================================================
--- branches/hash/status/Jamfile.v2 (original)
+++ branches/hash/status/Jamfile.v2 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -77,6 +77,7 @@
 build-project ../libs/spirit/test ; # test-suite spirit
 build-project ../libs/statechart/test ; # test-suite statechart
 build-project ../libs/static_assert ; # test-suite static_assert
+build-project ../libs/system/test ; # test-suite system
 build-project ../libs/test/test ; # test-suite test
 build-project ../libs/thread/test ; # test-suite thread
 build-project ../libs/tr1/test ; # test-suite tr1

Modified: branches/hash/status/explicit-failures-markup.xml
==============================================================================
--- branches/hash/status/explicit-failures-markup.xml (original)
+++ branches/hash/status/explicit-failures-markup.xml 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -304,7 +304,7 @@
         </mark-expected-failures>
         <mark-expected-failures>
         <test name="typeof"/>
- <toolset name="acc"/>
+ <toolset name="acc*"/>
                 <toolset name="intel-vc71-win*"/>
                 <toolset name="intel-vc8-win*"/>
                 <toolset name="intel-win-9.1"/>
@@ -1124,7 +1124,7 @@
             <test name="testfacet_dll"/>
             <toolset name="tru64cxx*"/>
             <toolset name="hp_cxx*"/>
- <toolset name="acc"/>
+ <toolset name="acc*"/>
             <note author="Markus Schoepflin">
             The failure is caused by a standard library bug. It doesn't
             support user defined facets which are not default
@@ -1137,7 +1137,7 @@
             <test name="testdate_input_facet"/>
             <test name="testtime_input_facet"/>
             <test name="testlocal_time_input_facet"/>
- <toolset name="acc"/>
+ <toolset name="acc*"/>
             <note author="Jeff Garland">
             These tests rely on the ability of an std::map to be
             instantiated on an incomplete type. The Rogue Wave
@@ -1409,7 +1409,7 @@
             <test name="format_test3"/>
             <toolset name="tru64cxx65*"/>
             <toolset name="hp_cxx-65*"/>
- <toolset name="acc"/>
+ <toolset name="acc*"/>
             <note author="Markus Schoepflin" refid="33"/>
         </mark-expected-failures>
     </library>
@@ -2601,8 +2601,6 @@
         <test name="*_native" category="Native compiler support">
             <mark-failure>
                 <toolset name="acc"/>
- <toolset name="vc-8_0*"/>
- <toolset name="msvc-8.0*"/>
                 <toolset name="intel-vc71-win*"/>
                 <toolset name="intel-vc8-win*"/>
                 <toolset name="como-4_3_3-vc7_1"/>
@@ -2833,10 +2831,10 @@
 
        <mark-expected-failures>
             <test name="is_lvalue_iterator"/>
- <toolset name="acc"/>
+ <toolset name="acc*"/>
             <note author="Boris Gubenko">
- For some currently unknown reason, with aCC6, this test can be compiled
- only in strict ansi mode. Since on HP-UX/aCC6 boost testing is done in the
+ For some currently unknown reason, with aCC, this test can be compiled
+ only in strict ansi mode. Since on HP-UX/aCC boost testing is done in the
                 default compilation mode, this test fails to compile on this platform.
             </note>
        </mark-expected-failures>

Modified: branches/hash/tools/build/v2/build-system.jam
==============================================================================
--- branches/hash/tools/build/v2/build-system.jam (original)
+++ branches/hash/tools/build/v2/build-system.jam 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -41,6 +41,15 @@
     return $(r:P) ;
 }
 
+# Returns the property set with the
+# free features from the currently processed
+# build request.
+rule command-line-free-features ( )
+{
+ return $(.command-line-free-features) ;
+}
+
+
 
 # Check if we can load 'test-config.jam'. If we can, load it and
 # ignore user configs.
@@ -399,6 +408,7 @@
 
 for local p in $(expanded)
 {
+ .command-line-free-features = [ property-set.create [ $(p).free ] ] ;
     for local t in $(targets)
     {
         local g = [ $(t).generate $(p) ] ;

Modified: branches/hash/tools/build/v2/build/project.jam
==============================================================================
--- branches/hash/tools/build/v2/build/project.jam (original)
+++ branches/hash/tools/build/v2/build/project.jam 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -882,7 +882,12 @@
         
         if $(global-build-dir)
         {
- if [ $(attributes).get location ] = [ $(attributes).get project-root ]
+ local location = [ $(attributes).get location ] ;
+ # Project with empty location is 'standalone' project, like
+ # user-config, or qt. It has no build dir.
+ # If we try to set build dir for user-config, we'll then
+ # try to inherit it, with either weird, or wrong consequences.
+ if $(location) && $(location) = [ $(attributes).get project-root ]
             {
                 # This is Jamroot.
                 if $(id)

Modified: branches/hash/tools/build/v2/build/targets.jam
==============================================================================
--- branches/hash/tools/build/v2/build/targets.jam (original)
+++ branches/hash/tools/build/v2/build/targets.jam 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1057,6 +1057,7 @@
     import set sequence errors ;
     import "class" : new ;
     import property feature ;
+ import build-system ;
         
     rule __init__ ( name : project
         : sources * : requirements * :
@@ -1185,12 +1186,21 @@
             local fn = [ full-name ] ;
             ECHO [ targets.indent ] "Building target '$(fn)'" ;
             targets.increase-indent ;
- ECHO [ targets.indent ] "Build request: " [ $(property-set).raw ] ;
+ ECHO [ targets.indent ] "Build request: " [ $(property-set).raw ] ;
+ local cf = [ build-system.command-line-free-features ] ;
+ ECHO [ targets.indent ] "Command line free features: "
+ [ $(cf).raw ] ;
             ECHO [ targets.indent ] "Target requirements: " [ $(self.requirements).raw ] ;
         }
                 
         if ! $(self.generated.$(property-set))
         {
+ # Apply free features form the command line. If user
+ # said
+ # define=FOO
+ # he most likely want this define to be set for all compiles.
+ property-set = [ $(property-set).refine
+ [ build-system.command-line-free-features ] ] ;
             local rproperties = [ targets.common-properties $(property-set)
               $(self.requirements) ] ;
             

Modified: branches/hash/tools/build/v2/build/toolset.jam
==============================================================================
--- branches/hash/tools/build/v2/build/toolset.jam (original)
+++ branches/hash/tools/build/v2/build/toolset.jam 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -18,6 +18,15 @@
 
 .flag-no = 1 ;
 
+.ignore-requirements = ;
+
+# This is used only for testing, to make sure
+# we don't get random extra elements in paths.
+if --ignore-toolset-requirements in [ modules.peek : ARGV ]
+{
+ .ignore-requirements = 1 ;
+}
+
 # Initializes an additional toolset-like module.
 # First load 'toolset-module' and then calls its 'init'
 # rule with trailing arguments
@@ -480,7 +489,10 @@
 # indirect conditional.
 rule add-requirements ( requirements * )
 {
- .requirements += $(requirements) ;
+ if ! $(.ignore-requirements)
+ {
+ .requirements += $(requirements) ;
+ }
 }
 
 local rule __test__ ( )

Modified: branches/hash/tools/build/v2/build/virtual-target.jam
==============================================================================
--- branches/hash/tools/build/v2/build/virtual-target.jam (original)
+++ branches/hash/tools/build/v2/build/virtual-target.jam 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -378,18 +378,40 @@
                         
             return l$(location-grist) ;
         }
- }
-
- # Applies the <tag> feature to the specified name,
- # and returns the new name. If there no <tag>
- # or <tag> rule retuend nothing, return empty string.
- # 'ps' is the property set to be used when calling
- # the 'tag' rule. Typically, that should be
- # obtained from 'tag-properties'.
- rule apply-tag ( specified-name : ps )
+ }
+
+ # Given the target name specified in constructor, returns the
+ # name which should be really used, by looking at the <tag> properties.
+ # The tag properties come in two flavour:
+ # - <tag>value,
+ # - <tag>@rule-name
+ # In the first case, value is just added to name
+ # In the second case, the specified rule is called with specified name,
+ # target type and properties and should return the new name.
+ # If not <tag> property is specified, or the rule specified by
+ # <tag> returns nothing, returns the result of calling
+ # virtual-target.add-suffix
+ rule _adjust-name ( specified-name )
     {
+ local ps ;
+ if $(self.action)
+ {
+ ps = [ $(self.action).properties ] ;
+ }
+ else
+ {
+ ps = [ property-set.empty ] ;
+ }
+
+ #~ We add ourselves to the properties so that any tag rule can get
+ #~ more direct information about the target than just that available
+ #~ through the properties. This is useful in implementing
+ #~ name changes based on the sources of the target. For example to
+ #~ make unique names of object files based on the source file.
+ #~ --grafik
+ ps = [ property-set.create [ $(ps).raw ] <target>$(__name__) ] ;
+
         local tag = [ $(ps).get <tag> ] ;
- local result ;
 
         if $(tag)
         {
@@ -401,7 +423,7 @@
                     errors.error "<tag>@rulename is present but is not the only <tag> feature" ;
                 }
                 
- result = [ indirect.call $(rule-name) $(specified-name) :
+ self.name = [ indirect.call $(rule-name) $(specified-name) :
                   $(self.type) : $(ps) ] ;
             }
             else
@@ -409,57 +431,14 @@
                 errors.error
                   "The value of the <tag> feature must be '@rule-nane'" ;
             }
- }
- return $(result) ;
- }
-
- rule tag-properties ( )
- {
- local ps ;
- if $(self.action)
- {
- ps = [ $(self.action).properties ] ;
- }
- else
- {
- ps = [ property-set.empty ] ;
         }
-
         
- #~ We add ourselves to the properties so that any tag rule can get
- #~ more direct information about the target than just that available
- #~ through the properties. This is useful in implementing
- #~ name changes based on the sources of the target. For example to
- #~ make unique names of object files based on the source file.
- #~ --grafik
- ps = [ property-set.create [ $(ps).raw ] <target>$(__name__) ] ;
-
- return $(ps) ;
- }
-
- # Given the target name specified in constructor, returns the
- # name which should be really used, by looking at the <tag> properties.
- # The tag properties come in two flavour:
- # - <tag>value,
- # - <tag>@rule-name
- # In the first case, value is just added to name
- # In the second case, the specified rule is called with specified name,
- # target type and properties and should return the new name.
- # If not <tag> property is specified, or the rule specified by
- # <tag> returns nothing, returns the result of calling
- # virtual-target.add-suffix
- rule _adjust-name ( specified-name )
- {
- local ps = [ tag-properties ] ;
-
- self.name = [ apply-tag $(specified-name) : $(ps) ] ;
- # If tag rule does not exists or returned nothing,
- # just add prefix/suffix.
- if ! $(self.name)
+ # If there's no tag or the tag rule returned nothing.
+ if ! $(tag) || ! $(self.name)
         {
             self.name = [ virtual-target.add-prefix-and-suffix
                 $(specified-name) : $(self.type) : $(ps) ] ;
- }
+ }
     }
 
     rule actualize-no-scanner ( )

Modified: branches/hash/tools/build/v2/doc/src/faq.xml
==============================================================================
--- branches/hash/tools/build/v2/doc/src/faq.xml (original)
+++ branches/hash/tools/build/v2/doc/src/faq.xml 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -331,18 +331,16 @@
     <para>It is desirable to declare standard libraries available on a
       given system. Putting target declaration in Jamfile is not really
       good, since locations of the libraries can vary. The solution is
- to put the following to site-config.jam.</para>
+ to declare the targets in site-config.jam:</para>
 <programlisting>
-import project ;
-project.initialize $(__name__) ;
 project site-config ;
 lib zlib : : &lt;name&gt;z ;
 </programlisting>
 
- <para>The second line allows this module to act as project. The
- third line gives id to this project &#x2014; it really has no location
- and cannot be used otherwise. The fourth line just declares a
- target. Now, one can write:
+ <para>Recall that both <filename>site-config.jam</filename> and
+ <filename>user-config.jam</filename> are projects, and everything
+ you can do in a Jamfile you can do in those files. So, you declare
+ a project id and a target. Now, one can write:
 <programlisting>
 exe hello : hello.cpp /site-config//zlib ;
 </programlisting>

Modified: branches/hash/tools/build/v2/test/BoostBuild.py
==============================================================================
--- branches/hash/tools/build/v2/test/BoostBuild.py (original)
+++ branches/hash/tools/build/v2/test/BoostBuild.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -18,6 +18,40 @@
 import time
 import tempfile
 import sys
+import traceback
+import math
+from StringIO import StringIO
+
+annotation_func = None
+
+annotations = []
+
+def print_annotation(name, value):
+ """Writes some named bit of information about test
+ run.
+ """
+ print name + " {{{"
+ print value
+ print "}}}"
+
+
+def flush_annotations():
+ global annotations
+ for ann in annotations:
+ print_annotation(ann[0], ann[1])
+ annotations = []
+
+defer_annotations = 0
+
+def set_defer_annotations(n):
+ global defer_annotations
+ defer_annotations = n
+
+def annotation(name, value):
+ """Records an annotation about test run."""
+ annotations.append((name, value))
+ if not defer_annotations:
+ flush_annotations()
 
 def get_toolset():
     toolset = None;
@@ -61,8 +95,6 @@
     for r in result:
         sequence.remove(r)
 
-features = [ 'threading-multi' ]
-
 lib_prefix = 1
 dll_prefix = 1
 if windows:
@@ -191,6 +223,7 @@
         program_list.append('-sBOOST_BUILD_PATH=' + boost_build_path)
         if verbosity:
             program_list += verbosity
+ program_list += ["--ignore-toolset-requirements"]
         if arguments:
             program_list += arguments.split(" ")
 
@@ -311,11 +344,8 @@
         self.write(name, content)
                                                         
     def dump_stdio(self):
- print "STDOUT ============"
- print self.stdout()
- print "STDERR ============"
- print self.stderr()
- print "END ==============="
+ annotation("STDOUT", self.stdout())
+ annotation("STDERR", self.stderr())
                     
     #
     # FIXME: Large portion copied from TestSCons.py, should be moved?
@@ -356,20 +386,19 @@
             if status != 0:
                 expect = " (expected %d)" % status
 
- print '"%s" returned %d%s' % (
- kw['program'], _status(self), expect)
+ annotation("failed command", '"%s" returned %d%s' % (
+ kw['program'], _status(self), expect))
 
+ annotation("reason", "error returned by bjam")
             self.fail_test(1)
 
         if not stdout is None and not match(self.stdout(), stdout):
- print "Expected STDOUT =========="
- print stdout
- print "Actual STDOUT ============"
- print self.stdout()
+ annotation("reason", "Unexpected stdout")
+ annotation("Expected STDOUT", stdout)
+ annotation("Actual STDOUT", self.stdout())
             stderr = self.stderr()
             if stderr:
- print "STDERR ==================="
- print stderr
+ annotation("STDERR", stderr)
             self.maybe_do_diff(self.stdout(), stdout)
             self.fail_test(1, dump_stdio = 0)
 
@@ -379,12 +408,10 @@
         actual_stderr = re.sub(intel_workaround, "", self.stderr())
 
         if not stderr is None and not match(actual_stderr, stderr):
- print "STDOUT ==================="
- print self.stdout()
- print "Expected STDERR =========="
- print stderr
- print "Actual STDERR ============"
- print actual_stderr
+ annotation("reason", "Unexpected stderr")
+ annotation("Expected STDERR", stderr)
+ annotation("Actual STDERR", self.stderr())
+ annotation("STDOUT", self.stdout())
             self.maybe_do_diff(actual_stderr, stderr)
             self.fail_test(1, dump_stdio = 0)
 
@@ -394,22 +421,12 @@
         self.unexpected_difference = copy.deepcopy(self.difference)
 
         self.last_build_time = time.time()
-
- self.unexpected_difference.added_files \
- = self.remove_variant_features(self.unexpected_difference.added_files)
- self.unexpected_difference.removed_files \
- = self.remove_variant_features(self.unexpected_difference.removed_files)
- self.unexpected_difference.modified_files \
- = self.remove_variant_features(self.unexpected_difference.modified_files)
- self.unexpected_difference.touched_files \
- = self.remove_variant_features(self.unexpected_difference.touched_files)
     
     def glob_file(self, name):
         result = None
         if hasattr(self,'difference'):
             for f in self.difference.added_files+self.difference.modified_files+self.difference.touched_files:
- fname = self.remove_variant_features([f])[0]
- if fnmatch.fnmatch(fname,name):
+ if fnmatch.fnmatch(f,name):
                     result = self.native_file_name(f)
                     break
         if not result:
@@ -425,6 +442,7 @@
             name = self.glob_file(name)
             return open(name, "rU").read()
         except:
+ annotation("reason", "Could not open '%s'" % name)
             self.fail_test(1)
             return ''
 
@@ -439,8 +457,9 @@
     def fail_test(self, condition, dump_stdio = 1, *args):
         # If test failed, print the difference
         if condition and hasattr(self, 'difference'):
- print '-------- all changes caused by last build command ----------'
- self.difference.pprint()
+ f = StringIO()
+ self.difference.pprint(f)
+ annotation("changes causes by the last build command", f.getvalue())
             
         if condition and dump_stdio:
             self.dump_stdio()
@@ -455,8 +474,11 @@
             elif os.path.exists(path):
                 raise "The path " + path + " already exists and is not directory";
             shutil.copytree(self.workdir, path)
-
- TestCmd.TestCmd.fail_test(self, condition, *args)
+
+ if condition:
+ at = TestCmd.caller(traceback.extract_stack(), 0)
+ annotation("stacktrace", at)
+ sys.exit(1)
         
     # A number of methods below check expectations with actual difference
     # between directory trees before and after build.
@@ -464,7 +486,7 @@
     # All the 'ignore*' methods allow wildcards.
 
     # All names can be lists, which are taken to be directory components
- def expect_addition(self, names):
+ def expect_addition(self, names):
         for name in self.adjust_names(names):
                 try:
                         glob_remove(self.unexpected_difference.added_files,name)
@@ -517,7 +539,8 @@
                     filesets.pop()
 
             if not filesets:
- print "File %s not touched as expected" % (name,)
+ annotation("reason",
+ "File %s not touched as expected" % (name,))
                 self.fail_test(1)
 
 
@@ -533,17 +556,21 @@
     def expect_nothing(self, names):
         for name in self.adjust_names(names):
             if name in self.difference.added_files:
- print "File %s is added, but no action was expected" % (name,)
+ annotation("reason",
+ "File %s is added, but no action was expected" % (name,))
                 self.fail_test(1)
             if name in self.difference.removed_files:
- print "File %s is removed, but no action was expected" % (name,)
+ annotation("reason",
+ "File %s is removed, but no action was expected" % (name,))
                 self.fail_test(1)
                 pass
             if name in self.difference.modified_files:
- print "File %s is modified, but no action was expected" % (name,)
+ annotation("reason",
+ "File %s is modified, but no action was expected" % (name,))
                 self.fail_test(1)
             if name in self.difference.touched_files:
- print "File %s is touched, but no action was expected" % (name,)
+ annotation("reason",
+ "File %s is touched, but no action was expected" % (name,))
                 self.fail_test(1)
 
     def expect_nothing_more(self):
@@ -572,9 +599,6 @@
         found = 0
         for line in lines:
             line = line.strip()
- for feature in features:
- line = string.replace(line,"/"+feature,"")
- line = string.replace(line,"\\"+feature,"")
             if fnmatch.fnmatch(line, expected):
                 found = 1
                 break
@@ -610,10 +634,6 @@
     def expect_content(self, name, content, exact=0):
         actual = self._read_file(name, exact)
         content = string.replace(content, "$toolset", self.toolset+"*")
- if not exact:
- for feature in features:
- actual = string.replace(actual,"/"+feature,"")
- actual = string.replace(actual,"\\"+feature,"")
 
         matched = 0
         if exact:
@@ -713,7 +733,6 @@
             suffix = ''
 
         return name + suffix
-
 
     # Acceps either string of list of string and returns list of strings
     # Adjusts suffixes on all names.
@@ -733,23 +752,17 @@
     # Wait while time is no longer equal to the time last "run_build_system"
     # call finished.
     def wait_for_time_change(self):
- while int(time.time()) < int(self.last_build_time) + 1:
- time.sleep(0.1)
-
- # Remove the variant feature sub-dir from a path.
- def remove_variant_features(self, names):
-
- def remove_features_(name):
- elements = string.split(name,"/")
- for feature in features:
- try:
- elements.remove(feature)
- except:
- pass
- return string.join(elements,"/")
-
- r = map(remove_features_,names)
- return r
+ while 1:
+ f = time.time();
+ # In fact, I'm not sure why "+ 2" as opposed to "+ 1" is
+ # needed but empirically, "+ 1" sometimes causes 'touch'
+ # and other functions not to bump file time enough for
+ # rebuild to happen.
+ if math.floor(f) < math.floor(self.last_build_time) + 2:
+ time.sleep(0.1)
+ else:
+ break
+
 
             
 class List:

Modified: branches/hash/tools/build/v2/test/TestCmd.py
==============================================================================
--- branches/hash/tools/build/v2/test/TestCmd.py (original)
+++ branches/hash/tools/build/v2/test/TestCmd.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -81,7 +81,7 @@
 
 sys.exitfunc = _clean
 
-def _caller(tblist, skip):
+def caller(tblist, skip):
     string = ""
     arr = []
     for file, line, name, text in tblist:
@@ -120,7 +120,7 @@
             desc = " [" + self.description + "]"
             sep = "\n\t"
 
- at = _caller(traceback.extract_stack(), skip)
+ at = caller(traceback.extract_stack(), skip)
 
     sys.stderr.write("FAILED test" + of + desc + sep + at + """
 in directory: """ + os.getcwd() )
@@ -149,7 +149,7 @@
             desc = " [" + self.description + "]"
             sep = "\n\t"
 
- at = _caller(traceback.extract_stack(), skip)
+ at = caller(traceback.extract_stack(), skip)
     sys.stderr.write("NO RESULT for test" + of + desc + sep + at)
 
     sys.exit(2)

Modified: branches/hash/tools/build/v2/test/build_dir.py
==============================================================================
--- branches/hash/tools/build/v2/test/build_dir.py (original)
+++ branches/hash/tools/build/v2/test/build_dir.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -88,7 +88,9 @@
 t.expect_addition(["build/foo/bin.v2/$toolset/debug/a.exe",
                    "build/foo/bin.v2/sub/$toolset/debug/b.exe"])
 
-# Try building in subdir
+# Try building in subdir. We expect that the entire build
+# tree with be in 'sub/build'. Today, I'm not sure if
+# this is what the user expects, but let it be.
 t.rm('build')
 t.run_build_system("--build-dir=build", subdir="sub")
 t.expect_addition(["sub/build/foo/bin.v2/sub/$toolset/debug/b.exe"])

Modified: branches/hash/tools/build/v2/test/gcc_runtime.py
==============================================================================
--- branches/hash/tools/build/v2/test/gcc_runtime.py (original)
+++ branches/hash/tools/build/v2/test/gcc_runtime.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -26,7 +26,7 @@
 
 t.run_build_system("runtime-link=static", status=1)
 t.fail_test(string.find(t.stdout(),
- "on gcc, DLL can't be build with <runtime-link>static") == -1)
+ "On gcc, DLL can't be build with '<runtime-link>static'") == -1)
 
 t.run_build_system("link=static runtime-link=static")
 t.expect_addition("bin/$toolset/debug/link-static/runtime-link-static/hello.lib")

Modified: branches/hash/tools/build/v2/test/project_glob.py
==============================================================================
--- branches/hash/tools/build/v2/test/project_glob.py (original)
+++ branches/hash/tools/build/v2/test/project_glob.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -143,5 +143,38 @@
 t.run_build_system(subdir="d1")
 t.expect_addition("d1/bin/$toolset/debug/a.exe")
 
+# Regression test: glob excludes used to be broken
+# when building from a subdirectory.
+t.rm(".")
+
+t.write("Jamroot", """
+build-project p ;
+""")
+
+t.write("p/p.c", """
+int main()
+{
+ return 0;
+}
+
+
+""")
+
+t.write("p/p_x.c", """
+int main()
+{
+ return 0;
+}
+
+""")
+
+t.write("p/Jamfile", """
+exe p :
+ [ glob *.c : p_x.c ]
+ ;
+""")
+
+t.run_build_system(subdir="p")
+t.expect_addition("p/bin/$toolset/debug/p.exe")
 
 t.cleanup()

Modified: branches/hash/tools/build/v2/test/rebuilds.py
==============================================================================
--- branches/hash/tools/build/v2/test/rebuilds.py (original)
+++ branches/hash/tools/build/v2/test/rebuilds.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -35,6 +35,7 @@
 t.expect_addition('bar')
 t.expect_nothing_more()
 
+t.wait_for_time_change()
 t.run_build_system('-ffile.jam foo')
 t.expect_touch('bar')
 t.expect_addition('foo')
@@ -46,7 +47,7 @@
 
 t.touch('bar')
 t.run_build_system('-ffile.jam')
-t.expect_touch(['foo', 'aux1', 'aux2', 'bar'])
+t.expect_touch(['foo', 'aux1', 'aux2'])
 t.expect_nothing_more()
 
 t.cleanup()

Modified: branches/hash/tools/build/v2/test/remove_requirement.py
==============================================================================
--- branches/hash/tools/build/v2/test/remove_requirement.py (original)
+++ branches/hash/tools/build/v2/test/remove_requirement.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -80,7 +80,7 @@
 
 t.rm(".")
 
-# No test that path requirements can be removed as well.
+# Now test that path requirements can be removed as well.
 t.write("Jamroot", """
 build-project sub ;
 
@@ -109,7 +109,7 @@
 
 t.run_build_system()
 
-t.expect_addition("bin/$toolset/debug/hello.exe")
+t.expect_addition("sub/bin/$toolset/debug/hello.exe")
 
 t.cleanup()
 

Modified: branches/hash/tools/build/v2/test/test_all.py
==============================================================================
--- branches/hash/tools/build/v2/test/test_all.py (original)
+++ branches/hash/tools/build/v2/test/test_all.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -7,6 +7,7 @@
 # http://www.boost.org/LICENSE_1_0.txt)
 
 import os, sys, string
+import BoostBuild
 from BoostBuild import get_toolset
 
 # clear environment for testing
@@ -21,6 +22,8 @@
     except:
         pass
 
+BoostBuild.set_defer_annotations(1)
+
 def run_tests(critical_tests, other_tests):
     """Runs first critical tests and then other_tests.
 
@@ -34,6 +37,7 @@
 
     invocation_dir = os.getcwd()
 
+ pass_count = 0
     failures_count = 0
     for i in all_tests:
         print ("%-25s : " %(i)),
@@ -49,13 +53,22 @@
             # Restore the current directory, which might be changed by the
             # test
             os.chdir(invocation_dir)
+ BoostBuild.flush_annotations();
             continue
         print "PASSED"
+ BoostBuild.flush_annotations();
+ pass_count = pass_count + 1
         sys.stdout.flush() # makes testing under emacs more entertaining.
         
     # Erase the file on success
     if failures_count == 0:
         open('test_results.txt', 'w')
+
+ print """
+ === Test summary ===
+ PASS: %d
+ FAIL: %d
+ """ % (pass_count, failures_count)
         
 
 def last_failed_test():
@@ -150,6 +163,7 @@
           "example_libraries",
           "example_make",
           "remove_requirement",
+ "free_features_request",
           ]
 
 if os.name == 'posix':
@@ -162,8 +176,10 @@
     if string.find(os.uname()[0], "CYGWIN") == -1:
         tests.append("library_order")
 
-if string.find(get_toolset(), 'gcc') == 0 or string.find(get_toolset(), 'msvc') == 0:
+if string.find(get_toolset(), 'gcc') == 0:
     tests.append("gcc_runtime")
+
+if string.find(get_toolset(), 'gcc') == 0 or string.find(get_toolset(), 'msvc') == 0:
     tests.append("pch")
 
 if "--extras" in sys.argv:

Modified: branches/hash/tools/build/v2/test/tree.py
==============================================================================
--- branches/hash/tools/build/v2/test/tree.py (original)
+++ branches/hash/tools/build/v2/test/tree.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -31,11 +31,11 @@
         self.modified_files = filter(not_dir, self.modified_files)
         self.touched_files = filter(not_dir, self.touched_files)
 
- def pprint(self):
- print "Added files :", self.added_files
- print "Removed files :", self.removed_files
- print "Modified files:", self.modified_files
- print "Touched files :", self.touched_files
+ def pprint(self, f=None):
+ print >> f, "Added files :", self.added_files
+ print >> f,"Removed files :", self.removed_files
+ print >> f, "Modified files:", self.modified_files
+ print >> f, "Touched files :", self.touched_files
 
     def empty(self):
         return (len(self.added_files) == 0 and len(self.removed_files) == 0)\

Modified: branches/hash/tools/build/v2/tools/builtin.jam
==============================================================================
--- branches/hash/tools/build/v2/tools/builtin.jam (original)
+++ branches/hash/tools/build/v2/tools/builtin.jam 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -337,15 +337,9 @@
         : action
     )
     {
- abstract-file-target.__init__ $(name) exact : SEARCHED_LIB : $(project)
+ abstract-file-target.__init__ $(name) : SEARCHED_LIB : $(project)
           : $(action) : ;
         
- local rn = [ apply-tag $(name) : [ tag-properties ] ] ;
- if $(rn)
- {
- self.name = $(rn) ;
- }
-
         self.shared = $(shared) ;
         self.search = $(search) ;
     }

Modified: branches/hash/tools/build/v2/tools/gcc.jam
==============================================================================
--- branches/hash/tools/build/v2/tools/gcc.jam (original)
+++ branches/hash/tools/build/v2/tools/gcc.jam 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -3,6 +3,7 @@
 # Copyright 2002-2003 Vladimir Prus.
 # Copyright (c) 2005 Reece H. Dunn.
 # Copyright 2006 Ilya Sokolov.
+# Copyright 2007 Roland Schwarz
 #
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or copy at
@@ -38,14 +39,35 @@
 generators.override gcc.prebuilt : builtin.prebuilt ;
 generators.override gcc.searched-lib-generator : searched-lib-generator ;
 
+# Target naming is determined by types/lib.jam and the settings below this
+# comment.
+#
+# On *nix:
+# libxxx.a static library
+# libxxx.so shared library
+#
+# On windows (mingw):
+# libxxx.lib static library
+# xxx.dll DLL
+# xxx.lib import library
+#
+# On windows (cygwin) i.e. <target-os>cygwin
+# libxxx.a static library
+# xxx.dll DLL
+# libxxx.dll.a import library
+#
+# Note: user can always override by using the <tag>@rule
+# This settings have been choosen, so that mingw
+# is in line with msvc naming conventions. For
+# cygwin the cygwin naming convention has been choosen.
 
 # Make the "o" suffix used for gcc toolset on all
 # platforms
 type.set-generated-target-suffix OBJ : <toolset>gcc : o ;
-type.set-generated-target-suffix STATIC_LIB : <toolset>gcc : a ;
+type.set-generated-target-suffix STATIC_LIB : <toolset>gcc <target-os>cygwin : a ;
 
 type.set-generated-target-suffix IMPORT_LIB : <toolset>gcc <target-os>cygwin : dll.a ;
-type.set-generated-target-suffix IMPORT_LIB : <toolset>gcc <target-os>windows : a ;
+type.set-generated-target-prefix IMPORT_LIB : <toolset>gcc <target-os>cygwin : lib ;
 
 import rc ;
 
@@ -500,6 +522,50 @@
         flags $(toolset).link RPATH_LINK $(condition) : <xdll-path> : unchecked ;
         flags $(toolset).link START-GROUP $(condition) : -Wl,--start-group : unchecked ;
         flags $(toolset).link END-GROUP $(condition) : -Wl,--end-group : unchecked ;
+
+ # gnu ld has the ability to change the search behaviour for libraries referenced
+ # by -l switch. These modifiers are -Bstatic and -Bdynamic and change search
+ # for -l switches that follow them. The following list shows the tried variants.
+ # The search stops at the first variant that has a match.
+ # *nix: -Bstatic -lxxx
+ # libxxx.a
+ #
+ # *nix: -Bdynamic -lxxx
+ # libxxx.so
+ # libxxx.a
+ #
+ # windows (mingw,cygwin) -Bstatic -lxxx
+ # libxxx.a
+ # xxx.lib
+ #
+ # windows (mingw,cygwin) -Bdynamic -lxxx
+ # libxxx.dll.a
+ # xxx.dll.a
+ # libxxx.a
+ # xxx.lib
+ # cygxxx.dll (*)
+ # libxxx.dll
+ # xxx.dll
+ # libxxx.a
+ #
+ # (*) This is for cygwin
+ # Please note that -Bstatic and -Bdynamic are not a guarantee that a static
+ # or dynamic lib indeed gets linked in. The switches only change search
+ # patterns!
+
+ # On *nix mixing shared libs with static runtime is not a good idea.
+ flags $(toolset).link FINDLIBS-ST-PFX $(condition)/<runtime-link>shared
+ : -Wl,-Bstatic : unchecked ;
+ flags $(toolset).link FINDLIBS-SA-PFX $(condition)/<runtime-link>shared
+ : -Wl,-Bdynamic : unchecked ;
+
+ # On windows allow mixing of static and dynamic libs with static runtime
+ flags $(toolset).link FINDLIBS-ST-PFX $(condition)/<runtime-link>static/<target-os>windows
+ : -Wl,-Bstatic : unchecked ;
+ flags $(toolset).link FINDLIBS-SA-PFX $(condition)/<runtime-link>static/<target-os>windows
+ : -Wl,-Bdynamic : unchecked ;
+ flags $(toolset).link OPTIONS $(condition)/<runtime-link>static/<target-os>windows
+ : -Wl,-Bstatic : unchecked ;
         }
     case darwin :
         {
@@ -565,7 +631,8 @@
 
 actions link bind LIBRARIES
 {
- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
+
 }
 
 # Default value. Mostly for the sake of intel-linux
@@ -629,7 +696,7 @@
 # Differ from 'link' above only by -shared.
 actions link.dll bind LIBRARIES
 {
- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
 }
 
 # Set up threading support. It's somewhat contrived, so perform it at the end,

Modified: branches/hash/tools/build/v2/tools/types/lib.jam
==============================================================================
--- branches/hash/tools/build/v2/tools/types/lib.jam (original)
+++ branches/hash/tools/build/v2/tools/types/lib.jam 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -26,3 +26,7 @@
 type SHARED_LIB : so : LIB ;
 
 type SEARCHED_LIB : : LIB ;
+# This is needed so that when we create a target of SEARCHED_LIB
+# type, there's no prefix or suffix automatically added.
+type.set-generated-target-prefix SEARCHED_LIB : : "" ;
+type.set-generated-target-suffix SEARCHED_LIB : : "" ;

Modified: branches/hash/tools/build/v2/user-config.jam
==============================================================================
--- branches/hash/tools/build/v2/user-config.jam (original)
+++ branches/hash/tools/build/v2/user-config.jam 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -13,8 +13,6 @@
 # Some important libraries can also be configured.
 # Uncomment relevant parts to suite your local configuration and preferences.
 
-import toolset : using ;
-
 # GCC configuration
 
 # Configure gcc (default version)

Modified: branches/hash/tools/build/v2/util/path.jam
==============================================================================
--- branches/hash/tools/build/v2/util/path.jam (original)
+++ branches/hash/tools/build/v2/util/path.jam 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -243,7 +243,9 @@
     }
 
     local inc = [ GLOB-RECURSIVELY $(real-patterns) ] ;
+ inc = [ sequence.transform NORMALIZE_PATH : $(inc) ] ;
     local exc = [ GLOB-RECURSIVELY $(real-exclude-patterns) ] ;
+ exc = [ sequence.transform NORMALIZE_PATH : $(exc) ] ;
     
     return [ sequence.transform path.make :
         [ set.difference $(inc) : $(exc) ] ] ;

Modified: branches/hash/tools/jam/src/builtins.c
==============================================================================
--- branches/hash/tools/jam/src/builtins.c (original)
+++ branches/hash/tools/jam/src/builtins.c 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -1695,6 +1695,27 @@
     return Py_None;
 }
 
+
+/* Accepts two arguments -- an action name and an action body.
+ Defines an action on bjam side.
+
+ This interface does not (yet) support the list of bound
+ variables of the action flags (together/piecemeal/etc). */
+PyObject*
+bjam_define_action(PyObject* self, PyObject *args)
+{
+ char* name;
+ char* body;
+ module_t* m;
+
+ if (!PyArg_ParseTuple(args, "ss:define_action", &name, &body))
+ return NULL;
+
+ new_rule_actions(root_module(), name, newstr(body), L0, 0);
+
+ return Py_None;
+}
+
 #endif
 
 #ifdef HAVE_POPEN

Modified: branches/hash/tools/jam/src/jam.c
==============================================================================
--- branches/hash/tools/jam/src/jam.c (original)
+++ branches/hash/tools/jam/src/jam.c 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -206,6 +206,9 @@
  
     extern PyObject*
     bjam_import_rule(PyObject* self, PyObject* args);
+
+ extern PyObject*
+ bjam_define_action(PyObject* self, PyObject* args);
 #endif
 
 int main( int argc, char **argv, char **arg_environ )
@@ -339,6 +342,8 @@
                  "Call the specified bjam rule."},
                 {"import_rule", bjam_import_rule, METH_VARARGS,
                  "Imports Python callable to bjam."},
+ {"define_action", bjam_define_action, METH_VARARGS,
+ "Defines a command line action."},
                 {NULL, NULL, 0, NULL}
             };
     

Modified: branches/hash/tools/regression/xsl_reports/email_maintainers.py
==============================================================================
--- branches/hash/tools/regression/xsl_reports/email_maintainers.py (original)
+++ branches/hash/tools/regression/xsl_reports/email_maintainers.py 2007-09-14 18:24:22 EDT (Fri, 14 Sep 2007)
@@ -14,7 +14,7 @@
 import datetime
 import sys
 
-report_author = "Douglas Gregor <dgregor_at_[hidden]>"
+report_author = "Douglas Gregor <dgregor_at_[hidden]>"
 boost_dev_list = "Boost Developer List <boost_at_[hidden]>"
 
 def sorted_keys( dict ):
@@ -150,12 +150,12 @@
             return None
 
         # Build the message header
- message = """From: Douglas Gregor <dgregor_at_[hidden]>
+ message = """From: Douglas Gregor <dgregor_at_[hidden]>
 To: """
         message += self.name + ' <' + self.email + '>'
         message += """
 Reply-To: boost_at_[hidden]
-Subject: Regressions in your Boost libraries as of """
+Subject: Failures in your Boost libraries as of """
         message += str(datetime.date.today()) + " [" + report.branch + "]"
         message += """
 
@@ -204,7 +204,7 @@
     """
     The complete report of all failing test cases.
     """
- def __init__(self, branch = 'HEAD'):
+ def __init__(self, branch = 'trunk'):
         self.branch = branch
         self.date = None
         self.url = None
@@ -287,11 +287,12 @@
 
     def getIssuesEmail(self):
         """
- Retrieve the issues email from MetaComm, trying a few times in
- case something wonky is happening. If we can retrieve the file,
- calls parseIssuesEmail and return True; otherwise, return False.
+ Retrieve the issues email from beta.boost.org, trying a few
+ times in case something wonky is happening. If we can retrieve
+ the file, calls parseIssuesEmail and return True; otherwise,
+ return False.
         """
- base_url = "http://engineering.meta-comm.com/boost-regression/CVS-"
+ base_url = "http://beta.boost.org/development/tests/"
         base_url += self.branch
         base_url += "/developer/";
         got_issues = False
@@ -372,11 +373,11 @@
 To: boost_at_[hidden]
 Reply-To: boost_at_[hidden]
 Subject: [Report] """
- message += str(self.numFailures()) + " regressions on " + branch
+ message += str(self.numFailures()) + " failures on " + branch
         message += " (" + str(datetime.date.today()) + ")"
         message += """
 
-Boost Regression test failures
+Boost regression test failures
 """
         message += "Report time: " + self.date + """
 
@@ -504,7 +505,7 @@
   if '--send' in sys.argv:
       print "Sending..."
       smtp = smtplib.SMTP('milliways.osl.iu.edu')
- smtp.sendmail(from_addr = 'Douglas Gregor <dgregor_at_[hidden]>',
+ smtp.sendmail(from_addr = 'Douglas Gregor <dgregor_at_[hidden]>',
                     to_addrs = person[1],
                     msg = message)
       print "Done."
@@ -513,12 +514,12 @@
 # Send a message to the developer's list
 def send_boost_developers_message(branch, maintainers, failing_libraries):
   to_line = 'boost_at_[hidden]'
- from_line = 'Douglas Gregor <dgregor_at_[hidden]>'
+ from_line = 'Douglas Gregor <dgregor_at_[hidden]>'
 
- message = """From: Douglas Gregor <dgregor_at_[hidden]>
+ message = """From: Douglas Gregor <dgregor_at_[hidden]>
 To: boost_at_[hidden]
 Reply-To: boost_at_[hidden]
-Subject: Boost regression notification ("""
+Subject: Boost regression testing notification ("""
 
   message += str(datetime.date.today()) + " [" + branch + "]"
   message += ")"
@@ -564,7 +565,7 @@
 ###############################################################################
 
 # Parse command-line options
-branch = "HEAD"
+branch = "trunk"
 for arg in sys.argv:
     if arg.startswith("--branch="):
         branch = arg[len("--branch="):]
@@ -580,14 +581,14 @@
 if not okay:
     print 'Aborting.'
     if '--send' in sys.argv:
- message = """From: Douglas Gregor <dgregor_at_[hidden]>
- To: Douglas Gregor <dgregor_at_[hidden]>
+ message = """From: Douglas Gregor <dgregor_at_[hidden]>
+ To: Douglas Gregor <dgregor_at_[hidden]>
         Reply-To: boost_at_[hidden]
         Subject: Regression status script failed on """
         message += str(datetime.date.today()) + " [" + branch + "]"
         smtp = smtplib.SMTP('milliways.osl.iu.edu')
- smtp.sendmail(from_addr = 'Douglas Gregor <dgregor_at_[hidden]>',
- to_addrs = 'dgregor_at_[hidden]',
+ smtp.sendmail(from_addr = 'Douglas Gregor <dgregor_at_[hidden]>',
+ to_addrs = 'dgregor_at_[hidden]',
                       msg = message)
     sys.exit(1)
 


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