]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Upgrade to the current BOOST version 1.43.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 1 Jul 2010 03:33:28 +0000 (03:33 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 1 Jul 2010 03:33:28 +0000 (03:33 +0000)
git-svn-id: https://svn.dealii.org/trunk@21426 0785d39b-7218-0410-832d-ea1e28bc413d

944 files changed:
deal.II/contrib/boost/include/boost/archive/basic_archive.hpp
deal.II/contrib/boost/include/boost/archive/basic_binary_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/basic_binary_iprimitive.hpp
deal.II/contrib/boost/include/boost/archive/basic_binary_oarchive.hpp
deal.II/contrib/boost/include/boost/archive/basic_binary_oprimitive.hpp
deal.II/contrib/boost/include/boost/archive/basic_streambuf_locale_saver.hpp
deal.II/contrib/boost/include/boost/archive/basic_text_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/basic_text_iprimitive.hpp
deal.II/contrib/boost/include/boost/archive/basic_text_oarchive.hpp
deal.II/contrib/boost/include/boost/archive/basic_text_oprimitive.hpp
deal.II/contrib/boost/include/boost/archive/basic_xml_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/basic_xml_oarchive.hpp
deal.II/contrib/boost/include/boost/archive/binary_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/binary_iarchive_impl.hpp
deal.II/contrib/boost/include/boost/archive/binary_oarchive.hpp
deal.II/contrib/boost/include/boost/archive/binary_oarchive_impl.hpp
deal.II/contrib/boost/include/boost/archive/codecvt_null.hpp
deal.II/contrib/boost/include/boost/archive/detail/archive_serializer_map.hpp
deal.II/contrib/boost/include/boost/archive/detail/basic_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/detail/basic_iserializer.hpp
deal.II/contrib/boost/include/boost/archive/detail/basic_oarchive.hpp
deal.II/contrib/boost/include/boost/archive/detail/basic_oserializer.hpp
deal.II/contrib/boost/include/boost/archive/detail/basic_pointer_iserializer.hpp
deal.II/contrib/boost/include/boost/archive/detail/basic_pointer_oserializer.hpp
deal.II/contrib/boost/include/boost/archive/detail/basic_serializer.hpp
deal.II/contrib/boost/include/boost/archive/detail/basic_serializer_map.hpp
deal.II/contrib/boost/include/boost/archive/detail/check.hpp
deal.II/contrib/boost/include/boost/archive/detail/common_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/detail/common_oarchive.hpp
deal.II/contrib/boost/include/boost/archive/detail/interface_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/detail/interface_oarchive.hpp
deal.II/contrib/boost/include/boost/archive/detail/iserializer.hpp
deal.II/contrib/boost/include/boost/archive/detail/oserializer.hpp
deal.II/contrib/boost/include/boost/archive/detail/polymorphic_iarchive_route.hpp
deal.II/contrib/boost/include/boost/archive/detail/polymorphic_oarchive_route.hpp
deal.II/contrib/boost/include/boost/archive/detail/register_archive.hpp
deal.II/contrib/boost/include/boost/archive/impl/archive_serializer_map.ipp
deal.II/contrib/boost/include/boost/archive/impl/basic_binary_oprimitive.ipp
deal.II/contrib/boost/include/boost/archive/impl/basic_text_iarchive.ipp
deal.II/contrib/boost/include/boost/archive/impl/basic_text_iprimitive.ipp
deal.II/contrib/boost/include/boost/archive/impl/basic_text_oprimitive.ipp
deal.II/contrib/boost/include/boost/archive/impl/xml_iarchive_impl.ipp
deal.II/contrib/boost/include/boost/archive/impl/xml_wiarchive_impl.ipp
deal.II/contrib/boost/include/boost/archive/iterators/escape.hpp
deal.II/contrib/boost/include/boost/archive/iterators/istream_iterator.hpp
deal.II/contrib/boost/include/boost/archive/iterators/unescape.hpp
deal.II/contrib/boost/include/boost/archive/iterators/xml_unescape.hpp
deal.II/contrib/boost/include/boost/archive/polymorphic_binary_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/polymorphic_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/polymorphic_oarchive.hpp
deal.II/contrib/boost/include/boost/archive/polymorphic_text_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/polymorphic_text_wiarchive.hpp
deal.II/contrib/boost/include/boost/archive/polymorphic_xml_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/shared_ptr_helper.hpp
deal.II/contrib/boost/include/boost/archive/text_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/text_oarchive.hpp
deal.II/contrib/boost/include/boost/archive/text_wiarchive.hpp
deal.II/contrib/boost/include/boost/archive/text_woarchive.hpp
deal.II/contrib/boost/include/boost/archive/xml_iarchive.hpp
deal.II/contrib/boost/include/boost/archive/xml_oarchive.hpp
deal.II/contrib/boost/include/boost/archive/xml_wiarchive.hpp
deal.II/contrib/boost/include/boost/archive/xml_woarchive.hpp
deal.II/contrib/boost/include/boost/array.hpp
deal.II/contrib/boost/include/boost/asio.hpp
deal.II/contrib/boost/include/boost/bind/bind.hpp
deal.II/contrib/boost/include/boost/bind/mem_fn_template.hpp
deal.II/contrib/boost/include/boost/concept/detail/has_constraints.hpp
deal.II/contrib/boost/include/boost/concept_check.hpp
deal.II/contrib/boost/include/boost/config/compiler/borland.hpp
deal.II/contrib/boost/include/boost/config/compiler/codegear.hpp
deal.II/contrib/boost/include/boost/config/compiler/gcc.hpp
deal.II/contrib/boost/include/boost/config/compiler/nvcc.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/config/compiler/pgi.hpp
deal.II/contrib/boost/include/boost/config/compiler/visualc.hpp
deal.II/contrib/boost/include/boost/config/platform/symbian.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/config/select_compiler_config.hpp
deal.II/contrib/boost/include/boost/config/select_platform_config.hpp
deal.II/contrib/boost/include/boost/config/suffix.hpp
deal.II/contrib/boost/include/boost/cstdint.hpp
deal.II/contrib/boost/include/boost/date_time/c_time.hpp
deal.II/contrib/boost/include/boost/date_time/date.hpp
deal.II/contrib/boost/include/boost/date_time/gregorian/conversion.hpp
deal.II/contrib/boost/include/boost/date_time/gregorian/greg_calendar.hpp
deal.II/contrib/boost/include/boost/date_time/gregorian/greg_date.hpp
deal.II/contrib/boost/include/boost/date_time/gregorian_calendar.hpp
deal.II/contrib/boost/include/boost/date_time/gregorian_calendar.ipp
deal.II/contrib/boost/include/boost/date_time/local_time/local_date_time.hpp
deal.II/contrib/boost/include/boost/date_time/local_time/posix_time_zone.hpp
deal.II/contrib/boost/include/boost/date_time/posix_time/conversion.hpp
deal.II/contrib/boost/include/boost/date_time/posix_time/time_formatters.hpp
deal.II/contrib/boost/include/boost/date_time/posix_time/time_formatters_limited.hpp
deal.II/contrib/boost/include/boost/date_time/time_facet.hpp
deal.II/contrib/boost/include/boost/detail/algorithm.hpp
deal.II/contrib/boost/include/boost/detail/container_fwd.hpp
deal.II/contrib/boost/include/boost/detail/interlocked.hpp
deal.II/contrib/boost/include/boost/detail/lcast_precision.hpp
deal.II/contrib/boost/include/boost/detail/scoped_enum_emulation.hpp
deal.II/contrib/boost/include/boost/detail/sp_typeinfo.hpp
deal.II/contrib/boost/include/boost/dynamic_property_map.hpp [deleted file]
deal.II/contrib/boost/include/boost/exception.hpp
deal.II/contrib/boost/include/boost/exception/all.hpp
deal.II/contrib/boost/include/boost/exception/current_exception_cast.hpp
deal.II/contrib/boost/include/boost/exception/detail/attribute_noreturn.hpp
deal.II/contrib/boost/include/boost/exception/detail/error_info_impl.hpp
deal.II/contrib/boost/include/boost/exception/detail/exception_ptr.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/exception/detail/is_output_streamable.hpp
deal.II/contrib/boost/include/boost/exception/detail/object_hex_dump.hpp
deal.II/contrib/boost/include/boost/exception/detail/type_info.hpp
deal.II/contrib/boost/include/boost/exception/diagnostic_information.hpp
deal.II/contrib/boost/include/boost/exception/errinfo_errno.hpp
deal.II/contrib/boost/include/boost/exception/errinfo_nested_exception.hpp
deal.II/contrib/boost/include/boost/exception/exception.hpp
deal.II/contrib/boost/include/boost/exception/get_error_info.hpp
deal.II/contrib/boost/include/boost/exception/info.hpp
deal.II/contrib/boost/include/boost/exception/info_tuple.hpp
deal.II/contrib/boost/include/boost/exception/to_string.hpp
deal.II/contrib/boost/include/boost/exception/to_string_stub.hpp
deal.II/contrib/boost/include/boost/exception_ptr.hpp
deal.II/contrib/boost/include/boost/flyweight.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/function/function_base.hpp
deal.II/contrib/boost/include/boost/functional/factory.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/functional/forward_adapter.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/functional/hash/detail/float_functions.hpp
deal.II/contrib/boost/include/boost/functional/hash/detail/hash_float_generic.hpp
deal.II/contrib/boost/include/boost/functional/hash/hash.hpp
deal.II/contrib/boost/include/boost/functional/lightweight_forward_adapter.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/functional/value_factory.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/array.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/array/at_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/array/begin_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/array/category_of_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/array/deref_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/array/end_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/array/is_sequence_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/array/is_view_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/array/size_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/array/tag_of.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/array/value_at_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/array/value_of_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/boost_array.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/array_iterator.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/at_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/begin_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/category_of_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/end_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/is_sequence_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/is_view_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/size_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/value_at_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/tag_of.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/boost_tuple/tag_of.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/class.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/class/adapt_assoc_class.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/class/adapt_assoc_class_named.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/class/adapt_class.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/class/adapt_class_named.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/adapt_base.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/end_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/extension.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/has_key_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/is_sequence_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/is_view_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/size_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/value_at_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/value_at_key_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/class/extension.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/std_pair.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/struct.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/adapt_struct.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/struct/adapt_struct_named.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/define_assoc_struct.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/define_struct.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/adapt_base.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/at_impl.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/begin_impl.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/category_of_impl.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/define_struct.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/deref_data_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/deref_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/end_impl.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/extension.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/is_view_impl.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/key_of_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/namespace.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/proxy_type.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/size_impl.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/value_at_impl.hpp
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/value_of_data_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/value_of_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/algorithm/iteration/detail/fold.hpp
deal.II/contrib/boost/include/boost/fusion/algorithm/query/detail/find_if.hpp
deal.II/contrib/boost/include/boost/fusion/algorithm/query/find.hpp
deal.II/contrib/boost/include/boost/fusion/algorithm/query/find_if.hpp
deal.II/contrib/boost/include/boost/fusion/algorithm/transformation/erase_key.hpp
deal.II/contrib/boost/include/boost/fusion/container/deque/deque.hpp
deal.II/contrib/boost/include/boost/fusion/container/map/detail/begin_impl.hpp
deal.II/contrib/boost/include/boost/fusion/container/map/detail/deref_data_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/container/map/detail/deref_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/container/map/detail/end_impl.hpp
deal.II/contrib/boost/include/boost/fusion/container/map/detail/key_of_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/container/map/detail/value_of_data_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/container/map/detail/value_of_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/container/map/map.hpp
deal.II/contrib/boost/include/boost/fusion/container/map/map_fwd.hpp
deal.II/contrib/boost/include/boost/fusion/container/set/detail/begin_impl.hpp
deal.II/contrib/boost/include/boost/fusion/container/set/detail/deref_data_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/container/set/detail/deref_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/container/set/detail/end_impl.hpp
deal.II/contrib/boost/include/boost/fusion/container/set/detail/key_of_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/container/set/detail/value_of_data_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/container/set/detail/value_of_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/container/set/set.hpp
deal.II/contrib/boost/include/boost/fusion/container/set/set_fwd.hpp
deal.II/contrib/boost/include/boost/fusion/container/vector/vector.hpp
deal.II/contrib/boost/include/boost/fusion/include/adapt_assoc_class.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/adapt_assoc_class_named.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/adapt_assoc_struct.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/adapt_assoc_struct_named.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/adapt_class.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/adapt_class_named.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/adapt_struct.hpp
deal.II/contrib/boost/include/boost/fusion/include/adapt_struct_named.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/adapted_class_named.cpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/boost_array.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/define_assoc_struct.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/define_struct.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/deref_data.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/key_of.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/proxy_type.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/include/value_of_data.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/iterator/advance.hpp
deal.II/contrib/boost/include/boost/fusion/iterator/basic_iterator.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/iterator/deref.hpp
deal.II/contrib/boost/include/boost/fusion/iterator/deref_data.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/iterator/distance.hpp
deal.II/contrib/boost/include/boost/fusion/iterator/equal_to.hpp
deal.II/contrib/boost/include/boost/fusion/iterator/iterator_facade.hpp
deal.II/contrib/boost/include/boost/fusion/iterator/key_of.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/iterator/next.hpp
deal.II/contrib/boost/include/boost/fusion/iterator/prior.hpp
deal.II/contrib/boost/include/boost/fusion/iterator/value_of.hpp
deal.II/contrib/boost/include/boost/fusion/iterator/value_of_data.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/sequence/comparison/detail/greater.hpp
deal.II/contrib/boost/include/boost/fusion/sequence/comparison/detail/less.hpp
deal.II/contrib/boost/include/boost/fusion/sequence/intrinsic/at.hpp
deal.II/contrib/boost/include/boost/fusion/sequence/intrinsic/at_key.hpp
deal.II/contrib/boost/include/boost/fusion/sequence/intrinsic/begin.hpp
deal.II/contrib/boost/include/boost/fusion/sequence/intrinsic/end.hpp
deal.II/contrib/boost/include/boost/fusion/sequence/intrinsic/ext_/size_s.hpp
deal.II/contrib/boost/include/boost/fusion/sequence/intrinsic/has_key.hpp
deal.II/contrib/boost/include/boost/fusion/sequence/intrinsic/size.hpp
deal.II/contrib/boost/include/boost/fusion/sequence/intrinsic/value_at.hpp
deal.II/contrib/boost/include/boost/fusion/sequence/intrinsic/value_at_key.hpp
deal.II/contrib/boost/include/boost/fusion/support/category_of.hpp
deal.II/contrib/boost/include/boost/fusion/support/ext_/is_segmented.hpp
deal.II/contrib/boost/include/boost/fusion/support/is_sequence.hpp
deal.II/contrib/boost/include/boost/fusion/support/is_view.hpp
deal.II/contrib/boost/include/boost/fusion/view/detail/strictest_traversal.hpp
deal.II/contrib/boost/include/boost/fusion/view/ext_/segmented_iterator.hpp
deal.II/contrib/boost/include/boost/fusion/view/filter_view/detail/begin_impl.hpp
deal.II/contrib/boost/include/boost/fusion/view/filter_view/detail/deref_data_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/view/filter_view/detail/end_impl.hpp
deal.II/contrib/boost/include/boost/fusion/view/filter_view/detail/key_of_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/view/filter_view/detail/next_impl.hpp
deal.II/contrib/boost/include/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/view/filter_view/filter_view.hpp
deal.II/contrib/boost/include/boost/fusion/view/filter_view/filter_view_iterator.hpp
deal.II/contrib/boost/include/boost/fusion/view/iterator_range/iterator_range.hpp
deal.II/contrib/boost/include/boost/fusion/view/joint_view/detail/begin_impl.hpp
deal.II/contrib/boost/include/boost/fusion/view/joint_view/detail/deref_data_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/view/joint_view/detail/key_of_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/view/joint_view/detail/next_impl.hpp
deal.II/contrib/boost/include/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/view/joint_view/joint_view.hpp
deal.II/contrib/boost/include/boost/fusion/view/joint_view/joint_view_iterator.hpp
deal.II/contrib/boost/include/boost/fusion/view/nview/nview.hpp
deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/at_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/fusion/view/reverse_view/reverse_view.hpp
deal.II/contrib/boost/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp
deal.II/contrib/boost/include/boost/graph/adjacency_list.hpp
deal.II/contrib/boost/include/boost/graph/adjacency_list_io.hpp
deal.II/contrib/boost/include/boost/graph/adjacency_matrix.hpp
deal.II/contrib/boost/include/boost/graph/astar_search.hpp
deal.II/contrib/boost/include/boost/graph/biconnected_components.hpp
deal.II/contrib/boost/include/boost/graph/bipartite.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/graph/bron_kerbosch_all_cliques.hpp
deal.II/contrib/boost/include/boost/graph/clustering_coefficient.hpp
deal.II/contrib/boost/include/boost/graph/compressed_sparse_row_graph.hpp
deal.II/contrib/boost/include/boost/graph/core_numbers.hpp
deal.II/contrib/boost/include/boost/graph/dag_shortest_paths.hpp
deal.II/contrib/boost/include/boost/graph/depth_first_search.hpp
deal.II/contrib/boost/include/boost/graph/detail/adjacency_list.hpp
deal.II/contrib/boost/include/boost/graph/detail/array_binary_tree.hpp
deal.II/contrib/boost/include/boost/graph/detail/compressed_sparse_row_struct.hpp
deal.II/contrib/boost/include/boost/graph/detail/histogram_sort.hpp
deal.II/contrib/boost/include/boost/graph/detail/indexed_properties.hpp
deal.II/contrib/boost/include/boost/graph/detail/labeled_graph_traits.hpp
deal.II/contrib/boost/include/boost/graph/detail/read_graphviz_new.hpp
deal.II/contrib/boost/include/boost/graph/detail/read_graphviz_spirit.hpp
deal.II/contrib/boost/include/boost/graph/distributed/adjacency_list.hpp
deal.II/contrib/boost/include/boost/graph/distributed/betweenness_centrality.hpp
deal.II/contrib/boost/include/boost/graph/distributed/compressed_sparse_row_graph.hpp
deal.II/contrib/boost/include/boost/graph/distributed/detail/mpi_process_group.ipp
deal.II/contrib/boost/include/boost/graph/distributed/one_bit_color_map.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/graph/distributed/two_bit_color_map.hpp
deal.II/contrib/boost/include/boost/graph/dll_import_export.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/graph/dominator_tree.hpp
deal.II/contrib/boost/include/boost/graph/filtered_graph.hpp
deal.II/contrib/boost/include/boost/graph/floyd_warshall_shortest.hpp
deal.II/contrib/boost/include/boost/graph/geodesic_distance.hpp
deal.II/contrib/boost/include/boost/graph/graph_test.hpp
deal.II/contrib/boost/include/boost/graph/graph_traits.hpp
deal.II/contrib/boost/include/boost/graph/graphml.hpp
deal.II/contrib/boost/include/boost/graph/graphviz.hpp
deal.II/contrib/boost/include/boost/graph/grid_graph.hpp
deal.II/contrib/boost/include/boost/graph/gursoy_atun_layout.hpp
deal.II/contrib/boost/include/boost/graph/howard_cycle_ratio.hpp
deal.II/contrib/boost/include/boost/graph/is_straight_line_drawing.hpp
deal.II/contrib/boost/include/boost/graph/isomorphism.hpp
deal.II/contrib/boost/include/boost/graph/kolmogorov_max_flow.hpp
deal.II/contrib/boost/include/boost/graph/labeled_graph.hpp
deal.II/contrib/boost/include/boost/graph/lookup_edge.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/graph/max_cardinality_matching.hpp
deal.II/contrib/boost/include/boost/graph/mcgregor_common_subgraphs.hpp
deal.II/contrib/boost/include/boost/graph/metric_tsp_approx.hpp
deal.II/contrib/boost/include/boost/graph/named_function_params.hpp
deal.II/contrib/boost/include/boost/graph/one_bit_color_map.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/graph/planar_detail/boyer_myrvold_impl.hpp
deal.II/contrib/boost/include/boost/graph/planar_face_traversal.hpp
deal.II/contrib/boost/include/boost/graph/properties.hpp
deal.II/contrib/boost/include/boost/graph/property_maps/constant_property_map.hpp
deal.II/contrib/boost/include/boost/graph/r_c_shortest_paths.hpp
deal.II/contrib/boost/include/boost/graph/reverse_graph.hpp
deal.II/contrib/boost/include/boost/graph/subgraph.hpp
deal.II/contrib/boost/include/boost/graph/topological_sort.hpp
deal.II/contrib/boost/include/boost/graph/two_bit_color_map.hpp
deal.II/contrib/boost/include/boost/graph/visitors.hpp
deal.II/contrib/boost/include/boost/integer.hpp
deal.II/contrib/boost/include/boost/integer/integer_mask.hpp
deal.II/contrib/boost/include/boost/integer/static_log2.hpp
deal.II/contrib/boost/include/boost/integer/static_min_max.hpp
deal.II/contrib/boost/include/boost/integer_fwd.hpp
deal.II/contrib/boost/include/boost/integer_traits.hpp
deal.II/contrib/boost/include/boost/io/ios_state.hpp
deal.II/contrib/boost/include/boost/iostreams/chain.hpp
deal.II/contrib/boost/include/boost/iostreams/checked_operations.hpp
deal.II/contrib/boost/include/boost/iostreams/code_converter.hpp
deal.II/contrib/boost/include/boost/iostreams/detail/adapter/concept_adapter.hpp
deal.II/contrib/boost/include/boost/iostreams/detail/adapter/direct_adapter.hpp
deal.II/contrib/boost/include/boost/iostreams/detail/adapter/range_adapter.hpp
deal.II/contrib/boost/include/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp
deal.II/contrib/boost/include/boost/iostreams/detail/buffer.hpp
deal.II/contrib/boost/include/boost/iostreams/detail/config/unreachable_return.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/iostreams/detail/is_dereferenceable.hpp
deal.II/contrib/boost/include/boost/iostreams/detail/path.hpp
deal.II/contrib/boost/include/boost/iostreams/detail/push_params.hpp
deal.II/contrib/boost/include/boost/iostreams/detail/restrict_impl.hpp
deal.II/contrib/boost/include/boost/iostreams/detail/streambuf/direct_streambuf.hpp
deal.II/contrib/boost/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
deal.II/contrib/boost/include/boost/iostreams/detail/system_failure.hpp
deal.II/contrib/boost/include/boost/iostreams/device/mapped_file.hpp
deal.II/contrib/boost/include/boost/iostreams/filter/bzip2.hpp
deal.II/contrib/boost/include/boost/iostreams/filter/gzip.hpp
deal.II/contrib/boost/include/boost/iostreams/filter/newline.hpp
deal.II/contrib/boost/include/boost/iostreams/filter/zlib.hpp
deal.II/contrib/boost/include/boost/iostreams/positioning.hpp
deal.II/contrib/boost/include/boost/iostreams/skip.hpp
deal.II/contrib/boost/include/boost/iostreams/stream_buffer.hpp
deal.II/contrib/boost/include/boost/iostreams/write.hpp
deal.II/contrib/boost/include/boost/math/distributions/detail/hypergeometric_pdf.hpp
deal.II/contrib/boost/include/boost/math/distributions/fisher_f.hpp
deal.II/contrib/boost/include/boost/math/special_functions/bessel.hpp
deal.II/contrib/boost/include/boost/math/special_functions/beta.hpp
deal.II/contrib/boost/include/boost/math/special_functions/cbrt.hpp
deal.II/contrib/boost/include/boost/math/special_functions/detail/bessel_jn.hpp
deal.II/contrib/boost/include/boost/math/special_functions/detail/bessel_jy.hpp
deal.II/contrib/boost/include/boost/math/special_functions/detail/iconv.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/math/special_functions/detail/igamma_inverse.hpp
deal.II/contrib/boost/include/boost/math/special_functions/detail/t_distribution_inv.hpp
deal.II/contrib/boost/include/boost/math/special_functions/erf.hpp
deal.II/contrib/boost/include/boost/math/special_functions/fpclassify.hpp
deal.II/contrib/boost/include/boost/math/special_functions/gamma.hpp
deal.II/contrib/boost/include/boost/math/tools/config.hpp
deal.II/contrib/boost/include/boost/math/tr1.hpp
deal.II/contrib/boost/include/boost/memory_order.hpp
deal.II/contrib/boost/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp
deal.II/contrib/boost/include/boost/mpl/aux_/template_arity.hpp
deal.II/contrib/boost/include/boost/mpl/zip_view.hpp
deal.II/contrib/boost/include/boost/multi_index/detail/serialization_version.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/multi_index_container.hpp
deal.II/contrib/boost/include/boost/nondet_random.hpp
deal.II/contrib/boost/include/boost/parameter/aux_/arg_list.hpp
deal.II/contrib/boost/include/boost/pending/container_traits.hpp
deal.II/contrib/boost/include/boost/pending/indirect_cmp.hpp
deal.II/contrib/boost/include/boost/pending/mutable_queue.hpp
deal.II/contrib/boost/include/boost/pending/property.hpp
deal.II/contrib/boost/include/boost/property_map.hpp [deleted file]
deal.II/contrib/boost/include/boost/property_map/dynamic_property_map.hpp
deal.II/contrib/boost/include/boost/property_map/property_map.hpp
deal.II/contrib/boost/include/boost/property_map_iterator.hpp [deleted file]
deal.II/contrib/boost/include/boost/python/detail/destroy.hpp
deal.II/contrib/boost/include/boost/python/object/make_instance.hpp
deal.II/contrib/boost/include/boost/python/object/pointer_holder.hpp
deal.II/contrib/boost/include/boost/python/object_core.hpp
deal.II/contrib/boost/include/boost/python/signature.hpp
deal.II/contrib/boost/include/boost/random.hpp
deal.II/contrib/boost/include/boost/random/additive_combine.hpp
deal.II/contrib/boost/include/boost/random/bernoulli_distribution.hpp
deal.II/contrib/boost/include/boost/random/binomial_distribution.hpp
deal.II/contrib/boost/include/boost/random/cauchy_distribution.hpp
deal.II/contrib/boost/include/boost/random/detail/auto_link.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/random/detail/const_mod.hpp
deal.II/contrib/boost/include/boost/random/detail/disable_warnings.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/random/detail/enable_warnings.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/random/detail/pass_through_engine.hpp
deal.II/contrib/boost/include/boost/random/detail/seed.hpp
deal.II/contrib/boost/include/boost/random/discard_block.hpp
deal.II/contrib/boost/include/boost/random/exponential_distribution.hpp
deal.II/contrib/boost/include/boost/random/gamma_distribution.hpp
deal.II/contrib/boost/include/boost/random/geometric_distribution.hpp
deal.II/contrib/boost/include/boost/random/inversive_congruential.hpp
deal.II/contrib/boost/include/boost/random/lagged_fibonacci.hpp
deal.II/contrib/boost/include/boost/random/linear_congruential.hpp
deal.II/contrib/boost/include/boost/random/linear_feedback_shift.hpp
deal.II/contrib/boost/include/boost/random/lognormal_distribution.hpp
deal.II/contrib/boost/include/boost/random/mersenne_twister.hpp
deal.II/contrib/boost/include/boost/random/normal_distribution.hpp
deal.II/contrib/boost/include/boost/random/poisson_distribution.hpp
deal.II/contrib/boost/include/boost/random/random_number_generator.hpp
deal.II/contrib/boost/include/boost/random/ranlux.hpp
deal.II/contrib/boost/include/boost/random/shuffle_output.hpp
deal.II/contrib/boost/include/boost/random/subtract_with_carry.hpp
deal.II/contrib/boost/include/boost/random/triangle_distribution.hpp
deal.II/contrib/boost/include/boost/random/uniform_01.hpp
deal.II/contrib/boost/include/boost/random/uniform_int.hpp
deal.II/contrib/boost/include/boost/random/uniform_on_sphere.hpp
deal.II/contrib/boost/include/boost/random/uniform_real.hpp
deal.II/contrib/boost/include/boost/random/uniform_smallint.hpp
deal.II/contrib/boost/include/boost/random/variate_generator.hpp
deal.II/contrib/boost/include/boost/random/xor_combine.hpp
deal.II/contrib/boost/include/boost/range/adaptor/adjacent_filtered.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/range/adaptor/argument_fwd.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/adaptor/copied.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/adaptor/define_adaptor.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/range/adaptor/filtered.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/adaptor/indexed.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/adaptor/indirected.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/range/adaptor/map.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/adaptor/replaced.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/range/adaptor/replaced_if.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/range/adaptor/reversed.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/adaptor/sliced.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/adaptor/strided.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/adaptor/tokenized.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/adaptor/transformed.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/adaptor/uniqued.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/adaptors.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/adjacent_find.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/binary_search.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/copy.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/range/algorithm/copy_backward.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/count.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/count_if.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/equal.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/equal_range.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/fill.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/fill_n.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/find.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/find_end.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/find_first_of.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/find_if.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/for_each.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/generate.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/heap_algorithm.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/inplace_merge.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/lexicographical_compare.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/lower_bound.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/max_element.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/merge.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/min_element.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/mismatch.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/nth_element.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/partial_sort.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/partial_sort_copy.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/partition.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/permutation.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/random_shuffle.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/remove.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/remove_copy.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/remove_copy_if.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/remove_if.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/replace.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/replace_copy.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/replace_copy_if.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/replace_if.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/reverse.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/reverse_copy.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/rotate.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/rotate_copy.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/search.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/search_n.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/set_algorithm.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/sort.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/stable_partition.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/stable_sort.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/swap_ranges.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/transform.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/unique.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/unique_copy.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm/upper_bound.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm_ext.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm_ext/copy_n.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm_ext/erase.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm_ext/for_each.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm_ext/insert.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm_ext/iota.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/range/algorithm_ext/is_sorted.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm_ext/overwrite.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm_ext/push_back.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/algorithm_ext/push_front.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/as_literal.hpp
deal.II/contrib/boost/include/boost/range/combine.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/concepts.hpp
deal.II/contrib/boost/include/boost/range/const_iterator.hpp
deal.II/contrib/boost/include/boost/range/counting_range.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/detail/demote_iterator_traversal_tag.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/detail/extract_optional_type.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/detail/implementation_help.hpp
deal.II/contrib/boost/include/boost/range/detail/join_iterator.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/range/detail/misc_concept.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/detail/range_return.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/irange.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/range/istream_range.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/iterator.hpp
deal.II/contrib/boost/include/boost/range/iterator_range.hpp
deal.II/contrib/boost/include/boost/range/iterator_range_core.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/iterator_range_io.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/join.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/range/mutable_iterator.hpp
deal.II/contrib/boost/include/boost/range/numeric.hpp [new file with mode: 0755]
deal.II/contrib/boost/include/boost/range/size.hpp
deal.II/contrib/boost/include/boost/range/size_type.hpp
deal.II/contrib/boost/include/boost/range/sub_range.hpp
deal.II/contrib/boost/include/boost/scope_exit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/serialization/access.hpp
deal.II/contrib/boost/include/boost/serialization/array.hpp
deal.II/contrib/boost/include/boost/serialization/binary_object.hpp
deal.II/contrib/boost/include/boost/serialization/collection_traits.hpp
deal.II/contrib/boost/include/boost/serialization/collections_load_imp.hpp
deal.II/contrib/boost/include/boost/serialization/collections_save_imp.hpp
deal.II/contrib/boost/include/boost/serialization/export.hpp
deal.II/contrib/boost/include/boost/serialization/extended_type_info.hpp
deal.II/contrib/boost/include/boost/serialization/extended_type_info_no_rtti.hpp
deal.II/contrib/boost/include/boost/serialization/extended_type_info_typeid.hpp
deal.II/contrib/boost/include/boost/serialization/factory.hpp
deal.II/contrib/boost/include/boost/serialization/hash_collections_load_imp.hpp
deal.II/contrib/boost/include/boost/serialization/hash_map.hpp
deal.II/contrib/boost/include/boost/serialization/hash_set.hpp
deal.II/contrib/boost/include/boost/serialization/map.hpp
deal.II/contrib/boost/include/boost/serialization/set.hpp
deal.II/contrib/boost/include/boost/serialization/shared_ptr.hpp
deal.II/contrib/boost/include/boost/serialization/singleton.hpp
deal.II/contrib/boost/include/boost/serialization/slist.hpp
deal.II/contrib/boost/include/boost/serialization/static_warning.hpp
deal.II/contrib/boost/include/boost/serialization/throw_exception.hpp
deal.II/contrib/boost/include/boost/serialization/variant.hpp
deal.II/contrib/boost/include/boost/serialization/version.hpp
deal.II/contrib/boost/include/boost/serialization/void_cast.hpp
deal.II/contrib/boost/include/boost/serialization/weak_ptr.hpp
deal.II/contrib/boost/include/boost/signals2.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/smart_ptr/detail/lwm_pthreads.hpp
deal.II/contrib/boost/include/boost/smart_ptr/detail/quick_allocator.hpp
deal.II/contrib/boost/include/boost/smart_ptr/detail/sp_convertible.hpp
deal.II/contrib/boost/include/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp
deal.II/contrib/boost/include/boost/smart_ptr/detail/sp_has_sync.hpp
deal.II/contrib/boost/include/boost/smart_ptr/intrusive_ptr.hpp
deal.II/contrib/boost/include/boost/smart_ptr/make_shared.hpp
deal.II/contrib/boost/include/boost/smart_ptr/shared_ptr.hpp
deal.II/contrib/boost/include/boost/smart_ptr/weak_ptr.hpp
deal.II/contrib/boost/include/boost/thread/barrier.hpp
deal.II/contrib/boost/include/boost/thread/detail/thread.hpp
deal.II/contrib/boost/include/boost/thread/future.hpp
deal.II/contrib/boost/include/boost/thread/locks.hpp
deal.II/contrib/boost/include/boost/thread/pthread/condition_variable.hpp
deal.II/contrib/boost/include/boost/thread/pthread/condition_variable_fwd.hpp
deal.II/contrib/boost/include/boost/thread/pthread/mutex.hpp
deal.II/contrib/boost/include/boost/thread/pthread/once.hpp
deal.II/contrib/boost/include/boost/thread/pthread/recursive_mutex.hpp
deal.II/contrib/boost/include/boost/thread/pthread/thread_heap_alloc.hpp
deal.II/contrib/boost/include/boost/thread/win32/basic_timed_mutex.hpp
deal.II/contrib/boost/include/boost/thread/win32/once.hpp
deal.II/contrib/boost/include/boost/thread/win32/thread_heap_alloc.hpp
deal.II/contrib/boost/include/boost/thread/win32/thread_primitives.hpp
deal.II/contrib/boost/include/boost/throw_exception.hpp
deal.II/contrib/boost/include/boost/type_traits/has_new_operator.hpp
deal.II/contrib/boost/include/boost/type_traits/intrinsics.hpp
deal.II/contrib/boost/include/boost/type_traits/is_empty.hpp
deal.II/contrib/boost/include/boost/type_traits/is_signed.hpp
deal.II/contrib/boost/include/boost/type_traits/is_unsigned.hpp
deal.II/contrib/boost/include/boost/units/absolute.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_dimension.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_unit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/angle/arcminute.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/angle/arcsecond.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/angle/degree.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/angle/gradian.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/angle/radian.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/angle/revolution.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/angle/steradian.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/astronomical/astronomical_unit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_day.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_hour.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_minute.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_second.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_year.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/astronomical/parsec.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/cgs/biot.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/cgs/centimeter.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/cgs/gram.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/conversions.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/drachm.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/fluid_ounce.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/foot.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/furlong.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/gallon.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/gill.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/grain.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/hundredweight.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/inch.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/league.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/mile.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/ounce.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/pint.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/pound.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/quart.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/quarter.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/stone.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/thou.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/ton.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/imperial/yard.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/angstrom.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/are.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/atmosphere.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/bar.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/barn.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/day.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/fermi.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/hectare.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/hour.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/knot.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/liter.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/micron.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/minute.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/mmHg.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/nautical_mile.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/ton.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/torr.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/metric/year.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/si/ampere.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/si/candela.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/si/kelvin.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/si/kilogram.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/si/meter.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/si/mole.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/si/second.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/temperature/celsius.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/temperature/conversions.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/temperature/fahrenheit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/cup.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/dram.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/fluid_dram.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/fluid_ounce.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/foot.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/gallon.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/gill.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/grain.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/hundredweight.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/inch.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/mil.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/mile.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/minim.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/ounce.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/pint.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/pound.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/pound_force.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/quart.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/tablespoon.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/teaspoon.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/ton.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/base_units/us/yard.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/cmath.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/config.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/conversion.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/derived_dimension.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/absolute_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/cmath_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/conversion_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/dim_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/dimension_impl.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/dimension_list.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/dimensionless_unit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/heterogeneous_conversion.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/linear_algebra.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/one.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/ordinal.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/prevent_redefinition.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/push_front_if.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/push_front_or_add.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/sort.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/static_rational_power.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/unscale.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/detail/utility.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/dim.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/dimension.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/dimensionless_quantity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/dimensionless_type.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/dimensionless_unit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/get_dimension.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/get_system.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/heterogeneous_system.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/homogeneous_system.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/io.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/is_dim.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/is_dimension_list.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/is_dimensionless.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/is_dimensionless_quantity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/is_dimensionless_unit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/is_quantity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/is_quantity_of_dimension.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/is_quantity_of_system.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/is_unit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/is_unit_of_dimension.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/is_unit_of_system.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/lambda.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/limits.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/make_scaled_unit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/make_system.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/operators.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/absorbed_dose.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/acceleration.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/action.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/activity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/amount.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/angular_acceleration.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/angular_momentum.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/angular_velocity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/area.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/capacitance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/conductance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/conductivity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/current.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/dose_equivalent.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/dynamic_viscosity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/electric_charge.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/electric_potential.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/energy.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/energy_density.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/force.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/frequency.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/heat_capacity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/illuminance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/impedance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/inductance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/kinematic_viscosity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/length.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/luminance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/luminous_flux.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/luminous_intensity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/magnetic_field_intensity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/magnetic_flux.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/magnetic_flux_density.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/mass.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/mass_density.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/molar_energy.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/molar_heat_capacity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/moment_of_inertia.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/momentum.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/permeability.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/permittivity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/plane_angle.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/power.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/pressure.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/reluctance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/resistance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/resistivity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/solid_angle.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/specific_energy.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/specific_heat_capacity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/specific_volume.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/stress.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/surface_density.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/surface_tension.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/temperature.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/thermal_conductivity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/time.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/torque.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/velocity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/volume.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/physical_dimensions/wavenumber.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/pow.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/quantity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/reduce_unit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/scale.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/scaled_base_unit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/static_constant.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/static_rational.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/abstract.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/angle/degrees.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/angle/gradians.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/angle/revolutions.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/acceleration.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/area.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/base.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/current.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/dimensionless.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/dynamic_viscosity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/energy.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/force.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/frequency.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/io.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/kinematic_viscosity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/length.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/mass.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/mass_density.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/momentum.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/power.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/pressure.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/time.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/velocity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/volume.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/cgs/wavenumber.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/detail/constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/absorbed_dose.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/acceleration.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/action.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/activity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/amount.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/angular_acceleration.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/angular_momentum.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/angular_velocity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/area.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/base.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/capacitance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/catalytic_activity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/alpha_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/atomic-nuclear_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/deuteron_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/electromagnetic_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/electron_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/helion_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/muon_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/neutron_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/physico-chemical_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/proton_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/tau_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/triton_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/typedefs.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata/universal_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/codata_constants.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/conductance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/conductivity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/current.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/dimensionless.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/dose_equivalent.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/dynamic_viscosity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/electric_charge.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/electric_potential.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/energy.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/force.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/frequency.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/illuminance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/impedance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/inductance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/io.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/kinematic_viscosity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/length.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/luminous_flux.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/luminous_intensity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/magnetic_field_intensity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/magnetic_flux.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/magnetic_flux_density.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/mass.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/mass_density.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/moment_of_inertia.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/momentum.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/permeability.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/permittivity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/plane_angle.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/power.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/prefixes.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/pressure.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/reluctance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/resistance.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/resistivity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/solid_angle.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/surface_density.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/surface_tension.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/temperature.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/time.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/torque.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/velocity.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/volume.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/si/wavenumber.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/temperature/celsius.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/systems/temperature/fahrenheit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/unit.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/units/units_fwd.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/detail/allocator_helpers.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/detail/buckets.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/detail/equivalent.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/detail/extract_key.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/detail/fwd.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/detail/move.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/detail/node.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/detail/table.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/detail/unique.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/detail/util.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/unordered_map.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/unordered_map_fwd.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/unordered_set.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/unordered/unordered_set_fwd.hpp [new file with mode: 0644]
deal.II/contrib/boost/include/boost/utility/value_init.hpp
deal.II/contrib/boost/include/boost/vector_property_map.hpp [deleted file]
deal.II/contrib/boost/include/boost/version.hpp
deal.II/contrib/boost/include/boost/wave.hpp
deal.II/contrib/boost/libs/thread/doc/once.qbk
deal.II/contrib/boost/libs/thread/src/pthread/thread.cpp
deal.II/contrib/boost/libs/thread/src/pthread/timeconv.inl
deal.II/contrib/boost/libs/thread/src/win32/thread.cpp
deal.II/contrib/boost/libs/thread/test/Jamfile.v2
deal.II/contrib/boost/libs/thread/test/test_futures.cpp
deal.II/contrib/boost/libs/thread/test/test_thread_exit.cpp [new file with mode: 0644]

index 668bd679b17137a87d2879211b19cb228c68f756..1c906ef94daee2f174be7f33ff742ef9052f0e47 100644 (file)
 //  See http://www.boost.org for updates, documentation, and revision history.
 
 #include <boost/config.hpp>
-#include <boost/serialization/strong_typedef.hpp>
+#include <boost/cstdint.hpp>
 #include <boost/noncopyable.hpp>
+#include <boost/integer_traits.hpp>
+#include <boost/serialization/strong_typedef.hpp>
 
 #include <boost/archive/detail/auto_link_archive.hpp>
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#define BOOST_ARCHIVE_STRONG_TYPEDEF(T, D)        \
+namespace boost {                                 \
+namespace archive {                               \
+BOOST_STRONG_TYPEDEF(T, D)                        \
+} /* archive */                                   \
+template<>                                        \
+class integer_traits<boost::archive::D>  :        \
+    public integer_traits<boost::T>               \
+{};                                               \
+} /* boost */                                     \
+/**/
+
+BOOST_ARCHIVE_STRONG_TYPEDEF(uint_least16_t, version_type)
+BOOST_ARCHIVE_STRONG_TYPEDEF(int_least16_t, class_id_type)
+BOOST_ARCHIVE_STRONG_TYPEDEF(int_least16_t, class_id_optional_type)
+BOOST_ARCHIVE_STRONG_TYPEDEF(int_least16_t, class_id_reference_type)
+BOOST_ARCHIVE_STRONG_TYPEDEF(uint_least32_t, object_id_type)
+BOOST_ARCHIVE_STRONG_TYPEDEF(uint_least32_t, object_reference_type)
+
 namespace boost {
 namespace archive {
 
-BOOST_STRONG_TYPEDEF(unsigned int, version_type)
-BOOST_STRONG_TYPEDEF(int, class_id_type)
-BOOST_STRONG_TYPEDEF(int, class_id_optional_type)
-BOOST_STRONG_TYPEDEF(int, class_id_reference_type)
-BOOST_STRONG_TYPEDEF(unsigned int, object_id_type)
-BOOST_STRONG_TYPEDEF(unsigned int, object_reference_type)
-
 struct tracking_type {
 //    typedef bool value_type;
     bool t;
@@ -64,7 +78,9 @@ struct tracking_type {
     }
 };
 
-struct class_name_type : private boost::noncopyable {
+struct class_name_type : 
+    private boost::noncopyable 
+{
     char *t;
     operator const char * & () const {
         return const_cast<const char * &>(t);
@@ -95,7 +111,7 @@ enum archive_flags {
 BOOST_ARCHIVE_DECL(const char *)
 BOOST_ARCHIVE_SIGNATURE();
 
-BOOST_ARCHIVE_DECL(unsigned char)
+BOOST_ARCHIVE_DECL(version_type)
 BOOST_ARCHIVE_VERSION();
 
 }// namespace archive
index 2448c5fd35739c863fea3a661600dc2215feb331..0494c98c9fa03812f69adfc203a1de030a6b42a4 100644 (file)
 #include <boost/serialization/collection_size_type.hpp>
 #include <boost/serialization/string.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
 namespace boost { 
@@ -127,6 +132,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP
index 11f5b3890a38af37754a385be35dca4ac157e739..c374e0b0cea4af1000deb8f65b3d98c8511eb407 100644 (file)
@@ -46,8 +46,8 @@ namespace std{
 #include <boost/cstdint.hpp>
 #include <boost/scoped_ptr.hpp>
 #include <boost/serialization/throw_exception.hpp>
-//#include <boost/limits.hpp>
-//#include <boost/io/ios_state.hpp>
+#include <boost/integer.hpp>
+#include <boost/integer_traits.hpp>
 
 #include <boost/archive/basic_streambuf_locale_saver.hpp>
 #include <boost/archive/archive_exception.hpp>
@@ -151,7 +151,11 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load_binary(
     std::size_t count
 ){
     // note: an optimizer should eliminate the following for char files
-    std::streamsize s = count / sizeof(Elem);
+    assert(
+        static_cast<std::streamsize>(count / sizeof(Elem)) 
+        <= boost::integer_traits<std::streamsize>::const_max
+    );
+    std::streamsize s = static_cast<std::streamsize>(count / sizeof(Elem));
     std::streamsize scount = m_sb.sgetn(
         static_cast<Elem *>(address), 
         s
@@ -161,7 +165,8 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load_binary(
             archive_exception(archive_exception::stream_error)
         );
     // note: an optimizer should eliminate the following for char files
-    s = count % sizeof(Elem);
+    assert(count % sizeof(Elem) <= boost::integer_traits<std::streamsize>::const_max);
+    s = static_cast<std::streamsize>(count % sizeof(Elem));
     if(0 < s){
 //        if(is.fail())
 //            boost::serialization::throw_exception(
index d39d187b5e3f6205ec9eb17fb12aea35e5318088..9198e1acf67353c4d66879baa1813eafd17b9f2a 100644 (file)
 #include <boost/serialization/string.hpp>
 #include <boost/serialization/collection_size_type.hpp>
 
+#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
+
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost {
 namespace archive {
 
@@ -73,31 +80,31 @@ public:
     void save_override(const version_type & t, int){
         // upto 255 versions
         // note:t.t resolves borland ambguity
-        assert(t.t <= boost::integer_traits<unsigned char>::const_max);
+        assert(t.t < boost::integer_traits<unsigned char>::const_max);
         const unsigned char x = static_cast<const unsigned char>(t.t);
         * this->This() << x;
     }
     void save_override(const class_id_type & t, int){
         // upto 32K classes
-        assert(t.t <= boost::integer_traits<boost::int_least16_t>::const_max);
+        assert(t.t < boost::integer_traits<boost::int_least16_t>::const_max);
         const boost::int_least16_t x = static_cast<const boost::int_least16_t>(t.t); 
         * this->This() << x;
     }
     void save_override(const class_id_reference_type & t, int){
         // upto 32K classes
-        assert(t.t <= boost::integer_traits<boost::int_least16_t>::const_max);
-        const boost::uint_least16_t x = t.t;
+        assert(t.t < boost::integer_traits<boost::int_least16_t>::const_max);
+        const boost::int_least16_t x = t.t;
         * this->This() << x;
     }
     void save_override(const object_id_type & t, int){
         // upto 2G objects
-        assert(t.t <= boost::integer_traits<boost::uint_least32_t>::const_max);
+        assert(t.t < boost::integer_traits<boost::uint_least32_t>::const_max);
         const boost::uint_least32_t x = t.t;
         * this->This() << x;
     }
     void save_override(const object_reference_type & t, int){
         // upto 2G objects
-        assert(t.t <= boost::integer_traits<boost::uint_least32_t>::const_max);
+        assert(t.t < boost::integer_traits<boost::uint_least32_t>::const_max);
         const boost::uint_least32_t x = t.t;
         * this->This() << x;
     }
@@ -129,4 +136,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
+
 #endif // BOOST_ARCHIVE_BASIC_BINARY_OARCHIVE_HPP
index c22c87cfeeacc220c5fbc294952f8cb6e54dccdc..934744f6c61900cdd4f4ca03e10fbc9281c69438 100644 (file)
@@ -38,8 +38,8 @@ namespace std{
 #endif
 
 #include <boost/cstdint.hpp>
-//#include <boost/limits.hpp>
-//#include <boost/io/ios_state.hpp>
+#include <boost/integer.hpp>
+#include <boost/integer_traits.hpp>
 #include <boost/scoped_ptr.hpp>
 #include <boost/serialization/throw_exception.hpp>
 
@@ -160,9 +160,10 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save_binary(
     // figure number of elements to output - round up
     count = ( count + sizeof(Elem) - 1) 
         / sizeof(Elem);
+    assert(count <= std::size_t(boost::integer_traits<std::streamsize>::const_max));
     std::streamsize scount = m_sb.sputn(
         static_cast<const Elem *>(address), 
-        count
+        static_cast<std::streamsize>(count)
     );
     if(count != static_cast<std::size_t>(scount))
         boost::serialization::throw_exception(
index 3f587de7200be7b394feeac87e69e902935ce345..ca764e10483f2241e38ef474ed76ae608f1c7fe6 100644 (file)
 #include <locale>     // for std::locale
 #include <streambuf>  // for std::basic_streambuf
 
+#include <boost/config.hpp>
+#include <boost/noncopyable.hpp>
+
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost{
 namespace archive{
 
 template < typename Ch, class Tr >
-class basic_streambuf_locale_saver
+class basic_streambuf_locale_saver :
+    private boost::noncopyable
 {
 public:
     typedef ::std::basic_streambuf<Ch, Tr> state_type;
@@ -56,5 +65,9 @@ private:
 } // archive
 } // boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_NO_STD_LOCALE
 #endif // BOOST_ARCHIVE_BASIC_STREAMBUF_LOCALE_SAVER_HPP
index 8080564666020b1e5e54307e8fea76d99f05b5cc..8d2bc078791ba7804482b9d511c7f4c45fceb7c9 100644 (file)
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost {
 namespace archive {
 
@@ -79,6 +84,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP
index da3234c81262e17449723284aa67a7280c9ebdb1..313052a254722c31486e17fff053670719fe4cc4 100644 (file)
@@ -47,8 +47,10 @@ namespace std{
 #include <boost/io/ios_state.hpp>
 #include <boost/scoped_ptr.hpp>
 
+#include <boost/serialization/collection_size_type.hpp>
 #include <boost/serialization/throw_exception.hpp>
 #include <boost/archive/archive_exception.hpp>
+#include <boost/archive/basic_streambuf_locale_saver.hpp>
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
 namespace boost {
@@ -70,8 +72,9 @@ public:
 
     #ifndef BOOST_NO_STD_LOCALE
     boost::scoped_ptr<std::locale> archive_locale;
-    io::basic_ios_locale_saver<
-        BOOST_DEDUCED_TYPENAME IStream::char_type, BOOST_DEDUCED_TYPENAME IStream::traits_type
+    basic_streambuf_locale_saver<
+        BOOST_DEDUCED_TYPENAME IStream::char_type, 
+        BOOST_DEDUCED_TYPENAME IStream::traits_type
     > locale_saver;
     #endif
 
index 4fd55f0694c31745e4286267bb49667ac5208651..47c3c0ecfdd17e406dbcf1eb7309007cab261b69 100644 (file)
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost {
 namespace archive {
 
@@ -129,6 +134,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_ARCHIVE_BASIC_TEXT_OARCHIVE_HPP
index ba8770959e64601807d31384287bd8b51cdcc12e..3c0c083eeb330dd4ccf23577529da817c906939d 100644 (file)
@@ -29,6 +29,7 @@
 #include <boost/config/no_tr1/cmath.hpp> // isnan
 #include <cassert>
 #include <cstddef> // size_t
+#include <boost/serialization/collection_size_type.hpp>
 
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
@@ -49,9 +50,8 @@ namespace std{
 #include <boost/io/ios_state.hpp>
 #include <boost/scoped_ptr.hpp>
 #include <boost/serialization/throw_exception.hpp>
-
 #include <boost/archive/archive_exception.hpp>
-
+#include <boost/archive/basic_streambuf_locale_saver.hpp>
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
 namespace boost {
@@ -75,8 +75,9 @@ public:
 
     #ifndef BOOST_NO_STD_LOCALE
     boost::scoped_ptr<std::locale> archive_locale;
-    io::basic_ios_locale_saver<
-        BOOST_DEDUCED_TYPENAME OStream::char_type, BOOST_DEDUCED_TYPENAME OStream::traits_type
+    basic_streambuf_locale_saver<
+        BOOST_DEDUCED_TYPENAME OStream::char_type, 
+        BOOST_DEDUCED_TYPENAME OStream::traits_type
     > locale_saver;
     #endif
 
@@ -162,7 +163,7 @@ public:
     ~basic_text_oprimitive();
 public:
     // unformatted append of one character
-    void put(int c){
+    void put(BOOST_DEDUCED_TYPENAME OStream::char_type c){
         if(os.fail())
             boost::serialization::throw_exception(
                 archive_exception(archive_exception::stream_error)
index fd3ae755896193a0aa77c0a4d02c5c6e142ddb21..5351ff353a639eae33c25c24b47c402e1eb13c93 100644 (file)
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost {
 namespace archive {
 
@@ -113,6 +118,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_ARCHIVE_BASIC_XML_IARCHIVE_HPP
index 0ba25891891b8eeaddcbfbf52d3be8abcbbb17be..154745a88ad3963f6182bc1fb64d2fb150034a43 100644 (file)
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost {
 namespace archive {
 
@@ -131,6 +136,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_ARCHIVE_BASIC_XML_OARCHIVE_HPP
index fdfc355e4a631940d2cd67c651e5ea63b96d221b..638d996729ffb134d20d9089f922ba888c2828d2 100644 (file)
 #include <boost/archive/binary_iarchive_impl.hpp>
 #include <boost/archive/detail/register_archive.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -91,4 +96,8 @@ public:
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_iarchive)
 BOOST_SERIALIZATION_USE_ARRAY_OPTIMIZATION(boost::archive::binary_iarchive)
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_ARCHIVE_BINARY_IARCHIVE_HPP
index c1d04d10e1542cf59f4af0996f0c3bec1dcaade5..32c476d64556043ea22d461fc8dde09141537526 100644 (file)
 #include <boost/archive/basic_binary_iprimitive.hpp>
 #include <boost/archive/basic_binary_iarchive.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -84,4 +89,8 @@ protected:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP
index ee5e7d8cdbea1f516cd812a0b62dd6615a1879ef..2aac14f9088e2f78f0de03b4c2e08cf3268adff4 100644 (file)
 //  See http://www.boost.org for updates, documentation, and revision history.
 
 #include <ostream>
+#include <boost/config.hpp>
 #include <boost/archive/binary_oarchive_impl.hpp>
 #include <boost/archive/detail/register_archive.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -53,4 +59,8 @@ typedef binary_oarchive naked_binary_oarchive;
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_oarchive)
 BOOST_SERIALIZATION_USE_ARRAY_OPTIMIZATION(boost::archive::binary_oarchive)
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_ARCHIVE_BINARY_OARCHIVE_HPP
index 331a8744cdf4ed5591f17c77de8bdfc5600b4f72..7ca773b601157b7196481c86d7d95ffed687cfc3 100644 (file)
 //  See http://www.boost.org for updates, documentation, and revision history.
 
 #include <ostream>
+#include <boost/config.hpp>
 #include <boost/serialization/pfto.hpp>
 #include <boost/archive/basic_binary_oprimitive.hpp>
 #include <boost/archive/basic_binary_oarchive.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -84,4 +90,8 @@ protected:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_ARCHIVE_BINARY_OARCHIVE_IMPL_HPP
index ba88aea06da5b530f0005035df982b5c142c456a..910b26156a50eb69a155a2a30055df2dde1e279d 100644 (file)
@@ -35,6 +35,11 @@ namespace std {
 } // namespace
 #endif
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost {
 namespace archive {
 
@@ -87,6 +92,9 @@ class codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t>
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
 #include <boost/archive/detail/abi_suffix.hpp> // pop pragmas
 
 #endif //BOOST_ARCHIVE_CODECVT_NULL_HPP
index 096a24be345452b4ba785172c26dd3df9f05aedd..6d2eec4a851761081834f7b5f994fd10f98b4ea9 100644 (file)
@@ -36,8 +36,8 @@ namespace detail {
 class basic_serializer;
 
 template<class Archive>
-class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) archive_serializer_map 
-{
+class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) 
+archive_serializer_map {
 public:
     static bool insert(const basic_serializer * bs);
     static void erase(const basic_serializer * bs);
index 4c9707c26dce22174f76b266648ee03226c603d4..c7961775bbbf9c90283bda04fa348b1c3a1acfc9 100644 (file)
@@ -20,6 +20,8 @@
 // #include <boost/scoped_ptr.hpp>
 
 #include <boost/config.hpp>
+#include <boost/noncopyable.hpp>
+
 #include <boost/type_traits/broken_compiler_spec.hpp>
 #include <boost/serialization/tracking_enum.hpp>
 #include <boost/archive/basic_archive.hpp>
@@ -39,7 +41,8 @@ class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer;
 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer;
 //////////////////////////////////////////////////////////////////////
 // class basic_iarchive - read serialized objects from a input stream
-class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive 
+class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive :
+    private boost::noncopyable
 {
     friend class basic_iarchive_impl;
     // hide implementation of this class to minimize header conclusion
@@ -53,9 +56,6 @@ class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive
     virtual void vload(class_id_optional_type &t) = 0;
     virtual void vload(class_name_type &t) = 0;
     virtual void vload(tracking_type &t) = 0;
-
-    virtual const basic_pointer_iserializer * 
-    find(const boost::serialization::extended_type_info & eti) const = 0;
 protected:
     basic_iarchive(unsigned int flags);
     // account for bogus gcc warning
@@ -76,11 +76,15 @@ public:
     const basic_pointer_iserializer * 
     load_pointer(
         void * & t, 
-        const basic_pointer_iserializer * bpis_ptr
+        const basic_pointer_iserializer * bpis_ptr,
+        const basic_pointer_iserializer * (*finder)(
+            const boost::serialization::extended_type_info & eti
+        )
+
     );
     // real public API starts here
     void 
-    set_library_version(unsigned int archive_library_version);
+    set_library_version(version_type archive_library_version);
     unsigned int 
     get_library_version() const;
     unsigned int
index de9654f911f7c26aec30bceced9b6abf301832ee..2f4f6d811f9134a6725f80fbc0c701c1d943957a 100644 (file)
 #include <cstdlib> // NULL
 #include <boost/config.hpp>
 
+#include <boost/archive/basic_archive.hpp>
 #include <boost/archive/detail/decl.hpp>
 #include <boost/archive/detail/basic_serializer.hpp>
 #include <boost/archive/detail/auto_link_archive.hpp>
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
-namespace boost {
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
 
+namespace boost {
 namespace serialization {
     class extended_type_info;
 } // namespace serialization
@@ -71,7 +76,7 @@ public:
     // returns true if objects should be tracked
     virtual bool tracking(const unsigned int) const = 0 ;
     // returns class version
-    virtual unsigned int version() const = 0 ;
+    virtual version_type version() const = 0 ;
     // returns true if this class is polymorphic
     virtual bool is_polymorphic() const = 0;
     virtual void destroy(/*const*/ void *address) const = 0 ;
@@ -81,6 +86,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP
index 0a1b4042a2ee48423296890206a89e161483ae82..d418afd6483dc6f39a02c7c60b0dd07a0b588856 100644 (file)
 
 //  See http://www.boost.org for updates, documentation, and revision history.
 
-#include <boost/config.hpp>
 #include <cstddef> // NULL
+#include <boost/config.hpp>
+#include <boost/noncopyable.hpp>
+
 #include <boost/type_traits/broken_compiler_spec.hpp>
 
 // can't use this - much as I'd like to as borland doesn't support it
@@ -41,7 +43,8 @@ class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer;
 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer;
 //////////////////////////////////////////////////////////////////////
 // class basic_oarchive - write serialized objects to an output stream
-class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive
+class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive :
+    private boost::noncopyable
 {
     friend class basic_oarchive_impl;
     // hide implementation of this class to minimize header conclusion
index 69a06cb9fc4d735bed7ef46374fc4e39933d425a..74af7e657762eff300e25c0392be5b66def153c4 100644 (file)
 
 #include <cstddef> // NULL
 #include <boost/config.hpp>
+#include <boost/noncopyable.hpp>
 
+#include <boost/archive/basic_archive.hpp>
 #include <boost/archive/detail/auto_link_archive.hpp>
 #include <boost/archive/detail/basic_serializer.hpp>
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
-namespace boost {
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
 
+namespace boost {
 namespace serialization {
     class extended_type_info;
 } // namespace serialization
@@ -69,7 +75,7 @@ public:
     // returns true if objects should be tracked
     virtual bool tracking(const unsigned int flags) const = 0;
     // returns class version
-    virtual unsigned int version() const = 0;
+    virtual version_type version() const = 0;
     // returns true if this class is polymorphic
     virtual bool is_polymorphic() const = 0;
 };
@@ -78,6 +84,10 @@ public:
 } // namespace serialization
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP
index 1a469382c815cfc1a53fc38eefaa00967f3167a4..d957b83e645732063356c17128406f07d660e534 100644 (file)
 
 //  See http://www.boost.org for updates, documentation, and revision history.
 #include <boost/config.hpp>
+#include <boost/noncopyable.hpp>
 #include <boost/archive/detail/auto_link_archive.hpp>
 #include <boost/archive/detail/basic_serializer.hpp>
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
-namespace boost {
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
 
+namespace boost {
 namespace serialization {
     class extended_type_info;
 } // namespace serialization
@@ -59,6 +64,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP
index 9c8d7177d73e47947c43e8b4ad9cbce1a06d330d..b0d3fb9597ca291102095ad3db0929a9f7a5d175 100644 (file)
 
 //  See http://www.boost.org for updates, documentation, and revision history.
 #include <boost/config.hpp>
+#include <boost/noncopyable.hpp>
 #include <boost/archive/detail/auto_link_archive.hpp>
 #include <boost/archive/detail/basic_serializer.hpp>
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
-namespace boost {
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
 
+namespace boost {
 namespace serialization {
     class extended_type_info;
 } // namespace serialization
@@ -35,7 +40,8 @@ class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive;
 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer;
 
 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer : 
-    public basic_serializer {
+    public basic_serializer
+{
 protected:
     explicit basic_pointer_oserializer(
         const boost::serialization::extended_type_info & type_
@@ -57,6 +63,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP
index b6beeea7dabcb07d8b2bab21d00a16479adfeda3..ab2ffe9d08cc3bd1601c5733f9eee18baab35dff 100644 (file)
 #include <boost/config.hpp>
 #include <boost/serialization/extended_type_info.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost {
 namespace archive {
 namespace detail {
@@ -67,4 +72,8 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_ARCHIVE_BASIC_SERIALIZER_HPP
index d17c5c3c8a4d52eb914cba101b16b01cf471c94c..19defcb5be2fb7dd7209c7eab96cda834f89d37c 100644 (file)
@@ -34,7 +34,8 @@ namespace detail {
 
 class basic_serializer;
 
-class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_serializer_map : public
+class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
+basic_serializer_map : public
     boost::noncopyable
 {
     struct type_info_pointer_compare
@@ -43,7 +44,10 @@ class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_serializer_map : pu
             const basic_serializer * lhs, const basic_serializer * rhs
         ) const ;
     };
-    typedef std::set<const basic_serializer *, type_info_pointer_compare> map_type;
+    typedef std::set<
+        const basic_serializer *, 
+        type_info_pointer_compare
+    > map_type;
     map_type m_map;
 public:
     bool insert(const basic_serializer * bs);
index 5a92e59ce66f2613b307e718a31352fbc6567f3f..737c12c913ef6193057385797588ff1748031585 100644 (file)
@@ -48,7 +48,7 @@ namespace detail {
 // checks for objects
 
 template<class T>
-void inline check_object_level(){
+inline void check_object_level(){
     typedef 
         BOOST_DEDUCED_TYPENAME mpl::greater_equal<
             serialization::implementation_level<T>,
@@ -58,10 +58,10 @@ void inline check_object_level(){
     // trap attempts to serialize objects marked
     // not_serializable
     BOOST_STATIC_ASSERT(typex::value);
-};
+}
 
 template<class T>
-void inline check_object_versioning(){
+inline void check_object_versioning(){
     typedef 
         BOOST_DEDUCED_TYPENAME mpl::or_<
             BOOST_DEDUCED_TYPENAME mpl::greater<
@@ -76,10 +76,10 @@ void inline check_object_versioning(){
     // trap attempts to serialize with objects that don't
     // save class information in the archive with versioning.
     BOOST_STATIC_ASSERT(typex::value);
-};
+}
 
 template<class T>
-void inline check_object_tracking(){
+inline void check_object_tracking(){
     // presume it has already been determined that
     // T is not a const
     BOOST_STATIC_ASSERT(! boost::is_const<T>::value);
@@ -96,12 +96,12 @@ void inline check_object_tracking(){
     // for motivation for this checking.
 
     BOOST_STATIC_WARNING(typex::value);
-};
+}
 
 // checks for pointers
 
 template<class T>
-void inline check_pointer_level(){
+inline void check_pointer_level(){
     // we should only invoke this once we KNOW that T
     // has been used as a pointer!!
     typedef 
@@ -146,10 +146,10 @@ void inline check_pointer_tracking(){
     // serializing an object of a type marked "track_never" through a pointer
     // could result in creating more objects than were saved!
     BOOST_STATIC_WARNING(typex::value);
-};
+}
 
 template<class T>
-void inline check_const_loading(){
+inline void check_const_loading(){
     typedef
         BOOST_DEDUCED_TYPENAME mpl::or_<
             BOOST_DEDUCED_TYPENAME boost::serialization::is_wrapper<T>,
@@ -160,7 +160,7 @@ void inline check_const_loading(){
     // cannot load data into a "const" object unless it's a
     // wrapper around some other non-const object.
     BOOST_STATIC_ASSERT(typex::value);
-};
+}
 
 } // detail
 } // archive
index 2713c2f43b1daac4a1af4c718de618a20e6d2b5e..004e131e78afb96b7c725dc45a15f68095494f55 100644 (file)
 
 //  See http://www.boost.org for updates, documentation, and revision history.
 
+#include <boost/config.hpp>
+
 #include <boost/archive/detail/basic_iarchive.hpp>
 #include <boost/archive/detail/basic_pointer_iserializer.hpp>
 #include <boost/archive/detail/interface_iarchive.hpp>
 #include <boost/archive/detail/archive_serializer_map.hpp>
 #include <boost/serialization/singleton.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost {
 namespace archive {
 namespace detail {
@@ -69,18 +76,15 @@ protected:
         basic_iarchive(flags),
         interface_iarchive<Archive>()
     {}
-public:
-    virtual const basic_pointer_iserializer * 
-    find(const boost::serialization::extended_type_info & eti) const {
-       return static_cast<const basic_pointer_iserializer *>(
-            archive_serializer_map<Archive>::find(eti)
-        );
-    }
 };
 
 } // namespace detail
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP
 
index db072c307d5e68ab5f051c7a1a16d56611a7a76f..7962063a5886484b4a8562505a309daeaa250194 100644 (file)
 
 //  See http://www.boost.org for updates, documentation, and revision history.
 
+#include <boost/config.hpp>
+
 #include <boost/archive/detail/basic_oarchive.hpp>
 #include <boost/archive/detail/interface_oarchive.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost {
 namespace archive {
 namespace detail {
@@ -73,4 +80,8 @@ protected:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP
index 7fd363d059c1363bf7a096c1c234663eb71da50a..06487521fa534e1f524405aa7bdc31ec6b9437db 100644 (file)
@@ -15,7 +15,6 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 
 //  See http://www.boost.org for updates, documentation, and revision history.
-#include <string>
 #include <cstddef> // NULL
 #include <boost/cstdint.hpp>
 #include <boost/mpl/bool.hpp>
index 6331e0ea8f159b115854b08e9957d1a22de32088..e8db7a2bc85fc71b6ecfe36714b4665124fa975d 100644 (file)
@@ -15,7 +15,6 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 
 //  See http://www.boost.org for updates, documentation, and revision history.
-#include <string>
 #include <cstddef> // NULL
 #include <boost/cstdint.hpp>
 #include <boost/mpl/bool.hpp>
index f712e6383a1f737d6a3cd8c095fb63b394f489f4..293155a542e1af0793fd32f3be6c0006c9b46aa6 100644 (file)
@@ -110,6 +110,11 @@ public:
 
 namespace detail {
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 template<class Archive, class T>
 class iserializer : public basic_iserializer
 {
@@ -144,8 +149,8 @@ public:
                 == boost::serialization::track_selectively
                 && serialized_as_pointer());
     }
-    virtual unsigned int version() const {
-        return ::boost::serialization::version<T>::value;
+    virtual version_type version() const {
+        return version_type(::boost::serialization::version<T>::value);
     }
     virtual bool is_polymorphic() const {
         return boost::is_polymorphic<T>::value;
@@ -153,6 +158,10 @@ public:
     virtual ~iserializer(){};
 };
 
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
+
 template<class Archive, class T>
 BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
     basic_iarchive & ar,
@@ -160,7 +169,7 @@ BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
     const unsigned int file_version
 ) const {
     // trap case where the program cannot handle the current version
-    if(file_version > version())
+    if(file_version > static_cast<const unsigned int>(version()))
         boost::serialization::throw_exception(
             archive::archive_exception(
                 boost::archive::archive_exception::unsupported_class_version,
@@ -177,6 +186,11 @@ BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
     );
 }
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 template<class Archive, class T>
 class pointer_iserializer :
     public basic_pointer_iserializer
@@ -198,6 +212,10 @@ protected:
     ~pointer_iserializer();
 };
 
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
+
 // note trick to be sure that operator new is using class specific
 // version if such exists. Due to Peter Dimov.
 // note: the following fails if T has no default constructor.
@@ -437,7 +455,7 @@ struct load_pointer_type {
     };
 
     template<class T>
-    static const basic_pointer_iserializer * register_type(Archive &ar, T & /*t*/){
+    static const basic_pointer_iserializer * register_type(Archive &ar, const T & /*t*/){
         // there should never be any need to load an abstract polymorphic 
         // class pointer.  Inhibiting code generation for this
         // permits abstract base classes to be used - note: exception
@@ -454,35 +472,49 @@ struct load_pointer_type {
     template<class T>
     static T * pointer_tweak(
         const boost::serialization::extended_type_info & eti,
-        void * t,
-        T &
+        void const * const t,
+        const T &
     ) {
         // tweak the pointer back to the base class
         return static_cast<T *>(
-            boost::serialization::void_upcast(
-                eti,
-                boost::serialization::singleton<
-                    BOOST_DEDUCED_TYPENAME 
-                    boost::serialization::type_info_implementation<T>::type
-                >::get_const_instance(),
-                t
+            const_cast<void *>(
+                boost::serialization::void_upcast(
+                    eti,
+                    boost::serialization::singleton<
+                        BOOST_DEDUCED_TYPENAME 
+                        boost::serialization::type_info_implementation<T>::type
+                    >::get_const_instance(),
+                    t
+                )
             )
         );
     }
 
     template<class T>
-    static void load(Archive &ar, T & t){
+    static void check_load(T & /* t */){
         check_pointer_level<T>();
         check_pointer_tracking<T>();
     }
 
+    static const basic_pointer_iserializer *
+    find(const boost::serialization::extended_type_info & type){
+        return static_cast<const basic_pointer_iserializer *>(
+            archive_serializer_map<Archive>::find(type)
+        );
+    }
+
     template<class Tptr>
     static void invoke(Archive & ar, Tptr & t){
-        load(ar, *t);
+        check_load(*t);
         const basic_pointer_iserializer * bpis_ptr = register_type(ar, *t);
         const basic_pointer_iserializer * newbpis_ptr = ar.load_pointer(
-            * reinterpret_cast<void **>(&t),
-            bpis_ptr
+            // note major hack here !!!
+            // I tried every way to convert Tptr &t (where Tptr might
+            // include const) to void * &.  This is the only way
+            // I could make it work. RR
+            (void * & )t,
+            bpis_ptr,
+            find
         );
         // if the pointer isn't that of the base class
         if(newbpis_ptr != bpis_ptr){
index cc5159e00ef4bd8307079e0275251ea1720e9cc9..009204a30e052f56073b29b045c71896d1c0177e 100644 (file)
@@ -91,6 +91,11 @@ public:
 
 namespace detail {
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 template<class Archive, class T>
 class oserializer : public basic_oserializer
 {
@@ -119,8 +124,8 @@ public:
             || (boost::serialization::tracking_level<T>::value == boost::serialization::track_selectively
                 && serialized_as_pointer());
     }
-    virtual unsigned int version() const {
-        return ::boost::serialization::version<T>::value;
+    virtual version_type version() const {
+        return version_type(::boost::serialization::version<T>::value);
     }
     virtual bool is_polymorphic() const {
         return boost::is_polymorphic<T>::value;
@@ -128,6 +133,10 @@ public:
     virtual ~oserializer(){}
 };
 
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
+
 template<class Archive, class T>
 BOOST_DLLEXPORT void oserializer<Archive, T>::save_object_data(
     basic_oarchive & ar,    
@@ -143,6 +152,11 @@ BOOST_DLLEXPORT void oserializer<Archive, T>::save_object_data(
     );
 }
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 template<class Archive, class T>
 class pointer_oserializer :
     public basic_pointer_oserializer
@@ -163,6 +177,10 @@ public:
     ~pointer_oserializer();
 };
 
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
+
 template<class Archive, class T>
 BOOST_DLLEXPORT void pointer_oserializer<Archive, T>::save_object_ptr(
     basic_oarchive & ar,
@@ -288,13 +306,13 @@ struct save_non_pointer_type {
             > > >::type typex; 
         check_object_versioning<T>();
         typex::invoke(ar, t);
-    };
+    }
     template<class T>
     static void invoke(Archive & ar, T & t){
         check_object_level<T>();
         check_object_tracking<T>();
         invoke(ar, const_cast<const T &>(t));
-    };
+    }
 };
 
 template<class Archive>
@@ -377,7 +395,7 @@ struct save_pointer_type {
                 boost::serialization::throw_exception(
                     archive_exception(
                         archive_exception::unregistered_class,
-                        true_type->get_debug_info()
+                        "derived class not registered or exported"
                     )
                 );
             }
@@ -453,7 +471,7 @@ struct save_pointer_type {
             return;
         }
         save(ar, * t);
-    };
+    }
 };
 
 template<class Archive>
index e8f624046ae9defd21ea4dcefd9a902f1aa1c310..76b005bb0fd697aa710559cba7fa7f11d644462c 100644 (file)
@@ -27,8 +27,8 @@ namespace std{
 } // namespace std
 #endif
 
-#include <boost/noncopyable.hpp>
 #include <boost/cstdint.hpp>
+#include <boost/integer_traits.hpp>
 #include <boost/archive/polymorphic_iarchive.hpp>
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
@@ -42,13 +42,17 @@ namespace detail{
 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iserializer;
 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer;
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 template<class ArchiveImplementation>
 class polymorphic_iarchive_route :
     public polymorphic_iarchive,
     // note: gcc dynamic cross cast fails if the the derivation below is
     // not public.  I think this is a mistake.
-    public /*protected*/ ArchiveImplementation,
-    private boost::noncopyable
+    public /*protected*/ ArchiveImplementation
 {
 private:
     // these are used by the serialization library.
@@ -60,11 +64,14 @@ private:
     }
     virtual const basic_pointer_iserializer * load_pointer(
         void * & t,
-        const basic_pointer_iserializer * bpis_ptr
+        const basic_pointer_iserializer * bpis_ptr,
+        const basic_pointer_iserializer * (*finder)(
+            const boost::serialization::extended_type_info & type
+        )
     ){
-        return ArchiveImplementation::load_pointer(t, bpis_ptr);
+        return ArchiveImplementation::load_pointer(t, bpis_ptr, finder);
     }
-    virtual void set_library_version(unsigned int archive_library_version){
+    virtual void set_library_version(version_type archive_library_version){
         ArchiveImplementation::set_library_version(archive_library_version);
     }
     virtual unsigned int get_library_version() const{
@@ -123,11 +130,18 @@ private:
     virtual void load(unsigned long & t){
         ArchiveImplementation::load(t);
     }
-    #if !defined(BOOST_NO_INTRINSIC_INT64_T)
-    virtual void load(boost::int64_t & t){
+    #if defined(BOOST_HAS_LONG_LONG)
+    virtual void load(boost::long_long_type & t){
+        ArchiveImplementation::load(t);
+    }
+    virtual void load(boost::ulong_long_type & t){
         ArchiveImplementation::load(t);
     }
-    virtual void load(boost::uint64_t & t){
+    #elif defined(BOOST_HAS_MS_INT64)
+    virtual void load(__int64 & t){
+        ArchiveImplementation::load(t);
+    }
+    virtual void load(unsigned __int64 & t){
         ArchiveImplementation::load(t);
     }
     #endif
@@ -188,6 +202,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_DISPATCH_HPP
index e043bb59ffe6b25ee5da830f40d0cf369d47ff48..59795096c05356639cd6f79980f09e00c31f266f 100644 (file)
@@ -18,8 +18,6 @@
 
 #include <string>
 #include <ostream>
-#include <boost/noncopyable.hpp>
-#include <boost/cstdint.hpp>
 #include <cstddef> // size_t
 
 #include <boost/config.hpp>
@@ -29,6 +27,8 @@ namespace std{
 } // namespace std
 #endif
 
+#include <boost/cstdint.hpp>
+#include <boost/integer_traits.hpp>
 #include <boost/archive/polymorphic_oarchive.hpp>
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
@@ -42,13 +42,17 @@ namespace detail{
 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer;
 class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer;
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 template<class ArchiveImplementation>
 class polymorphic_oarchive_route :
     public polymorphic_oarchive,
     // note: gcc dynamic cross cast fails if the the derivation below is
     // not public.  I think this is a mistake.
-    public /*protected*/ ArchiveImplementation,
-    private boost::noncopyable
+    public /*protected*/ ArchiveImplementation
 {
 private:
     // these are used by the serialization library.
@@ -105,7 +109,14 @@ private:
     virtual void save(const unsigned long t){
         ArchiveImplementation::save(t);
     }
-    #if !defined(BOOST_NO_INTRINSIC_INT64_T)
+    #if defined(BOOST_HAS_LONG_LONG)
+    virtual void save(const boost::long_long_type t){
+        ArchiveImplementation::save(t);
+    }
+    virtual void save(const boost::ulong_long_type t){
+        ArchiveImplementation::save(t);
+    }
+    #elif defined(BOOST_HAS_MS_INT64)
     virtual void save(const boost::int64_t t){
         ArchiveImplementation::save(t);
     }
@@ -179,6 +190,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_DISPATCH_HPP
index 87fedcbe865a1089905ed2d734c8978cbd9b683a..e31ae46c058c6a7b49aab857efaeb80a32659342 100644 (file)
@@ -54,12 +54,12 @@ void instantiate_ptr_serialization(Serializable*, counter<0>) {}
 
 #define BOOST_SERIALIZATION_REGISTER_ARCHIVE(Archive)                     \
 namespace boost { namespace archive { namespace detail {                  \
-    get_counter<Archive>::next adjust_counter(get_counter<Archive>::type);\
+    get_counter<Archive >::next adjust_counter(get_counter<Archive >::type);\
     template<class Serializable>                                          \
     void instantiate_ptr_serialization(Serializable* s,                   \
-        get_counter<Archive>::type) {                                     \
+        get_counter<Archive >::type) {                                    \
         ptr_serialization_support<Archive, Serializable> x;               \
-        instantiate_ptr_serialization(s, get_counter<Archive>::prior());  \
+        instantiate_ptr_serialization(s, get_counter<Archive >::prior()); \
     }\
 }}}
 
index ec580b541f3849e3256d009650c6f703ee979cf5..f8e6ab5169d3c974c7b8078081f2257c2a12166f 100644 (file)
@@ -21,12 +21,21 @@ namespace boost {
 namespace archive {
 namespace detail {
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace { // anon
     template<class Archive>
     class map : public basic_serializer_map 
     {};
 }
 
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
+
 template<class Archive>
 BOOST_ARCHIVE_OR_WARCHIVE_DECL(bool)
 archive_serializer_map<Archive>::insert(const basic_serializer * bs){
index 1b25c227f9bde127422ea76258ab6ee4e492ebda..9d398bea637bd9479ed1ac037ac747e91886b6da 100644 (file)
@@ -20,7 +20,6 @@ namespace std{
 } // namespace std
 #endif
 
-
 #ifndef BOOST_NO_CWCHAR
 #include <cwchar>
 #ifdef BOOST_NO_STDC_NAMESPACE
@@ -30,9 +29,6 @@ namespace std{ using ::wcslen; }
 
 #include <boost/detail/workaround.hpp>
 
-#include <boost/serialization/throw_exception.hpp>
-#include <boost/scoped_ptr.hpp>
-#include <boost/archive/archive_exception.hpp>
 #include <boost/archive/add_facet.hpp>
 #include <boost/archive/codecvt_null.hpp>
 
index 6d9b8c74f562ea99396b69c131278994c02ee9b2..2ea7257af27d4eef4874a7c2dfdcb5a8ecb09e14 100644 (file)
@@ -64,11 +64,11 @@ basic_text_iarchive<Archive>::init(void){
     #if ! BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
     detail::
     #endif
-    basic_iarchive::set_library_version(input_library_version.t);
+    basic_iarchive::set_library_version(input_library_version);
     #endif
 
     // extra little .t is to get around borland quirk
-    if(BOOST_ARCHIVE_VERSION() < input_library_version.t)
+    if(BOOST_ARCHIVE_VERSION() < input_library_version)
         boost::serialization::throw_exception(
             archive_exception(archive_exception::unsupported_version)
         );
index c64502dc78ae56572a3473a97f7e0ccdc7cab126..b91432bf996f6d7b533fb6e5391c909a655c7e82 100644 (file)
@@ -39,13 +39,13 @@ namespace {
 
     template<>
     bool is_whitespace(char t){
-        return std::isspace(t);
+        return 0 != std::isspace(t);
     }
 
     #ifndef BOOST_NO_CWCHAR
     template<>
     bool is_whitespace(wchar_t t){
-        return std::iswspace(t);
+        return 0 != std::iswspace(t);
     }
     #endif
 }
@@ -104,11 +104,11 @@ basic_text_iprimitive<IStream>::load_binary(
     
     iterators::istream_iterator<CharType> i;
     for(;;){
-        CharType c;
-        c = is.get();
+        BOOST_DEDUCED_TYPENAME IStream::int_type r;
+        r = is.get();
         if(is.eof())
             break;
-        if(is_whitespace(c))
+        if(is_whitespace(static_cast<CharType>(r)))
             break;
     }
 }
@@ -124,7 +124,7 @@ basic_text_iprimitive<IStream>::basic_text_iprimitive(
     flags_saver(is_),
     precision_saver(is_),
     archive_locale(NULL),
-    locale_saver(is_)
+    locale_saver(* is_.rdbuf())
 {
     if(! no_codecvt){
         archive_locale.reset(
index 702663ad81ace56e00a3ff18d0eb1864700cca92..e27bd37c6186cc3883e450160ceb97d50e5c0460 100644 (file)
@@ -84,7 +84,7 @@ basic_text_oprimitive<OStream>::basic_text_oprimitive(
     flags_saver(os_),
     precision_saver(os_),
     archive_locale(NULL),
-    locale_saver(os_)
+    locale_saver(* os_.rdbuf())
 {
     if(! no_codecvt){
         archive_locale.reset(
index 21d006e7f0127a8bc3da7dd057a67751985177de..daa3e594b33f7901b46c57bd06e0dc8f947598af 100644 (file)
@@ -156,7 +156,9 @@ template<class Archive>
 BOOST_ARCHIVE_DECL(void)
 xml_iarchive_impl<Archive>::init(){
     gimpl->init(is);
-    this->set_library_version(gimpl->rv.version);
+    this->set_library_version(
+        version_type(gimpl->rv.version)
+    );
 }
 
 template<class Archive>
index 3df68d91407db75782f6cdc14a1e79e91007982e..c600eb815c731e3c9c2cd87cb6f8507661a4a401 100644 (file)
@@ -146,7 +146,9 @@ template<class Archive>
 BOOST_WARCHIVE_DECL(void)
 xml_wiarchive_impl<Archive>::init(){
     gimpl->init(is);
-    this->set_library_version(gimpl->rv.version);
+    this->set_library_version(
+        version_type(gimpl->rv.version)
+    );
 }
 
 template<class Archive>
index 3fe64fa49fab308d60a9e5bfdf5cbf0cc94df23d..b11d1a6722d2d06f93e08b9d573a97384ee53fe8 100644 (file)
@@ -97,7 +97,7 @@ class escape :
     const base_value_type *m_bnext;
     const base_value_type *m_bend;
     bool m_full;
-    BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type m_current_value;
+    base_value_type m_current_value;
 public:
     escape(Base base) : 
         super_t(base),
index ac3568aa8739c32b03d4da9fbe8a9c6fcf9c7891..1df612dc8d14cd562a2efd980ee6e694e7600127 100644 (file)
@@ -61,7 +61,7 @@ class istream_iterator :
 
     void increment(){
         if(NULL != m_istream){
-            m_current_value = m_istream->get();
+            m_current_value = static_cast<Elem>(m_istream->get());
             if(! m_istream->good()){
                 const_cast<this_t *>(this)->m_istream = NULL;
             }
index e709138181e9898769f0a264c3c96f54ca05b4af..f437c388e7f286f349ad6d916cb567aa15146ca7 100644 (file)
@@ -50,13 +50,11 @@ class unescape
     > super_t;
 
     typedef unescape<Derived, Base> this_t;
-    typedef BOOST_DEDUCED_TYPENAME super_t::reference reference_type;
 public:
-    // gcc 3.4.1 - linux required that this be public
-    typedef BOOST_DEDUCED_TYPENAME super_t::value_type value_type;
+    typedef BOOST_DEDUCED_TYPENAME this_t::value_type value_type;
+    typedef BOOST_DEDUCED_TYPENAME this_t::reference reference;
 private:
-
-    reference_type dereference_impl() {
+    value_type dereference_impl() {
         if(! m_full){
             m_current_value = static_cast<Derived *>(this)->drain();
             m_full = true;
@@ -64,11 +62,10 @@ private:
         return m_current_value;
     }
 
-    reference_type dereference() const {
+    reference dereference() const {
         return const_cast<this_t *>(this)->dereference_impl();
     }
 
-    // value_type is const char - can't be const fix later
     value_type m_current_value;
     bool m_full;
 
index 4272c9786e98384e906afe882b27f4c7260f9d66..25b7edf4603f3964b265fb94467809c1222d443f 100644 (file)
@@ -19,6 +19,7 @@
 #include <cassert>
 
 #include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME
+
 #include <boost/serialization/throw_exception.hpp>
 #include <boost/serialization/pfto.hpp>
 
@@ -44,8 +45,15 @@ class xml_unescape
         return unescape<xml_unescape<Base>, Base>::dereference();
     }
 public:
+    // workaround msvc 7.1 ICU crash
+    #if defined(BOOST_MSVC)
+        typedef int value_type;
+    #else
+        typedef BOOST_DEDUCED_TYPENAME this_t::value_type value_type;
+    #endif
+
     void drain_residue(const char *literal);
-    int drain();
+    value_type drain();
 
     template<class T>
     xml_unescape(BOOST_PFTO_WRAPPER(T) start) : 
@@ -75,8 +83,10 @@ void xml_unescape<Base>::drain_residue(const char * literal){
 // iterator refenence which would make subsequent iterator comparisons
 // incorrect and thereby break the composiblity of iterators.
 template<class Base>
-int xml_unescape<Base>::drain(){
-    int retval = * this->base_reference();
+BOOST_DEDUCED_TYPENAME xml_unescape<Base>::value_type 
+//int 
+xml_unescape<Base>::drain(){
+    value_type retval = * this->base_reference();
     if('&' != retval){
         return retval;
     }
index c14ad5afd0056b98cbad5af28e0705047df6c7b0..ce7e3b0609e0f2d44d79fecfd90c3ea0a0f7a6ad 100644 (file)
 #include <boost/archive/binary_iarchive.hpp>
 #include <boost/archive/detail/polymorphic_iarchive_route.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -36,6 +41,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 // required by export
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(
     boost::archive::polymorphic_binary_iarchive
index 8506062160832c11f9cdd80774e0d1019946ddec..a2777509a52bd023a3f9558f5d920896b5eab642 100644 (file)
@@ -38,26 +38,6 @@ namespace std{
 #include <boost/archive/detail/decl.hpp>
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
-// determine if its necessary to handle (u)int64_t specifically
-// i.e. that its not a synonym for (unsigned) long
-// if there is no 64 bit int or if its the same as a long
-// we shouldn't define separate functions for int64 data types.
-#if defined(BOOST_NO_INT64_T)
-    #define BOOST_NO_INTRINSIC_INT64_T
-#else 
-    #if defined(ULLONG_MAX)  
-        #if(ULONG_MAX == 18446744073709551615ul) // 2**64 - 1  
-            #define BOOST_NO_INTRINSIC_INT64_T  
-        #endif  
-    #elif defined(ULONG_MAX)  
-        #if(ULONG_MAX != 0xffffffff && ULONG_MAX == 18446744073709551615ul) // 2**64 - 1  
-            #define BOOST_NO_INTRINSIC_INT64_T  
-        #endif  
-    #else   
-        #define BOOST_NO_INTRINSIC_INT64_T  
-    #endif  
-#endif
-
 namespace boost {
 template<class T>
 class shared_ptr;
@@ -99,10 +79,14 @@ public:
     virtual void load(long & t) = 0;
     virtual void load(unsigned long & t) = 0;
 
-    #if !defined(BOOST_NO_INTRINSIC_INT64_T)
-    virtual void load(boost::int64_t & t) = 0;
-    virtual void load(boost::uint64_t & t) = 0;
+    #if defined(BOOST_HAS_LONG_LONG)
+    virtual void load(boost::long_long_type & t) = 0;
+    virtual void load(boost::ulong_long_type & t) = 0;
+    #elif defined(BOOST_HAS_MS_INT64)
+    virtual void load(__int64 & t) = 0;
+    virtual void load(unsigned __int64 & t) = 0;
     #endif
+
     virtual void load(float & t) = 0;
     virtual void load(double & t) = 0;
 
@@ -141,7 +125,7 @@ protected:
     virtual ~polymorphic_iarchive_impl(){};
 public:
     // utility function implemented by all legal archives
-    virtual void set_library_version(unsigned int archive_library_version) = 0;
+    virtual void set_library_version(version_type archive_library_version) = 0;
     virtual unsigned int get_library_version() const = 0;
     virtual unsigned int get_flags() const = 0;
     virtual void delete_created_pointers() = 0;
@@ -159,7 +143,10 @@ public:
     ) = 0;
     virtual const detail::basic_pointer_iserializer * load_pointer(
         void * & t,
-        const detail::basic_pointer_iserializer * bpis_ptr
+        const detail::basic_pointer_iserializer * bpis_ptr,
+        const detail::basic_pointer_iserializer * (*finder)(
+            const boost::serialization::extended_type_info & type
+        )
     ) = 0;
 };
 
index 19aedf5f44623ad0cf32f2add45bf1b0f7beb4a0..69f7a95cede8f97b0a6124dc7f67590217b36842 100644 (file)
@@ -37,26 +37,6 @@ namespace std{
 #include <boost/archive/detail/decl.hpp>
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
-// determine if its necessary to handle (u)int64_t specifically
-// i.e. that its not a synonym for (unsigned) long
-// if there is no 64 bit int or if its the same as a long
-// we shouldn't define separate functions for int64 data types.
-#if defined(BOOST_NO_INT64_T)
-    #define BOOST_NO_INTRINSIC_INT64_T
-#else 
-    #if defined(ULLONG_MAX)  
-        #if(ULONG_MAX == 18446744073709551615ul) // 2**64 - 1  
-            #define BOOST_NO_INTRINSIC_INT64_T  
-        #endif  
-    #elif defined(ULONG_MAX)  
-        #if(ULONG_MAX != 0xffffffff && ULONG_MAX == 18446744073709551615ul) // 2**64 - 1  
-            #define BOOST_NO_INTRINSIC_INT64_T  
-        #endif  
-    #else   
-        #define BOOST_NO_INTRINSIC_INT64_T  
-    #endif  
-#endif
-
 namespace boost {
 template<class T>
 class shared_ptr;
@@ -97,10 +77,15 @@ public:
     virtual void save(const unsigned int t) = 0;
     virtual void save(const long t) = 0;
     virtual void save(const unsigned long t) = 0;
-    #if !defined(BOOST_NO_INTRINSIC_INT64_T)
-    virtual void save(const boost::int64_t t) = 0;
-    virtual void save(const boost::uint64_t t) = 0;
+
+    #if defined(BOOST_HAS_LONG_LONG)
+    virtual void save(const boost::long_long_type t) = 0;
+    virtual void save(const boost::ulong_long_type t) = 0;
+    #elif defined(BOOST_HAS_MS_INT64)
+    virtual void save(const __int64 t) = 0;
+    virtual void save(const unsigned __int64 t) = 0;
     #endif
+
     virtual void save(const float t) = 0;
     virtual void save(const double t) = 0;
 
index 9dbc6c471dfc072980a81aa8e12012759db30d47..931a9287c7496a6c55f8a3fa51ca2bc972b7caed 100644 (file)
 #include <boost/archive/text_iarchive.hpp>
 #include <boost/archive/detail/polymorphic_iarchive_route.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -36,6 +41,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 // required by export
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(
     boost::archive::polymorphic_text_iarchive
index a04283ac3b2ec3a436cae6db0dc5e25e055bf452..4df3d473517f660461a34ecf5391381e748c0a9f 100644 (file)
 #include <boost/archive/text_wiarchive.hpp>
 #include <boost/archive/detail/polymorphic_iarchive_route.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -40,6 +45,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 // required by export
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(
     boost::archive::polymorphic_text_wiarchive
index bcd7254c725f094fd8c1063a9f3c6872216a08be..feb0b99bc2ab32153425142ff25de7c2cd76955d 100644 (file)
 #include <boost/archive/xml_iarchive.hpp>
 #include <boost/archive/detail/polymorphic_iarchive_route.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -36,6 +41,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 // required by export
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(
     boost::archive::polymorphic_xml_iarchive
index b54c654437a720a2660b2b9d56795a7b534163f6..a1e252aa2fae9d5b1940a5ffb27d68a519443374 100644 (file)
@@ -7,7 +7,7 @@
 #endif
 
 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// shared_ptr_helper.hpp: serialization for boost shared pointer
+// shared_ptr_helper.hpp: serialization for boost shared pointern
 
 // (C) Copyright 2004-2009 Robert Ramey, Martin Ecker and Takatoshi Kondo
 // Use, modification and distribution is subject to the Boost Software
@@ -16,7 +16,7 @@
 
 //  See http://www.boost.org for updates, documentation, and revision history.
 
-#include <map>
+#include <set>
 #include <list>
 #include <utility>
 #include <cstddef> // NULL
@@ -32,7 +32,7 @@
 #include <boost/archive/archive_exception.hpp>
 #include <boost/archive/detail/decl.hpp>
 
-#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
+#include <boost/archive/detail/abi_prefix.hpp> // must be the last headern
 
 namespace boost_132 {
     template<class T> class shared_ptr;
@@ -55,9 +55,17 @@ namespace detail {
 // a common class for holding various types of shared pointers
 
 class shared_ptr_helper {
-    typedef std::map<
-        void *,
-        boost::shared_ptr<const void>
+    struct collection_type_compare {
+        bool operator()(
+            const shared_ptr<const void> &lhs,
+            const shared_ptr<const void> &rhs
+        )const{
+            return lhs.get() < rhs.get();
+        }
+    };
+    typedef std::set<
+        boost::shared_ptr<const void>,
+        collection_type_compare
     > collection_type;
     typedef collection_type::const_iterator iterator_type;
     // list of shared_pointers create accessable by raw pointer. This
@@ -71,6 +79,16 @@ class shared_ptr_helper {
         void operator()(void const *) const {}
     };
 
+    struct void_deleter {
+        const boost::serialization::extended_type_info * m_eti;
+        void_deleter(const boost::serialization::extended_type_info *eti) :
+            m_eti(eti)
+        {}
+        void operator()(void *vp) const {
+            m_eti->destroy(vp);
+        }
+    };
+
 #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
 public:
 #else
@@ -91,24 +109,26 @@ public:
     // new system which is disjoint from this set.  This is implemented
     // by a change in load_construct_data below.  It makes this file suitable
     // only for loading pointers into a 1.33 or later boost system.
-    std::list<boost_132::shared_ptr<void> > * m_pointers_132;
+    std::list<boost_132::shared_ptr<const void> > * m_pointers_132;
 //  #endif
 
-    typedef std::pair<const iterator_type, void *> result_type;
-
     // returns pointer to object and an indicator whether this is a
     // new entry (true) or a previous one (false)
-    BOOST_ARCHIVE_DECL(result_type) get_od(
-            void * od,
-            const boost::serialization::extended_type_info * true_type, 
-            const boost::serialization::extended_type_info * this_type
+    BOOST_ARCHIVE_DECL(shared_ptr<void>) 
+    get_od(
+        const void * od,
+        const boost::serialization::extended_type_info * true_type, 
+        const boost::serialization::extended_type_info * this_type
     );
 
+    BOOST_ARCHIVE_DECL(void)
+    append(const boost::shared_ptr<const void> &);
+
     template<class T>
     struct non_polymorphic {
         static const boost::serialization::extended_type_info * 
         get_object_identifier(T & t){
-            return boost::serialization::singleton<
+            return boost::serialization::singleton<
                 BOOST_DEDUCED_TYPENAME 
                 boost::serialization::type_info_implementation<T>::type
             >::get_const_instance();
@@ -136,7 +156,7 @@ public:
                     ::get_const_instance();
 
         // get pointer to the most derived object.  This is effectively
-        // the object identifer
+        // the object identifern
         typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
             is_polymorphic<T>,
             mpl::identity<polymorphic<T> >,
@@ -146,7 +166,7 @@ public:
         const boost::serialization::extended_type_info * true_type
             = type::get_object_identifier(*t);
 
-        // note:if this exception is thrown, be sure that derived pointer
+        // note:if this exception is thrown, be sure that derived pointern
         // is either registered or exported.
         if(NULL == true_type)
             boost::serialization::throw_exception(
@@ -155,21 +175,33 @@ public:
                     this_type->get_debug_info()
                 )
             );
-        result_type r =
+        shared_ptr<void> r =
             get_od(
-                t
+                static_cast<const void *>(t)
                 true_type,
                 this_type
             );
-        s = shared_ptr<T>(
-            r.first->second,
-            static_cast<T *>(r.second)
-        );
+        if(!r){
+            s.reset(t);
+            const void * od = void_downcast(
+                *true_type,
+                *this_type,
+                static_cast<const void *>(t)
+            );
+            shared_ptr<const void> sp(s, od);
+            append(sp);
+        }
+        else{
+            s = shared_ptr<T>(
+                r,
+                static_cast<T *>(r.get())
+            );
+        }
     }
 
 //  #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP
     BOOST_ARCHIVE_DECL(void)
-    append(const boost_132::shared_ptr<void> & t);
+    append(const boost_132::shared_ptr<const void> & t);
 //  #endif
 public:
     BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY())
index 3b1a99d1476a1d60d2b4a0cfa7cf7d2ad30bc582..1a6b75771848b3eab78466879675000f8cea47a5 100644 (file)
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -94,6 +99,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 // note special treatment of shared_ptr. This type needs a special
@@ -102,6 +111,11 @@ public:
 // special esteem in the boost library - we included it here by default.
 #include <boost/archive/shared_ptr_helper.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -123,4 +137,8 @@ public:
 // required by export
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_iarchive)
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_ARCHIVE_TEXT_IARCHIVE_HPP
index 5268752ec01b012e8030f3d9325caadfd79d19d1..a01f29bbf19ba6a8635cd8b1b77b30f6f117f762 100644 (file)
@@ -33,6 +33,11 @@ namespace std{
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -82,7 +87,6 @@ class text_oarchive :
     public text_oarchive_impl<text_oarchive>
 {
 public:
-     
     text_oarchive(std::ostream & os_, unsigned int flags = 0) :
         // note: added _ to suppress useless gcc warning
         text_oarchive_impl<text_oarchive>(os_, flags)
@@ -98,6 +102,10 @@ typedef text_oarchive naked_text_oarchive;
 // required by export
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_oarchive)
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_ARCHIVE_TEXT_OARCHIVE_HPP
index 82d9a71a4c7995ada576e0b1d03203180efa3644..d5d7171471329d68fa9021523e2325f523dc0b7a 100644 (file)
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -91,6 +96,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 // note special treatment of shared_ptr. This type needs a special
@@ -99,6 +108,11 @@ public:
 // special esteem in the boost library - we included it here by default.
 #include <boost/archive/shared_ptr_helper.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -119,5 +133,9 @@ public:
 // required by export
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_wiarchive)
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_NO_STD_WSTREAMBUF
 #endif // BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP
index 79d374216e818602b3475815eca863b2c10c2277..ff9b4c8854e8be917b8035fe60aec1dfba1b8ea5 100644 (file)
@@ -38,6 +38,11 @@ namespace std{
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -83,7 +88,7 @@ protected:
     }
 public:
     void save_binary(const void *address, std::size_t count){
-        put(L'\n');
+        put(static_cast<wchar_t>('\n'));
         this->end_preamble();
         #if ! defined(__MWERKS__)
         this->basic_text_oprimitive<std::wostream>::save_binary(
@@ -93,7 +98,7 @@ public:
             address, 
             count
         );
-        put(L'\n');
+        put(static_cast<wchar_t>('\n'));
         this->delimiter = this->none;
     }
 
@@ -123,6 +128,10 @@ typedef text_woarchive naked_text_woarchive;
 // required by export
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_woarchive)
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_NO_STD_WSTREAMBUF
index a3bc9f5587f6178b14c751a13419e1f8e78c54c1..c697e849ce61d4a388baaf471295aadd70b99682 100644 (file)
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -102,6 +107,10 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 // note special treatment of shared_ptr. This type needs a special
@@ -110,6 +119,11 @@ public:
 // special esteem in the boost library - we included it here by default.
 #include <boost/archive/shared_ptr_helper.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -130,4 +144,8 @@ public:
 // required by export
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_iarchive)
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_ARCHIVE_XML_IARCHIVE_HPP
index 790b7398a823858980722ac28ef623c65041253f..3d9f20db4b56a10ca5a49fb7db3744f7c8032c77 100644 (file)
@@ -33,6 +33,11 @@ namespace std{
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost {
 namespace archive {
 
@@ -110,6 +115,10 @@ typedef xml_oarchive naked_xml_oarchive;
 // required by export
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_oarchive)
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_ARCHIVE_XML_OARCHIVE_HPP
index 36757412412d66d8aa28f2b77a67a3fd00ec7ccd..0e2ee29d668c0d6bc199f8b17ad4a89a66f7789c 100644 (file)
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -106,6 +111,11 @@ public:
 } // namespace archive
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 // note special treatment of shared_ptr. This type needs a special
@@ -114,6 +124,11 @@ public:
 // special esteem in the boost library - we included it here by default.
 #include <boost/archive/shared_ptr_helper.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace archive {
 
@@ -134,5 +149,9 @@ public:
 // required by export
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_wiarchive)
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_NO_STD_WSTREAMBUF
 #endif // BOOST_ARCHIVE_XML_WIARCHIVE_HPP
index e396143c9e74f8318197625e4d66061ca8964250..fdcf8c72bbe63c0027c92c821e41c6a688ead5d7 100644 (file)
@@ -37,6 +37,11 @@ namespace std{
 
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost {
 namespace archive {
 
@@ -124,6 +129,10 @@ typedef xml_woarchive naked_xml_woarchive;
 // required by export
 BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_woarchive)
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_NO_STD_WSTREAMBUF
index 8ef73c42508c1d465bf31d0e40bb6fc68dfad200..649646991ba57fd3b568fa0762f9b38567570059 100644 (file)
  * accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
+ * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group.
+ *             See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168
+ *             Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow)
+ * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow)
  * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis)
  * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.
  * 05 Aug 2001 - minor update (Nico Josuttis)
 #ifndef BOOST_ARRAY_HPP
 #define BOOST_ARRAY_HPP
 
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)  
+# pragma warning(push)  
+# pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe
+# pragma warning(disable:4510) // boost::array<T,N>' : default constructor could not be generated 
+# pragma warning(disable:4610) // warning C4610: class 'boost::array<T,N>' can never be instantiated - user defined constructor required 
+#endif
+
 #include <cstddef>
 #include <stdexcept>
 #include <boost/assert.hpp>
@@ -71,6 +84,11 @@ namespace boost {
                                       reference, iterator, reference> > reverse_iterator;
         typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
                                       const_reference, iterator, reference> > const_reverse_iterator;
+#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) 
+        typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, 
+              value_type, reference, iterator, difference_type> reverse_iterator; 
+        typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
+              value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
 #else
         // workaround for broken reverse_iterator implementations
         typedef std::reverse_iterator<iterator,T> reverse_iterator;
@@ -151,7 +169,8 @@ namespace boost {
         }
 
         // assign one value to all elements
-        void assign (const T& value)
+        void assign (const T& value) { fill ( value ); }       // A synonym for fill
+        void fill   (const T& value)
         {
             std::fill_n(begin(),size(),value);
         }
@@ -159,7 +178,8 @@ namespace boost {
         // check range (may be private because it is static)
         static void rangecheck (size_type i) {
             if (i >= size()) {
-                throw std::out_of_range("array<>: index out of range");
+                std::out_of_range e("array<>: index out of range");
+                boost::throw_exception(e);
             }
         }
 
@@ -195,6 +215,11 @@ namespace boost {
                                       reference, iterator, reference> > reverse_iterator;
         typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
                                       const_reference, iterator, reference> > const_reverse_iterator;
+#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) 
+        typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, 
+              value_type, reference, iterator, difference_type> reverse_iterator; 
+        typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
+              value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
 #else
         // workaround for broken reverse_iterator implementations
         typedef std::reverse_iterator<iterator,T> reverse_iterator;
@@ -269,12 +294,14 @@ namespace boost {
         }
 
         // assign one value to all elements
-        void assign (const T& ) {   }
-
+        void assign (const T& value) { fill ( value ); }
+               void fill   (const T& ) {}
+               
         // check range (may be private because it is static)
         static reference failed_rangecheck () {
                 std::out_of_range e("attempt to access element of an empty array");
                 boost::throw_exception(e);
+#if defined(BOOST_NO_EXCEPTIONS) || !defined(BOOST_MSVC)
                 //
                 // We need to return something here to keep
                 // some compilers happy: however we will never
@@ -282,6 +309,7 @@ namespace boost {
                 //
                 static T placeholder;
                 return placeholder;
+#endif
             }
     };
 #endif
@@ -320,4 +348,9 @@ namespace boost {
 
 } /* namespace boost */
 
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)  
+# pragma warning(pop)  
+#endif 
+
 #endif /*BOOST_ARRAY_HPP*/
index 5d8b43b299fe1a56c9f67f645099d65c561428d3..f94e0d657b2720ef34b0a4c1060ee1b423db1f26 100644 (file)
@@ -2,7 +2,7 @@
 // asio.hpp
 // ~~~~~~~~
 //
-// Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // 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)
index 1e5c9e032490ed8b2ed2ff3469fcd7053e48cd10..a63d2a026b90a009aaf62cc8bb26a962aa4e1e08 100644 (file)
@@ -207,6 +207,13 @@ public:
     }
 };
 
+#ifdef BOOST_MSVC
+// MSVC is bright enough to realise that the parameter rhs 
+// in operator==may be unused for some template argument types:
+#pragma warning(push)
+#pragma warning(disable:4100)
+#endif
+
 template< class A1 > class list1: private storage1< A1 >
 {
 private:
@@ -846,6 +853,10 @@ public:
     }
 };
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 // bind_t
 
 #ifndef BOOST_NO_VOID_RETURNS
@@ -1629,7 +1640,7 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
 // data member pointers
 
 #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \
-    || ( defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, <= 0x610 ) )
+    || ( defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x620 ) ) )
 
 template<class R, class T, class A1>
 _bi::bind_t< R, _mfi::dm<R, T>, typename _bi::list_av_1<A1>::type >
@@ -1654,7 +1665,14 @@ template< class M, class T > struct add_cref< M T::*, 0 >
 
 template< class M, class T > struct add_cref< M T::*, 1 >
 {
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4180)
+#endif
     typedef M const & type;
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
 };
 
 template< class R, class T > struct add_cref< R (T::*) (), 1 >
index 1db0713b772fbf9104b027f5eae9271b72c4831b..b26d585dbc8ca1e84d5d711400e9e8b9a854413c 100644 (file)
@@ -51,14 +51,16 @@ public:
 
     template<class U> R operator()(U & u) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p);
     }
 
 #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
 
     template<class U> R operator()(U const & u) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p);
     }
 
 #endif
@@ -109,7 +111,8 @@ public:
 
     template<class U> R operator()(U const & u) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p);
     }
 
     R operator()(T const & t) const
@@ -164,14 +167,16 @@ public:
 
     template<class U> R operator()(U & u, A1 a1) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1);
     }
 
 #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
 
     template<class U> R operator()(U const & u, A1 a1) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1);
     }
 
 #endif
@@ -223,7 +228,8 @@ public:
 
     template<class U> R operator()(U const & u, A1 a1) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1);
     }
 
     R operator()(T const & t, A1 a1) const
@@ -276,14 +282,16 @@ public:
 
     template<class U> R operator()(U & u, A1 a1, A2 a2) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2);
     }
 
 #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2);
     }
 
 #endif
@@ -333,7 +341,8 @@ public:
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2);
     }
 
     R operator()(T const & t, A1 a1, A2 a2) const
@@ -386,14 +395,16 @@ public:
 
     template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3);
     }
 
 #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3);
     }
 
 #endif
@@ -443,7 +454,8 @@ public:
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3);
     }
 
     R operator()(T const & t, A1 a1, A2 a2, A3 a3) const
@@ -496,14 +508,16 @@ public:
 
     template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4);
     }
 
 #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4);
     }
 
 #endif
@@ -553,7 +567,8 @@ public:
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4);
     }
 
     R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const
@@ -606,14 +621,16 @@ public:
 
     template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5);
     }
 
 #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5);
     }
 
 #endif
@@ -663,7 +680,8 @@ public:
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5);
     }
 
     R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const
@@ -716,14 +734,16 @@ public:
 
     template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6);
     }
 
 #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6);
     }
 
 #endif
@@ -773,7 +793,8 @@ public:
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6);
     }
 
     R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const
@@ -826,14 +847,16 @@ public:
 
     template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6, a7);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7);
     }
 
 #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6, a7);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7);
     }
 
 #endif
@@ -883,7 +906,8 @@ public:
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6, a7);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7);
     }
 
     R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const
@@ -936,14 +960,16 @@ public:
 
     template<class U> R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6, a7, a8);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8);
     }
 
 #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6, a7, a8);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8);
     }
 
 #endif
@@ -998,7 +1024,8 @@ public:
 
     template<class U> R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
     {
-        BOOST_MEM_FN_RETURN call(u, &u, a1, a2, a3, a4, a5, a6, a7, a8);
+        U const * p = 0;
+        BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8);
     }
 
     R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const
index 3112b55514ab27b3672dd9ed7371f507a4fb9c7c..9191181d9ec3707b78a15dcddb65d170ec6da811 100644 (file)
@@ -19,7 +19,7 @@ namespace detail
   template <class Model, void (Model::*)()>
   struct wrap_constraints {};
     
-#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580)
+#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__)
   // 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
index 12ec2ad77525e1fbe0884d7ce12a275f0fafd16e..7ee3036855c6b5742ee8a63525114f4f28984a9a 100644 (file)
@@ -330,7 +330,16 @@ namespace boost
       {
           f(arg);
       }
-      
+
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+                      && BOOST_WORKAROUND(__GNUC__, > 3)))
+      // Declare a dummy construktor to make gcc happy.
+      // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
+      // (warning: non-static reference "const double& boost::UnaryFunction<YourClassHere>::arg"
+      // in class without a constructor [-Wuninitialized])
+      UnaryFunction();
+#endif
+
       Func f;
       Arg arg;
   };
index 91f064c68e492cd531f68700b4d44330b19b5709..6a7b988d166b9edfbebc4c25a024992d5ee406ae 100644 (file)
@@ -66,7 +66,6 @@
 
 // Borland C++ Builder 6 and below:
 #if (__BORLANDC__ <= 0x564)
-#  define BOOST_NO_INTEGRAL_INT64_T
 
 #  ifdef NDEBUG
       // fix broken <cstring> so that Boost.test works:
 #endif
 
 // Borland C++ Builder 2008 and below:
+#  define BOOST_NO_INTEGRAL_INT64_T
 #  define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
 #  define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
 #  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
index 3915cd54f95a12e94519efdffd1835047eccbf73..698624ece2971f946149f87c322420f9d27ed845 100644 (file)
@@ -19,8 +19,8 @@
 #endif
 //
 // versions check:
-// last known and checked version is 0x610
-#if (__CODEGEARC__ > 0x613)
+// last known and checked version is 0x620
+#if (__CODEGEARC__ > 0x620)
 #  if defined(BOOST_ASSERT_CONFIG)
 #     error "Unknown compiler version - please run the configure tests and report the results"
 #  else
 
 // CodeGear C++ Builder 2009
 #if (__CODEGEARC__ <= 0x613)
-#  define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
+#  define BOOST_NO_INTEGRAL_INT64_T
 #  define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
-#  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
 #  define BOOST_NO_PRIVATE_IN_AGGREGATE
-#  define BOOST_NO_TWO_PHASE_NAME_LOOKUP
 #  define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
-#  define BOOST_NO_USING_TEMPLATE
    // we shouldn't really need this - but too many things choke
    // without it, this needs more investigation:
 #  define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-#  define BOOST_NO_TYPENAME_WITH_CTOR    // Cannot use typename keyword when making temporaries of a dependant type
-#  define BOOST_NO_NESTED_FRIENDSHIP     // TC1 gives nested classes access rights as any other member
 #  define BOOST_SP_NO_SP_CONVERTIBLE
+#endif
 
+// CodeGear C++ Builder 2010
+#if (__CODEGEARC__ <= 0x620)
+#  define BOOST_NO_TYPENAME_WITH_CTOR    // Cannot use typename keyword when making temporaries of a dependant type
+#  define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
+#  define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#  define BOOST_NO_NESTED_FRIENDSHIP     // TC1 gives nested classes access rights as any other member
+#  define BOOST_NO_USING_TEMPLATE
+#  define BOOST_NO_TWO_PHASE_NAME_LOOKUP
 // Temporary hack, until specific MPL preprocessed headers are generated
 #  define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
 
@@ -59,7 +63,6 @@
 #  endif
 
 #endif
-
 //
 // C++0x macros:
 //
index 6cae94cae679ef7f8705fce838613f1946477930..fe2c52ea29d4e6cdb6b3fab4259a280770370410 100644 (file)
 //
 #define BOOST_NO_CONSTEXPR
 #define BOOST_NO_EXTERN_TEMPLATE
-#define BOOST_NO_LAMBDAS
 #define BOOST_NO_NULLPTR
-#define BOOST_NO_RAW_LITERALS
 #define BOOST_NO_TEMPLATE_ALIASES
-#define BOOST_NO_UNICODE_LITERALS
 
 // C++0x features in 4.3.n and later
 //
 //
 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
 #  define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#  define BOOST_NO_LAMBDAS
+#  define BOOST_NO_RAW_LITERALS
+#  define BOOST_NO_UNICODE_LITERALS
 #endif
 
 // ConceptGCC compiler:
diff --git a/deal.II/contrib/boost/include/boost/config/compiler/nvcc.hpp b/deal.II/contrib/boost/include/boost/config/compiler/nvcc.hpp
new file mode 100644 (file)
index 0000000..7d831af
--- /dev/null
@@ -0,0 +1,85 @@
+//  (C) Copyright Eric Jourdanneau, Joel Falcou 2010
+//  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)
+
+//  See http://www.boost.org for most recent version.
+
+//  NVIDIA CUDA C++ compiler setup
+
+#ifndef BOOST_COMPILER
+#  define BOOST_COMPILER "NVIDIA CUDA C++ Compiler"
+#endif
+
+// NVIDIA Specific support
+// BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device
+#define BOOST_GPU_ENABLED __host__ __device__
+
+// Boost support macro for NVCC 
+// NVCC Basically behaves like some flavor of MSVC6 + some specific quirks
+#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+#define BOOST_MSVC6_MEMBER_TEMPLATES
+#define BOOST_HAS_UNISTD_H
+#define BOOST_HAS_STDINT_H
+#define BOOST_HAS_SIGACTION
+#define BOOST_HAS_SCHED_YIELD
+#define BOOST_HAS_PTHREADS
+#define BOOST_HAS_PTHREAD_YIELD
+#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+#define BOOST_HAS_PARTIAL_STD_ALLOCATOR
+#define BOOST_HAS_NRVO
+#define BOOST_HAS_NL_TYPES_H
+#define BOOST_HAS_NANOSLEEP
+#define BOOST_HAS_LONG_LONG
+#define BOOST_HAS_LOG1P
+#define BOOST_HAS_GETTIMEOFDAY
+#define BOOST_HAS_EXPM1
+#define BOOST_HAS_DIRENT_H
+#define BOOST_HAS_CLOCK_GETTIME
+#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_UNICODE_LITERALS
+#define BOOST_NO_TEMPLATE_ALIASES
+#define BOOST_NO_STD_UNORDERED
+#define BOOST_NO_STATIC_ASSERT
+#define BOOST_NO_SFINAE_EXPR
+#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_RVALUE_REFERENCES
+#define BOOST_NO_RAW_LITERALS
+#define BOOST_NO_NULLPTR
+#define BOOST_NO_LAMBDAS
+#define BOOST_NO_INITIALIZER_LISTS
+#define BOOST_NO_MS_INT64_NUMERIC_LIMITS
+#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_EXTERN_TEMPLATE
+#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_DELETED_FUNCTIONS
+#define BOOST_NO_DEFAULTED_FUNCTIONS
+#define BOOST_NO_DECLTYPE
+#define BOOST_NO_CONSTEXPR
+#define BOOST_NO_CONCEPTS
+#define BOOST_NO_CHAR32_T
+#define BOOST_NO_CHAR16_T
+#define BOOST_NO_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_AUTO_DECLARATIONS
+#define BOOST_NO_0X_HDR_UNORDERED_SET
+#define BOOST_NO_0X_HDR_UNORDERED_MAP
+#define BOOST_NO_0X_HDR_TYPE_TRAITS
+#define BOOST_NO_0X_HDR_TUPLE
+#define BOOST_NO_0X_HDR_THREAD
+#define BOOST_NO_0X_HDR_SYSTEM_ERROR
+#define BOOST_NO_0X_HDR_REGEX
+#define BOOST_NO_0X_HDR_RATIO
+#define BOOST_NO_0X_HDR_RANDOM
+#define BOOST_NO_0X_HDR_MUTEX
+#define BOOST_NO_0X_HDR_MEMORY_CONCEPTS
+#define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS
+#define BOOST_NO_0X_HDR_INITIALIZER_LIST
+#define BOOST_NO_0X_HDR_FUTURE
+#define BOOST_NO_0X_HDR_FORWARD_LIST
+#define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS
+#define BOOST_NO_0X_HDR_CONDITION_VARIABLE
+#define BOOST_NO_0X_HDR_CONCEPTS
+#define BOOST_NO_0X_HDR_CODECVT
+#define BOOST_NO_0X_HDR_CHRONO
+#define BOOST_NO_0X_HDR_ARRAY
+
index e40553efc04e18d3775f64cdbcbcdd9baaa82628..1c7c84b70c90bcb03df25bd78e5a8df9c9638bf8 100644 (file)
 // if no threading API is detected.
 //
 
-#if (__PGIC__ >= 7)
+// PGI 10.x doesn't seem to define __PGIC__
+
+// versions earlier than 10.x do define __PGIC__
+#if __PGIC__ >= 10
+
+// options requested by configure --enable-test
+#define BOOST_HAS_PTHREADS
+#define BOOST_HAS_NRVO
+#define BOOST_HAS_LONG_LONG
+
+// options --enable-test wants undefined
+#undef BOOST_NO_STDC_NAMESPACE
+#undef BOOST_NO_EXCEPTION_STD_NAMESPACE
+#undef BOOST_DEDUCED_TYPENAME
+
+#elif __PGIC__ >= 7
 
 #define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL 
 #define BOOST_NO_TWO_PHASE_NAME_LOOKUP
 #define BOOST_NO_SWPRINTF
+#define BOOST_NO_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_AUTO_DECLARATIONS
 
 #else
 
@@ -32,8 +49,6 @@
 //
 //   See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
 //
-#define BOOST_NO_AUTO_DECLARATIONS
-#define BOOST_NO_AUTO_MULTIDECLARATIONS
 #define BOOST_NO_CHAR16_T
 #define BOOST_NO_CHAR32_T
 #define BOOST_NO_CONCEPTS
index fd21f26bab05aa91c78aa3b28dad7f0e78172d5d..f8cc1096f7355f2b5b98efd3155f8bf62e288069 100644 (file)
 #if (_MSC_VER >= 1200)
 #   define BOOST_HAS_MS_INT64
 #endif
-#if (_MSC_VER >= 1310) && defined(_MSC_EXTENSIONS)
+#if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400))
 #   define BOOST_HAS_LONG_LONG
 #else
 #   define BOOST_NO_LONG_LONG
diff --git a/deal.II/contrib/boost/include/boost/config/platform/symbian.hpp b/deal.II/contrib/boost/include/boost/config/platform/symbian.hpp
new file mode 100644 (file)
index 0000000..ad37943
--- /dev/null
@@ -0,0 +1,94 @@
+//  (C) Copyright Yuriy Krasnoschek 2009. 
+//  (C) Copyright John Maddock 2001 - 2003. 
+//  (C) Copyright Jens Maurer 2001 - 2003. 
+//  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)
+
+//  See http://www.boost.org for most recent version.
+
+//  symbian specific config options:
+
+
+#define BOOST_PLATFORM "Symbian"
+#define BOOST_SYMBIAN 1
+
+
+#if defined(__S60_3X__)
+// Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL
+#  define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK
+// make sure we have __GLIBC_PREREQ if available at all
+#  include <cstdlib>
+// boilerplate code:
+#  define BOOST_HAS_UNISTD_H
+#  include <boost/config/posix_features.hpp>
+// S60 SDK defines _POSIX_VERSION as POSIX.1
+#  ifndef BOOST_HAS_STDINT_H
+#    define BOOST_HAS_STDINT_H
+#  endif
+#  ifndef BOOST_HAS_GETTIMEOFDAY
+#    define BOOST_HAS_GETTIMEOFDAY
+#  endif
+#  ifndef BOOST_HAS_DIRENT_H
+#    define BOOST_HAS_DIRENT_H
+#  endif
+#  ifndef BOOST_HAS_SIGACTION
+#    define BOOST_HAS_SIGACTION
+#  endif
+#  ifndef BOOST_HAS_PTHREADS
+#    define BOOST_HAS_PTHREADS
+#  endif
+#  ifndef BOOST_HAS_NANOSLEEP
+#    define BOOST_HAS_NANOSLEEP
+#  endif
+#  ifndef BOOST_HAS_SCHED_YIELD
+#    define BOOST_HAS_SCHED_YIELD
+#  endif
+#  ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+#    define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+#  endif
+#  ifndef BOOST_HAS_LOG1P
+#    define BOOST_HAS_LOG1P
+#  endif
+#  ifndef BOOST_HAS_EXPM1
+#    define BOOST_HAS_EXPM1
+#  endif
+#  ifndef BOOST_POSIX_API
+#    define BOOST_POSIX_API
+#  endif
+// endianess support
+#  include <sys/endian.h>
+// Symbian SDK provides _BYTE_ORDER instead of __BYTE_ORDER
+#  ifndef __LITTLE_ENDIAN
+#    ifdef _LITTLE_ENDIAN
+#      define __LITTLE_ENDIAN _LITTLE_ENDIAN
+#    else
+#      define __LITTLE_ENDIAN 1234
+#    endif
+#  endif
+#  ifndef __BIG_ENDIAN
+#    ifdef _BIG_ENDIAN
+#      define __BIG_ENDIAN _BIG_ENDIAN
+#    else
+#      define __BIG_ENDIAN 4321
+#    endif
+#  endif
+#  ifndef __BYTE_ORDER
+#    define __BYTE_ORDER __LITTLE_ENDIAN // Symbian is LE
+#  endif
+// Known limitations
+#  define BOOST_ASIO_DISABLE_SERIAL_PORT
+#  define BOOST_DATE_TIME_NO_LOCALE
+#  define BOOST_NO_STD_WSTRING
+#  define BOOST_EXCEPTION_DISABLE
+#  define BOOST_NO_EXCEPTIONS
+
+#else // TODO: More platform support e.g. UIQ
+#  error "Unsuppoted Symbian SDK"
+#endif
+
+#if defined(__WINSCW__) && !defined(BOOST_DISABLE_WIN32)
+#  define BOOST_DISABLE_WIN32 // winscw defines WIN32 macro
+#endif
+
+
index 9141cd6376ac10b1de03dfa391393276a3fe1cc6..792963e2d8c09b060304d906fa2113a9d4a48e3c 100644 (file)
@@ -31,6 +31,7 @@
 #   define BOOST_CXX_IBMCPP   0
 #   define BOOST_CXX_MSVC     0
 #   define BOOST_CXX_PGI      0
+#   define BOOST_CXX_NVCC     0
 
 
 // locate which compiler we are using and define
 // GCC-XML emulates other compilers, it has to appear first here!
 #   define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
 
+#elif defined __CUDACC__
+//  NVIDIA CUDA C++ compiler for GPU
+#   define BOOST_COMPILER_CONFIG "boost/config/compiler/nvcc.hpp"
+
 #elif defined __COMO__
 //  Comeau C++
 #   define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
index 615bb064ff8c3baad511f095764d85aed9d05e56..8606e12edf7a29faa6d3cb3b05b29a61941b1bd7 100644 (file)
 // vxWorks:
 #  define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp"
 
+#elif defined(__SYMBIAN32__) 
+// Symbian: 
+#  define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" 
+
 #else
 
 #  if defined(unix) \
index fa44986946cb70aa3fc589ea6d829da072ad8a9b..9e4d0788c1d35692c810100bbb40c3faee75b812 100644 (file)
@@ -8,7 +8,7 @@
 //  Copyright (c) 2002-2003 David Abrahams
 //  Copyright (c) 2003 Gennaro Prota
 //  Copyright (c) 2003 Eric Friedman
-//
+//  Copyright (c) 2010 Eric Jourdanneau, Joel Falcou
 // 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)
@@ -596,6 +596,11 @@ namespace boost{
 #     endif
 #  endif
 
+//
+// Set some default values GPU support
+//
+#  ifndef BOOST_GPU_ENABLED
+#  define BOOST_GPU_ENABLED 
+#  endif
 #endif
 
-
index d55a4840b955ff7e3b4a3d13fe4765bbdd7ff2a3..47e6a160c6c50829233f18a6b4ac97cf3d0f1664 100644 (file)
 #ifndef BOOST_CSTDINT_HPP
 #define BOOST_CSTDINT_HPP
 
-#include <boost/config.hpp>
+//
+// Since we always define the INT#_C macros as per C++0x, 
+// define __STDC_CONSTANT_MACROS so that <stdint.h> does the right
+// thing if possible, and so that the user knows that the macros 
+// are actually defined as per C99.
+//
+#ifndef __STDC_CONSTANT_MACROS
+#  define __STDC_CONSTANT_MACROS
+#endif
 
+#include <boost/config.hpp>
 
-#ifdef BOOST_HAS_STDINT_H
+//
+// Note that GLIBC is a bit inconsistent about whether int64_t is defined or not
+// depending upon what headers happen to have been included first...
+// so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG.
+// See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990
+//
+#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG))
 
 // The following #include is an implementation artifact; not part of interface.
 # ifdef __hpux
@@ -220,6 +235,15 @@ namespace boost
      typedef unsigned short  uint_least16_t;
      typedef unsigned short  uint_fast16_t;
 #  endif
+# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__) 
+      // On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified 
+      // MTA / XMT does support the following non-standard integer types 
+      typedef __short16           int16_t; 
+      typedef __short16           int_least16_t; 
+      typedef __short16           int_fast16_t; 
+      typedef unsigned __short16  uint16_t; 
+      typedef unsigned __short16  uint_least16_t; 
+      typedef unsigned __short16  uint_fast16_t; 
 # elif (USHRT_MAX == 0xffffffff) && defined(CRAY)
      // no 16-bit types on Cray:
      typedef short           int_least16_t;
@@ -246,6 +270,14 @@ namespace boost
      typedef unsigned int    uint32_t;
      typedef unsigned int    uint_least32_t;
      typedef unsigned int    uint_fast32_t;
+# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) 
+      // Integers are 64 bits on the MTA / XMT 
+      typedef __int32           int32_t; 
+      typedef __int32           int_least32_t; 
+      typedef __int32           int_fast32_t; 
+      typedef unsigned __int32  uint32_t; 
+      typedef unsigned __int32  uint_least32_t; 
+      typedef unsigned __int32  uint_fast32_t; 
 # else
 #    error defaults not correct; you must hand modify boost/cstdint.hpp
 # endif
@@ -326,19 +358,16 @@ namespace boost
 
 Macro definition section:
 
-Define various INTXX_C macros only if
-__STDC_CONSTANT_MACROS is defined.
-
-Undefine the macros if __STDC_CONSTANT_MACROS is
-not defined and the macros are (cf <cassert>).
-
 Added 23rd September 2000 (John Maddock).
 Modified 11th September 2001 to be excluded when
 BOOST_HAS_STDINT_H is defined (John Maddock).
+Modified 11th Dec 2009 to always define the
+INT#_C macros if they're not already defined (John Maddock).
 
 ******************************************************/
 
-#if defined(__STDC_CONSTANT_MACROS) && !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(BOOST_HAS_STDINT_H)
+#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(INT8_C)
+#include <limits.h>
 # define BOOST__STDC_CONSTANT_MACROS_DEFINED
 # if defined(BOOST_HAS_MS_INT64)
 //
@@ -390,27 +419,40 @@ BOOST_HAS_STDINT_H is defined (John Maddock).
 //  64-bit types + intmax_t and uintmax_t  ----------------------------------//
 
 #  if defined(BOOST_HAS_LONG_LONG) && \
-    (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
+    (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_LLONG_MAX))
 
 #    if defined(__hpux)
-     // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
-#    elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615U) ||  \
-        (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615U) ||  \
-        (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615U)
-
+        // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
+#       define INT64_C(value) value##LL
+#       define UINT64_C(value) value##uLL
+#    elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) ||  \
+        (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) ||  \
+        (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \
+        (defined(_LLONG_MAX) && _LLONG_MAX == 18446744073709551615ULL)
+
+#       define INT64_C(value) value##LL
+#       define UINT64_C(value) value##uLL
 #    else
 #       error defaults not correct; you must hand modify boost/cstdint.hpp
 #    endif
-#    define INT64_C(value) value##LL
-#    define UINT64_C(value) value##uLL
 #  elif ULONG_MAX != 0xffffffff
 
-#    if ULONG_MAX == 18446744073709551615 // 2**64 - 1
+#    if ULONG_MAX == 18446744073709551615U // 2**64 - 1
 #       define INT64_C(value) value##L
 #       define UINT64_C(value) value##uL
 #    else
 #       error defaults not correct; you must hand modify boost/cstdint.hpp
 #    endif
+#  elif defined(BOOST_HAS_LONG_LONG)
+     // Usual macros not defined, work things out for ourselves:
+#    if(~0uLL == 18446744073709551615ULL)
+#       define INT64_C(value) value##LL
+#       define UINT64_C(value) value##uLL
+#    else
+#       error defaults not correct; you must hand modify boost/cstdint.hpp
+#    endif
+#  else
+#    error defaults not correct; you must hand modify boost/cstdint.hpp
 #  endif
 
 #  ifdef BOOST_NO_INT64_T
@@ -423,23 +465,7 @@ BOOST_HAS_STDINT_H is defined (John Maddock).
 
 # endif // Borland/Microsoft specific width suffixes
 
-
-#elif defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && !defined(__STDC_CONSTANT_MACROS) && !defined(BOOST_HAS_STDINT_H)
-//
-// undef all the macros:
-//
-# undef INT8_C
-# undef INT16_C
-# undef INT32_C
-# undef INT64_C
-# undef UINT8_C
-# undef UINT16_C
-# undef UINT32_C
-# undef UINT64_C
-# undef INTMAX_C
-# undef UINTMAX_C
-
-#endif // __STDC_CONSTANT_MACROS_DEFINED etc.
+#endif // INT#_C macros.
 
 
 
index 048a66563cdc33047f28ece3bf6f629de3637b92..24ccfe5c37dfdb865aa01ba330b470ae9cbc6970 100644 (file)
@@ -2,11 +2,11 @@
 #define DATE_TIME_C_TIME_HPP___
 
 /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
- * Author: Jeff Garland, Bart Garst 
- * $Date: 2009-10-03 06:22:58 -0400 (Sat, 03 Oct 2009) $
+ * Author: Jeff Garland, Bart Garst
+ * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
  */
 
 
@@ -38,11 +38,11 @@ namespace std { using ::time_t; using ::time; using ::localtime;
 namespace boost {
 namespace date_time {
   //! Provides a uniform interface to some 'ctime' functions
-  /*! Provides a uniform interface to some ctime functions and 
-   * their '_r' counterparts. The '_r' functions require a pointer to a 
-   * user created std::tm struct whereas the regular functions use a 
-   * staticly created struct and return a pointer to that. These wrapper 
-   * functions require the user to create a std::tm struct and send in a 
+  /*! Provides a uniform interface to some ctime functions and
+   * their '_r' counterparts. The '_r' functions require a pointer to a
+   * user created std::tm struct whereas the regular functions use a
+   * staticly created struct and return a pointer to that. These wrapper
+   * functions require the user to create a std::tm struct and send in a
    * pointer to it. This struct may be used to store the resulting time.
    * The returned pointer may or may not point to this struct, however,
    * it will point to the result of the corresponding function.
@@ -103,5 +103,5 @@ namespace date_time {
 #endif // BOOST_HAS_THREADS
   };
 }} // namespaces
-                
+
 #endif // DATE_TIME_C_TIME_HPP___
index 677f6286ad85d2a71aafbca97550056b1db15f9e..1056fb6a720e855b1c79761c708bdd673e3a4b57 100644 (file)
@@ -2,11 +2,11 @@
 #define DATE_TIME_DATE_HPP___
 
 /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-09-28 14:10:02 -0400 (Mon, 28 Sep 2009) $
+ * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
  */
 
 #include <boost/operators.hpp>
@@ -17,28 +17,28 @@ namespace boost {
 namespace date_time {
 
   //!Representation of timepoint at the one day level resolution.
-  /*! 
+  /*!
     The date template represents an interface shell for a date class
     that is based on a year-month-day system such as the gregorian
     or iso systems.  It provides basic operations to enable calculation
-    and comparisons.  
+    and comparisons.
 
     <b>Theory</b>
 
-    This date representation fundamentally departs from the C tm struct 
+    This date representation fundamentally departs from the C tm struct
     approach.  The goal for this type is to provide efficient date
     operations (add, subtract) and storage (minimize space to represent)
     in a concrete class.  Thus, the date uses a count internally to
-    represent a particular date.  The calendar parameter defines 
+    represent a particular date.  The calendar parameter defines
     the policies for converting the the year-month-day and internal
     counted form here.  Applications that need to perform heavy
     formatting of the same date repeatedly will perform better
     by using the year-month-day representation.
-    
+
     Internally the date uses a day number to represent the date.
-    This is a monotonic time representation. This representation 
+    This is a monotonic time representation. This representation
     allows for fast comparison as well as simplifying
-    the creation of writing numeric operations.  Essentially, the 
+    the creation of writing numeric operations.  Essentially, the
     internal day number is like adjusted julian day.  The adjustment
     is determined by the Epoch date which is represented as day 1 of
     the calendar.  Day 0 is reserved for negative infinity so that
@@ -48,11 +48,11 @@ namespace date_time {
     day representations.
   */
 
-  
-  template<class T, class calendar, class duration_type_> 
-  class date : private 
-       boost::less_than_comparable<T 
-     , boost::equality_comparable<T 
+
+  template<class T, class calendar, class duration_type_>
+  class date : private
+       boost::less_than_comparable<T
+     , boost::equality_comparable<T
     > >
   {
   public:
@@ -67,26 +67,26 @@ namespace date_time {
     typedef typename calendar::date_rep_type date_rep_type;
     typedef typename calendar::date_int_type date_int_type;
     typedef typename calendar::day_of_week_type day_of_week_type;
-    date(year_type y, month_type m, day_type d) 
+    date(year_type y, month_type m, day_type d)
       : days_(calendar::day_number(ymd_type(y, m, d)))
     {}
-    date(const ymd_type& ymd) 
+    date(const ymd_type& ymd)
       : days_(calendar::day_number(ymd))
-      {}
+    {}
     //let the compiler write copy, assignment, and destructor
     year_type        year() const
     {
-      ymd_type ymd = calendar::from_day_number(days_); 
+      ymd_type ymd = calendar::from_day_number(days_);
       return ymd.year;
     }
     month_type       month() const
     {
-      ymd_type ymd = calendar::from_day_number(days_); 
+      ymd_type ymd = calendar::from_day_number(days_);
       return ymd.month;
     }
     day_type         day() const
     {
-      ymd_type ymd = calendar::from_day_number(days_); 
+      ymd_type ymd = calendar::from_day_number(days_);
       return ymd.day;
     }
     day_of_week_type day_of_week() const
@@ -152,7 +152,7 @@ namespace date_time {
         return duration_type(val.as_special());
       }
     }
-    
+
     date_type operator-(const duration_type& dd) const
     {
       if(dd.is_special())
@@ -166,7 +166,7 @@ namespace date_time {
       *this = *this - dd;
       return date_type(days_);
     }
-    date_rep_type day_count() const 
+    date_rep_type day_count() const
     {
       return days_;
     }
@@ -181,25 +181,25 @@ namespace date_time {
     }
     date_type operator+=(const duration_type& dd)
     {
-      *this = *this + dd; 
+      *this = *this + dd;
       return date_type(days_);
     }
 
     //see reference
   protected:
-    /*! This is a private constructor which allows for the creation of new 
-      dates.  It is not exposed to users since that would require class 
+    /*! This is a private constructor which allows for the creation of new
+      dates.  It is not exposed to users since that would require class
       users to understand the inner workings of the date class.
     */
     explicit date(date_int_type days) : days_(days) {};
     explicit date(date_rep_type days) : days_(days.as_number()) {};
     date_int_type days_;
-    
+
   };
 
 
 
-  
+
 } } // namespace date_time
 
 
index 5b0d0ca5336b2e6629e60116eca674b50321066e..f35796ee7fcf052611dbe09a0ae5e4001635ba6f 100644 (file)
@@ -41,7 +41,7 @@ namespace gregorian {
         boost::throw_exception(std::out_of_range(s));
     }
 
-    std::tm datetm = std::tm(); // zero initialization is needed for extension members, like tm_zone
+    std::tm datetm = {}; // zero initialization is needed for extension members, like tm_zone
     boost::gregorian::date::ymd_type ymd = d.year_month_day();
     datetm.tm_year = ymd.year - 1900;
     datetm.tm_mon = ymd.month - 1;
index 48b84604d18aef3d0585aa241ba5e21e88637db6..483ead5016a69c382a937b80060997ce33bdc9aa 100644 (file)
@@ -2,11 +2,11 @@
 #define GREGORIAN_GREGORIAN_CALENDAR_HPP__
 
 /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
- * Author: Jeff Garland 
- * $Date: 2009-09-28 14:10:02 -0400 (Mon, 28 Sep 2009) $
+ * Author: Jeff Garland
+ * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
  */
 
 #include <boost/cstdint.hpp>
 
 namespace boost {
 namespace gregorian {
-    
+
   //!An internal date representation that includes infinities, not a date
   typedef date_time::int_adapter<uint32_t> fancy_date_rep;
 
   //! Gregorian calendar for this implementation, hard work in the base
-  class gregorian_calendar : 
+  class gregorian_calendar :
     public date_time::gregorian_calendar_base<greg_year_month_day, fancy_date_rep::int_type> {
   public:
     //! Type to hold a weekday (eg: Sunday, Monday,...)
@@ -35,14 +35,14 @@ namespace gregorian {
     //! Date rep implements the traits stuff as well
     typedef fancy_date_rep       date_traits_type;
 
-    
+
   private:
   };
 
 } } //namespace gregorian
-  
+
 
 
 
 #endif
-  
+
index 772c783d9db3c4f3f2adae6e24688dde91d377a8..ad67c0ce2fe781f9ba3624840bccf7d6a307abad 100644 (file)
@@ -2,11 +2,11 @@
 #define GREG_DATE_HPP___
 
 /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
- * Author: Jeff Garland 
- * $Date: 2009-09-28 14:10:02 -0400 (Mon, 28 Sep 2009) $
+ * Author: Jeff Garland
+ * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
  */
 
 #include <boost/throw_exception.hpp>
@@ -28,10 +28,10 @@ namespace gregorian {
   using date_time::min_date_time;
 
   //! A date type based on gregorian_calendar
-  /*! This class is the primary interface for programming with 
+  /*! This class is the primary interface for programming with
       greogorian dates.  The is a lightweight type that can be
-      freely passed by value.  All comparison operators are 
-      supported.  
+      freely passed by value.  All comparison operators are
+      supported.
       \ingroup date_basics
   */
   class date : public date_time::date<date, gregorian_calendar, date_duration>
@@ -52,7 +52,7 @@ namespace gregorian {
     {}
 #endif // DATE_TIME_NO_DEFAULT_CONSTRUCTOR
     //! Main constructor with year, month, day
-    date(year_type y, month_type m, day_type d) 
+    date(year_type y, month_type m, day_type d)
       : date_time::date<date, gregorian_calendar, date_duration>(y, m, d)
     {
       if (gregorian_calendar::end_of_month_day(y, m) < d) {
@@ -60,7 +60,7 @@ namespace gregorian {
       }
     }
     //! Constructor from a ymd_type structure
-    explicit date(const ymd_type& ymd) 
+    explicit date(const ymd_type& ymd)
       : date_time::date<date, gregorian_calendar, date_duration>(ymd)
     {}
     //! Needed copy constructor
@@ -102,13 +102,13 @@ namespace gregorian {
     date_int_type modjulian_day() const
     {
       ymd_type ymd = year_month_day();
-      return gregorian_calendar::modjulian_day_number(ymd);      
+      return gregorian_calendar::modjulian_day_number(ymd);
     }
     //!Return the iso 8601 week number 1..53
     int week_number() const
     {
       ymd_type ymd = year_month_day();
-      return gregorian_calendar::week_number(ymd);      
+      return gregorian_calendar::week_number(ymd);
     }
     //! Return the day number from the calendar
     date_int_type day_number() const
@@ -118,7 +118,7 @@ namespace gregorian {
     //! Return the last day of the current month
     date end_of_month() const
     {
-      ymd_type ymd = year_month_day(); 
+      ymd_type ymd = year_month_day();
       short eom_day =  gregorian_calendar::end_of_month_day(ymd.year, ymd.month);
       return date(ymd.year, ymd.month, eom_day);
     }
@@ -126,7 +126,7 @@ namespace gregorian {
    private:
 
   };
-  
+
 
 
 } } //namespace gregorian
index 3df1ed59f95d742e1cf7ed2740c91c197ea681df..c27c09e7604f57c407184078d1326458c7da73f7 100644 (file)
@@ -2,11 +2,11 @@
 #define DATE_TIME_GREGORIAN_CALENDAR_HPP__
 
 /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
- * Author: Jeff Garland 
- * $Date: 2009-09-28 14:10:02 -0400 (Mon, 28 Sep 2009) $
+ * Author: Jeff Garland
+ * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
  */
 
 
@@ -27,7 +27,7 @@ namespace date_time {
   template<typename ymd_type_, typename date_int_type_>
   class gregorian_calendar_base {
   public:
-    //! define a type a date split into components 
+    //! define a type a date split into components
     typedef ymd_type_  ymd_type;
     //! define a type for representing months
     typedef typename ymd_type::month_type  month_type;
@@ -58,7 +58,7 @@ namespace date_time {
 
 
 } } //namespace
-  
+
 #ifndef NO_BOOST_DATE_TIME_INLINE
 #include "boost/date_time/gregorian_calendar.ipp"
 #endif
@@ -66,5 +66,5 @@ namespace date_time {
 
 
 #endif
-  
+
 
index 85a3747d09958f11531e834b2b15d4154e7ae061..a281b45ccac133baa124186174cbc1d20db0b2c2 100644 (file)
@@ -1,9 +1,9 @@
 /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-09-28 14:10:02 -0400 (Mon, 28 Sep 2009) $
+ * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
  */
 
 #ifndef NO_BOOST_DATE_TIME_INLINE
@@ -27,10 +27,10 @@ namespace date_time {
     //std::cout << year << "-" << month << "-" << day << " is day: " << d << "\n";
     return d;
   }
-  
+
   //!Return the iso week number for the date
   /*!Implements the rules associated with the iso 8601 week number.
-    Basically the rule is that Week 1 of the year is the week that contains 
+    Basically the rule is that Week 1 of the year is the week that contains
     January 4th or the week that contains the first Thursday in January.
     Reference for this algorithm is the Calendar FAQ by Claus Tondering, April 2000.
   */
@@ -42,11 +42,11 @@ namespace date_time {
     unsigned long juliantoday = julian_day_number(ymd);
     unsigned long day = (julianbegin + 3) % 7;
     unsigned long week = (juliantoday + day - julianbegin + 4)/7;
-    
+
     if ((week >= 1) && (week <= 52)) {
       return week;
     }
-    
+
     if ((week == 53)) {
       if((day==6) ||(day == 5 && is_leap_year(ymd.year))) {
         return week; //under these circumstances week == 53.
@@ -62,18 +62,18 @@ namespace date_time {
       week = (juliantoday + day - julianbegin + 4)/7;
       return week;
     }
-    
+
     return week;  //not reachable -- well except if day == 5 and is_leap_year != true
-    
+
   }
-  
+
   //! Convert a ymd_type into a day number
   /*! The day number is an absolute number of days since the start of count
    */
   template<typename ymd_type_, typename date_int_type_>
   BOOST_DATE_TIME_INLINE
   date_int_type_
-  gregorian_calendar_base<ymd_type_,date_int_type_>::day_number(const ymd_type& ymd) 
+  gregorian_calendar_base<ymd_type_,date_int_type_>::day_number(const ymd_type& ymd)
   {
     unsigned short a = static_cast<unsigned short>((14-ymd.month)/12);
     unsigned short y = static_cast<unsigned short>(ymd.year + 4800 - a);
@@ -81,14 +81,14 @@ namespace date_time {
     unsigned long  d = ymd.day + ((153*m + 2)/5) + 365*y + (y/4) - (y/100) + (y/400) - 32045;
     return d;
   }
-  
+
   //! Convert a year-month-day into the julian day number
   /*! Since this implementation uses julian day internally, this is the same as the day_number.
    */
   template<typename ymd_type_, typename date_int_type_>
   BOOST_DATE_TIME_INLINE
   date_int_type_
-  gregorian_calendar_base<ymd_type_,date_int_type_>::julian_day_number(const ymd_type& ymd) 
+  gregorian_calendar_base<ymd_type_,date_int_type_>::julian_day_number(const ymd_type& ymd)
   {
     return day_number(ymd);
   }
@@ -100,16 +100,16 @@ namespace date_time {
   template<typename ymd_type_, typename date_int_type_>
   BOOST_DATE_TIME_INLINE
   date_int_type_
-  gregorian_calendar_base<ymd_type_,date_int_type_>::modjulian_day_number(const ymd_type& ymd) 
+  gregorian_calendar_base<ymd_type_,date_int_type_>::modjulian_day_number(const ymd_type& ymd)
   {
     return julian_day_number(ymd)-2400001; //prerounded
   }
-  
+
   //! Change a day number into a year-month-day
   template<typename ymd_type_, typename date_int_type_>
   BOOST_DATE_TIME_INLINE
   ymd_type_
-  gregorian_calendar_base<ymd_type_,date_int_type_>::from_day_number(date_int_type dayNumber) 
+  gregorian_calendar_base<ymd_type_,date_int_type_>::from_day_number(date_int_type dayNumber)
   {
     date_int_type a = dayNumber + 32044;
     date_int_type b = (4*a + 3)/146097;
@@ -121,15 +121,15 @@ namespace date_time {
     unsigned short month = static_cast<unsigned short>(m + 3 - 12 * (m/10));
     year_type year = static_cast<unsigned short>(100*b + d - 4800 + (m/10));
     //std::cout << year << "-" << month << "-" << day << "\n";
-    
+
     return ymd_type(static_cast<unsigned short>(year),month,day);
   }
-  
+
   //! Change a day number into a year-month-day
   template<typename ymd_type_, typename date_int_type_>
   BOOST_DATE_TIME_INLINE
   ymd_type_
-  gregorian_calendar_base<ymd_type_,date_int_type_>::from_julian_day_number(date_int_type dayNumber) 
+  gregorian_calendar_base<ymd_type_,date_int_type_>::from_julian_day_number(date_int_type dayNumber)
   {
     date_int_type a = dayNumber + 32044;
     date_int_type b = (4*a+3)/146097;
@@ -141,10 +141,10 @@ namespace date_time {
     unsigned short month = static_cast<unsigned short>(m + 3 - 12 * (m/10));
     year_type year = static_cast<year_type>(100*b + d - 4800 + (m/10));
     //std::cout << year << "-" << month << "-" << day << "\n";
-    
+
     return ymd_type(year,month,day);
   }
-  
+
   //! Change a modified julian day number into a year-month-day
   template<typename ymd_type_, typename date_int_type_>
   BOOST_DATE_TIME_INLINE
@@ -153,7 +153,7 @@ namespace date_time {
     date_int_type jd = dayNumber + 2400001; //is 2400000.5 prerounded
     return from_julian_day_number(jd);
   }
-  
+
   //! Determine if the provided year is a leap year
   /*!
    *@return true if year is a leap year, false otherwise
@@ -161,12 +161,12 @@ namespace date_time {
   template<typename ymd_type_, typename date_int_type_>
   BOOST_DATE_TIME_INLINE
   bool
-  gregorian_calendar_base<ymd_type_,date_int_type_>::is_leap_year(year_type year) 
+  gregorian_calendar_base<ymd_type_,date_int_type_>::is_leap_year(year_type year)
   {
     //divisible by 4, not if divisible by 100, but true if divisible by 400
     return (!(year % 4))  && ((year % 100) || (!(year % 400)));
   }
-  
+
   //! Calculate the last day of the month
   /*! Find the day which is the end of the month given year and month
    *  No error checking is performed.
@@ -175,7 +175,7 @@ namespace date_time {
   BOOST_DATE_TIME_INLINE
   unsigned short
   gregorian_calendar_base<ymd_type_,date_int_type_>::end_of_month_day(year_type year,
-                                                                      month_type month) 
+                                                                      month_type month)
   {
     switch (month) {
     case 2:
@@ -194,12 +194,12 @@ namespace date_time {
     };
 
   }
-  
+
   //! Provide the ymd_type specification for the calandar start
   template<typename ymd_type_, typename date_int_type_>
   BOOST_DATE_TIME_INLINE
   ymd_type_
-  gregorian_calendar_base<ymd_type_,date_int_type_>::epoch() 
+  gregorian_calendar_base<ymd_type_,date_int_type_>::epoch()
   {
     return ymd_type(1400,1,1);
   }
@@ -208,7 +208,7 @@ namespace date_time {
   template<typename ymd_type_, typename date_int_type_>
   BOOST_DATE_TIME_INLINE
   unsigned short
-  gregorian_calendar_base<ymd_type_,date_int_type_>::days_in_week() 
+  gregorian_calendar_base<ymd_type_,date_int_type_>::days_in_week()
   {
     return 7;
   }
index 166c4034e10ff8c331a64462b4de10c2c4fc02be..9c9f62340fe21bfb8c2cc093dd756dc3f3ff8fcf 100644 (file)
@@ -2,10 +2,10 @@
 #define LOCAL_TIME_LOCAL_DATE_TIME_HPP__
 
 /* Copyright (c) 2003-2005 CrystalClear Software, Inc.
- * Subject to the Boost Software License, Version 1.0. 
+ * Subject to the Boost Software License, Version 1.0.
  * (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-09-28 14:10:02 -0400 (Mon, 28 Sep 2009) $
+ * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
  */
 
 #include <string>
@@ -42,7 +42,7 @@ namespace local_time {
       std::logic_error(std::string("is_dst flag does not match resulting dst for time label given: " + msg)) {}
   };
 
-  //TODO: I think these should be in local_date_time_base and not 
+  //TODO: I think these should be in local_date_time_base and not
   // necessarily brought into the namespace
   using date_time::time_is_dst_result;
   using date_time::is_in_dst;
@@ -52,17 +52,17 @@ namespace local_time {
 
   //! Representation of "wall-clock" time in a particular time zone
   /*! Representation of "wall-clock" time in a particular time zone
-   * Local_date_time_base holds a time value (date and time offset from 00:00) 
-   * along with a time zone. The time value is stored as UTC and conversions 
-   * to wall clock time are made as needed. This approach allows for 
-   * operations between wall-clock times in different time zones, and 
-   * daylight savings time considerations, to be made. Time zones are 
+   * Local_date_time_base holds a time value (date and time offset from 00:00)
+   * along with a time zone. The time value is stored as UTC and conversions
+   * to wall clock time are made as needed. This approach allows for
+   * operations between wall-clock times in different time zones, and
+   * daylight savings time considerations, to be made. Time zones are
    * required to be in the form of a boost::shared_ptr<time_zone_base>.
    */
-  template<class utc_time_=posix_time::ptime, 
+  template<class utc_time_=posix_time::ptime,
            class tz_type=date_time::time_zone_base<utc_time_,char> >
-  class local_date_time_base :  public date_time::base_time<utc_time_, 
-                                                            boost::posix_time::posix_time_system> { 
+  class local_date_time_base :  public date_time::base_time<utc_time_,
+                                                            boost::posix_time::posix_time_system> {
   public:
     typedef utc_time_ utc_time_type;
     typedef typename utc_time_type::time_duration_type time_duration_type;
@@ -71,41 +71,41 @@ namespace local_time {
     typedef typename utc_time_type::time_system_type time_system_type;
     /*! This constructor interprets the passed time as a UTC time.
      *  So, for example, if the passed timezone is UTC-5 then the
-     *  time will be adjusted back 5 hours.  The time zone allows for 
+     *  time will be adjusted back 5 hours.  The time zone allows for
      *  automatic calculation of whether the particular time is adjusted for
      *  daylight savings, etc.
      *  If the time zone shared pointer is null then time stays unadjusted.
      *@param t A UTC time
      *@param tz Timezone for to adjust the UTC time to.
      */
-    local_date_time_base(utc_time_type t, 
-                         boost::shared_ptr<tz_type> tz) : 
+    local_date_time_base(utc_time_type t,
+                         boost::shared_ptr<tz_type> tz) :
       date_time::base_time<utc_time_type, time_system_type>(t),
       zone_(tz)
     {
       // param was already utc so nothing more to do
-    } 
+    }
 
-    /*! This constructs a local time -- the passed time information 
-     * understood to be in the passed tz. The DST flag must be passed 
-     * to indicate whether the time is in daylight savings or not.  
-     *  @throws -- time_label_invalid if the time passed does not exist in 
-     *             the given locale. The non-existent case occurs typically 
-     *             during the shift-back from daylight savings time.  When 
-     *             the clock is shifted forward a range of times 
+    /*! This constructs a local time -- the passed time information
+     * understood to be in the passed tz. The DST flag must be passed
+     * to indicate whether the time is in daylight savings or not.
+     *  @throws -- time_label_invalid if the time passed does not exist in
+     *             the given locale. The non-existent case occurs typically
+     *             during the shift-back from daylight savings time.  When
+     *             the clock is shifted forward a range of times
      *             (2 am to 3 am in the US) is skipped and hence is invalid.
-     *  @throws -- dst_not_valid if the DST flag is passed for a period 
+     *  @throws -- dst_not_valid if the DST flag is passed for a period
      *             where DST is not active.
      */
-    local_date_time_base(date_type d, 
+    local_date_time_base(date_type d,
                          time_duration_type td,
-                         boost::shared_ptr<tz_type> tz, 
+                         boost::shared_ptr<tz_type> tz,
                          bool dst_flag) : //necessary for constr_adj()
       date_time::base_time<utc_time_type,time_system_type>(construction_adjustment(utc_time_type(d, td), tz, dst_flag)),
       zone_(tz)
     {
       if(tz != boost::shared_ptr<tz_type>() && tz->has_dst()){
-        
+
         // d & td are already local so we use them
         time_is_dst_result result = check_dst(d, td, tz);
         bool in_dst = (result == is_in_dst); // less processing than is_dst()
@@ -125,23 +125,23 @@ namespace local_time {
           ss << "flag given: dst=" << dst_flag << ", dst calculated: dst=" << in_dst;
           boost::throw_exception(dst_not_valid(ss.str()));
         }
-        
+
         // everything checks out and conversion to utc already done
       }
-    } 
-    
+    }
+
     //TODO maybe not the right set...Ignore the last 2 for now...
-    enum DST_CALC_OPTIONS { EXCEPTION_ON_ERROR, NOT_DATE_TIME_ON_ERROR }; 
+    enum DST_CALC_OPTIONS { EXCEPTION_ON_ERROR, NOT_DATE_TIME_ON_ERROR };
                             //ASSUME_DST_ON_ERROR, ASSUME_NOT_DST_ON_ERROR };
 
-    /*! This constructs a local time -- the passed time information 
-     * understood to be in the passed tz.  The DST flag is calculated 
-     * according to the specified rule. 
+    /*! This constructs a local time -- the passed time information
+     * understood to be in the passed tz.  The DST flag is calculated
+     * according to the specified rule.
      */
-    local_date_time_base(date_type d, 
+    local_date_time_base(date_type d,
                          time_duration_type td,
-                         boost::shared_ptr<tz_type> tz, 
-                         DST_CALC_OPTIONS calc_option) : 
+                         boost::shared_ptr<tz_type> tz,
+                         DST_CALC_OPTIONS calc_option) :
       // dummy value - time_ is set in constructor code
       date_time::base_time<utc_time_type,time_system_type>(utc_time_type(d,td)),
       zone_(tz)
@@ -168,36 +168,36 @@ namespace local_time {
         }
       }
       else if(result == is_in_dst){
-        utc_time_type t = 
+        utc_time_type t =
           construction_adjustment(utc_time_type(d, td), tz, true);
-        this->time_ = posix_time::posix_time_system::get_time_rep(t.date(), 
+        this->time_ = posix_time::posix_time_system::get_time_rep(t.date(),
                                                             t.time_of_day());
       }
       else{
-        utc_time_type t = 
+        utc_time_type t =
           construction_adjustment(utc_time_type(d, td), tz, false);
-        this->time_ = posix_time::posix_time_system::get_time_rep(t.date(), 
+        this->time_ = posix_time::posix_time_system::get_time_rep(t.date(),
                                                             t.time_of_day());
       }
     }
 
 
     //! Determines if given time label is in daylight savings for given zone
-    /*! Determines if given time label is in daylight savings for given zone. 
-     * Takes a date and time_duration representing a local time, along 
+    /*! Determines if given time label is in daylight savings for given zone.
+     * Takes a date and time_duration representing a local time, along
      * with time zone, and returns a time_is_dst_result object as result.
      */
-    static time_is_dst_result check_dst(date_type d, 
+    static time_is_dst_result check_dst(date_type d,
                                         time_duration_type td,
-                                        boost::shared_ptr<tz_type> tz) 
+                                        boost::shared_ptr<tz_type> tz)
     {
       if(tz != boost::shared_ptr<tz_type>() && tz->has_dst()) {
         typedef typename date_time::dst_calculator<date_type, time_duration_type> dst_calculator;
         return dst_calculator::local_is_dst(
-            d, td, 
-            tz->dst_local_start_time(d.year()).date(), 
-            tz->dst_local_start_time(d.year()).time_of_day(), 
-            tz->dst_local_end_time(d.year()).date(), 
+            d, td,
+            tz->dst_local_start_time(d.year()).date(),
+            tz->dst_local_start_time(d.year()).time_of_day(),
+            tz->dst_local_end_time(d.year()).date(),
             tz->dst_local_end_time(d.year()).time_of_day(),
             tz->dst_offset()
         );
@@ -211,7 +211,7 @@ namespace local_time {
     ~local_date_time_base() {};
 
     //! Copy constructor
-    local_date_time_base(const local_date_time_base& rhs) : 
+    local_date_time_base(const local_date_time_base& rhs) :
       date_time::base_time<utc_time_type, time_system_type>(rhs),
       zone_(rhs.zone_)
     {}
@@ -224,7 +224,7 @@ namespace local_time {
     {}
 
     //! returns time zone associated with calling instance
-    boost::shared_ptr<tz_type> zone() const 
+    boost::shared_ptr<tz_type> zone() const
     {
       return zone_;
     }
@@ -243,12 +243,12 @@ namespace local_time {
             return false;
           case is_in_dst:
             return true;
-          case ambiguous: 
+          case ambiguous:
             if(lt + zone_->dst_offset() < zone_->dst_local_end_time(lt.date().year())) {
               return true;
             }
             break;
-          case invalid_time_label: 
+          case invalid_time_label:
             if(lt >= zone_->dst_local_start_time(lt.date().year())) {
               return true;
             }
@@ -258,12 +258,12 @@ namespace local_time {
       return false;
     }
     //! Returns object's time value as a utc representation
-    utc_time_type utc_time() const 
+    utc_time_type utc_time() const
     {
       return utc_time_type(this->time_);
     }
     //! Returns object's time value as a local representation
-    utc_time_type local_time() const 
+    utc_time_type local_time() const
     {
       if(zone_ != boost::shared_ptr<tz_type>()){
         utc_time_type lt = this->utc_time() + zone_->base_utc_offset();
@@ -276,7 +276,7 @@ namespace local_time {
     }
     //! Returns string in the form "2003-Aug-20 05:00:00 EDT"
     /*! Returns string in the form "2003-Aug-20 05:00:00 EDT". If
-     * time_zone is NULL the time zone abbreviation will be "UTC". The time 
+     * time_zone is NULL the time zone abbreviation will be "UTC". The time
      * zone abbrev will not be included if calling object is a special_value*/
     std::string to_string() const
     {
@@ -304,17 +304,17 @@ namespace local_time {
       }
       return ss.str();
     }
-    /*! returns a local_date_time_base in the given time zone with the 
+    /*! returns a local_date_time_base in the given time zone with the
      * optional time_duration added. */
-    local_date_time_base local_time_in(boost::shared_ptr<tz_type> new_tz, 
-                                       time_duration_type td=time_duration_type(0,0,0)) const 
+    local_date_time_base local_time_in(boost::shared_ptr<tz_type> new_tz,
+                                       time_duration_type td=time_duration_type(0,0,0)) const
     {
       return local_date_time_base(utc_time_type(this->time_) + td, new_tz);
     }
-    
+
     //! Returns name of associated time zone or "Coordinated Universal Time".
-    /*! Optional bool parameter will return time zone as an offset 
-     * (ie "+07:00" extended iso format). Empty string is returned for 
+    /*! Optional bool parameter will return time zone as an offset
+     * (ie "+07:00" extended iso format). Empty string is returned for
      * classes that do not use a time_zone */
     std::string zone_name(bool as_offset=false) const
     {
@@ -347,8 +347,8 @@ namespace local_time {
       }
     }
     //! Returns abbreviation of associated time zone or "UTC".
-    /*! Optional bool parameter will return time zone as an offset 
-     * (ie "+0700" iso format). Empty string is returned for classes 
+    /*! Optional bool parameter will return time zone as an offset
+     * (ie "+0700" iso format). Empty string is returned for classes
      * that do not use a time_zone */
     std::string zone_abbrev(bool as_offset=false) const
     {
@@ -389,7 +389,7 @@ namespace local_time {
       }
       return zone_->to_posix_string();
     }
-      
+
     //! Equality comparison operator
     /*bool operator==(const date_time::base_time<boost::posix_time::ptime,boost::posix_time::posix_time_system>& rhs) const
     { // fails due to rhs.time_ being protected
@@ -427,45 +427,45 @@ namespace local_time {
       return (*this > rhs || *this == rhs);
     }
 
-    //! Local_date_time + date_duration 
+    //! Local_date_time + date_duration
     local_date_time_base operator+(const date_duration_type& dd) const
     {
       return local_date_time_base(time_system_type::add_days(this->time_,dd), zone_);
     }
-    //! Local_date_time += date_duration 
+    //! Local_date_time += date_duration
     local_date_time_base operator+=(const date_duration_type& dd)
     {
       this->time_ = time_system_type::add_days(this->time_,dd);
       return *this;
     }
-    //! Local_date_time - date_duration 
+    //! Local_date_time - date_duration
     local_date_time_base operator-(const date_duration_type& dd) const
     {
       return local_date_time_base(time_system_type::subtract_days(this->time_,dd), zone_);
     }
-    //! Local_date_time -= date_duration 
+    //! Local_date_time -= date_duration
     local_date_time_base operator-=(const date_duration_type& dd)
     {
       this->time_ = time_system_type::subtract_days(this->time_,dd);
       return *this;
     }
-    //! Local_date_time + time_duration 
+    //! Local_date_time + time_duration
     local_date_time_base operator+(const time_duration_type& td) const
     {
       return local_date_time_base(time_system_type::add_time_duration(this->time_,td), zone_);
     }
-    //! Local_date_time += time_duration 
-    local_date_time_base operator+=(const time_duration_type& td) 
+    //! Local_date_time += time_duration
+    local_date_time_base operator+=(const time_duration_type& td)
     {
       this->time_ = time_system_type::add_time_duration(this->time_,td);
       return *this;
     }
-    //! Local_date_time - time_duration 
+    //! Local_date_time - time_duration
     local_date_time_base operator-(const time_duration_type& td) const
     {
       return local_date_time_base(time_system_type::subtract_time_duration(this->time_,td), zone_);
     }
-    //! Local_date_time -= time_duration 
+    //! Local_date_time -= time_duration
     local_date_time_base operator-=(const time_duration_type& td)
     {
       this->time_ = time_system_type::subtract_time_duration(this->time_,td);
@@ -482,7 +482,7 @@ namespace local_time {
 
     /*! Adjust the passed in time to UTC?
      */
-    utc_time_type construction_adjustment(utc_time_type t, 
+    utc_time_type construction_adjustment(utc_time_type t,
                                           boost::shared_ptr<tz_type> z,
                                           bool dst_flag)
     {
@@ -497,21 +497,21 @@ namespace local_time {
 
     /*! Simple formatting code -- todo remove this?
      */
-    std::string zone_as_offset(const time_duration_type& td, 
+    std::string zone_as_offset(const time_duration_type& td,
                                const std::string& separator) const
     {
       std::ostringstream ss;
       if(td.is_negative()) {
         // a negative duration is represented as "-[h]h:mm"
-        // we require two digits for the hour. A positive duration 
+        // we require two digits for the hour. A positive duration
         // with the %H flag will always give two digits
         ss << "-";
       }
       else {
         ss << "+";
       }
-      ss  << std::setw(2) << std::setfill('0') 
-          << date_time::absolute_value(td.hours()) 
+      ss  << std::setw(2) << std::setfill('0')
+          << date_time::absolute_value(td.hours())
           << separator
           << std::setw(2) << std::setfill('0')
           << date_time::absolute_value(td.minutes());
index 416c95b68be26b7a08c7f9b8d1f61770764959f5..50483634f286546b7d064ddb3c44e0a1e379c735 100644 (file)
@@ -1,11 +1,11 @@
 #ifndef _DATE_TIME_POSIX_TIME_ZONE__
-#define _DATE_TIME_POSIX_TIME_ZONE__ 
+#define _DATE_TIME_POSIX_TIME_ZONE__
 
 /* Copyright (c) 2003-2005 CrystalClear Software, Inc.
  * Subject to the Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-10-03 06:04:00 -0400 (Sat, 03 Oct 2009) $
+ * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
  */
 
 #include <string>
@@ -36,13 +36,13 @@ namespace local_time{
     bad_adjustment(std::string const& msg = std::string()) :
       std::out_of_range(std::string("Adjustment out of range: " + msg)) {}
   };
-  
+
   typedef boost::date_time::dst_adjustment_offsets<boost::posix_time::time_duration> dst_adjustment_offsets;
 
   //! A time zone class constructed from a POSIX time zone string
   /*! A POSIX time zone string takes the form of:<br>
    * "std offset dst [offset],start[/time],end[/time]" (w/no spaces)
-   * 'std' specifies the abbrev of the time zone.<br> 
+   * 'std' specifies the abbrev of the time zone.<br>
    * 'offset' is the offset from UTC.<br>
    * 'dst' specifies the abbrev of the time zone during daylight savings time.<br>
    * The second offset is how many hours changed during DST. Default=1<br>
@@ -84,10 +84,10 @@ namespace local_time{
                              string_type>::iterator tokenizer_iterator_type;
 
     //! Construct from a POSIX time zone string
-    posix_time_zone_base(const string_type& s) : 
+    posix_time_zone_base(const string_type& s) :
       //zone_names_("std_name","std_abbrev","no-dst","no-dst"),
       zone_names_(),
-      has_dst_(false), 
+      has_dst_(false),
       base_utc_offset_(posix_time::hours(0)),
       dst_offsets_(posix_time::hours(0),posix_time::hours(0),posix_time::hours(0)),
       dst_calc_rules_()
@@ -107,7 +107,7 @@ namespace local_time{
         string_type tmp_str = *it++;
         calc_rules(tmp_str, *it);
       }
-    } 
+    }
     virtual ~posix_time_zone_base() {};
     //!String for the zone when not in daylight savings (eg: EST)
     virtual string_type std_zone_abbrev()const
@@ -121,15 +121,15 @@ namespace local_time{
       return zone_names_.dst_zone_abbrev();
     }
     //!String for the zone when not in daylight savings (eg: Eastern Standard Time)
-    /*! The full STD name is not extracted from the posix time zone string. 
+    /*! The full STD name is not extracted from the posix time zone string.
      * Therefore, the STD abbreviation is used in it's place */
     virtual string_type std_zone_name()const
     {
       return zone_names_.std_zone_name();
     }
     //!String for the timezone when in daylight savings (eg: Eastern Daylight Time)
-    /*! The full DST name is not extracted from the posix time zone string. 
-     * Therefore, the STD abbreviation is used in it's place. For time zones 
+    /*! The full DST name is not extracted from the posix time zone string.
+     * Therefore, the STD abbreviation is used in it's place. For time zones
      * that have no DST, an empty string is used */
     virtual string_type dst_zone_name()const
     {
@@ -250,7 +250,7 @@ namespace local_time{
       while(std::isalpha(*sit)){
         ss << *sit++;
       }
-      l_std_zone_abbrev = ss.str(); 
+      l_std_zone_abbrev = ss.str();
       ss.str(empty_string);
 
       // get UTC offset
@@ -259,7 +259,7 @@ namespace local_time{
         while(sit != obj_end && !std::isalpha(*sit)){
           ss << *sit++;
         }
-        base_utc_offset_ = date_time::str_from_delimited_time_duration<time_duration_type,char_type>(ss.str()); 
+        base_utc_offset_ = date_time::str_from_delimited_time_duration<time_duration_type,char_type>(ss.str());
         ss.str(empty_string);
 
         // base offset must be within range of -12 hours to +14 hours
@@ -273,12 +273,12 @@ namespace local_time{
       // get DST data if given
       if(sit != obj_end){
         has_dst_ = true;
-    
+
         // get 'dst' name/abbrev
         while(sit != obj_end && std::isalpha(*sit)){
           ss << *sit++;
         }
-        l_dst_zone_abbrev = ss.str(); 
+        l_dst_zone_abbrev = ss.str();
         ss.str(empty_string);
 
         // get DST offset if given
@@ -287,7 +287,7 @@ namespace local_time{
           while(sit != obj_end && !std::isalpha(*sit)){
             ss << *sit++;
           }
-          dst_offsets_.dst_adjust_ = date_time::str_from_delimited_time_duration<time_duration_type,char_type>(ss.str());  
+          dst_offsets_.dst_adjust_ = date_time::str_from_delimited_time_duration<time_duration_type,char_type>(ss.str());
           ss.str(empty_string);
         }
         else{ // default DST offset
@@ -381,12 +381,12 @@ namespace local_time{
 #endif
       char_separator_type sep(sep_chars);
       tokenizer_type stok(s, sep), etok(e, sep);
-      
+
       tokenizer_iterator_type it = stok.begin();
       sm = lexical_cast<unsigned short>(*it++);
       sw = lexical_cast<unsigned short>(*it++);
       sd = lexical_cast<unsigned short>(*it);
-     
+
       it = etok.begin();
       em = lexical_cast<unsigned short>(*it++);
       ew = lexical_cast<unsigned short>(*it++);
@@ -395,13 +395,13 @@ namespace local_time{
       dst_calc_rules_ = shared_ptr<dst_calc_rule>(
         new nth_kday_dst_rule(
           nth_last_dst_rule::start_rule(
-            static_cast<nkday::week_num>(sw),sd,sm), 
+            static_cast<nkday::week_num>(sw),sd,sm),
           nth_last_dst_rule::start_rule(
-            static_cast<nkday::week_num>(ew),ed,em) 
+            static_cast<nkday::week_num>(ew),ed,em)
           )
       );
     }
-    
+
     //! Julian day. Feb29 is never counted, even in leap years
     // expects range of 1-365
     void julian_no_leap(const string_type& s, const string_type& e){
@@ -423,9 +423,9 @@ namespace local_time{
       dst_calc_rules_ = shared_ptr<dst_calc_rule>(
         new partial_date_dst_rule(
           partial_date_dst_rule::start_rule(
-            sd, static_cast<date_time::months_of_year>(sm)), 
+            sd, static_cast<date_time::months_of_year>(sm)),
           partial_date_dst_rule::end_rule(
-            ed, static_cast<date_time::months_of_year>(em)) 
+            ed, static_cast<date_time::months_of_year>(em))
           )
       );
     }
@@ -460,8 +460,8 @@ namespace local_time{
   };
 
   typedef posix_time_zone_base<char> posix_time_zone;
-  
+
 } } // namespace boost::local_time
 
 
-#endif // _DATE_TIME_POSIX_TIME_ZONE__ 
+#endif // _DATE_TIME_POSIX_TIME_ZONE__
index 38a3269a9319033facc31f632f388103ab1d9975..9cdb86479084bd6b7e9430cb9f714145448aafb6 100644 (file)
@@ -6,7 +6,7 @@
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-09-28 14:10:02 -0400 (Mon, 28 Sep 2009) $
+ * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
  */
 
 #include <boost/date_time/posix_time/ptime.hpp>
@@ -43,7 +43,7 @@ namespace posix_time {
   //! Convert a time_duration to a tm structure truncating any fractional seconds and zeroing fields for date components
   inline
   std::tm to_tm(const boost::posix_time::time_duration& td) {
-    std::tm timetm = std::tm();
+    std::tm timetm = {};
     timetm.tm_hour = date_time::absolute_value(td.hours());
     timetm.tm_min = date_time::absolute_value(td.minutes());
     timetm.tm_sec = date_time::absolute_value(td.seconds());
index 255129276e56297302ec9b7cc896da99bf61dc84..466331b0a19d7bf6fc8b97e8ef358d173a1dc4b8 100644 (file)
@@ -2,11 +2,11 @@
 #define POSIXTIME_FORMATTERS_HPP___
 
 /* Copyright (c) 2002-2004 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-09-28 14:10:02 -0400 (Mon, 28 Sep 2009) $
+ * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
  */
 
 #include <boost/date_time/gregorian/gregorian.hpp>
@@ -18,8 +18,8 @@
 #include <boost/date_time/time_resolution_traits.hpp> // absolute_value
 #include <boost/date_time/time_parsing.hpp>
 
-/* NOTE: The "to_*_string" code for older compilers, ones that define 
- * BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS, is located in 
+/* NOTE: The "to_*_string" code for older compilers, ones that define
+ * BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS, is located in
  * formatters_limited.hpp
  */
 
@@ -57,27 +57,27 @@ namespace posix_time {
       if(td.is_negative()) {
         ss << '-';
       }
-      ss  << std::setw(2) << std::setfill(fill_char) 
+      ss  << std::setw(2) << std::setfill(fill_char)
           << date_time::absolute_value(td.hours()) << ":";
-      ss  << std::setw(2) << std::setfill(fill_char) 
+      ss  << std::setw(2) << std::setfill(fill_char)
           << date_time::absolute_value(td.minutes()) << ":";
-      ss  << std::setw(2) << std::setfill(fill_char) 
+      ss  << std::setw(2) << std::setfill(fill_char)
           << date_time::absolute_value(td.seconds());
       //TODO the following is totally non-generic, yelling FIXME
 #if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
-      boost::int64_t frac_sec = 
+      boost::int64_t frac_sec =
         date_time::absolute_value(td.fractional_seconds());
       // JDG [7/6/02 VC++ compatibility]
       charT buff[32];
       _i64toa(frac_sec, buff, 10);
 #else
-      time_duration::fractional_seconds_type frac_sec = 
+      time_duration::fractional_seconds_type frac_sec =
         date_time::absolute_value(td.fractional_seconds());
 #endif
       if (frac_sec != 0) {
         ss  << "." << std::setw(time_duration::num_fractional_digits())
             << std::setfill(fill_char)
-          
+
           // JDG [7/6/02 VC++ compatibility]
 #if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
             << buff;
@@ -99,7 +99,7 @@ namespace posix_time {
   // template function called by wrapper functions:
   // to_*_string(time_duration) & to_*_wstring(time_duration)
   template<class charT>
-  inline std::basic_string<charT> to_iso_string_type(time_duration td) 
+  inline std::basic_string<charT> to_iso_string_type(time_duration td)
   {
     std::basic_ostringstream<charT> ss;
     if(td.is_special()) {
@@ -126,27 +126,27 @@ namespace posix_time {
       if(td.is_negative()) {
         ss << '-';
       }
-      ss  << std::setw(2) << std::setfill(fill_char) 
+      ss  << std::setw(2) << std::setfill(fill_char)
           << date_time::absolute_value(td.hours());
-      ss  << std::setw(2) << std::setfill(fill_char) 
+      ss  << std::setw(2) << std::setfill(fill_char)
           << date_time::absolute_value(td.minutes());
-      ss  << std::setw(2) << std::setfill(fill_char) 
+      ss  << std::setw(2) << std::setfill(fill_char)
           << date_time::absolute_value(td.seconds());
       //TODO the following is totally non-generic, yelling FIXME
 #if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
-      boost::int64_t frac_sec = 
+      boost::int64_t frac_sec =
         date_time::absolute_value(td.fractional_seconds());
       // JDG [7/6/02 VC++ compatibility]
       charT buff[32];
       _i64toa(frac_sec, buff, 10);
 #else
-      time_duration::fractional_seconds_type frac_sec = 
+      time_duration::fractional_seconds_type frac_sec =
         date_time::absolute_value(td.fractional_seconds());
 #endif
       if (frac_sec != 0) {
         ss  << "." << std::setw(time_duration::num_fractional_digits())
             << std::setfill(fill_char)
-          
+
           // JDG [7/6/02 VC++ compatibility]
 #if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
             << buff;
@@ -168,7 +168,7 @@ namespace posix_time {
   /*!\ingroup time_format
    */
   template<class charT>
-  inline std::basic_string<charT> to_simple_string_type(ptime t) 
+  inline std::basic_string<charT> to_simple_string_type(ptime t)
   {
     // can't use this w/gcc295, no to_simple_string_type<>(td) available
     std::basic_string<charT> ts = gregorian::to_simple_string_type<charT>(t.date());// + " ";
@@ -184,10 +184,10 @@ namespace posix_time {
     return to_simple_string_type<char>(t);
   }
 
-  // function called by wrapper functions to_*_string(time_period) 
+  // function called by wrapper functions to_*_string(time_period)
   // & to_*_wstring(time_period)
   template<class charT>
-  inline std::basic_string<charT> to_simple_string_type(time_period tp) 
+  inline std::basic_string<charT> to_simple_string_type(time_period tp)
   {
     charT beg = '[', mid = '/', end = ']';
     std::basic_string<charT> d1(to_simple_string_type<charT>(tp.begin()));
@@ -201,10 +201,10 @@ namespace posix_time {
     return to_simple_string_type<char>(tp);
   }
 
-  // function called by wrapper functions to_*_string(time_period) 
+  // function called by wrapper functions to_*_string(time_period)
   // & to_*_wstring(time_period)
   template<class charT>
-  inline std::basic_string<charT> to_iso_string_type(ptime t) 
+  inline std::basic_string<charT> to_iso_string_type(ptime t)
   {
     std::basic_string<charT> ts = gregorian::to_iso_string_type<charT>(t.date());// + "T";
     if(!t.time_of_day().is_special()) {
@@ -223,10 +223,10 @@ namespace posix_time {
   }
 
 
-  // function called by wrapper functions to_*_string(time_period) 
+  // function called by wrapper functions to_*_string(time_period)
   // & to_*_wstring(time_period)
   template<class charT>
-  inline std::basic_string<charT> to_iso_extended_string_type(ptime t) 
+  inline std::basic_string<charT> to_iso_extended_string_type(ptime t)
   {
     std::basic_string<charT> ts = gregorian::to_iso_extended_string_type<charT>(t.date());// + "T";
     if(!t.time_of_day().is_special()) {
index e4d1a6ef0a9890312628b003cdee77a53322c883..d0e959e9158a43b4996104d0e71a06d9b73d62cb 100644 (file)
@@ -2,11 +2,11 @@
 #define POSIXTIME_FORMATTERS_LIMITED_HPP___
 
 /* Copyright (c) 2002,2003 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author: Jeff Garland, Bart Garst
- * $Date: 2009-09-28 14:10:02 -0400 (Mon, 28 Sep 2009) $
+ * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
  */
 
 #include <boost/date_time/gregorian/gregorian.hpp>
@@ -16,7 +16,7 @@
 #include <boost/date_time/posix_time/posix_time_types.hpp>
 #include <boost/date_time/time_formatting_streams.hpp>
 #include <boost/date_time/time_resolution_traits.hpp> // absolute_value
+
 namespace boost {
 
 namespace posix_time {
@@ -50,27 +50,27 @@ namespace posix_time {
       if(td.is_negative()) {
         ss << '-';
       }
-      ss  << std::setw(2) << std::setfill('0') 
+      ss  << std::setw(2) << std::setfill('0')
           << date_time::absolute_value(td.hours()) << ":";
-      ss  << std::setw(2) << std::setfill('0') 
+      ss  << std::setw(2) << std::setfill('0')
           << date_time::absolute_value(td.minutes()) << ":";
-      ss  << std::setw(2) << std::setfill('0') 
+      ss  << std::setw(2) << std::setfill('0')
           << date_time::absolute_value(td.seconds());
       //TODO the following is totally non-generic, yelling FIXME
 #if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
-      boost::int64_t frac_sec = 
+      boost::int64_t frac_sec =
         date_time::absolute_value(td.fractional_seconds());
       // JDG [7/6/02 VC++ compatibility]
       char buff[32];
       _i64toa(frac_sec, buff, 10);
 #else
-      time_duration::fractional_seconds_type frac_sec = 
+      time_duration::fractional_seconds_type frac_sec =
         date_time::absolute_value(td.fractional_seconds());
 #endif
       if (frac_sec != 0) {
         ss  << "." << std::setw(time_duration::num_fractional_digits())
             << std::setfill('0')
-          
+
           // JDG [7/6/02 VC++ compatibility]
 #if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
             << buff;
@@ -85,9 +85,9 @@ namespace posix_time {
   //! Time duration in iso format -hhmmss,fffffff Example: 10:09:03,0123456
   /*!\ingroup time_format
    */
-  inline 
-  std::string 
-  to_iso_string(time_duration td) 
+  inline
+  std::string
+  to_iso_string(time_duration td)
   {
     std::ostringstream ss;
     if(td.is_special()) {
@@ -113,27 +113,27 @@ namespace posix_time {
       if(td.is_negative()) {
         ss << '-';
       }
-      ss  << std::setw(2) << std::setfill('0') 
+      ss  << std::setw(2) << std::setfill('0')
           << date_time::absolute_value(td.hours());
-      ss  << std::setw(2) << std::setfill('0') 
+      ss  << std::setw(2) << std::setfill('0')
           << date_time::absolute_value(td.minutes());
-      ss  << std::setw(2) << std::setfill('0') 
+      ss  << std::setw(2) << std::setfill('0')
           << date_time::absolute_value(td.seconds());
       //TODO the following is totally non-generic, yelling FIXME
 #if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
-      boost::int64_t frac_sec = 
+      boost::int64_t frac_sec =
         date_time::absolute_value(td.fractional_seconds());
       // JDG [7/6/02 VC++ compatibility]
       char buff[32];
       _i64toa(frac_sec, buff, 10);
 #else
-      time_duration::fractional_seconds_type frac_sec = 
+      time_duration::fractional_seconds_type frac_sec =
         date_time::absolute_value(td.fractional_seconds());
 #endif
       if (frac_sec != 0) {
         ss  << "." << std::setw(time_duration::num_fractional_digits())
             << std::setfill('0')
-          
+
           // JDG [7/6/02 VC++ compatibility]
 #if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
             << buff;
@@ -148,9 +148,9 @@ namespace posix_time {
   //! Time to simple format CCYY-mmm-dd hh:mm:ss.fffffff
   /*!\ingroup time_format
    */
-  inline 
-  std::string 
-  to_simple_string(ptime t) 
+  inline
+  std::string
+  to_simple_string(ptime t)
   {
     std::string ts = gregorian::to_simple_string(t.date());// + " ";
     if(!t.time_of_day().is_special()) {
@@ -164,9 +164,9 @@ namespace posix_time {
   //! Convert to string of form [YYYY-mmm-DD HH:MM::SS.ffffff/YYYY-mmm-DD HH:MM::SS.fffffff]
   /*!\ingroup time_format
    */
-  inline 
-  std::string 
-  to_simple_string(time_period tp) 
+  inline
+  std::string
+  to_simple_string(time_period tp)
   {
     std::string d1(to_simple_string(tp.begin()));
     std::string d2(to_simple_string(tp.last()));
@@ -176,8 +176,8 @@ namespace posix_time {
   //! Convert iso short form YYYYMMDDTHHMMSS where T is the date-time separator
   /*!\ingroup time_format
    */
-  inline 
-  std::string to_iso_string(ptime t) 
+  inline
+  std::string to_iso_string(ptime t)
   {
     std::string ts = gregorian::to_iso_string(t.date());// + "T";
     if(!t.time_of_day().is_special()) {
@@ -191,9 +191,9 @@ namespace posix_time {
   //! Convert to form YYYY-MM-DDTHH:MM:SS where T is the date-time separator
   /*!\ingroup time_format
    */
-  inline 
-  std::string 
-  to_iso_extended_string(ptime t) 
+  inline
+  std::string
+  to_iso_extended_string(ptime t)
   {
     std::string ts = gregorian::to_iso_extended_string(t.date());// + "T";
     if(!t.time_of_day().is_special()) {
index 60398dedb51fc3ef3d9ebf064bed7cdb44e8e5c3..3f27f77f4e4ab4f03d8ca7c6d5f1442767c80a96 100644 (file)
@@ -3,11 +3,11 @@
 #define _DATE_TIME_FACET__HPP__
 
 /* Copyright (c) 2004-2005 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the 
+ * Use, modification and distribution is subject to the
  * Boost Software License, Version 1.0. (See accompanying
  * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  * Author:  Martin Andrian, Jeff Garland, Bart Garst
- * $Date: 2009-10-03 06:04:00 -0400 (Sat, 03 Oct 2009) $
+ * $Date: 2010-01-10 14:17:23 -0500 (Sun, 10 Jan 2010) $
  */
 
 #include <cctype>
@@ -56,129 +56,129 @@ namespace date_time {
       static const char_type iso_time_format_specifier[18];
       static const char_type iso_time_format_extended_specifier[22];
       //default ptime format is YYYY-Mon-DD HH:MM:SS[.fff...][ zzz]
-      static const char_type default_time_format[23]; 
+      static const char_type default_time_format[23];
       // default_time_input_format uses a posix_time_zone_string instead of a time zone abbrev
-      static const char_type default_time_input_format[24]; 
+      static const char_type default_time_input_format[24];
       //default time_duration format is HH:MM:SS[.fff...]
       static const char_type default_time_duration_format[11];
   };
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::fractional_seconds_format[3] = {'%','f'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::fractional_seconds_or_none_format[3] = {'%','F'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
-  time_formats<CharT>::seconds_with_fractional_seconds_format[3] = 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
+  time_formats<CharT>::seconds_with_fractional_seconds_format[3] =
     {'%','s'};
 
   template <class CharT>
-  const typename time_formats<CharT>::char_type 
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::seconds_format[3] =  {'%','S'};
 
   template <class CharT>
-  const typename time_formats<CharT>::char_type 
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::hours_format[3] =  {'%','H'};
 
   template <class CharT>
-  const typename time_formats<CharT>::char_type 
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::unrestricted_hours_format[3] =  {'%','O'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   //time_formats<CharT>::standard_format[5] =  {'%','c',' ','%','z'};
   time_formats<CharT>::standard_format[9] =  {'%','x',' ','%','X',' ','%','z'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::zone_abbrev_format[3] =  {'%','z'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::zone_name_format[3] =  {'%','Z'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::zone_iso_format[3] =  {'%','q'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::zone_iso_extended_format[3] ={'%','Q'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::posix_zone_string_format[4] ={'%','Z','P'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::duration_seperator[2] =  {':'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::negative_sign[2] =  {'-'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::positive_sign[2] =  {'+'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::duration_sign_negative_only[3] ={'%','-'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
   time_formats<CharT>::duration_sign_always[3] ={'%','+'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
-  time_formats<CharT>::iso_time_format_specifier[18] =  
-    {'%', 'Y', '%', 'm', '%', 'd', 'T', 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
+  time_formats<CharT>::iso_time_format_specifier[18] =
+    {'%', 'Y', '%', 'm', '%', 'd', 'T',
      '%', 'H', '%', 'M', '%', 'S', '%', 'F', '%','q' };
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
-  time_formats<CharT>::iso_time_format_extended_specifier[22] =  
-    {'%', 'Y', '-', '%', 'm', '-', '%', 'd', ' ', 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
+  time_formats<CharT>::iso_time_format_extended_specifier[22] =
+    {'%', 'Y', '-', '%', 'm', '-', '%', 'd', ' ',
      '%', 'H', ':', '%', 'M', ':', '%', 'S', '%', 'F','%','Q'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
-  time_formats<CharT>::default_time_format[23] = 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
+  time_formats<CharT>::default_time_format[23] =
     {'%','Y','-','%','b','-','%','d',' ',
       '%','H',':','%','M',':','%','S','%','F',' ','%','z'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
-  time_formats<CharT>::default_time_input_format[24] = 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
+  time_formats<CharT>::default_time_input_format[24] =
     {'%','Y','-','%','b','-','%','d',' ',
       '%','H',':','%','M',':','%','S','%','F',' ','%','Z','P'};
 
-  template <class CharT>  
-  const typename time_formats<CharT>::char_type 
-  time_formats<CharT>::default_time_duration_format[11] = 
+  template <class CharT>
+  const typename time_formats<CharT>::char_type
+  time_formats<CharT>::default_time_duration_format[11] =
     {'%','O',':','%','M',':','%','S','%','F'};
 
 
 
-  /*! Facet used for format-based output of time types 
+  /*! Facet used for format-based output of time types
    * This class provides for the use of format strings to output times.  In addition
    * to the flags for formatting date elements, the following are the allowed format flags:
    *  - %x %X => default format - enables addition of more flags to default (ie. "%x %X %z")
    *  - %f => fractional seconds ".123456"
    *  - %F => fractional seconds or none: like frac sec but empty if frac sec == 0
-   *  - %s => seconds w/ fractional sec "02.123" (this is the same as "%S%f) 
+   *  - %s => seconds w/ fractional sec "02.123" (this is the same as "%S%f)
    *  - %S => seconds "02"
    *  - %z => abbreviated time zone "EDT"
    *  - %Z => full time zone name "Eastern Daylight Time"
    */
   template <class time_type,
-            class CharT, 
+            class CharT,
             class OutItrT = std::ostreambuf_iterator<CharT, std::char_traits<CharT> > >
-  class time_facet : 
+  class time_facet :
     public boost::date_time::date_facet<typename time_type::date_type , CharT, OutItrT> {
    public:
     typedef typename time_type::date_type date_type;
@@ -211,7 +211,7 @@ namespace date_time {
     static const char_type* iso_time_format_extended_specifier;
 
     //default ptime format is YYYY-Mon-DD HH:MM:SS[.fff...][ zzz]
-    static const char_type* default_time_format; 
+    static const char_type* default_time_format;
     //default time_duration format is HH:MM:SS[.fff...]
     static const char_type* default_time_duration_format;
     static std::locale::id id;
@@ -228,20 +228,20 @@ namespace date_time {
 
     //! Construct the facet with an explicitly specified format
     explicit time_facet(const char_type* a_format,
-                        period_formatter_type period_formatter = period_formatter_type(), 
-                        const special_values_formatter_type& special_value_formatter = special_values_formatter_type(), 
+                        period_formatter_type period_formatter = period_formatter_type(),
+                        const special_values_formatter_type& special_value_formatter = special_values_formatter_type(),
                         date_gen_formatter_type dg_formatter = date_gen_formatter_type(),
-                         ::size_t a_ref = 0) 
-      : base_type(a_format, 
+                         ::size_t a_ref = 0)
+      : base_type(a_format,
                   period_formatter,
-                  special_value_formatter, 
-                  dg_formatter, 
+                  special_value_formatter,
+                  dg_formatter,
                   a_ref),
         m_time_duration_format(string_type(duration_sign_negative_only) + default_time_duration_format)
     {}
 
     //! Changes format for time_duration
-    void time_duration_format(const char_type* const format) 
+    void time_duration_format(const char_type* const format)
     {
       m_time_duration_format = format;
     }
@@ -255,33 +255,33 @@ namespace date_time {
       this->m_format = iso_time_format_extended_specifier;
     }
 
-    OutItrT put(OutItrT a_next, 
-                std::ios_base& a_ios, 
-                char_type a_fill, 
-                const time_type& a_time) const 
+    OutItrT put(OutItrT a_next,
+                std::ios_base& a_ios,
+                char_type a_fill,
+                const time_type& a_time) const
     {
-      if (a_time.is_special()) { 
-        return this->do_put_special(a_next, a_ios, a_fill, 
+      if (a_time.is_special()) {
+        return this->do_put_special(a_next, a_ios, a_fill,
                               a_time.date().as_special());
       }
       string_type format(this->m_format);
 
       string_type frac_str;
       if (format.find(seconds_with_fractional_seconds_format) != string_type::npos) {
-        // replace %s with %S.nnn 
-        frac_str = 
+        // replace %s with %S.nnn
+        frac_str =
           fractional_seconds_as_string(a_time.time_of_day(), false);
         char_type sep = std::use_facet<std::numpunct<char_type> >(a_ios.getloc()).decimal_point();
-        
+
         string_type replace_string(seconds_format);
         replace_string += sep;
         replace_string += frac_str;
-        boost::algorithm::replace_all(format, 
-                                      seconds_with_fractional_seconds_format, 
+        boost::algorithm::replace_all(format,
+                                      seconds_with_fractional_seconds_format,
                                       replace_string);
       }
       /* NOTE: replacing posix_zone_string_format must be done BEFORE
-       * zone_name_format: "%ZP" & "%Z", if Z is checked first it will 
+       * zone_name_format: "%ZP" & "%Z", if Z is checked first it will
        * incorrectly replace a zone_name where a posix_string should go */
       if (format.find(posix_zone_string_format) != string_type::npos) {
         if(a_time.zone_abbrev().empty()) {
@@ -297,8 +297,8 @@ namespace date_time {
       }
       if (format.find(zone_name_format) != string_type::npos) {
         if(a_time.zone_name().empty()) {
-          /* TODO: this'll probably create problems if a user places 
-           * the zone_*_format flag in the format with a ptime. This 
+          /* TODO: this'll probably create problems if a user places
+           * the zone_*_format flag in the format with a ptime. This
            * code removes the flag from the default formats */
 
           // if zone_name() returns an empty string, we want to
@@ -315,8 +315,8 @@ namespace date_time {
       }
       if (format.find(zone_abbrev_format) != string_type::npos) {
         if(a_time.zone_abbrev(false).empty()) {
-          /* TODO: this'll probably create problems if a user places 
-           * the zone_*_format flag in the format with a ptime. This 
+          /* TODO: this'll probably create problems if a user places
+           * the zone_*_format flag in the format with a ptime. This
            * code removes the flag from the default formats */
 
           // if zone_abbrev() returns an empty string, we want to
@@ -333,8 +333,8 @@ namespace date_time {
       }
       if (format.find(zone_iso_extended_format) != string_type::npos) {
         if(a_time.zone_name(true).empty()) {
-          /* TODO: this'll probably create problems if a user places 
-           * the zone_*_format flag in the format with a ptime. This 
+          /* TODO: this'll probably create problems if a user places
+           * the zone_*_format flag in the format with a ptime. This
            * code removes the flag from the default formats */
 
           // if zone_name() returns an empty string, we want to
@@ -350,8 +350,8 @@ namespace date_time {
 
       if (format.find(zone_iso_format) != string_type::npos) {
         if(a_time.zone_abbrev(true).empty()) {
-          /* TODO: this'll probably create problems if a user places 
-           * the zone_*_format flag in the format with a ptime. This 
+          /* TODO: this'll probably create problems if a user places
+           * the zone_*_format flag in the format with a ptime. This
            * code removes the flag from the default formats */
 
           // if zone_abbrev() returns an empty string, we want to
@@ -370,13 +370,13 @@ namespace date_time {
           frac_str = fractional_seconds_as_string(a_time.time_of_day(), false);
         }
         boost::algorithm::replace_all(format,
-                                      fractional_seconds_format, 
+                                      fractional_seconds_format,
                                       frac_str);
       }
 
       if (format.find(fractional_seconds_or_none_format) != string_type::npos) {
         // replace %F with nnnnnnn or nothing if fs == 0
-        frac_str = 
+        frac_str =
           fractional_seconds_as_string(a_time.time_of_day(), true);
         if (frac_str.size()) {
           char_type sep = std::use_facet<std::numpunct<char_type> >(a_ios.getloc()).decimal_point();
@@ -384,7 +384,7 @@ namespace date_time {
           replace_string += sep;
           replace_string += frac_str;
           boost::algorithm::replace_all(format,
-                                        fractional_seconds_or_none_format, 
+                                        fractional_seconds_or_none_format,
                                         replace_string);
         }
         else {
@@ -393,46 +393,46 @@ namespace date_time {
         }
       }
 
-      return this->do_put_tm(a_next, a_ios, a_fill, 
+      return this->do_put_tm(a_next, a_ios, a_fill,
                        to_tm(a_time), format);
     }
 
     //! put function for time_duration
-    OutItrT put(OutItrT a_next, 
-                std::ios_base& a_ios, 
-                char_type a_fill, 
-                const time_duration_type& a_time_dur) const 
+    OutItrT put(OutItrT a_next,
+                std::ios_base& a_ios,
+                char_type a_fill,
+                const time_duration_type& a_time_dur) const
     {
-      if (a_time_dur.is_special()) { 
-        return this->do_put_special(a_next, a_ios, a_fill, 
+      if (a_time_dur.is_special()) {
+        return this->do_put_special(a_next, a_ios, a_fill,
                               a_time_dur.get_rep().as_special());
       }
 
       string_type format(m_time_duration_format);
       if (a_time_dur.is_negative()) {
         // replace %- with minus sign.  Should we use the numpunct facet?
-        boost::algorithm::replace_all(format, 
-                                      duration_sign_negative_only, 
+        boost::algorithm::replace_all(format,
+                                      duration_sign_negative_only,
                                       negative_sign);
           // remove all the %+ in the string with '-'
-        boost::algorithm::replace_all(format, 
-                                      duration_sign_always, 
+        boost::algorithm::replace_all(format,
+                                      duration_sign_always,
                                       negative_sign);
       }
       else { //duration is positive
         // remove all the %- combos from the string
         boost::algorithm::erase_all(format, duration_sign_negative_only);
         // remove all the %+ in the string with '+'
-        boost::algorithm::replace_all(format, 
-                                      duration_sign_always, 
+        boost::algorithm::replace_all(format,
+                                      duration_sign_always,
                                       positive_sign);
       }
 
       /*
-       * It is possible for a time duration to span more then 24 hours.  
-       * Standard time_put::put is obliged to behave the same as strftime 
-       * (See ISO 14882-2003 22.2.5.3.1 par. 1) and strftime's behavior is 
-       * unspecified for the case when tm_hour field is outside 0-23 range 
+       * It is possible for a time duration to span more then 24 hours.
+       * Standard time_put::put is obliged to behave the same as strftime
+       * (See ISO 14882-2003 22.2.5.3.1 par. 1) and strftime's behavior is
+       * unspecified for the case when tm_hour field is outside 0-23 range
        * (See ISO 9899-1999 7.23.3.5 par. 3). So we must output %H and %O
        * here ourself.
        */
@@ -453,16 +453,16 @@ namespace date_time {
 
       string_type frac_str;
       if (format.find(seconds_with_fractional_seconds_format) != string_type::npos) {
-        // replace %s with %S.nnn 
-        frac_str = 
+        // replace %s with %S.nnn
+        frac_str =
           fractional_seconds_as_string(a_time_dur, false);
         char_type sep = std::use_facet<std::numpunct<char_type> >(a_ios.getloc()).decimal_point();
-        
+
         string_type replace_string(seconds_format);
         replace_string += sep;
         replace_string += frac_str;
-        boost::algorithm::replace_all(format, 
-                                      seconds_with_fractional_seconds_format, 
+        boost::algorithm::replace_all(format,
+                                      seconds_with_fractional_seconds_format,
                                       replace_string);
       }
       if (format.find(fractional_seconds_format) != string_type::npos) {
@@ -471,13 +471,13 @@ namespace date_time {
           frac_str = fractional_seconds_as_string(a_time_dur, false);
         }
         boost::algorithm::replace_all(format,
-                                      fractional_seconds_format, 
+                                      fractional_seconds_format,
                                       frac_str);
       }
 
       if (format.find(fractional_seconds_or_none_format) != string_type::npos) {
         // replace %F with nnnnnnn or nothing if fs == 0
-        frac_str = 
+        frac_str =
           fractional_seconds_as_string(a_time_dur, true);
         if (frac_str.size()) {
           char_type sep = std::use_facet<std::numpunct<char_type> >(a_ios.getloc()).decimal_point();
@@ -485,7 +485,7 @@ namespace date_time {
           replace_string += sep;
           replace_string += frac_str;
           boost::algorithm::replace_all(format,
-                                        fractional_seconds_or_none_format, 
+                                        fractional_seconds_or_none_format,
                                         replace_string);
         }
         else {
@@ -494,12 +494,12 @@ namespace date_time {
         }
       }
 
-      return this->do_put_tm(a_next, a_ios, a_fill, 
+      return this->do_put_tm(a_next, a_ios, a_fill,
                        to_tm(a_time_dur), format);
     }
-    
-    OutItrT put(OutItrT next, std::ios_base& a_ios, 
-                char_type fill, const period_type& p) const 
+
+    OutItrT put(OutItrT next, std::ios_base& a_ios,
+                char_type fill, const period_type& p) const
     {
       return this->m_period_formatter.put_period(next, a_ios, fill,p,*this);
     }
@@ -507,12 +507,12 @@ namespace date_time {
 
   protected:
 
-    static 
-    string_type 
+    static
+    string_type
     fractional_seconds_as_string(const time_duration_type& a_time,
-                                 bool null_when_zero) 
+                                 bool null_when_zero)
     {
-      typename time_duration_type::fractional_seconds_type frac_sec = 
+      typename time_duration_type::fractional_seconds_type frac_sec =
         a_time.fractional_seconds();
 
       if (null_when_zero && (frac_sec == 0)) {
@@ -539,7 +539,7 @@ namespace date_time {
     {
       std::basic_ostringstream<char_type> ss;
       ss.imbue(std::locale::classic()); // don't want any formatting
-      ss << std::setw(width) 
+      ss << std::setw(width)
         << std::setfill(static_cast<char_type>('0'));
 #if (defined(BOOST_MSVC) && (_MSC_VER < 1300))
       // JDG [7/6/02 VC++ compatibility]
@@ -556,105 +556,105 @@ namespace date_time {
 
   };
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   std::locale::id time_facet<time_type, CharT, OutItrT>::id;
 
-  template <class time_type, class CharT, class OutItrT>  
-  const typename time_facet<time_type, CharT, OutItrT>::char_type* 
+  template <class time_type, class CharT, class OutItrT>
+  const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::fractional_seconds_format = time_formats<CharT>::fractional_seconds_format;
 
-  template <class time_type, class CharT, class OutItrT>  
-  const typename time_facet<time_type, CharT, OutItrT>::char_type* 
+  template <class time_type, class CharT, class OutItrT>
+  const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::fractional_seconds_or_none_format = time_formats<CharT>::fractional_seconds_or_none_format;
 
-  template <class time_type, class CharT, class OutItrT>  
-  const typename time_facet<time_type, CharT, OutItrT>::char_type* 
-  time_facet<time_type, CharT, OutItrT>::seconds_with_fractional_seconds_format = 
+  template <class time_type, class CharT, class OutItrT>
+  const typename time_facet<time_type, CharT, OutItrT>::char_type*
+  time_facet<time_type, CharT, OutItrT>::seconds_with_fractional_seconds_format =
     time_formats<CharT>::seconds_with_fractional_seconds_format;
 
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::zone_name_format =  time_formats<CharT>::zone_name_format;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::zone_abbrev_format =  time_formats<CharT>::zone_abbrev_format;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::zone_iso_extended_format =time_formats<CharT>::zone_iso_extended_format;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::posix_zone_string_format =time_formats<CharT>::posix_zone_string_format;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::zone_iso_format =  time_formats<CharT>::zone_iso_format;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::seconds_format =  time_formats<CharT>::seconds_format;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::hours_format =  time_formats<CharT>::hours_format;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::unrestricted_hours_format =  time_formats<CharT>::unrestricted_hours_format;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::standard_format =  time_formats<CharT>::standard_format;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::duration_seperator =  time_formats<CharT>::duration_seperator;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::negative_sign =  time_formats<CharT>::negative_sign;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::positive_sign =  time_formats<CharT>::positive_sign;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::duration_sign_negative_only =  time_formats<CharT>::duration_sign_negative_only;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::duration_sign_always =  time_formats<CharT>::duration_sign_always;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type,CharT, OutItrT>::char_type*
   time_facet<time_type,CharT, OutItrT>::iso_time_format_specifier = time_formats<CharT>::iso_time_format_specifier;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
   time_facet<time_type, CharT, OutItrT>::iso_time_format_extended_specifier = time_formats<CharT>::iso_time_format_extended_specifier;
 
-  template <class time_type, class CharT, class OutItrT>  
+  template <class time_type, class CharT, class OutItrT>
   const typename time_facet<time_type, CharT, OutItrT>::char_type*
-  time_facet<time_type, CharT, OutItrT>::default_time_format = 
+  time_facet<time_type, CharT, OutItrT>::default_time_format =
     time_formats<CharT>::default_time_format;
 
-  template <class time_type, class CharT, class OutItrT>  
-  const typename time_facet<time_type, CharT, OutItrT>::char_type* 
-  time_facet<time_type, CharT, OutItrT>::default_time_duration_format = 
+  template <class time_type, class CharT, class OutItrT>
+  const typename time_facet<time_type, CharT, OutItrT>::char_type*
+  time_facet<time_type, CharT, OutItrT>::default_time_duration_format =
     time_formats<CharT>::default_time_duration_format;
 
 
-  //! Facet for format-based input.  
+  //! Facet for format-based input.
   /*!
    */
   template <class time_type,
-            class CharT, 
+            class CharT,
             class InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> > >
-  class time_input_facet : 
+  class time_input_facet :
     public boost::date_time::date_input_facet<typename time_type::date_type , CharT, InItrT> {
     public:
       typedef typename time_type::date_type date_type;
@@ -687,13 +687,13 @@ namespace date_time {
       static const char_type* duration_seperator;
       static const char_type* iso_time_format_specifier;
       static const char_type* iso_time_format_extended_specifier;
-      static const char_type* default_time_input_format; 
+      static const char_type* default_time_input_format;
       static const char_type* default_time_duration_format;
       static std::locale::id id;
 
       //! Constructor that takes a format string for a ptime
-      explicit time_input_facet(const string_type& format, ::size_t a_ref = 0) 
-        : base_type(format, a_ref), 
+      explicit time_input_facet(const string_type& format, ::size_t a_ref = 0)
+        : base_type(format, a_ref),
           m_time_duration_format(default_time_duration_format)
       { }
 
@@ -708,16 +708,16 @@ namespace date_time {
                     sv_parser,
                     per_parser,
                     date_gen_parser,
-                    a_ref), 
+                    a_ref),
           m_time_duration_format(default_time_duration_format)
       {}
 
       //! sets default formats for ptime, local_date_time, and time_duration
-      explicit time_input_facet(::size_t a_ref = 0) 
-        : base_type(default_time_input_format, a_ref), 
+      explicit time_input_facet(::size_t a_ref = 0)
+        : base_type(default_time_input_format, a_ref),
           m_time_duration_format(default_time_duration_format)
       { }
-      
+
       //! Set the format for time_duration
       void time_duration_format(const char_type* const format) {
         m_time_duration_format = format;
@@ -730,47 +730,47 @@ namespace date_time {
       {
         this->m_format = iso_time_format_extended_specifier;
       }
-      
+
       InItrT get(InItrT& sitr,
                  InItrT& stream_end,
                  std::ios_base& a_ios,
                  period_type& p) const
       {
-        p = this->m_period_parser.get_period(sitr, 
-                                             stream_end, 
-                                             a_ios, 
-                                             p, 
-                                             time_duration_type::unit(), 
+        p = this->m_period_parser.get_period(sitr,
+                                             stream_end,
+                                             a_ios,
+                                             p,
+                                             time_duration_type::unit(),
                                              *this);
         return sitr;
       }
-      
+
       //default ptime format is YYYY-Mon-DD HH:MM:SS[.fff...][ zzz]
       //default time_duration format is %H:%M:%S%F HH:MM:SS[.fff...]
 
-      InItrT get(InItrT& sitr, 
-                 InItrT& stream_end, 
-                 std::ios_base& a_ios, 
+      InItrT get(InItrT& sitr,
+                 InItrT& stream_end,
+                 std::ios_base& a_ios,
                  time_duration_type& td) const
       {
         // skip leading whitespace
         while((sitr != stream_end) && std::isspace(*sitr)) { ++sitr; }
-        
+
         bool use_current_char = false;
-        
+
         // num_get will consume the +/-, we may need a copy if special_value
         char_type c = '\0';
         if((sitr != stream_end) && (*sitr == '-' || *sitr == '+')) {
           c = *sitr;
         }
-        
+
         typedef typename time_duration_type::hour_type hour_type;
         typedef typename time_duration_type::min_type min_type;
         typedef typename time_duration_type::sec_type sec_type;
 
-        hour_type hour = 0; 
-        min_type min = 0; 
-        sec_type sec = 0; 
+        hour_type hour = 0;
+        min_type min = 0;
+        sec_type sec = 0;
         typename time_duration_type::fractional_seconds_type frac(0);
 
         typedef std::num_get<CharT, InItrT> num_get;
@@ -779,25 +779,25 @@ namespace date_time {
           std::locale loc = std::locale(a_ios.getloc(), ng);
           a_ios.imbue(loc);
         }
-       
+
         const_itr itr(m_time_duration_format.begin());
         while (itr != m_time_duration_format.end() && (sitr != stream_end)) {
           if (*itr == '%') {
             ++itr;
             if (*itr != '%') {
               switch(*itr) {
-              case 'O': 
+              case 'O':
                 {
                   // A period may span more than 24 hours. In that case the format
                   // string should be composed with the unrestricted hours specifier.
-                  hour = var_string_to_int<hour_type, CharT>(sitr, stream_end, 
+                  hour = var_string_to_int<hour_type, CharT>(sitr, stream_end,
                                       std::numeric_limits<hour_type>::digits10 + 1);
                   if(hour == -1){
                      return check_special_value(sitr, stream_end, td, c);
                   }
                   break;
                 }
-              case 'H': 
+              case 'H':
                 {
                   match_results mr;
                   hour = fixed_string_to_int<hour_type, CharT>(sitr, stream_end, mr, 2);
@@ -806,7 +806,7 @@ namespace date_time {
                   }
                   break;
                 }
-              case 'M': 
+              case 'M':
                 {
                   match_results mr;
                   min = fixed_string_to_int<min_type, CharT>(sitr, stream_end, mr, 2);
@@ -816,7 +816,7 @@ namespace date_time {
                   break;
                 }
               case 's':
-              case 'S': 
+              case 'S':
                 {
                   match_results mr;
                   sec = fixed_string_to_int<sec_type, CharT>(sitr, stream_end, mr, 2);
@@ -833,7 +833,7 @@ namespace date_time {
                   if(*sitr == '.') {
                     ++sitr;
                     parse_frac_type(sitr, stream_end, frac);
-                    // sitr will point to next expected char after this parsing 
+                    // sitr will point to next expected char after this parsing
                     // is complete so no need to advance it
                     use_current_char = true;
                   }
@@ -842,13 +842,13 @@ namespace date_time {
                   }
                   break;
                 }
-              case 'F': 
+              case 'F':
                 {
                   // check for decimal, skip if missing
                   if(*sitr == '.') {
                     ++sitr;
                     parse_frac_type(sitr, stream_end, frac);
-                    // sitr will point to next expected char after this parsing 
+                    // sitr will point to next expected char after this parsing
                     // is complete so no need to advance it
                     use_current_char = true;
                   }
@@ -865,12 +865,12 @@ namespace date_time {
             else { // itr == '%', second consecutive
               ++sitr;
             }
-        
+
             ++itr; //advance past format specifier
           }
           else {  //skip past chars in format and in buffer
             ++itr;
-            // set use_current_char when sitr is already 
+            // set use_current_char when sitr is already
             // pointing at the next character to process
             if (use_current_char) {
               use_current_char = false;
@@ -884,21 +884,21 @@ namespace date_time {
         td = time_duration_type(hour, min, sec, frac);
         return sitr;
       }
-    
+
 
       //! Parses a time object from the input stream
-      InItrT get(InItrT& sitr, 
-                 InItrT& stream_end, 
-                 std::ios_base& a_ios, 
+      InItrT get(InItrT& sitr,
+                 InItrT& stream_end,
+                 std::ios_base& a_ios,
                  time_type& t) const
       {
         string_type tz_str;
         return get(sitr, stream_end, a_ios, t, tz_str, false);
       }
       //! Expects a time_zone in the input stream
-      InItrT get_local_time(InItrT& sitr, 
-                            InItrT& stream_end, 
-                            std::ios_base& a_ios, 
+      InItrT get_local_time(InItrT& sitr,
+                            InItrT& stream_end,
+                            std::ios_base& a_ios,
                             time_type& t,
                             string_type& tz_str) const
       {
@@ -907,19 +907,19 @@ namespace date_time {
 
     protected:
 
-      InItrT get(InItrT& sitr, 
-                 InItrT& stream_end, 
-                 std::ios_base& a_ios, 
+      InItrT get(InItrT& sitr,
+                 InItrT& stream_end,
+                 std::ios_base& a_ios,
                  time_type& t,
                  string_type& tz_str,
                  bool time_is_local) const
       {
         // skip leading whitespace
         while((sitr != stream_end) && std::isspace(*sitr)) { ++sitr; }
-        
+
         bool use_current_char = false;
         bool use_current_format_char = false; // used whith two character flags
-        
+
         // num_get will consume the +/-, we may need a copy if special_value
         char_type c = '\0';
         if((sitr != stream_end) && (*sitr == '-' || *sitr == '+')) {
@@ -931,27 +931,27 @@ namespace date_time {
         typedef typename time_duration_type::sec_type sec_type;
 
         // time elements
-        hour_type hour = 0; 
-        min_type min = 0; 
-        sec_type sec = 0; 
+        hour_type hour = 0;
+        min_type min = 0;
+        sec_type sec = 0;
         typename time_duration_type::fractional_seconds_type frac(0);
         // date elements
         short day_of_year(0);
-        /* Initialized the following to their minimum values. These intermediate 
-         * objects are used so we get specific exceptions when part of the input 
-         * is unparsable. 
+        /* Initialized the following to their minimum values. These intermediate
+         * objects are used so we get specific exceptions when part of the input
+         * is unparsable.
          * Ex: "205-Jan-15" will throw a bad_year, "2005-Jsn-15"- bad_month, etc.*/
         year_type t_year(1400);
         month_type t_month(1);
         day_type t_day(1);
-        
+
         typedef std::num_get<CharT, InItrT> num_get;
         if(!std::has_facet<num_get>(a_ios.getloc())) {
           num_get* ng = new num_get();
           std::locale loc = std::locale(a_ios.getloc(), ng);
           a_ios.imbue(loc);
         }
-       
+
         const_itr itr(this->m_format.begin());
         while (itr != this->m_format.end() && (sitr != stream_end)) {
           if (*itr == '%') {
@@ -1066,7 +1066,7 @@ namespace date_time {
                     break;
                   }
                 // time flags
-                case 'H': 
+                case 'H':
                   {
                     match_results mr;
                     hour = fixed_string_to_int<hour_type, CharT>(sitr, stream_end, mr, 2);
@@ -1075,7 +1075,7 @@ namespace date_time {
                     }
                     break;
                   }
-                case 'M': 
+                case 'M':
                   {
                     match_results mr;
                     min = fixed_string_to_int<min_type, CharT>(sitr, stream_end, mr, 2);
@@ -1085,7 +1085,7 @@ namespace date_time {
                     break;
                   }
                 case 's':
-                case 'S': 
+                case 'S':
                   {
                     match_results mr;
                     sec = fixed_string_to_int<sec_type, CharT>(sitr, stream_end, mr, 2);
@@ -1102,7 +1102,7 @@ namespace date_time {
                     if(*sitr == '.') {
                       ++sitr;
                       parse_frac_type(sitr, stream_end, frac);
-                      // sitr will point to next expected char after this parsing 
+                      // sitr will point to next expected char after this parsing
                       // is complete so no need to advance it
                       use_current_char = true;
                     }
@@ -1111,13 +1111,13 @@ namespace date_time {
                     }
                     break;
                   }
-                case 'F': 
+                case 'F':
                   {
                     // check for decimal, skip if missing
                     if(*sitr == '.') {
                       ++sitr;
                       parse_frac_type(sitr, stream_end, frac);
-                      // sitr will point to next expected char after this parsing 
+                      // sitr will point to next expected char after this parsing
                       // is complete so no need to advance it
                       use_current_char = true;
                     }
@@ -1147,34 +1147,34 @@ namespace date_time {
                       else {
                         use_current_format_char = true;
                       }
-                    
+
                     }
                     else {
                       // nothing was parsed so we don't want to advance sitr
                       use_current_char = true;
                     }
-                   
+
                     break;
                   }
                 default:
                 {} // ignore what we don't understand?
               }// switch
-            } 
+            }
             else { // itr == '%', second consecutive
               ++sitr;
             }
-       
+
             if(use_current_format_char) {
               use_current_format_char = false;
             }
             else {
               ++itr; //advance past format specifier
             }
-             
+
           }
           else {  //skip past chars in format and in buffer
             ++itr;
-            // set use_current_char when sitr is already 
+            // set use_current_char when sitr is already
             // pointing at the next character to process
             if (use_current_char) {
               use_current_char = false;
@@ -1184,7 +1184,7 @@ namespace date_time {
             }
           }
         }
-        
+
         date_type d(not_a_date_time);
         if (day_of_year > 0) {
           d = date_type(static_cast<unsigned short>(t_year-1),12,31) + date_duration_type(day_of_year);
@@ -1199,8 +1199,8 @@ namespace date_time {
       }
 
       //! Helper function to check for special_value
-      /*! First character may have been consumed during original parse 
-       * attempt. Parameter 'c' should be a copy of that character. 
+      /*! First character may have been consumed during original parse
+       * attempt. Parameter 'c' should be a copy of that character.
        * Throws ios_base::failure if parse fails. */
       template<class temporal_type>
       inline
@@ -1216,13 +1216,13 @@ namespace date_time {
           boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + tmp + "'"));
           BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return sitr); // should never reach
         }
-        tt = temporal_type(static_cast<special_values>(mr.current_match)); 
+        tt = temporal_type(static_cast<special_values>(mr.current_match));
         return sitr;
       }
 
       //! Helper function for parsing a fractional second type from the stream
-      void parse_frac_type(InItrT& sitr, 
-                           InItrT& stream_end, 
+      void parse_frac_type(InItrT& sitr,
+                           InItrT& stream_end,
                            fracional_seconds_type& frac) const
       {
         string_type cache;
@@ -1243,7 +1243,7 @@ namespace date_time {
           }
         }
       }
-      
+
     private:
       string_type m_time_duration_format;
 
@@ -1264,60 +1264,60 @@ namespace date_time {
 template <class time_type, class CharT, class InItrT>
   std::locale::id time_input_facet<time_type, CharT, InItrT>::id;
 
-template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::fractional_seconds_format = time_formats<CharT>::fractional_seconds_format;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::fractional_seconds_or_none_format = time_formats<CharT>::fractional_seconds_or_none_format;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::seconds_with_fractional_seconds_format = time_formats<CharT>::seconds_with_fractional_seconds_format;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::seconds_format = time_formats<CharT>::seconds_format;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::standard_format = time_formats<CharT>::standard_format;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::zone_abbrev_format = time_formats<CharT>::zone_abbrev_format;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::zone_name_format = time_formats<CharT>::zone_name_format;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::zone_iso_format = time_formats<CharT>::zone_iso_format;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::zone_iso_extended_format = time_formats<CharT>::zone_iso_extended_format;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::duration_seperator = time_formats<CharT>::duration_seperator;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::iso_time_format_specifier = time_formats<CharT>::iso_time_format_specifier;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::iso_time_format_extended_specifier = time_formats<CharT>::iso_time_format_extended_specifier;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::default_time_input_format = time_formats<CharT>::default_time_input_format;
 
-  template <class time_type, class CharT, class InItrT>  
-  const typename time_input_facet<time_type, CharT, InItrT>::char_type* 
+  template <class time_type, class CharT, class InItrT>
+  const typename time_input_facet<time_type, CharT, InItrT>::char_type*
   time_input_facet<time_type, CharT, InItrT>::default_time_duration_format = time_formats<CharT>::default_time_duration_format;
 
 
index 252e9f461c54e2d4573bbbc28933ff9c419a17f3..3f9297bcab99ff6c260b1c96441111a6a177fe59 100644 (file)
 
 #include <algorithm>
 #include <vector>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/range/algorithm/equal.hpp>
+#include <boost/range/algorithm/sort.hpp>
+#include <boost/range/algorithm/stable_sort.hpp>
+#include <boost/range/algorithm/find_if.hpp>
+#include <boost/range/algorithm/count.hpp>
+#include <boost/range/algorithm/count_if.hpp>
+#include <boost/range/algorithm_ext/is_sorted.hpp>
+#include <boost/range/algorithm_ext/iota.hpp>
 
 namespace boost {
 
-  template <typename Iter1, typename Iter2>
-  Iter1 begin(const std::pair<Iter1, Iter2>& p) { return p.first; }
-
-  template <typename Iter1, typename Iter2>
-  Iter2 end(const std::pair<Iter1, Iter2>& p) { return p.second; }
-
-  template <typename Iter1, typename Iter2>
-  typename boost::detail::iterator_traits<Iter1>::difference_type
-  size(const std::pair<Iter1, Iter2>& p) {
-    return std::distance(p.first, p.second);
-  }
-
-#if 0
-  // These seem to interfere with the std::pair overloads :(
-  template <typename Container>
-  typename Container::iterator
-  begin(Container& c) { return c.begin(); }
-
-  template <typename Container>
-  typename Container::const_iterator
-  begin(const Container& c) { return c.begin(); }
-
-  template <typename Container>
-  typename Container::iterator
-  end(Container& c) { return c.end(); }
-
-  template <typename Container>
-  typename Container::const_iterator
-  end(const Container& c) { return c.end(); }
-
-  template <typename Container>
-  typename Container::size_type
-  size(const Container& c) { return c.size(); }
-#else
-  template <typename T>
-  typename std::vector<T>::iterator
-  begin(std::vector<T>& c) { return c.begin(); }
-
-  template <typename T>
-  typename std::vector<T>::const_iterator
-  begin(const std::vector<T>& c) { return c.begin(); }
-
-  template <typename T>
-  typename std::vector<T>::iterator
-  end(std::vector<T>& c) { return c.end(); }
-
-  template <typename T>
-  typename std::vector<T>::const_iterator
-  end(const std::vector<T>& c) { return c.end(); }
-
-  template <typename T>
-  typename std::vector<T>::size_type
-  size(const std::vector<T>& c) { return c.size(); }
-#endif
-  
-  template <class ForwardIterator, class T>
-  void iota(ForwardIterator first, ForwardIterator last, T value)
-  {
-    for (; first != last; ++first, ++value)
-      *first = value;
-  }
-  template <typename Container, typename T>
-  void iota(Container& c, const T& value)
-  {
-    iota(begin(c), end(c), value);
-  }
-  // Also do version with 2nd container?
-  template <typename Container, typename OutIter>
-  OutIter copy(const Container& c, OutIter result) {
-    return std::copy(begin(c), end(c), result);
-  }
-
-  template <typename Container1, typename Container2>
-  bool equal(const Container1& c1, const Container2& c2)
-  {
-    if (size(c1) != size(c2))
-      return false;
-    return std::equal(begin(c1), end(c1), begin(c2));
-  }
-
-  template <typename Container>
-  void sort(Container& c) { std::sort(begin(c), end(c)); }
-
-  template <typename Container, typename Predicate>
-  void sort(Container& c, const Predicate& p) { 
-    std::sort(begin(c), end(c), p);
-  }
-
-  template <typename Container>
-  void stable_sort(Container& c) { std::stable_sort(begin(c), end(c)); }
-
-  template <typename Container, typename Predicate>
-  void stable_sort(Container& c, const Predicate& p) { 
-    std::stable_sort(begin(c), end(c), p);
-  }
-
   template <typename InputIterator, typename Predicate>
   bool any_if(InputIterator first, InputIterator last, Predicate p)
   {
     return std::find_if(first, last, p) != last;
   }
+
   template <typename Container, typename Predicate>
   bool any_if(const Container& c, Predicate p)
   {
-    return any_if(begin(c), end(c), p);
+    return any_if(boost::begin(c), boost::end(c), p);
   }
 
   template <typename InputIterator, typename T>
@@ -159,62 +74,7 @@ namespace boost {
   template <typename Container, typename T>
   bool container_contains(const Container& c, const T& value)
   {
-    return container_contains(begin(c), end(c), value);
-  }
-
-  template <typename Container, typename T>
-  std::size_t count(const Container& c, const T& value)
-  {
-    return std::count(begin(c), end(c), value);
-  }
-
-  template <typename Container, typename Predicate>
-  std::size_t count_if(const Container& c, Predicate p)
-  {
-    return std::count_if(begin(c), end(c), p);
-  }
-
-  template <typename ForwardIterator>
-  bool is_sorted(ForwardIterator first, ForwardIterator last)
-  {
-    if (first == last)
-      return true;
-
-    ForwardIterator next = first;
-    for (++next; next != last; first = next, ++next) {
-      if (*next < *first)
-        return false;
-    }
-
-    return true;
-  }
-
-  template <typename ForwardIterator, typename StrictWeakOrdering>
-  bool is_sorted(ForwardIterator first, ForwardIterator last,
-                 StrictWeakOrdering comp)
-  {
-    if (first == last)
-      return true;
-
-    ForwardIterator next = first;
-    for (++next; next != last; first = next, ++next) {
-      if (comp(*next, *first))
-        return false;
-    }
-
-    return true;
-  }
-
-  template <typename Container>
-  bool is_sorted(const Container& c)
-  {
-    return is_sorted(begin(c), end(c));
-  }
-
-  template <typename Container, typename StrictWeakOrdering>
-  bool is_sorted(const Container& c, StrictWeakOrdering comp)
-  {
-    return is_sorted(begin(c), end(c), comp);
+    return container_contains(boost::begin(c), boost::end(c), value);
   }
 
 } // namespace boost
index bc7f780b060965c5e96ed47b5ce4ec1613c9d522..67c5a21c8a1858fcb6239772e3a6c440cd91cfa8 100644 (file)
@@ -13,7 +13,9 @@
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
 
-#if ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) && defined(_GLIBCXX_DEBUG)) \
+#if defined(BOOST_DETAIL_NO_CONTAINER_FWD) \
+    || ((defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
+        && (defined(_GLIBCXX_DEBUG) || defined(_GLIBCXX_PARALLEL))) \
     || BOOST_WORKAROUND(__BORLANDC__, > 0x551) \
     || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x842)) \
     || (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
index b6c8d750018823af63f94a5892718db1d62a40a8..fccebc3f707cdec7688303f17f9e3bb22d31e641 100644 (file)
@@ -54,11 +54,23 @@ extern "C" long __cdecl InterlockedExchangeAdd( long*, long );
 
 #elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
 
+#if defined( __CLRCALL_PURE_OR_CDECL )
+
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * );
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * );
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long );
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long );
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long );
+
+#else
+
 extern "C" long __cdecl _InterlockedIncrement( long volatile * );
 extern "C" long __cdecl _InterlockedDecrement( long volatile * );
 extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
-extern "C" long __cdecl _InterlockedExchange( long volatile *, long);
-extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long);
+extern "C" long __cdecl _InterlockedExchange( long volatile *, long );
+extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
+
+#endif
 
 # pragma intrinsic( _InterlockedIncrement )
 # pragma intrinsic( _InterlockedDecrement )
index d40ca21eb3c2f4225d45d9686cfa94598b8b5f20..93abce18ce6f2eb20bffe6f68cdb33b50de3a8a1 100644 (file)
@@ -173,8 +173,8 @@ inline void lcast_set_precision(std::ios_base& stream, T*)
 template<class Source, class Target>
 inline void lcast_set_precision(std::ios_base& stream, Source*, Target*)
 {
-    std::streamsize const s = lcast_get_precision((Source*)0);
-    std::streamsize const t = lcast_get_precision((Target*)0);
+    std::streamsize const s = lcast_get_precision(static_cast<Source*>(0));
+    std::streamsize const t = lcast_get_precision(static_cast<Target*>(0));
     stream.precision(s > t ? s : t);
 }
 
index 644c1386b7a4c3f2fd5e327350b831a329eaf80c..e695a20857728e2526d0c44ea6138cfb8df8073c 100644 (file)
@@ -41,9 +41,9 @@
 
 #ifdef BOOST_NO_SCOPED_ENUMS
 
-# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_t
+# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_type
 # define BOOST_SCOPED_ENUM_END };
-# define BOOST_SCOPED_ENUM(name) name::enum_t
+# define BOOST_SCOPED_ENUM(name) name::enum_type
 
 #else
 
index e78c94316a1b0556fdffdc25c8ffc1d8e8f95c2b..636fe277bc0e867c4142bd9810e616b9b8ac6921 100644 (file)
 
 #if defined( BOOST_NO_TYPEID )
 
+#include <boost/current_function.hpp>
+#include <functional>
+
 namespace boost
 {
 
 namespace detail
 {
 
-typedef void* sp_typeinfo;
+class sp_typeinfo
+{
+private:
+
+    sp_typeinfo( sp_typeinfo const& );
+    sp_typeinfo& operator=( sp_typeinfo const& );
+
+    char const * name_;
+
+public:
+
+    explicit sp_typeinfo( char const * name ): name_( name )
+    {
+    }
+
+    bool operator==( sp_typeinfo const& rhs ) const
+    {
+        return this == &rhs;
+    }
+
+    bool operator!=( sp_typeinfo const& rhs ) const
+    {
+        return this != &rhs;
+    }
+
+    bool before( sp_typeinfo const& rhs ) const
+    {
+        return std::less< sp_typeinfo const* >()( this, &rhs );
+    }
+
+    char const* name() const
+    {
+        return name_;
+    }
+};
 
 template<class T> struct sp_typeid_
 {
-    static char v_;
+    static sp_typeinfo ti_;
+
+    static char const * name()
+    {
+        return BOOST_CURRENT_FUNCTION;
+    }
 };
 
-template<class T> char sp_typeid_< T >::v_;
+template<class T> sp_typeinfo sp_typeid_< T >::ti_( sp_typeid_< T >::name() );
+
+template<class T> struct sp_typeid_< T & >: sp_typeid_< T >
+{
+};
 
 template<class T> struct sp_typeid_< T const >: sp_typeid_< T >
 {
@@ -50,7 +96,7 @@ template<class T> struct sp_typeid_< T const volatile >: sp_typeid_< T >
 
 } // namespace boost
 
-#define BOOST_SP_TYPEID(T) (&boost::detail::sp_typeid_<T>::v_)
+#define BOOST_SP_TYPEID(T) (boost::detail::sp_typeid_<T>::ti_)
 
 #else
 
diff --git a/deal.II/contrib/boost/include/boost/dynamic_property_map.hpp b/deal.II/contrib/boost/include/boost/dynamic_property_map.hpp
deleted file mode 100644 (file)
index 58a4ac9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*=============================================================================
-Copyright (c) 2009 Trustees of Indiana University
-
-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)
-=============================================================================*/
-// Redirect/warning header, adapted from the version in Spirit
-
-#include <boost/version.hpp>
-
-#if BOOST_VERSION >= 103800
-#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
-#  pragma message ("Warning: This header is deprecated. Please use: boost/property_map/dynamic_property_map.hpp")
-#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-#  warning "This header is deprecated. Please use: boost/property_map/dynamic_property_map.hpp"
-#endif
-#endif
-
-#include <boost/property_map/dynamic_property_map.hpp>
index ff315654b0678c09add41ee0707b48847f681245..6424159c6d0e67ba8f0983672a6844c217721c3d 100644 (file)
@@ -6,8 +6,6 @@
 #ifndef UUID_1D94A7C6054E11DB9804B622A1EF5492
 #define UUID_1D94A7C6054E11DB9804B622A1EF5492
 
-//The header <boost/exception.hpp> has been deprecated.
-//Please #include <boost/exception/all.hpp> instead.
-#include <boost/exception/all.hpp>
+#error The header <boost/exception.hpp> has been deprecated. Please #include <boost/exception/all.hpp> instead.
 
 #endif
index c47738b2c6db4e2e6b98f4b3b3ca75a3e2fa9ec6..9ffe42a9d0cf15cb5abb309795df82c6e880363e 100644 (file)
@@ -5,6 +5,12 @@
 
 #ifndef UUID_316FDA946C0D11DEA9CBAE5255D89593
 #define UUID_316FDA946C0D11DEA9CBAE5255D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 #include <boost/exception/diagnostic_information.hpp>
 #include <boost/exception/error_info.hpp>
@@ -24,4 +30,7 @@
 #include <boost/exception_ptr.hpp>
 #endif
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
index 228b6ea10ec45f2c0d61e401cacdb7f7e2ed66ce..af2f15311300795128bb672a0f9f8dd7a6402e2b 100644 (file)
@@ -5,6 +5,12 @@
 
 #ifndef UUID_7E83C166200811DE885E826156D89593
 #define UUID_7E83C166200811DE885E826156D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 namespace
 boost
@@ -31,4 +37,7 @@ boost
         }
     }
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
index 1cb0763efdc97e362b91d813bf4c74d03eedb088..f6a0b5903e36bed2e827e6430e14f2a150ce9645 100644 (file)
@@ -6,9 +6,7 @@
 #ifndef UUID_61531AB0680611DEADD5846855D89593
 #define UUID_61531AB0680611DEADD5846855D89593
 
-#include <boost/config.hpp>
-
-#if defined(BOOST_MSVC)
+#if defined(_MSC_VER)
 #define BOOST_ATTRIBUTE_NORETURN __declspec(noreturn)
 #elif defined(__GNUC__)
 #define BOOST_ATTRIBUTE_NORETURN __attribute__((noreturn))
index a25d066fd1d8a5f5f648ae620447a33d7c4f5fb1..883d313a98fd85b875b64dbc1e2ea8f8e034ec05 100644 (file)
@@ -1,10 +1,16 @@
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
 
 //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)
 
 #ifndef UUID_CE6983AC753411DDA764247956D89593
 #define UUID_CE6983AC753411DDA764247956D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 #include <string>
 
@@ -19,12 +25,11 @@ boost
             {
             public:
 
-            virtual char const * tag_typeid_name() const = 0;
+            virtual std::string tag_typeid_name() const = 0;
             virtual std::string value_as_string() const = 0;
 
             protected:
 
-            virtual
             ~error_info_base() throw()
                 {
                 }
@@ -57,11 +62,14 @@ boost
 
         private:
 
-        char const * tag_typeid_name() const;
+        std::string tag_typeid_name() const;
         std::string value_as_string() const;
 
         value_type value_;
         };
     }
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
diff --git a/deal.II/contrib/boost/include/boost/exception/detail/exception_ptr.hpp b/deal.II/contrib/boost/include/boost/exception/detail/exception_ptr.hpp
new file mode 100644 (file)
index 0000000..59686e9
--- /dev/null
@@ -0,0 +1,429 @@
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+
+//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)
+
+#ifndef UUID_618474C2DE1511DEB74A388C56D89593
+#define UUID_618474C2DE1511DEB74A388C56D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
+
+#include <boost/config.hpp>
+#ifdef BOOST_NO_EXCEPTIONS
+#error This header requires exception handling to be enabled.
+#endif
+#include <boost/exception/exception.hpp>
+#include <boost/exception/info.hpp>
+#include <boost/exception/diagnostic_information.hpp>
+#include <boost/exception/detail/type_info.hpp>
+#include <boost/shared_ptr.hpp>
+#include <stdexcept>
+#include <new>
+#include <ios>
+
+namespace
+boost
+    {
+    typedef shared_ptr<exception_detail::clone_base const> exception_ptr;
+
+    exception_ptr current_exception();
+
+    template <class T>
+    inline
+    exception_ptr
+    copy_exception( T const & e )
+        {
+        try
+            {
+            throw enable_current_exception(e);
+            }
+        catch(
+        ... )
+            {
+            return current_exception();
+            }
+        }
+
+#ifndef BOOST_NO_RTTI
+    typedef error_info<struct tag_original_exception_type,std::type_info const *> original_exception_type;
+
+    inline
+    std::string
+    to_string( original_exception_type const & x )
+        {
+        return x.value()->name();
+        }
+#endif
+
+    namespace
+    exception_detail
+        {
+        struct
+        bad_alloc_:
+            boost::exception,
+            std::bad_alloc
+                {
+                };
+
+        template <int Dummy>
+        exception_ptr
+        get_bad_alloc()
+            {
+            static exception_ptr e = boost::copy_exception(
+                bad_alloc_() <<
+                throw_function("boost::current_exception()") <<
+                throw_file(__FILE__) <<
+                throw_line(__LINE__) );
+            return e;
+            }
+
+        template <int Dummy>
+        struct
+        exception_ptr_bad_alloc
+            {
+            static exception_ptr const e;
+            };
+
+        template <int Dummy>
+        exception_ptr const
+        exception_ptr_bad_alloc<Dummy>::
+        e = get_bad_alloc<Dummy>();
+        }
+
+    class
+    unknown_exception:
+        public boost::exception,
+        public std::exception
+        {
+        public:
+
+        unknown_exception()
+            {
+            }
+
+        explicit
+        unknown_exception( std::exception const & e )
+            {
+            add_original_type(e);
+            }
+
+        explicit
+        unknown_exception( boost::exception const & e ):
+            boost::exception(e)
+            {
+            add_original_type(e);
+            }
+
+        ~unknown_exception() throw()
+            {
+            }
+
+        private:
+
+        template <class E>
+        void
+        add_original_type( E const & e )
+            {
+#ifndef BOOST_NO_RTTI
+            (*this) << original_exception_type(&typeid(e));
+#endif
+            }
+        };
+
+    namespace
+    exception_detail
+        {
+        template <class T>
+        class
+        current_exception_std_exception_wrapper:
+            public T,
+            public boost::exception
+            {
+            public:
+
+            explicit
+            current_exception_std_exception_wrapper( T const & e1 ):
+                T(e1)
+                {
+                add_original_type(e1);
+                }
+
+            current_exception_std_exception_wrapper( T const & e1, boost::exception const & e2 ):
+                T(e1),
+                boost::exception(e2)
+                {
+                add_original_type(e1);
+                }
+
+            ~current_exception_std_exception_wrapper() throw()
+                {
+                }
+
+            private:
+
+            template <class E>
+            void
+            add_original_type( E const & e )
+                {
+#ifndef BOOST_NO_RTTI
+                (*this) << original_exception_type(&typeid(e));
+#endif
+                }
+            };
+
+#ifdef BOOST_NO_RTTI
+        template <class T>
+        boost::exception const *
+        get_boost_exception( T const * )
+            {
+            try
+                {
+                throw;
+                }
+            catch(
+            boost::exception & x )
+                {
+                return &x;
+                }
+            catch(...)
+                {
+                return 0;
+                }
+            }
+#else
+        template <class T>
+        boost::exception const *
+        get_boost_exception( T const * x )
+            {
+            return dynamic_cast<boost::exception const *>(x);
+            }
+#endif
+
+        template <class T>
+        inline
+        exception_ptr
+        current_exception_std_exception( T const & e1 )
+            {
+            if( boost::exception const * e2 = get_boost_exception(&e1) )
+                return boost::copy_exception(current_exception_std_exception_wrapper<T>(e1,*e2));
+            else
+                return boost::copy_exception(current_exception_std_exception_wrapper<T>(e1));
+            }
+
+        inline
+        exception_ptr
+        current_exception_unknown_exception()
+            {
+            return boost::copy_exception(unknown_exception());
+            }
+
+        inline
+        exception_ptr
+        current_exception_unknown_boost_exception( boost::exception const & e )
+            {
+            return boost::copy_exception(unknown_exception(e));
+            }
+
+        inline
+        exception_ptr
+        current_exception_unknown_std_exception( std::exception const & e )
+            {
+            if( boost::exception const * be = get_boost_exception(&e) )
+                return current_exception_unknown_boost_exception(*be);
+            else
+                return boost::copy_exception(unknown_exception(e));
+            }
+
+        inline
+        exception_ptr
+        current_exception_impl()
+            {
+            try
+                {
+                throw;
+                }
+            catch(
+            exception_detail::clone_base & e )
+                {
+                return exception_ptr(e.clone());
+                }
+            catch(
+            std::domain_error & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+            catch(
+            std::invalid_argument & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+            catch(
+            std::length_error & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+            catch(
+            std::out_of_range & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+            catch(
+            std::logic_error & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+            catch(
+            std::range_error & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+            catch(
+            std::overflow_error & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+            catch(
+            std::underflow_error & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+            catch(
+            std::ios_base::failure & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+            catch(
+            std::runtime_error & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+            catch(
+            std::bad_alloc & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+#ifndef BOOST_NO_TYPEID
+            catch(
+            std::bad_cast & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+            catch(
+            std::bad_typeid & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+#endif
+            catch(
+            std::bad_exception & e )
+                {
+                return exception_detail::current_exception_std_exception(e);
+                }
+            catch(
+            std::exception & e )
+                {
+                return exception_detail::current_exception_unknown_std_exception(e);
+                }
+            catch(
+            boost::exception & e )
+                {
+                return exception_detail::current_exception_unknown_boost_exception(e);
+                }
+            catch(
+            ... )
+                {
+                return exception_detail::current_exception_unknown_exception();
+                }
+            }
+        }
+
+    inline
+    exception_ptr
+    current_exception()
+        {
+        exception_ptr ret;
+        BOOST_ASSERT(!ret);
+        try
+            {
+            ret=exception_detail::current_exception_impl();
+            }
+        catch(
+        std::bad_alloc & )
+            {
+            ret=exception_detail::exception_ptr_bad_alloc<42>::e;
+            }
+        catch(
+        ... )
+            {
+            try
+                {
+                ret=exception_detail::current_exception_std_exception(std::bad_exception());
+                }
+            catch(
+            std::bad_alloc & )
+                {
+                ret=exception_detail::exception_ptr_bad_alloc<42>::e;
+                }
+            catch(
+            ... )
+                {
+                BOOST_ASSERT(0);
+                }
+            }
+        BOOST_ASSERT(ret);
+        return ret;
+        }
+
+    inline
+    void
+    rethrow_exception( exception_ptr const & p )
+        {
+        BOOST_ASSERT(p);
+        p->rethrow();
+        }
+
+    inline
+    std::string
+    diagnostic_information( exception_ptr const & p )
+        {
+        if( p )
+            try
+                {
+                rethrow_exception(p);
+                }
+            catch(
+            ... )
+                {
+                return current_exception_diagnostic_information();
+                }
+        return "<empty>";
+        }
+
+    inline
+    std::string
+    to_string( exception_ptr const & p )
+        {
+        std::string s='\n'+diagnostic_information(p);
+        std::string padding("  ");
+        std::string r;
+        bool f=false;
+        for( std::string::const_iterator i=s.begin(),e=s.end(); i!=e; ++i )
+            {
+            if( f )
+                r+=padding;
+            char c=*i;
+            r+=c;
+            f=(c=='\n');
+            }
+        return r;
+        }
+    }
+
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
index af59cb8d2f6a034f4fcae6a456eb163bf9c27c74..743313c1ec74d92ee1671bef871e286d64beef1c 100644 (file)
@@ -5,6 +5,12 @@
 
 #ifndef UUID_898984B4076411DD973EDFA055D89593
 #define UUID_898984B4076411DD973EDFA055D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 #include <ostream>
 
@@ -14,8 +20,21 @@ boost
     namespace
     to_string_detail
         {
-        template <class T,class CharT,class Traits>
-        char operator<<( std::basic_ostream<CharT,Traits> &, T const & );
+        struct
+        partial_ordering_helper1
+            {
+            template <class CharT,class Traits>
+            partial_ordering_helper1( std::basic_ostream<CharT,Traits> & );
+            };
+
+        struct
+        partial_ordering_helper2
+            {
+            template <class T>
+            partial_ordering_helper2( T const & );
+            };
+
+        char operator<<( partial_ordering_helper1, partial_ordering_helper2 );
 
         template <class T,class CharT,class Traits>
         struct
@@ -35,4 +54,7 @@ boost
         };
     }
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
index f535944ea297dc5c46875ffa1a565775c17e6dc6..ccf1bac3f74006920f3860385b4c5db97d51fdb9 100644 (file)
@@ -5,12 +5,19 @@
 
 #ifndef UUID_6F463AC838DF11DDA3E6909F56D89593
 #define UUID_6F463AC838DF11DDA3E6909F56D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 #include <boost/exception/detail/type_info.hpp>
 #include <iomanip>
 #include <ios>
 #include <string>
 #include <sstream>
+#include <cstdlib>
 
 namespace
 boost
@@ -21,11 +28,11 @@ boost
         template <class T>
         inline
         std::string
-        object_hex_dump( T const & x, size_t max_size=16 )
+        object_hex_dump( T const & x, std::size_t max_size=16 )
             {
             std::ostringstream s;
             s << "type: " << type_name<T>() << ", size: " << sizeof(T) << ", dump: ";
-            size_t n=sizeof(T)>max_size?max_size:sizeof(T);
+            std::size_t n=sizeof(T)>max_size?max_size:sizeof(T);
             s.fill('0');
             s.width(2);
             unsigned char const * b=reinterpret_cast<unsigned char const *>(&x);
@@ -37,4 +44,7 @@ boost
         }
     }
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
index ac0960db68af6a4aee8cb8a731e17ca2eb27d1f9..9ab1c57f539585421741f906aa6529d5d52b8423 100644 (file)
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
 
 //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)
 
 #ifndef UUID_C3E1741C754311DDB2834CCA55D89593
 #define UUID_C3E1741C754311DDB2834CCA55D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 #include <boost/detail/sp_typeinfo.hpp>
 #include <boost/current_function.hpp>
+#include <boost/config.hpp>
+#ifndef BOOST_NO_TYPEID
+#include <boost/units/detail/utility.hpp>
+#endif
+#include <string>
 
 namespace
 boost
     {
     template <class T>
     inline
-    char const *
+    std::string
     tag_type_name()
         {
 #ifdef BOOST_NO_TYPEID
         return BOOST_CURRENT_FUNCTION;
 #else
-        return typeid(T*).name();
+        return units::detail::demangle(typeid(T*).name());
 #endif
         }
 
     template <class T>
     inline
-    char const *
+    std::string
     type_name()
         {
 #ifdef BOOST_NO_TYPEID
         return BOOST_CURRENT_FUNCTION;
 #else
-        return typeid(T).name();
+        return units::detail::demangle(typeid(T).name());
 #endif
         }
 
     namespace
     exception_detail
         {
-#ifdef BOOST_NO_TYPEID
-        struct
-        type_info_
-            {
-            detail::sp_typeinfo type_;
-            char const * name_;
-
-            explicit
-            type_info_( detail::sp_typeinfo type, char const * name ):
-                type_(type),
-                name_(name)
-                {
-                }
-
-            friend
-            bool
-            operator==( type_info_ const & a, type_info_ const & b )
-                {
-                return a.type_==b.type_;
-                }
-
-            friend
-            bool
-            operator<( type_info_ const & a, type_info_ const & b )
-                {
-                return a.type_<b.type_;
-                }
-
-            char const *
-            name() const
-                {
-                return name_;
-                }
-            };
-#else
         struct
         type_info_
             {
-            detail::sp_typeinfo const * type_;
+            detail::sp_typeinfo const & type_;
 
             explicit
             type_info_( detail::sp_typeinfo const & type ):
-                type_(&type)
-                {
-                }
-
-            type_info_( detail::sp_typeinfo const & type, char const * ):
-                type_(&type)
+                type_(type)
                 {
                 }
 
-            friend
-            bool
-            operator==( type_info_ const & a, type_info_ const & b )
-                {
-                return (*a.type_)==(*b.type_);
-                }
-
             friend
             bool
             operator<( type_info_ const & a, type_info_ const & b )
                 {
-                return 0!=(a.type_->before(*b.type_));
-                }
-
-            char const *
-            name() const
-                {
-                return type_->name();
+                return 0!=(a.type_.before(b.type_));
                 }
             };
-#endif
-
-        inline
-        bool
-        operator!=( type_info_ const & a, type_info_ const & b )
-            {
-            return !(a==b);
-            }
         }
     }
 
-#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T),::boost::tag_type_name<T>())
+#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T))
 
 #ifndef BOOST_NO_RTTI
 #define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x))
 #endif
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
index 1ea9dc1bab6a4965fcd08e28e76ba4f9da896eeb..1d6bc2cc981a8451970e94eb327f5cec5cb5e6b8 100644 (file)
@@ -1,46 +1,85 @@
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
 
 //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)
 
 #ifndef UUID_0552D49838DD11DD90146B8956D89593
 #define UUID_0552D49838DD11DD90146B8956D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 #include <boost/config.hpp>
 #include <boost/exception/get_error_info.hpp>
-#include <boost/exception/detail/exception_ptr_base.hpp>
 #include <boost/utility/enable_if.hpp>
+#ifndef BOOST_NO_RTTI
+#include <boost/units/detail/utility.hpp>
+#endif
 #include <exception>
 #include <sstream>
 #include <string>
 
+#ifndef BOOST_NO_EXCEPTIONS
+#include <boost/exception/current_exception_cast.hpp>
+namespace
+boost
+    {
+    namespace
+    exception_detail
+        {
+        std::string diagnostic_information_impl( boost::exception const *, std::exception const *, bool );
+        }
+
+    inline
+    std::string
+    current_exception_diagnostic_information()
+        {
+        boost::exception const * be=current_exception_cast<boost::exception const>();
+        std::exception const * se=current_exception_cast<std::exception const>();
+        if( be || se )
+            return exception_detail::diagnostic_information_impl(be,se,true);
+        else
+            return "No diagnostic information available.";
+        }
+    }
+#endif
+
 namespace
 boost
     {
     namespace
     exception_detail
         {
-        template <class T>
-        struct
-        enable_boost_exception_overload
+        inline
+        exception const *
+        get_boost_exception( exception const * e )
+            {
+            return e;
+            }
+
+        inline
+        exception const *
+        get_boost_exception( ... )
             {
-            struct yes { char q[100]; };
-            typedef char no;
-            static yes check(exception const *);
-            static no check(...);
-            enum e { value=sizeof(check((T*)0))==sizeof(yes) };
-            };
+            return 0;
+            }
 
-        template <class T>
-        struct
-        enable_std_exception_overload
+        inline
+        std::exception const *
+        get_std_exception( std::exception const * e )
             {
-            struct yes { char q[100]; };
-            typedef char no;
-            static yes check(std::exception const *);
-            static no check(...);
-            enum e { value = !enable_boost_exception_overload<T>::value && sizeof(check((T*)0))==sizeof(yes) };
-            };
+            return e;
+            }
+
+        inline
+        std::exception const *
+        get_std_exception( ... )
+            {
+            return 0;
+            }
 
         inline
         char const *
@@ -65,12 +104,13 @@ boost
         std::string
         diagnostic_information_impl( boost::exception const * be, std::exception const * se, bool with_what )
             {
-            BOOST_ASSERT(be||se);
+            if( !be && !se )
+                return "Unknown exception.";
 #ifndef BOOST_NO_RTTI
-            if( !se )
-                se = dynamic_cast<std::exception const *>(be);
             if( !be )
-                be = dynamic_cast<boost::exception const *>(se);
+                be=dynamic_cast<boost::exception const *>(se);
+            if( !se )
+                se=dynamic_cast<std::exception const *>(be);
 #endif
             char const * wh=0;
             if( with_what && se )
@@ -97,7 +137,7 @@ boost
                 }
 #ifndef BOOST_NO_RTTI
             tmp << std::string("Dynamic exception type: ") <<
-                (be?BOOST_EXCEPTION_DYNAMIC_TYPEID(*be):BOOST_EXCEPTION_DYNAMIC_TYPEID(*se)).name() << '\n';
+                units::detail::demangle((be?BOOST_EXCEPTION_DYNAMIC_TYPEID(*be):BOOST_EXCEPTION_DYNAMIC_TYPEID(*se)).type_.name()) << '\n';
 #endif
             if( with_what && se )
                 tmp << "std::exception::what: " << wh << '\n';
@@ -110,19 +150,10 @@ boost
         }
 
     template <class T>
-    inline
-    typename enable_if<exception_detail::enable_boost_exception_overload<T>,std::string>::type
-    diagnostic_information( T const & e )
-        {
-        return exception_detail::diagnostic_information_impl(&e,0,true);
-        }
-
-    template <class T>
-    inline
-    typename enable_if<exception_detail::enable_std_exception_overload<T>,std::string>::type
+    std::string
     diagnostic_information( T const & e )
         {
-        return exception_detail::diagnostic_information_impl(0,&e,true);
+        return exception_detail::diagnostic_information_impl(exception_detail::get_boost_exception(&e),exception_detail::get_std_exception(&e),true);
         }
 
     inline
@@ -147,40 +178,7 @@ boost
         }
     }
 
-#ifndef BOOST_NO_EXCEPTIONS
-#include <boost/exception/current_exception_cast.hpp>
-namespace
-boost
-    {
-    inline
-    std::string
-    current_exception_diagnostic_information()
-        {
-        boost::exception const * be=current_exception_cast<boost::exception const>();
-        std::exception const * se=current_exception_cast<std::exception const>();
-        if( be || se )
-            return exception_detail::diagnostic_information_impl(be,se,true);
-        else
-            return "No diagnostic information available.";
-        }
-
-    inline
-    std::string
-    diagnostic_information( exception_detail::exception_ptr_base const & p )
-        {
-        if( !p._empty() )
-            try
-                {
-                p._rethrow();
-                }
-            catch(
-            ... )
-                {
-                return current_exception_diagnostic_information();
-                }
-        return "<empty>";
-        }
-    }
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
 #endif
-
 #endif
index 310ceb78d0fcd07d1aff421b8dafb36a54fc697f..ea74010c9445bb16dee101f5108ed25211da4ef9 100644 (file)
@@ -5,6 +5,12 @@
 
 #ifndef UUID_F0EE17BE6C1211DE87FF459155D89593
 #define UUID_F0EE17BE6C1211DE87FF459155D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 #include "boost/exception/info.hpp"
 #include <errno.h>
@@ -32,4 +38,7 @@ boost
         }
     }
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
index de055e035f8307443f634a1eff821bc803b5e62e..e4e75d9eefd407bd5e98c868fc8371c43b895130 100644 (file)
@@ -9,8 +9,10 @@
 namespace
 boost
     {
+    namespace exception_detail { class clone_base; };
     template <class Tag,class T> class error_info;
-    class exception_ptr;
+    template <class T> class shared_ptr;
+    typedef shared_ptr<exception_detail::clone_base const> exception_ptr;
     typedef error_info<struct errinfo_nested_exception_,exception_ptr> errinfo_nested_exception;
     }
 
index e7faf594c4b3aded37c37f960c8c11fc7fc5feda..fd516dd5ea8d0e83957de46b2bf03b593cdc6028 100644 (file)
@@ -5,6 +5,12 @@
 
 #ifndef UUID_274DA366004E11DCB1DDFE2E56D89593
 #define UUID_274DA366004E11DCB1DDFE2E56D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 namespace
 boost
@@ -126,9 +132,6 @@ boost
             }
         };
 
-    template <class E,class Tag,class T>
-    E const & operator<<( E const &, error_info<Tag,T> const & );
-
     class exception;
 
     template <class>
@@ -148,10 +151,10 @@ boost
             virtual void set( shared_ptr<error_info_base> const &, type_info_ const & ) = 0;
             virtual void add_ref() const = 0;
             virtual void release() const = 0;
+            virtual refcount_ptr<exception_detail::error_info_container> clone() const = 0;
 
             protected:
 
-            virtual
             ~error_info_container() throw()
                 {
                 }
@@ -170,6 +173,20 @@ boost
         struct get_info<throw_line>;
 
         char const * get_diagnostic_information( exception const &, char const * );
+
+        void copy_boost_exception( exception *, exception const * );
+
+        template <class E,class Tag,class T>
+        E const & set_info( E const &, error_info<Tag,T> const & );
+
+        template <class E>
+        E const & set_info( E const &, throw_function const & );
+
+        template <class E>
+        E const & set_info( E const &, throw_file const & );
+
+        template <class E>
+        E const & set_info( E const &, throw_line const & );
         }
 
     class
@@ -202,46 +219,32 @@ boost
 #endif
             ;
 
+#if (defined(__MWERKS__) && __MWERKS__<=0x3207) || (defined(_MSC_VER) && _MSC_VER<=1310)
+        public:
+#else
         private:
 
         template <class E>
-        friend
-        E const &
-        operator<<( E const & x, throw_function const & y )
-            {
-            x.throw_function_=y.v_;
-            return x;
-            }
+        friend E const & exception_detail::set_info( E const &, throw_function const & );
 
         template <class E>
-        friend
-        E const &
-        operator<<( E const & x, throw_file const & y )
-            {
-            x.throw_file_=y.v_;
-            return x;
-            }
+        friend E const & exception_detail::set_info( E const &, throw_file const & );
 
         template <class E>
-        friend
-        E const &
-        operator<<( E const & x, throw_line const & y )
-            {
-            x.throw_line_=y.v_;
-            return x;
-            }
-
-        friend char const * exception_detail::get_diagnostic_information( exception const &, char const * );
+        friend E const & exception_detail::set_info( E const &, throw_line const & );
 
         template <class E,class Tag,class T>
-        friend E const & operator<<( E const &, error_info<Tag,T> const & );
+        friend E const & exception_detail::set_info( E const &, error_info<Tag,T> const & );
+
+        friend char const * exception_detail::get_diagnostic_information( exception const &, char const * );
 
         template <class>
         friend struct exception_detail::get_info;
         friend struct exception_detail::get_info<throw_function>;
         friend struct exception_detail::get_info<throw_file>;
         friend struct exception_detail::get_info<throw_line>;
-
+        friend void exception_detail::copy_boost_exception( exception *, exception const * );
+#endif
         mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_;
         mutable char const * throw_function_;
         mutable char const * throw_file_;
@@ -254,6 +257,34 @@ boost
         {
         }
 
+    namespace
+    exception_detail
+        {
+        template <class E>
+        E const &
+        set_info( E const & x, throw_function const & y )
+            {
+            x.throw_function_=y.v_;
+            return x;
+            }
+
+        template <class E>
+        E const &
+        set_info( E const & x, throw_file const & y )
+            {
+            x.throw_file_=y.v_;
+            return x;
+            }
+
+        template <class E>
+        E const &
+        set_info( E const & x, throw_line const & y )
+            {
+            x.throw_line_=y.v_;
+            return x;
+            }
+        }
+
     ////////////////////////////////////////////////////////////////////////
 
     namespace
@@ -277,10 +308,10 @@ boost
             };
 
         struct large_size { char c[256]; };
-        large_size dispatch( exception * );
+        large_size dispatch_boost_exception( exception const * );
 
         struct small_size { };
-        small_size dispatch( void * );
+        small_size dispatch_boost_exception( void const * );
 
         template <class,int>
         struct enable_error_info_helper;
@@ -303,7 +334,7 @@ boost
         struct
         enable_error_info_return_type
             {
-            typedef typename enable_error_info_helper<T,sizeof(dispatch((T*)0))>::type type;
+            typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch_boost_exception((T*)0))>::type type;
             };
         }
 
@@ -340,7 +371,13 @@ boost
         void
         copy_boost_exception( exception * a, exception const * b )
             {
-            *a = *b;
+            refcount_ptr<error_info_container> data;
+            if( error_info_container * d=b->data_.get() )
+                data = d->clone();
+            a->throw_file_ = b->throw_file_;
+            a->throw_line_ = b->throw_line_;
+            a->throw_function_ = b->throw_function_;
+            a->data_ = data;
             }
 
         inline
@@ -393,4 +430,7 @@ boost
         }
     }
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
index 640a612f3d20b5682c99acf5144accd2463c2dd7..046f05aeefd0bf9153c4fba259bd5b45fe32f3cb 100644 (file)
@@ -5,6 +5,12 @@
 
 #ifndef UUID_1A590226753311DD9E4CCF6156D89593
 #define UUID_1A590226753311DD9E4CCF6156D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 #include <boost/exception/exception.hpp>
 #include <boost/exception/detail/error_info_impl.hpp>
@@ -118,4 +124,7 @@ boost
 #endif
     }
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
index c1b76c02cf61a7461dd104d4c1096c502d388f2e..7aeeee5385f242244926fea7a73952c2eb38a71a 100644 (file)
@@ -1,15 +1,22 @@
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
 
 //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)
 
 #ifndef UUID_8D22C4CA9CC811DCAA9133D256D89593
 #define UUID_8D22C4CA9CC811DCAA9133D256D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 #include <boost/exception/exception.hpp>
 #include <boost/exception/to_string_stub.hpp>
 #include <boost/exception/detail/error_info_impl.hpp>
 #include <boost/shared_ptr.hpp>
+#include <boost/config.hpp>
 #include <map>
 
 namespace
@@ -40,7 +47,7 @@ boost
 
     template <class Tag,class T>
     inline
-    char const *
+    std::string
     error_info<Tag,T>::
     tag_typeid_name() const
         {
@@ -90,7 +97,7 @@ boost
                     {
                     shared_ptr<error_info_base> const & p = i->second;
 #ifndef BOOST_NO_RTTI
-                    BOOST_ASSERT( BOOST_EXCEPTION_DYNAMIC_TYPEID(*p)==ti );
+                    BOOST_ASSERT( BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==ti.type_ );
 #endif
                     return p;
                     }
@@ -124,6 +131,9 @@ boost
             mutable std::string diagnostic_info_str_;
             mutable int count_;
 
+            error_info_container_impl( error_info_container_impl const & );
+            error_info_container_impl & operator=( error_info_container const & );
+
             void
             add_ref() const
                 {
@@ -136,22 +146,50 @@ boost
                 if( !--count_ )
                     delete this;
                 }
+
+            refcount_ptr<error_info_container>
+            clone() const
+                {
+                refcount_ptr<error_info_container> p;
+                error_info_container_impl * c=new error_info_container_impl;
+                p.adopt(c);
+                c->info_ = info_;
+                return p;
+                }
+            };
+
+        template <class E,class Tag,class T>
+        inline
+        E const &
+        set_info( E const & x, error_info<Tag,T> const & v )
+            {
+            typedef error_info<Tag,T> error_info_tag_t;
+            shared_ptr<error_info_tag_t> p( new error_info_tag_t(v) );
+            exception_detail::error_info_container * c=x.data_.get();
+            if( !c )
+                x.data_.adopt(c=new exception_detail::error_info_container_impl);
+            c->set(p,BOOST_EXCEPTION_STATIC_TYPEID(error_info_tag_t));
+            return x;
+            }
+
+        template <class T>
+        struct
+        derives_boost_exception
+            {
+            enum e { value = (sizeof(dispatch_boost_exception((T*)0))==sizeof(large_size)) };
             };
         }
 
     template <class E,class Tag,class T>
     inline
-    E const &
+    typename enable_if<exception_detail::derives_boost_exception<E>,E const &>::type
     operator<<( E const & x, error_info<Tag,T> const & v )
         {
-        typedef error_info<Tag,T> error_info_tag_t;
-        shared_ptr<error_info_tag_t> p( new error_info_tag_t(v) );
-        exception_detail::error_info_container * c;
-        if( !(c=x.data_.get()) )
-            x.data_.adopt(c=new exception_detail::error_info_container_impl);
-        c->set(p,BOOST_EXCEPTION_STATIC_TYPEID(error_info_tag_t));
-        return x;
+        return exception_detail::set_info(x,v);
         }
     }
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
index 38b2512626831c70e100062dd259ad6eea534491..34afe421b16fe36d4e77579bfe8fee7defbc4ba8 100644 (file)
@@ -5,6 +5,12 @@
 
 #ifndef UUID_63EE924290FB11DC87BB856555D89593
 #define UUID_63EE924290FB11DC87BB856555D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 #include <boost/exception/info.hpp>
 #include <boost/tuple/tuple.hpp>
@@ -64,4 +70,7 @@ boost
         }
     }
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
index 5d88efa4676a007e3f30cae7fdd4b93ee440d3ff..59bf83d4c01bd43ba2dba8c11fbc25d0656006ea 100644 (file)
@@ -5,6 +5,12 @@
 
 #ifndef UUID_7E48761AD92811DC9011477D56D89593
 #define UUID_7E48761AD92811DC9011477D56D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 #include <boost/utility/enable_if.hpp>
 #include <boost/exception/detail/is_output_streamable.hpp>
@@ -71,4 +77,7 @@ boost
         }
     }
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
index 4b7028144fc422ac371163bb6624ff89d328cd41..e41d3697751535349736a43c8a172add2bbcb65a 100644 (file)
@@ -5,6 +5,12 @@
 
 #ifndef UUID_E788439ED9F011DCB181F25B55D89593
 #define UUID_E788439ED9F011DCB181F25B55D89593
+#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
 
 #include <boost/exception/to_string.hpp>
 #include <boost/exception/detail/object_hex_dump.hpp>
@@ -97,4 +103,7 @@ boost
         }
     }
 
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
 #endif
index 1bae365ea01e01d2d45fa440cebfac3ec5a5c19b..d48cce9dc696c52b8aa17da0102b4fb963518f1d 100644 (file)
@@ -6,459 +6,6 @@
 #ifndef UUID_FA5836A2CADA11DC8CD47C8555D89593
 #define UUID_FA5836A2CADA11DC8CD47C8555D89593
 
-#include <boost/config.hpp>
-#ifdef BOOST_NO_EXCEPTIONS
-#error This header requires exception handling to be enabled.
-#endif
-#include <boost/exception/exception.hpp>
-#include <boost/exception/info.hpp>
-#include <boost/exception/diagnostic_information.hpp>
-#include <boost/exception/detail/type_info.hpp>
-#include <boost/shared_ptr.hpp>
-#include <stdexcept>
-#include <new>
-#include <ios>
-
-namespace
-boost
-    {
-#ifndef BOOST_NO_RTTI
-    typedef error_info<struct tag_original_exception_type,std::type_info const *> original_exception_type;
-
-    inline
-    std::string
-    to_string( original_exception_type const & x )
-        {
-        return x.value()->name();
-        }
-#endif
-
-    class exception_ptr;
-    exception_ptr current_exception();
-    void rethrow_exception( exception_ptr const & );
-
-    class
-    exception_ptr:
-        public exception_detail::exception_ptr_base
-        {
-        typedef bool exception_ptr::*unspecified_bool_type;
-        friend exception_ptr current_exception();
-        friend void rethrow_exception( exception_ptr const & );
-
-        shared_ptr<exception_detail::clone_base const> c_;
-        bool bad_alloc_;
-
-        struct
-        bad_alloc_tag
-            {
-            };
-
-        explicit
-        exception_ptr( bad_alloc_tag ):
-            bad_alloc_(true)
-            {
-            }
-
-        explicit
-        exception_ptr( shared_ptr<exception_detail::clone_base const> const & c ):
-            c_(c),
-            bad_alloc_(false)
-            {
-            BOOST_ASSERT(c);
-            }
-
-        void
-        _rethrow() const
-            {
-            BOOST_ASSERT(*this);
-            if( bad_alloc_ )
-                throw enable_current_exception(std::bad_alloc());
-            else
-                c_->rethrow();
-            }
-
-        bool
-        _empty() const
-            {
-            return !bad_alloc_ && !c_;
-            }
-
-        public:
-
-        exception_ptr():
-            bad_alloc_(false)
-            {
-            }
-
-           virtual ~exception_ptr () throw()
-             {}
-
-        operator unspecified_bool_type() const
-            {
-            return _empty() ? 0 : &exception_ptr::bad_alloc_;
-            }
-
-        friend
-        bool
-        operator==( exception_ptr const & a, exception_ptr const & b )
-            {
-            return a.c_==b.c_ && a.bad_alloc_==b.bad_alloc_;
-            }
-
-        friend
-        bool
-        operator!=( exception_ptr const & a, exception_ptr const & b )
-            {
-            return !(a==b);
-            }
-        };
-
-    class
-    unknown_exception:
-        public exception,
-        public std::exception,
-        public exception_detail::clone_base
-        {
-        public:
-
-        unknown_exception()
-            {
-            }
-
-        explicit
-        unknown_exception( std::exception const & e )
-            {
-            add_original_type(e);
-            }
-
-        explicit
-        unknown_exception( boost::exception const & e ):
-            boost::exception(e)
-            {
-            add_original_type(e);
-            }
-
-        ~unknown_exception() throw()
-            {
-            }
-
-        private:
-
-        exception_detail::clone_base const *
-        clone() const
-            {
-            return new unknown_exception(*this);
-            }
-
-        void
-        rethrow() const
-            {
-            throw*this;
-            }
-
-        template <class E>
-        void
-        add_original_type( E const & e )
-            {
-#ifndef BOOST_NO_RTTI
-            (*this) << original_exception_type(&typeid(e));
-#endif
-            }
-        };
-
-    namespace
-    exception_detail
-        {
-        template <class T>
-        class
-        current_exception_std_exception_wrapper:
-            public T,
-            public boost::exception,
-            public clone_base
-            {
-            public:
-
-            explicit
-            current_exception_std_exception_wrapper( T const & e1 ):
-                T(e1)
-                {
-                add_original_type(e1);
-                }
-
-            current_exception_std_exception_wrapper( T const & e1, boost::exception const & e2 ):
-                T(e1),
-                boost::exception(e2)
-                {
-                add_original_type(e1);
-                }
-
-            ~current_exception_std_exception_wrapper() throw()
-                {
-                }
-
-            private:
-
-            clone_base const *
-            clone() const
-                {
-                return new current_exception_std_exception_wrapper(*this);
-                }
-
-            void
-            rethrow() const
-                {
-                throw *this;
-                }
-
-            template <class E>
-            void
-            add_original_type( E const & e )
-                {
-#ifndef BOOST_NO_RTTI
-                (*this) << original_exception_type(&typeid(e));
-#endif
-                }
-            };
-
-#ifdef BOOST_NO_RTTI
-        template <class T>
-        exception const *
-        get_boost_exception( T const * )
-            {
-            try
-                {
-                throw;
-                }
-            catch(
-            exception & x )
-                {
-                return &x;
-                }
-            catch(...)
-                {
-                return 0;
-                }
-            }
-#else
-        template <class T>
-        exception const *
-        get_boost_exception( T const * x )
-            {
-            return dynamic_cast<exception const *>(x);
-            }
-#endif
-
-        template <class T>
-        inline
-        shared_ptr<clone_base const>
-        current_exception_std_exception( T const & e1 )
-            {
-            if( boost::exception const * e2 = get_boost_exception(&e1) )
-                return shared_ptr<current_exception_std_exception_wrapper<T> const>(new current_exception_std_exception_wrapper<T>(e1,*e2));
-            else
-                return shared_ptr<current_exception_std_exception_wrapper<T> const>(new current_exception_std_exception_wrapper<T>(e1));
-            }
-
-        inline
-        shared_ptr<clone_base const>
-        current_exception_unknown_exception()
-            {
-            return shared_ptr<unknown_exception const>(new unknown_exception());
-            }
-
-        inline
-        shared_ptr<clone_base const>
-        current_exception_unknown_boost_exception( boost::exception const & e )
-            {
-            return shared_ptr<unknown_exception const>(new unknown_exception(e));
-            }
-
-        inline
-        shared_ptr<clone_base const>
-        current_exception_unknown_std_exception( std::exception const & e )
-            {
-            if( boost::exception const * be = get_boost_exception(&e) )
-                return current_exception_unknown_boost_exception(*be);
-            else
-                return shared_ptr<unknown_exception const>(new unknown_exception(e));
-            }
-
-        inline
-        shared_ptr<clone_base const>
-        current_exception_impl()
-            {
-            try
-                {
-                throw;
-                }
-            catch(
-            exception_detail::clone_base & e )
-                {
-                return shared_ptr<exception_detail::clone_base const>(e.clone());
-                }
-            catch(
-            std::domain_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::invalid_argument & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::length_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::out_of_range & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::logic_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::range_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::overflow_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::underflow_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::ios_base::failure & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::runtime_error & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::bad_alloc & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-#ifndef BOOST_NO_TYPEID
-            catch(
-            std::bad_cast & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::bad_typeid & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-#endif
-            catch(
-            std::bad_exception & e )
-                {
-                return exception_detail::current_exception_std_exception(e);
-                }
-            catch(
-            std::exception & e )
-                {
-                return exception_detail::current_exception_unknown_std_exception(e);
-                }
-            catch(
-            boost::exception & e )
-                {
-                return exception_detail::current_exception_unknown_boost_exception(e);
-                }
-            catch(
-            ... )
-                {
-                return exception_detail::current_exception_unknown_exception();
-                }
-            }
-        }
-
-    inline
-    exception_ptr
-    current_exception()
-        {
-        try
-            {
-            return exception_ptr(exception_detail::current_exception_impl());
-            }
-        catch(
-        std::bad_alloc & )
-            {
-            }
-        catch(
-        ... )
-            {
-            try
-                {
-                return exception_ptr(exception_detail::current_exception_std_exception(std::bad_exception()));
-                }
-            catch(
-            std::bad_alloc & )
-                {
-                }
-            catch(
-            ... )
-                {
-                BOOST_ASSERT(0);
-                }
-            }
-        return exception_ptr(exception_ptr::bad_alloc_tag());
-        }
-
-    template <class T>
-    inline
-    exception_ptr
-    copy_exception( T const & e )
-        {
-        try
-            {
-            throw enable_current_exception(e);
-            }
-        catch(
-        ... )
-            {
-            return current_exception();
-            }
-        }
-
-    inline
-    void
-    rethrow_exception( exception_ptr const & p )
-        {
-        p._rethrow();
-        }
-
-    inline
-    std::string
-    to_string( exception_ptr const & p )
-        {
-        std::string s='\n'+diagnostic_information(p);
-        std::string padding("  ");
-        std::string r;
-        bool f=false;
-        for( std::string::const_iterator i=s.begin(),e=s.end(); i!=e; ++i )
-            {
-            if( f )
-                r+=padding;
-            char c=*i;
-            r+=c;
-            f=(c=='\n');
-            }
-        return r;
-        }
-    }
+#include <boost/exception/detail/exception_ptr.hpp>
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/flyweight.hpp b/deal.II/contrib/boost/include/boost/flyweight.hpp
new file mode 100644 (file)
index 0000000..6fe3042
--- /dev/null
@@ -0,0 +1,22 @@
+/* Copyright 2006-2008 Joaquin M Lopez Munoz.
+ * 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 http://www.boost.org/libs/flyweight for library home page.
+ */
+
+#ifndef BOOST_FLYWEIGHT_HPP
+#define BOOST_FLYWEIGHT_HPP
+
+#if defined(_MSC_VER)&&(_MSC_VER>=1200)
+#pragma once
+#endif
+
+#include <boost/flyweight/flyweight.hpp>
+#include <boost/flyweight/hashed_factory.hpp>
+#include <boost/flyweight/refcounted.hpp>
+#include <boost/flyweight/simple_locking.hpp>
+#include <boost/flyweight/static_holder.hpp>
+
+#endif
index c4663c35a873f168995c4cdf79a2f48e48e668aa..eb201a80e9ca5da9d0f7ae537a3d63475f8119b1 100644 (file)
@@ -15,8 +15,8 @@
 #include <string>
 #include <memory>
 #include <new>
-#include <typeinfo>
 #include <boost/config.hpp>
+#include <boost/detail/sp_typeinfo.hpp>
 #include <boost/assert.hpp>
 #include <boost/integer.hpp>
 #include <boost/type_traits/has_trivial_copy.hpp>
@@ -54,7 +54,9 @@
 
 // Borrowed from Boost.Python library: determines the cases where we
 // need to use std::type_info::name to compare instead of operator==.
-# if (defined(__GNUC__) && __GNUC__ >= 3) \
+#if defined( BOOST_NO_TYPEID )
+#  define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y))
+#elif (defined(__GNUC__) && __GNUC__ >= 3) \
  || defined(_AIX) \
  || (   defined(__sgi) && defined(__host_mips))
 #  include <cstring>
@@ -103,7 +105,7 @@ namespace boost {
         // For pointers to std::type_info objects
         struct type_t {
           // (get_functor_type_tag, check_functor_type_tag).
-          const BOOST_FUNCTION_STD_NS::type_info* type;
+          const detail::sp_typeinfo* type;
 
           // Whether the type is const-qualified.
           bool const_qualified;
@@ -215,12 +217,12 @@ namespace boost {
 
           case check_functor_type_tag:
             {
-              const BOOST_FUNCTION_STD_NS::type_info& check_type 
+              const detail::sp_typeinfo& check_type 
                 = *out_buffer.type.type;
 
               // Check whether we have the same type. We can add
               // cv-qualifiers, but we can't take them away.
-              if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(F))
+              if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(F))
                   && (!in_buffer.obj_ref.is_const_qualified 
                       || out_buffer.type.const_qualified)
                   && (!in_buffer.obj_ref.is_volatile_qualified
@@ -232,7 +234,7 @@ namespace boost {
             return;
 
           case get_functor_type_tag:
-            out_buffer.type.type = &typeid(F);
+            out_buffer.type.type = &BOOST_SP_TYPEID(F);
             out_buffer.type.const_qualified = in_buffer.obj_ref.is_const_qualified;
             out_buffer.type.volatile_qualified = in_buffer.obj_ref.is_volatile_qualified;
             return;
@@ -292,14 +294,14 @@ namespace boost {
           } else if (op == destroy_functor_tag)
             out_buffer.func_ptr = 0;
           else if (op == check_functor_type_tag) {
-            const BOOST_FUNCTION_STD_NS::type_info& check_type 
+            const detail::sp_typeinfo& check_type 
               = *out_buffer.type.type;
-            if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor)))
+            if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
               out_buffer.obj_ptr = &in_buffer.func_ptr;
             else
               out_buffer.obj_ptr = 0;
           } else /* op == get_functor_type_tag */ {
-            out_buffer.type.type = &typeid(Functor);
+            out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
             out_buffer.type.const_qualified = false;
             out_buffer.type.volatile_qualified = false;
           }
@@ -322,14 +324,14 @@ namespace boost {
             // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type.
             reinterpret_cast<functor_type*>(&out_buffer.data)->~Functor();
           } else if (op == check_functor_type_tag) {
-            const BOOST_FUNCTION_STD_NS::type_info& check_type 
+            const detail::sp_typeinfo& check_type 
               = *out_buffer.type.type;
-            if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor)))
+            if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
               out_buffer.obj_ptr = &in_buffer.data;
             else
               out_buffer.obj_ptr = 0;
           } else /* op == get_functor_type_tag */ {
-            out_buffer.type.type = &typeid(Functor);
+            out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
             out_buffer.type.const_qualified = false;
             out_buffer.type.volatile_qualified = false;            
           }
@@ -381,14 +383,14 @@ namespace boost {
             delete f;
             out_buffer.obj_ptr = 0;
           } else if (op == check_functor_type_tag) {
-            const BOOST_FUNCTION_STD_NS::type_info& check_type
+            const detail::sp_typeinfo& check_type
               = *out_buffer.type.type;
-            if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor)))
+            if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
               out_buffer.obj_ptr = in_buffer.obj_ptr;
             else
               out_buffer.obj_ptr = 0;
           } else /* op == get_functor_type_tag */ {
-            out_buffer.type.type = &typeid(Functor);
+            out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
             out_buffer.type.const_qualified = false;
             out_buffer.type.volatile_qualified = false;
           }
@@ -423,7 +425,7 @@ namespace boost {
           typedef typename get_function_tag<functor_type>::type tag_type;
           switch (op) {
           case get_functor_type_tag:
-            out_buffer.type.type = &typeid(functor_type);
+            out_buffer.type.type = &BOOST_SP_TYPEID(functor_type);
             out_buffer.type.const_qualified = false;
             out_buffer.type.volatile_qualified = false;
             return;
@@ -492,14 +494,14 @@ namespace boost {
             wrapper_allocator.deallocate(victim,1);
             out_buffer.obj_ptr = 0;
           } else if (op == check_functor_type_tag) {
-            const BOOST_FUNCTION_STD_NS::type_info& check_type 
+            const detail::sp_typeinfo& check_type 
               = *out_buffer.type.type;
-            if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, typeid(Functor)))
+            if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor)))
               out_buffer.obj_ptr = in_buffer.obj_ptr;
             else
               out_buffer.obj_ptr = 0;
           } else /* op == get_functor_type_tag */ {
-            out_buffer.type.type = &typeid(Functor);
+            out_buffer.type.type = &BOOST_SP_TYPEID(Functor);
             out_buffer.type.const_qualified = false;
             out_buffer.type.volatile_qualified = false;
           }
@@ -526,7 +528,7 @@ namespace boost {
           typedef typename get_function_tag<functor_type>::type tag_type;
           switch (op) {
           case get_functor_type_tag:
-            out_buffer.type.type = &typeid(functor_type);
+            out_buffer.type.type = &BOOST_SP_TYPEID(functor_type);
             out_buffer.type.const_qualified = false;
             out_buffer.type.volatile_qualified = false;
             return;
@@ -627,11 +629,11 @@ public:
   /** Determine if the function is empty (i.e., has no target). */
   bool empty() const { return !vtable; }
 
-  /** Retrieve the type of the stored function object, or typeid(void)
+  /** Retrieve the type of the stored function object, or BOOST_SP_TYPEID(void)
       if this is empty. */
-  const BOOST_FUNCTION_STD_NS::type_info& target_type() const
+  const detail::sp_typeinfo& target_type() const
   {
-    if (!vtable) return typeid(void);
+    if (!vtable) return BOOST_SP_TYPEID(void);
 
     detail::function::function_buffer type;
     get_vtable()->manager(functor, type, detail::function::get_functor_type_tag);
@@ -644,7 +646,7 @@ public:
       if (!vtable) return 0;
 
       detail::function::function_buffer type_result;
-      type_result.type.type = &typeid(Functor);
+      type_result.type.type = &BOOST_SP_TYPEID(Functor);
       type_result.type.const_qualified = is_const<Functor>::value;
       type_result.type.volatile_qualified = is_volatile<Functor>::value;
       get_vtable()->manager(functor, type_result, 
@@ -662,7 +664,7 @@ public:
       if (!vtable) return 0;
 
       detail::function::function_buffer type_result;
-      type_result.type.type = &typeid(Functor);
+      type_result.type.type = &BOOST_SP_TYPEID(Functor);
       type_result.type.const_qualified = true;
       type_result.type.volatile_qualified = is_volatile<Functor>::value;
       get_vtable()->manager(functor, type_result, 
diff --git a/deal.II/contrib/boost/include/boost/functional/factory.hpp b/deal.II/contrib/boost/include/boost/functional/factory.hpp
new file mode 100644 (file)
index 0000000..4aa4267
--- /dev/null
@@ -0,0 +1,163 @@
+/*=============================================================================
+    Copyright (c) 2007 Tobias Schwinger
+  
+    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).
+==============================================================================*/
+
+#ifndef BOOST_FUNCTIONAL_FACTORY_HPP_INCLUDED
+#   ifndef BOOST_PP_IS_ITERATING
+
+#     include <boost/preprocessor/iteration/iterate.hpp>
+#     include <boost/preprocessor/repetition/enum_params.hpp>
+#     include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+#     include <new>
+#     include <boost/pointee.hpp>
+#     include <boost/none_t.hpp>
+#     include <boost/get_pointer.hpp>
+#     include <boost/non_type.hpp>
+#     include <boost/type_traits/remove_cv.hpp>
+
+#     ifndef BOOST_FUNCTIONAL_FACTORY_MAX_ARITY
+#       define BOOST_FUNCTIONAL_FACTORY_MAX_ARITY 10
+#     elif BOOST_FUNCTIONAL_FACTORY_MAX_ARITY < 3
+#       undef  BOOST_FUNCTIONAL_FACTORY_MAX_ARITY
+#       define BOOST_FUNCTIONAL_FACTORY_MAX_ARITY 3
+#     endif
+
+namespace boost
+{
+    enum factory_alloc_propagation
+    {
+        factory_alloc_for_pointee_and_deleter,
+        factory_passes_alloc_to_smart_pointer
+    };
+
+    template< typename Pointer, class Allocator = boost::none_t,
+        factory_alloc_propagation AP = factory_alloc_for_pointee_and_deleter >
+    class factory;
+
+    //----- ---- --- -- - -  -   -
+
+    template< typename Pointer, factory_alloc_propagation AP >
+    class factory<Pointer, boost::none_t, AP> 
+    {
+      public:
+        typedef typename boost::remove_cv<Pointer>::type result_type;
+        typedef typename boost::pointee<result_type>::type value_type;
+
+        factory()
+        { }
+
+#     define BOOST_PP_FILENAME_1 <boost/functional/factory.hpp>
+#     define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUNCTIONAL_FACTORY_MAX_ARITY)
+#     include BOOST_PP_ITERATE()
+    };
+
+    template< class Pointer, class Allocator, factory_alloc_propagation AP >
+    class factory
+        : private Allocator::template rebind< typename boost::pointee<
+            typename boost::remove_cv<Pointer>::type >::type >::other
+    {
+      public:
+        typedef typename boost::remove_cv<Pointer>::type result_type;
+        typedef typename boost::pointee<result_type>::type value_type;
+
+        typedef typename Allocator::template rebind<value_type>::other
+            allocator_type;
+
+        explicit factory(allocator_type const & a = allocator_type())
+          : allocator_type(a)
+        { }
+
+      private:
+
+        struct deleter
+            : allocator_type
+        {
+            inline deleter(allocator_type const& that) 
+              : allocator_type(that)
+            { }
+
+            allocator_type& get_allocator() const
+            {
+                return *const_cast<allocator_type*>(
+                    static_cast<allocator_type const*>(this));
+            }
+
+            void operator()(value_type* ptr) const
+            {
+                if (!! ptr) ptr->~value_type();
+                const_cast<allocator_type*>(static_cast<allocator_type const*>(
+                    this))->deallocate(ptr,1);
+            }
+        };
+
+        inline allocator_type& get_allocator() const
+        {
+            return *const_cast<allocator_type*>(
+                static_cast<allocator_type const*>(this));
+        }
+
+        inline result_type make_pointer(value_type* ptr, boost::non_type<
+            factory_alloc_propagation,factory_passes_alloc_to_smart_pointer>)
+        const
+        {
+            return result_type(ptr,deleter(this->get_allocator()));
+        }
+        inline result_type make_pointer(value_type* ptr, boost::non_type<
+            factory_alloc_propagation,factory_alloc_for_pointee_and_deleter>)
+        const
+        {
+            return result_type(ptr,deleter(this->get_allocator()),
+                this->get_allocator());
+        }
+
+      public:
+
+#     define BOOST_TMP_MACRO
+#     define BOOST_PP_FILENAME_1 <boost/functional/factory.hpp>
+#     define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUNCTIONAL_FACTORY_MAX_ARITY)
+#     include BOOST_PP_ITERATE()
+#     undef BOOST_TMP_MACRO
+    };
+
+    template< typename Pointer, class Allocator, factory_alloc_propagation AP > 
+    class factory<Pointer&, Allocator, AP>;
+    // forbidden, would create a dangling reference
+}
+
+#     define BOOST_FUNCTIONAL_FACTORY_HPP_INCLUDED
+#   else // defined(BOOST_PP_IS_ITERATING)
+#     define N BOOST_PP_ITERATION()
+#     if !defined(BOOST_TMP_MACRO)
+#       if N > 0
+    template< BOOST_PP_ENUM_PARAMS(N, typename T) >
+#       endif
+    inline result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const
+    {
+        return result_type( new value_type(BOOST_PP_ENUM_PARAMS(N,a)) );
+    }
+#     else // defined(BOOST_TMP_MACRO)
+#       if N > 0
+    template< BOOST_PP_ENUM_PARAMS(N, typename T) >
+#       endif
+    inline result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const
+    {
+        value_type* memory = this->get_allocator().allocate(1);
+        try
+        { 
+            return make_pointer(
+                new(memory) value_type(BOOST_PP_ENUM_PARAMS(N,a)),
+                boost::non_type<factory_alloc_propagation,AP>() );
+        }
+        catch (...) { this->get_allocator().deallocate(memory,1); throw; }
+    }
+#     endif
+#     undef N
+#   endif // defined(BOOST_PP_IS_ITERATING)
+
+#endif // include guard
+
diff --git a/deal.II/contrib/boost/include/boost/functional/forward_adapter.hpp b/deal.II/contrib/boost/include/boost/functional/forward_adapter.hpp
new file mode 100644 (file)
index 0000000..c6e61a9
--- /dev/null
@@ -0,0 +1,472 @@
+/*=============================================================================
+    Copyright (c) 2007-2008 Tobias Schwinger
+  
+    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).  
+==============================================================================*/
+
+#ifndef BOOST_FUNCTIONAL_FORWARD_ADAPTER_HPP_INCLUDED
+#   ifndef BOOST_PP_IS_ITERATING
+
+#   include <boost/config.hpp>
+#   include <boost/detail/workaround.hpp>
+
+#   include <boost/preprocessor/iteration/iterate.hpp>
+#   include <boost/preprocessor/repetition/enum_params.hpp>
+#   include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#   include <boost/preprocessor/facilities/intercept.hpp>
+#   include <boost/preprocessor/arithmetic/dec.hpp>
+
+#   include <boost/utility/result_of.hpp>
+
+#   ifndef BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY
+#     define BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY 6
+#   elif BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY < 3
+#     undef  BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY
+#     define BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY 3
+#   endif
+
+
+namespace boost 
+{
+    template< typename Function, int Arity_Or_MinArity = -1, int MaxArity = -1 >
+    class forward_adapter;
+
+    //----- ---- --- -- - -  -   -
+
+    namespace detail
+    {
+        template< class MostDerived, typename Function, typename FunctionConst, 
+            int Arity, int MinArity >
+        struct forward_adapter_impl;
+
+        struct forward_adapter_result
+        {
+            template< typename Sig > struct apply;
+
+            // Utility metafunction for qualification adjustment on arguments
+            template< typename T > struct q          { typedef T const t; };
+            template< typename T > struct q<T const> { typedef T const t; };
+            template< typename T > struct q<T &>     { typedef T       t; };
+
+            // Utility metafunction to choose target function qualification
+            template< typename T > struct c
+            { typedef typename T::target_function_t t; };
+            template< typename T > struct c<T&      >
+            { typedef typename T::target_function_t t; };
+            template< typename T > struct c<T const >
+            { typedef typename T::target_function_const_t t; };
+            template< typename T > struct c<T const&>
+            { typedef typename T::target_function_const_t t; };
+        };
+    }
+
+#   define BOOST_TMP_MACRO(f,fn,fc) \
+        boost::detail::forward_adapter_impl< \
+            forward_adapter<f,Arity_Or_MinArity,MaxArity>, fn, fc, \
+            (MaxArity!=-1? MaxArity :Arity_Or_MinArity!=-1? Arity_Or_MinArity \
+                :BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY), \
+            (Arity_Or_MinArity!=-1? Arity_Or_MinArity : 0) >
+
+    template< typename Function, int Arity_Or_MinArity, int MaxArity >
+    class forward_adapter
+        : public BOOST_TMP_MACRO(Function,Function,Function const)
+        , private Function
+    {
+      public:
+        forward_adapter(Function const& f = Function()) 
+          : Function(f) 
+        { }
+
+        typedef Function        target_function_t;
+        typedef Function const  target_function_const_t;
+
+        Function       & target_function()       { return *this; }
+        Function const & target_function() const { return *this; }
+
+        template< typename Sig > struct result
+            : detail::forward_adapter_result::template apply<Sig>
+        { };
+
+        using BOOST_TMP_MACRO(Function,Function, Function const)::operator();
+    };
+    template< typename Function, int Arity_Or_MinArity, int MaxArity >
+    class forward_adapter< Function const, Arity_Or_MinArity, MaxArity >
+        : public BOOST_TMP_MACRO(Function const, Function const, Function const)
+        , private Function
+    {
+      public:
+        forward_adapter(Function const& f = Function())
+          : Function(f) 
+        { }
+
+        typedef Function const target_function_t;
+        typedef Function const target_function_const_t;
+
+        Function const & target_function() const { return *this; }
+
+        template< typename Sig > struct result
+            : detail::forward_adapter_result::template apply<Sig>
+        { };
+
+        using BOOST_TMP_MACRO(Function const,Function const, Function const)
+            ::operator();
+    };
+    template< typename Function, int Arity_Or_MinArity, int MaxArity >
+    class forward_adapter< Function &, Arity_Or_MinArity, MaxArity >
+        : public BOOST_TMP_MACRO(Function&, Function, Function)
+    {
+        Function& ref_function;
+      public:
+        forward_adapter(Function& f)
+          : ref_function(f) 
+        { }
+
+        typedef Function target_function_t;
+        typedef Function target_function_const_t;
+
+        Function & target_function() const { return this->ref_function; }
+
+        template< typename Sig > struct result
+            : detail::forward_adapter_result::template apply<Sig>
+        { };
+
+        using BOOST_TMP_MACRO(Function&, Function, Function)::operator();
+    }; 
+
+    #undef BOOST_TMP_MACRO
+
+    namespace detail
+    {
+        template< class Self >
+        struct forward_adapter_result::apply< Self() >
+            : boost::result_of< typename c<Self>::t() >
+        { };
+
+        template< class MD, class F, class FC >
+        struct forward_adapter_impl<MD,F,FC,0,0>
+        {
+            inline typename boost::result_of< FC() >::type
+            operator()() const
+            {
+                return static_cast<MD const*>(this)->target_function()();
+            }
+
+            inline typename boost::result_of< F() >::type
+            operator()()
+            {
+                return static_cast<MD*>(this)->target_function()();
+            }
+
+        // closing brace gets generated by preprocessing code, below
+
+#       define BOOST_TMP_MACRO(tpl_params,arg_types,params,args)              \
+            template< tpl_params >                                             \
+            inline typename boost::result_of< FC(arg_types) >::type            \
+            operator()(params) const                                           \
+            {                                                                  \
+                return static_cast<MD const*>(this)->target_function()(args);  \
+            }                                                                  \
+            template< tpl_params >                                             \
+            inline typename boost::result_of< F(arg_types)>::type              \
+            operator()(params)                                                 \
+            {                                                                  \
+                return static_cast<MD*>(this)->target_function()(args);        \
+            }
+
+#       // This is the total number of iterations we need
+#       define count ((1 << BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY+1)-2)
+
+#       // Chain file iteration to virtually one loop
+#       if BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY <= 7
+#         define limit1 count
+#         define limit2 0
+#         define limit3 0
+#       else
+#         if BOOST_FUNCTIONAL_FORWARD_ADAPTER_MAX_ARITY <= 15
+#           define limit1 (count >> 8)
+#           define limit2 255
+#           define limit3 0
+#         else
+#           define limit1 (count >> 16)
+#           define limit2 255
+#           define limit3 255
+#         endif
+#       endif
+
+#       define N 0
+
+#       define  BOOST_PP_FILENAME_1 <boost/functional/forward_adapter.hpp>
+#       define  BOOST_PP_ITERATION_LIMITS (0,limit1)
+#       include BOOST_PP_ITERATE()
+
+#       undef N
+#       undef limit3
+#       undef limit2
+#       undef limit1
+#       undef count
+#       undef BOOST_TMP_MACRO
+
+        };
+
+    } // namespace detail
+
+    template<class F, int A0, int A1>
+    struct result_of<boost::forward_adapter<F,A0,A1> const ()>
+        : boost::detail::forward_adapter_result::template apply<
+            boost::forward_adapter<F,A0,A1> const () >
+    { };
+    template<class F, int A0, int A1>
+    struct result_of<boost::forward_adapter<F,A0,A1>()>
+        : boost::detail::forward_adapter_result::template apply<
+            boost::forward_adapter<F,A0,A1>() >
+    { };
+    template<class F, int A0, int A1>
+    struct result_of<boost::forward_adapter<F,A0,A1> const& ()>
+        : boost::detail::forward_adapter_result::template apply<
+            boost::forward_adapter<F,A0,A1> const () >
+    { };
+    template<class F, int A0, int A1>
+    struct result_of<boost::forward_adapter<F,A0,A1>& ()>
+        : boost::detail::forward_adapter_result::template apply<
+            boost::forward_adapter<F,A0,A1>() >
+    { };
+}
+
+#       define BOOST_FUNCTIONAL_FORWARD_ADAPTER_HPP_INCLUDED
+
+#   elif BOOST_PP_ITERATION_DEPTH() == 1 && limit2
+#     define  BOOST_PP_FILENAME_2 <boost/functional/forward_adapter.hpp>
+#     define  BOOST_PP_ITERATION_LIMITS (0,limit2)
+#     include BOOST_PP_ITERATE()
+#   elif BOOST_PP_ITERATION_DEPTH() == 2 && limit3
+#     define  BOOST_PP_FILENAME_3 <boost/functional/forward_adapter.hpp>
+#     define  BOOST_PP_ITERATION_LIMITS (0,limit3)
+#     include BOOST_PP_ITERATE()
+
+#   else
+
+#     // I is the loop counter
+#     if limit2 && limit3
+#       define I (BOOST_PP_ITERATION_1 << 16 | BOOST_PP_ITERATION_2 << 8 | \
+            BOOST_PP_ITERATION_3)
+#     elif limit2
+#       define I (BOOST_PP_ITERATION_1 << 8 | BOOST_PP_ITERATION_2)
+#     else
+#       define I BOOST_PP_ITERATION_1
+#     endif
+
+#     if I < count
+
+#       // Done for this arity? Increment N
+#       if (I+2 >> N+1) 
+#         if N == 0
+#           undef N
+#           define N 1
+#         elif N == 1
+#           undef N
+#           define N 2
+#         elif N == 2
+#           undef N
+#           define N 3
+#         elif N == 3
+#           undef N
+#           define N 4
+#         elif N == 4
+#           undef N
+#           define N 5
+#         elif N == 5
+#           undef N
+#           define N 6
+#         elif N == 6
+#           undef N
+#           define N 7
+#         elif N == 7
+#           undef N
+#           define N 8
+#         elif N == 8
+#           undef N
+#           define N 9
+#         elif N == 9
+#           undef N
+#           define N 10
+#         elif N == 10
+#           undef N
+#           define N 11
+#         elif N == 11
+#           undef N
+#           define N 12
+#         elif N == 12
+#           undef N
+#           define N 13
+#         elif N == 13
+#           undef N
+#           define N 14
+#         elif N == 14
+#           undef N
+#           define N 15
+#         elif N == 15
+#           undef N
+#           define N 16
+#         endif
+
+        };
+
+        template< class Self, BOOST_PP_ENUM_PARAMS(N,typename T) >
+        struct forward_adapter_result::apply< Self(BOOST_PP_ENUM_PARAMS(N,T)) >
+            : boost::result_of< 
+                typename c<Self>::t(BOOST_PP_ENUM_BINARY_PARAMS(N, 
+                      typename q<T,>::t& BOOST_PP_INTERCEPT)) >
+        { };
+
+        template< class MD, class F, class FC >
+        struct forward_adapter_impl<MD,F,FC,BOOST_PP_DEC(N),N>
+        {
+            template< BOOST_PP_ENUM_PARAMS(N,typename T) >
+            inline typename boost::result_of< F(
+                BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)) >::type
+            operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT));
+        };
+
+        template< class MD, class F, class FC, int MinArity >
+        struct forward_adapter_impl<MD,F,FC,N,MinArity>
+            : forward_adapter_impl<MD,F,FC,BOOST_PP_DEC(N),MinArity>
+        {
+            using forward_adapter_impl<MD,F,FC,BOOST_PP_DEC(N),MinArity>::operator();
+
+#       endif
+
+#       // Zero based count for each arity would be I-(1<<N)+2, but we don't
+#       // need it, unless we need a nicer order.
+
+#       // Macros for the parameter's type modifiers.
+#       if I & 0x000001
+#         define PT0 T0 &
+#       else
+#         define PT0 T0 const &
+#       endif
+#       if I & 0x000002
+#         define PT1 T1 &
+#       else
+#         define PT1 T1 const &
+#       endif
+#       if I & 0x000004
+#         define PT2 T2 &
+#       else
+#         define PT2 T2 const &
+#       endif
+#       if I & 0x000008
+#         define PT3 T3 &
+#       else
+#         define PT3 T3 const &
+#       endif
+#       if I & 0x000010
+#         define PT4 T4 &
+#       else
+#         define PT4 T4 const &
+#       endif
+#       if I & 0x000020
+#         define PT5 T5 &
+#       else
+#         define PT5 T5 const &
+#       endif
+#       if I & 0x000040
+#         define PT6 T6 &
+#       else
+#         define PT6 T6 const &
+#       endif
+#       if I & 0x000080
+#         define PT7 T7 &
+#       else
+#         define PT7 T7 const &
+#       endif
+#       if I & 0x000100
+#         define PT8 T8 &
+#       else
+#         define PT8 T8 const &
+#       endif
+#       if I & 0x000200
+#         define PT9 T9 &
+#       else
+#         define PT9 T9 const &
+#       endif
+#       if I & 0x000400
+#         define PT10 T10 &
+#       else
+#         define PT10 T10 const &
+#       endif
+#       if I & 0x000800
+#         define PT11 T11 &
+#       else
+#         define PT11 T11 const &
+#       endif
+#       if I & 0x001000
+#         define PT12 T12 &
+#       else
+#         define PT12 T12 const &
+#       endif
+#       if I & 0x002000
+#         define PT13 T13 &
+#       else
+#         define PT13 T13 const &
+#       endif
+#       if I & 0x004000
+#         define PT14 T14 &
+#       else
+#         define PT14 T14 const &
+#       endif
+#       if I & 0x008000
+#         define PT15 T15 &
+#       else
+#         define PT15 T15 const &
+#       endif
+
+#       if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1400)) 
+            template< BOOST_PP_ENUM_PARAMS(N,typename T) >
+            inline typename boost::result_of<  FC(BOOST_PP_ENUM_PARAMS(N,PT)) 
+                >::type
+            operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a)) const
+            {
+                return static_cast<MD const* const>(this)
+                    ->target_function()(BOOST_PP_ENUM_PARAMS(N,a));
+            }
+            template< BOOST_PP_ENUM_PARAMS(N,typename T) >
+            inline typename boost::result_of<  F(BOOST_PP_ENUM_PARAMS(N,PT))
+                >::type
+            operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a))
+            {
+                return static_cast<MD* const>(this)
+                    ->target_function()(BOOST_PP_ENUM_PARAMS(N,a));
+            }
+#       else
+        BOOST_TMP_MACRO(BOOST_PP_ENUM_PARAMS(N,typename T),
+            BOOST_PP_ENUM_PARAMS(N,PT), BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a),
+            BOOST_PP_ENUM_PARAMS(N,a) )
+        // ...generates uglier code but is faster - it caches ENUM_*
+#       endif
+
+#       undef PT0
+#       undef PT1
+#       undef PT2
+#       undef PT3
+#       undef PT4
+#       undef PT5
+#       undef PT6
+#       undef PT7
+#       undef PT8
+#       undef PT9
+#       undef PT10
+#       undef PT11
+#       undef PT12
+#       undef PT13
+#       undef PT14
+#       undef PT15
+
+#     endif // I < count
+
+#     undef I
+#   endif // defined(BOOST_PP_IS_ITERATING)
+
+#endif // include guard
+
index 01cac097224c4cab9d7b9bae64ed2760d734927a..ae03ff091ee270b578ef9ef9c25eb77765b861b3 100644 (file)
@@ -84,7 +84,7 @@ namespace boost {
 // the boost namespace they'll always be preferable to any other function
 // (since the arguments are built in types, ADL can't be used).
 
-namespace BOOST_HASH_DETECT_FLOAT_FUNCTIONS {
+namespace boost_hash_detect_float_functions {
     template <class Float> boost::hash_detail::not_found ldexp(Float, int);
     template <class Float> boost::hash_detail::not_found frexp(Float, int*);    
 }
@@ -103,7 +103,7 @@ namespace BOOST_HASH_DETECT_FLOAT_FUNCTIONS {
 // happen mainly when there's a template in the same namesapce.
 
 #define BOOST_HASH_CALL_FLOAT_FUNC(cpp_func, c99_func, type1, type2)    \
-namespace BOOST_HASH_DETECT_FLOAT_FUNCTIONS {                           \
+namespace boost_hash_detect_float_functions {                           \
     template <class Float>                                              \
     boost::hash_detail::not_found c99_func(Float, type2);               \
 }                                                                       \
@@ -112,7 +112,7 @@ namespace boost {                                                       \
     namespace hash_detail {                                             \
         namespace c99_func##_detect {                                   \
             using namespace std;                                        \
-            using namespace BOOST_HASH_DETECT_FLOAT_FUNCTIONS;          \
+            using namespace boost_hash_detect_float_functions;          \
                                                                         \
             struct check {                                              \
                 static type1 x;                                         \
index f9acee9cd1ecb34ced8fe5cdca5fb3d7d066162a..fdbf53fe57a7cc1ff0693e0a62e0f4fdf8e9db78 100644 (file)
@@ -51,17 +51,15 @@ namespace boost
                     limits<T>::min_exponent;
             }
 
-            // The result of frexp is always between 0.5 and 1, so its
-            // top bit will always be 1. Subtract by 0.5 to remove that.
-            v -= T(0.5);
-            v = ldexp(v, limits<std::size_t>::digits + 1);
+            v = ldexp(v, limits<std::size_t>::digits);
             std::size_t seed = static_cast<std::size_t>(v);
             v -= seed;
 
             // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1;
             std::size_t const length
                 = (limits<T>::digits *
-                        boost::static_log2<limits<T>::radix>::value - 1)
+                        boost::static_log2<limits<T>::radix>::value
+                        + limits<std::size_t>::digits - 1)
                 / limits<std::size_t>::digits;
 
             for(std::size_t i = 0; i != length; ++i)
index 6784f3ef6b040ff5e1845330ecd3b5abe5d8f847..e85ca5ae0b77b2c570f35ca322c719347b03f4fd 100644 (file)
@@ -20,7 +20,8 @@
 #include <boost/type_traits/is_pointer.hpp>
 #endif
 
-#if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+#if BOOST_WORKAROUND(__GNUC__, < 3) \
+    && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
 #define BOOST_HASH_CHAR_TRAITS string_char_traits
 #else
 #define BOOST_HASH_CHAR_TRAITS char_traits
@@ -43,7 +44,7 @@ namespace boost
     std::size_t hash_value(wchar_t);
 #endif
     
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
     std::size_t hash_value(boost::long_long_type);
     std::size_t hash_value(boost::ulong_long_type);
 #endif
@@ -67,7 +68,8 @@ namespace boost
     std::size_t hash_value(long double v);
 
     template <class Ch, class A>
-    std::size_t hash_value(std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const&);
+    std::size_t hash_value(
+        std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const&);
 
     // Implementation
 
@@ -172,7 +174,7 @@ namespace boost
     }
 #endif
 
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
     inline std::size_t hash_value(boost::long_long_type v)
     {
         return hash_detail::hash_value_signed(v);
@@ -197,6 +199,16 @@ namespace boost
         return x + (x >> 3);
     }
 
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#if BOOST_MSVC <= 1400
+#pragma warning(disable:4267) // 'argument' : conversion from 'size_t' to
+                              // 'unsigned int', possible loss of data
+                              // A misguided attempt to detect 64-bit
+                              // incompatability.
+#endif
+#endif
+
 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
     template <class T>
     inline void hash_combine(std::size_t& seed, T& v)
@@ -209,6 +221,10 @@ namespace boost
         seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2);
     }
 
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
     template <class It>
     inline std::size_t hash_range(It first, It last)
     {
@@ -272,7 +288,8 @@ namespace boost
 #endif
 
     template <class Ch, class A>
-    inline std::size_t hash_value(std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const& v)
+    inline std::size_t hash_value(
+        std::basic_string<Ch, std::BOOST_HASH_CHAR_TRAITS<Ch>, A> const& v)
     {
         return hash_range(v.begin(), v.end());
     }
@@ -297,8 +314,8 @@ namespace boost
     //
     
     // Define the specializations required by the standard. The general purpose
-    // boost::hash is defined later in extensions.hpp if BOOST_HASH_NO_EXTENSIONS
-    // is not defined.
+    // boost::hash is defined later in extensions.hpp if
+    // BOOST_HASH_NO_EXTENSIONS is not defined.
     
     // BOOST_HASH_SPECIALIZE - define a specialization for a type which is
     // passed by copy.
@@ -391,7 +408,7 @@ namespace boost
     BOOST_HASH_SPECIALIZE_REF(std::wstring)
 #endif
 
-#if defined(BOOST_HAS_LONG_LONG)
+#if !defined(BOOST_NO_LONG_LONG)
     BOOST_HASH_SPECIALIZE(boost::long_long_type)
     BOOST_HASH_SPECIALIZE(boost::ulong_long_type)
 #endif
diff --git a/deal.II/contrib/boost/include/boost/functional/lightweight_forward_adapter.hpp b/deal.II/contrib/boost/include/boost/functional/lightweight_forward_adapter.hpp
new file mode 100644 (file)
index 0000000..d21ac42
--- /dev/null
@@ -0,0 +1,259 @@
+/*=============================================================================
+    Copyright (c) 2007 Tobias Schwinger
+  
+    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).
+==============================================================================*/
+
+#ifndef BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_HPP_INCLUDED
+#   ifndef BOOST_PP_IS_ITERATING
+
+#   include <boost/config.hpp>
+#   include <boost/detail/workaround.hpp>
+
+#   include <boost/preprocessor/cat.hpp>
+#   include <boost/preprocessor/iteration/iterate.hpp>
+#   include <boost/preprocessor/repetition/enum.hpp>
+#   include <boost/preprocessor/repetition/enum_params.hpp>
+#   include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#   include <boost/preprocessor/facilities/intercept.hpp>
+
+#   include <boost/utility/result_of.hpp>
+#   include <boost/ref.hpp>
+
+#   ifndef BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY
+#     define BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY 10
+#   elif BOOST_FUNCTIONAL_FORDWARD_ADAPTER_MAX_ARITY < 3
+#     undef  BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY
+#     define BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY 3
+#   endif
+
+namespace boost 
+{
+    template< typename Function, int Arity_Or_MinArity = -1, int MaxArity = -1 >
+    class lightweight_forward_adapter;
+
+    //----- ---- --- -- - -  -   -
+
+    namespace detail
+    {
+        template< class MostDerived, typename Function, typename FunctionConst, 
+            int Arity, int MinArity >
+        struct lightweight_forward_adapter_impl;
+
+        struct lightweight_forward_adapter_result
+        {
+            template< typename Sig > struct apply;
+
+            // Utility metafunction for argument transform
+            template< typename T > struct x  { typedef T const& t; };
+            template< typename T > struct x< boost::reference_wrapper<T> >
+            { typedef T& t; };
+            template< typename T > struct x<T&>       : x<T> { };
+            template< typename T > struct x<T const&> : x<T> { };
+            template< typename T > struct x<T const>  : x<T> { };
+
+            // Utility metafunction to choose target function qualification
+            template< typename T > struct c
+            { typedef typename T::target_function_t t; };
+            template< typename T > struct c<T&      >
+            { typedef typename T::target_function_t t; };
+            template< typename T > struct c<T const >
+            { typedef typename T::target_function_const_t t; };
+            template< typename T > struct c<T const&>
+            { typedef typename T::target_function_const_t t; };
+        };
+    }
+
+#   define BOOST_TMP_MACRO(f,fn,fc) \
+        boost::detail::lightweight_forward_adapter_impl< \
+            lightweight_forward_adapter<f,Arity_Or_MinArity,MaxArity>, fn, fc, \
+            (MaxArity!=-1? MaxArity :Arity_Or_MinArity!=-1? Arity_Or_MinArity \
+                :BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY), \
+            (Arity_Or_MinArity!=-1? Arity_Or_MinArity : 0) >
+
+    template< typename Function, int Arity_Or_MinArity, int MaxArity >
+    class lightweight_forward_adapter
+        : public BOOST_TMP_MACRO(Function,Function,Function const)
+        , private Function
+    {
+      public:
+        lightweight_forward_adapter(Function const& f = Function()) 
+          : Function(f) 
+        { }
+
+        typedef Function        target_function_t;
+        typedef Function const  target_function_const_t;
+
+        Function       & target_function()       { return *this; }
+        Function const & target_function() const { return *this; }
+
+        template< typename Sig > struct result
+            : detail::lightweight_forward_adapter_result::template apply<Sig>
+        { };
+
+        using BOOST_TMP_MACRO(Function,Function, Function const)::operator();
+    };
+    template< typename Function, int Arity_Or_MinArity, int MaxArity >
+    class lightweight_forward_adapter< Function const, Arity_Or_MinArity, 
+        MaxArity >
+        : public BOOST_TMP_MACRO(Function const, Function const, Function const)
+        , private Function
+    {
+      public:
+        lightweight_forward_adapter(Function const& f = Function())
+          : Function(f) 
+        { }
+
+        typedef Function const target_function_t;
+        typedef Function const target_function_const_t;
+
+        Function const & target_function() const { return *this; }
+
+        template< typename Sig > struct result
+            : detail::lightweight_forward_adapter_result::template apply<Sig>
+        { };
+
+        using BOOST_TMP_MACRO(Function const,Function const, Function const)
+            ::operator();
+    };
+    template< typename Function, int Arity_Or_MinArity, int MaxArity >
+    class lightweight_forward_adapter< Function &, Arity_Or_MinArity, MaxArity >
+        : public BOOST_TMP_MACRO(Function&, Function, Function)
+    {
+        Function& ref_function;
+      public:
+        lightweight_forward_adapter(Function& f)
+          : ref_function(f) 
+        { }
+
+        typedef Function target_function_t;
+        typedef Function target_function_const_t;
+
+        Function & target_function() const { return this->ref_function; }
+
+        template< typename Sig > struct result
+            : detail::lightweight_forward_adapter_result::template apply<Sig>
+        { };
+
+        using BOOST_TMP_MACRO(Function&, Function, Function)::operator();
+    }; 
+
+    #undef BOOST_TMP_MACRO
+
+    namespace detail
+    {
+        template< class Self >
+        struct lightweight_forward_adapter_result::apply< Self() >
+            : boost::result_of< typename c<Self>::t() >
+        { };
+
+        template< class MD, class F, class FC >
+        struct lightweight_forward_adapter_impl<MD,F,FC,0,0>
+            : lightweight_forward_adapter_result
+        {
+            inline typename boost::result_of< FC() >::type
+            operator()() const
+            {
+                return static_cast<MD const*>(this)->target_function()();
+            }
+
+            inline typename boost::result_of< F() >::type
+            operator()()
+            {
+                return static_cast<MD*>(this)->target_function()();
+            }
+        };
+
+#       define  BOOST_PP_FILENAME_1 \
+            <boost/functional/lightweight_forward_adapter.hpp>
+#       define  BOOST_PP_ITERATION_LIMITS                                     \
+            (1,BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_MAX_ARITY) 
+#       include BOOST_PP_ITERATE()
+
+    } // namespace detail
+
+    template<class F, int A0, int A1>
+    struct result_of<boost::lightweight_forward_adapter<F,A0,A1> const ()>
+        : boost::detail::lightweight_forward_adapter_result::template apply<
+            boost::lightweight_forward_adapter<F,A0,A1> const () >
+    { };
+    template<class F, int A0, int A1>
+    struct result_of<boost::lightweight_forward_adapter<F,A0,A1>()>
+        : boost::detail::lightweight_forward_adapter_result::template apply<
+            boost::lightweight_forward_adapter<F,A0,A1>() >
+    { };
+    template<class F, int A0, int A1>
+    struct result_of<boost::lightweight_forward_adapter<F,A0,A1> const& ()>
+        : boost::detail::lightweight_forward_adapter_result::template apply<
+            boost::lightweight_forward_adapter<F,A0,A1> const () >
+    { };
+    template<class F, int A0, int A1>
+    struct result_of<boost::lightweight_forward_adapter<F,A0,A1>& ()>
+        : boost::detail::lightweight_forward_adapter_result::template apply<
+            boost::lightweight_forward_adapter<F,A0,A1>() >
+    { };
+}
+
+#     define BOOST_FUNCTIONAL_LIGHTWEIGHT_FORWARD_ADAPTER_HPP_INCLUDED
+
+#   else // defined(BOOST_PP_IS_ITERATING)
+#     define N BOOST_PP_ITERATION() 
+
+        template< class Self, BOOST_PP_ENUM_PARAMS(N,typename T) >
+        struct lightweight_forward_adapter_result::apply<
+            Self (BOOST_PP_ENUM_PARAMS(N,T)) >
+            : boost::result_of<
+                typename c<Self>::t (BOOST_PP_ENUM_BINARY_PARAMS(N,
+                    typename x<T,>::t BOOST_PP_INTERCEPT)) >
+        { };
+
+        template< class MD, class F, class FC >
+        struct lightweight_forward_adapter_impl<MD,F,FC,BOOST_PP_DEC(N),N>
+            : lightweight_forward_adapter_result
+        {
+            template< BOOST_PP_ENUM_PARAMS(N,typename T) >
+            inline typename boost::result_of< F(BOOST_PP_ENUM_BINARY_PARAMS(N,
+                T,const& BOOST_PP_INTERCEPT)) >::type
+            operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT));
+        };
+
+        template< class MD, class F, class FC, int MinArity >
+        struct lightweight_forward_adapter_impl<MD,F,FC,N,MinArity>
+            : lightweight_forward_adapter_impl<MD,F,FC,BOOST_PP_DEC(N),MinArity>
+        {
+            using lightweight_forward_adapter_impl<MD,F,FC,BOOST_PP_DEC(N),
+                MinArity>::operator();
+
+#     define M(z,i,d) \
+          static_cast<typename d::template x<T##i>::t>(a##i)
+
+            template< BOOST_PP_ENUM_PARAMS(N,typename T) >
+            inline typename lightweight_forward_adapter_result::template apply<
+                MD const (BOOST_PP_ENUM_BINARY_PARAMS(N,
+                    T,const& BOOST_PP_INTERCEPT)) >::type
+            operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& a)) const
+            {
+                typedef lightweight_forward_adapter_result _;
+                return static_cast<MD const*>(this)->target_function()(
+                    BOOST_PP_ENUM(N,M,_));
+            }
+            template< BOOST_PP_ENUM_PARAMS(N,typename T) >
+            inline typename lightweight_forward_adapter_result::template apply<
+                MD (BOOST_PP_ENUM_BINARY_PARAMS(N,
+                    T,const& BOOST_PP_INTERCEPT)) >::type
+            operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& a))
+            {
+                typedef lightweight_forward_adapter_result _;
+                return static_cast<MD*>(this)->target_function()(
+                    BOOST_PP_ENUM(N,M,_));
+            }
+#     undef M
+      };
+
+#     undef N
+#   endif // defined(BOOST_PP_IS_ITERATING)
+
+#endif // include guard
+
diff --git a/deal.II/contrib/boost/include/boost/functional/value_factory.hpp b/deal.II/contrib/boost/include/boost/functional/value_factory.hpp
new file mode 100644 (file)
index 0000000..6047908
--- /dev/null
@@ -0,0 +1,70 @@
+/*=============================================================================
+    Copyright (c) 2007 Tobias Schwinger
+  
+    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).
+==============================================================================*/
+
+#ifndef BOOST_FUNCTIONAL_VALUE_FACTORY_HPP_INCLUDED
+#   ifndef BOOST_PP_IS_ITERATING
+
+#     include <boost/preprocessor/iteration/iterate.hpp>
+#     include <boost/preprocessor/repetition/enum_params.hpp>
+#     include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+#     include <new>
+#     include <boost/pointee.hpp>
+#     include <boost/none_t.hpp>
+#     include <boost/get_pointer.hpp>
+#     include <boost/non_type.hpp>
+#     include <boost/type_traits/remove_cv.hpp>
+
+#     ifndef BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY
+#       define BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY 10
+#     elif BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY < 3
+#       undef  BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY
+#       define BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY 3
+#     endif
+
+namespace boost
+{
+    template< typename T >
+    class value_factory;
+
+    //----- ---- --- -- - -  -   -
+
+    template< typename T >
+    class value_factory
+    {
+      public:
+        typedef T result_type;
+
+        value_factory()
+        { }
+
+#     define BOOST_PP_FILENAME_1 <boost/functional/value_factory.hpp>
+#     define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUNCTIONAL_VALUE_FACTORY_MAX_ARITY)
+#     include BOOST_PP_ITERATE()
+    };
+
+    template< typename T > class value_factory<T&>;
+    // forbidden, would create a dangling reference
+}
+#     define BOOST_FUNCTIONAL_VALUE_FACTORY_HPP_INCLUDED
+#   else // defined(BOOST_PP_IS_ITERATING)
+
+#     define N BOOST_PP_ITERATION()
+#     if N > 0
+    template< BOOST_PP_ENUM_PARAMS(N, typename T) >
+#     endif
+    inline result_type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const
+    {
+        return result_type(BOOST_PP_ENUM_PARAMS(N,a));
+    }
+#     undef N
+
+#   endif // defined(BOOST_PP_IS_ITERATING)
+
+#endif // include guard
+
index c343405c987839f06f802eb94a609c9d0190c40c..0dd1f0e78746c9cb26f24c45ab48031aaf9fd240 100644 (file)
@@ -13,5 +13,6 @@
 #include <boost/fusion/adapted/array.hpp>
 #include <boost/fusion/adapted/mpl.hpp>
 #include <boost/fusion/adapted/struct.hpp>
+#include <boost/fusion/adapted/class.hpp>
 
 #endif
index 2be9d4ba49d1a0170e4cd8d0c2f8634233c08a3f..cb82809037bdd96f556e5ee6f861682838298590 100644 (file)
@@ -1,6 +1,7 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2010 Christopher Schmidt
 
     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)
@@ -8,15 +9,19 @@
 #if !defined(BOOST_FUSION_ARRAY_27122005_1035)
 #define BOOST_FUSION_ARRAY_27122005_1035
 
-#include <boost/fusion/adapted/array/array_iterator.hpp>
+//For backwards compatibility
+#include <boost/fusion/adapted/boost_array.hpp>
+
 #include <boost/fusion/adapted/array/tag_of.hpp>
-#include <boost/fusion/adapted/array/detail/is_view_impl.hpp>
-#include <boost/fusion/adapted/array/detail/is_sequence_impl.hpp>
-#include <boost/fusion/adapted/array/detail/category_of_impl.hpp>
-#include <boost/fusion/adapted/array/detail/begin_impl.hpp>
-#include <boost/fusion/adapted/array/detail/end_impl.hpp>
-#include <boost/fusion/adapted/array/detail/size_impl.hpp>
-#include <boost/fusion/adapted/array/detail/at_impl.hpp>
-#include <boost/fusion/adapted/array/detail/value_at_impl.hpp>
+#include <boost/fusion/adapted/array/is_view_impl.hpp>
+#include <boost/fusion/adapted/array/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/array/category_of_impl.hpp>
+#include <boost/fusion/adapted/array/begin_impl.hpp>
+#include <boost/fusion/adapted/array/end_impl.hpp>
+#include <boost/fusion/adapted/array/size_impl.hpp>
+#include <boost/fusion/adapted/array/at_impl.hpp>
+#include <boost/fusion/adapted/array/value_at_impl.hpp>
+#include <boost/fusion/adapted/array/deref_impl.hpp>
+#include <boost/fusion/adapted/array/value_of_impl.hpp>
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/array/at_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/array/at_impl.hpp
new file mode 100644 (file)
index 0000000..12f0372
--- /dev/null
@@ -0,0 +1,38 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_ARRAY_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_ARRAY_AT_IMPL_HPP
+
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/remove_extent.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template<typename>
+    struct at_impl;
+
+    template<>
+    struct at_impl<po_array_tag>
+    {
+        template<typename Seq, typename N>
+        struct apply
+        {
+            typedef typename
+                add_reference<typename remove_extent<Seq>::type>::type
+            type;
+
+            static type
+            call(Seq& seq)
+            {
+                return seq[N::value];
+            }
+        };
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/array/begin_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/array/begin_impl.hpp
new file mode 100644 (file)
index 0000000..2ee4d70
--- /dev/null
@@ -0,0 +1,42 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_ARRAY_BEGIN_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_ARRAY_BEGIN_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template<typename>
+    struct begin_impl;
+
+    template <>
+    struct begin_impl<po_array_tag>
+    {
+        template <typename Seq>
+        struct apply
+        {
+            typedef
+                basic_iterator<
+                    po_array_iterator_tag
+                  , random_access_traversal_tag
+                  , Seq
+                  , 0
+                >
+            type;
+
+            static type
+            call(Seq& seq)
+            {
+                return type(seq,0);
+            }
+        };
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/array/category_of_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/array/category_of_impl.hpp
new file mode 100644 (file)
index 0000000..0a633a4
--- /dev/null
@@ -0,0 +1,32 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_ARRAY_CATEGORY_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_ARRAY_CATEGORY_OF_IMPL_HPP
+
+namespace boost { namespace fusion
+{
+    struct random_access_traversal_tag;
+
+    namespace extension
+    {
+        template<typename>
+        struct category_of_impl;
+
+        template<>
+        struct category_of_impl<po_array_tag>
+        {
+            template<typename Seq>
+            struct apply
+            {
+                typedef random_access_traversal_tag type;
+            };
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/array/deref_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/array/deref_impl.hpp
new file mode 100644 (file)
index 0000000..a58cf99
--- /dev/null
@@ -0,0 +1,40 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_ARRAY_DEREF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_ARRAY_DEREF_IMPL_HPP
+
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/remove_extent.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct deref_impl;
+
+    template <>
+    struct deref_impl<po_array_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+        {
+            typedef typename
+                add_reference<
+                    typename remove_extent<typename It::seq_type>::type
+                >::type
+            type;
+
+            static type
+            call(It const& it)
+            {
+                return (*it.seq)[It::index::value];
+            }
+        };
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/array/end_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/array/end_impl.hpp
new file mode 100644 (file)
index 0000000..5b367f9
--- /dev/null
@@ -0,0 +1,44 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_ARRAY_END_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_ARRAY_END_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+#include <boost/type_traits/rank.hpp>
+#include <boost/type_traits/extent.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct end_impl;
+
+    template <>
+    struct end_impl<po_array_tag>
+    {
+        template <typename Seq>
+        struct apply
+        {
+            typedef
+                basic_iterator<
+                    po_array_iterator_tag
+                  , random_access_traversal_tag
+                  , Seq
+                  , extent<Seq,rank<Seq>::value-1>::value
+                >
+            type;
+
+            static type
+            call(Seq& seq)
+            {
+                return type(seq,0);
+            }
+        };
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/array/is_sequence_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/array/is_sequence_impl.hpp
new file mode 100644 (file)
index 0000000..d6de858
--- /dev/null
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_ARRAY_IS_SEQUENCE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_ARRAY_IS_SEQUENCE_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template<typename>
+    struct is_sequence_impl;
+
+    template<>
+    struct is_sequence_impl<po_array_tag>
+    {
+        template<typename Seq>
+        struct apply
+          : mpl::true_
+        {};
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/array/is_view_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/array/is_view_impl.hpp
new file mode 100644 (file)
index 0000000..238eac0
--- /dev/null
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_ARRAY_IS_VIEW_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_ARRAY_IS_VIEW_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template<typename>
+    struct is_view_impl;
+
+    template<>
+    struct is_view_impl<po_array_tag>
+    {
+        template<typename Seq>
+        struct apply
+          : mpl::false_
+        {};
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/array/size_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/array/size_impl.hpp
new file mode 100644 (file)
index 0000000..8be5a29
--- /dev/null
@@ -0,0 +1,29 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_ARRAY_SIZE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_ARRAY_SIZE_IMPL_HPP
+
+#include <boost/type_traits/rank.hpp>
+#include <boost/type_traits/extent.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template<typename>
+    struct size_impl;
+
+    template<>
+    struct size_impl<po_array_tag>
+    {
+        template<typename Seq>
+        struct apply
+          : extent<Seq,rank<Seq>::value-1>
+        {};
+    };
+}}}
+
+#endif
index 62f81ea05e9ee6b3e8729b1943821718901dc8d5..7c732a70219038e106ebf79f4206f38ef03fbbcc 100644 (file)
@@ -1,39 +1,72 @@
 /*=============================================================================
-    Copyright (c) 2001-2006 Joel de Guzman
-    Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(FUSION_SEQUENCE_TAG_OF_27122005_1030)
-#define FUSION_SEQUENCE_TAG_OF_27122005_1030
 
-#include <boost/fusion/support/tag_of_fwd.hpp>
+#ifndef BOOST_FUSION_ADAPTED_ARRAY_TAG_OF_HPP
+#define BOOST_FUSION_ADAPTED_ARRAY_TAG_OF_HPP
 
+#include <boost/fusion/support/tag_of_fwd.hpp>
 #include <cstddef>
 
-namespace boost 
-{ 
-    template<typename T, std::size_t N>
-    class array;
-}
-
-namespace boost { namespace fusion 
+namespace boost
 {
-    struct array_tag;
-
-    namespace traits
+    namespace fusion
     {
-        template<typename T, std::size_t N>
-#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
-        struct tag_of<boost::array<T,N>, void >
+        struct po_array_tag;
+        struct po_array_iterator_tag;
+        struct random_access_traversal_tag;
+        struct fusion_sequence_tag;
+
+        namespace traits
+        {
+#ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
+            template<typename T, std::size_t N>
+            struct tag_of<T[N], void>
+            {
+                typedef po_array_tag type;
+            };
+
+            template<typename T, std::size_t N>
+            struct tag_of<T const[N], void>
+            {
+                typedef po_array_tag type;
+            };
 #else
-        struct tag_of<boost::array<T,N> >
+            template<typename T, std::size_t N>
+            struct tag_of<T[N], void>
+            {
+                typedef po_array_tag type;
+            };
+
+            template<typename T, std::size_t N>
+            struct tag_of<T const[N], void>
+            {
+                typedef po_array_tag type;
+            };
 #endif
+        }
+    }
+
+    namespace mpl
+    {
+        template<typename>
+        struct sequence_tag;
+
+        template<typename T, std::size_t N>
+        struct sequence_tag<T[N]>
         {
-            typedef array_tag type;
+            typedef fusion::po_array_tag type;
+        };
+
+        template<typename T, std::size_t N>
+        struct sequence_tag<T const[N] >
+        {
+            typedef fusion::po_array_tag type;
         };
     }
-}}
+}
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/array/value_at_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/array/value_at_impl.hpp
new file mode 100644 (file)
index 0000000..4e04c37
--- /dev/null
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_ARRAY_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_ARRAY_VALUE_AT_IMPL_HPP
+
+#include <boost/type_traits/remove_extent.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template<typename>
+    struct value_at_impl;
+
+    template <>
+    struct value_at_impl<po_array_tag>
+    {
+        template <typename Seq, typename N>
+        struct apply
+          : remove_extent<Seq>
+        {};
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/array/value_of_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/array/value_of_impl.hpp
new file mode 100644 (file)
index 0000000..2bbddf2
--- /dev/null
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_ARRAY_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_ARRAY_VALUE_OF_IMPL_HPP
+
+#include <boost/type_traits/remove_extent.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct value_of_impl;
+
+    template <>
+    struct value_of_impl<po_array_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+          : remove_extent<typename It::seq_type>
+        {};
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array.hpp
new file mode 100644 (file)
index 0000000..835135b
--- /dev/null
@@ -0,0 +1,22 @@
+/*=============================================================================
+    Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_BOOST_ARRAY_27122005_1035)
+#define BOOST_FUSION_BOOST_ARRAY_27122005_1035
+
+#include <boost/fusion/adapted/boost_array/array_iterator.hpp>
+#include <boost/fusion/adapted/boost_array/tag_of.hpp>
+#include <boost/fusion/adapted/boost_array/detail/is_view_impl.hpp>
+#include <boost/fusion/adapted/boost_array/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/boost_array/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/boost_array/detail/begin_impl.hpp>
+#include <boost/fusion/adapted/boost_array/detail/end_impl.hpp>
+#include <boost/fusion/adapted/boost_array/detail/size_impl.hpp>
+#include <boost/fusion/adapted/boost_array/detail/at_impl.hpp>
+#include <boost/fusion/adapted/boost_array/detail/value_at_impl.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/array_iterator.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/array_iterator.hpp
new file mode 100644 (file)
index 0000000..dbad776
--- /dev/null
@@ -0,0 +1,107 @@
+/*=============================================================================
+    Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_ARRAY_ITERATOR_26122005_2250)
+#define BOOST_FUSION_ARRAY_ITERATOR_26122005_2250
+
+#include <cstddef>
+#include <boost/config.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/fusion/iterator/iterator_facade.hpp>
+
+namespace boost { namespace fusion
+{
+    struct random_access_traversal_tag;
+
+    template <typename Array, int Pos>
+    struct array_iterator
+        : iterator_facade<array_iterator<Array, Pos>, random_access_traversal_tag>
+    {
+        BOOST_MPL_ASSERT_RELATION(Pos, >=, 0);
+        BOOST_MPL_ASSERT_RELATION(Pos, <=, Array::static_size);
+
+        typedef mpl::int_<Pos> index;
+        typedef Array array_type;
+
+        array_iterator(Array& a)
+            : array(a) {}
+
+        Array& array;
+
+        template <typename Iterator>
+        struct value_of
+        {
+            typedef typename Iterator::array_type array_type;
+            typedef typename array_type::value_type type;
+        };
+
+        template <typename Iterator>
+        struct deref
+        {
+            typedef typename Iterator::array_type array_type;
+            typedef typename 
+                mpl::if_<
+                    is_const<array_type>
+                  , typename array_type::const_reference
+                  , typename array_type::reference
+                >::type 
+            type;
+
+            static type
+            call(Iterator const & it)
+            {
+                return it.array[Iterator::index::value];
+            }
+        };
+
+        template <typename Iterator, typename N>
+        struct advance
+        {
+            typedef typename Iterator::index index;
+            typedef typename Iterator::array_type array_type;
+            typedef array_iterator<array_type, index::value + N::value> type;
+
+            static type
+            call(Iterator const& i)
+            {
+                return type(i.array);
+            }
+        };
+
+        template <typename Iterator>
+        struct next : advance<Iterator, mpl::int_<1> > {};
+
+        template <typename Iterator>
+        struct prior : advance<Iterator, mpl::int_<-1> > {};
+
+        template <typename I1, typename I2>
+        struct distance : mpl::minus<typename I2::index, typename I1::index>
+        {
+            typedef typename
+                mpl::minus<
+                    typename I2::index, typename I1::index
+                >::type 
+            type;
+
+            static type
+            call(I1 const&, I2 const&)
+            {
+                return type();
+            }
+        };
+
+    private:
+
+        array_iterator<Array, Pos>& operator=(array_iterator<Array, Pos> const&);
+    };
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/at_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/at_impl.hpp
new file mode 100644 (file)
index 0000000..16557a1
--- /dev/null
@@ -0,0 +1,45 @@
+/*=============================================================================
+    Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_AT_IMPL_27122005_1241)
+#define BOOST_FUSION_AT_IMPL_27122005_1241
+
+#include <boost/type_traits/is_const.hpp>
+
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion {
+    
+    struct boost_array_tag;
+
+    namespace extension
+    {
+        template<typename T>
+        struct at_impl;
+
+        template<>
+        struct at_impl<boost_array_tag>
+        {
+            template<typename Sequence, typename N>
+            struct apply
+            {
+                typedef typename mpl::if_<
+                    is_const<Sequence>, 
+                    typename Sequence::const_reference, 
+                    typename Sequence::reference>::type type;
+
+                static type
+                call(Sequence& seq)
+                {
+                    return seq[N::value];
+                }
+            };
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/begin_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/begin_impl.hpp
new file mode 100644 (file)
index 0000000..0798659
--- /dev/null
@@ -0,0 +1,40 @@
+/*=============================================================================
+    Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_BEGIN_IMPL_27122005_1117)
+#define BOOST_FUSION_BEGIN_IMPL_27122005_1117
+
+#include <boost/fusion/adapted/boost_array/array_iterator.hpp>
+
+namespace boost { namespace fusion {
+
+    struct boost_array_tag;
+
+    namespace extension
+    {
+        template<typename T>
+        struct begin_impl;
+
+        template <>
+        struct begin_impl<boost_array_tag>
+        {
+            template <typename Sequence>
+            struct apply 
+            {
+                typedef array_iterator<Sequence, 0> type;
+    
+                static type
+                call(Sequence& v)
+                {
+                    return type(v);
+                }
+            };
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/category_of_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/category_of_impl.hpp
new file mode 100644 (file)
index 0000000..35762a0
--- /dev/null
@@ -0,0 +1,35 @@
+/*=============================================================================
+    Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_CATEGORY_OF_IMPL_27122005_1044)
+#define BOOST_FUSION_CATEGORY_OF_IMPL_27122005_1044
+
+#include <boost/config/no_tr1/utility.hpp>
+
+namespace boost { namespace fusion { 
+
+    struct boost_array_tag;
+    struct random_access_traversal_tag;
+
+    namespace extension
+    {
+        template<typename T>
+        struct category_of_impl;
+
+        template<>
+        struct category_of_impl<boost_array_tag>
+        {
+            template<typename T>
+            struct apply
+            {
+                typedef random_access_traversal_tag type;
+            };
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/end_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/end_impl.hpp
new file mode 100644 (file)
index 0000000..35b1fdb
--- /dev/null
@@ -0,0 +1,40 @@
+/*=============================================================================
+    Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_END_IMPL_27122005_1120)
+#define BOOST_FUSION_END_IMPL_27122005_1120
+
+#include <boost/fusion/adapted/boost_array/array_iterator.hpp>
+
+namespace boost { namespace fusion {
+
+    struct boost_array_tag;
+
+    namespace extension
+    {
+        template <typename Tag>
+        struct end_impl;
+
+        template <>
+        struct end_impl<boost_array_tag>
+        {
+            template <typename Sequence>
+            struct apply 
+            {
+                typedef array_iterator<Sequence, Sequence::static_size> type;
+    
+                static type
+                call(Sequence& v)
+                {
+                    return type(v);
+                }
+            };
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/is_sequence_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/is_sequence_impl.hpp
new file mode 100644 (file)
index 0000000..9301e81
--- /dev/null
@@ -0,0 +1,31 @@
+/*=============================================================================
+    Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_IS_SEQUENCE_IMPL_27122005_1648)
+#define BOOST_FUSION_IS_SEQUENCE_IMPL_27122005_1648
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion {
+
+    struct boost_array_tag;
+
+    namespace extension
+    {
+        template<typename Tag>
+        struct is_sequence_impl;
+
+        template<>
+        struct is_sequence_impl<boost_array_tag>
+        {
+            template<typename Sequence>
+            struct apply : mpl::true_ {};
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/is_view_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/is_view_impl.hpp
new file mode 100644 (file)
index 0000000..6cb6b36
--- /dev/null
@@ -0,0 +1,32 @@
+/*=============================================================================
+    Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_IS_VIEW_IMPL_27042006_2221)
+#define BOOST_FUSION_IS_VIEW_IMPL_27042006_2221
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion 
+{
+    struct boost_array_tag;
+
+    namespace extension
+    {
+        template<typename Tag>
+        struct is_view_impl;
+
+        template<>
+        struct is_view_impl<boost_array_tag>
+        {
+            template<typename T>
+            struct apply : mpl::false_
+            {};
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/size_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/size_impl.hpp
new file mode 100644 (file)
index 0000000..87cafda
--- /dev/null
@@ -0,0 +1,29 @@
+/*=============================================================================
+    Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_SIZE_IMPL_27122005_1251)
+#define BOOST_FUSION_SIZE_IMPL_27122005_1251
+
+namespace boost { namespace fusion {
+
+    struct boost_array_tag;
+
+    namespace extension
+    {
+        template<typename T>
+        struct size_impl;
+
+        template<>
+        struct size_impl<boost_array_tag>
+        {
+            template<typename Sequence>
+            struct apply : mpl::int_<Sequence::static_size> {};
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/value_at_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/detail/value_at_impl.hpp
new file mode 100644 (file)
index 0000000..a35abc6
--- /dev/null
@@ -0,0 +1,32 @@
+/*=============================================================================
+    Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_VALUE_AT_IMPL_27122005_1256)
+#define BOOST_FUSION_VALUE_AT_IMPL_27122005_1256
+
+namespace boost { namespace fusion {
+    
+    struct boost_array_tag;
+
+    namespace extension
+    {
+        template<typename T>
+        struct value_at_impl;
+
+        template <>
+        struct value_at_impl<boost_array_tag>
+        {
+            template <typename Sequence, typename N>
+            struct apply 
+            {
+                typedef typename Sequence::value_type type;
+            };
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/tag_of.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/boost_array/tag_of.hpp
new file mode 100644 (file)
index 0000000..d38cc80
--- /dev/null
@@ -0,0 +1,58 @@
+/*=============================================================================
+    Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(FUSION_SEQUENCE_TAG_OF_27122005_1030)
+#define FUSION_SEQUENCE_TAG_OF_27122005_1030
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+
+#include <cstddef>
+
+namespace boost 
+{ 
+    template<typename T, std::size_t N>
+    class array;
+}
+
+namespace boost { namespace fusion 
+{
+    struct boost_array_tag;
+    struct fusion_sequence_tag;
+
+    namespace traits
+    {
+        template<typename T, std::size_t N>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+        struct tag_of<boost::array<T,N>, void >
+#else
+        struct tag_of<boost::array<T,N> >
+#endif
+        {
+            typedef boost_array_tag type;
+        };
+    }
+}}
+
+namespace boost { namespace mpl
+{
+    template<typename>
+    struct sequence_tag;
+
+    template<typename T, std::size_t N>
+    struct sequence_tag<array<T,N> >
+    {
+        typedef fusion::fusion_sequence_tag type;
+    };
+
+    template<typename T, std::size_t N>
+    struct sequence_tag<array<T,N> const>
+    {
+        typedef fusion::fusion_sequence_tag type;
+    };
+}}
+
+#endif
index efae06a22a905ee54becac77de27ef4abf1d1d5f..1183082d442599f6c49a87fd2b5c86dff4ebb5e7 100644 (file)
@@ -26,6 +26,7 @@ namespace boost { namespace tuples
 namespace boost { namespace fusion 
 {
     struct boost_tuple_tag;
+    struct fusion_sequence_tag;
 
     namespace traits
     {
@@ -60,4 +61,54 @@ namespace boost { namespace fusion
     }
 }}
 
+namespace boost { namespace mpl
+{
+    template<typename>
+    struct sequence_tag;
+
+    template <
+        class T0, class T1, class T2, class T3, class T4,
+        class T5, class T6, class T7, class T8, class T9
+    >
+    struct sequence_tag<tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
+    {
+        typedef fusion::fusion_sequence_tag type;
+    };
+
+    template <
+        class T0, class T1, class T2, class T3, class T4,
+        class T5, class T6, class T7, class T8, class T9
+    >
+    struct sequence_tag<
+        tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> const
+    >
+    {
+        typedef fusion::fusion_sequence_tag type;
+    };
+
+    template <class Head, class Tail>
+    struct sequence_tag<tuples::cons<Head, Tail> >
+    {
+        typedef fusion::fusion_sequence_tag type;
+    };
+
+    template <class Head, class Tail>
+    struct sequence_tag<tuples::cons<Head, Tail> const>
+    {
+        typedef fusion::fusion_sequence_tag type;
+    };
+
+    template <>
+    struct sequence_tag<tuples::null_type>
+    {
+        typedef fusion::fusion_sequence_tag type;
+    };
+
+    template <>
+    struct sequence_tag<tuples::null_type const>
+    {
+        typedef fusion::fusion_sequence_tag type;
+    };
+}}
+
 #endif
index be973831eeae8e65b557c93fb66ba90252e29c5f..75150942c9058e592990430ebd64799ff15585a8 100644 (file)
@@ -1,28 +1,18 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_CLASS_OCTOBER_4_2009_839PM)
-#define BOOST_FUSION_CLASS_OCTOBER_4_2009_839PM
 
-#include <boost/fusion/adapted/class/extension.hpp>
-#include <boost/fusion/adapted/class/adapt_struct.hpp>
-#include <boost/fusion/adapted/class/adapt_assoc_struct.hpp>
-#include <boost/fusion/adapted/class/class_iterator.hpp>
+#ifndef BOOST_FUSION_ADAPTED_CLASS_HPP
+#define BOOST_FUSION_ADAPTED_CLASS_HPP
 
-#include <boost/fusion/adapted/class/detail/at_impl.hpp>
-#include <boost/fusion/adapted/class/detail/at_key_impl.hpp>
-#include <boost/fusion/adapted/class/detail/begin_impl.hpp>
-#include <boost/fusion/adapted/class/detail/category_of_impl.hpp>
-#include <boost/fusion/adapted/class/detail/end_impl.hpp>
-#include <boost/fusion/adapted/class/detail/has_key_impl.hpp>
-#include <boost/fusion/adapted/class/detail/is_sequence_impl.hpp>
-#include <boost/fusion/adapted/class/detail/is_view_impl.hpp>
-#include <boost/fusion/adapted/class/detail/size_impl.hpp>
-#include <boost/fusion/adapted/class/detail/value_at_impl.hpp>
-#include <boost/fusion/adapted/class/detail/value_at_key_impl.hpp>
+#include <boost/fusion/adapted/class/adapt_assoc_class_named.hpp>
+#include <boost/fusion/adapted/class/adapt_assoc_class.hpp>
+#include <boost/fusion/adapted/class/adapt_class_named.hpp>
+#include <boost/fusion/adapted/class/adapt_class.hpp>
 
 #endif
index 11f40ade5d26106229f62ce16cb4a80dcbd4ba2a..26eb3ae66e755b546800dc94d6273dd8f5502d91 100644 (file)
@@ -1,94 +1,76 @@
 /*=============================================================================
     Copyright (c) 2001-2009 Joel de Guzman
     Copyright (c) 2007 Dan Marsden
+    Copyright (c) 2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_ADAPT_ASSOC_CLASS_OCTOBER_4_2009_840PM)
-#define BOOST_FUSION_ADAPT_ASSOC_CLASS_OCTOBER_4_2009_840PM
 
-#include <boost/fusion/support/tag_of_fwd.hpp>
-#include <boost/fusion/adapted/class/extension.hpp>
-#include <boost/fusion/adapted/class/class_iterator.hpp>
-#include <boost/fusion/adapted/class/detail/is_view_impl.hpp>
-#include <boost/fusion/adapted/class/detail/is_sequence_impl.hpp>
-#include <boost/fusion/adapted/class/detail/category_of_impl.hpp>
-#include <boost/fusion/adapted/class/detail/begin_impl.hpp>
-#include <boost/fusion/adapted/class/detail/end_impl.hpp>
-#include <boost/fusion/adapted/class/detail/size_impl.hpp>
-#include <boost/fusion/adapted/class/detail/at_impl.hpp>
-#include <boost/fusion/adapted/class/detail/value_at_impl.hpp>
-#include <boost/fusion/adapted/class/detail/has_key_impl.hpp>
-#include <boost/fusion/adapted/class/detail/at_key_impl.hpp>
-#include <boost/fusion/adapted/class/detail/value_at_key_impl.hpp>
+#ifndef BOOST_FUSION_ADAPTED_CLASS_ADAPT_ASSOC_CLASS_HPP
+#define BOOST_FUSION_ADAPTED_CLASS_ADAPT_ASSOC_CLASS_HPP
 
 #include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/punctuation/comma_if.hpp>
-#include <boost/preprocessor/seq/for_each_i.hpp>
+#include <boost/preprocessor/empty.hpp>
 #include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/mpl/int.hpp>
-#include <boost/config/no_tr1/utility.hpp>
-
-namespace boost { namespace fusion { namespace extension {
-    template<typename Class, typename Key>
-    struct class_assoc_member;
-}}}
-
-
-#define BOOST_FUSION_ADAPT_ASSOC_CLASS(name, bseq)                             \
-    BOOST_FUSION_ADAPT_ASSOC_CLASS_I(                                           \
-        name, BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_CLASS_X bseq, 0))           \
-    /***/
-
-#define BOOST_FUSION_ADAPT_ASSOC_CLASS_X(x, y, z) ((x, y, z)) BOOST_FUSION_ADAPT_ASSOC_CLASS_Y
-#define BOOST_FUSION_ADAPT_ASSOC_CLASS_Y(x, y, z) ((x, y, z)) BOOST_FUSION_ADAPT_ASSOC_CLASS_X
-#define BOOST_FUSION_ADAPT_ASSOC_CLASS_X0
-#define BOOST_FUSION_ADAPT_ASSOC_CLASS_Y0
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/remove_const.hpp>
 
-// BOOST_FUSION_ADAPT_ASSOC_CLASS_I generates the overarching structure and uses
-// SEQ_FOR_EACH_I to generate the "linear" substructures.
-// Thanks to Paul Mensonides for the PP macro help
+#include <boost/fusion/adapted/struct/detail/extension.hpp>
+#include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
+#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/begin_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/end_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/deref_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/deref_data_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/key_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_of_data_impl.hpp>
+#include <boost/fusion/adapted/class/detail/extension.hpp>
+#include <boost/fusion/adapted/class/detail/adapt_base.hpp>
 
-#define BOOST_FUSION_ADAPT_ASSOC_CLASS_I(name, seq)                             \
-    namespace boost { namespace fusion { namespace traits                       \
-    {                                                                           \
-        template <>                                                             \
-        struct tag_of<name>                                                     \
-        {                                                                       \
-            typedef class_tag type;                                             \
-        };                                                                      \
-    }}}                                                                         \
-    namespace boost { namespace fusion { namespace extension                    \
-    {                                                                           \
-        template <>                                                             \
-        struct class_size<name> : mpl::int_<BOOST_PP_SEQ_SIZE(seq)> {};         \
-        BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_ADAPT_ASSOC_CLASS_C, name, seq)    \
-    }}}                                                                         \
-    /***/
+#define BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0(A, B, C, D, E)\
+    ((A, B, C, D, E)) BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_1
+#define BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_1(A, B, C, D, E)\
+    ((A, B, C, D, E)) BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0
+#define BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0_END
+#define BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_1_END
 
-#define BOOST_FUSION_ADAPT_ASSOC_CLASS_C(r, name, i, xy)                        \
-    template <>                                                                 \
-    struct class_member<name, i>                                                \
-    {                                                                           \
-        typedef BOOST_PP_TUPLE_ELEM(3, 0, xy) type;                             \
-        static type& call(name& class_)                                         \
-        {                                                                       \
-            return class_.BOOST_PP_TUPLE_ELEM(3, 1, xy);                        \
-        };                                                                      \
-    };                                                                          \
-    template<>                                                                  \
-    struct class_assoc_member<name, BOOST_PP_TUPLE_ELEM(3, 2, xy)>              \
+#define BOOST_FUSION_ADAPT_ASSOC_CLASS_C(                                       \
+    TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE)                                \
+                                                                                \
+    BOOST_FUSION_ADAPT_CLASS_C_BASE(TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,5) \
+                                                                                \
+    template<                                                                   \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ)   \
+    >                                                                           \
+    struct struct_assoc_key<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I> \
     {                                                                           \
-        typedef BOOST_PP_TUPLE_ELEM(3, 0, xy) type;                             \
-        static type& call(name& class_)                                         \
-        {                                                                       \
-            return class_.BOOST_PP_TUPLE_ELEM(3, 1, xy);                        \
-        };                                                                      \
+        typedef BOOST_PP_TUPLE_ELEM(5, 4, ATTRIBUTE) type;                      \
     };
-    /***/
+
+#define BOOST_FUSION_ADAPT_ASSOC_TPL_CLASS(                                     \
+    TEMPLATE_PARAMS_SEQ, NAME_SEQ, ATTRIBUTES)                                  \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_BASE(                                             \
+        (1)TEMPLATE_PARAMS_SEQ,                                                 \
+        (1)NAME_SEQ,                                                            \
+        assoc_struct_tag,                                                       \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0 ATTRIBUTES,_END),  \
+        BOOST_FUSION_ADAPT_ASSOC_CLASS_C)
+
+#define BOOST_FUSION_ADAPT_ASSOC_CLASS(NAME, ATTRIBUTES)                        \
+    BOOST_FUSION_ADAPT_STRUCT_BASE(                                             \
+        (0),                                                                    \
+        (0)(NAME),                                                              \
+        assoc_struct_tag,                                                       \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_CLASS_FILLER_0 ATTRIBUTES,_END),  \
+        BOOST_FUSION_ADAPT_ASSOC_CLASS_C)
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/class/adapt_assoc_class_named.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/class/adapt_assoc_class_named.hpp
new file mode 100644 (file)
index 0000000..e73b1fe
--- /dev/null
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_CLASS_ADAPT_ASSOC_CLASS_NAMED_HPP
+#define BOOST_FUSION_ADAPTED_CLASS_ADAPT_ASSOC_CLASS_NAMED_HPP
+
+#include <boost/fusion/adapted/class/adapt_assoc_class.hpp>
+#include <boost/fusion/adapted/struct/detail/proxy_type.hpp>
+
+#define BOOST_FUSION_ADAPT_ASSOC_CLASS_NAMED_NS(                                \
+    WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES)                              \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL(                           \
+        WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME)                                     \
+                                                                                \
+    BOOST_FUSION_ADAPT_ASSOC_CLASS(                                             \
+        BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME,  \
+        ATTRIBUTES)
+
+#define BOOST_FUSION_ADAPT_ASSOC_CLASS_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES)    \
+    BOOST_FUSION_ADAPT_ASSOC_CLASS_NAMED_NS(                                    \
+        WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES)
+
+#endif
index c4e5c29fd23b601cbe07450c69a1c69f858913ad..f3ee7e9371ce425eab6a6fa179f9334b02d0a7c0 100644 (file)
 /*=============================================================================
     Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2009-2010 Hartmut Kaiser
+    Copyright (c) 2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_ADAPT_CLASS_OCTOBER_4_2009_840PM)
-#define BOOST_FUSION_ADAPT_CLASS_OCTOBER_4_2009_840PM
 
-#include <boost/fusion/support/tag_of_fwd.hpp>
-#include <boost/fusion/adapted/class/extension.hpp>
-#include <boost/fusion/adapted/class/class_iterator.hpp>
-#include <boost/fusion/adapted/class/detail/is_view_impl.hpp>
-#include <boost/fusion/adapted/class/detail/is_sequence_impl.hpp>
-#include <boost/fusion/adapted/class/detail/category_of_impl.hpp>
-#include <boost/fusion/adapted/class/detail/begin_impl.hpp>
-#include <boost/fusion/adapted/class/detail/end_impl.hpp>
-#include <boost/fusion/adapted/class/detail/size_impl.hpp>
-#include <boost/fusion/adapted/class/detail/at_impl.hpp>
-#include <boost/fusion/adapted/class/detail/value_at_impl.hpp>
+#ifndef BOOST_FUSION_ADAPTED_CLASS_ADAPT_CLASS_HPP
+#define BOOST_FUSION_ADAPTED_CLASS_ADAPT_CLASS_HPP
 
 #include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/punctuation/comma_if.hpp>
-#include <boost/preprocessor/seq/for_each_i.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/mpl/int.hpp>
-#include <boost/config/no_tr1/utility.hpp>
-
-#define BOOST_FUSION_ADAPT_CLASS(name, bseq)                                    \
-    BOOST_FUSION_ADAPT_CLASS_I(                                                 \
-        name, BOOST_PP_CAT(BOOST_FUSION_ADAPT_CLASS_X bseq, 0))                 \
-    /***/
-
-#define BOOST_FUSION_ADAPT_CLASS_X(w, x, y, z) ((w, x, y, z)) BOOST_FUSION_ADAPT_CLASS_Y
-#define BOOST_FUSION_ADAPT_CLASS_Y(w, x, y, z) ((w, x, y, z)) BOOST_FUSION_ADAPT_CLASS_X
-#define BOOST_FUSION_ADAPT_CLASS_X0
-#define BOOST_FUSION_ADAPT_CLASS_Y0
-
-// BOOST_FUSION_ADAPT_CLASS_I generates the overarching structure and uses
-// SEQ_FOR_EACH_I to generate the "linear" substructures.
-// Thanks to Paul Mensonides for the PP macro help
-
-#define BOOST_FUSION_ADAPT_CLASS_I(name, seq)                                   \
-    namespace boost { namespace fusion { namespace traits                       \
-    {                                                                           \
-        template <>                                                             \
-        struct tag_of<name>                                                     \
-        {                                                                       \
-            typedef class_tag type;                                             \
-        };                                                                      \
-    }}}                                                                         \
-    namespace boost { namespace fusion { namespace extension                    \
-    {                                                                           \
-        template <>                                                             \
-        struct class_size<name> : mpl::int_<BOOST_PP_SEQ_SIZE(seq)> {};         \
-        BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_ADAPT_CLASS_C, name, seq)          \
-    }}}                                                                         \
-    /***/
+#include <boost/preprocessor/empty.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+#include <boost/fusion/adapted/struct/detail/extension.hpp>
+#include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
+#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/begin_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/end_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/deref_impl.hpp>
+#include <boost/fusion/adapted/class/detail/extension.hpp>
+#include <boost/fusion/adapted/class/detail/adapt_base.hpp>
+
+#define BOOST_FUSION_ADAPT_CLASS_FILLER_0(A, B, C, D)\
+    ((A, B, C, D)) BOOST_FUSION_ADAPT_CLASS_FILLER_1
+#define BOOST_FUSION_ADAPT_CLASS_FILLER_1(A, B, C, D)\
+    ((A, B, C, D)) BOOST_FUSION_ADAPT_CLASS_FILLER_0
+#define BOOST_FUSION_ADAPT_CLASS_FILLER_0_END
+#define BOOST_FUSION_ADAPT_CLASS_FILLER_1_END
+
+#define BOOST_FUSION_ADAPT_CLASS_C(TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE) \
+    BOOST_FUSION_ADAPT_CLASS_C_BASE(                                            \
+        TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE, 4)
+
+#define BOOST_FUSION_ADAPT_TPL_CLASS(TEMPLATE_PARAMS_SEQ, NAME_SEQ , ATTRIBUTES)\
+    BOOST_FUSION_ADAPT_STRUCT_BASE(                                             \
+        (1)TEMPLATE_PARAMS_SEQ,                                                 \
+        (1)NAME_SEQ,                                                            \
+        struct_tag,                                                             \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_CLASS_FILLER_0 ATTRIBUTES,_END),        \
+        BOOST_FUSION_ADAPT_CLASS_C)
+
+#define BOOST_FUSION_ADAPT_CLASS(NAME, ATTRIBUTES)                              \
+    BOOST_FUSION_ADAPT_STRUCT_BASE(                                             \
+        (0),                                                                    \
+        (0)(NAME),                                                              \
+        struct_tag,                                                             \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_CLASS_FILLER_0 ATTRIBUTES,_END),        \
+        BOOST_FUSION_ADAPT_CLASS_C)
 
-#define BOOST_FUSION_ADAPT_CLASS_C(r, name, i, xy)                              \
-    template <>                                                                 \
-    struct class_member<name, i>                                                \
-    {                                                                           \
-        typedef BOOST_PP_TUPLE_ELEM(4, 0, xy) type;                             \
-        typedef BOOST_PP_TUPLE_ELEM(4, 1, xy) get_type;                         \
-        struct proxy                                                            \
-        {                                                                       \
-            typedef BOOST_PP_TUPLE_ELEM(4, 0, xy) type;                         \
-            typedef BOOST_PP_TUPLE_ELEM(4, 1, xy) get_type;                     \
-            typedef                                                             \
-                add_reference<add_const<type>::type>::type                      \
-            cref_type;                                                          \
-                                                                                \
-            proxy(name& obj) : obj(obj) {}                                      \
-            name& obj;                                                          \
-                                                                                \
-            proxy& operator=(cref_type val)                                     \
-            {                                                                   \
-                BOOST_PP_TUPLE_ELEM(4, 3, xy);                                  \
-                return *this;                                                   \
-            }                                                                   \
-                                                                                \
-            operator get_type()                                                 \
-            {                                                                   \
-                return BOOST_PP_TUPLE_ELEM(4, 2, xy);                           \
-            }                                                                   \
-        };                                                                      \
-                                                                                \
-        static get_type call(name const& obj)                                   \
-        {                                                                       \
-            return BOOST_PP_TUPLE_ELEM(4, 2, xy);                               \
-        };                                                                      \
-                                                                                \
-        static proxy call(name& obj)                                            \
-        {                                                                       \
-            return proxy(obj);                                                  \
-        };                                                                      \
-    };                                                                          \
-    /***/
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/class/adapt_class_named.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/class/adapt_class_named.hpp
new file mode 100644 (file)
index 0000000..4dec906
--- /dev/null
@@ -0,0 +1,30 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2009-2010 Hartmut Kaiser
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_CLASS_ADAPT_CLASS_NAMED_HPP
+#define BOOST_FUSION_ADAPTED_CLASS_ADAPT_CLASS_NAMED_HPP
+
+#include <boost/fusion/adapted/class/adapt_class.hpp>
+#include <boost/fusion/adapted/struct/detail/proxy_type.hpp>
+
+#define BOOST_FUSION_ADAPT_CLASS_NAMED_NS(                                      \
+    WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES)                              \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL(                           \
+        WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME)                                     \
+                                                                                \
+    BOOST_FUSION_ADAPT_CLASS(                                                   \
+        BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME,  \
+        ATTRIBUTES)
+
+#define BOOST_FUSION_ADAPT_CLASS_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES)          \
+   BOOST_FUSION_ADAPT_CLASS_NAMED_NS(                                           \
+        WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES)
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/adapt_base.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/adapt_base.hpp
new file mode 100644 (file)
index 0000000..54b701f
--- /dev/null
@@ -0,0 +1,115 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_CLASS_DETAIL_ADAPT_BASE_HPP
+#define BOOST_FUSION_ADAPTED_CLASS_DETAIL_ADAPT_BASE_HPP
+
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
+#include <boost/preprocessor/seq/elem.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+//cschmidt: Spirit relies on Fusion defining class_member_proxy in the
+//boost::fusion::extension namespace, with two nested types named lvalue and
+//rvalue.
+
+#define BOOST_FUSION_ADAPT_CLASS_GET_IDENTITY_TEMPLATE_IMPL(TEMPLATE_PARAMS_SEQ)\
+    typename detail::get_identity<                                              \
+        lvalue                                                                  \
+      , BOOST_PP_SEQ_ELEM(1,TEMPLATE_PARAMS_SEQ)                                \
+    >::type
+
+#define BOOST_FUSION_ADAPT_CLASS_GET_IDENTITY_NON_TEMPLATE_IMPL(                \
+    TEMPLATE_PARAMS_SEQ)                                                        \
+                                                                                \
+    lvalue
+
+#define BOOST_FUSION_ADAPT_CLASS_C_BASE(\
+    TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE)              \
+                                                                                \
+    template<                                                                   \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ)   \
+    >                                                                           \
+    struct class_member_proxy<                                                  \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)                         \
+      , I                                                                       \
+    >                                                                           \
+    {                                                                           \
+        typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) lvalue; \
+        typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) rvalue; \
+                                                                                \
+        class_member_proxy(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj)\
+          : obj(obj)                                                            \
+        {}                                                                      \
+                                                                                \
+        template<class Arg>                                                     \
+        class_member_proxy&                                                     \
+        operator=(Arg const& val)                                               \
+        {                                                                       \
+            BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 3, ATTRIBUTE);            \
+            return *this;                                                       \
+        }                                                                       \
+                                                                                \
+        operator lvalue()                                                       \
+        {                                                                       \
+            return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE);     \
+        }                                                                       \
+                                                                                \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj;                   \
+    };                                                                          \
+                                                                                \
+    template<                                                                   \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ)   \
+    >                                                                           \
+    struct struct_member<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I>    \
+    {                                                                           \
+        typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) lvalue; \
+                                                                                \
+        typedef                                                                 \
+            BOOST_PP_IF(                                                        \
+                BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ),                         \
+                BOOST_FUSION_ADAPT_CLASS_GET_IDENTITY_TEMPLATE_IMPL,            \
+                BOOST_FUSION_ADAPT_CLASS_GET_IDENTITY_NON_TEMPLATE_IMPL)(       \
+                    TEMPLATE_PARAMS_SEQ)                                        \
+        type;                                                                   \
+                                                                                \
+        template<typename Seq>                                                  \
+        struct apply                                                            \
+        {                                                                       \
+            typedef                                                             \
+                class_member_proxy<                                             \
+                    BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)             \
+                  , I                                                           \
+                >                                                               \
+            proxy;                                                              \
+                                                                                \
+            typedef typename                                                    \
+                mpl::if_<                                                       \
+                    is_const<Seq>                                               \
+                  , BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE)     \
+                  , proxy                                                       \
+                >::type                                                         \
+            type;                                                               \
+                                                                                \
+            static proxy                                                        \
+            call(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj)          \
+            {                                                                   \
+                return proxy(obj);                                              \
+            }                                                                   \
+                                                                                \
+            static BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE)      \
+            call(BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& obj)    \
+            {                                                                   \
+                return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \
+            }                                                                   \
+        };                                                                      \
+    };
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/end_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/end_impl.hpp
new file mode 100644 (file)
index 0000000..81c02c3
--- /dev/null
@@ -0,0 +1,48 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_END_IMPL_OCTOBER_4_2009_919PM)
+#define BOOST_FUSION_END_IMPL_OCTOBER_4_2009_919PM
+
+#include <boost/fusion/adapted/class/class_iterator.hpp>
+
+namespace boost { namespace fusion
+{
+    struct class_tag;
+
+    namespace extension
+    {
+        template <typename Tag>
+        struct end_impl;
+
+        template <typename Class>
+        struct class_size;
+
+        template <>
+        struct end_impl<class_tag>
+        {
+            template <typename Sequence>
+            struct apply
+            {
+                typedef
+                    class_iterator<
+                        Sequence
+                      , class_size<Sequence>::value
+                    >
+                type;
+
+                static type
+                call(Sequence& v)
+                {
+                    return type(v);
+                }
+            };
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/extension.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/extension.hpp
new file mode 100644 (file)
index 0000000..0ad7c66
--- /dev/null
@@ -0,0 +1,33 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_CLASS_DETAIL_EXTENSION_HPP
+#define BOOST_FUSION_ADAPTED_CLASS_DETAIL_EXTENSION_HPP
+
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+namespace boost { namespace fusion
+{
+    namespace detail
+    {
+        template <typename T, typename Dummy>
+        struct get_identity
+          : remove_const<typename remove_reference<T>::type>
+        {};
+    }
+
+    namespace extension
+    {
+        template <typename T, int N>
+        struct class_member_proxy;
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/has_key_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/has_key_impl.hpp
new file mode 100644 (file)
index 0000000..27f1adc
--- /dev/null
@@ -0,0 +1,40 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2005-2007 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_HAS_KEY_IMPL_OCTOBER_4_2009_919PM)
+#define BOOST_FUSION_HAS_KEY_IMPL_OCTOBER_4_2009_919PM
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/not.hpp>
+
+namespace boost { namespace fusion {
+
+    struct class_tag;
+
+    namespace extension
+    {
+        struct no_such_member;
+
+        template<typename T>
+        struct has_key_impl;
+
+        template<typename Class, typename Key>
+        struct class_assoc_member;
+
+        template<>
+        struct has_key_impl<class_tag>
+        {
+            template<typename Sequence, typename Key>
+            struct apply
+                : mpl::not_<is_same<no_such_member, typename class_assoc_member<Sequence, Key>::type> >
+            {
+            };
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/is_sequence_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/is_sequence_impl.hpp
new file mode 100644 (file)
index 0000000..c1d35de
--- /dev/null
@@ -0,0 +1,31 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_IS_SEQUENCE_IMPL_OCTOBER_4_2009_919PM)
+#define BOOST_FUSION_IS_SEQUENCE_IMPL_OCTOBER_4_2009_919PM
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+    struct class_tag;
+
+    namespace extension
+    {
+        template<typename Tag>
+        struct is_sequence_impl;
+
+        template<>
+        struct is_sequence_impl<class_tag>
+        {
+            template<typename Sequence>
+            struct apply : mpl::true_ {};
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/is_view_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/is_view_impl.hpp
new file mode 100644 (file)
index 0000000..86ce007
--- /dev/null
@@ -0,0 +1,32 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_IS_VIEW_IMPL_OCTOBER_4_2009_919PM)
+#define BOOST_FUSION_IS_VIEW_IMPL_OCTOBER_4_2009_919PM
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+    struct class_tag;
+
+    namespace extension
+    {
+        template<typename Tag>
+        struct is_view_impl;
+
+        template<>
+        struct is_view_impl<class_tag>
+        {
+            template<typename T>
+            struct apply : mpl::false_
+            {};
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/size_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/size_impl.hpp
new file mode 100644 (file)
index 0000000..de34a3b
--- /dev/null
@@ -0,0 +1,37 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_SIZE_IMPL_OCTOBER_4_2009_919PM)
+#define BOOST_FUSION_SIZE_IMPL_OCTOBER_4_2009_919PM
+
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion
+{
+    namespace extension
+    {
+        template <typename Class>
+        struct class_size;
+    }
+
+    struct class_tag;
+
+    namespace extension
+    {
+        template<typename T>
+        struct size_impl;
+
+        template <>
+        struct size_impl<class_tag>
+        {
+            template <typename Sequence>
+            struct apply : extension::class_size<Sequence> {};
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/value_at_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/value_at_impl.hpp
new file mode 100644 (file)
index 0000000..64d2fc3
--- /dev/null
@@ -0,0 +1,47 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_VALUE_AT_IMPL_OCTOBER_4_2009_918PM)
+#define BOOST_FUSION_VALUE_AT_IMPL_OCTOBER_4_2009_918PM
+
+#include <boost/mpl/if.hpp>
+#include <boost/static_assert.hpp>
+
+namespace boost { namespace fusion
+{
+    struct class_tag;
+
+    namespace extension
+    {
+        template<typename T>
+        struct value_at_impl;
+
+        template <typename Class, int N>
+        struct class_member;
+
+        template <typename Class>
+        struct class_size;
+
+        template <>
+        struct value_at_impl<class_tag>
+        {
+            template <typename Sequence, typename N>
+            struct apply
+            {
+                static int const n_value = N::value;
+                BOOST_MPL_ASSERT_RELATION(
+                    n_value, <=, extension::class_size<Sequence>::value);
+
+                typedef typename
+                    extension::class_member<Sequence, N::value>::type
+                type;
+            };
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/value_at_key_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/class/detail/value_at_key_impl.hpp
new file mode 100644 (file)
index 0000000..f9adc10
--- /dev/null
@@ -0,0 +1,39 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2005-2007 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(BOOST_FUSION_VALUE_AT_KEY_IMPL_OCTOBER_4_2009_918PM)
+#define BOOST_FUSION_VALUE_AT_KEY_IMPL_OCTOBER_4_2009_918PM
+
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion
+{
+    struct class_tag;
+
+    namespace extension
+    {
+        template<typename T>
+        struct value_at_key_impl;
+
+        template <typename Class, typename Key>
+        struct class_assoc_member;
+
+        template <>
+        struct value_at_key_impl<class_tag>
+        {
+            template <typename Sequence, typename Key>
+            struct apply
+            {
+                typedef typename
+                    extension::class_assoc_member<Sequence, Key>::type
+                type;
+            };
+        };
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/class/extension.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/class/extension.hpp
new file mode 100644 (file)
index 0000000..28d0a22
--- /dev/null
@@ -0,0 +1,68 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+
+    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)
+==============================================================================*/
+#if !defined(FUSION_CLASS_EXTENSION_OCTOBER_4_2009_839PM)
+#define FUSION_CLASS_EXTENSION_OCTOBER_4_2009_839PM
+
+#include <boost/type_traits/add_const.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename Class, int N>
+    struct class_member;
+
+    template <typename Class>
+    struct class_size;
+
+    template <typename Class, int N>
+    struct class_member<Class const, N> : class_member<Class, N> {};
+    //~ {
+        //~ typedef typename class_member<Class, N>::type type;
+        //~ typedef typename class_member<Class, N>::get_type get_type;
+        //~ typedef typename class_member<Class, N>::proxy proxy;
+
+        //~ static get_type&
+        //~ call(Class const& class_)
+        //~ {
+            //~ return class_member<Class, N>::call(
+                //~ const_cast<Class&>(class_));
+        //~ }
+    //~ };
+
+    template <typename Class>
+    struct class_size<Class const>
+        : class_size<Class>
+    {};
+
+    struct no_such_member;
+
+    template<typename Class, typename Key>
+    struct class_assoc_member
+    {
+        typedef no_such_member type;
+    };
+
+    template<typename Class, typename Key>
+    struct class_assoc_member<Class const, Key>
+    {
+        typedef typename
+            add_const<typename class_assoc_member<Class, Key>::type>::type
+        type;
+
+        static type&
+        call(Class const& class_)
+        {
+            return class_assoc_member<Class, Key>::call(
+                const_cast<Class&>(class_));
+        }
+    };
+
+}}}
+
+#endif
+
+
index ffc343bc86ef504ef9cadc2c71b8caab52fff6c8..5792dd445023e24591033eeea3ec49c4a8a8cb50 100644 (file)
@@ -1,70 +1,24 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_STD_PAIR_24122005_1744)
-#define BOOST_FUSION_STD_PAIR_24122005_1744
 
-#include <boost/fusion/support/tag_of_fwd.hpp>
-#include <boost/fusion/adapted/struct.hpp>
-#include <boost/mpl/int.hpp>
-#include <boost/config/no_tr1/utility.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STD_PAIR_HPP
+#define BOOST_FUSION_ADAPTED_STD_PAIR_HPP
 
-namespace boost { namespace fusion
-{
-    struct struct_tag;
-
-    namespace traits
-    {
-        template <typename T1, typename T2>
-#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
-        struct tag_of<std::pair<T1, T2>, void >
-#else
-        struct tag_of<std::pair<T1, T2> >
-#endif
-        {
-            typedef struct_tag type;
-        };
-    }
-
-    namespace extension
-    {
-        template <typename Struct, int N>
-        struct struct_member;
-
-        template <typename Struct>
-        struct struct_size;
+#include <boost/fusion/adapted/struct/adapt_struct.hpp>
 
-        template <typename T1, typename T2>
-        struct struct_member<std::pair<T1, T2>, 0>
-        {
-            typedef T1 type;
-
-            static type& call(std::pair<T1, T2>& pair)
-            {
-                return pair.first;
-            }
-        };
-
-        template <typename T1, typename T2>
-        struct struct_member<std::pair<T1, T2>, 1>
-        {
-            typedef T2 type;
-
-            static type& call(std::pair<T1, T2>& pair)
-            {
-                return pair.second;
-            }
-        };
+namespace std
+{
+    template<class T1, class T2>
+    struct pair;
+}
 
-        template <typename T1, typename T2>
-        struct struct_size<std::pair<T1, T2> > : mpl::int_<2>
-        {
-        };
-    }
-}}
+BOOST_FUSION_ADAPT_TPL_STRUCT(
+    (T1)(T2),(std::pair)(T1)(T2),(T1, first)(T2, second))
 
 #endif
index c3c24e0b950a3075b5625980e838895f7a21a89c..f184a0d3a1d68ad685a78f2b84b2ca1f2bc8fc60 100644 (file)
@@ -1,28 +1,20 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_STRUCT_24122005_1744)
-#define BOOST_FUSION_STRUCT_24122005_1744
 
-#include <boost/fusion/adapted/struct/extension.hpp>
-#include <boost/fusion/adapted/struct/adapt_struct.hpp>
-#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
-#include <boost/fusion/adapted/struct/struct_iterator.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_HPP
 
-#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/at_key_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/begin_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/end_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/has_key_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/value_at_key_impl.hpp>
+#include <boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp>
+#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
+#include <boost/fusion/adapted/struct/adapt_struct_named.hpp>
+#include <boost/fusion/adapted/struct/adapt_struct.hpp>
+#include <boost/fusion/adapted/struct/define_assoc_struct.hpp>
+#include <boost/fusion/adapted/struct/define_struct.hpp>
 
 #endif
index e8ee31b961bbeeae16c9298906727a4946df7744..c6c991d154c65a3d2676c23f08a609d542747e91 100644 (file)
@@ -1,94 +1,82 @@
 /*=============================================================================
     Copyright (c) 2001-2007 Joel de Guzman
     Copyright (c) 2007 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_ADAPT_ASSOC_STRUCT_20070508_2207)
-#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_20070508_2207
 
-#include <boost/fusion/support/tag_of_fwd.hpp>
-#include <boost/fusion/adapted/struct/extension.hpp>
-#include <boost/fusion/adapted/struct/struct_iterator.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_ADAPT_ASSOC_STRUCT_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_ASSOC_STRUCT_HPP
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/empty.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+#include <boost/fusion/adapted/struct/detail/extension.hpp>
+#include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
+#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
 #include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
 #include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
 #include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
 #include <boost/fusion/adapted/struct/detail/begin_impl.hpp>
 #include <boost/fusion/adapted/struct/detail/end_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/has_key_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/at_key_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/value_at_key_impl.hpp>
-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/punctuation/comma_if.hpp>
-#include <boost/preprocessor/seq/for_each_i.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/mpl/int.hpp>
-#include <boost/config/no_tr1/utility.hpp>
-
-namespace boost { namespace fusion { namespace extension {
-    template<typename Struct, typename Key>
-    struct struct_assoc_member;
-}}}
+#include <boost/fusion/adapted/struct/detail/value_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/deref_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/deref_data_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/key_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_of_data_impl.hpp>
 
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(X, Y, Z)\
+    ((X, Y, Z)) BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1(X, Y, Z)\
+    ((X, Y, Z)) BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0_END
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1_END
 
-#define BOOST_FUSION_ADAPT_ASSOC_STRUCT(name, bseq)                                   \
-    BOOST_FUSION_ADAPT_ASSOC_STRUCT_I(                                                \
-        name, BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_X bseq, 0))                \
-    /***/
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C_BASE(                                 \
+    TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,PREFIX,ATTRIBUTE)                            \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_C_BASE(                                           \
+        TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, PREFIX, ATTRIBUTE, 3)                 \
+                                                                                \
+    template<                                                                   \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ)   \
+    >                                                                           \
+    struct struct_assoc_key<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I> \
+    {                                                                           \
+        typedef BOOST_PP_TUPLE_ELEM(3, 2, ATTRIBUTE) type;                      \
+    };
 
-#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_X(x, y, z) ((x, y, z)) BOOST_FUSION_ADAPT_ASSOC_STRUCT_Y
-#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_Y(x, y, z) ((x, y, z)) BOOST_FUSION_ADAPT_ASSOC_STRUCT_X
-#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_X0
-#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_Y0
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C(                                      \
+    TEMPLATE_PARAMS_SEQ,NAME_SEQ, I, ATTRIBUTE)                                 \
+                                                                                \
+    BOOST_FUSION_ADAPT_ASSOC_STRUCT_C_BASE(                                     \
+        TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,BOOST_PP_EMPTY(),ATTRIBUTE)
 
-// BOOST_FUSION_ADAPT_ASSOC_STRUCT_I generates the overarching structure and uses
-// SEQ_FOR_EACH_I to generate the "linear" substructures.
-// Thanks to Paul Mensonides for the PP macro help
+#define BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT(                                    \
+    TEMPLATE_PARAMS_SEQ, NAME_SEQ, ATTRIBUTES)                                  \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_BASE(                                             \
+        (1)TEMPLATE_PARAMS_SEQ,                                                 \
+        (1)NAME_SEQ,                                                            \
+        assoc_struct_tag,                                                       \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \
+        BOOST_FUSION_ADAPT_ASSOC_STRUCT_C)
 
-#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_I(name, seq)                            \
-    namespace boost { namespace fusion { namespace traits                       \
-    {                                                                           \
-        template <>                                                             \
-        struct tag_of<name>                                                     \
-        {                                                                       \
-            typedef struct_tag type;                                            \
-        };                                                                      \
-    }}}                                                                         \
-    namespace boost { namespace fusion { namespace extension                    \
-    {                                                                           \
-        template <>                                                             \
-        struct struct_size<name> : mpl::int_<BOOST_PP_SEQ_SIZE(seq)> {};        \
-        BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_ADAPT_ASSOC_STRUCT_C, name, seq)   \
-    }}}                                                                         \
-    /***/
-
-#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C(r, name, i, xy)                       \
-    template <>                                                                 \
-    struct struct_member<name, i>                                               \
-    {                                                                           \
-        typedef BOOST_PP_TUPLE_ELEM(3, 0, xy) type;                             \
-        static type& call(name& struct_)                                        \
-        {                                                                       \
-            return struct_.BOOST_PP_TUPLE_ELEM(3, 1, xy);                       \
-        };                                                                      \
-    };                                                                          \
-    template<>                                                                  \
-    struct struct_assoc_member<name, BOOST_PP_TUPLE_ELEM(3, 2, xy)>             \
-    {                                                                           \
-        typedef BOOST_PP_TUPLE_ELEM(3, 0, xy) type;                             \
-        static type& call(name& struct_)                                        \
-        {                                                                       \
-            return struct_.BOOST_PP_TUPLE_ELEM(3, 1, xy);                       \
-        };                                                                      \
-    };
-    /***/
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT(NAME, ATTRIBUTES)                       \
+    BOOST_FUSION_ADAPT_STRUCT_BASE(                                             \
+        (0),                                                                    \
+        (0)(NAME),                                                              \
+        assoc_struct_tag,                                                       \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \
+        BOOST_FUSION_ADAPT_ASSOC_STRUCT_C)
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp
new file mode 100644 (file)
index 0000000..d4c3cdc
--- /dev/null
@@ -0,0 +1,38 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_ADAPT_ASSOC_STRUCT_NAMED_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_ASSOC_STRUCT_NAMED_HPP
+
+#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
+#include <boost/fusion/adapted/struct/detail/proxy_type.hpp>
+
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_C(                                \
+    TEMPLATE_PARAMS_SEQ,NAME_SEQ, I, ATTRIBUTE)                                 \
+                                                                                \
+    BOOST_FUSION_ADAPT_ASSOC_STRUCT_C_BASE(                                     \
+        TEMPLATE_PARAMS_SEQ,NAME_SEQ, I, obj., ATTRIBUTE)
+
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS(                               \
+    WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES)                              \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL(                           \
+        WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME)                                     \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_BASE(                                             \
+        (0),                                                                    \
+        (0)(BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION(                    \
+            (0)NAMESPACE_SEQ)NAME),                                             \
+        assoc_struct_tag,                                                       \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \
+        BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_C)
+
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES)   \
+    BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS(                                   \
+        WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES)
+
+#endif
index 41de5b1edf6f214fe7309f0806b7953ed986889d..0758af53ecab1d5cc4ba5ba9e89d4b5497f2f13f 100644 (file)
@@ -1,75 +1,59 @@
 /*=============================================================================
     Copyright (c) 2001-2007 Joel de Guzman
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_ADAPT_STRUCT_APRIL_2_2007_1158AM)
-#define BOOST_FUSION_ADAPT_STRUCT_APRIL_2_2007_1158AM
 
-#include <boost/fusion/support/tag_of_fwd.hpp>
-#include <boost/fusion/adapted/struct/extension.hpp>
-#include <boost/fusion/adapted/struct/struct_iterator.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_HPP
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/empty.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+#include <boost/fusion/adapted/struct/detail/extension.hpp>
+#include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
+#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
 #include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
 #include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
 #include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
 #include <boost/fusion/adapted/struct/detail/begin_impl.hpp>
 #include <boost/fusion/adapted/struct/detail/end_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/punctuation/comma_if.hpp>
-#include <boost/preprocessor/seq/for_each_i.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/mpl/int.hpp>
-#include <boost/config/no_tr1/utility.hpp>
-
-#define BOOST_FUSION_ADAPT_STRUCT(name, bseq)                                   \
-    BOOST_FUSION_ADAPT_STRUCT_I(                                                \
-        name, BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_X bseq, 0))                \
-    /***/
-
-#define BOOST_FUSION_ADAPT_STRUCT_X(x, y) ((x, y)) BOOST_FUSION_ADAPT_STRUCT_Y
-#define BOOST_FUSION_ADAPT_STRUCT_Y(x, y) ((x, y)) BOOST_FUSION_ADAPT_STRUCT_X
-#define BOOST_FUSION_ADAPT_STRUCT_X0
-#define BOOST_FUSION_ADAPT_STRUCT_Y0
-
-// BOOST_FUSION_ADAPT_STRUCT_I generates the overarching structure and uses
-// SEQ_FOR_EACH_I to generate the "linear" substructures.
-// Thanks to Paul Mensonides for the PP macro help
-
-#define BOOST_FUSION_ADAPT_STRUCT_I(name, seq)                                  \
-    namespace boost { namespace fusion { namespace traits                       \
-    {                                                                           \
-        template <>                                                             \
-        struct tag_of<name>                                                     \
-        {                                                                       \
-            typedef struct_tag type;                                            \
-        };                                                                      \
-    }}}                                                                         \
-    namespace boost { namespace fusion { namespace extension                    \
-    {                                                                           \
-        template <>                                                             \
-        struct struct_size<name> : mpl::int_<BOOST_PP_SEQ_SIZE(seq)> {};        \
-        BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_ADAPT_STRUCT_C, name, seq)         \
-    }}}                                                                         \
-    /***/
-
-#define BOOST_FUSION_ADAPT_STRUCT_C(r, name, i, xy)                             \
-    template <>                                                                 \
-    struct struct_member<name, i>                                               \
-    {                                                                           \
-        typedef BOOST_PP_TUPLE_ELEM(2, 0, xy) type;                             \
-        static type& call(name& struct_)                                        \
-        {                                                                       \
-            return struct_.BOOST_PP_TUPLE_ELEM(2, 1, xy);                       \
-        };                                                                      \
-    };                                                                          \
-    /***/
+#include <boost/fusion/adapted/struct/detail/value_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/deref_impl.hpp>
+
+#define BOOST_FUSION_ADAPT_STRUCT_FILLER_0(X, Y)                                \
+    ((X, Y)) BOOST_FUSION_ADAPT_STRUCT_FILLER_1
+#define BOOST_FUSION_ADAPT_STRUCT_FILLER_1(X, Y)                                \
+    ((X, Y)) BOOST_FUSION_ADAPT_STRUCT_FILLER_0
+#define BOOST_FUSION_ADAPT_STRUCT_FILLER_0_END
+#define BOOST_FUSION_ADAPT_STRUCT_FILLER_1_END
+
+#define BOOST_FUSION_ADAPT_STRUCT_C(TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE)\
+    BOOST_FUSION_ADAPT_STRUCT_C_BASE(                                           \
+        TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,BOOST_PP_EMPTY(),ATTRIBUTE,2)
+
+#define BOOST_FUSION_ADAPT_TPL_STRUCT(TEMPLATE_PARAMS_SEQ,NAME_SEQ, ATTRIBUTES) \
+    BOOST_FUSION_ADAPT_STRUCT_BASE(                                             \
+        (1)TEMPLATE_PARAMS_SEQ,                                                 \
+        (1)NAME_SEQ,                                                            \
+        struct_tag,                                                             \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END),       \
+        BOOST_FUSION_ADAPT_STRUCT_C)
+
+#define BOOST_FUSION_ADAPT_STRUCT(NAME, ATTRIBUTES)                             \
+    BOOST_FUSION_ADAPT_STRUCT_BASE(                                             \
+        (0),                                                                    \
+        (0)(NAME),                                                              \
+        struct_tag,                                                             \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END),       \
+        BOOST_FUSION_ADAPT_STRUCT_C)
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/adapt_struct_named.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/adapt_struct_named.hpp
new file mode 100644 (file)
index 0000000..37ea1af
--- /dev/null
@@ -0,0 +1,41 @@
+/*=============================================================================
+    Copyright (c) 2001-2007 Joel de Guzman
+    Copyright (c) 2009-2010 Hartmut Kaiser
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_NAMED_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_NAMED_HPP
+
+#include <boost/fusion/adapted/struct/adapt_struct.hpp>
+#include <boost/fusion/adapted/struct/detail/proxy_type.hpp>
+#include <boost/preprocessor/empty.hpp>
+
+#define BOOST_FUSION_ADAPT_STRUCT_NAMED_C(                                      \
+    TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE)                                \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_C_BASE(                                           \
+        TEMPLATE_PARAMS_SEQ,NAME_SEQ, I, obj., ATTRIBUTE, 2)
+
+#define BOOST_FUSION_ADAPT_STRUCT_NAMED_NS(                                     \
+    WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES)                              \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL(                           \
+        WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME)                                     \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_BASE(                                             \
+        (0),                                                                    \
+        (0)(BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION(                    \
+            (0)NAMESPACE_SEQ)NAME),                                             \
+        struct_tag,                                                             \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END),       \
+        BOOST_FUSION_ADAPT_STRUCT_NAMED_C)
+
+#define BOOST_FUSION_ADAPT_STRUCT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES)         \
+    BOOST_FUSION_ADAPT_STRUCT_NAMED_NS(                                         \
+        WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES)
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/define_assoc_struct.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/define_assoc_struct.hpp
new file mode 100644 (file)
index 0000000..d69ed46
--- /dev/null
@@ -0,0 +1,41 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DEFINE_ASSOC_STRUCT_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DEFINE_ASSOC_STRUCT_HPP
+
+#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
+#include <boost/fusion/adapted/struct/detail/define_struct.hpp>
+
+#define BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT(                                   \
+    TEMPLATE_PARAMS_SEQ, NAMESPACE_SEQ, NAME, ATTRIBUTES)                       \
+                                                                                \
+    BOOST_FUSION_DEFINE_TPL_STRUCT_IMPL(                                        \
+        TEMPLATE_PARAMS_SEQ,                                                    \
+        (0)NAMESPACE_SEQ,                                                       \
+        NAME,                                                                   \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \
+        3)                                                                      \
+                                                                                \
+    BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT(                                        \
+        TEMPLATE_PARAMS_SEQ,                                                    \
+        (BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ) NAME)\
+            TEMPLATE_PARAMS_SEQ,                                                \
+        ATTRIBUTES)
+
+#define BOOST_FUSION_DEFINE_ASSOC_STRUCT(NAMESPACE_SEQ, NAME, ATTRIBUTES)       \
+    BOOST_FUSION_DEFINE_STRUCT_IMPL(                                            \
+        (0)NAMESPACE_SEQ,                                                       \
+        NAME,                                                                   \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \
+        3)                                                                      \
+                                                                                \
+    BOOST_FUSION_ADAPT_ASSOC_STRUCT(                                            \
+        BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ) NAME, \
+        ATTRIBUTES)
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/define_struct.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/define_struct.hpp
new file mode 100644 (file)
index 0000000..11a393b
--- /dev/null
@@ -0,0 +1,41 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DEFINE_STRUCT_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DEFINE_STRUCT_HPP
+
+#include <boost/fusion/adapted/struct/adapt_struct.hpp>
+#include <boost/fusion/adapted/struct/detail/define_struct.hpp>
+
+#define BOOST_FUSION_DEFINE_TPL_STRUCT(                                         \
+    TEMPLATE_PARAMS_SEQ, NAMESPACE_SEQ, NAME, ATTRIBUTES)                       \
+                                                                                \
+    BOOST_FUSION_DEFINE_TPL_STRUCT_IMPL(                                        \
+        TEMPLATE_PARAMS_SEQ,                                                    \
+        (0)NAMESPACE_SEQ,                                                       \
+        NAME,                                                                   \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END),       \
+        2)                                                                      \
+                                                                                \
+    BOOST_FUSION_ADAPT_TPL_STRUCT(                                              \
+        TEMPLATE_PARAMS_SEQ,                                                    \
+        (BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ) NAME)\
+            TEMPLATE_PARAMS_SEQ,                                                \
+        ATTRIBUTES)
+
+#define BOOST_FUSION_DEFINE_STRUCT(NAMESPACE_SEQ, NAME, ATTRIBUTES)             \
+    BOOST_FUSION_DEFINE_STRUCT_IMPL(                                            \
+        (0)NAMESPACE_SEQ,                                                       \
+        NAME,                                                                   \
+        BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END),       \
+        2)                                                                      \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT(                                                  \
+        BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ) NAME, \
+        ATTRIBUTES)
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/adapt_base.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/adapt_base.hpp
new file mode 100644 (file)
index 0000000..c1b1b92
--- /dev/null
@@ -0,0 +1,203 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_HPP
+
+#include <boost/config.hpp>
+#include <boost/fusion/support/tag_of_fwd.hpp>
+
+#include <boost/preprocessor/empty.hpp>
+#include <boost/preprocessor/stringize.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/seq/for_each.hpp>
+#include <boost/preprocessor/seq/for_each_i.hpp>
+#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
+#include <boost/preprocessor/tuple/eat.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/mpl/tag.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/add_const.hpp>
+
+#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME_TEMPLATE_PARAMS(SEQ)              \
+    BOOST_PP_SEQ_HEAD(SEQ)<BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TAIL(SEQ))>           \
+    BOOST_PP_EMPTY()
+
+#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(SEQ)                              \
+    BOOST_PP_IF(                                                                \
+        BOOST_PP_SEQ_HEAD(SEQ),                                                 \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME_TEMPLATE_PARAMS,                  \
+        BOOST_PP_SEQ_HEAD)(BOOST_PP_SEQ_TAIL(SEQ))
+
+#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL_C(R, _, ELEM)     \
+    (typename ELEM)
+#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL(SEQ)              \
+    BOOST_PP_SEQ_ENUM(                                                          \
+        BOOST_PP_SEQ_FOR_EACH(                                                  \
+            BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL_C,            \
+            _,                                                                  \
+            BOOST_PP_SEQ_TAIL(SEQ)))
+#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(SEQ)                   \
+    BOOST_PP_IF(                                                                \
+        BOOST_PP_SEQ_HEAD(SEQ),                                                 \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL,                  \
+        BOOST_PP_TUPLE_EAT(1))(SEQ)
+
+#ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
+#   define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION(                     \
+        MODIFIER, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG)                           \
+                                                                                \
+    template<                                                                   \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ)   \
+    >                                                                           \
+    struct tag_of<                                                              \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) MODIFIER                \
+      , void                                                                    \
+    >                                                                           \
+    {                                                                           \
+        typedef TAG type;                                                       \
+    };
+#else
+#   define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION(                     \
+        MODIFIER, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG)                           \
+                                                                                \
+    template<                                                                   \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ)   \
+    >                                                                           \
+    struct tag_of<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) MODIFIER>     \
+    {                                                                           \
+        typedef TAG type;                                                       \
+    };
+#endif
+
+#define BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL(R,DATA,I,ATTRIBUTE)      \
+    BOOST_PP_TUPLE_ELEM(3,0,DATA)(                                              \
+        BOOST_PP_TUPLE_ELEM(3,1,DATA),                                          \
+        BOOST_PP_TUPLE_ELEM(3,2,DATA),                                          \
+        I,                                                                      \
+        ATTRIBUTE)
+
+#define BOOST_FUSION_ADAPT_STRUCT_C_BASE(                                       \
+    TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,PREFIX,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE)       \
+                                                                                \
+    template<                                                                   \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ)   \
+    >                                                                           \
+    struct struct_member<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I>    \
+    {                                                                           \
+        typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) type;   \
+                                                                                \
+        template<typename Seq>                                                  \
+        struct apply                                                            \
+        {                                                                       \
+            typedef typename                                                    \
+                add_reference<                                                  \
+                    typename mpl::eval_if<                                      \
+                        is_const<Seq>                                           \
+                      , add_const<BOOST_PP_TUPLE_ELEM(                          \
+                            ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE)                 \
+                        >                                                       \
+                      , mpl::identity<BOOST_PP_TUPLE_ELEM(                      \
+                          ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE)                   \
+                        >                                                       \
+                    >::type                                                     \
+                >::type                                                         \
+            type;                                                               \
+                                                                                \
+            static type                                                         \
+            call(Seq& seq)                                                      \
+            {                                                                   \
+                return seq.PREFIX                                               \
+                    BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE);    \
+            }                                                                   \
+        };                                                                      \
+    };                                                                          \
+                                                                                \
+    template<                                                                   \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ)   \
+    >                                                                           \
+    struct struct_member_name<                                                  \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)                         \
+      , I                                                                       \
+    >                                                                           \
+    {                                                                           \
+        typedef char const* type;                                               \
+                                                                                \
+        static type                                                             \
+        call()                                                                  \
+        {                                                                       \
+            return BOOST_PP_STRINGIZE(                                          \
+                BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE));         \
+        }                                                                       \
+    };
+
+#define BOOST_FUSION_ADAPT_STRUCT_BASE(                                         \
+    TEMPLATE_PARAMS_SEQ,NAME_SEQ,TAG,ATTRIBUTES_SEQ,ATTRIBUTES_CALLBACK)        \
+                                                                                \
+namespace boost                                                                 \
+{                                                                               \
+    namespace fusion                                                            \
+    {                                                                           \
+        namespace traits                                                        \
+        {                                                                       \
+            BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION(                    \
+                BOOST_PP_EMPTY(), TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG)           \
+            BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION(                    \
+                const, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG)                      \
+        }                                                                       \
+                                                                                \
+        namespace extension                                                     \
+        {                                                                       \
+            BOOST_PP_SEQ_FOR_EACH_I_R(                                          \
+                1,                                                              \
+                BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL,                 \
+                (ATTRIBUTES_CALLBACK,TEMPLATE_PARAMS_SEQ,NAME_SEQ),             \
+                ATTRIBUTES_SEQ)                                                 \
+                                                                                \
+            template<                                                           \
+                BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(               \
+                    TEMPLATE_PARAMS_SEQ)                                        \
+            >                                                                   \
+            struct struct_size<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)> \
+              : mpl::int_<BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)>                    \
+            {};                                                                 \
+        }                                                                       \
+    }                                                                           \
+                                                                                \
+    namespace mpl                                                               \
+    {                                                                           \
+        template<typename>                                                      \
+        struct sequence_tag;                                                    \
+                                                                                \
+        template<                                                               \
+            BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(                   \
+                TEMPLATE_PARAMS_SEQ)                                            \
+        >                                                                       \
+        struct sequence_tag<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)>    \
+        {                                                                       \
+            typedef fusion::fusion_sequence_tag type;                           \
+        };                                                                      \
+                                                                                \
+        template<                                                               \
+            BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(                   \
+                TEMPLATE_PARAMS_SEQ)                                            \
+        >                                                                       \
+        struct sequence_tag<                                                    \
+            BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const               \
+        >                                                                       \
+        {                                                                       \
+            typedef fusion::fusion_sequence_tag type;                           \
+        };                                                                      \
+    }                                                                           \
+}
+
+#endif
index 809902ae567305d454d2ada0e2ff1cb030662674..febb63358babbe2f30036a07c9f0f14335c2db78 100644 (file)
@@ -1,63 +1,38 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_AT_IMPL_24122005_1807)
-#define BOOST_FUSION_AT_IMPL_24122005_1807
 
-#include <boost/fusion/support/detail/access.hpp>
-#include <boost/mpl/assert.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_AT_IMPL_HPP
+
 #include <boost/mpl/int.hpp>
 
-namespace boost { namespace fusion
+namespace boost { namespace fusion { namespace extension
 {
-    struct struct_tag;
+    template<typename>
+    struct at_impl;
 
-    namespace extension
+    template <>
+    struct at_impl<struct_tag>
     {
-        template<typename T>
-        struct at_impl;
-
-        template <typename Struct, int N>
-        struct struct_member;
-
-        template <typename Struct>
-        struct struct_size;
-
-        template <>
-        struct at_impl<struct_tag>
-        {
-            template <typename Sequence, typename N>
-            struct apply
-            {
-                static int const n_value = N::value;
-                BOOST_MPL_ASSERT_RELATION(
-                    n_value, <=, extension::struct_size<Sequence>::value);
-
-                typedef typename
-                    extension::struct_member<Sequence, N::value>
-                element;
-
-                typedef typename
-                    mpl::eval_if<
-                        is_const<Sequence>
-                      , detail::cref_result<element>
-                      , detail::ref_result<element>
-                    >::type
-                type;
-
-                static type
-                call(Sequence& seq)
-                {
-                    return extension::
-                        struct_member<Sequence, N::value>::call(seq);
-                }
-            };
-        };
-    }
-}}
+        template <typename Seq, typename N>
+        struct apply
+          : extension::struct_member<
+                typename remove_const<Seq>::type
+              , N::value
+            >::template apply<Seq>
+        {};
+    };
+
+    template <>
+    struct at_impl<assoc_struct_tag>
+      : at_impl<struct_tag>
+    {};
+}}}
 
 #endif
index bf5a00bccadcf79cc6629edf57f93189ffab088e..80321ee125843fc7640e416ef33e22ca37f49c6f 100644 (file)
@@ -1,40 +1,67 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_BEGIN_IMPL_24122005_1752)
-#define BOOST_FUSION_BEGIN_IMPL_24122005_1752
 
-#include <boost/fusion/adapted/struct/struct_iterator.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_BEGIN_IMPL_HPP
 
-namespace boost { namespace fusion
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
 {
-    struct struct_tag;
+    template<typename>
+    struct begin_impl;
 
-    namespace extension
+    template <>
+    struct begin_impl<struct_tag>
     {
-        template<typename T>
-        struct begin_impl;
+        template <typename Seq>
+        struct apply
+        {
+            typedef
+                basic_iterator<
+                    struct_iterator_tag
+                  , random_access_traversal_tag
+                  , Seq
+                  , 0
+                >
+            type;
 
-        template <>
-        struct begin_impl<struct_tag>
+            static type
+            call(Seq& seq)
+            {
+                return type(seq,0);
+            }
+        };
+    };
+
+    template <>
+    struct begin_impl<assoc_struct_tag>
+    {
+        template <typename Seq>
+        struct apply
         {
-            template <typename Sequence>
-            struct apply
+            typedef
+                basic_iterator<
+                    struct_iterator_tag
+                  , assoc_struct_category
+                  , Seq
+                  , 0
+                >
+            type;
+
+            static type
+            call(Seq& seq)
             {
-                typedef struct_iterator<Sequence, 0> type;
-
-                static type
-                call(Sequence& v)
-                {
-                    return type(v);
-                }
-            };
+                return type(seq,0);
+            }
         };
-    }
-}}
+    };
+}}}
 
 #endif
index c23b97511c0f1f7aa041aa26221100226ef1a9ea..81350e6a8f4209e62fe8a42a561b1d06a4c632d2 100644 (file)
@@ -1,34 +1,41 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_CATEGORY_OF_IMPL_24122005_1731)
-#define BOOST_FUSION_CATEGORY_OF_IMPL_24122005_1731
 
-#include <boost/config/no_tr1/utility.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_CATEGORY_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_CATEGORY_OF_IMPL_HPP
 
 namespace boost { namespace fusion
 {
-    struct struct_tag;
-    struct random_access_traversal_tag;
-
     namespace extension
     {
-        template<typename T>
+        template<typename>
         struct category_of_impl;
 
         template<>
         struct category_of_impl<struct_tag>
         {
-            template<typename T>
+            template<typename Seq>
             struct apply
             {
                 typedef random_access_traversal_tag type;
             };
         };
+
+        template<>
+        struct category_of_impl<assoc_struct_tag>
+        {
+            template<typename Seq>
+            struct apply
+            {
+                typedef assoc_struct_category type;
+            };
+        };
     }
 }}
 
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/define_struct.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/define_struct.hpp
new file mode 100644 (file)
index 0000000..42bc6dc
--- /dev/null
@@ -0,0 +1,308 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_DEFINE_STRUCT_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_DEFINE_STRUCT_HPP
+
+#include <boost/config.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
+#include <boost/fusion/adapted/struct/detail/namespace.hpp>
+#include <boost/preprocessor/inc.hpp>
+#include <boost/preprocessor/if.hpp>
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/logical/not.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
+#include <boost/preprocessor/seq/for_each.hpp>
+#include <boost/preprocessor/seq/for_each_i.hpp>
+#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/preprocessor/tuple/eat.hpp>
+#include <boost/call_traits.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#define BOOST_FUSION_DEFINE_STRUCT_COPY_CTOR_FILLER_I(                          \
+    R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE)                                      \
+                                                                                \
+    BOOST_PP_COMMA_IF(I)                                                        \
+    BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)(                      \
+        other_self.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE))
+
+#define BOOST_FUSION_DEFINE_STRUCT_ASSIGN_FILLER_I(                             \
+    R, ATTRIBUTE_TUPEL_SIZE, I_, ATTRIBUTE)                                     \
+                                                                                \
+    BOOST_PP_IF(                                                                \
+        I_,                                                                     \
+        typedef typename                                                        \
+            boost::fusion::result_of::next<                                     \
+                BOOST_PP_CAT(I,BOOST_PP_DEC(I_))                                \
+            >::type                                                             \
+        BOOST_PP_CAT(I,I_);                                                     \
+        BOOST_PP_CAT(I,I_) BOOST_PP_CAT(i,I_)=                                  \
+            boost::fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(I_)));,             \
+        BOOST_PP_EMPTY()                                                        \
+        )                                                                       \
+                                                                                \
+    BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)=                      \
+        boost::fusion::deref(BOOST_PP_CAT(i,I_));
+
+#define BOOST_FUSION_DEFINE_STRUCT_ASSIGN_OP(                                   \
+    ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)                                       \
+                                                                                \
+    template<typename Seq>                                                      \
+    self_type&                                                                  \
+    operator=(Seq const& seq)                                                   \
+    {                                                                           \
+        typedef typename                                                        \
+            boost::fusion::result_of::begin<Seq const>::type                    \
+        I0;                                                                     \
+        I0 i0=boost::fusion::begin(seq);                                        \
+                                                                                \
+        BOOST_PP_SEQ_FOR_EACH_I_R(                                              \
+            1,                                                                  \
+            BOOST_FUSION_DEFINE_STRUCT_ASSIGN_FILLER_I,                         \
+            ATTRIBUTE_TUPEL_SIZE,                                               \
+            ATTRIBUTES_SEQ)                                                     \
+                                                                                \
+        return *this;                                                           \
+    }
+
+#define BOOST_FUSION_DEFINE_STRUCT_ATTR_I(R, ATTRIBUTE_TUPEL_SIZE, ATTRIBUTE)   \
+                                                                                \
+    BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,0,ATTRIBUTE)                       \
+        BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE);
+
+#define BOOST_FUSION_DEFINE_STRUCT_SEQ_CTOR_FILLER_I(                           \
+    R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE)                                      \
+                                                                                \
+    BOOST_PP_COMMA_IF(I)                                                        \
+    BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)(                      \
+        boost::fusion::deref(boost::fusion::advance_c<I>(boost::fusion::begin(  \
+            seq))))
+
+#define BOOST_FUSION_DEFINE_STRUCT_SEQ_CTOR_DISABLER(                           \
+    ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)                                       \
+                                                                                \
+    , typename boost::disable_if<                                               \
+        boost::is_convertible<                                                  \
+            Seq const&                                                          \
+          , BOOST_PP_TUPLE_ELEM(                                                \
+                ATTRIBUTE_TUPEL_SIZE,                                           \
+                0,                                                              \
+                BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ))                              \
+        >                                                                       \
+    >::type* =0
+
+#define BOOST_FUSION_DEFINE_STRUCT_SEQ_DEFAULT_CTOR_FILLER_I(                   \
+    R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE)                                      \
+                                                                                \
+    BOOST_PP_COMMA_IF(I)                                                        \
+    BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)()
+
+#define BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL(                                   \
+    NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)                                 \
+                                                                                \
+    BOOST_PP_SEQ_FOR_EACH_R(                                                    \
+        1,                                                                      \
+        BOOST_FUSION_DEFINE_STRUCT_ATTR_I,                                      \
+        ATTRIBUTE_TUPEL_SIZE,                                                   \
+        ATTRIBUTES_SEQ)                                                         \
+                                                                                \
+    NAME()                                                                      \
+      : BOOST_PP_SEQ_FOR_EACH_I_R(                                              \
+            1,                                                                  \
+            BOOST_FUSION_DEFINE_STRUCT_SEQ_DEFAULT_CTOR_FILLER_I,               \
+            ATTRIBUTE_TUPEL_SIZE,                                               \
+            ATTRIBUTES_SEQ)                                                     \
+    {}                                                                          \
+                                                                                \
+    NAME(self_type const& other_self)                                           \
+      : BOOST_PP_SEQ_FOR_EACH_I_R(                                              \
+            1,                                                                  \
+            BOOST_FUSION_DEFINE_STRUCT_COPY_CTOR_FILLER_I,                      \
+            ATTRIBUTE_TUPEL_SIZE,                                               \
+            ATTRIBUTES_SEQ)                                                     \
+    {}                                                                          \
+                                                                                \
+    template<typename Seq>                                                      \
+    NAME(Seq const& seq                                                         \
+        BOOST_PP_IF(                                                            \
+            BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)),                    \
+            BOOST_PP_TUPLE_EAT(2),                                              \
+            BOOST_FUSION_DEFINE_STRUCT_SEQ_CTOR_DISABLER)(                      \
+                ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)                           \
+        )                                                                       \
+      : BOOST_PP_SEQ_FOR_EACH_I_R(                                              \
+            1,                                                                  \
+            BOOST_FUSION_DEFINE_STRUCT_SEQ_CTOR_FILLER_I,                       \
+            ATTRIBUTE_TUPEL_SIZE,                                               \
+            ATTRIBUTES_SEQ)                                                     \
+    {}                                                                          \
+                                                                                \
+    BOOST_FUSION_DEFINE_STRUCT_ASSIGN_OP(ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)
+
+#define BOOST_FUSION_DEFINE_STRUCT_CTOR_1(                                      \
+        NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)                             \
+                                                                                \
+        explicit                                                                \
+        NAME(boost::call_traits<                                                \
+                BOOST_PP_TUPLE_ELEM(                                            \
+                    ATTRIBUTE_TUPEL_SIZE,0,BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ))   \
+            >::param_type arg)                                                  \
+          : BOOST_PP_TUPLE_ELEM(                                                \
+                ATTRIBUTE_TUPEL_SIZE,1,BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ))(arg)  \
+        {}
+
+#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_1(                                  \
+        TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)        \
+                                                                                \
+        explicit                                                                \
+        NAME(typename boost::call_traits<                                       \
+                typename boost::fusion::detail::get_first_arg<                  \
+                    BOOST_PP_TUPLE_ELEM(                                        \
+                        ATTRIBUTE_TUPEL_SIZE,                                   \
+                        0,                                                      \
+                        BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ))                      \
+                  , BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ)                      \
+                >::type                                                         \
+            >::param_type arg)                                                  \
+          : BOOST_PP_TUPLE_ELEM(                                                \
+                ATTRIBUTE_TUPEL_SIZE,1,BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ))(arg)  \
+        {}
+
+#define BOOST_FUSION_DEFINE_STRUCT_CTOR_FILLER_I(                               \
+    R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE)                                      \
+                                                                                \
+    BOOST_PP_COMMA_IF(I)                                                        \
+    BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)(BOOST_PP_CAT(_,I))
+
+#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_ARG_I(R, DATA, I, ATTRIBUTE)        \
+                                                                                \
+        BOOST_PP_COMMA_IF(I)                                                    \
+        typename boost::call_traits<                                            \
+            typename boost::fusion::detail::get_first_arg<                      \
+                BOOST_PP_TUPLE_ELEM(                                            \
+                    BOOST_PP_TUPLE_ELEM(3,0,DATA),                              \
+                    0,                                                          \
+                    ATTRIBUTE)                                                  \
+              , BOOST_PP_TUPLE_ELEM(3,2,DATA)                                   \
+            >::type                                                             \
+        >::param_type BOOST_PP_CAT(_,I)
+
+#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_N(                                  \
+        TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)        \
+                                                                                \
+        NAME(BOOST_PP_SEQ_FOR_EACH_I_R(                                         \
+                1,                                                              \
+                BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_ARG_I,                      \
+                (                                                               \
+                    ATTRIBUTE_TUPEL_SIZE,                                       \
+                    BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ),                          \
+                    BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ)                      \
+                ),                                                              \
+                ATTRIBUTES_SEQ))                                                \
+          : BOOST_PP_SEQ_FOR_EACH_I_R(                                          \
+                1,                                                              \
+                BOOST_FUSION_DEFINE_STRUCT_CTOR_FILLER_I,                       \
+                ATTRIBUTE_TUPEL_SIZE,                                           \
+                ATTRIBUTES_SEQ)                                                 \
+        {}
+
+#define BOOST_FUSION_DEFINE_STRUCT_CTOR_ARG_I(                                  \
+        R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE)                                  \
+                                                                                \
+        BOOST_PP_COMMA_IF(I)                                                    \
+        boost::call_traits<                                                     \
+            BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,0,ATTRIBUTE)               \
+        >::param_type BOOST_PP_CAT(_,I)
+
+#define BOOST_FUSION_DEFINE_STRUCT_CTOR_N(                                      \
+        NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)                             \
+                                                                                \
+        NAME(BOOST_PP_SEQ_FOR_EACH_I_R(                                         \
+                1,                                                              \
+                BOOST_FUSION_DEFINE_STRUCT_CTOR_ARG_I,                          \
+                ATTRIBUTE_TUPEL_SIZE,                                           \
+                ATTRIBUTES_SEQ))                                                \
+          : BOOST_PP_SEQ_FOR_EACH_I_R(                                          \
+                1,                                                              \
+                BOOST_FUSION_DEFINE_STRUCT_CTOR_FILLER_I,                       \
+                ATTRIBUTE_TUPEL_SIZE,                                           \
+                ATTRIBUTES_SEQ)                                                 \
+        {}
+
+#define BOOST_FUSION_DEFINE_STRUCT_CTOR(ATTRIBUTES_SEQ)                         \
+    BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)),                \
+        BOOST_FUSION_DEFINE_STRUCT_CTOR_N,                                      \
+        BOOST_FUSION_DEFINE_STRUCT_CTOR_1)
+
+#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR(ATTRIBUTES_SEQ)                     \
+    BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)),                \
+        BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_N,                                  \
+        BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_1)
+
+#define BOOST_FUSION_DEFINE_STRUCT_IMPL(                                        \
+    NAMESPACE_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)                  \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_BEGIN(NAMESPACE_SEQ)         \
+                                                                                \
+    struct NAME                                                                 \
+    {                                                                           \
+        typedef NAME self_type;                                                 \
+                                                                                \
+        BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL(                                   \
+            NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)                         \
+                                                                                \
+        BOOST_FUSION_DEFINE_STRUCT_CTOR(ATTRIBUTES_SEQ)(                        \
+            NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)                         \
+    };                                                                          \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ)
+
+#define BOOST_FUSION_DEFINE_TPL_STRUCT_IMPL(                                    \
+    TEMPLATE_PARAMS_SEQ,                                                        \
+    NAMESPACE_SEQ,                                                              \
+    NAME,                                                                       \
+    ATTRIBUTES_SEQ,                                                             \
+    ATTRIBUTE_TUPEL_SIZE)                                                       \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_BEGIN(NAMESPACE_SEQ)         \
+                                                                                \
+    template<                                                                   \
+        BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL(                  \
+            (0)TEMPLATE_PARAMS_SEQ)                                             \
+    >                                                                           \
+    struct NAME                                                                 \
+    {                                                                           \
+        typedef NAME self_type;                                                 \
+                                                                                \
+        BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL(                                   \
+            NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)                         \
+                                                                                \
+        BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR(ATTRIBUTES_SEQ)(                    \
+            TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)    \
+    };                                                                          \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ)
+
+namespace boost { namespace fusion { namespace detail
+{
+    template<typename A1, typename A2>
+    struct get_first_arg
+    {
+        typedef A1 type;
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/deref_data_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/deref_data_impl.hpp
new file mode 100644 (file)
index 0000000..d3b6ced
--- /dev/null
@@ -0,0 +1,22 @@
+/*=============================================================================
+    Copyright (c) 2009-2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_DATA_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct deref_data_impl;
+
+    template <>
+    struct deref_data_impl<struct_iterator_tag>
+      : deref_impl<struct_iterator_tag>
+    {};
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/deref_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/deref_impl.hpp
new file mode 100644 (file)
index 0000000..498617a
--- /dev/null
@@ -0,0 +1,41 @@
+/*=============================================================================
+    Copyright (c) 2009-2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct deref_impl;
+
+    template <>
+    struct deref_impl<struct_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+        {
+           typedef typename
+               extension::struct_member<
+                   typename remove_const<typename It::seq_type>::type
+                 , It::index::value
+               >::template apply<typename It::seq_type>
+           impl;
+
+           typedef typename impl::type type;
+
+           static
+           type
+           call(It const& it)
+           {
+               return impl::call(*it.seq);
+           }
+        };
+    };
+}}}
+
+#endif
index 514f7f583d9456f75b907c339f05d2d6834b1969..e4f92056bb91ef2329f6c24dc33468adc8a29cbd 100644 (file)
@@ -1,48 +1,67 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_END_IMPL_24122005_1755)
-#define BOOST_FUSION_END_IMPL_24122005_1755
 
-#include <boost/fusion/adapted/struct/struct_iterator.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_END_IMPL_HPP
 
-namespace boost { namespace fusion
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
 {
-    struct struct_tag;
+    template <typename>
+    struct end_impl;
 
-    namespace extension
+    template <>
+    struct end_impl<struct_tag>
     {
-        template <typename Tag>
-        struct end_impl;
+        template <typename Seq>
+        struct apply
+        {
+            typedef
+                basic_iterator<
+                    struct_iterator_tag
+                  , random_access_traversal_tag
+                  , Seq
+                  , struct_size<typename remove_const<Seq>::type>::value
+                >
+            type;
 
-        template <typename Struct>
-        struct struct_size;
+            static type
+            call(Seq& seq)
+            {
+                return type(seq,0);
+            }
+        };
+    };
 
-        template <>
-        struct end_impl<struct_tag>
+    template <>
+    struct end_impl<assoc_struct_tag>
+    {
+        template <typename Seq>
+        struct apply
         {
-            template <typename Sequence>
-            struct apply
+            typedef
+                basic_iterator<
+                    struct_iterator_tag
+                  , assoc_struct_category
+                  , Seq
+                  , struct_size<typename remove_const<Seq>::type>::value
+                >
+            type;
+
+            static type
+            call(Seq& seq)
             {
-                typedef
-                    struct_iterator<
-                        Sequence
-                      , struct_size<Sequence>::value
-                    >
-                type;
-
-                static type
-                call(Sequence& v)
-                {
-                    return type(v);
-                }
-            };
+                return type(seq,0);
+            }
         };
-    }
-}}
+    };
+}}}
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/extension.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/extension.hpp
new file mode 100644 (file)
index 0000000..4896859
--- /dev/null
@@ -0,0 +1,44 @@
+/*=============================================================================
+    Copyright (c) 2001-2007 Joel de Guzman
+    Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_EXTENSION_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_EXTENSION_HPP
+
+#include <boost/fusion/support/category_of.hpp>
+
+namespace boost { namespace fusion
+{
+    struct struct_tag;
+    struct struct_iterator_tag;
+    struct assoc_struct_tag;
+    struct fusion_sequence_tag;
+
+    struct assoc_struct_category
+      : bidirectional_traversal_tag, associative_tag
+    {};
+
+    namespace extension
+    {
+        struct no_such_member;
+
+        template<typename Seq, int N>
+        struct struct_member;
+
+        template<typename Seq, int N>
+        struct struct_member_name;
+
+        template<typename Seq, int N>
+        struct struct_assoc_key;
+
+        template<typename Seq>
+        struct struct_size;
+    }
+}}
+
+#endif
index f81e9fb63cb6b0ad3179381901a3d0346e8974fb..6f8adde5ca5c09d7b0188d7c50ec40df67cf2610 100644 (file)
@@ -1,31 +1,35 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_IS_SEQUENCE_IMPL_27122005_1651)
-#define BOOST_FUSION_IS_SEQUENCE_IMPL_27122005_1651
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_SEQUENCE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_SEQUENCE_IMPL_HPP
 
 #include <boost/mpl/bool.hpp>
 
-namespace boost { namespace fusion
+namespace boost { namespace fusion { namespace extension
 {
-    struct struct_tag;
+    template<typename>
+    struct is_sequence_impl;
 
-    namespace extension
+    template<>
+    struct is_sequence_impl<struct_tag>
     {
-        template<typename Tag>
-        struct is_sequence_impl;
+        template<typename Seq>
+        struct apply
+          : mpl::true_
+        {};
+    };
 
-        template<>
-        struct is_sequence_impl<struct_tag>
-        {
-            template<typename Sequence>
-            struct apply : mpl::true_ {};
-        };
-    }
-}}
+    template <>
+    struct is_sequence_impl<assoc_struct_tag>
+      : is_sequence_impl<struct_tag>
+    {};
+}}}
 
 #endif
index da6f380bd6417355204cf110c79724a834dccc92..0580018d1ff4c2e169c1fd1ad13359f90fe7c7a9 100644 (file)
@@ -1,32 +1,35 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_IS_VIEW_IMPL_27042006_2219)
-#define BOOST_FUSION_IS_VIEW_IMPL_27042006_2219
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_VIEW_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_VIEW_IMPL_HPP
 
 #include <boost/mpl/bool.hpp>
 
-namespace boost { namespace fusion
+namespace boost { namespace fusion { namespace extension
 {
-    struct struct_tag;
+    template<typename>
+    struct is_view_impl;
 
-    namespace extension
+    template<>
+    struct is_view_impl<struct_tag>
     {
-        template<typename Tag>
-        struct is_view_impl;
+        template<typename Seq>
+        struct apply
+          : mpl::false_
+        {};
+    };
 
-        template<>
-        struct is_view_impl<struct_tag>
-        {
-            template<typename T>
-            struct apply : mpl::false_
-            {};
-        };
-    }
-}}
+    template <>
+    struct is_view_impl<assoc_struct_tag>
+      : is_view_impl<struct_tag>
+    {};
+}}}
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/key_of_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/key_of_impl.hpp
new file mode 100644 (file)
index 0000000..d24a24b
--- /dev/null
@@ -0,0 +1,29 @@
+/*=============================================================================
+    Copyright (c) 2009-2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_KEY_OF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct key_of_impl;
+
+    template <>
+    struct key_of_impl<struct_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+          : extension::struct_assoc_key<
+                typename remove_const<typename It::seq_type>::type
+              , It::index::value
+            >
+        {};
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/namespace.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/namespace.hpp
new file mode 100644 (file)
index 0000000..0f3ec5e
--- /dev/null
@@ -0,0 +1,51 @@
+/*=============================================================================
+    Copyright (c) 2009-2010 Hartmut Kaiser
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_NAMESPACE_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_NAMESPACE_HPP
+
+#include <boost/preprocessor/dec.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
+#include <boost/preprocessor/seq/for_each.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/tuple/eat.hpp>
+
+#define BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_BEGIN_I(R,DATA,ELEM)                \
+    namespace ELEM {
+#define BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_END_I(Z,I,DATA) }
+#define BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION_I(Z,I,ELEM) ELEM::
+
+#define BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_BEGIN(NAMESPACE_SEQ)     \
+    BOOST_PP_IF(                                                                \
+        BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(NAMESPACE_SEQ)),                         \
+        BOOST_PP_SEQ_FOR_EACH_R,                                                \
+        BOOST_PP_TUPLE_EAT(4))(                                                 \
+            1,                                                                  \
+            BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_BEGIN_I,                        \
+            _,                                                                  \
+            BOOST_PP_SEQ_TAIL(NAMESPACE_SEQ))
+
+#define BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ)       \
+    BOOST_PP_REPEAT_1(                                                          \
+        BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(NAMESPACE_SEQ)),                         \
+        BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_END_I,                              \
+        _)
+
+#define BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION(NAMESPACE_SEQ)          \
+    BOOST_PP_IF(                                                                \
+        BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(NAMESPACE_SEQ)),                         \
+        BOOST_PP_SEQ_FOR_EACH_R,                                                \
+        BOOST_PP_TUPLE_EAT(4))(                                                 \
+            1,                                                                  \
+            BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION_I,                  \
+            _,                                                                  \
+            BOOST_PP_SEQ_TAIL(NAMESPACE_SEQ))
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/proxy_type.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/proxy_type.hpp
new file mode 100644 (file)
index 0000000..062f24a
--- /dev/null
@@ -0,0 +1,36 @@
+/*=============================================================================
+    Copyright (c) 2009-2010 Hartmut Kaiser
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_DETAIL_STRUCT_PROXY_TYPE_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_PROXY_TYPE_HPP
+
+#include <boost/fusion/adapted/struct/detail/namespace.hpp>
+
+#define BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL(                       \
+    WRAPPED_TYPE,NAMESPACE_SEQ,NAME)                                            \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_BEGIN(NAMESPACE_SEQ)         \
+                                                                                \
+    struct NAME                                                                 \
+    {                                                                           \
+        NAME(WRAPPED_TYPE& obj)                                                 \
+          : obj(obj)                                                            \
+        {}                                                                      \
+                                                                                \
+        WRAPPED_TYPE& obj;                                                      \
+    };                                                                          \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ)
+
+#define BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE(                            \
+    WRAPPED_TYPE, NAMESPACE_SEQ, NAME)                                          \
+                                                                                \
+    BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL(                           \
+        WRAPPED_TYPE, (0)NAMESPACE_SEQ, NAME)
+
+#endif
index 12ec14bab4f69199ee968fe01e36c35d831410f2..43a5705744ff4ea82c2a0b5f07f21d30d2045742 100644 (file)
@@ -1,37 +1,33 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_SIZE_IMPL_24122005_1759)
-#define BOOST_FUSION_SIZE_IMPL_24122005_1759
 
-#include <boost/mpl/int.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_SIZE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_SIZE_IMPL_HPP
 
-namespace boost { namespace fusion
+namespace boost { namespace fusion { namespace extension
 {
-    namespace extension
-    {
-        template <typename Struct>
-        struct struct_size;
-    }
-
-    struct struct_tag;
+    template<typename>
+    struct size_impl;
 
-    namespace extension
+    template <>
+    struct size_impl<struct_tag>
     {
-        template<typename T>
-        struct size_impl;
+        template <typename Seq>
+        struct apply
+          : struct_size<typename remove_const<Seq>::type>
+        {};
+    };
 
-        template <>
-        struct size_impl<struct_tag>
-        {
-            template <typename Sequence>
-            struct apply : extension::struct_size<Sequence> {};
-        };
-    }
-}}
+    template <>
+    struct size_impl<assoc_struct_tag>
+      : size_impl<struct_tag>
+    {};
+}}}
 
 #endif
index 8f5d97a0d5779e1757ebedd2ffe7da62968afe14..5ecf4ac730882645ff0fbe35b61761bd7d7c22d9 100644 (file)
@@ -1,47 +1,33 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2005-2006 Dan Marsden
+    Copyright (c) 2009-2010 Christopher Schmidt
 
     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)
 ==============================================================================*/
-#if !defined(BOOST_FUSION_VALUE_AT_IMPL_24122005_1917)
-#define BOOST_FUSION_VALUE_AT_IMPL_24122005_1917
 
-#include <boost/mpl/if.hpp>
-#include <boost/static_assert.hpp>
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_AT_IMPL_HPP
 
-namespace boost { namespace fusion
+namespace boost { namespace fusion { namespace extension
 {
-    struct struct_tag;
+    template<typename>
+    struct value_at_impl;
 
-    namespace extension
+    template <>
+    struct value_at_impl<struct_tag>
     {
-        template<typename T>
-        struct value_at_impl;
-
-        template <typename Struct, int N>
-        struct struct_member;
-
-        template <typename Struct>
-        struct struct_size;
-
-        template <>
-        struct value_at_impl<struct_tag>
-        {
-            template <typename Sequence, typename N>
-            struct apply
-            {
-                static int const n_value = N::value;
-                BOOST_MPL_ASSERT_RELATION(
-                    n_value, <=, extension::struct_size<Sequence>::value);
-
-                typedef typename
-                    extension::struct_member<Sequence, N::value>::type
-                type;
-            };
-        };
-    }
-}}
+        template <typename Seq, typename N>
+        struct apply
+          : struct_member<typename remove_const<Seq>::type, N::value>
+        {};
+    };
+
+    template <>
+    struct value_at_impl<assoc_struct_tag>
+      : value_at_impl<struct_tag>
+    {};
+}}}
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/value_of_data_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/value_of_data_impl.hpp
new file mode 100644 (file)
index 0000000..4528b85
--- /dev/null
@@ -0,0 +1,22 @@
+/*=============================================================================
+    Copyright (c) 2009-2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_OF_DATA_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct value_of_data_impl;
+
+    template <>
+    struct value_of_data_impl<struct_iterator_tag>
+      : value_of_impl<struct_iterator_tag>
+    {};
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/value_of_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/adapted/struct/detail/value_of_impl.hpp
new file mode 100644 (file)
index 0000000..55d37ed
--- /dev/null
@@ -0,0 +1,29 @@
+/*=============================================================================
+    Copyright (c) 2009-2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_VALUE_OF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct value_of_impl;
+
+    template <>
+    struct value_of_impl<struct_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+          : extension::struct_member<
+                typename remove_const<typename It::seq_type>::type
+              , It::index::value
+            >
+        {};
+    };
+}}}
+
+#endif
index 390b188cee8f77e57ca9c8a17a853eba583da6aa..62a677dec173f9e02b51537ce243505bf142c8dd 100644 (file)
@@ -34,18 +34,18 @@ namespace detail
     template <typename F>
     struct apply_fold_result
     {
-        template <typename Value, typename State>
+        template <typename State, typename Value>
         struct apply
-            : boost::result_of<F(Value,State)>
+            : boost::result_of<F(State, Value)>
         {};
     };
 
-    template <typename Iterator, typename State, typename F>
+    template <typename State, typename Iterator, typename F>
     struct fold_apply
     {
         typedef typename result_of::deref<Iterator>::type dereferenced;
         typedef typename add_reference<typename add_const<State>::type>::type lvalue_state;
-        typedef typename boost::result_of<F(dereferenced, lvalue_state)>::type type;
+        typedef typename boost::result_of<F(lvalue_state, dereferenced)>::type type;
     };
 
     template <typename First, typename Last, typename State, typename F>
@@ -56,9 +56,9 @@ namespace detail
     {
         typedef typename
         static_fold<
-            typename result_of::next<First>::type
+              typename result_of::next<First>::type
             , Last
-            , typename fold_apply<First, State, F>::type
+            , typename fold_apply<State, First, F>::type
             , F
             >::type
         type;
@@ -78,15 +78,15 @@ namespace detail
         typedef typename result::type type;
     };
 
-    template<typename I0, typename State, typename F, int N>
+    template<typename State, typename I0, typename F, int N>
     struct result_of_unrolled_fold;
 
     template<int N>
     struct unrolled_fold
     {
-        template<typename I0, typename State, typename F>
-        static typename result_of_unrolled_fold<I0, State, F, N>::type
-        call(I0 const& i0, State const& state, F f)
+        template<typename State, typename I0, typename F>
+        static typename result_of_unrolled_fold<State, I0, F, N>::type
+        call(State const& state, I0 const& i0, F f)
         {
             typedef typename result_of::next<I0>::type I1;
             I1 i1 = fusion::next(i0);
@@ -97,54 +97,54 @@ namespace detail
             typedef typename result_of::next<I3>::type I4;
             I4 i4 = fusion::next(i3);
 
-            return unrolled_fold<N-4>::call(i4, f(*i3, f(*i2, f(*i1, f(*i0, state)))), f);
+            return unrolled_fold<N-4>::call(f(f(f(f(state, *i0), *i1), *i2), *i3), i4, f);
         }
     };
 
     template<>
     struct unrolled_fold<3>
     {
-        template<typename I0, typename State, typename F>
-        static typename result_of_unrolled_fold<I0, State, F, 3>::type
-        call(I0 const& i0, State const& state, F f)
+        template<typename State, typename I0, typename F>
+        static typename result_of_unrolled_fold<State, I0, F, 3>::type
+        call(State const& state, I0 const& i0, F f)
         {
             typedef typename result_of::next<I0>::type I1;
             I1 i1 = fusion::next(i0);
             typedef typename result_of::next<I1>::type I2;
             I2 i2 = fusion::next(i1);
-            return f(*i2, f(*i1, f(*i0, state)));
+            return f(f(f(state, *i0), *i1), *i2);
         }
     };
 
     template<>
     struct unrolled_fold<2>
     {
-        template<typename I0, typename State, typename F>
-        static typename result_of_unrolled_fold<I0, State, F, 2>::type
-        call(I0 const& i0, State const& state, F f)
+        template<typename State, typename I0, typename F>
+        static typename result_of_unrolled_fold<State, I0, F, 2>::type
+        call(State const& state, I0 const& i0, F f)
         {
             typedef typename result_of::next<I0>::type I1;
             I1 i1 = fusion::next(i0);
-            return f(*i1, f(*i0, state));
+            return f(f(state, *i0), *i1);
         }
     };
 
     template<>
     struct unrolled_fold<1>
     {
-        template<typename I0, typename State, typename F>
-        static typename result_of_unrolled_fold<I0, State, F, 1>::type
-        call(I0 const& i0, State const& state, F f)
+        template<typename State, typename I0, typename F>
+        static typename result_of_unrolled_fold<State, I0, F, 1>::type
+        call(State const& state, I0 const& i0, F f)
         {
-            return f(*i0, state);
+            return f(state, *i0);
         }
     };
 
     template<>
     struct unrolled_fold<0>
     {
-        template<typename I0, typename State, typename F>
-        static State call(I0 const&, State const& state, F)
+        template<typename State, typename I0, typename F>
+        static State call(State const& state, I0 const&, F)
         {
             return state;
         }
@@ -171,53 +171,53 @@ namespace detail
         return detail::linear_fold(
             fusion::next(first)
           , last
-          , f(*first, state)
+          , f(state, *first)
           , f
           , result_of::equal_to<typename result_of::next<First>::type, Last>()
         );
     }
 
-    template<typename I0, typename State, typename F, int N>
+    template<typename State, typename I0, typename F, int N>
     struct result_of_unrolled_fold
     {
         typedef typename result_of::next<I0>::type I1;
         typedef typename result_of::next<I1>::type I2;
         typedef typename result_of::next<I2>::type I3;
         typedef typename result_of::next<I3>::type I4;
-        typedef typename fold_apply<I0, State, F>::type Rest1;
-        typedef typename fold_apply<I1, Rest1, F>::type Rest2;
-        typedef typename fold_apply<I2, Rest2, F>::type Rest3;
-        typedef typename fold_apply<I3, Rest3, F>::type Rest4;
+        typedef typename fold_apply<State, I0, F>::type Rest1;
+        typedef typename fold_apply<Rest1, I1, F>::type Rest2;
+        typedef typename fold_apply<Rest2, I2, F>::type Rest3;
+        typedef typename fold_apply<Rest3, I3, F>::type Rest4;
 
-        typedef typename result_of_unrolled_fold<I4, Rest4, F, N-4>::type type;
+        typedef typename result_of_unrolled_fold<Rest4, I4, F, N-4>::type type;
     };
 
-    template<typename I0, typename State, typename F>
-    struct result_of_unrolled_fold<I0, State, F, 3>
+    template<typename State, typename I0, typename F>
+    struct result_of_unrolled_fold<State, I0, F, 3>
     {
         typedef typename result_of::next<I0>::type I1;
         typedef typename result_of::next<I1>::type I2;
-        typedef typename fold_apply<I0, State, F>::type Rest;
-        typedef typename fold_apply<I1, Rest, F>::type Rest2;
-        typedef typename fold_apply<I2, Rest2, F>::type type;
+        typedef typename fold_apply<State, I0, F>::type Rest;
+        typedef typename fold_apply<Rest, I1, F>::type Rest2;
+        typedef typename fold_apply<Rest2, I2, F>::type type;
     };
 
-    template<typename I0, typename State, typename F>
-    struct result_of_unrolled_fold<I0, State, F, 2>
+    template<typename State, typename I0, typename F>
+    struct result_of_unrolled_fold<State, I0, F, 2>
     {
         typedef typename result_of::next<I0>::type I1;
-        typedef typename fold_apply<I0, State, F>::type Rest;
-        typedef typename fold_apply<I1, Rest, F>::type type;
+        typedef typename fold_apply<State, I0, F>::type Rest;
+        typedef typename fold_apply<Rest, I1, F>::type type;
     };
 
-    template<typename I0, typename State, typename F>
-    struct result_of_unrolled_fold<I0, State, F, 1>
+    template<typename State, typename I0, typename F>
+    struct result_of_unrolled_fold<State, I0, F, 1>
     {
-        typedef typename fold_apply<I0, State, F>::type type;
+        typedef typename fold_apply<State, I0, F>::type type;
     };
 
-    template<typename I0, typename State, typename F>
-    struct result_of_unrolled_fold<I0, State, F, 0>
+    template<typename State, typename I0, typename F>
+    struct result_of_unrolled_fold<State, I0, F, 0>
     {
         typedef State type;
     };
@@ -231,7 +231,7 @@ namespace detail
         typedef typename result_of::begin<Sequence>::type begin;
         typedef typename result_of::end<Sequence>::type end;
         typedef typename result_of_unrolled_fold<
-            begin, State, F, result_of::distance<begin, end>::type::value>::type type;
+            State, begin, F, result_of::distance<begin, end>::type::value>::type type;
     };
 
     template<typename Sequence, typename State, typename F>
@@ -269,8 +269,8 @@ namespace detail
         typedef typename result_of::begin<Sequence>::type begin;
         typedef typename result_of::end<Sequence>::type end;
         return unrolled_fold<result_of::distance<begin, end>::type::value>::call(
-            fusion::begin(seq)
-            , state
+              state
+            , fusion::begin(seq)
             , f);
     }
 }}}
index cf0cc6b7605c2377c7ab05f7edf5183489d8bbcd..5d2a74196f179a603bac37b8836303edbdabf847 100644 (file)
@@ -1,6 +1,7 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2007 Dan Marsden
+    Copyright (c) 2009 Christopher Schmidt
 
     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)
@@ -13,7 +14,6 @@
 #include <boost/mpl/lambda.hpp>
 #include <boost/mpl/apply.hpp>
 #include <boost/mpl/identity.hpp>
-#include <boost/fusion/iterator/value_of.hpp>
 #include <boost/fusion/iterator/equal_to.hpp>
 #include <boost/fusion/iterator/next.hpp>
 #include <boost/fusion/sequence/intrinsic/begin.hpp>
@@ -31,7 +31,7 @@ namespace detail
     struct apply_filter
     {
         typedef typename mpl::apply1<
-            Pred, typename result_of::value_of<Iterator>::type>::type type;
+            Pred, Iterator>::type type;
         BOOST_STATIC_CONSTANT(int, value = type::value);
     };
 
@@ -85,7 +85,7 @@ namespace detail
         typedef typename
             mpl::apply1<
                 Pred
-              , typename result_of::value_of<Shifted>::type
+              , Shifted
             >::type
         type;
         BOOST_STATIC_CONSTANT(int, value = type::value);
@@ -227,26 +227,6 @@ namespace detail
             return choose_call(iter, typename traits::category_of<Iterator>::type());
         }
     };
-
-    template <typename First, typename Last, typename Pred>
-    struct static_seq_find_if : static_find_if<First, Last, Pred>
-    {
-        typedef typename static_find_if<First, Last, Pred>::type type;
-
-        template <typename Sequence>
-        static type
-        call(Sequence const& seq)
-        {
-            return static_find_if<First, Last, Pred>::call(fusion::begin(seq));
-        }
-
-        template <typename Sequence>
-        static type
-        call(Sequence& seq)
-        {
-            return static_find_if<First, Last, Pred>::call(fusion::begin(seq));
-        }
-    };
 }}}
 
 #endif
index ece8cdd66a57d16fab0c90bb25065d9ff1af6549..6beb9005879397b36007f8a3e0bf17a565444dd4 100644 (file)
@@ -8,46 +8,43 @@
 #define FUSION_FIND_05052005_1107
 
 #include <boost/fusion/algorithm/query/detail/find_if.hpp>
-#include <boost/fusion/algorithm/query/detail/assoc_find.hpp>
 #include <boost/fusion/sequence/intrinsic/begin.hpp>
 #include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/key_of.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
 #include <boost/fusion/support/category_of.hpp>
+#include <boost/mpl/if.hpp>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/type_traits/is_const.hpp>
 #include <boost/utility/enable_if.hpp>
 
 namespace boost { namespace fusion
 {
-    struct associative_sequence_tag;
-
     namespace result_of
     {
         template <
             typename Sequence
           , typename T
-          , bool is_associative_sequence = traits::is_associative<Sequence>::value >
-        struct find;
-
-        template <typename Sequence, typename T>
-        struct find<Sequence, T, false>
+        >
+        struct find
         {
             typedef
-                detail::static_seq_find_if<
+                detail::static_find_if<
                     typename result_of::begin<Sequence>::type
                   , typename result_of::end<Sequence>::type
-                  , is_same<mpl::_, T>
+                  , is_same<
+                        typename mpl::if_<
+                            traits::is_associative<Sequence>
+                          , key_of<mpl::_1>
+                          , value_of<mpl::_1>
+                        >::type
+                      , T
+                    >
                 >
             filter;
 
             typedef typename filter::type type;
         };
-
-        template <typename Sequence, typename T>
-        struct find<Sequence, T, true>
-        {
-            typedef detail::assoc_find<Sequence, T> filter;
-            typedef typename filter::type type;
-        };
     }
 
     template <typename T, typename Sequence>
@@ -59,7 +56,7 @@ namespace boost { namespace fusion
     find(Sequence& seq)
     {
         typedef typename result_of::find<Sequence, T>::filter filter;
-        return filter::call(seq);
+        return filter::call(fusion::begin(seq));
     }
 
     template <typename T, typename Sequence>
@@ -67,7 +64,7 @@ namespace boost { namespace fusion
     find(Sequence const& seq)
     {
         typedef typename result_of::find<Sequence const, T>::filter filter;
-        return filter::call(seq);
+        return filter::call(fusion::begin(seq));
     }
 }}
 
index 4340d6883b1ccf806bcd4a8dd13b34be40c927d0..3950958c388c6d460a8ad9bf72e00553d9a44dc9 100644 (file)
 #include <boost/fusion/algorithm/query/detail/find_if.hpp>
 #include <boost/fusion/sequence/intrinsic/begin.hpp>
 #include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/mpl/bind.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/quote.hpp>
 #include <boost/utility/enable_if.hpp>
 #include <boost/type_traits/is_const.hpp>
 
@@ -20,13 +24,18 @@ namespace boost { namespace fusion
         template <typename Sequence, typename Pred>
         struct find_if
         {
-            typedef typename
+            typedef
                 detail::static_find_if<
                     typename result_of::begin<Sequence>::type
                   , typename result_of::end<Sequence>::type
-                  , Pred
-                >::type
-            type;
+                  , mpl::bind1<
+                        typename mpl::lambda<Pred>::type
+                      , mpl::bind1<mpl::quote1<value_of>,mpl::_1>
+                    >
+                >
+            filter;
+
+            typedef typename filter::type type;
         };
     }
 
@@ -38,14 +47,7 @@ namespace boost { namespace fusion
         >::type
     find_if(Sequence& seq)
     {
-        typedef
-            detail::static_find_if<
-                typename result_of::begin<Sequence>::type
-              , typename result_of::end<Sequence>::type
-              , Pred
-            >
-        filter;
-
+        typedef typename result_of::find_if<Sequence, Pred>::filter filter;
         return filter::call(fusion::begin(seq));
     }
 
@@ -53,14 +55,7 @@ namespace boost { namespace fusion
     inline typename result_of::find_if<Sequence const, Pred>::type const
     find_if(Sequence const& seq)
     {
-        typedef
-            detail::static_find_if<
-                typename result_of::begin<Sequence const>::type
-              , typename result_of::end<Sequence const>::type
-              , Pred
-            >
-        filter;
-
+        typedef typename result_of::find_if<Sequence const, Pred>::filter filter;
         return filter::call(fusion::begin(seq));
     }
 }}
index dcdc6f09ba5c7e58bcba2751af7105ec2ae84b0d..03128695ea080bd47423fd694e3624f5d256c669 100644 (file)
@@ -7,7 +7,7 @@
 #if !defined(FUSION_ERASE_KEY_10022005_1851)
 #define FUSION_ERASE_KEY_10022005_1851
 
-#include <boost/fusion/algorithm/query/detail/assoc_find.hpp>
+#include <boost/fusion/algorithm/query/find.hpp>
 #include <boost/fusion/algorithm/transformation/erase.hpp>
 #include <boost/mpl/not.hpp>
 #include <boost/type_traits/is_same.hpp>
@@ -18,18 +18,15 @@ namespace boost { namespace fusion
     {
         template <typename Sequence, typename Key>
         struct erase_key
-        {
-            typedef detail::assoc_find<Sequence, Key> filter;
-            typedef typename erase<Sequence, typename filter::type>::type type;
-        };
+          : erase<Sequence, typename find<Sequence, Key>::type>
+        {};
     }
 
     template <typename Key, typename Sequence>
     inline typename result_of::erase_key<Sequence const, Key>::type
     erase_key(Sequence const& seq)
     {
-        typedef typename result_of::erase_key<Sequence const, Key>::filter filter;
-        return erase(seq, filter::call(seq));
+        return erase(seq, find<Key>(seq));
     }
 }}
 
index 27d9ce7850cb84e95704860271fb1299c65aba93..01f017e9b89123075d42543b1c14182ca95f0f2c 100644 (file)
@@ -45,6 +45,7 @@ namespace boost { namespace fusion {
         sequence_base<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)> >
     {
         typedef deque_tag fusion_tag;
+        typedef bidirectional_traversal_tag category;
         typedef typename detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type base;
         typedef typename detail::deque_initial_size<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type size;
         typedef mpl::int_<size::value> next_up;
index 5fe25caf65d8e81c2bfc8123f5d7fffdd72fc14f..063932a80d96ea0d1729b71e68617be161267dbf 100644 (file)
@@ -1,56 +1,43 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2009 Christopher Schmidt
 
-    Distributed under the Boost Software License, Version 1.0. (See accompanying 
+    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)
 ==============================================================================*/
-#if !defined(FUSION_BEGIN_IMPL_05222005_1108)
-#define FUSION_BEGIN_IMPL_05222005_1108
 
-#include <boost/fusion/sequence/intrinsic/begin.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/identity.hpp>
+#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_BEGIN_IMPL_HPP
 
-namespace boost { namespace fusion
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
 {
-    struct map_tag;
+    template <typename>
+    struct begin_impl;
 
-    namespace extension
+    template <>
+    struct begin_impl<map_tag>
     {
-        template <typename Tag>
-        struct begin_impl;
-
-        template <>
-        struct begin_impl<map_tag>
+        template <typename Seq>
+        struct apply
         {
-            template <typename Sequence>
-            struct apply 
+            typedef
+                basic_iterator<
+                    map_iterator_tag
+                  , typename Seq::category
+                  , Seq
+                  , 0
+                >
+            type;
+
+            static type
+            call(Seq& seq)
             {
-                typedef typename 
-                    result_of::begin<typename Sequence::storage_type>::type
-                iterator_type;
-
-                typedef typename 
-                    result_of::begin<typename Sequence::storage_type const>::type
-                const_iterator_type;
-
-                typedef typename 
-                    mpl::eval_if<
-                        is_const<Sequence>
-                      , mpl::identity<const_iterator_type>
-                      , mpl::identity<iterator_type>
-                    >::type
-                type;
-    
-                static type
-                call(Sequence& m)
-                {
-                    return fusion::begin(m.get_data());
-                }
-            };
+                return type(seq,0);
+            }
         };
-    }
-}}
+    };
+}}}
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/container/map/detail/deref_data_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/container/map/detail/deref_data_impl.hpp
new file mode 100644 (file)
index 0000000..9943171
--- /dev/null
@@ -0,0 +1,48 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_DEREF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct deref_data_impl;
+
+    template <>
+    struct deref_data_impl<map_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+        {
+            typedef typename result_of::value_of<It>::type::second_type data;
+
+            typedef typename
+                mpl::eval_if<
+                    is_const<typename It::seq_type>
+                  , detail::cref_result<mpl::identity<data> >
+                  , detail::ref_result<mpl::identity<data> >
+                >::type
+            type;
+
+            static type
+            call(It const& it)
+            {
+                return deref(it).second;
+            }
+        };
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/container/map/detail/deref_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/container/map/detail/deref_impl.hpp
new file mode 100644 (file)
index 0000000..359a5dc
--- /dev/null
@@ -0,0 +1,45 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_DEREF_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct deref_impl;
+
+    template <>
+    struct deref_impl<map_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+        {
+            typedef typename
+                result_of::at<
+                    typename mpl::if_<
+                        is_const<typename It::seq_type>
+                      , typename It::seq_type::storage_type const
+                      , typename It::seq_type::storage_type
+                    >::type
+                  , typename It::index
+                >::type
+            type;
+
+            static type
+            call(It const& it)
+            {
+                return at<typename It::index>(it.seq->get_data());
+            }
+        };
+    };
+}}}
+
+#endif
index 0cafc92cdea1a3f66d203fd65c56d1e4cdad5fc0..0e30de8c0085f3b8ecc99dfc612a41d5031c4251 100644 (file)
@@ -1,53 +1,43 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2009 Christopher Schmidt
 
-    Distributed under the Boost Software License, Version 1.0. (See accompanying 
+    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)
 ==============================================================================*/
-#if !defined(FUSION_END_IMPL_05222005_1108)
-#define FUSION_END_IMPL_05222005_1108
 
-#include <boost/fusion/sequence/intrinsic/end.hpp>
+#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_END_IMPL_HPP
 
-namespace boost { namespace fusion
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
 {
-    struct map_tag;
+    template <typename>
+    struct end_impl;
 
-    namespace extension
+    template <>
+    struct end_impl<map_tag>
     {
-        template <typename Tag>
-        struct end_impl;
-
-        template <>
-        struct end_impl<map_tag>
+        template <typename Seq>
+        struct apply
         {
-            template <typename Sequence>
-            struct apply 
+            typedef
+                basic_iterator<
+                    map_iterator_tag
+                  , typename Seq::category
+                  , Seq
+                  , Seq::size::value
+                >
+            type;
+
+            static type
+            call(Seq& seq)
             {
-                typedef typename 
-                    result_of::end<typename Sequence::storage_type>::type
-                iterator_type;
-
-                typedef typename 
-                    result_of::end<typename Sequence::storage_type const>::type
-                const_iterator_type;
-
-                typedef typename 
-                    mpl::eval_if<
-                        is_const<Sequence>
-                      , mpl::identity<const_iterator_type>
-                      , mpl::identity<iterator_type>
-                    >::type
-                type;
-    
-                static type
-                call(Sequence& m)
-                {
-                    return fusion::end(m.get_data());
-                }
-            };
+                return type(seq,0);
+            }
         };
-    }
-}}
+    };
+}}}
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/container/map/detail/key_of_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/container/map/detail/key_of_impl.hpp
new file mode 100644 (file)
index 0000000..5a90c03
--- /dev/null
@@ -0,0 +1,32 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP
+
+#include <boost/fusion/container/map/detail/value_of_impl.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct key_of_impl;
+
+    template <>
+    struct key_of_impl<map_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+        {
+            typedef typename
+                value_of_impl<map_iterator_tag>::
+                    template apply<It>::type::first_type
+            type;
+        };
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/container/map/detail/value_of_data_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/container/map/detail/value_of_data_impl.hpp
new file mode 100644 (file)
index 0000000..28d2167
--- /dev/null
@@ -0,0 +1,32 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_DATA_IMPL_HPP
+
+#include <boost/fusion/container/map/detail/value_of_impl.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct value_of_data_impl;
+
+    template <>
+    struct value_of_data_impl<map_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+        {
+            typedef typename
+                value_of_impl<map_iterator_tag>::
+                    template apply<It>::type::second_type
+            type;
+        };
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/container/map/detail/value_of_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/container/map/detail/value_of_impl.hpp
new file mode 100644 (file)
index 0000000..26b19f2
--- /dev/null
@@ -0,0 +1,39 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct value_of_impl;
+
+    template <>
+    struct value_of_impl<map_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+        {
+            typedef typename
+                result_of::value_at<
+                    typename mpl::if_<
+                        is_const<typename It::seq_type>
+                      , typename It::seq_type::storage_type const
+                      , typename It::seq_type::storage_type
+                    >::type
+                  , typename It::index
+                >::type
+            type;
+        };
+    };
+}}}
+
+#endif
index 5f5fb1cc5f42ab37b9ece51ca75effc2712e0d5e..77fe29201849e552c25b9cb03a2f032cfb0b22e7 100644 (file)
 #include <boost/fusion/support/category_of.hpp>
 #include <boost/fusion/support/detail/access.hpp>
 #include <boost/fusion/container/map/map_fwd.hpp>
-#include <boost/fusion/container/map/detail/lookup_key.hpp>
 #include <boost/fusion/container/map/detail/begin_impl.hpp>
 #include <boost/fusion/container/map/detail/end_impl.hpp>
-#include <boost/fusion/container/map/detail/at_key_impl.hpp>
-#include <boost/fusion/container/map/detail/value_at_key_impl.hpp>
+#include <boost/fusion/container/map/detail/value_of_impl.hpp>
+#include <boost/fusion/container/map/detail/deref_data_impl.hpp>
+#include <boost/fusion/container/map/detail/deref_impl.hpp>
+#include <boost/fusion/container/map/detail/key_of_impl.hpp>
+#include <boost/fusion/container/map/detail/value_of_data_impl.hpp>
 #include <boost/fusion/container/vector/vector.hpp>
 #include <boost/mpl/identity.hpp>
 #include <boost/mpl/bool.hpp>
 namespace boost { namespace fusion
 {
     struct void_;
-    struct map_tag;
     struct fusion_sequence_tag;
 
     template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, typename T)>
     struct map : sequence_base<map<BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> >
     {
-        struct category : forward_traversal_tag, associative_sequence_tag {};
+        struct category : forward_traversal_tag, associative_tag {};
         
         typedef map_tag fusion_tag;
         typedef fusion_sequence_tag tag; // this gets picked up by MPL
@@ -49,7 +50,6 @@ namespace boost { namespace fusion
             : data(rhs) {}
 
         #include <boost/fusion/container/map/detail/map_forward_ctor.hpp>
-        #include <boost/fusion/container/map/detail/map_lookup.hpp>
 
         template <typename T>
         map&
index 660466bd9002077470485fe80bbc1ad47853333a..d8a9c1b71f3fab0934399de1099565fd8cf00005 100644 (file)
@@ -13,6 +13,8 @@
 namespace boost { namespace fusion
 {
     struct void_;
+    struct map_tag;
+    struct map_iterator_tag;
 
     template <
         BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
index 9b42df72bf2f8b4838f734af3da331342a4daefe..8047743d15c92855efcec0a074da9fc370a36554 100644 (file)
@@ -1,56 +1,43 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2009 Christopher Schmidt
 
-    Distributed under the Boost Software License, Version 1.0. (See accompanying 
+    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)
 ==============================================================================*/
-#if !defined(FUSION_BEGIN_IMPL_09162005_1120)
-#define FUSION_BEGIN_IMPL_09162005_1120
 
-#include <boost/fusion/sequence/intrinsic/begin.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/identity.hpp>
+#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_BEGIN_IMPL_HPP
 
-namespace boost { namespace fusion
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
 {
-    struct set_tag;
+    template <typename>
+    struct begin_impl;
 
-    namespace extension
+    template <>
+    struct begin_impl<set_tag>
     {
-        template <typename Tag>
-        struct begin_impl;
-
-        template <>
-        struct begin_impl<set_tag>
+        template <typename Seq>
+        struct apply
         {
-            template <typename Sequence>
-            struct apply 
+            typedef
+                basic_iterator<
+                    set_iterator_tag
+                  , typename Seq::category
+                  , Seq
+                  , 0
+                >
+            type;
+
+            static type
+            call(Seq& seq)
             {
-                typedef typename 
-                    result_of::begin<typename Sequence::storage_type>::type
-                iterator_type;
-
-                typedef typename 
-                    result_of::begin<typename Sequence::storage_type const>::type
-                const_iterator_type;
-
-                typedef typename 
-                    mpl::eval_if<
-                        is_const<Sequence>
-                      , mpl::identity<const_iterator_type>
-                      , mpl::identity<iterator_type>
-                    >::type
-                type;
-    
-                static type
-                call(Sequence& s)
-                {
-                    return fusion::begin(s.get_data());
-                }
-            };
+                return type(seq,0);
+            }
         };
-    }
-}}
+    };
+}}}
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/container/set/detail/deref_data_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/container/set/detail/deref_data_impl.hpp
new file mode 100644 (file)
index 0000000..7238cc6
--- /dev/null
@@ -0,0 +1,24 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_DEREF_DATA_IMPL_HPP
+
+#include <boost/fusion/container/set/detail/deref_impl.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct deref_data_impl;
+
+    template <>
+    struct deref_data_impl<set_iterator_tag>
+      : deref_impl<set_iterator_tag>
+    {};
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/container/set/detail/deref_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/container/set/detail/deref_impl.hpp
new file mode 100644 (file)
index 0000000..12824e6
--- /dev/null
@@ -0,0 +1,45 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_DEREF_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct deref_impl;
+
+    template <>
+    struct deref_impl<set_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+        {
+            typedef typename
+                result_of::at<
+                    typename mpl::if_<
+                        is_const<typename It::seq_type>
+                      , typename It::seq_type::storage_type const
+                      , typename It::seq_type::storage_type
+                    >::type
+                  , typename It::index
+                >::type
+            type;
+
+            static type
+            call(It const& it)
+            {
+                return at<typename It::index>(it.seq->get_data());
+            }
+        };
+    };
+}}}
+
+#endif
index 4df78a3fcc7368329523c069afec475612e4bf57..a981585b427d9791d59d7c6d50e89b1bd6530a1d 100644 (file)
@@ -1,53 +1,43 @@
 /*=============================================================================
     Copyright (c) 2001-2006 Joel de Guzman
+    Copyright (c) 2009 Christopher Schmidt
 
-    Distributed under the Boost Software License, Version 1.0. (See accompanying 
+    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)
 ==============================================================================*/
-#if !defined(FUSION_END_IMPL_09162005_1121)
-#define FUSION_END_IMPL_09162005_1121
 
-#include <boost/fusion/sequence/intrinsic/end.hpp>
+#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_END_IMPL_HPP
 
-namespace boost { namespace fusion
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
 {
-    struct set_tag;
+    template <typename>
+    struct end_impl;
 
-    namespace extension
+    template <>
+    struct end_impl<set_tag>
     {
-        template <typename Tag>
-        struct end_impl;
-
-        template <>
-        struct end_impl<set_tag>
+        template <typename Seq>
+        struct apply
         {
-            template <typename Sequence>
-            struct apply 
+            typedef
+                basic_iterator<
+                    set_iterator_tag
+                  , typename Seq::category
+                  , Seq
+                  , Seq::size::value
+                >
+            type;
+
+            static type
+            call(Seq& seq)
             {
-                typedef typename 
-                    result_of::end<typename Sequence::storage_type>::type
-                iterator_type;
-
-                typedef typename 
-                    result_of::end<typename Sequence::storage_type const>::type
-                const_iterator_type;
-
-                typedef typename 
-                    mpl::eval_if<
-                        is_const<Sequence>
-                      , mpl::identity<const_iterator_type>
-                      , mpl::identity<iterator_type>
-                    >::type
-                type;
-    
-                static type
-                call(Sequence& s)
-                {
-                    return fusion::end(s.get_data());
-                }
-            };
+                return type(seq,0);
+            }
         };
-    }
-}}
+    };
+}}}
 
 #endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/container/set/detail/key_of_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/container/set/detail/key_of_impl.hpp
new file mode 100644 (file)
index 0000000..9c56aaf
--- /dev/null
@@ -0,0 +1,24 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_KEY_OF_IMPL_HPP
+
+#include <boost/fusion/container/set/detail/value_of_data_impl.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct key_of_impl;
+
+    template <>
+    struct key_of_impl<set_iterator_tag>
+      : value_of_impl<set_iterator_tag>
+    {};
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/container/set/detail/value_of_data_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/container/set/detail/value_of_data_impl.hpp
new file mode 100644 (file)
index 0000000..c98e5b9
--- /dev/null
@@ -0,0 +1,24 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_DATA_IMPL_HPP
+
+#include <boost/fusion/container/set/detail/value_of_data_impl.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct value_of_data_impl;
+
+    template <>
+    struct value_of_data_impl<set_iterator_tag>
+      : value_of_impl<set_iterator_tag>
+    {};
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/container/set/detail/value_of_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/container/set/detail/value_of_impl.hpp
new file mode 100644 (file)
index 0000000..0221831
--- /dev/null
@@ -0,0 +1,34 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct value_of_impl;
+
+    template <>
+    struct value_of_impl<set_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+        {
+            typedef typename
+                result_of::value_at<
+                    typename It::seq_type::storage_type
+                  , typename It::index
+                >::type
+            type;
+        };
+    };
+}}}
+
+#endif
index 07580bb6a6acfe5e82c02b18f72658508dc192fe..62b9140298f5778be4118fab998b951120b39dbd 100644 (file)
 #include <boost/fusion/support/category_of.hpp>
 #include <boost/fusion/support/detail/access.hpp>
 #include <boost/fusion/container/set/set_fwd.hpp>
-#include <boost/fusion/container/set/detail/lookup_key.hpp>
 #include <boost/fusion/container/set/detail/begin_impl.hpp>
 #include <boost/fusion/container/set/detail/end_impl.hpp>
-#include <boost/fusion/container/set/detail/at_key_impl.hpp>
-#include <boost/fusion/container/set/detail/value_at_key_impl.hpp>
+#include <boost/fusion/container/set/detail/value_of_impl.hpp>
+#include <boost/fusion/container/set/detail/deref_data_impl.hpp>
+#include <boost/fusion/container/set/detail/deref_impl.hpp>
+#include <boost/fusion/container/set/detail/key_of_impl.hpp>
+#include <boost/fusion/container/set/detail/value_of_data_impl.hpp>
 #include <boost/fusion/container/vector/vector.hpp>
 #include <boost/mpl/identity.hpp>
 #include <boost/mpl/bool.hpp>
 namespace boost { namespace fusion
 {
     struct void_;
-    struct set_tag;
     struct fusion_sequence_tag;
 
     template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, typename T)>
     struct set : sequence_base<set<BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)> >
     {
-        struct category : forward_traversal_tag, associative_sequence_tag {};
+        struct category : forward_traversal_tag, associative_tag {};
 
         typedef set_tag fusion_tag;
         typedef fusion_sequence_tag tag; // this gets picked up by MPL
@@ -49,7 +50,6 @@ namespace boost { namespace fusion
             : data(rhs) {}
 
         #include <boost/fusion/container/set/detail/set_forward_ctor.hpp>
-        #include <boost/fusion/container/set/detail/set_lookup.hpp>
 
         template <typename T>
         set&
index 7facb5136ad0cbcc043f82fd68b9f83674891fc5..082422f1f62cb0a678e8a18dad81ba1210e1d9bb 100644 (file)
@@ -13,6 +13,8 @@
 namespace boost { namespace fusion
 {
     struct void_;
+    struct set_tag;
+    struct set_iterator_tag;
 
     template <
         BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
index 5b9a56084360a270b512c7976d187f252a765c36..e8284ca88ef234b15518dbc1d4b76512ec873a21 100644 (file)
@@ -56,7 +56,7 @@ namespace boost { namespace fusion
 
         template <typename Sequence>
         vector(Sequence const& rhs)
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1500)
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
             : vec(ctor_helper(rhs, is_base_of<vector, Sequence>())) {}
 #else
             : vec(rhs) {}
@@ -129,7 +129,7 @@ namespace boost { namespace fusion
 
     private:
 
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1500)
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
         static vector_n const&
         ctor_helper(vector const& rhs, mpl::true_)
         {
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/adapt_assoc_class.hpp b/deal.II/contrib/boost/include/boost/fusion/include/adapt_assoc_class.hpp
new file mode 100644 (file)
index 0000000..ccbfeb1
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_ADAPT_ASSOC_CLASS_HPP
+#define BOOST_FUSION_INCLUDE_ADAPT_ASSOC_CLASS_HPP
+
+#include <boost/fusion/adapted/class/adapt_assoc_class.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/adapt_assoc_class_named.hpp b/deal.II/contrib/boost/include/boost/fusion/include/adapt_assoc_class_named.hpp
new file mode 100644 (file)
index 0000000..1078268
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_ADAPT_ASSOC_CLASS_NAMED_HPP
+#define BOOST_FUSION_INCLUDE_ADAPT_ASSOC_CLASS_NAMED_HPP
+
+#include <boost/fusion/adapted/class/adapt_assoc_class_named.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/adapt_assoc_struct.hpp b/deal.II/contrib/boost/include/boost/fusion/include/adapt_assoc_struct.hpp
new file mode 100644 (file)
index 0000000..681aa2e
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_ADAPT_ASSOC_STRUCT_HPP
+#define BOOST_FUSION_INCLUDE_ADAPT_ASSOC_STRUCT_HPP
+
+#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/adapt_assoc_struct_named.hpp b/deal.II/contrib/boost/include/boost/fusion/include/adapt_assoc_struct_named.hpp
new file mode 100644 (file)
index 0000000..19204f5
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_ADAPT_ASSOC_STRUCT_NAMED_HPP
+#define BOOST_FUSION_INCLUDE_ADAPT_ASSOC_STRUCT_NAMED_HPP
+
+#include <boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/adapt_class.hpp b/deal.II/contrib/boost/include/boost/fusion/include/adapt_class.hpp
new file mode 100644 (file)
index 0000000..77f519b
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2001-2007 Joel de Guzman
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_ADAPT_CLASS_HPP
+#define BOOST_FUSION_INCLUDE_ADAPT_CLASS_HPP
+
+#include <boost/fusion/adapted/class/adapt_class.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/adapt_class_named.hpp b/deal.II/contrib/boost/include/boost/fusion/include/adapt_class_named.hpp
new file mode 100644 (file)
index 0000000..81136a1
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_ADAPT_CLASS_NAMED_HPP
+#define BOOST_FUSION_INCLUDE_ADAPT_CLASS_NAMED_HPP
+
+#include <boost/fusion/adapted/class/adapt_class_named.hpp>
+
+#endif
index facc897020352e8a2f5e032a04bcde7760116fd9..c1271543f83ee0a3bd6d30b8c3b5b125887d6c93 100644 (file)
@@ -4,8 +4,9 @@
     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)
 ==============================================================================*/
-#if !defined(FUSION_INCLUDE_ADAPT_STRUCT)
-#define FUSION_INCLUDE_ADAPT_STRUCT
+
+#ifndef BOOST_FUSION_INCLUDE_ADAPT_STRUCT_HPP
+#define BOOST_FUSION_INCLUDE_ADAPT_STRUCT_HPP
 
 #include <boost/fusion/adapted/struct/adapt_struct.hpp>
 
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/adapt_struct_named.hpp b/deal.II/contrib/boost/include/boost/fusion/include/adapt_struct_named.hpp
new file mode 100644 (file)
index 0000000..01cbf32
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_ADAPT_STRUCT_NAMED_HPP
+#define BOOST_FUSION_INCLUDE_ADAPT_STRUCT_NAMED_HPP
+
+#include <boost/fusion/adapted/struct/adapt_struct_named.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/adapted_class_named.cpp b/deal.II/contrib/boost/include/boost/fusion/include/adapted_class_named.cpp
new file mode 100644 (file)
index 0000000..0002ad6
--- /dev/null
@@ -0,0 +1,12 @@
+/*=============================================================================
+    Copyright (c) 2001-2009 Joel de Guzman
+
+    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)
+==============================================================================*/
+#if !defined(FUSION_INCLUDE_ADAPT_CLASS_NAMED)
+#define FUSION_INCLUDE_ADAPT_CLASS_NAMED
+
+#include <boost/fusion/adapted/class/adapt_class_named.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/boost_array.hpp b/deal.II/contrib/boost/include/boost/fusion/include/boost_array.hpp
new file mode 100644 (file)
index 0000000..d2c2bed
--- /dev/null
@@ -0,0 +1,12 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+#if !defined(FUSION_INCLUDE_BOOST_ARRAY)
+#define FUSION_INCLUDE_BOOST_ARRAY
+
+#include <boost/fusion/adapted/boost_array.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/define_assoc_struct.hpp b/deal.II/contrib/boost/include/boost/fusion/include/define_assoc_struct.hpp
new file mode 100644 (file)
index 0000000..8b8ee26
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_DEFINE_ASSOC_STRUCT_HPP
+#define BOOST_FUSION_INCLUDE_DEFINE_ASSOC_STRUCT_HPP
+
+#include <boost/fusion/adapted/struct/define_assoc_struct.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/define_struct.hpp b/deal.II/contrib/boost/include/boost/fusion/include/define_struct.hpp
new file mode 100644 (file)
index 0000000..564f1c7
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_DEFINE_STRUCT_HPP
+#define BOOST_FUSION_INCLUDE_DEFINE_STRUCT_HPP
+
+#include <boost/fusion/adapted/struct/define_struct.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/deref_data.hpp b/deal.II/contrib/boost/include/boost/fusion/include/deref_data.hpp
new file mode 100644 (file)
index 0000000..24d4e7c
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_DEREF_DATA_HPP
+#define BOOST_FUSION_INCLUDE_DEREF_DATA_HPP
+
+#include <boost/fusion/iterator/deref_data.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/key_of.hpp b/deal.II/contrib/boost/include/boost/fusion/include/key_of.hpp
new file mode 100644 (file)
index 0000000..cb29f57
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_KEY_OF_HPP
+#define BOOST_FUSION_INCLUDE_KEY_OF_HPP
+
+#include <boost/fusion/iterator/key_of.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/proxy_type.hpp b/deal.II/contrib/boost/include/boost/fusion/include/proxy_type.hpp
new file mode 100644 (file)
index 0000000..31e8dce
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2010 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_PROXY_TYPE_HPP
+#define BOOST_FUSION_INCLUDE_PROXY_TYPE_HPP
+
+#include <boost/fusion/adapted/struct/detail/proxy_type.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/include/value_of_data.hpp b/deal.II/contrib/boost/include/boost/fusion/include/value_of_data.hpp
new file mode 100644 (file)
index 0000000..6884185
--- /dev/null
@@ -0,0 +1,13 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_INCLUDE_VALUE_OF_DATA_HPP
+#define BOOST_FUSION_INCLUDE_VALUE_OF_DATA_HPP
+
+#include <boost/fusion/iterator/value_of_data.hpp>
+
+#endif
index 2cbafedec36d7a9f0241582f5cba1f83aaa600cf..56ed60be7cb74ae6169f350a8d7282d4d3c5f698 100644 (file)
@@ -21,7 +21,7 @@ namespace boost { namespace fusion
         
     // Special tags:
     struct iterator_facade_tag; // iterator facade tag
-    struct array_iterator_tag; // boost::array iterator tag
+    struct boost_array_iterator_tag; // boost::array iterator tag
     struct mpl_iterator_tag; // mpl sequence iterator tag
     struct std_pair_iterator_tag; // std::pair iterator tag
 
@@ -51,7 +51,7 @@ namespace boost { namespace fusion
         };
 
         template <>
-        struct advance_impl<array_iterator_tag>;
+        struct advance_impl<boost_array_iterator_tag>;
 
         template <>
         struct advance_impl<mpl_iterator_tag>;
diff --git a/deal.II/contrib/boost/include/boost/fusion/iterator/basic_iterator.hpp b/deal.II/contrib/boost/include/boost/fusion/iterator/basic_iterator.hpp
new file mode 100644 (file)
index 0000000..33c514f
--- /dev/null
@@ -0,0 +1,141 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ITERATOR_BASIC_ITERATOR_HPP
+#define BOOST_FUSION_ITERATOR_BASIC_ITERATOR_HPP
+
+#include <boost/fusion/iterator/iterator_facade.hpp>
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+namespace boost { namespace fusion
+{
+    namespace extension
+    {
+        template <typename>
+        struct value_of_impl;
+
+        template <typename>
+        struct deref_impl;
+
+        template <typename>
+        struct value_of_data_impl;
+
+        template <typename>
+        struct key_of_impl;
+
+        template <typename>
+        struct deref_data_impl;
+    }
+
+    template<typename Tag, typename Category, typename Seq, int Index>
+    struct basic_iterator
+      : iterator_facade<basic_iterator<Tag,Category,Seq,Index>, Category>
+    {
+        typedef mpl::int_<Index> index;
+        typedef Seq seq_type;
+
+        template <typename It>
+        struct value_of
+          : extension::value_of_impl<Tag>::template apply<It>
+        {};
+
+        template <typename It>
+        struct deref
+          : extension::deref_impl<Tag>::template apply<It>
+        {};
+
+        template <typename It>
+        struct value_of_data
+          : extension::value_of_data_impl<Tag>::template apply<It>
+        {};
+
+        template <typename It>
+        struct key_of
+          : extension::key_of_impl<Tag>::template apply<It>
+        {};
+
+        template <typename It>
+        struct deref_data
+          : extension::deref_data_impl<Tag>::template apply<It>
+        {};
+
+        template <typename It, typename N>
+        struct advance
+        {
+            typedef
+                basic_iterator<Tag, Category, Seq, Index + N::value>
+            type;
+
+            static type
+            call(It const& it)
+            {
+                return type(*it.seq,0);
+            }
+        };
+
+        template <typename It>
+        struct next
+          : advance<It, mpl::int_<1> >
+        {};
+
+        template <typename It>
+        struct prior
+          : advance<It, mpl::int_<-1> >
+        {};
+
+        template <typename It1, typename It2>
+        struct distance
+        {
+            typedef mpl::minus<typename It2::index, typename It1::index> type;
+
+            static
+            type
+            call(It1 const&, It2 const&)
+            {
+                return type();
+            }
+        };
+
+        template <typename It1, typename It2>
+        struct equal_to
+          : mpl::and_<
+                is_same<
+                    typename remove_const<typename It1::seq_type>::type
+                  , typename remove_const<typename It2::seq_type>::type
+                >
+              , mpl::equal_to<typename It1::index,typename It2::index>
+            >
+        {};
+
+        template<typename OtherSeq>
+        basic_iterator(basic_iterator<Tag,Category,OtherSeq,Index> const& it)
+          : seq(it.seq)
+        {}
+
+        basic_iterator(Seq& seq, int)
+          : seq(&seq)
+        {}
+
+        template<typename OtherSeq>
+        basic_iterator&
+        operator=(basic_iterator<Tag,Category,OtherSeq,Index> const& it)
+        {
+            seq=it.seq;
+            return *this;
+        }
+
+        Seq* seq;
+    };
+}}
+
+#endif
index 0e6f54d299aa7949c56ef45624101171e7acb5fd..2d5f04ee0c79dd6e02697ab544ef74445dc1311f 100644 (file)
@@ -14,7 +14,7 @@ namespace boost { namespace fusion
 {
     // Special tags:
     struct iterator_facade_tag; // iterator facade tag
-    struct array_iterator_tag; // boost::array iterator tag
+    struct boost_array_iterator_tag; // boost::array iterator tag
     struct mpl_iterator_tag; // mpl sequence iterator tag
     struct std_pair_iterator_tag; // std::pair iterator tag
 
@@ -35,7 +35,7 @@ namespace boost { namespace fusion
        };
 
         template <>
-        struct deref_impl<array_iterator_tag>;
+        struct deref_impl<boost_array_iterator_tag>;
 
         template <>
         struct deref_impl<mpl_iterator_tag>;
diff --git a/deal.II/contrib/boost/include/boost/fusion/iterator/deref_data.hpp b/deal.II/contrib/boost/include/boost/fusion/iterator/deref_data.hpp
new file mode 100644 (file)
index 0000000..09ba439
--- /dev/null
@@ -0,0 +1,49 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ITERATOR_DEREF_DATA_HPP
+#define BOOST_FUSION_ITERATOR_DEREF_DATA_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+    struct iterator_facade_tag;
+
+    namespace extension
+    {
+        template <typename>
+        struct deref_data_impl;
+
+        template <>
+        struct deref_data_impl<iterator_facade_tag>
+        {
+            template <typename It>
+            struct apply
+              : It::template deref_data<It>
+            {};
+       };
+    }
+
+    namespace result_of
+    {
+        template <typename It>
+        struct deref_data
+          : extension::deref_data_impl<typename traits::tag_of<It>::type>::
+                template apply<It>
+        {};
+    }
+
+    template <typename It>
+    typename result_of::deref_data<It>::type
+    deref_data(It const& it)
+    {
+        return result_of::deref_data<It>::call(it);
+    }
+}}
+
+#endif
index 44fc4292b182ac625d4dfbb9db94c30659d1da9f..0cfa414d20400d057e45ae05118efb1990226d0b 100644 (file)
@@ -22,7 +22,7 @@ namespace boost { namespace fusion
 
     // Special tags:
     struct iterator_facade_tag; // iterator facade tag
-    struct array_iterator_tag; // boost::array iterator tag
+    struct boost_array_iterator_tag; // boost::array iterator tag
     struct mpl_iterator_tag; // mpl sequence iterator tag
     struct std_pair_iterator_tag; // std::pair iterator tag
 
@@ -48,7 +48,7 @@ namespace boost { namespace fusion
         };
 
         template <>
-        struct distance_impl<array_iterator_tag>;
+        struct distance_impl<boost_array_iterator_tag>;
 
         template <>
         struct distance_impl<mpl_iterator_tag>;
@@ -61,8 +61,8 @@ namespace boost { namespace fusion
     {
         template <typename First, typename Last>
         struct distance
-        : extension::distance_impl<typename detail::tag_of<First>::type>:: 
-        template apply<First, Last>
+          : extension::distance_impl<typename detail::tag_of<First>::type>::
+                template apply<First, Last>
         {
             typedef typename extension::distance_impl<typename detail::tag_of<First>::type>:: 
             template apply<First, Last>::type distance_application;
index 2db276752044088d31e35d1e808153a82742d84b..a0387417323ac1857d68dc3a04642045746317cb 100644 (file)
@@ -18,7 +18,7 @@ namespace boost { namespace fusion
 {
     // Special tags:
     struct iterator_facade_tag; // iterator facade tag
-    struct array_iterator_tag; // boost::array iterator tag
+    struct boost_array_iterator_tag; // boost::array iterator tag
     struct mpl_iterator_tag; // mpl sequence iterator tag
     struct std_pair_iterator_tag; // std::pair iterator tag
 
@@ -42,7 +42,7 @@ namespace boost { namespace fusion
         };
 
         template <>
-        struct equal_to_impl<array_iterator_tag>;
+        struct equal_to_impl<boost_array_iterator_tag>;
 
         template <>
         struct equal_to_impl<mpl_iterator_tag>;
index 3e0a926f2b36d82857b79b9318ed52181fb91e6a..fa74f8dca5f3c921058bcfaf9d78557022218977 100644 (file)
@@ -50,8 +50,7 @@ namespace boost { namespace fusion
         template <typename First, typename Last>
         struct distance :
             distance_detail::linear_distance<First, Last>
-        {
-        };
+        {};
     };
 }}
 
diff --git a/deal.II/contrib/boost/include/boost/fusion/iterator/key_of.hpp b/deal.II/contrib/boost/include/boost/fusion/iterator/key_of.hpp
new file mode 100644 (file)
index 0000000..64c2f86
--- /dev/null
@@ -0,0 +1,42 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ITERATOR_KEY_OF_HPP
+#define BOOST_FUSION_ITERATOR_KEY_OF_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+    struct iterator_facade_tag;
+
+    namespace extension
+    {
+        template <typename>
+        struct key_of_impl;
+
+        template <>
+        struct key_of_impl<iterator_facade_tag>
+        {
+            template <typename It>
+            struct apply
+              : It::template key_of<It>
+            {};
+        };
+    }
+
+    namespace result_of
+    {
+        template <typename It>
+        struct key_of
+          : extension::key_of_impl<typename traits::tag_of<It>::type>::
+                template apply<It>
+        {};
+    }
+}}
+
+#endif
index 9070a9e2e32277c299100c7c9abc827c5633811e..d2cf63dddebde62eab3cf191a132f5d557fc2f9e 100644 (file)
@@ -13,7 +13,7 @@ namespace boost { namespace fusion
 {
     // Special tags:
     struct iterator_facade_tag; // iterator facade tag
-    struct array_iterator_tag; // boost::array iterator tag
+    struct boost_array_iterator_tag; // boost::array iterator tag
     struct mpl_iterator_tag; // mpl sequence iterator tag
     struct std_pair_iterator_tag; // std::pair iterator tag
 
@@ -34,7 +34,7 @@ namespace boost { namespace fusion
         };
 
         template <>
-        struct next_impl<array_iterator_tag>;
+        struct next_impl<boost_array_iterator_tag>;
 
         template <>
         struct next_impl<mpl_iterator_tag>;
index 9a26103967dbcab002ec2eb69a0154bd3b6c9885..a8b9fd64beb7190766f2ed8fd73615f89bb2e57f 100644 (file)
@@ -13,7 +13,7 @@ namespace boost { namespace fusion
 {
     // Special tags:
     struct iterator_facade_tag; // iterator facade tag
-    struct array_iterator_tag; // boost::array iterator tag
+    struct boost_array_iterator_tag; // boost::array iterator tag
     struct mpl_iterator_tag; // mpl sequence iterator tag
     struct std_pair_iterator_tag; // std::pair iterator tag
 
@@ -34,7 +34,7 @@ namespace boost { namespace fusion
         };
 
         template <>
-        struct prior_impl<array_iterator_tag>;
+        struct prior_impl<boost_array_iterator_tag>;
 
         template <>
         struct prior_impl<mpl_iterator_tag>;
index 808c659360daa543126abda4eeedf137a7121056..478e4d2b2a81c196c834a5f14286b28a27fc0826 100644 (file)
@@ -14,7 +14,7 @@ namespace boost { namespace fusion
 {
     // Special tags:
     struct iterator_facade_tag; // iterator facade tag
-    struct array_iterator_tag; // boost::array iterator tag
+    struct boost_array_iterator_tag; // boost::array iterator tag
     struct mpl_iterator_tag; // mpl sequence iterator tag
     struct std_pair_iterator_tag; // std::pair iterator tag
 
@@ -35,7 +35,7 @@ namespace boost { namespace fusion
         };
 
         template <>
-        struct value_of_impl<array_iterator_tag>;
+        struct value_of_impl<boost_array_iterator_tag>;
 
         template <>
         struct value_of_impl<mpl_iterator_tag>;
diff --git a/deal.II/contrib/boost/include/boost/fusion/iterator/value_of_data.hpp b/deal.II/contrib/boost/include/boost/fusion/iterator/value_of_data.hpp
new file mode 100644 (file)
index 0000000..4a8316d
--- /dev/null
@@ -0,0 +1,42 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ITERATOR_VALUE_OF_DATA_HPP
+#define BOOST_FUSION_ITERATOR_VALUE_OF_DATA_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+    struct iterator_facade_tag;
+
+    namespace extension
+    {
+        template <typename>
+        struct value_of_data_impl;
+
+        template <>
+        struct value_of_data_impl<iterator_facade_tag>
+        {
+            template <typename It>
+            struct apply
+              : It::template value_of_data<It>
+            {};
+        };
+    }
+
+    namespace result_of
+    {
+        template <typename It>
+        struct value_of_data
+          : extension::value_of_data_impl<typename traits::tag_of<It>::type>::
+                template apply<It>
+        {};
+    }
+}}
+
+#endif
index 6807d36715ae25d1d96a4b8afdf9e3adfe38e3e5..e7b6a034c41d40d4789b0a57f9bc2d92d13b7b08 100644 (file)
@@ -32,9 +32,8 @@ namespace boost { namespace fusion { namespace detail
         static bool
         call(I1 const& a, I2 const& b, mpl::false_)
         {
-            return *a > *b
-                || !(*b > *a)
-                && call(fusion::next(a), fusion::next(b));
+            return *a > *b ||
+                (!(*b > *a) && call(fusion::next(a), fusion::next(b)));
         }
 
         template <typename I1, typename I2>
index 0c457c41810c9990a5c9135e756007a29b1665ad..a8b0ce841fa21e3befb40275406628d009e048cc 100644 (file)
@@ -32,9 +32,8 @@ namespace boost { namespace fusion { namespace detail
         static bool
         call(I1 const& a, I2 const& b, mpl::false_)
         {
-            return *a < *b
-                || !(*b < *a)
-                && call(fusion::next(a), fusion::next(b));
+            return *a < *b ||
+                (!(*b < *a) && call(fusion::next(a), fusion::next(b)));
         }
 
         template <typename I1, typename I2>
index bcb67990e9d0a1e53afb05bc4c218a4c4101fa41..9ccbfc64a21e1f224779c6d534923c58b1292576 100644 (file)
@@ -17,7 +17,7 @@ namespace boost { namespace fusion
     // Special tags:
     struct sequence_facade_tag;
     struct boost_tuple_tag; // boost::tuples::tuple tag
-    struct array_tag; // boost::array tag
+    struct boost_array_tag; // boost::array tag
     struct mpl_sequence_tag; // mpl sequence tag
     struct std_pair_tag; // std::pair tag
 
@@ -41,7 +41,7 @@ namespace boost { namespace fusion
         struct at_impl<boost_tuple_tag>;
 
         template <>
-        struct at_impl<array_tag>;
+        struct at_impl<boost_array_tag>;
 
         template <>
         struct at_impl<mpl_sequence_tag>;
index 849ff2940e0832ff8c46f3d5dffb88381a9c97a7..30fefe0126708689ee3da4814d5e0fad30e3889f 100644 (file)
@@ -9,6 +9,8 @@
 #define BOOST_FUSION_AT_KEY_20060304_1755
 
 #include <boost/type_traits/is_const.hpp>
+#include <boost/fusion/algorithm/query/find.hpp>
+#include <boost/fusion/iterator/deref_data.hpp>
 #include <boost/fusion/support/tag_of.hpp>
 #include <boost/fusion/support/detail/access.hpp>
 
@@ -16,7 +18,7 @@ namespace boost { namespace fusion
 {
     // Special tags:
     struct sequence_facade_tag;
-    struct array_tag; // boost::array tag
+    struct boost_array_tag; // boost::array tag
     struct mpl_sequence_tag; // mpl sequence tag
     struct std_pair_tag; // std::pair tag
 
@@ -25,19 +27,32 @@ namespace boost { namespace fusion
         template <typename Tag>
         struct at_key_impl
         {
-            template <typename Sequence, typename Key>
-            struct apply;
+            template <typename Seq, typename Key>
+            struct apply
+            {
+                typedef typename
+                    result_of::deref_data<
+                        typename result_of::find<Seq, Key>::type
+                    >::type
+                type;
+
+                static type
+                call(Seq& seq)
+                {
+                    return fusion::deref_data(fusion::find<Key>(seq));
+                }
+            };
         };
 
         template <>
         struct at_key_impl<sequence_facade_tag>
         {
             template <typename Sequence, typename Key>
-            struct apply : Sequence::template at_key<Sequence, Key> {};
+            struct apply : Sequence::template at_key_impl<Sequence, Key> {};
         };
 
         template <>
-        struct at_key_impl<array_tag>;
+        struct at_key_impl<boost_array_tag>;
 
         template <>
         struct at_key_impl<mpl_sequence_tag>;
index 715ef9e1c7f60168537f9100e22185e2ad5d5b03..5dbe0c408db32903143f33bbdec28e8ab8d32039 100644 (file)
@@ -14,7 +14,7 @@ namespace boost { namespace fusion
     // Special tags:
     struct sequence_facade_tag; // iterator facade tag
     struct boost_tuple_tag; // boost::tuples::tuple tag
-    struct array_tag; // boost::array tag
+    struct boost_array_tag; // boost::array tag
     struct mpl_sequence_tag; // mpl sequence tag
     struct std_pair_tag; // std::pair tag
 
@@ -38,7 +38,7 @@ namespace boost { namespace fusion
         struct begin_impl<boost_tuple_tag>;
 
         template <>
-        struct begin_impl<array_tag>;
+        struct begin_impl<boost_array_tag>;
 
         template <>
         struct begin_impl<mpl_sequence_tag>;
index 04232f12aebe7fb118f627d13318fdc1a8c48881..98a554e3075b7ff697834879e244ffce2924957a 100644 (file)
@@ -14,7 +14,7 @@ namespace boost { namespace fusion
     // Special tags:
     struct sequence_facade_tag;
     struct boost_tuple_tag; // boost::tuples::tuple tag
-    struct array_tag; // boost::array tag
+    struct boost_array_tag; // boost::array tag
     struct mpl_sequence_tag; // mpl sequence tag
     struct std_pair_tag; // std::pair tag
 
@@ -38,7 +38,7 @@ namespace boost { namespace fusion
         struct end_impl<boost_tuple_tag>;
 
         template <>
-        struct end_impl<array_tag>;
+        struct end_impl<boost_array_tag>;
 
         template <>
         struct end_impl<mpl_sequence_tag>;
index d3c31cccd23e03d834975dc418c3fc54dde34ab5..8b61746af46148568211d2b914c64237c4eea0a1 100644 (file)
@@ -28,8 +28,8 @@ namespace boost { namespace fusion
             template<typename Sig>
             struct result;
 
-            template<typename This, typename Seq, typename State>
-            struct result<This(Seq, State)>
+            template<typename This, typename State, typename Seq>
+            struct result<This(State, Seq)>
               : mpl::plus<
                     segmented_size<typename remove_reference<Seq>::type>
                   , typename remove_reference<State>::type
index 4c6a3e079b855c1e6c564625b9245ed863534ea0..f254eb1eeb08e23139b29e04dca6b89a58e8d350 100644 (file)
@@ -7,9 +7,11 @@
 #if !defined(FUSION_HAS_KEY_09232005_1454)
 #define FUSION_HAS_KEY_09232005_1454
 
-#include <boost/mpl/not.hpp>
 #include <boost/fusion/support/tag_of.hpp>
-#include <boost/type_traits/is_same.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/algorithm/query/find.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/mpl/not.hpp>
 
 namespace boost { namespace fusion
 {
@@ -17,7 +19,7 @@ namespace boost { namespace fusion
 
     // Special tags:
     struct sequence_facade_tag;
-    struct array_tag; // boost::array tag
+    struct boost_array_tag; // boost::array tag
     struct mpl_sequence_tag; // mpl sequence tag
     struct std_pair_tag; // std::pair tag
 
@@ -26,10 +28,14 @@ namespace boost { namespace fusion
         template <typename Tag>
         struct has_key_impl
         {
-            template <typename Sequence, typename Key>
+            template <typename Seq, typename Key>
             struct apply
-                : mpl::not_<is_same<typename Sequence::
-                    template meta_at_impl<Key>::type, void_> >
+              : mpl::not_<
+                    typename result_of::equal_to<
+                        typename result_of::find<Seq, Key>::type
+                      , typename result_of::end<Seq>::type
+                    >::type
+                >::type
             {};
         };
 
@@ -41,7 +47,7 @@ namespace boost { namespace fusion
         };
 
         template <>
-        struct has_key_impl<array_tag>;
+        struct has_key_impl<boost_array_tag>;
 
         template <>
         struct has_key_impl<mpl_sequence_tag>;
index 74e3f53a61b8793756ba9f59810bff7cc17f5d49..2a3cb7f8230d8747677d10297131ca0debfe25e3 100644 (file)
@@ -15,7 +15,7 @@ namespace boost { namespace fusion
     // Special tags:
     struct sequence_facade_tag;
     struct boost_tuple_tag; // boost::tuples::tuple tag
-    struct array_tag; // boost::array tag
+    struct boost_array_tag; // boost::array tag
     struct mpl_sequence_tag; // mpl sequence tag
     struct std_pair_tag; // std::pair tag
 
@@ -39,7 +39,7 @@ namespace boost { namespace fusion
         struct size_impl<boost_tuple_tag>;
  
         template <>
-        struct size_impl<array_tag>;
+        struct size_impl<boost_array_tag>;
 
         template <>
         struct size_impl<mpl_sequence_tag>;
index d0868155d3bc1896eede1cd89e548ed1f856b0df..01cdc9d50adc8739e36b67de405b378f3f5101eb 100644 (file)
@@ -15,7 +15,7 @@ namespace boost { namespace fusion
     // Special tags:
     struct sequence_facade_tag;
     struct boost_tuple_tag; // boost::tuples::tuple tag
-    struct array_tag; // boost::array tag
+    struct boost_array_tag; // boost::array tag
     struct mpl_sequence_tag; // mpl sequence tag
     struct std_pair_tag; // std::pair tag
 
@@ -39,7 +39,7 @@ namespace boost { namespace fusion
         struct value_at_impl<boost_tuple_tag>;
 
         template <>
-        struct value_at_impl<array_tag>;
+        struct value_at_impl<boost_array_tag>;
 
         template <>
         struct value_at_impl<mpl_sequence_tag>;
index dbef3e89d0b35750956981fbdfb2d4d3fb054c5b..d7f84cd9329e8fadc9f81e05bbe98cd06cad07a4 100644 (file)
@@ -9,13 +9,15 @@
 #define FUSION_VALUE_AT_KEY_05052005_0229
 
 #include <boost/mpl/int.hpp>
+#include <boost/fusion/iterator/value_of_data.hpp>
+#include <boost/fusion/algorithm/query/find.hpp>
 #include <boost/fusion/support/tag_of.hpp>
 
 namespace boost { namespace fusion
 {
     // Special tags:
     struct sequence_facade_tag;
-    struct array_tag; // boost::array tag
+    struct boost_array_tag; // boost::array tag
     struct mpl_sequence_tag; // mpl sequence tag
     struct std_pair_tag; // std::pair tag
 
@@ -24,8 +26,12 @@ namespace boost { namespace fusion
         template <typename Tag>
         struct value_at_key_impl
         {
-            template <typename Sequence, typename Key>
-            struct apply;
+            template <typename Seq, typename Key>
+            struct apply
+              : result_of::value_of_data<
+                    typename result_of::find<Seq, Key>::type
+                >
+            {};
         };
 
         template <>
@@ -36,7 +42,7 @@ namespace boost { namespace fusion
         };
 
         template <>
-        struct value_at_key_impl<array_tag>;
+        struct value_at_key_impl<boost_array_tag>;
 
         template <>
         struct value_at_key_impl<mpl_sequence_tag>;
index 4d38fb6438d549f57d157231db3de533a78d41af..73def5b0e09c103533d748891f80adb0d89768ea 100644 (file)
@@ -15,7 +15,7 @@ namespace boost { namespace fusion
 {
     // Special tags:
     struct boost_tuple_tag; // boost::tuples::tuple tag
-    struct array_tag; // boost::array tag
+    struct boost_array_tag; // boost::array tag
     struct mpl_sequence_tag; // mpl sequence tag
     struct std_pair_tag; // std::pair tag
 
@@ -33,7 +33,7 @@ namespace boost { namespace fusion
     struct random_access_traversal_tag
         : bidirectional_traversal_tag {};
 
-    struct associative_sequence_tag {};
+    struct associative_tag {};
 
     namespace extension
     {
@@ -48,7 +48,7 @@ namespace boost { namespace fusion
         struct category_of_impl<boost_tuple_tag>;
 
         template <>
-        struct category_of_impl<array_tag>;
+        struct category_of_impl<boost_array_tag>;
 
         template <>
         struct category_of_impl<mpl_sequence_tag>;
@@ -68,7 +68,7 @@ namespace boost { namespace fusion
         template <typename T>
         struct is_associative
             : is_base_of<
-                associative_sequence_tag
+                associative_tag
               , typename category_of<T>::type>
         {};
 
index 38def075c891924efff793fae237aab8f5530b1b..63330a4ae8cae69620a4939b88387243181e108f 100644 (file)
@@ -14,7 +14,7 @@ namespace boost { namespace fusion
     // Special tags:
     struct sequence_facade_tag;
     struct boost_tuple_tag; // boost::tuples::tuple tag
-    struct array_tag; // boost::array tag
+    struct boost_array_tag; // boost::array tag
     struct mpl_sequence_tag; // mpl sequence tag
     struct std_pair_tag; // std::pair tag
     struct iterator_range_tag;
index 84dc2ec12f48383f3efd61bf8ebeff0c6280c9ab..d57cecb4101dc5ca7c69fa7769b1f5d6d7171fd4 100644 (file)
@@ -19,7 +19,7 @@ namespace boost { namespace fusion
     // Special tags:
     struct non_fusion_tag;
     struct boost_tuple_tag; // boost::tuples::tuple tag
-    struct array_tag; // boost::array tag
+    struct boost_array_tag; // boost::array tag
     struct mpl_sequence_tag; // mpl sequence tag
     struct std_pair_tag; // std::pair tag
 
@@ -43,7 +43,7 @@ namespace boost { namespace fusion
         struct is_sequence_impl<boost_tuple_tag>;
 
         template <>
-        struct is_sequence_impl<array_tag>;
+        struct is_sequence_impl<boost_array_tag>;
 
         template <>
         struct is_sequence_impl<mpl_sequence_tag>;
@@ -56,8 +56,9 @@ namespace boost { namespace fusion
     {
         template <typename T>
         struct is_sequence
-            : extension::is_sequence_impl<typename detail::tag_of<T>::type>::
-                template apply<T>
+          : extension::is_sequence_impl<
+                typename fusion::detail::tag_of<T>::type
+            >::template apply<T>
         {};
     }
 }}
index a89291d1a743756e22d7d4cf580f53a7c00f6b33..e2cf6eb4e7d2c82e4676fc05bf9be70c811caaa9 100644 (file)
@@ -15,7 +15,7 @@ namespace boost { namespace fusion
     // Special tags:
     struct sequence_facade_tag;
     struct boost_tuple_tag; // boost::tuples::tuple tag
-    struct array_tag; // boost::array tag
+    struct boost_array_tag; // boost::array tag
     struct mpl_sequence_tag; // mpl sequence tag
     struct std_pair_tag; // std::pair tag
 
@@ -41,7 +41,7 @@ namespace boost { namespace fusion
         struct is_view_impl<boost_tuple_tag>;
 
         template <>
-        struct is_view_impl<array_tag>;
+        struct is_view_impl<boost_array_tag>;
 
         template <>
         struct is_view_impl<mpl_sequence_tag>;
index e74ffbfcfbd5d2712727f42bef4d0081d38f2f5f..0ba5d8a1a75d34fdce94615c290707882df936e9 100644 (file)
@@ -42,8 +42,8 @@ namespace boost { namespace fusion
             template<typename Sig>
             struct result;
 
-            template<typename Next, typename StrictestSoFar>
-            struct result<strictest_traversal_impl(Next, StrictestSoFar)>
+            template<typename StrictestSoFar, typename Next>
+            struct result<strictest_traversal_impl(StrictestSoFar, Next)>
             {
                 typedef typename remove_reference<Next>::type next_value;
                 typedef typename remove_reference<StrictestSoFar>::type strictest_so_far;
index b28182a4cf59d902d50551f96d5e97e873310e72..79bc707e4d41fca85dc66afeffe3153383358ca7 100644 (file)
@@ -9,8 +9,10 @@
 #define FUSION_SEGMENTED_ITERATOR_EAN_05032006_1027
 
 #include <boost/mpl/if.hpp>
+#include <boost/mpl/int.hpp>
 #include <boost/mpl/not.hpp>
 #include <boost/mpl/assert.hpp>
+#include <boost/mpl/next_prior.hpp>
 #include <boost/mpl/placeholders.hpp>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/type_traits/is_reference.hpp>
@@ -20,6 +22,7 @@
 #include <boost/fusion/view/filter_view.hpp>
 #include <boost/fusion/container/list/cons.hpp> // for nil
 #include <boost/fusion/container/generation/make_cons.hpp>
+#include <boost/fusion/iterator/advance.hpp>
 #include <boost/fusion/iterator/distance.hpp>
 #include <boost/fusion/sequence/intrinsic/ext_/segments.hpp>
 #include <boost/fusion/support/ext_/is_segmented.hpp>
@@ -59,16 +62,15 @@ namespace boost { namespace fusion
         struct segmented_range_tag;
 
         ////////////////////////////////////////////////////////////////////////////
-        template<typename Sequence, typename Iterator, bool IsSegmented>
+        template<typename Sequence, typename Index, bool IsSegmented>
         struct segmented_range
-          : sequence_base<segmented_range<Sequence, Iterator, IsSegmented> >
+          : sequence_base<segmented_range<Sequence, Index, IsSegmented> >
         {
             BOOST_MPL_ASSERT_NOT((is_reference<Sequence>));
             typedef mpl::bool_<IsSegmented> is_segmented;
             typedef segmented_range_tag fusion_tag;
             typedef fusion_sequence_tag tag; // this gets picked up by MPL
             typedef mpl::true_ is_view;
-            typedef Iterator iterator_type;
 
             // If this is a range of segments, skip over the empty ones
             typedef typename mpl::if_<
@@ -83,20 +85,34 @@ namespace boost { namespace fusion
               , sequence_non_ref_type &
             >::type sequence_type;
 
+            typedef
+                typename fusion::result_of::advance<
+                    typename fusion::result_of::begin<sequence_non_ref_type>::type
+                  , Index
+                >::type
+            iterator_type;
+
             typedef typename traits::category_of<sequence_non_ref_type>::type category;
 
             explicit segmented_range(Sequence &sequence_)
               : sequence(sequence_type(sequence_))
-              , where_(fusion::begin(sequence))
             {}
 
-            segmented_range(sequence_type sequence_, iterator_type const &wh)
+            segmented_range(sequence_type sequence_, int)
               : sequence(sequence_)
-              , where_(wh)
             {}
 
+            iterator_type where_() const
+            {
+                return fusion::advance<Index>(
+                    fusion::begin(const_cast<sequence_non_ref_type &>(this->sequence))
+                );
+            }
+
             sequence_type sequence;
-            iterator_type where_;
+
+        private:
+            segmented_range &operator =(segmented_range const &);
         };
     }
 
@@ -148,7 +164,7 @@ namespace boost { namespace fusion
                 typedef typename Sequence::iterator_type type;
                 static type call(Sequence &seq)
                 {
-                    return seq.where_;
+                    return seq.where_();
                 }
             };
         };
@@ -176,15 +192,15 @@ namespace boost { namespace fusion
         template<typename Range>
         struct range_next;
 
-        template<typename Sequence, typename Iterator, bool IsSegmented>
-        struct range_next<segmented_range<Sequence, Iterator, IsSegmented> >
+        template<typename Sequence, typename Index, bool IsSegmented>
+        struct range_next<segmented_range<Sequence, Index, IsSegmented> >
         {
-            typedef typename result_of::next<Iterator>::type iterator_type;
-            typedef segmented_range<Sequence, iterator_type, IsSegmented> type;
+            typedef typename mpl::next<Index>::type index_type;
+            typedef segmented_range<Sequence, index_type, IsSegmented> type;
 
-            static type call(segmented_range<Sequence, Iterator, IsSegmented> const &rng)
+            static type call(segmented_range<Sequence, Index, IsSegmented> const &rng)
             {
-                return type(rng.sequence, fusion::next(rng.where_));
+                return type(rng.sequence, 0);
             }
         };
 
@@ -205,8 +221,7 @@ namespace boost { namespace fusion
         {
             typedef typename result_of::segments<Sequence>::type segments;
             typedef typename remove_reference<segments>::type sequence;
-            typedef typename result_of::begin<filter_view<sequence, not_is_empty_pred> >::type begin;
-            typedef segmented_range<sequence, begin, true> type;
+            typedef segmented_range<sequence, mpl::int_<0>, true> type;
 
             static type call(Sequence &seq)
             {
@@ -219,8 +234,7 @@ namespace boost { namespace fusion
         struct as_segmented_range<Sequence, false>
         {
             typedef typename remove_reference<Sequence>::type sequence;
-            typedef typename result_of::begin<sequence>::type begin;
-            typedef segmented_range<sequence, begin, false> type;
+            typedef segmented_range<sequence, mpl::int_<0>, false> type;
 
             static type call(Sequence &seq)
             {
@@ -228,10 +242,10 @@ namespace boost { namespace fusion
             }
         };
 
-        template<typename Sequence, typename Iterator, bool IsSegmented>
-        struct as_segmented_range<segmented_range<Sequence, Iterator, IsSegmented>, IsSegmented>
+        template<typename Sequence, typename Index, bool IsSegmented>
+        struct as_segmented_range<segmented_range<Sequence, Index, IsSegmented>, IsSegmented>
         {
-            typedef segmented_range<Sequence, Iterator, IsSegmented> type;
+            typedef segmented_range<Sequence, Index, IsSegmented> type;
             static type &call(type &seq)
             {
                 return seq;
index 2ffe7bd0fa1ab581eba304436660c91aab871b55..7d94261de142271207797b570732af139a4bbb44 100644 (file)
@@ -11,7 +11,7 @@ namespace boost { namespace fusion
 {
     struct filter_view_tag;
 
-    template <typename First, typename Last, typename Pred>
+    template <typename Category, typename First, typename Last, typename Pred>
     struct filter_iterator;
 
     namespace extension
@@ -28,7 +28,8 @@ namespace boost { namespace fusion
                 typedef typename Sequence::first_type first_type;
                 typedef typename Sequence::last_type last_type;
                 typedef typename Sequence::pred_type pred_type;
-                typedef filter_iterator<first_type, last_type, pred_type> type;
+                typedef typename Sequence::category category;
+                typedef filter_iterator<category, first_type, last_type, pred_type> type;
 
                 static type
                 call(Sequence& s)
diff --git a/deal.II/contrib/boost/include/boost/fusion/view/filter_view/detail/deref_data_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/view/filter_view/detail/deref_data_impl.hpp
new file mode 100644 (file)
index 0000000..bf721b5
--- /dev/null
@@ -0,0 +1,37 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/deref_data.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct deref_data_impl;
+
+    template <>
+    struct deref_data_impl<filter_view_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+        {
+            typedef typename
+                result_of::deref_data<typename It::first_type>::type
+            type;
+
+            static type
+            call(It const& it)
+            {
+                return fusion::deref_data(it.first);
+            }
+        };
+    };
+}}}
+
+#endif
index 677004d49ed043775cc4594397b6d7b287f31ff1..baabbd451c2207ebced586c2c2d1954f333e1ead 100644 (file)
@@ -11,7 +11,7 @@ namespace boost { namespace fusion
 {
     struct filter_view_tag;
 
-    template <typename First, typename Last, typename Pred>
+    template <typename Category,  typename First, typename Last, typename Pred>
     struct filter_iterator;
 
     namespace extension
@@ -27,7 +27,8 @@ namespace boost { namespace fusion
             {
                 typedef typename Sequence::last_type last_type;
                 typedef typename Sequence::pred_type pred_type;
-                typedef filter_iterator<last_type, last_type, pred_type> type;
+                typedef typename Sequence::category category;
+                typedef filter_iterator<category,last_type, last_type, pred_type> type;
 
                 static type
                 call(Sequence& s)
diff --git a/deal.II/contrib/boost/include/boost/fusion/view/filter_view/detail/key_of_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/view/filter_view/detail/key_of_impl.hpp
new file mode 100644 (file)
index 0000000..09d9112
--- /dev/null
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_KEY_OF_IMPL_HPP
+
+#include <boost/fusion/iterator/key_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct key_of_impl;
+
+    template <>
+    struct key_of_impl<filter_view_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+          : result_of::key_of<typename It::first_type>
+        {};
+    };
+}}}
+
+#endif
index 8423dfe1d27cc1a96616755066634c83eb756b01..a436bfc2609816502aae36179abc120611554f6b 100644 (file)
@@ -8,14 +8,19 @@
 #define FUSION_NEXT_IMPL_06052005_0900
 
 #include <boost/fusion/algorithm/query/detail/find_if.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
 #include <boost/mpl/eval_if.hpp>
 #include <boost/mpl/identity.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/quote.hpp>
+#include <boost/mpl/bind.hpp>
+#include <boost/mpl/placeholders.hpp>
 
 namespace boost { namespace fusion
 {
     struct filter_view_iterator_tag;
 
-    template <typename First, typename Last, typename Pred>
+    template <typename Category,  typename First, typename Last, typename Pred>
     struct filter_iterator;
 
     namespace extension
@@ -32,6 +37,7 @@ namespace boost { namespace fusion
                 typedef typename Iterator::first_type first_type;
                 typedef typename Iterator::last_type last_type;
                 typedef typename Iterator::pred_type pred_type;
+                typedef typename Iterator::category category;
 
                 typedef typename
                     mpl::eval_if<
@@ -41,12 +47,19 @@ namespace boost { namespace fusion
                     >::type
                 next_type;
 
-                typedef typename detail::static_find_if<
-                    next_type, last_type, pred_type>
+                typedef typename
+                    detail::static_find_if<
+                        next_type
+                      , last_type
+                      , mpl::bind1<
+                            typename mpl::lambda<pred_type>::type
+                          , mpl::bind1<mpl::quote1<result_of::value_of>,mpl::_1>
+                        >
+                    >
                 filter;
 
                 typedef filter_iterator<
-                    typename filter::type, last_type, pred_type>
+                    category, typename filter::type, last_type, pred_type>
                 type;
 
                 static type
diff --git a/deal.II/contrib/boost/include/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp
new file mode 100644 (file)
index 0000000..38d1bdc
--- /dev/null
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/value_of_data.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct value_of_data_impl;
+
+    template <>
+    struct value_of_data_impl<filter_view_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+          : result_of::value_of_data<typename It::first_type>
+        {};
+    };
+}}}
+
+#endif
index c3e63fdb73893ee1bea7ebb2c6ee4ca50e8d84e5..69f173297da61ea1692b3c2f826747d6f3efc227 100644 (file)
 #include <boost/fusion/sequence/intrinsic/begin.hpp>
 #include <boost/fusion/sequence/intrinsic/end.hpp>
 #include <boost/mpl/bool.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/inherit.hpp>
+#include <boost/mpl/identity.hpp>
+
 
 namespace boost { namespace fusion
 {
@@ -29,7 +33,13 @@ namespace boost { namespace fusion
     {
         typedef filter_view_tag fusion_tag;
         typedef fusion_sequence_tag tag; // this gets picked up by MPL
-        typedef forward_traversal_tag category;
+        typedef typename
+            mpl::eval_if<
+                traits::is_associative<Sequence>
+              , mpl::inherit2<forward_traversal_tag,associative_tag>
+              , mpl::identity<forward_traversal_tag>
+            >::type
+        category;
         typedef mpl::true_ is_view;
 
         typedef typename result_of::begin<Sequence>::type first_type;
index be93c6576cc121749df0aa86d590b199139d3aa6..5d1efc875e21aa36153ec7d89ba4ca1a8ca1f43d 100644 (file)
@@ -9,20 +9,29 @@
 
 #include <boost/fusion/iterator/mpl/convert_iterator.hpp>
 #include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
 #include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/algorithm/query/detail/find_if.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/quote.hpp>
+#include <boost/mpl/bind.hpp>
+#include <boost/mpl/placeholders.hpp>
+
 #include <boost/fusion/view/filter_view/detail/deref_impl.hpp>
 #include <boost/fusion/view/filter_view/detail/next_impl.hpp>
 #include <boost/fusion/view/filter_view/detail/value_of_impl.hpp>
 #include <boost/fusion/view/filter_view/detail/equal_to_impl.hpp>
-#include <boost/fusion/algorithm/query/detail/find_if.hpp>
+#include <boost/fusion/view/filter_view/detail/deref_data_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/value_of_data_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/key_of_impl.hpp>
 
 namespace boost { namespace fusion
 {
     struct filter_view_iterator_tag;
     struct forward_traversal_tag;
 
-    template <typename First, typename Last, typename Pred>
-    struct filter_iterator : iterator_base<filter_iterator<First, Last, Pred> >
+    template <typename Category, typename First, typename Last, typename Pred>
+    struct filter_iterator : iterator_base<filter_iterator<Category, First, Last, Pred> >
     {
         typedef convert_iterator<First> first_converter;
         typedef typename first_converter::type first_iter;
@@ -30,8 +39,17 @@ namespace boost { namespace fusion
         typedef typename last_converter::type last_iter;
 
         typedef filter_view_iterator_tag fusion_tag;
-        typedef forward_traversal_tag category;
-        typedef detail::static_find_if<first_iter, last_iter, Pred> filter;
+        typedef Category category;
+        typedef
+            detail::static_find_if<
+                first_iter
+              , last_iter
+              , mpl::bind1<
+                    typename mpl::lambda<Pred>::type
+                  , mpl::bind1<mpl::quote1<result_of::value_of>,mpl::_1>
+                >
+            >
+        filter;
         typedef typename filter::type first_type;
         typedef last_iter last_type;
         typedef Pred pred_type;
index 0036f0ae36bef79f1f5260122e69e568870f8dad..14bb24574e1b606f848ba56bebfd11fa696fa2e0 100644 (file)
@@ -17,7 +17,6 @@
 #include <boost/fusion/view/iterator_range/detail/at_impl.hpp>
 #include <boost/fusion/view/iterator_range/detail/value_at_impl.hpp>
 #include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
-#include <boost/mpl/bool.hpp>
 
 namespace boost { namespace fusion
 {
index e2b0281ee2351b1a423640f2b418e8c8733b4a00..140d3756d151524c586c41a7d9837c371d9d92e5 100644 (file)
@@ -14,7 +14,7 @@ namespace boost { namespace fusion
 {
     struct joint_view_tag;
 
-    template <typename First, typename Last, typename Concat>
+    template <typename Category, typename First, typename Last, typename Concat>
     struct joint_view_iterator;
 
     namespace extension
@@ -31,13 +31,14 @@ namespace boost { namespace fusion
                 typedef typename Sequence::first_type first_type;
                 typedef typename Sequence::last_type last_type;
                 typedef typename Sequence::concat_type concat_type;
+                typedef typename Sequence::category category;
                 typedef result_of::equal_to<first_type, last_type> equal_to;
 
                 typedef typename
                     mpl::if_<
                         equal_to
                       , concat_type
-                      , joint_view_iterator<first_type, last_type, concat_type>
+                      , joint_view_iterator<category, first_type, last_type, concat_type>
                     >::type
                 type;
 
diff --git a/deal.II/contrib/boost/include/boost/fusion/view/joint_view/detail/deref_data_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/view/joint_view/detail/deref_data_impl.hpp
new file mode 100644 (file)
index 0000000..a60a125
--- /dev/null
@@ -0,0 +1,37 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/deref_data.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct deref_data_impl;
+
+    template <>
+    struct deref_data_impl<joint_view_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+        {
+            typedef typename
+                result_of::deref_data<typename It::first_type>::type
+            type;
+
+            static type
+            call(It const& it)
+            {
+                return fusion::deref_data(it.first);
+            }
+        };
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/view/joint_view/detail/key_of_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/view/joint_view/detail/key_of_impl.hpp
new file mode 100644 (file)
index 0000000..e413c3d
--- /dev/null
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_KEY_OF_IMPL_HPP
+
+#include <boost/fusion/iterator/key_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct key_of_impl;
+
+    template <>
+    struct key_of_impl<joint_view_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+          : result_of::key_of<typename It::first_type>
+        {};
+    };
+}}}
+
+#endif
index 80d3580d7b338c6b27fad84c3df99d5b57697357..2313faa0d8e90f8fb2d163cc28f05a36c8fa38a0 100644 (file)
@@ -15,7 +15,7 @@ namespace boost { namespace fusion
 {
     struct joint_view_iterator_tag;
 
-    template <typename First, typename Last, typename Concat>
+    template <typename Category, typename First, typename Last, typename Concat>
     struct joint_view_iterator;
 
     namespace extension
@@ -32,6 +32,7 @@ namespace boost { namespace fusion
                 typedef typename Iterator::first_type first_type;
                 typedef typename Iterator::last_type last_type;
                 typedef typename Iterator::concat_type concat_type;
+                typedef typename Iterator::category category;
                 typedef typename result_of::next<first_type>::type next_type;
                 typedef result_of::equal_to<next_type, last_type> equal_to;
 
@@ -39,7 +40,7 @@ namespace boost { namespace fusion
                     mpl::if_<
                         equal_to
                       , concat_type
-                      , joint_view_iterator<next_type, last_type, concat_type>
+                      , joint_view_iterator<category, next_type, last_type, concat_type>
                     >::type
                 type;
 
diff --git a/deal.II/contrib/boost/include/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp
new file mode 100644 (file)
index 0000000..cc883d7
--- /dev/null
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/value_of_data.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct value_of_data_impl;
+
+    template <>
+    struct value_of_data_impl<joint_view_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+          : result_of::value_of_data<typename It::first_type>
+        {};
+    };
+}}}
+
+#endif
index 9cc798d3461ac43b0b06532bca4f7b52fcd8ddb6..48d912cdede60b31de40911c89e184a2958dd5e2 100644 (file)
@@ -19,6 +19,9 @@
 #include <boost/mpl/if.hpp>
 #include <boost/mpl/plus.hpp>
 #include <boost/mpl/bool.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/inherit.hpp>
+#include <boost/mpl/identity.hpp>
 
 namespace boost { namespace fusion
 {
@@ -31,7 +34,16 @@ namespace boost { namespace fusion
     {
         typedef joint_view_tag fusion_tag;
         typedef fusion_sequence_tag tag; // this gets picked up by MPL
-        typedef forward_traversal_tag category;
+        typedef typename
+            mpl::eval_if<
+                mpl::and_<
+                    traits::is_associative<Sequence1>
+                  , traits::is_associative<Sequence2>
+                >
+              , mpl::inherit2<forward_traversal_tag,associative_tag>
+              , mpl::identity<forward_traversal_tag>
+            >::type
+        category;
         typedef mpl::true_ is_view;
 
         typedef typename result_of::begin<Sequence1>::type first_type;
index 18696d7e9dfdc63a668d00183fdbf5dde003c0ba..0fd4c63622c85807da53b1b84223e61255bdaca3 100644 (file)
@@ -14,6 +14,9 @@
 #include <boost/fusion/view/joint_view/detail/deref_impl.hpp>
 #include <boost/fusion/view/joint_view/detail/next_impl.hpp>
 #include <boost/fusion/view/joint_view/detail/value_of_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/deref_data_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/value_of_data_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/key_of_impl.hpp>
 #include <boost/static_assert.hpp>
 
 namespace boost { namespace fusion
@@ -21,9 +24,9 @@ namespace boost { namespace fusion
     struct joint_view_iterator_tag;
     struct forward_traversal_tag;
 
-    template <typename First, typename Last, typename Concat>
+    template <typename Category, typename First, typename Last, typename Concat>
     struct joint_view_iterator
-        : iterator_base<joint_view_iterator<First, Last, Concat> >
+        : iterator_base<joint_view_iterator<Category, First, Last, Concat> >
     {
         typedef convert_iterator<First> first_converter;
         typedef convert_iterator<Last> last_converter;
@@ -34,7 +37,7 @@ namespace boost { namespace fusion
         typedef typename concat_converter::type concat_type;
 
         typedef joint_view_iterator_tag fusion_tag;
-        typedef forward_traversal_tag category;
+        typedef Category category;
         BOOST_STATIC_ASSERT((!result_of::equal_to<first_type, last_type>::value));
 
         joint_view_iterator(First const& first, Concat const& concat)
index fe8d35cf2b76978cc2501900f0bd5a6a48fd8887..02422e0b8646e90cb16e535d58f5efee8b216b12 100644 (file)
@@ -14,6 +14,8 @@
 #include <boost/utility/result_of.hpp>
 
 #include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/add_const.hpp>
 
 #include <boost/fusion/support/is_view.hpp>
 #include <boost/fusion/support/category_of.hpp>
@@ -34,7 +36,7 @@ namespace boost { namespace fusion
             struct result<addref(U)> : add_reference<U> {};
 
             template <typename T>
-            typename boost::result_of<addref(T)>::type 
+            typename add_reference<T>::type 
             operator()(T& x) const
             {
                 return x;
@@ -52,11 +54,18 @@ namespace boost { namespace fusion
             {};
 
             template <typename T>
-            typename boost::result_of<addconstref(T)>::type 
+            typename add_reference<typename add_const<T>::type>::type 
             operator()(T& x) const
             {
                 return x;
             }
+
+            template <typename T>
+            typename add_reference<typename add_const<T>::type>::type 
+            operator()(T const& x) const
+            {
+                return x;
+            }
         };
     }
 
diff --git a/deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/at_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/at_impl.hpp
new file mode 100644 (file)
index 0000000..2e84259
--- /dev/null
@@ -0,0 +1,41 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct at_impl;
+
+    template <>
+    struct at_impl<reverse_view_tag>
+    {
+        template <typename Seq, typename N>
+        struct apply
+        {
+            typedef mpl::minus<typename Seq::size, mpl::int_<1>, N> real_n;
+
+            typedef typename
+                result_of::at<typename Seq::seq_type, real_n>::type
+            type;
+
+            static type
+            call(Seq& seq)
+            {
+                return fusion::at<real_n>(seq.seq);
+            }
+        };
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp
new file mode 100644 (file)
index 0000000..2f52bdd
--- /dev/null
@@ -0,0 +1,37 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/deref_data.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct deref_data_impl;
+
+    template <>
+    struct deref_data_impl<reverse_view_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+        {
+            typedef typename
+                result_of::deref_data<typename It::first_type>::type
+            type;
+
+            static type
+            call(It const& it)
+            {
+                return fusion::deref_data(it.first);
+            }
+        };
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp
new file mode 100644 (file)
index 0000000..3d760fd
--- /dev/null
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_KEY_OF_IMPL_HPP
+
+#include <boost/fusion/iterator/key_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct key_of_impl;
+
+    template <>
+    struct key_of_impl<reverse_view_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+          : result_of::key_of<typename It::it_type>
+        {};
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp
new file mode 100644 (file)
index 0000000..90f5129
--- /dev/null
@@ -0,0 +1,33 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_AT_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct value_at_impl;
+
+    template <>
+    struct value_at_impl<reverse_view_tag>
+    {
+        template <typename Seq, typename N>
+        struct apply
+          : result_of::value_at<
+                typename Seq::seq_type
+              , mpl::minus<typename Seq::size, mpl::int_<1>, N>
+            >
+        {};
+    };
+}}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp b/deal.II/contrib/boost/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp
new file mode 100644 (file)
index 0000000..69d310f
--- /dev/null
@@ -0,0 +1,28 @@
+/*=============================================================================
+    Copyright (c) 2009 Christopher Schmidt
+
+    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)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/value_of_data.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+    template <typename>
+    struct value_of_data_impl;
+
+    template <>
+    struct value_of_data_impl<reverse_view_iterator_tag>
+    {
+        template <typename It>
+        struct apply
+          : result_of::value_of_data<typename It::first_type>
+        {};
+    };
+}}}
+
+#endif
index c939f7ce29f215ac8d70a584f29fc0b9b4c9e998..19b51d139d366aa4de2c9ae1cfcd1ef60330acd2 100644 (file)
@@ -13,6 +13,8 @@
 #include <boost/fusion/view/reverse_view/reverse_view_iterator.hpp>
 #include <boost/fusion/view/reverse_view/detail/begin_impl.hpp>
 #include <boost/fusion/view/reverse_view/detail/end_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/at_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/value_at_impl.hpp>
 #include <boost/fusion/support/sequence_base.hpp>
 #include <boost/fusion/sequence/intrinsic/begin.hpp>
 #include <boost/fusion/sequence/intrinsic/end.hpp>
@@ -20,6 +22,9 @@
 #include <boost/type_traits/is_base_of.hpp>
 #include <boost/static_assert.hpp>
 #include <boost/mpl/bool.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/inherit.hpp>
+#include <boost/mpl/identity.hpp>
 
 namespace boost { namespace fusion
 {
@@ -33,6 +38,7 @@ namespace boost { namespace fusion
         typedef fusion_sequence_tag tag; // this gets picked up by MPL
         typedef mpl::true_ is_view;
 
+        typedef Sequence seq_type;
         typedef typename traits::category_of<Sequence>::type category;
         typedef typename result_of::begin<Sequence>::type first_type;
         typedef typename result_of::end<Sequence>::type last_type;
index 0a890437de511e971a36e6f97be249cdc36a4b4c..af2267e3b116baca4f8dab7479807e9ff8390221 100644 (file)
@@ -17,6 +17,9 @@
 #include <boost/fusion/view/reverse_view/detail/advance_impl.hpp>
 #include <boost/fusion/view/reverse_view/detail/distance_impl.hpp>
 #include <boost/fusion/view/reverse_view/detail/value_of_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/deref_data_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/key_of_impl.hpp>
 #include <boost/type_traits/is_base_of.hpp>
 #include <boost/static_assert.hpp>
 
index 6ba8f435c0b2dabbfde375165eae5b22d95f9ea0..1a24680faa9974acc321a7d65824277683c4df74 100644 (file)
@@ -1,6 +1,7 @@
 //=======================================================================
 // Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
-// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+// Copyright 2010 Thomas Claveirole
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
 #include <list>
 #include <set>
 
-// TODO: Deprecating this requires some cooperation from Boost.Config. It's not
-// a good idea to just refuse the inclusion because it could break otherwise
-// functioning code.
-#if !defined BOOST_NO_HASH
-#  ifdef BOOST_HASH_SET_HEADER
-#    include BOOST_HASH_SET_HEADER
-#  else
-#    include <hash_set>
-#  endif
-#endif
+#include <boost/unordered_set.hpp>
 
 #if !defined BOOST_NO_SLIST
 #  ifdef BOOST_SLIST_HEADER
@@ -73,12 +65,10 @@ namespace boost {
   struct mapS  { };
   struct multisetS { };
   struct multimapS { };
-#if !defined BOOST_NO_HASH
   struct hash_setS { };
   struct hash_mapS { };
   struct hash_multisetS { };
   struct hash_multimapS { };
-#endif
 
   template <class Selector, class ValueType>
   struct container_gen { };
@@ -118,27 +108,25 @@ namespace boost {
     typedef std::multiset<ValueType> type;
   };
 
-#if !defined BOOST_NO_HASH
   template <class ValueType>
   struct container_gen<hash_setS, ValueType> {
-    typedef BOOST_STD_EXTENSION_NAMESPACE::hash_set<ValueType> type;
+    typedef boost::unordered_set<ValueType> type;
   };
 
   template <class ValueType>
   struct container_gen<hash_mapS, ValueType> {
-    typedef BOOST_STD_EXTENSION_NAMESPACE::hash_set<ValueType> type;
+    typedef boost::unordered_set<ValueType> type;
   };
 
   template <class ValueType>
   struct container_gen<hash_multisetS, ValueType> {
-    typedef BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<ValueType> type;
+    typedef boost::unordered_multiset<ValueType> type;
   };
 
   template <class ValueType>
   struct container_gen<hash_multimapS, ValueType> {
-    typedef BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<ValueType> type;
+    typedef boost::unordered_multiset<ValueType> type;
   };
-#endif
 
 #else // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
 
@@ -180,27 +168,25 @@ namespace boost {
     struct bind_ { typedef std::multiset<T, std::less<T> > type; };
   };
 
-#if !defined BOOST_NO_HASH
   struct hash_setS {
     template <class T>
-    struct bind_ { typedef BOOST_STD_EXTENSION_NAMESPACE::hash_set<T, std::less<T> > type; };
+    struct bind_ { typedef boost::unordered_set<T> type; };
   };
 
   struct hash_mapS {
     template <class T>
-    struct bind_ { typedef BOOST_STD_EXTENSION_NAMESPACE::hash_set<T, std::less<T> > type; };
+    struct bind_ { typedef boost::unordered_set<T> type; };
   };
 
   struct hash_multisetS {
     template <class T>
-    struct bind_ { typedef BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<T, std::less<T> > type; };
+    struct bind_ { typedef boost::unordered_multiset<T> type; };
   };
 
   struct hash_multimapS {
     template <class T>
-    struct bind_ { typedef BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<T, std::less<T> > type; };
+    struct bind_ { typedef boost::unordered_multiset<T> type; };
   };
-#endif
 
   template <class Selector> struct container_selector {
     typedef vecS type;
@@ -216,9 +202,7 @@ namespace boost {
   BOOST_CONTAINER_SELECTOR(mapS);
   BOOST_CONTAINER_SELECTOR(setS);
   BOOST_CONTAINER_SELECTOR(multisetS);
-#if !defined BOOST_NO_HASH
   BOOST_CONTAINER_SELECTOR(hash_mapS);
-#endif
 #if !defined BOOST_NO_SLIST
   BOOST_CONTAINER_SELECTOR(slistS);
 #endif
@@ -256,24 +240,30 @@ namespace boost {
   struct parallel_edge_traits<multisetS> {
     typedef allow_parallel_edge_tag type; };
 
-#if !defined BOOST_NO_HASH
   template <>
   struct parallel_edge_traits<hash_setS> {
     typedef disallow_parallel_edge_tag type;
   };
-#endif
 
   // mapS is obsolete, replaced with setS
   template <>
   struct parallel_edge_traits<mapS> {
     typedef disallow_parallel_edge_tag type; };
 
-#if !defined BOOST_NO_HASH
   template <>
   struct parallel_edge_traits<hash_mapS> {
     typedef disallow_parallel_edge_tag type;
   };
-#endif
+
+  template <>
+  struct parallel_edge_traits<hash_multisetS> {
+    typedef allow_parallel_edge_tag type;
+  };
+
+  template <>
+  struct parallel_edge_traits<hash_multimapS> {
+    typedef allow_parallel_edge_tag type;
+  };
 
   namespace detail {
     template <class Directed> struct is_random_access {
index 326d490d04177bb9464d8c0b28e55a0ddda29cb6..91b0b465d7268eeea9ff4111d0cb890d382b29b9 100644 (file)
@@ -94,7 +94,7 @@ void getSubset
 }
 
 inline void getSubset
-( no_property& p, const no_property& s )
+( no_property&, const no_property& )
 {
 }
 
index cf02a1d644ba7cd4514b99bf111b30868720d688..a3694dab7477189f6f38bb831c569380c46aad32 100644 (file)
@@ -925,18 +925,19 @@ namespace boost {
   // Functions required by the MutableGraph concept
 
   // O(1)
-  template <typename D, typename VP, typename EP, typename GP, typename A>
+  template <typename D, typename VP, typename EP, typename GP, typename A,
+            typename EP2>
   std::pair<typename adjacency_matrix<D,VP,EP,GP,A>::edge_descriptor, bool>
   add_edge(typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor u,
            typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor v,
-           const EP& ep,
+           const EP2& ep,
            adjacency_matrix<D,VP,EP,GP,A>& g)
   {
     typedef typename adjacency_matrix<D,VP,EP,GP,A>::edge_descriptor
       edge_descriptor;
     if (detail::get_edge_exists(g.get_edge(u,v), 0) == false) {
       ++(g.m_num_edges);
-      detail::set_property(g.get_edge(u,v), ep, 0);
+      detail::set_property(g.get_edge(u,v), EP(ep), 0);
       detail::set_edge_exists(g.get_edge(u,v), true, 0);
       return std::make_pair
         (edge_descriptor(true, u, v, &detail::get_property(g.get_edge(u,v))),
@@ -989,9 +990,10 @@ namespace boost {
     return *vertices(g).first;
   }
 
-  template <typename D, typename VP, typename EP, typename GP, typename A>
+  template <typename D, typename VP, typename EP, typename GP, typename A,
+            typename VP2>
   inline typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor
-  add_vertex(const VP& vp, adjacency_matrix<D,VP,EP,GP,A>& g) {
+  add_vertex(const VP2& /*vp*/, adjacency_matrix<D,VP,EP,GP,A>& g) {
     // UNDER CONSTRUCTION
     assert(false);
     return *vertices(g).first;
@@ -999,8 +1001,8 @@ namespace boost {
 
   template <typename D, typename VP, typename EP, typename GP, typename A>
   inline void
-  remove_vertex(typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor u,
-                adjacency_matrix<D,VP,EP,GP,A>& g)
+  remove_vertex(typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor /*u*/,
+                adjacency_matrix<D,VP,EP,GP,A>& /*g*/)
   {
     // UNDER CONSTRUCTION
     assert(false);
@@ -1298,7 +1300,7 @@ namespace boost {
   template <typename D, typename VP, typename EP, typename GP, typename A>
   typename adjacency_matrix<D,VP,EP,GP,A>::vertex_descriptor
   vertex(typename adjacency_matrix<D,VP,EP,GP,A>::vertices_size_type n,
-         const adjacency_matrix<D,VP,EP,GP,A>& g)
+         const adjacency_matrix<D,VP,EP,GP,A>&)
   {
     return n;
   }
index 25342e82e6d4d889fb327d5c5055594e81fde023..474743379309632f6868060bb6f8bed811c9ee78 100644 (file)
@@ -17,6 +17,7 @@
 #include <functional>
 #include <vector>
 #include <boost/limits.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/graph/named_function_params.hpp>
 #include <boost/graph/relax.hpp>
 #include <boost/graph/exception.hpp>
@@ -147,7 +148,7 @@ namespace boost {
       template <class Edge, class Graph>
       void examine_edge(Edge e, Graph& g) {
         if (m_compare(get(m_weight, e), m_zero))
-          throw negative_edge();
+          BOOST_THROW_EXCEPTION(negative_edge());
         m_vis.examine_edge(e, g);
       }
       template <class Edge, class Graph>
@@ -240,12 +241,12 @@ namespace boost {
      DistanceMap distance, WeightMap weight,
      ColorMap color, VertexIndexMap index_map,
      CompareFunction compare, CombineFunction combine,
-     CostInf inf, CostZero zero)
+     CostInf /*inf*/, CostZero zero)
   {
     typedef typename graph_traits<VertexListGraph>::vertex_descriptor
       Vertex;
-    typedef boost::vector_property_map<std::size_t> IndexInHeapMap;
-    IndexInHeapMap index_in_heap;
+    typedef boost::vector_property_map<std::size_t, VertexIndexMap> IndexInHeapMap;
+    IndexInHeapMap index_in_heap(index_map);
     typedef d_ary_heap_indirect<Vertex, 4, IndexInHeapMap, CostMap, CompareFunction>
       MutableQueue;
     MutableQueue Q(cost, index_in_heap, compare);
index ac220659d01ac9db8f07e1e61fd68419809730b4..0345963642f3bd16affc17d977724a221ae69bec 100644 (file)
@@ -83,9 +83,9 @@ namespace boost
           put(lowpt, source(e, g),
               min BOOST_PREVENT_MACRO_SUBSTITUTION(get(lowpt, source(e, g)),
                                                    get(dtm, target(e, g))));
+        }
         vis.back_edge(e, g);
       }
-      }
 
       template <typename Edge, typename Graph>
       void forward_or_cross_edge(const Edge& e, Graph& g)
diff --git a/deal.II/contrib/boost/include/boost/graph/bipartite.hpp b/deal.II/contrib/boost/include/boost/graph/bipartite.hpp
new file mode 100644 (file)
index 0000000..90cff6f
--- /dev/null
@@ -0,0 +1,386 @@
+/**
+ *
+ * Copyright (c) 2010 Matthias Walter (xammy@xammy.homelinux.net)
+ *
+ * Authors: Matthias Walter
+ *
+ * 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)
+ *
+ */
+
+#ifndef BOOST_GRAPH_BIPARTITE_HPP
+#define BOOST_GRAPH_BIPARTITE_HPP
+
+#include <utility>
+#include <vector>
+#include <exception>
+#include <boost/graph/properties.hpp>
+#include <boost/graph/adjacency_list.hpp>
+#include <boost/graph/depth_first_search.hpp>
+#include <boost/graph/one_bit_color_map.hpp>
+#include <boost/bind.hpp>
+
+namespace boost {
+
+  namespace detail {
+
+    /**
+     * The bipartite_visitor_error is thrown if an edge cannot be colored.
+     * The witnesses are the edges incident vertices.
+     */
+
+    template <typename Vertex>
+    struct bipartite_visitor_error: std::exception
+    {
+      std::pair <Vertex, Vertex> witnesses;
+
+      bipartite_visitor_error (Vertex a, Vertex b) :
+        witnesses (a, b)
+      {
+
+      }
+
+      const char* what () const throw ()
+      {
+        return "Graph is not bipartite.";
+      }
+    };
+
+    /**
+     * Functor which colors edges to be non-monochromatic.
+     */
+
+    template <typename PartitionMap>
+    struct bipartition_colorize
+    {
+      typedef on_tree_edge event_filter;
+
+      bipartition_colorize (PartitionMap partition_map) :
+        partition_map_ (partition_map)
+      {
+
+      }
+
+      template <typename Edge, typename Graph>
+      void operator() (Edge e, const Graph& g)
+      {
+        typedef typename graph_traits <Graph>::vertex_descriptor vertex_descriptor_t;
+        typedef color_traits <typename property_traits <PartitionMap>::value_type> color_traits;
+
+        vertex_descriptor_t source_vertex = source (e, g);
+        vertex_descriptor_t target_vertex = target (e, g);
+        if (get (partition_map_, source_vertex) == color_traits::white ())
+          put (partition_map_, target_vertex, color_traits::black ());
+        else
+          put (partition_map_, target_vertex, color_traits::white ());
+      }
+
+    private:
+      PartitionMap partition_map_;
+    };
+
+    /**
+     * Creates a bipartition_colorize functor which colors edges
+     * to be non-monochromatic.
+     *
+     * @param partition_map Color map for the bipartition
+     * @return The functor.
+     */
+
+    template <typename PartitionMap>
+    inline bipartition_colorize <PartitionMap> colorize_bipartition (PartitionMap partition_map)
+    {
+      return bipartition_colorize <PartitionMap> (partition_map);
+    }
+
+    /**
+     * Functor which tests an edge to be monochromatic.
+     */
+
+    template <typename PartitionMap>
+    struct bipartition_check
+    {
+      typedef on_back_edge event_filter;
+
+      bipartition_check (PartitionMap partition_map) :
+        partition_map_ (partition_map)
+      {
+
+      }
+
+      template <typename Edge, typename Graph>
+      void operator() (Edge e, const Graph& g)
+      {
+        typedef typename graph_traits <Graph>::vertex_descriptor vertex_descriptor_t;
+
+        vertex_descriptor_t source_vertex = source (e, g);
+        vertex_descriptor_t target_vertex = target (e, g);
+        if (get (partition_map_, source_vertex) == get (partition_map_, target_vertex))
+          throw bipartite_visitor_error <vertex_descriptor_t> (source_vertex, target_vertex);
+      }
+
+    private:
+      PartitionMap partition_map_;
+    };
+
+    /**
+     * Creates a bipartition_check functor which raises an error if a
+     * monochromatic edge is found.
+     *
+     * @param partition_map The map for a bipartition.
+     * @return The functor.
+     */
+
+    template <typename PartitionMap>
+    inline bipartition_check <PartitionMap> check_bipartition (PartitionMap partition_map)
+    {
+      return bipartition_check <PartitionMap> (partition_map);
+    }
+
+    /**
+     * Find the beginning of a common suffix of two sequences
+     * 
+     * @param sequence1 Pair of bidirectional iterators defining the first sequence.
+     * @param sequence2 Pair of bidirectional iterators defining the second sequence.
+     * @return Pair of iterators pointing to the beginning of the common suffix.
+     */
+
+    template <typename BiDirectionalIterator1, typename BiDirectionalIterator2>
+    inline std::pair <BiDirectionalIterator1, BiDirectionalIterator2> reverse_mismatch (std::pair <
+        BiDirectionalIterator1, BiDirectionalIterator1> sequence1, std::pair <BiDirectionalIterator2,
+        BiDirectionalIterator2> sequence2)
+    {
+      if (sequence1.first == sequence1.second || sequence2.first == sequence2.second)
+        return std::make_pair (sequence1.first, sequence2.first);
+
+      BiDirectionalIterator1 iter1 = sequence1.second;
+      BiDirectionalIterator2 iter2 = sequence2.second;
+
+      while (true)
+      {
+        --iter1;
+        --iter2;
+        if (*iter1 != *iter2)
+        {
+          ++iter1;
+          ++iter2;
+          break;
+        }
+        if (iter1 == sequence1.first)
+          break;
+        if (iter2 == sequence2.first)
+          break;
+      }
+
+      return std::make_pair (iter1, iter2);
+    }
+
+  }
+
+  /**
+   * Checks a given graph for bipartiteness and fills the given color map with
+   * white and black according to the bipartition. If the graph is not
+   * bipartite, the contents of the color map are undefined. Runs in linear
+   * time in the size of the graph, if access to the property maps is in
+   * constant time.
+   *
+   * @param graph The given graph.
+   * @param index_map An index map associating vertices with an index.
+   * @param partition_map A color map to fill with the bipartition.
+   * @return true if and only if the given graph is bipartite.
+   */
+
+  template <typename Graph, typename IndexMap, typename PartitionMap>
+  bool is_bipartite (const Graph& graph, const IndexMap index_map, PartitionMap partition_map)
+  {
+    /// General types and variables
+    typedef typename property_traits <PartitionMap>::value_type partition_color_t;
+    typedef typename graph_traits <Graph>::vertex_descriptor vertex_descriptor_t;
+    typedef typename graph_traits <Graph>::vertex_iterator vertex_iterator_t;
+
+    /// Declare dfs visitor
+    //    detail::empty_recorder recorder;
+    //    typedef detail::bipartite_visitor <PartitionMap, detail::empty_recorder> dfs_visitor_t;
+    //    dfs_visitor_t dfs_visitor (partition_map, recorder);
+
+
+    /// Call dfs
+    try
+    {
+      depth_first_search (graph, vertex_index_map (index_map).visitor (make_dfs_visitor (std::make_pair (
+          detail::colorize_bipartition (partition_map), std::make_pair (detail::check_bipartition (partition_map),
+              put_property (partition_map, color_traits <partition_color_t>::white (), on_start_vertex ()))))));
+
+      //      depth_first_search (graph, vertex_index_map (index_map).visitor (dfs_visitor));
+    }
+    catch (detail::bipartite_visitor_error <vertex_descriptor_t> error)
+    {
+      return false;
+    }
+
+    return true;
+  }
+
+  /**
+   * Checks a given graph for bipartiteness.
+   *
+   * @param graph The given graph.
+   * @param index_map An index map associating vertices with an index.
+   * @return true if and only if the given graph is bipartite.
+   */
+
+  template <typename Graph, typename IndexMap>
+  bool is_bipartite (const Graph& graph, const IndexMap index_map)
+  {
+    typedef one_bit_color_map <IndexMap> partition_map_t;
+    partition_map_t partition_map (num_vertices (graph), index_map);
+
+    return is_bipartite (graph, index_map, partition_map);
+  }
+
+  /**
+   * Checks a given graph for bipartiteness. The graph must
+   * have an internal vertex_index property. Runs in linear time in the
+   * size of the graph, if access to the property maps is in constant time.
+   *
+   * @param graph The given graph.
+   * @return true if and only if the given graph is bipartite.
+   */
+
+  template <typename Graph>
+  bool is_bipartite (const Graph& graph)
+  {
+    return is_bipartite (graph, get (vertex_index, graph));
+  }
+
+  /**
+   * Checks a given graph for bipartiteness and fills a given color map with
+   * white and black according to the bipartition. If the graph is not
+   * bipartite, a sequence of vertices, producing an odd-cycle, is written to
+   * the output iterator. The final iterator value is returned. Runs in linear
+   * time in the size of the graph, if access to the property maps is in
+   * constant time.
+   *
+   * @param graph The given graph.
+   * @param index_map An index map associating vertices with an index.
+   * @param partition_map A color map to fill with the bipartition.
+   * @param result An iterator to write the odd-cycle vertices to.
+   * @return The final iterator value after writing.
+   */
+
+  template <typename Graph, typename IndexMap, typename PartitionMap, typename OutputIterator>
+  OutputIterator find_odd_cycle (const Graph& graph, const IndexMap index_map, PartitionMap partition_map,
+      OutputIterator result)
+  {
+    /// General types and variables
+    typedef typename property_traits <PartitionMap>::value_type partition_color_t;
+    typedef typename graph_traits <Graph>::vertex_descriptor vertex_descriptor_t;
+    typedef typename graph_traits <Graph>::vertex_iterator vertex_iterator_t;
+    vertex_iterator_t vertex_iter, vertex_end;
+
+    /// Declare predecessor map
+    typedef std::vector <vertex_descriptor_t> predecessors_t;
+    typedef iterator_property_map <typename predecessors_t::iterator, IndexMap, vertex_descriptor_t,
+        vertex_descriptor_t&> predecessor_map_t;
+    typedef predecessor_recorder <predecessor_map_t, IndexMap> predecessor_recorder_t;
+
+    predecessors_t predecessors (num_vertices (graph), graph_traits <Graph>::null_vertex ());
+    predecessor_map_t predecessor_map (predecessors.begin (), index_map);
+    predecessor_recorder_t predecessor_recorder (predecessor_map);
+
+    /// Initialize predecessor map
+    for (tie (vertex_iter, vertex_end) = vertices (graph); vertex_iter != vertex_end; ++vertex_iter)
+    {
+      put (predecessor_map, *vertex_iter, *vertex_iter);
+    }
+
+    /// Call dfs
+    try
+    {
+      depth_first_search (graph, vertex_index_map (index_map).visitor (make_dfs_visitor (std::make_pair (
+          detail::colorize_bipartition (partition_map), std::make_pair (detail::check_bipartition (partition_map),
+              std::make_pair (put_property (partition_map, color_traits <partition_color_t>::white (),
+                  on_start_vertex ()), record_predecessors (predecessor_map, on_tree_edge ())))))));
+    }
+    catch (detail::bipartite_visitor_error <vertex_descriptor_t> error)
+    {
+      typedef std::vector <vertex_descriptor_t> path_t;
+
+      path_t path1, path2;
+      vertex_descriptor_t next, current;
+
+      /// First path
+      next = error.witnesses.first;
+      do
+      {
+        current = next;
+        path1.push_back (current);
+        next = predecessor_map[current];
+      }
+      while (current != next);
+
+      /// Second path
+      next = error.witnesses.second;
+      do
+      {
+        current = next;
+        path2.push_back (current);
+        next = predecessor_map[current];
+      }
+      while (current != next);
+
+      /// Find beginning of common suffix
+      std::pair <typename path_t::iterator, typename path_t::iterator> mismatch = detail::reverse_mismatch (
+          std::make_pair (path1.begin (), path1.end ()), std::make_pair (path2.begin (), path2.end ()));
+
+      /// Copy the odd-length cycle
+      result = std::copy (path1.begin (), mismatch.first + 1, result);
+      return std::reverse_copy (path2.begin (), mismatch.second, result);
+    }
+
+    return result;
+  }
+
+  /**
+   * Checks a given graph for bipartiteness. If the graph is not bipartite, a
+   * sequence of vertices, producing an odd-cycle, is written to the output
+   * iterator. The final iterator value is returned. Runs in linear time in the
+   * size of the graph, if access to the property maps is in constant time.
+   *
+   * @param graph The given graph.
+   * @param index_map An index map associating vertices with an index.
+   * @param result An iterator to write the odd-cycle vertices to.
+   * @return The final iterator value after writing.
+   */
+
+  template <typename Graph, typename IndexMap, typename OutputIterator>
+  OutputIterator find_odd_cycle (const Graph& graph, const IndexMap index_map, OutputIterator result)
+  {
+    typedef one_bit_color_map <IndexMap> partition_map_t;
+    partition_map_t partition_map (num_vertices (graph), index_map);
+
+    return find_odd_cycle (graph, index_map, partition_map, result);
+  }
+
+  /**
+   * Checks a given graph for bipartiteness. If the graph is not bipartite, a
+   * sequence of vertices, producing an odd-cycle, is written to the output
+   * iterator. The final iterator value is returned. The graph must have an
+   * internal vertex_index property. Runs in linear time in the size of the
+   * graph, if access to the property maps is in constant time.
+   *
+   * @param graph The given graph.
+   * @param result An iterator to write the odd-cycle vertices to.
+   * @return The final iterator value after writing.
+   */
+
+  template <typename Graph, typename OutputIterator>
+  OutputIterator find_odd_cycle (const Graph& graph, OutputIterator result)
+  {
+    return find_odd_cycle (graph, get (vertex_index, graph), result);
+  }
+}
+
+#endif /// BOOST_GRAPH_BIPARTITE_HPP
index bf7e3ff42907a6cdb21baeef74842f2f86e38438..f6d253b1a26684d685ed5953e65da541cabc7baf 100644 (file)
@@ -12,6 +12,7 @@
 #include <boost/config.hpp>
 
 #include <boost/graph/graph_concepts.hpp>
+#include <boost/graph/lookup_edge.hpp>
 
 #include <boost/concept/detail/concept_def.hpp>
 namespace boost {
@@ -125,9 +126,7 @@ namespace detail
                             typename graph_traits<Graph>::vertex_descriptor v,
                             typename graph_traits<Graph>::undirected_category)
     {
-        function_requires< AdjacencyMatrixConcept<Graph> >();
-
-        return edge(u, v, g).second;
+        return lookup_edge(u, v, g).second;
     }
 
     template <typename Graph>
@@ -137,13 +136,12 @@ namespace detail
                             typename graph_traits<Graph>::vertex_descriptor v,
                             typename graph_traits<Graph>::directed_category)
     {
-        function_requires< AdjacencyMatrixConcept<Graph> >();
         // Note that this could alternate between using an || to determine
         // full connectivity. I believe that this should produce strongly
         // connected components. Note that using && instead of || will
         // change the results to a fully connected subgraph (i.e., symmetric
         // edges between all vertices s.t., if a->b, then b->a.
-        return edge(u, v, g).second && edge(v, u, g).second;
+        return lookup_edge(u, v, g).second && lookup_edge(v, u, g).second;
     }
 
     template <typename Graph, typename Container>
@@ -189,7 +187,7 @@ namespace detail
             for(ni = nots.begin(); ni != nend; ++ni) {
                 for(ci = cands.begin(); ci != cend; ++ci) {
                     // if we don't find an edge, then we're okay.
-                    if(!edge(*ni, *ci, g).second) break;
+                    if(!lookup_edge(*ni, *ci, g).second) break;
                 }
                 // if we iterated all the way to the end, then *ni
                 // is connected to all *ci
index c84c48027fdabcd8cbc392f92f029e5111b08b06..e5f94d9fa0aae9fc1b56385bd0090debd57743d4 100644 (file)
@@ -10,6 +10,7 @@
 #include <boost/utility.hpp>
 #include <boost/graph/graph_traits.hpp>
 #include <boost/graph/graph_concepts.hpp>
+#include <boost/graph/lookup_edge.hpp>
 
 namespace boost
 {
@@ -42,8 +43,8 @@ namespace detail
 
     {
         function_requires< AdjacencyMatrixConcept<Graph> >();
-        return (edge(u, v, g).second ? 1 : 0) +
-                (edge(v, u, g).second ? 1 : 0);
+        return (lookup_edge(u, v, g).second ? 1 : 0) +
+                (lookup_edge(v, u, g).second ? 1 : 0);
     }
 
     // This template matches undirectedS
@@ -55,7 +56,7 @@ namespace detail
                 undirected_tag)
     {
         function_requires< AdjacencyMatrixConcept<Graph> >();
-        return edge(u, v, g).second ? 1 : 0;
+        return lookup_edge(u, v, g).second ? 1 : 0;
     }
 }
 
index b4f013526dad5d3b7a70b671592226bcd8f5e5de..5488f42fa3cea261771480eacaaab380a619995b 100644 (file)
 #  error You will need a compiler that conforms better to the C++ standard.
 #endif
 
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-#warning "Using deprecated BGL compressed sparse row graph interface --"
-#warning "please see the documentation for the new interface and then"
-#warning "#define BOOST_GRAPH_USE_NEW_CSR_INTERFACE before including"
-#warning "<boost/graph/compressed_sparse_row_graph.hpp>"
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-#define BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-#endif
-
 namespace boost {
 
 // A tag type indicating that the graph in question is a compressed
@@ -69,7 +58,6 @@ struct csr_graph_tag;
 // vertex.
 enum edges_are_sorted_t {edges_are_sorted};
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 // A type (edges_are_sorted_global_t) and a value (edges_are_sorted_global)
 // used to indicate that the edge list passed into the CSR graph is already
 // sorted by source vertex.
@@ -122,8 +110,6 @@ enum construct_inplace_from_sources_and_targets_global_t {construct_inplace_from
 // distributed CSR constructors.
 enum edges_are_unsorted_global_t {edges_are_unsorted_global};
 
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 /****************************************************************************
  * Local helper macros to reduce typing and clutter later on.               *
  ****************************************************************************/
@@ -146,7 +132,6 @@ enum edges_are_unsorted_global_t {edges_are_unsorted_global};
    compressed_sparse_row_graph<bidirectionalS, VertexProperty, EdgeProperty, \
                                GraphProperty, Vertex, EdgeIndex>
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 namespace detail {
   template <typename T>
   struct default_construct_iterator: public boost::iterator_facade<default_construct_iterator<T>, T, boost::random_access_traversal_tag, const T&> {
@@ -179,7 +164,6 @@ namespace detail {
     }
   };
 }
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 
 /** Compressed sparse row graph.
  *
@@ -201,11 +185,11 @@ template<typename VertexProperty,
          typename EdgeIndex>
 class compressed_sparse_row_graph<directedS, VertexProperty, EdgeProperty, GraphProperty, Vertex, EdgeIndex>
    : public detail::indexed_vertex_properties<BOOST_DIR_CSR_GRAPH_TYPE,
-                                              VertexProperty, Vertex>
+                                              VertexProperty, Vertex, identity_property_map>
 {
  public:
   typedef detail::indexed_vertex_properties<compressed_sparse_row_graph,
-                                            VertexProperty, Vertex>
+                                            VertexProperty, Vertex, identity_property_map>
     inherited_vertex_properties;
 
  public:
@@ -271,7 +255,6 @@ class compressed_sparse_row_graph<directedS, VertexProperty, EdgeProperty, Graph
   compressed_sparse_row_graph(vertices_size_type numverts)
     : inherited_vertex_properties(numverts), m_forward(numverts) {}
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
   //  From number of vertices and unsorted list of edges
   template <typename MultiPassInputIterator>
   compressed_sparse_row_graph(edges_are_unsorted_multi_pass_t,
@@ -327,38 +310,6 @@ class compressed_sparse_row_graph<directedS, VertexProperty, EdgeProperty, Graph
   {
     m_forward.assign_unsorted_multi_pass_edges(edge_begin, edge_end, ep_iter, numlocalverts, global_to_local, source_pred);
   }
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-
-  //  From number of vertices and sorted list of edges (deprecated
-  //  interface)
-  template<typename InputIterator>
-  compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
-                              vertices_size_type numverts,
-                              edges_size_type numedges = 0,
-                              const GraphProperty& prop = GraphProperty())
-    : m_property(prop)
-  {
-    m_forward.assign_from_sorted_edges(edge_begin, edge_end, identity_property_map(), keep_all(), numverts, numedges);
-    inherited_vertex_properties::resize(numverts);
-  }
-
-  //  From number of vertices and sorted list of edges (deprecated
-  //  interface)
-  template<typename InputIterator, typename EdgePropertyIterator>
-  compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
-                              EdgePropertyIterator ep_iter,
-                              vertices_size_type numverts,
-                              edges_size_type numedges = 0,
-                              const GraphProperty& prop = GraphProperty())
-    : m_property(prop)
-  {
-    m_forward.assign_from_sorted_edges(edge_begin, edge_end, ep_iter, identity_property_map(), keep_all(), numverts, numedges);
-    inherited_vertex_properties::resize(numverts);
-  }
-
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
 
   //  From number of vertices and sorted list of edges (new interface)
   template<typename InputIterator>
@@ -387,7 +338,6 @@ class compressed_sparse_row_graph<directedS, VertexProperty, EdgeProperty, Graph
     inherited_vertex_properties::resize(numverts);
   }
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
   //  From number of vertices and sorted list of edges, filtered and global (new interface)
   template<typename InputIterator, typename GlobalToLocal, typename SourcePred>
   compressed_sparse_row_graph(edges_are_sorted_global_t,
@@ -556,8 +506,6 @@ class compressed_sparse_row_graph<directedS, VertexProperty, EdgeProperty, Graph
     m_forward.assign_sources_and_targets_global(sources, targets, edge_props, numlocalverts, global_to_local);
   }
 
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 
   //   Requires IncidenceGraph and a vertex index map
   template<typename Graph, typename VertexIndexMap>
@@ -635,7 +583,6 @@ class compressed_sparse_row_graph<directedS, VertexProperty, EdgeProperty, Graph
     inherited_vertex_properties::resize(numverts);
   }
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
   // Add edges from a sorted (smallest sources first) range of pairs and edge
   // properties
   template <typename BidirectionalIteratorOrig, typename EPIterOrig,
@@ -754,7 +701,6 @@ class compressed_sparse_row_graph<directedS, VertexProperty, EdgeProperty, Graph
                      EPIterator ep_iter, EPIterator ep_iter_end) {
     this->add_edges_internal(first, last, ep_iter, ep_iter_end, identity_property_map());
   }
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 
   using inherited_vertex_properties::operator[];
 
@@ -775,8 +721,6 @@ class compressed_sparse_row_graph<directedS, VertexProperty, EdgeProperty, Graph
   GraphProperty m_property;
 };
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-// Bidir is only supported in this mode
 template<typename VertexProperty,
          typename EdgeProperty,
          typename GraphProperty,
@@ -784,11 +728,11 @@ template<typename VertexProperty,
          typename EdgeIndex>
 class compressed_sparse_row_graph<bidirectionalS, VertexProperty, EdgeProperty, GraphProperty, Vertex, EdgeIndex>
    : public detail::indexed_vertex_properties<BOOST_BIDIR_CSR_GRAPH_TYPE,
-                                              VertexProperty, Vertex>
+                                              VertexProperty, Vertex, identity_property_map>
 {
  public:
   typedef detail::indexed_vertex_properties<compressed_sparse_row_graph,
-                                            VertexProperty, Vertex>
+                                            VertexProperty, Vertex, identity_property_map>
     inherited_vertex_properties;
 
  public:
@@ -1144,7 +1088,6 @@ class compressed_sparse_row_graph<bidirectionalS, VertexProperty, EdgeProperty,
   backward_type m_backward;
   GraphProperty m_property;
 };
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 
 // Construction functions
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1185,44 +1128,6 @@ add_vertices(typename BOOST_DIR_CSR_GRAPH_TYPE::vertices_size_type count, BOOST_
   return old_num_verts_plus_one - 1;
 }
 
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-// This function requires that (src, tgt) be lexicographically at least as
-// large as the largest edge in the graph so far
-template<BOOST_DIR_CSR_GRAPH_TEMPLATE_PARMS>
-inline typename BOOST_DIR_CSR_GRAPH_TYPE::edge_descriptor
-add_edge(Vertex src, Vertex tgt, BOOST_DIR_CSR_GRAPH_TYPE& g) {
-  assert ((g.m_last_source == 0 || src >= g.m_last_source - 1) &&
-          src < num_vertices(g));
-  EdgeIndex num_edges_orig = g.m_forward.m_column.size();
-  for (; g.m_last_source <= src; ++g.m_last_source)
-    g.m_forward.m_rowstart[g.m_last_source] = num_edges_orig;
-  g.m_forward.m_rowstart[src + 1] = num_edges_orig + 1;
-  g.m_forward.m_column.push_back(tgt);
-  typedef typename BOOST_DIR_CSR_GRAPH_TYPE::edge_push_back_type push_back_type;
-  g.edge_properties().push_back(push_back_type());
-  return typename BOOST_DIR_CSR_GRAPH_TYPE::edge_descriptor(src, num_edges_orig);
-}
-
-// This function requires that src be at least as large as the largest source
-// in the graph so far
-template<BOOST_DIR_CSR_GRAPH_TEMPLATE_PARMS>
-inline typename BOOST_DIR_CSR_GRAPH_TYPE::edge_descriptor
-add_edge(Vertex src, Vertex tgt,
-         typename BOOST_DIR_CSR_GRAPH_TYPE::edge_bundled const& p,
-         BOOST_DIR_CSR_GRAPH_TYPE& g) {
-  assert ((g.m_last_source == 0 || src >= g.m_last_source - 1) &&
-          src < num_vertices(g));
-  EdgeIndex num_edges_orig = g.m_forward.m_column.size();
-  for (; g.m_last_source <= src; ++g.m_last_source)
-    g.m_forward.m_rowstart[g.m_last_source] = num_edges_orig;
-  g.m_forward.m_rowstart[src + 1] = num_edges_orig + 1;
-  g.m_forward.m_column.push_back(tgt);
-  g.edge_properties().push_back(p);
-  return typename BOOST_DIR_CSR_GRAPH_TYPE::edge_descriptor(src, num_edges_orig);
-}
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
   // Add edges from a sorted (smallest sources first) range of pairs and edge
   // properties
   template <BOOST_DIR_CSR_GRAPH_TEMPLATE_PARMS, typename BidirectionalIteratorOrig,
@@ -1307,7 +1212,6 @@ add_edge(Vertex src, Vertex tgt,
             BOOST_DIR_CSR_GRAPH_TYPE& g) {
     g.add_edges_internal(first, last, ep_iter, ep_iter_end, global_to_local);
   }
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 
 // From VertexListGraph
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1340,21 +1244,6 @@ target(typename BOOST_CSR_GRAPH_TYPE::edge_descriptor e,
   return g.m_forward.m_column[e.idx];
 }
 
-namespace detail {
-  template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
-  inline EdgeIndex get_actual_row_start
-    (const BOOST_CSR_GRAPH_TYPE& g,
-     EdgeIndex rowstart_i_minus_1, EdgeIndex rowstart_i)
-  {
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-    return rowstart_i;
-#else
-  // Special case to allow incremental construction
-    return (std::max)(rowstart_i_minus_1, rowstart_i);
-#endif
-  }
-}
-
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
 inline std::pair<typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator,
                  typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator>
@@ -1365,8 +1254,7 @@ out_edges(Vertex v, const BOOST_CSR_GRAPH_TYPE& g)
   EdgeIndex v_row_start = g.m_forward.m_rowstart[v];
   EdgeIndex next_row_start = g.m_forward.m_rowstart[v + 1];
   return std::make_pair(it(ed(v, v_row_start)),
-                        it(ed(v, detail::get_actual_row_start
-                                   (g, v_row_start, next_row_start))));
+                        it(ed(v, next_row_start)));
 }
 
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1375,11 +1263,9 @@ out_degree(Vertex v, const BOOST_CSR_GRAPH_TYPE& g)
 {
   EdgeIndex v_row_start = g.m_forward.m_rowstart[v];
   EdgeIndex next_row_start = g.m_forward.m_rowstart[v + 1];
-  return detail::get_actual_row_start(g, v_row_start, next_row_start) - v_row_start;
+  return next_row_start - v_row_start;
 }
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 template<BOOST_BIDIR_CSR_GRAPH_TEMPLATE_PARMS>
 inline std::pair<typename BOOST_BIDIR_CSR_GRAPH_TYPE::in_edge_iterator,
                  typename BOOST_BIDIR_CSR_GRAPH_TYPE::in_edge_iterator>
@@ -1402,8 +1288,6 @@ in_degree(Vertex v, const BOOST_BIDIR_CSR_GRAPH_TYPE& g)
   return next_row_start - v_row_start;
 }
 
-#endif // BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 // From AdjacencyGraph
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
 inline std::pair<typename BOOST_CSR_GRAPH_TYPE::adjacency_iterator,
@@ -1413,9 +1297,7 @@ adjacent_vertices(Vertex v, const BOOST_CSR_GRAPH_TYPE& g)
   EdgeIndex v_row_start = g.m_forward.m_rowstart[v];
   EdgeIndex next_row_start = g.m_forward.m_rowstart[v + 1];
   return std::make_pair(g.m_forward.m_column.begin() + v_row_start,
-                        g.m_forward.m_column.begin() +
-                          detail::get_actual_row_start
-                            (g, v_row_start, next_row_start));
+                        g.m_forward.m_column.begin() + next_row_start);
 }
 
 // Extra, common functions
@@ -1427,43 +1309,6 @@ vertex(typename graph_traits<BOOST_CSR_GRAPH_TYPE>::vertex_descriptor i,
   return i;
 }
 
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-// These require that the out edges from a vertex are sorted, which is only
-// guaranteed by the old interface
-
-// Unlike for an adjacency_matrix, edge_range and edge take lg(out_degree(i))
-// time
-template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
-inline std::pair<typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator,
-                 typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator>
-edge_range(Vertex i, Vertex j, const BOOST_CSR_GRAPH_TYPE& g)
-{
-  typedef typename std::vector<Vertex>::const_iterator adj_iter;
-  typedef typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator out_edge_iter;
-  typedef typename BOOST_CSR_GRAPH_TYPE::edge_descriptor edge_desc;
-  std::pair<adj_iter, adj_iter> raw_adjacencies = adjacent_vertices(i, g);
-  std::pair<adj_iter, adj_iter> adjacencies =
-    std::equal_range(raw_adjacencies.first, raw_adjacencies.second, j);
-  EdgeIndex idx_begin = adjacencies.first - g.m_forward.m_column.begin();
-  EdgeIndex idx_end = adjacencies.second - g.m_forward.m_column.begin();
-  return std::make_pair(out_edge_iter(edge_desc(i, idx_begin)),
-                        out_edge_iter(edge_desc(i, idx_end)));
-}
-
-template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
-inline std::pair<typename BOOST_CSR_GRAPH_TYPE::edge_descriptor, bool>
-edge(Vertex i, Vertex j, const BOOST_CSR_GRAPH_TYPE& g)
-{
-  typedef typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator out_edge_iter;
-  std::pair<out_edge_iter, out_edge_iter> range = edge_range(i, j, g);
-  if (range.first == range.second)
-    return std::make_pair(typename BOOST_CSR_GRAPH_TYPE::edge_descriptor(),
-                          false);
-  else
-    return std::make_pair(*range.first, true);
-}
-
-#else // !BOOST_GRAPH_USE_OLD_CSR_INTERFACE
 // edge() can be provided in linear time for the new interface
 
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1473,15 +1318,13 @@ edge(Vertex i, Vertex j, const BOOST_CSR_GRAPH_TYPE& g)
   typedef typename BOOST_CSR_GRAPH_TYPE::out_edge_iterator out_edge_iter;
   std::pair<out_edge_iter, out_edge_iter> range = out_edges(i, g);
   for (; range.first != range.second; ++range.first) {
-    if (target(*range.first) == j)
+    if (target(*range.first, g) == j)
       return std::make_pair(*range.first, true);
   }
   return std::make_pair(typename BOOST_CSR_GRAPH_TYPE::edge_descriptor(),
                         false);
 }
 
-#endif // !BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-
 // Find an edge given its index in the graph
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
 inline typename BOOST_CSR_GRAPH_TYPE::edge_descriptor
@@ -1491,14 +1334,7 @@ edge_from_index(EdgeIndex idx, const BOOST_CSR_GRAPH_TYPE& g)
   assert (idx < num_edges(g));
   row_start_iter src_plus_1 =
     std::upper_bound(g.m_forward.m_rowstart.begin(),
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-                     // This handles the case where there are some vertices
-                     // with rowstart 0 after the last provided vertex; this
-                     // case does not happen with the new interface
-                     g.m_forward.m_rowstart.begin() + g.m_last_source + 1,
-#else // !BOOST_GRAPH_USE_OLD_CSR_INTERFACE
                      g.m_forward.m_rowstart.end(),
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
                      idx);
     // Get last source whose rowstart is at most idx
     // upper_bound returns this position plus 1
@@ -1558,24 +1394,6 @@ get_property(const BOOST_CSR_GRAPH_TYPE& g, Tag)
   return get_property_value(g.m_property, Tag());
 }
 
-// Add edge_index property map
-template<typename Index, typename Descriptor>
-struct csr_edge_index_map
-{
-  typedef Index                     value_type;
-  typedef Index                     reference;
-  typedef Descriptor                key_type;
-  typedef readable_property_map_tag category;
-};
-
-template<typename Index, typename Descriptor>
-inline Index
-get(const csr_edge_index_map<Index, Descriptor>&,
-    const typename csr_edge_index_map<Index, Descriptor>::key_type& key)
-{
-  return key.idx;
-}
-
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
 struct property_map<BOOST_CSR_GRAPH_TYPE, vertex_index_t>
 {
@@ -1586,16 +1404,24 @@ struct property_map<BOOST_CSR_GRAPH_TYPE, vertex_index_t>
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
 struct property_map<BOOST_CSR_GRAPH_TYPE, edge_index_t>
 {
-private:
-  typedef typename graph_traits<BOOST_CSR_GRAPH_TYPE>::edge_descriptor
-    edge_descriptor;
-  typedef csr_edge_index_map<EdgeIndex, edge_descriptor> edge_index_type;
-
-public:
-  typedef edge_index_type type;
+  typedef detail::csr_edge_index_map<Vertex, EdgeIndex> type;
   typedef type const_type;
 };
 
+template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
+struct property_map<BOOST_CSR_GRAPH_TYPE, vertex_bundle_t>
+{
+  typedef typename BOOST_CSR_GRAPH_TYPE::inherited_vertex_properties::vertex_map_type type;
+  typedef typename BOOST_CSR_GRAPH_TYPE::inherited_vertex_properties::const_vertex_map_type const_type;
+};
+
+template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
+struct property_map<BOOST_CSR_GRAPH_TYPE, edge_bundle_t>
+{
+  typedef typename BOOST_CSR_GRAPH_TYPE::forward_type::inherited_edge_properties::edge_map_type type;
+  typedef typename BOOST_CSR_GRAPH_TYPE::forward_type::inherited_edge_properties::const_edge_map_type const_type;
+};
+
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
 inline identity_property_map
 get(vertex_index_t, const BOOST_CSR_GRAPH_TYPE&)
@@ -1628,6 +1454,88 @@ get(edge_index_t, const BOOST_CSR_GRAPH_TYPE&,
   return e.idx;
 }
 
+template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
+inline typename property_map<BOOST_CSR_GRAPH_TYPE, vertex_bundle_t>::type
+get(vertex_bundle_t, BOOST_CSR_GRAPH_TYPE& g)
+{
+  return g.get_vertex_bundle(get(vertex_index, g));
+}
+
+template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
+inline typename property_map<BOOST_CSR_GRAPH_TYPE, vertex_bundle_t>::const_type
+get(vertex_bundle_t, const BOOST_CSR_GRAPH_TYPE& g)
+{
+  return g.get_vertex_bundle(get(vertex_index, g));
+}
+
+template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
+inline VertexProperty&
+get(vertex_bundle_t,
+    BOOST_CSR_GRAPH_TYPE& g, Vertex v)
+{
+  return get(vertex_bundle, g)[v];
+}
+
+template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
+inline const VertexProperty&
+get(vertex_bundle_t,
+    const BOOST_CSR_GRAPH_TYPE& g, Vertex v)
+{
+  return get(vertex_bundle, g)[v];
+}
+
+template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
+inline void
+put(vertex_bundle_t,
+    BOOST_CSR_GRAPH_TYPE& g,
+    Vertex v,
+    const VertexProperty& val)
+{
+  put(get(vertex_bundle, g), v, val);
+}
+
+template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
+inline typename property_map<BOOST_CSR_GRAPH_TYPE, edge_bundle_t>::type
+get(edge_bundle_t, BOOST_CSR_GRAPH_TYPE& g)
+{
+  return g.m_forward.get_edge_bundle(get(edge_index, g));
+}
+
+template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
+inline typename property_map<BOOST_CSR_GRAPH_TYPE, edge_bundle_t>::const_type
+get(edge_bundle_t, const BOOST_CSR_GRAPH_TYPE& g)
+{
+  return g.m_forward.get_edge_bundle(get(edge_index, g));
+}
+
+template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
+inline EdgeProperty&
+get(edge_bundle_t,
+    BOOST_CSR_GRAPH_TYPE& g,
+    const typename BOOST_CSR_GRAPH_TYPE::edge_descriptor& e)
+{
+  return get(edge_bundle, g)[e];
+}
+
+template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
+inline const EdgeProperty&
+get(edge_bundle_t,
+    const BOOST_CSR_GRAPH_TYPE& g,
+    const typename BOOST_CSR_GRAPH_TYPE::edge_descriptor& e)
+{
+  return get(edge_bundle, g)[e];
+}
+
+template<BOOST_CSR_GRAPH_TEMPLATE_PARMS>
+inline void
+put(edge_bundle_t,
+    BOOST_CSR_GRAPH_TYPE& g,
+    const typename BOOST_CSR_GRAPH_TYPE::edge_descriptor& e,
+    const EdgeProperty& val)
+{
+  put(get(edge_bundle, g), e, val);
+}
+
 template<BOOST_CSR_GRAPH_TEMPLATE_PARMS, typename T, typename Bundle>
 inline
 typename property_map<BOOST_CSR_GRAPH_TYPE, T Bundle::*>::type
index 743c81f9167acf0c24a0c9a93daf679462dcb3f6..da072bf1eb9670148f1ab026820d8b786eddce97 100644 (file)
@@ -86,7 +86,7 @@ namespace boost {
 
     template <class Visitors>
     core_numbers_visitor<Visitors> make_core_numbers_visitor(Visitors vis)
-    { return core_numbers_visitor<Visitors>(vis); };
+    { return core_numbers_visitor<Visitors>(vis); }
 
     typedef core_numbers_visitor<> default_core_numbers_visitor;
 
index cc071de1f3cc6211bfecbf9672d3f98488b480e9..d8b47ac62f60018c469f72a05b27005488a5c5c6 100644 (file)
@@ -83,7 +83,7 @@ namespace boost {
     dag_sp_dispatch2
       (const VertexListGraph& g,
        typename graph_traits<VertexListGraph>::vertex_descriptor s, 
-       DistanceMap distance, WeightMap weight, ColorMap color, IndexMap id,
+       DistanceMap distance, WeightMap weight, ColorMap color, IndexMap /*id*/,
        DijkstraVisitor vis, const Params& params)
     {
       typedef typename property_traits<DistanceMap>::value_type D;
index 1bf066711363c1a74f3c6cc2e6c3afb60f3a7ef7..fcc616464745220e8ce56bd4a61308704881590f 100644 (file)
@@ -193,7 +193,8 @@ namespace boost {
 
     typename graph_traits<VertexListGraph>::vertex_iterator ui, ui_end;
     for (tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) {
-      put(color, *ui, Color::white());       vis.initialize_vertex(*ui, g);
+      Vertex u = implicit_cast<Vertex>(*ui);
+      put(color, u, Color::white()); vis.initialize_vertex(u, g);
     }
 
     if (start_vertex != implicit_cast<Vertex>(*vertices(g).first)){ vis.start_vertex(start_vertex, g);
@@ -202,9 +203,10 @@ namespace boost {
     }
 
     for (tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui) {
-      ColorValue u_color = get(color, *ui);
-      if (u_color == Color::white()) {       vis.start_vertex(*ui, g);
-        detail::depth_first_visit_impl(g, *ui, vis, color, detail::nontruth2());
+      Vertex u = implicit_cast<Vertex>(*ui);
+      ColorValue u_color = get(color, u);
+      if (u_color == Color::white()) {       vis.start_vertex(u, g);
+        detail::depth_first_visit_impl(g, u, vis, color, detail::nontruth2());
       }
     }
   }
index c02a310b84da5dac894fab875b5579558febc688..d94bc1eba95dfcb06e64d3ed7bd0833d8173b171 100644 (file)
@@ -1,7 +1,8 @@
 // -*- c++ -*-
 //=======================================================================
 // Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
-// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
+// Copyright 2010 Thomas Claveirole
+// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek, Thomas Claveirole
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
@@ -1183,13 +1184,11 @@ namespace boost {
                                 multisetS*)
       { return edge_range(source(e, g), target(e, g), g); }
 
-#if !defined BOOST_NO_HASH
       std::pair<out_edge_iterator, out_edge_iterator>
       get_parallel_edge_sublist(typename Config::edge_descriptor e,
                                 const graph_type& g,
                                 hash_setS*)
       { return edge_range(source(e, g), target(e, g), g); }
-#endif
 
       // Placement of these overloaded remove_edge() functions
       // inside the class avoids a VC++ bug.
@@ -1635,6 +1634,7 @@ namespace boost {
       const Graph& g = static_cast<const Graph&>(g_);
       return g_.edge_dispatch(g, u, v, Cat());
     }
+
     template <class Config, class Base>
     inline std::pair<typename Config::out_edge_iterator,
                      typename Config::out_edge_iterator>
@@ -1650,10 +1650,9 @@ namespace boost {
       typename Config::OutEdgeList& el = g.out_edge_list(u);
       typename Config::OutEdgeList::iterator first, last;
       typename Config::EdgeContainer fake_edge_container;
-      tie(first, last) =
-        std::equal_range(el.begin(), el.end(),
-                         StoredEdge(v, fake_edge_container.end(),
-                                    &fake_edge_container));
+      tie(first, last) = graph_detail::
+        equal_range(el, StoredEdge(v, fake_edge_container.end(),
+                                   &fake_edge_container));
       return std::make_pair(out_edge_iterator(first, u),
                             out_edge_iterator(last, u));
     }
@@ -2297,7 +2296,7 @@ namespace boost {
         // VertexList and vertex_iterator
         typedef typename container_gen<VertexListS,
           vertex_ptr>::type SeqVertexList;
-        typedef boost::integer_range<vertices_size_type> RandVertexList;
+        typedef boost::integer_range<vertex_descriptor> RandVertexList;
         typedef typename mpl::if_<is_rand_access,
           RandVertexList, SeqVertexList>::type VertexList;
 
@@ -2785,8 +2784,8 @@ namespace boost {
 
 } // namespace boost
 
-#if !defined(BOOST_NO_HASH) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-namespace BOOST_STD_EXTENSION_NAMESPACE {
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+namespace boost {
 
   #if BOOST_WORKAROUND( _STLPORT_VERSION, >= 0x500 )
   // STLport 5 already defines a hash<void*> specialization.
index 6f337e91218fd64532cde43d7ba21968741efef1..78755556c8e3f114ef7505dd0e8ce9682ef21766 100644 (file)
@@ -8,18 +8,18 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 //=======================================================================
 //
-#ifndef ADSTL_ARRAY_BINARY_TREE_HPP
-#define ADSTL_ARRAY_BINARY_TREE_HPP
+#ifndef BOOST_ARRAY_BINARY_TREE_HPP
+#define BOOST_ARRAY_BINARY_TREE_HPP
 
 #include <iterator>
 #include <functional>
 #include <boost/config.hpp>
 
-namespace adstl {
-  /*
-    Note: array_binary_tree is a completey balanced binary tree
-   */
+namespace boost {
 
+/*
+ * Note: array_binary_tree is a completey balanced binary tree.
+ */
 #if !defined BOOST_NO_STD_ITERATOR_TRAITS
   template <class RandomAccessIterator, class ID>
 #else
@@ -45,18 +45,18 @@ public:
         : boost::iterator<std::bidirectional_iterator_tag, ArrayBinaryTreeNode,
                        difference_type, array_binary_tree_node*, ArrayBinaryTreeNode&>
     { // replace with iterator_adaptor implementation -JGS
-        
+
       inline iterator() : i(0), n(0) { }
       inline iterator(const iterator& x) : r(x.r), i(x.i), n(x.n), id(x.id) { }
       inline iterator& operator=(const iterator& x) {
-        r = x.r; i = x.i; n = x.n; 
+        r = x.r; i = x.i; n = x.n;
         /*egcs generate a warning*/
-        id = x.id; 
+        id = x.id;
         return *this;
       }
-      inline iterator(rep_iterator rr, 
-                      size_type ii, 
-                      size_type nn, 
+      inline iterator(rep_iterator rr,
+                      size_type ii,
+                      size_type nn,
                       const ID& _id) : r(rr), i(ii), n(nn), id(_id) { }
       inline array_binary_tree_node operator*() {
         return ArrayBinaryTreeNode(r, i, n, id); }
@@ -64,7 +64,7 @@ public:
       inline iterator operator++(int)
         { iterator t = *this; ++(*this); return t; }
       inline bool operator==(const iterator& x) const { return i == x.i; }
-      inline bool operator!=(const iterator& x) const 
+      inline bool operator!=(const iterator& x) const
         { return !(*this == x); }
       rep_iterator r;
       size_type i;
@@ -75,13 +75,13 @@ public:
     inline children_type(const children_type& x)
       : r(x.r), i(x.i), n(x.n), id(x.id) { }
     inline children_type& operator=(const children_type& x) {
-      r = x.r; i = x.i; n = x.n; 
+      r = x.r; i = x.i; n = x.n;
       /*egcs generate a warning*/
-      id = x.id; 
+      id = x.id;
       return *this;
     }
     inline children_type(rep_iterator rr,
-                         size_type ii, 
+                         size_type ii,
                          size_type nn,
                          const ID& _id) : r(rr), i(ii), n(nn), id(_id) { }
     inline iterator begin() { return iterator(r, 2 * i + 1, n, id); }
@@ -100,23 +100,23 @@ public:
     ID id;
   };
   inline array_binary_tree_node() : i(0), n(0) { }
-  inline array_binary_tree_node(const array_binary_tree_node& x) 
+  inline array_binary_tree_node(const array_binary_tree_node& x)
     : r(x.r), i(x.i), n(x.n), id(x.id) { }
   inline ArrayBinaryTreeNode& operator=(const ArrayBinaryTreeNode& x) {
     r = x.r;
-    i = x.i; 
-    n = x.n; 
+    i = x.i;
+    n = x.n;
     /*egcs generate a warning*/
-    id = x.id; 
+    id = x.id;
     return *this;
   }
-  inline array_binary_tree_node(rep_iterator start, 
-                                rep_iterator end, 
+  inline array_binary_tree_node(rep_iterator start,
+                                rep_iterator end,
                                 rep_iterator pos, const ID& _id)
     : r(start), i(pos - start), n(end - start), id(_id) { }
-  inline array_binary_tree_node(rep_iterator rr, 
-                                size_type ii, 
-                                size_type nn, const ID& _id) 
+  inline array_binary_tree_node(rep_iterator rr,
+                                size_type ii,
+                                size_type nn, const ID& _id)
     : r(rr), i(ii), n(nn), id(_id) { }
   inline value_type& value() { return *(r + i); }
   inline const value_type& value() const { return *(r + i); }
@@ -147,8 +147,8 @@ public:
     value() = tmp;
     i = x.i;
   }
-   inline const children_type children() const { 
-    return children_type(r, i, n); 
+   inline const children_type children() const {
+    return children_type(r, i, n);
   }
   inline size_type index() const { return i; }
   rep_iterator r;
@@ -157,7 +157,7 @@ public:
   ID id;
 };
 
-template <class RandomAccessContainer, 
+template <class RandomAccessContainer,
        class Compare = std::less<typename RandomAccessContainer::value_type> >
 struct compare_array_node {
   typedef typename RandomAccessContainer::value_type value_type;
@@ -176,7 +176,6 @@ struct compare_array_node {
   Compare comp;
 };
 
+} // namespace boost
 
-} /* namespace adstl */
-
-#endif /* ADSTL_ARRAY_BINARY_TREE_H */
+#endif /* BOOST_ARRAY_BINARY_TREE_HPP */
index 1146c77d801ee8d6b8d3abb66e7e88d249d244d1..541b6dd0780fc5822b97caf5e0920087ebab02f8 100644 (file)
@@ -54,6 +54,24 @@ namespace detail {
   template<typename Vertex, typename EdgeIndex>
   class csr_edge_descriptor;
 
+  // Add edge_index property map
+  template<typename Vertex, typename EdgeIndex>
+  struct csr_edge_index_map
+  {
+    typedef EdgeIndex                 value_type;
+    typedef EdgeIndex                 reference;
+    typedef csr_edge_descriptor<Vertex, EdgeIndex> key_type;
+    typedef readable_property_map_tag category;
+  };
+
+  template<typename Vertex, typename EdgeIndex>
+  inline EdgeIndex
+  get(const csr_edge_index_map<Vertex, EdgeIndex>&,
+      const csr_edge_descriptor<Vertex, EdgeIndex>& key)
+  {
+    return key.idx;
+  }
+
   /** Compressed sparse row graph internal structure.
    *
    * Vertex and EdgeIndex should be unsigned integral types and should
@@ -65,12 +83,14 @@ namespace detail {
     public detail::indexed_edge_properties<
              compressed_sparse_row_structure<EdgeProperty, Vertex, EdgeIndex>,
              EdgeProperty,
-             csr_edge_descriptor<Vertex, EdgeIndex> > {
+             csr_edge_descriptor<Vertex, EdgeIndex>,
+             csr_edge_index_map<Vertex, EdgeIndex> > {
     public:
     typedef detail::indexed_edge_properties<
               compressed_sparse_row_structure<EdgeProperty, Vertex, EdgeIndex>,
               EdgeProperty,
-              csr_edge_descriptor<Vertex, EdgeIndex> >
+              csr_edge_descriptor<Vertex, EdgeIndex>,
+              csr_edge_index_map<Vertex, EdgeIndex> >
       inherited_edge_properties;
 
     typedef Vertex vertices_size_type;
@@ -81,17 +101,9 @@ namespace detail {
 
     std::vector<EdgeIndex> m_rowstart;
     std::vector<Vertex> m_column;
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-    // This member is only needed to support add_edge(), which is not provided by
-    // the new interface
-    Vertex m_last_source; // Last source of added edge, plus one
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
 
     compressed_sparse_row_structure(Vertex numverts = 0)
       : m_rowstart(numverts + 1, EdgeIndex(0)), m_column()
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-        , m_last_source(numverts)
-#endif
       {}
     
     //  Rebuild graph from number of vertices and multi-pass unsorted list of
@@ -118,6 +130,7 @@ namespace detail {
          source_pred, boost::make_property_map_function(global_to_local));
 
       m_column.resize(m_rowstart.back());
+      inherited_edge_properties::resize(m_rowstart.back());
 
       boost::graph::detail::histogram_sort
         (sources_begin, sources_end, m_rowstart.begin(), numlocalverts,
@@ -251,11 +264,12 @@ namespace detail {
         (sources.begin(), sources.end(), m_rowstart.begin(), numverts,
          keep_all(), boost::make_property_map_function(global_to_local));
       boost::graph::detail::histogram_sort_inplace
-        (sources.begin(), sources.end(), m_rowstart.begin(), numverts,
+        (sources.begin(), m_rowstart.begin(), numverts,
          targets.begin(), boost::make_property_map_function(global_to_local));
       // Now targets is the correct vector (properly sorted by source) for
       // m_column
       m_column.swap(targets);
+      inherited_edge_properties::resize(m_rowstart.back());
     }
 
     // Replace graph with sources and targets and edge properties given, sorting
@@ -277,7 +291,7 @@ namespace detail {
         (sources.begin(), sources.end(), m_rowstart.begin(), numverts,
          keep_all(), boost::make_property_map_function(global_to_local));
       boost::graph::detail::histogram_sort_inplace
-        (sources.begin(), sources.end(), m_rowstart.begin(), numverts,
+        (sources.begin(), m_rowstart.begin(), numverts,
          targets.begin(), edge_props.begin(),
          boost::make_property_map_function(global_to_local));
       // Now targets is the correct vector (properly sorted by source) for
@@ -297,6 +311,7 @@ namespace detail {
     {
       m_rowstart.resize(numverts + 1);
       m_column.resize(numedges);
+      inherited_edge_properties::resize(numedges);
       EdgeIndex current_edge = 0;
       typedef typename boost::graph_traits<Graph>::vertex_descriptor g_vertex;
       typedef typename boost::graph_traits<Graph>::edge_descriptor g_edge;
@@ -310,24 +325,12 @@ namespace detail {
       for (Vertex i = 0; i != numverts; ++i) {
         m_rowstart[i] = current_edge;
         g_vertex v = ordered_verts_of_g[i];
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-        // Out edges in a single vertex are only sorted for the old interface
-        EdgeIndex num_edges_before_this_vertex = current_edge;
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
         g_out_edge_iter ei, ei_end;
         for (tie(ei, ei_end) = out_edges(v, g); ei != ei_end; ++ei) {
           m_column[current_edge++] = get(vi, target(*ei, g));
         }
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-        // Out edges in a single vertex are only sorted for the old interface
-        std::sort(m_column.begin() + num_edges_before_this_vertex,
-                  m_column.begin() + current_edge);
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
       }
       m_rowstart[numverts] = current_edge;
-#ifdef BOOST_GRAPH_USE_OLD_CSR_INTERFACE
-      m_last_source = numverts;
-#endif // BOOST_GRAPH_USE_OLD_CSR_INTERFACE
     }
 
     // Add edges from a sorted (smallest sources first) range of pairs and edge
index 9706d2549498fcfc641ae12132571cda0a111362..742c6f96397d7721cd0a858f4a8b54f39479c9fd 100644 (file)
@@ -148,7 +148,7 @@ template <typename KeyIterator, typename RowstartIterator,
           typename Value1Iter,
           typename KeyTransform>
 void
-histogram_sort_inplace(KeyIterator key_begin, KeyIterator key_end,
+histogram_sort_inplace(KeyIterator key_begin,
                        RowstartIterator rowstart, // Must support numkeys + 1 elements and be precomputed
                        NumKeys numkeys,
                        Value1Iter values1,
@@ -181,7 +181,7 @@ template <typename KeyIterator, typename RowstartIterator,
           typename Value2Iter,
           typename KeyTransform>
 void
-histogram_sort_inplace(KeyIterator key_begin, KeyIterator key_end,
+histogram_sort_inplace(KeyIterator key_begin,
                        RowstartIterator rowstart, // Must support numkeys + 1 elements and be precomputed
                        NumKeys numkeys,
                        Value1Iter values1,
index 7fa1548e240831a79e9b6d7b7cadf5d534dcb91d..e1f874b2ccae4defc765c1c36bdc9b61520e70b5 100644 (file)
 #include <boost/iterator/counting_iterator.hpp>
 #include <boost/integer.hpp>
 #include <boost/iterator/iterator_facade.hpp>
+#include <boost/property_map/property_map.hpp>
 #include <boost/mpl/if.hpp>
 
 namespace boost {
 namespace detail {
 
-template<typename Derived, typename Property, typename Descriptor>
+template<typename Derived, typename Property, typename Descriptor, typename IndexMap>
 class indexed_vertex_properties
 {
 public:
   typedef no_property vertex_property_type;
   typedef Property vertex_bundled;
+  typedef iterator_property_map<
+            typename std::vector<Property>::iterator,
+            IndexMap> vertex_map_type;
+  typedef iterator_property_map<
+            typename std::vector<Property>::const_iterator,
+            IndexMap> const_vertex_map_type;
 
   // Directly access a vertex or edge bundle
   Property& operator[](Descriptor v)
@@ -42,6 +49,14 @@ public:
   const Property& operator[](Descriptor v) const
   { return m_vertex_properties[get(vertex_index, derived(), v)]; }
 
+  vertex_map_type get_vertex_bundle(const IndexMap& index_map = IndexMap()) {
+    return vertex_map_type(m_vertex_properties.begin(), index_map);
+  }
+
+  const_vertex_map_type get_vertex_bundle(const IndexMap& index_map = IndexMap()) const {
+    return const_vertex_map_type(m_vertex_properties.begin(), index_map);
+  }
+
 protected:
   // Default-construct with no property values
   indexed_vertex_properties() {}
@@ -90,17 +105,23 @@ public: // should be private, but friend templates not portable
   std::vector<Property> m_vertex_properties;
 };
 
-template<typename Derived, typename Descriptor>
-class indexed_vertex_properties<Derived, void, Descriptor>
+template<typename Derived, typename Descriptor, typename IndexMap>
+class indexed_vertex_properties<Derived, void, Descriptor, IndexMap>
 {
   struct secret {};
 
  public:
   typedef no_property vertex_property_type;
   typedef void vertex_bundled;
+  typedef secret vertex_map_type;
+  typedef secret const_vertex_map_type;
 
   secret operator[](secret) { return secret(); }
 
+  vertex_map_type get_vertex_bundle() const {
+    return vertex_map_type();
+  }
+
  protected:
   // All operations do nothing.
   indexed_vertex_properties() { }
@@ -112,13 +133,19 @@ public:
   void reserve(std::size_t) { }
 };
 
-template<typename Derived, typename Property, typename Descriptor>
+template<typename Derived, typename Property, typename Descriptor, typename IndexMap>
 class indexed_edge_properties
 {
 public:
   typedef no_property edge_property_type;
   typedef Property edge_bundled;
   typedef Property edge_push_back_type;
+  typedef iterator_property_map<
+            typename std::vector<Property>::iterator,
+            IndexMap> edge_map_type;
+  typedef iterator_property_map<
+            typename std::vector<Property>::const_iterator,
+            IndexMap> const_edge_map_type;
 
   // Directly access a edge or edge bundle
   Property& operator[](Descriptor v)
@@ -127,6 +154,14 @@ public:
   const Property& operator[](Descriptor v) const
   { return m_edge_properties[get(edge_index, derived(), v)]; }
 
+  edge_map_type get_edge_bundle(const IndexMap& index_map = IndexMap()) {
+    return edge_map_type(m_edge_properties.begin(), index_map);
+  }
+
+  const_edge_map_type get_edge_bundle(const IndexMap& index_map = IndexMap()) const {
+    return const_edge_map_type(m_edge_properties.begin(), index_map);
+  }
+
 protected:
   // Default-construct with no property values
   indexed_edge_properties() {}
@@ -205,8 +240,8 @@ struct dummy_no_property_iterator
   std::ptrdiff_t distance_to(const dummy_no_property_iterator) const {return 0;}
 };
 
-template<typename Derived, typename Descriptor>
-class indexed_edge_properties<Derived, void, Descriptor>
+template<typename Derived, typename Descriptor, typename IndexMap>
+class indexed_edge_properties<Derived, void, Descriptor, IndexMap>
 {
   struct secret {};
 
@@ -214,10 +249,16 @@ class indexed_edge_properties<Derived, void, Descriptor>
   typedef no_property edge_property_type;
   typedef void edge_bundled;
   typedef void* edge_push_back_type;
+  typedef secret edge_map_type;
+  typedef secret const_edge_map_type;
 
   secret operator[](secret) { return secret(); }
   void write_by_index(std::size_t idx, const no_property& prop) {}
 
+  edge_map_type get_edge_bundle(const IndexMap& = IndexMap()) const {
+    return edge_map_type();
+  }
+
  protected:
   // All operations do nothing.
   indexed_edge_properties() { }
index f61c24a4080dd8c1a7664e65417ec34cf3d37b55..6eb10609377f5bf526865bf7df88d0e542e2f92f 100644 (file)
@@ -187,7 +187,7 @@ struct is_labeled_graph
     >
 { };
 
-template <typename> class graph_mutability_traits;
+template <typename> struct graph_mutability_traits;
 
 namespace graph_detail {
     // The determine mutability metafunction computes a labeled mutability tag
index 215f9ef939d44217b2d17e11dbc6a3fff11e6322..7c7986dcbecf97c9d0703b272b72ef69d856a575 100644 (file)
@@ -89,26 +89,18 @@ namespace read_graphviz_detail {
 
 } // namespace read_graphviz_detail
 
-// This is also in boost/graph/graphviz.hpp
 namespace detail {
   namespace graph {
-    BOOST_GRAPH_DECL bool read_graphviz(const std::string& str, boost::detail::graph::mutate_graph* mg);
+    BOOST_GRAPH_DECL bool read_graphviz_new(const std::string& str, boost::detail::graph::mutate_graph* mg);
   } // end namespace graph
 } // end namespace detail
 
 template <typename MutableGraph>
-bool read_graphviz(const std::string& str,
-                   MutableGraph& graph, boost::dynamic_properties& dp,
-                   std::string const& node_id = "node_id") {
+bool read_graphviz_new(const std::string& str,
+                       MutableGraph& graph, boost::dynamic_properties& dp,
+                       std::string const& node_id = "node_id") {
   boost::detail::graph::mutate_graph_impl<MutableGraph> mg(graph, dp, node_id);
-  return detail::graph::read_graphviz(str, &mg);
-}
-
-template <typename InputIter, typename MutableGraph>
-bool read_graphviz(InputIter begin, InputIter end,
-                   MutableGraph& graph, boost::dynamic_properties& dp,
-                   std::string const& node_id = "node_id") {
-  return read_graphviz(std::string(begin, end), graph, dp, node_id);
+  return detail::graph::read_graphviz_new(str, &mg);
 }
 
 } // namespace boost
index 815befe91f3be476881285d4755bafc480c7fe5f..4e8b22e5eb44ef32f44bdbd23deb8eba6fbc9e27 100644 (file)
@@ -581,9 +581,9 @@ struct dot_skipper : public boost::spirit::classic::grammar<dot_skipper>
 } // namespace detail
 
 template <typename MultiPassIterator, typename MutableGraph>
-bool read_graphviz(MultiPassIterator begin, MultiPassIterator end,
-                   MutableGraph& graph, dynamic_properties& dp,
-                   std::string const& node_id = "node_id") {
+bool read_graphviz_spirit(MultiPassIterator begin, MultiPassIterator end,
+                          MutableGraph& graph, dynamic_properties& dp,
+                          std::string const& node_id = "node_id") {
   using namespace boost;
   using namespace boost::spirit::classic;
 
index f7dde1c44a966939ce02d46793d85a5c344cf9a6..f16b96426d1d17ef41f2ca241d6638ba6acf5600 100644 (file)
@@ -395,9 +395,9 @@ namespace boost {
         typedef typename Graph::directed_selector DirectedS;
 
       public:
-        typedef typename ct_if<(is_same<DirectedS, bidirectionalS>::value),
-                               stored_in_edge<Edge>,
-                               Edge>::type argument_type;
+        typedef typename boost::mpl::if_<is_same<DirectedS, bidirectionalS>,
+                                         stored_in_edge<Edge>,
+                                         Edge>::type argument_type;
         typedef edge_descriptor<Edge> result_type;
 
         in_generator() : g(0) {}
@@ -580,10 +580,10 @@ namespace boost {
                        EdgeProperty> edge_property_with_id;
 
       /// For undirected graphs, introduce the locally-owned property for edges
-      typedef typename ct_if<(is_same<DirectedS, undirectedS>::value),
-                             property<edge_locally_owned_t, bool,
-                                      edge_property_with_id>,
-                             edge_property_with_id>::type
+      typedef typename boost::mpl::if_<is_same<DirectedS, undirectedS>,
+                                       property<edge_locally_owned_t, bool,
+                                                edge_property_with_id>,
+                                       edge_property_with_id>::type
         base_edge_property_type;
 
       /// The edge descriptor type for the local subgraph
@@ -602,10 +602,10 @@ namespace boost {
 
       // Bidirectional graphs have an extra vertex property to store
       // the incoming edges.
-      typedef typename ct_if<(is_same<DirectedS, bidirectionalS>::value),
-                             property<vertex_in_edges_t, in_edge_list_type,
-                                      VertexProperty>,
-                             VertexProperty>::type 
+      typedef typename boost::mpl::if_<is_same<DirectedS, bidirectionalS>,
+                                       property<vertex_in_edges_t, in_edge_list_type,
+                                                VertexProperty>,
+                                       VertexProperty>::type 
         base_vertex_property_type;
 
       // The type of the distributed adjacency list
@@ -1097,9 +1097,9 @@ namespace boost {
     typedef typename base_type::vertex_descriptor local_vertex_descriptor;
     typedef typename base_type::edge_descriptor   local_edge_descriptor;
 
-    typedef typename boost::ct_if_t<typename DirectedS::is_bidir_t,
+    typedef typename boost::mpl::if_<typename DirectedS::is_bidir_t,
       bidirectional_tag,
-      typename boost::ct_if_t<typename DirectedS::is_directed_t,
+      typename boost::mpl::if_<typename DirectedS::is_directed_t,
         directed_tag, undirected_tag
       >::type
     >::type directed_category;
@@ -1355,12 +1355,12 @@ namespace boost {
      * are restricted; see the distributed adjacency_list
      * documentation.
      */
-    typedef typename ct_if<
-              (is_same<DirectedS, directedS>::value),
+    typedef typename boost::mpl::if_<
+              is_same<DirectedS, directedS>,
               directed_distributed_adj_list_tag,
-              typename ct_if<(is_same<DirectedS, bidirectionalS>::value),
-                             bidirectional_distributed_adj_list_tag,
-                             undirected_distributed_adj_list_tag>::type>
+              typename boost::mpl::if_<is_same<DirectedS, bidirectionalS>,
+                                       bidirectional_distributed_adj_list_tag,
+                                       undirected_distributed_adj_list_tag>::type>
       ::type traversal_category;
 
     typedef typename inherited::degree_size_type degree_size_type;
@@ -1376,9 +1376,9 @@ namespace boost {
       local_edge_list_type;
 
   private:
-    typedef typename ct_if<(is_same<DirectedS, bidirectionalS>::value),
-                           typename in_edge_list_type::const_iterator,
-                           typename inherited::out_edge_iterator>::type
+    typedef typename boost::mpl::if_<is_same<DirectedS, bidirectionalS>,
+                                     typename in_edge_list_type::const_iterator,
+                                     typename inherited::out_edge_iterator>::type
       base_in_edge_iterator;
 
     typedef typename inherited::out_edge_iterator base_out_edge_iterator;
@@ -1424,11 +1424,11 @@ namespace boost {
       adjacency_iterator;
 
     /// Iterator over the (local) edges in a graph
-    typedef typename ct_if<(is_same<DirectedS, undirectedS>::value),
-                           undirected_edge_iterator,
-                           transform_iterator<out_edge_generator,
-                                              base_edge_iterator>
-                           >::type 
+    typedef typename boost::mpl::if_<is_same<DirectedS, undirectedS>,
+                                     undirected_edge_iterator,
+                                     transform_iterator<out_edge_generator,
+                                                        base_edge_iterator>
+                                     >::type 
       edge_iterator;
 
   public:
index 134cc02e8e8156bda4157d986289467aa8732ba7..3f23d7640f0b9083b1faca2a39fb185a922ce4d8 100644 (file)
@@ -71,10 +71,10 @@ namespace boost {
                    boost::tuple<T1,T2,T3, T4>& t,
                    const unsigned int)
     {
-      ar & get<0>(t);
-      ar & get<1>(t);
-      ar & get<2>(t);
-      ar & get<3>(t);
+      ar & boost::tuples::get<0>(t);
+      ar & boost::tuples::get<1>(t);
+      ar & boost::tuples::get<2>(t);
+      ar & boost::tuples::get<3>(t);
     }
 
   } // serialization
@@ -87,7 +87,7 @@ namespace boost {
     
     get_owner_of_first_tuple_element(OwnerMap owner) : owner(owner) { }
 
-    owner_type get_owner(Tuple t) { return get(owner, get<0>(t)); }
+    owner_type get_owner(Tuple t) { return get(owner, boost::tuples::get<0>(t)); }
 
   private:
     OwnerMap owner;
@@ -911,10 +911,10 @@ namespace boost {
     while(!Q.empty()) {
 
       queue_value_type x = Q.top(); Q.pop();
-      vertex_descriptor w = get<0>(x);
-      vertex_descriptor source = get<1>(x);
-      dependency_type dep = get<2>(x);
-      path_count_type pc = get<3>(x);
+      vertex_descriptor w = boost::tuples::get<0>(x);
+      vertex_descriptor source = boost::tuples::get<1>(x);
+      dependency_type dep = boost::tuples::get<2>(x);
+      path_count_type pc = boost::tuples::get<3>(x);
 
       cache(dependency, source, dep);
       cache(path_count, source, pc);
index edbf16785e296c70ca1452c584bfb50a1ba8030e..49654d6da57e2b0379e9b0ce81e4d5b55826233d 100644 (file)
@@ -17,8 +17,6 @@
 #error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
 #endif
 
-#define BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 #include <boost/graph/compressed_sparse_row_graph.hpp>
 #include <boost/graph/distributed/selector.hpp>
 #include <boost/mpl/if.hpp>
@@ -179,8 +177,6 @@ class compressed_sparse_row_graph<
                               const Distribution& dist)
     : m_process_group(pg), m_distribution(dist), m_base(numverts) {}
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
   template <typename InputIterator>
   compressed_sparse_row_graph(edges_are_unsorted_t,
                               InputIterator edge_begin, InputIterator edge_end,
@@ -322,8 +318,6 @@ class compressed_sparse_row_graph<
                               const Distribution& dist,
                               const GraphProperty& prop = GraphProperty());
 
-#endif
-
   template<typename InputIterator>
   compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
                               vertices_size_type numverts,
@@ -706,7 +700,6 @@ edges(const BOOST_DISTRIB_CSR_GRAPH_TYPE& g)
 // -----------------------------------------------------------------
 // Graph constructors
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
 // Returns true if a vertex belongs to a process according to a distribution
 template <typename OwnerMap, typename ProcessId>
 struct local_vertex {
@@ -826,13 +819,10 @@ make_index_to_vertex_iterator(IndexIterator it, const Distribution& dist,
   return boost::make_transform_iterator(
     it, index_to_vertex_func<Distribution, Graph>(dist, g));
 }
-#endif
 
 // Forward declaration of csr_vertex_owner_map
 template<typename ProcessID, typename Key> class csr_vertex_owner_map;
 
-#ifdef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-
 template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
 template<typename InputIterator>
 BOOST_DISTRIB_CSR_GRAPH_TYPE::
@@ -1215,8 +1205,6 @@ compressed_sparse_row_graph(distributed_construct_inplace_from_sources_and_targe
   // TODO: set property on m_base?
 }
 
-#endif
-
 //
 // Old (untagged) ctors, these default to the unsorted sequential ctors
 //
@@ -1229,9 +1217,6 @@ compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
                             const GraphProperty& prop)
   : m_process_group(pg),
     m_distribution(parallel::block(m_process_group, numverts)),
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-    m_base(m_distribution.block_size(process_id(m_process_group), numverts))
-#else
     m_base(edges_are_unsorted_global,
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_begin, *this),
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_end, *this),
@@ -1240,28 +1225,8 @@ compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
            local_vertex<csr_vertex_owner_map<process_id_type, vertex_descriptor>, 
                         process_id_type> (get(vertex_owner, *this), process_id(pg)),
            prop)
-#endif    
            
 {
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-  parallel::block dist(m_process_group, numverts);
-
-  // Allows us to add edges
-  m_base.m_last_source = 0;
-
-  typename ProcessGroup::process_id_type id = process_id(m_process_group);
-
-  while (edge_begin != edge_end) {
-    vertex_descriptor src = edge_begin->first;
-    if (static_cast<process_id_type>(dist(src)) == id) {
-      vertex_descriptor tgt = 
-        make_vertex_descriptor(dist(edge_begin->second), 
-                               dist.local(edge_begin->second));
-      add_edge(dist.local(src), tgt, m_base);
-    }
-    ++edge_begin;
-  }
-#endif
 }
 
 template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1275,9 +1240,6 @@ compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
   : m_process_group(pg),
 
     m_distribution(parallel::block(m_process_group, numverts)),
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-    m_base(m_distribution.block_size(process_id(m_process_group), numverts))
-#else
     m_base(edges_are_unsorted_global,
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_begin, *this),
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_end, *this),
@@ -1287,28 +1249,7 @@ compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
            local_vertex<csr_vertex_owner_map<process_id_type, vertex_descriptor>, 
                         process_id_type> (get(vertex_owner, *this), process_id(pg)),
            prop)
-#endif
 {
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-  parallel::block dist(m_process_group, numverts);
-
-  // Allows us to add edges
-  m_base.m_last_source = 0;
-
-  typename ProcessGroup::process_id_type id = process_id(m_process_group);
-
-  while (edge_begin != edge_end) {
-    EdgeIndex src = edge_begin->first;
-    if (static_cast<process_id_type>(dist(src)) == id) {
-      EdgeIndex tgt = 
-        make_vertex_descriptor(dist(edge_begin->second), 
-                               dist.local(edge_begin->second));
-      add_edge(dist.local(src), tgt, *ep_iter, m_base);
-    }
-    ++edge_begin;
-    ++ep_iter;
-  }
-#endif
 }
 
 template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1321,9 +1262,6 @@ compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
                             const GraphProperty& prop)
   : m_process_group(pg),
     m_distribution(dist),
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-    m_base(dist.block_size(process_id(m_process_group), numverts))
-#else
     m_base(edges_are_unsorted_global,
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_begin, *this),
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_end, *this),
@@ -1332,27 +1270,7 @@ compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
            local_vertex<csr_vertex_owner_map<process_id_type, vertex_descriptor>, 
                         process_id_type> (get(vertex_owner, *this), process_id(pg)),
            prop)
-#endif
 {
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-  // Allows us to add edges
-  m_base.m_last_source = 0;
-
-  typename ProcessGroup::process_id_type id = process_id(m_process_group);
-
-  while (edge_begin != edge_end) {
-    vertex_descriptor src = edge_begin->first;
-    if (static_cast<process_id_type>(dist(src)) == id) {
-      vertex_descriptor tgt = 
-        make_vertex_descriptor(dist(edge_begin->second), 
-                               dist.local(edge_begin->second));
-      assert(get(vertex_owner, *this, tgt) == dist(edge_begin->second));
-      assert(get(vertex_local, *this, tgt) == dist.local(edge_begin->second));
-      add_edge(dist.local(src), tgt, m_base);
-    }
-    ++edge_begin;
-  }
-#endif
 }
 
 template<BOOST_DISTRIB_CSR_GRAPH_TEMPLATE_PARMS>
@@ -1367,9 +1285,6 @@ compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
                             const GraphProperty& prop)
   : m_process_group(pg),
     m_distribution(dist),
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-    m_base(dist.block_size(process_id(m_process_group), numverts))
-#else
     m_base(edges_are_unsorted_global,
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_begin, *this),
            index_to_vertex_iterator<InputIterator, BOOST_DISTRIB_CSR_GRAPH_TYPE>(edge_end, *this),
@@ -1378,26 +1293,7 @@ compressed_sparse_row_graph(InputIterator edge_begin, InputIterator edge_end,
            local_vertex<csr_vertex_owner_map<process_id_type, vertex_descriptor>, 
                         process_id_type> (get(vertex_owner, *this), process_id(pg)),
            prop)
-#endif
 {
-#ifndef BOOST_GRAPH_USE_NEW_CSR_INTERFACE
-  // Allows us to add edges
-  m_base.m_last_source = 0;
-
-  typename ProcessGroup::process_id_type id = process_id(m_process_group);
-
-  while (edge_begin != edge_end) {
-    EdgeIndex src = edge_begin->first;
-    if (static_cast<process_id_type>(dist(src)) == id) {
-      EdgeIndex tgt = 
-        make_vertex_descriptor(dist(edge_begin->second), 
-                               dist.local(edge_begin->second));
-      add_edge(dist.local(src), tgt, *ep_iter, m_base);
-    }
-    ++edge_begin;
-    ++ep_iter;
-  }
-#endif
 }
 
 // -----------------------------------------------------------------
index 95ee21f162172211ad9e6afebc0106c7f6fcac84..ef4923288493e1d1fd52f5b4858c75ba0bbdcb40 100644 (file)
@@ -28,6 +28,7 @@
 #include <queue>
 #include <stack>
 #include <boost/graph/distributed/detail/tag_allocator.hpp>
+#include <stdio.h>
 
 // #define PBGL_PROCESS_GROUP_DEBUG
 
diff --git a/deal.II/contrib/boost/include/boost/graph/distributed/one_bit_color_map.hpp b/deal.II/contrib/boost/include/boost/graph/distributed/one_bit_color_map.hpp
new file mode 100644 (file)
index 0000000..0a5704a
--- /dev/null
@@ -0,0 +1,116 @@
+// Copyright (C) 2006-2010 The Trustees of Indiana University.
+
+// 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)
+
+//  Authors: Douglas Gregor
+//           Jeremiah Willcock
+//           Andrew Lumsdaine
+
+// Distributed version of the one-bit color map
+#ifndef BOOST_DISTRIBUTED_ONE_BIT_COLOR_MAP_HPP
+#define BOOST_DISTRIBUTED_ONE_BIT_COLOR_MAP_HPP
+
+#ifndef BOOST_GRAPH_USE_MPI
+#error "Parallel BGL files should not be included unless <boost/graph/use_mpi.hpp> has been included"
+#endif
+
+#include <boost/graph/one_bit_color_map.hpp>
+#include <boost/property_map/parallel/distributed_property_map.hpp>
+#include <boost/property_map/parallel/local_property_map.hpp>
+
+namespace boost {
+
+template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
+class one_bit_color_map<local_property_map<ProcessGroup,GlobalMap,StorageMap> >
+  : public parallel::distributed_property_map<ProcessGroup, GlobalMap,
+                                              one_bit_color_map<StorageMap> >
+{
+  typedef one_bit_color_map<StorageMap> local_map;
+
+  typedef parallel::distributed_property_map<ProcessGroup, GlobalMap, 
+                                             local_map >
+    inherited;
+
+  typedef local_property_map<ProcessGroup, GlobalMap, StorageMap>
+    index_map_type;
+
+public:
+  one_bit_color_map(std::size_t inital_size, 
+                    const index_map_type& index = index_map_type())
+    : inherited(index.process_group(),  index.global(),
+                local_map(inital_size, index.base())) { }
+
+  inherited&       base()       { return *this; }
+  const inherited& base() const { return *this; }
+};
+
+template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
+inline one_bit_color_type
+get(one_bit_color_map<local_property_map<ProcessGroup,GlobalMap,StorageMap> >
+      const& pm,
+    typename property_traits<GlobalMap>::key_type key)
+{
+  return get(pm.base(), key);
+}
+
+template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
+inline void
+put(one_bit_color_map<local_property_map<ProcessGroup,GlobalMap,StorageMap> >
+      const& pm, 
+    typename property_traits<GlobalMap>::key_type key,
+    one_bit_color_type value)
+{
+  put(pm.base(), key, value);
+}
+
+template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
+class one_bit_color_map<parallel::distributed_property_map<
+                          ProcessGroup, GlobalMap, StorageMap> > 
+  : public parallel::distributed_property_map<
+             ProcessGroup, GlobalMap, one_bit_color_map<StorageMap> >
+{
+  typedef one_bit_color_map<StorageMap> local_map;
+
+  typedef parallel::distributed_property_map<ProcessGroup,GlobalMap,local_map>
+    inherited;
+
+  typedef parallel::distributed_property_map<ProcessGroup, GlobalMap,  
+                                             StorageMap>
+    index_map_type;
+
+public:
+  one_bit_color_map(std::size_t inital_size, 
+                    const index_map_type& index = index_map_type())
+    : inherited(index.process_group(),  index.global(),
+                local_map(inital_size, index.base())) { }
+
+  inherited&       base()       { return *this; }
+  const inherited& base() const { return *this; }
+};
+
+template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
+inline one_bit_color_type
+get(one_bit_color_map<
+      parallel::distributed_property_map<
+        ProcessGroup, GlobalMap, one_bit_color_map<StorageMap> > > const& pm,
+    typename property_traits<GlobalMap>::key_type key)
+{
+  return get(pm.base(), key);
+}
+
+template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
+inline void
+put(one_bit_color_map<
+      parallel::distributed_property_map<
+        ProcessGroup, GlobalMap, one_bit_color_map<StorageMap> > > const& pm, 
+    typename property_traits<GlobalMap>::key_type key,
+    one_bit_color_type value)
+{
+  put(pm.base(), key, value);
+}
+
+} // end namespace boost
+
+#endif // BOOST_DISTRIBUTED_ONE_BIT_COLOR_MAP_HPP
index eb8e29e3eac46bc3d47f14c597da336e7a05f2c5..d7ec6bdfe4fe07f233616d8d9286d2668a5ad55d 100644 (file)
@@ -50,7 +50,7 @@ template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
 inline two_bit_color_type
 get(two_bit_color_map<local_property_map<ProcessGroup,GlobalMap,StorageMap> >
       const& pm,
-    typename two_bit_color_map<GlobalMap>::key_type key)
+    typename property_traits<GlobalMap>::key_type key)
 {
   return get(pm.base(), key);
 }
@@ -59,7 +59,7 @@ template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
 inline void
 put(two_bit_color_map<local_property_map<ProcessGroup,GlobalMap,StorageMap> >
       const& pm, 
-    typename two_bit_color_map<GlobalMap>::key_type key,
+    typename property_traits<GlobalMap>::key_type key,
     two_bit_color_type value)
 {
   put(pm.base(), key, value);
@@ -95,7 +95,7 @@ inline two_bit_color_type
 get(two_bit_color_map<
       parallel::distributed_property_map<
         ProcessGroup, GlobalMap, two_bit_color_map<StorageMap> > > const& pm,
-    typename two_bit_color_map<GlobalMap>::key_type key)
+    typename property_traits<GlobalMap>::key_type key)
 {
   return get(pm.base(), key);
 }
@@ -105,7 +105,7 @@ inline void
 put(two_bit_color_map<
       parallel::distributed_property_map<
         ProcessGroup, GlobalMap, two_bit_color_map<StorageMap> > > const& pm, 
-    typename two_bit_color_map<GlobalMap>::key_type key,
+    typename property_traits<GlobalMap>::key_type key,
     two_bit_color_type value)
 {
   put(pm.base(), key, value);
diff --git a/deal.II/contrib/boost/include/boost/graph/dll_import_export.hpp b/deal.II/contrib/boost/include/boost/graph/dll_import_export.hpp
new file mode 100644 (file)
index 0000000..cc369d1
--- /dev/null
@@ -0,0 +1,30 @@
+//=======================================================================
+// Copyright 2001 University of Notre Dame.
+// Copyright 2003 Jeremy Siek
+// Authors: Lie-Quan Lee, Jeremy Siek, and Douglas Gregor
+//
+// 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)
+//=======================================================================
+
+#ifndef BOOST_GRAPH_DLL_IMPORT_EXPORT_HPP
+#define BOOST_GRAPH_DLL_IMPORT_EXPORT_HPP
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_HAS_DECLSPEC
+#  if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_GRAPH_DYN_LINK)
+#    ifdef BOOST_GRAPH_SOURCE
+#      define BOOST_GRAPH_DECL __declspec(dllexport)
+#    else
+#      define BOOST_GRAPH_DECL __declspec(dllimport)
+#    endif  // BOOST_GRAPH_SOURCE
+#  endif  // DYN_LINK
+#endif  // BOOST_HAS_DECLSPEC
+
+#ifndef BOOST_GRAPH_DECL
+#  define BOOST_GRAPH_DECL
+#endif
+
+#endif // BOOST_GRAPH_DLL_IMPORT_EXPORT_HPP
index cf0d310ef8333000be5bd6c0e79ee5628f22207e..0c19a4076f7dda4239997b2174446044f909c103 100644 (file)
@@ -236,7 +236,7 @@ namespace boost {
   lengauer_tarjan_dominator_tree_without_dfs
     (const Graph& g,
      const typename graph_traits<Graph>::vertex_descriptor& entry,
-     const IndexMap& indexMap,
+     const IndexMap& /*indexMap*/,
      TimeMap dfnumMap, PredMap parentMap, VertexVector& verticesByDFNum,
      DomTreePredMap domTreePredMap)
   {
index 94b634dff2a80c87dbe4894bd4e623047e087f7b..30b3433594e53fe4dca0c2cc9278f3b4cc0a631e 100644 (file)
@@ -13,6 +13,7 @@
 #include <boost/graph/graph_traits.hpp>
 #include <boost/graph/properties.hpp>
 #include <boost/graph/adjacency_iterator.hpp>
+#include <boost/graph/detail/set_adaptor.hpp>
 #include <boost/iterator/filter_iterator.hpp>
 
 namespace boost {
@@ -192,8 +193,6 @@ namespace boost {
     > edge_iterator;
     typedef typename Traits::edges_size_type           edges_size_type;
 
-    typedef typename ::boost::edge_property_type<Graph>::type   edge_property_type;
-    typedef typename ::boost::vertex_property_type<Graph>::type vertex_property_type;
     typedef filtered_graph_tag graph_tag;
 
 #ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
@@ -219,6 +218,22 @@ namespace boost {
     VertexPredicate m_vertex_pred;
   };
 
+  // Do not instantiate these unless needed
+  template <typename Graph, 
+            typename EdgePredicate,
+            typename VertexPredicate>
+  struct vertex_property_type<filtered_graph<Graph, EdgePredicate, VertexPredicate> > {
+    typedef typename vertex_property_type<Graph>::type type;
+  };
+
+  template <typename Graph, 
+            typename EdgePredicate,
+            typename VertexPredicate>
+  struct edge_property_type<filtered_graph<Graph, EdgePredicate, VertexPredicate> > {
+    typedef typename edge_property_type<Graph>::type type;
+  };
+
+
 #ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
   template<typename Graph, typename EdgePredicate, typename VertexPredicate>
   struct vertex_bundle_type<filtered_graph<Graph, EdgePredicate, 
index d57f13c1ec94c6e358d020759159205434194710..87c3453bf4719266123a852b3cb2cbdf2503823c 100644 (file)
@@ -159,7 +159,7 @@ namespace boost
     template <class VertexListGraph, class DistanceMatrix, 
       class WeightMap, class P, class T, class R>
     bool floyd_warshall_init_dispatch(const VertexListGraph& g, 
-      DistanceMatrix& d, WeightMap w
+      DistanceMatrix& d, WeightMap /*w*/
       const bgl_named_params<P, T, R>& params)
     {
       typedef typename property_traits<WeightMap>::value_type WM;
index 042d39e40fde1072eb2a26d4d731a971aa08c2ae..a4d702749e4ac1853905814d3dfde46c3da7b184 100644 (file)
@@ -83,7 +83,7 @@ struct mean_graph_distance_measure
 
 template <typename Graph, typename DistanceMap>
 inline mean_graph_distance_measure<Graph, typename property_traits<DistanceMap>::value_type>
-measure_graph_mean_geodesic(const Graph& g, DistanceMap dist)
+measure_graph_mean_geodesic(const Graph&, DistanceMap)
 {
     typedef typename property_traits<DistanceMap>::value_type T;
     return mean_graph_distance_measure<Graph, T>();
index 554ddbad46aeb9f68ee634288901573dae8d1618..fc4d9f0f93f8103e3cbda9cf8b7c8bc9f86facea 100644 (file)
@@ -17,6 +17,8 @@
 #include <boost/graph/isomorphism.hpp>
 #include <boost/graph/copy.hpp>
 #include <boost/graph/graph_utility.hpp> // for connects
+#include <boost/range.hpp>
+#include <boost/range/algorithm/find_if.hpp>
 
 
 // UNDER CONSTRUCTION 
@@ -151,7 +153,7 @@ namespace boost {
       typedef typename graph_traits<Graph>::vertex_iterator v_iter;
       std::pair<v_iter, v_iter> p = vertices(g);
       BOOST_CHECK(num_vertices(g) == vertex_set.size());
-      v_size_t n = std::distance(p.first, p.second);
+      v_size_t n = (size_t)std::distance(p.first, p.second);
       BOOST_CHECK(n == num_vertices(g));
       for (; p.first != p.second; ++p.first) {
         vertex_t v = *p.first;
@@ -171,7 +173,7 @@ namespace boost {
       BOOST_CHECK(m == num_edges(g));
       for (; p.first != p.second; ++p.first) {
         edge_t e = *p.first;
-        BOOST_CHECK(any_if(edge_set, connects(source(e, g), target(e, g), g)));
+        BOOST_CHECK(find_if(edge_set, connects(source(e, g), target(e, g), g)) != boost::end(edge_set));
         BOOST_CHECK(container_contains(vertex_set, source(e, g)) == true);
         BOOST_CHECK(container_contains(vertex_set, target(e, g)) == true);
       }
@@ -196,8 +198,8 @@ namespace boost {
         for (k = vertex_set.begin(); k != vertex_set.end(); ++k) {
           p = edge(*j, *k, g);
           if (p.second == true)
-            BOOST_CHECK(any_if(edge_set, 
-              connects(source(p.first, g), target(p.first, g), g)) == true);
+            BOOST_CHECK(find_if(edge_set, 
+              connects(source(p.first, g), target(p.first, g), g)) != boost::end(edge_set));
         }
     }
 
index b86ef0a8f887e2c62ad4fe7138a23bad492ef208..89687b5dd398dab2bbf086a29a6b1a1bac165f00 100644 (file)
@@ -181,6 +181,16 @@ namespace boost {
             >::value
         >
     { };
+
+    template <typename Graph>
+    struct is_adjacency_matrix
+        : mpl::bool_<
+            is_convertible<
+                typename graph_traits<Graph>::traversal_category,
+                adjacency_matrix_tag
+            >::value
+        >
+    { };
     //@}
 
     /** @name Directed Graph Traits
index f6256a0fe26906417cb53a513c60de37e453bad3..b4955b8875c9bf80ebe09767f5c6ff2bd856ac4c 100644 (file)
 #include <boost/lexical_cast.hpp>
 #include <boost/any.hpp>
 #include <boost/type_traits/is_convertible.hpp>
+#include <boost/graph/dll_import_export.hpp>
 #include <boost/graph/graphviz.hpp> // for exceptions
 #include <typeinfo>
 #include <boost/mpl/bool.hpp>
 #include <boost/mpl/vector.hpp>
 #include <boost/mpl/find.hpp>
 #include <boost/mpl/for_each.hpp>
-#if 0 // Change this back later
 #include <boost/property_tree/detail/xml_parser_utils.hpp>
-#endif
+#include <boost/throw_exception.hpp>
 #include <exception>
 #include <sstream>
 
 namespace boost
 {
 
-  // FIXME: Remove this once property_tree is stable
-  namespace graph_detail_from_property_tree {
-
-// ----------------------------------------------------------------------------
-// Copyright (C) 2002-2006 Marcin Kalicinski
-//
-// 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)
-//
-// For more information, see www.boost.org
-// ----------------------------------------------------------------------------
-
-    // Naively convert narrow string to another character type
-    template<class Ch>
-    std::basic_string<Ch> widen(const char *text)
-    {
-        std::basic_string<Ch> result;
-        while (*text)
-        {
-            result += Ch(*text);
-            ++text;
-        }
-        return result;
-    }
-
-    template<class Ch>
-    std::basic_string<Ch> encode_char_entities(const std::basic_string<Ch> &s)
-    {
-        typedef typename std::basic_string<Ch> Str;
-        Str r;
-        typename Str::const_iterator end = s.end();
-        for (typename Str::const_iterator it = s.begin(); it != end; ++it)
-        {
-            switch (*it)
-            {
-                case Ch('<'): r += boost::graph_detail_from_property_tree::widen<Ch>("&lt;"); break;
-                case Ch('>'): r += boost::graph_detail_from_property_tree::widen<Ch>("&gt;"); break;
-                case Ch('&'): r += boost::graph_detail_from_property_tree::widen<Ch>("&amp;"); break;
-                case Ch('"'): r += boost::graph_detail_from_property_tree::widen<Ch>("&quot;"); break;
-                case Ch('\''): r += boost::graph_detail_from_property_tree::widen<Ch>("&apos;"); break;
-                default: r += *it; break;
-            }
-        }
-        return r;
-    }
-    
-  }
-
 /////////////////////////////////////////////////////////////////////////////
 // Graph reader exceptions
 /////////////////////////////////////////////////////////////////////////////
@@ -151,12 +102,16 @@ class mutate_graph_impl : public mutate_graph
         }
         catch (bad_lexical_cast)
         {
-            throw parse_error("invalid value \"" + value + "\" for key " +
-                              name + " of type " + value_type);
+            BOOST_THROW_EXCEPTION(
+              parse_error("invalid value \"" + value + "\" for key " +
+                          name + " of type " + value_type));
         }
         if (!type_found)
-            throw  parse_error("unrecognized type \"" + value_type +
-                               "\" for key " + name);
+        {
+            BOOST_THROW_EXCEPTION(
+              parse_error("unrecognized type \"" + value_type +
+                          "\" for key " + name));
+        }
 
     }
 
@@ -172,12 +127,16 @@ class mutate_graph_impl : public mutate_graph
         }
         catch (bad_lexical_cast)
         {
-            throw parse_error("invalid value \"" + value + "\" for key " +
-                              name + " of type " + value_type);
+            BOOST_THROW_EXCEPTION(
+              parse_error("invalid value \"" + value + "\" for key " +
+                          name + " of type " + value_type));
         }
         if (!type_found)
-            throw  parse_error("unrecognized type \"" + value_type +
-                               "\" for key " + name);
+        {
+            BOOST_THROW_EXCEPTION(
+              parse_error("unrecognized type \"" + value_type +
+                          "\" for key " + name));
+        }
 
     }
 
@@ -193,12 +152,16 @@ class mutate_graph_impl : public mutate_graph
         }
         catch (bad_lexical_cast)
         {
-            throw parse_error("invalid value \"" + value + "\" for key " +
-                              name + " of type " + value_type);
+            BOOST_THROW_EXCEPTION(
+              parse_error("invalid value \"" + value + "\" for key " +
+                          name + " of type " + value_type));
         }
         if (!type_found)
-            throw  parse_error("unrecognized type \"" + value_type +
-                               "\" for key " + name);
+        {
+            BOOST_THROW_EXCEPTION(
+              parse_error("unrecognized type \"" + value_type +
+                          "\" for key " + name));
+        }
     }
 
     template <typename Key, typename ValueVector>
@@ -279,8 +242,7 @@ write_graphml(std::ostream& out, const Graph& g, VertexIndexMap vertex_index,
     typedef typename graph_traits<Graph>::edge_descriptor edge_descriptor;
     typedef typename graph_traits<Graph>::vertex_descriptor vertex_descriptor;
 
-    // using boost::property_tree::xml_parser::encode_char_entities;
-    using boost::graph_detail_from_property_tree::encode_char_entities;
+    using boost::property_tree::xml_parser::encode_char_entities;
 
     BOOST_STATIC_CONSTANT(bool,
                           graph_is_directed =
index c1f87375bed780606df67c76e52089365df390f2..a41116d00b848912476b2c38d7c33fa51683e557 100644 (file)
 #include <boost/graph/adjacency_list.hpp>
 #include <boost/property_map/dynamic_property_map.hpp>
 #include <boost/graph/overloading.hpp>
-
-#ifdef BOOST_HAS_DECLSPEC
-#  if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_GRAPH_DYN_LINK)
-#    ifdef BOOST_GRAPH_SOURCE
-#      define BOOST_GRAPH_DECL __declspec(dllexport)
-#    else
-#      define BOOST_GRAPH_DECL __declspec(dllimport)
-#    endif  // BOOST_GRAPH_SOURCE
-#  endif  // DYN_LINK
-#endif  // BOOST_HAS_DECLSPEC
-
-#ifndef BOOST_GRAPH_DECL
-#  define BOOST_GRAPH_DECL
-#endif
+#include <boost/graph/dll_import_export.hpp>
+#include <boost/spirit/include/classic_multi_pass.hpp>
 
 namespace boost {
 
@@ -784,10 +772,51 @@ class mutate_graph_impl : public mutate_graph
   std::map<edge_t, bgl_edge_t> bgl_edges;
 };
 
-BOOST_GRAPH_DECL
-bool read_graphviz(std::istream& in, mutate_graph& graph);
+} } } // end namespace boost::detail::graph
+
+#ifdef BOOST_GRAPH_USE_SPIRIT_PARSER
+#  ifndef BOOST_GRAPH_READ_GRAPHVIZ_ITERATORS
+#    define BOOST_GRAPH_READ_GRAPHVIZ_ITERATORS
+#  endif
+#  include <boost/graph/detail/read_graphviz_spirit.hpp>
+#else // New default parser
+#  include <boost/graph/detail/read_graphviz_new.hpp>
+#endif // BOOST_GRAPH_USE_SPIRIT_PARSER
+
+namespace boost {
+
+// Parse the passed string as a GraphViz dot file.
+template <typename MutableGraph>
+bool read_graphviz(const std::string& data,
+                   MutableGraph& graph,
+                   dynamic_properties& dp,
+                   std::string const& node_id = "node_id") {
+#ifdef BOOST_GRAPH_USE_SPIRIT_PARSER
+  return read_graphviz_spirit(data.begin(), data.end(), graph, dp, node_id);
+#else // Non-Spirit parser
+  return read_graphviz_new(data,graph,dp,node_id);
+#endif
+}
+
+// Parse the passed iterator range as a GraphViz dot file.
+template <typename InputIterator, typename MutableGraph>
+bool read_graphviz(InputIterator user_first,
+                   InputIterator user_last,
+                   MutableGraph& graph,
+                   dynamic_properties& dp,
+                   std::string const& node_id = "node_id") {
+#ifdef BOOST_GRAPH_USE_SPIRIT_PARSER
+  typedef InputIterator is_t;
+  typedef boost::spirit::classic::multi_pass<is_t> iterator_t;
 
-} } // end namespace detail::graph
+  iterator_t first(boost::spirit::classic::make_multi_pass(user_first));
+  iterator_t last(boost::spirit::classic::make_multi_pass(user_last));
+
+  return read_graphviz_spirit(first, last, graph, dp, node_id);
+#else // Non-Spirit parser
+  return read_graphviz_new(std::string(user_first, user_last), graph, dp, node_id);
+#endif
+}
 
 // Parse the passed stream as a GraphViz dot file.
 template <typename MutableGraph>
@@ -795,25 +824,13 @@ bool read_graphviz(std::istream& in, MutableGraph& graph,
                    dynamic_properties& dp,
                    std::string const& node_id = "node_id")
 {
-  std::string data;
+  typedef std::istream_iterator<char> is_t;
   in >> std::noskipws;
-  std::copy(std::istream_iterator<char>(in),
-            std::istream_iterator<char>(),
-            std::back_inserter(data));
-  return read_graphviz(data,graph,dp,node_id);
+  return read_graphviz(is_t(in), is_t(), graph, dp, node_id);
 }
 
 } // namespace boost
 
-#ifdef BOOST_GRAPH_USE_SPIRIT_PARSER
-#  ifndef BOOST_GRAPH_READ_GRAPHVIZ_ITERATORS
-#    define BOOST_GRAPH_READ_GRAPHVIZ_ITERATORS
-#  endif
-#  include <boost/graph/detail/read_graphviz_spirit.hpp>
-#else // New default parser
-#  include <boost/graph/detail/read_graphviz_new.hpp>
-#endif // BOOST_GRAPH_USE_SPIRIT_PARSER
-
 #ifdef BOOST_GRAPH_USE_MPI
 #  include <boost/graph/distributed/graphviz.hpp>
 #endif
index 27cc256b25c25868424b9dfe1d526f97631ae5f2..bda68d5161e83d8c137aaaab7b451887603eb9da 100644 (file)
@@ -208,7 +208,7 @@ namespace boost {
       const Graph* m_graph;
     };
 
-  }; // namespace detail
+  } // namespace detail
 
   //===========
   // Grid Graph
index ed5e0509e3854df2e724e27e02e62a18eb4722f9..b16a01f68fc1e673cae72f07fe034337b6211e12 100644 (file)
@@ -16,6 +16,7 @@
 // http://springerlink.metapress.com/link.asp?id=pcu07ew5rhexp9yt
 
 #include <boost/config/no_tr1/cmath.hpp>
+#include <boost/throw_exception.hpp>
 #include <vector>
 #include <exception>
 #include <algorithm>
@@ -72,7 +73,7 @@ struct update_position_visitor {
 #endif
 
     if (get(node_distance, v) > distance_limit)
-      throw over_distance_limit();
+      BOOST_THROW_EXCEPTION(over_distance_limit());
     Point old_position = get(position_map, v);
     double distance = get(node_distance, v);
     double fraction = 
index 709499ff02ae998bf9199ba6994d4c83d90e2799..119499a3845cd96b80635a2bac41263835815a0d 100644 (file)
@@ -173,8 +173,8 @@ namespace boost {
       virtual ~mcr_howard() {}
 
     protected:
-      virtual void store_critical_edge(edge_t ed, critical_cycle_t &cc) {}
-      virtual void store_critical_cycle(critical_cycle_t &cc) {}
+      virtual void store_critical_edge(edge_t, critical_cycle_t &) {}
+      virtual void store_critical_cycle(critical_cycle_t &) {}
 
     private:
       /*!
@@ -216,10 +216,10 @@ namespace boost {
             tie(oei, oeie) = out_edges(*vi, m_g);
             typename graph_traits<Graph>::out_edge_iterator mei =
               std::max_element(oei, oeie,
-                               bind(m_cmp,
-                                    bind(&EdgeWeight1::operator[], m_ew1m, _1),
-                                    bind(&EdgeWeight1::operator[], m_ew1m, _2)
-                                    )
+                               boost::bind(m_cmp,
+                                           boost::bind(&EdgeWeight1::operator[], m_ew1m, _1),
+                                           boost::bind(&EdgeWeight1::operator[], m_ew1m, _2)
+                                          )
                                );
             if (mei == oeie)
               {
@@ -334,10 +334,10 @@ namespace boost {
         tie(uv_itr, vie) = vertices(m_g);
         float_t mcr = m_bound;
         while ( (uv_itr = std::find_if(uv_itr, vie,
-                                       bind(std::equal_to<my_color_type>(),
-                                            my_white,
-                                            bind(&color_map_t::operator[], vcm_, _1)
-                                            )
+                                       boost::bind(std::equal_to<my_color_type>(),
+                                                   my_white,
+                                                   boost::bind(&color_map_t::operator[], vcm_, _1)
+                                                   )
                                        )
                  ) != vie )
           ///While there are undiscovered vertices
index 1377e3e9e84483d1cec8ab270e68b5d965716c97..6b7c3905485171cdc837e70564561c3ccb2d975d 100644 (file)
@@ -100,7 +100,7 @@ namespace boost
             >
   bool is_straight_line_drawing(const Graph& g, 
                                 GridPositionMap drawing, 
-                                VertexIndexMap vm
+                                VertexIndexMap
                                 )
   {
 
index 29f6ef2c58e72b859218ba0b71030a52fe507581..9461dc31e50c5a2b8b5a16e9e99a903d784cd37c 100644 (file)
@@ -90,7 +90,7 @@ namespace boost {
         void discover_vertex(vertex1_t v, const Graph1&) const {
           vertices.push_back(v);
         }
-        void examine_edge(edge1_t e, const Graph1& G1) const {
+        void examine_edge(edge1_t e, const Graph1&) const {
           edges.push_back(e);
         }
         std::vector<vertex1_t>& vertices;
index 328bd3034175bdfad19c7f3ec47372368138f9de..f98a5721a206b95f24cbd164b74eac8adc9d94ca 100644 (file)
@@ -46,6 +46,7 @@
 #include <boost/none_t.hpp>
 #include <boost/graph/graph_concepts.hpp>
 #include <boost/graph/named_function_params.hpp>
+#include <boost/graph/lookup_edge.hpp>
 
 namespace boost {
   namespace detail {
@@ -161,7 +162,7 @@ namespace boost {
               }
               edge_descriptor to_sink;
               bool is_there;
-              tie(to_sink, is_there) = edge(current_node, m_sink, m_g);
+              tie(to_sink, is_there) = lookup_edge(current_node, m_sink, m_g);
               if(is_there){
                 tEdgeVal cap_from_source = m_res_cap_map[from_source];
                 tEdgeVal cap_to_sink = m_res_cap_map[to_sink];
index c7f40260eb996e6b1d5870d031245dab77838b86..d91c5983dfa30fd768d881fda14452b7d693ab94 100644 (file)
@@ -72,7 +72,6 @@ namespace graph_detail {
     struct generate_label_map<multimapS, Label, Vertex>
     { typedef std::multimap<Label, Vertex> type; };
 
-#if !defined BOOST_NO_HASH
     template <typename Label, typename Vertex>
     struct generate_label_map<hash_mapS, Label, Vertex>
     { typedef boost::unordered_map<Label, Vertex> type; };
@@ -80,7 +79,7 @@ namespace graph_detail {
     template <typename Label, typename Vertex>
     struct generate_label_map<hash_multimapS, Label, Vertex>
     { typedef boost::unordered_multimap<Label, Vertex> type; };
-#endif
+
     template <typename Selector, typename Label, typename Vertex>
     struct choose_custom_map {
         typedef typename generate_label_map<Selector, Label, Vertex>::type type;
@@ -141,7 +140,7 @@ namespace graph_detail {
     // Tag dispatch on unique associative containers (i.e. maps).
     template <typename Container, typename Graph, typename Label, typename Prop>
     std::pair<typename graph_traits<Graph>::vertex_descriptor, bool>
-    insert_labeled_vertex(Container& c, Graph& g, Label const& l, Prop const& p,
+    insert_labeled_vertex(Container& c, Graph& g, Label const& l, Prop const&,
                           unique_associative_container_tag)
     {
         // Here, we actually have to try the insertion first, and only add
diff --git a/deal.II/contrib/boost/include/boost/graph/lookup_edge.hpp b/deal.II/contrib/boost/include/boost/graph/lookup_edge.hpp
new file mode 100644 (file)
index 0000000..f8ea89e
--- /dev/null
@@ -0,0 +1,50 @@
+//=======================================================================
+// Copyright 2009 Trustees of Indiana University
+// Author: Jeremiah Willcock
+//
+// 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)
+//=======================================================================
+
+#ifndef BOOST_GRAPH_LOOKUP_EDGE_HPP
+#define BOOST_GRAPH_LOOKUP_EDGE_HPP
+
+#include <utility>
+#include <boost/config.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/graph/graph_traits.hpp>
+
+// lookup_edge: a function that acts like edge() but falls back to out_edges()
+// and a search when edge() is not provided.
+
+namespace boost {
+
+  template <typename Graph>
+  std::pair<typename boost::graph_traits<Graph>::edge_descriptor, bool>
+  lookup_edge(typename boost::graph_traits<Graph>::vertex_descriptor src,
+              typename boost::graph_traits<Graph>::vertex_descriptor tgt,
+              const Graph& g,
+              typename boost::enable_if<is_adjacency_matrix<Graph>, int>::type = 0) {
+    return edge(src, tgt, g);
+  }
+
+  template <typename Graph>
+  std::pair<typename boost::graph_traits<Graph>::edge_descriptor, bool>
+  lookup_edge(typename boost::graph_traits<Graph>::vertex_descriptor src,
+              typename boost::graph_traits<Graph>::vertex_descriptor tgt,
+              const Graph& g,
+              typename boost::disable_if<is_adjacency_matrix<Graph>, int>::type = 0) {
+    typedef typename boost::graph_traits<Graph>::out_edge_iterator it;
+    typedef typename boost::graph_traits<Graph>::edge_descriptor edesc;
+    std::pair<it, it> oe = out_edges(src, g);
+    for (; oe.first != oe.second; ++oe.first) {
+      edesc e = *oe.first;
+      if (target(e, g) == tgt) return std::make_pair(e, true);
+    }
+    return std::make_pair(edesc(), false);
+  }
+
+}
+
+#endif // BOOST_GRAPH_LOOKUP_EDGE_HPP
index ef9ed9e4f2a64c04ba22d1199feced89a3cead5a..1f0f6de20770e024a735b9624ebe8e1d3b128533 100644 (file)
@@ -67,7 +67,7 @@ namespace boost
 
 
   template <typename Graph, typename MateMap, typename VertexIndexMap>
-  bool is_a_matching(const Graph& g, MateMap mate, VertexIndexMap vm)
+  bool is_a_matching(const Graph& g, MateMap mate, VertexIndexMap)
   {
     typedef typename graph_traits<Graph>::vertex_descriptor
       vertex_descriptor_t;
@@ -106,13 +106,13 @@ namespace boost
             typename VertexIndexMap = dummy_property_map>
   struct no_augmenting_path_finder
   {
-    no_augmenting_path_finder(const Graph& g, MateMap mate, VertexIndexMap vm)
+    no_augmenting_path_finder(const Graph&, MateMap, VertexIndexMap)
     { }
 
     inline bool augment_matching() { return false; }
 
     template <typename PropertyMap>
-    void get_current_matching(PropertyMap p) {}
+    void get_current_matching(PropertyMap) {}
   };
 
 
@@ -673,13 +673,13 @@ namespace boost
       }
       
       template <class Vertex, class Graph>
-      void start_vertex(Vertex v, Graph&) 
+      void start_vertex(Vertex, Graph&) 
       {
         m_parity = false; 
       }
       
       template <class Vertex, class Graph>
-      void discover_vertex(Vertex u, Graph&) 
+      void discover_vertex(Vertex, Graph&) 
       {
         m_parity = !m_parity;
         m_parity ? ++m_count : --m_count;
@@ -703,7 +703,7 @@ namespace boost
   struct no_matching_verifier
   {
     inline static bool 
-    verify_matching(const Graph& g, MateMap mate, VertexIndexMap vm
+    verify_matching(const Graph&, MateMap, VertexIndexMap
     { return true;}
   };
   
index 25db09caca34d69bb10857d36ec9dcb9d712ed09..51eea889bacf876655c9c53d6ef5079b4724612e 100644 (file)
@@ -89,7 +89,7 @@ namespace boost {
   
     template <typename ItemFirst,
               typename ItemSecond>
-    bool operator()(const ItemFirst& item1, const ItemSecond& item2) {
+    bool operator()(const ItemFirst&, const ItemSecond&) {
       return (true);
     }
   };
@@ -113,7 +113,7 @@ namespace boost {
     (const GraphFirst& graph1,
      const GraphSecond& graph2,
      CorrespondenceMapFirstToSecond correspondence_map_1_to_2,
-     CorrespondenceMapSecondToFirst correspondence_map_2_to_1,
+     CorrespondenceMapSecondToFirst /*correspondence_map_2_to_1*/,
      typename graph_traits<GraphFirst>::vertices_size_type subgraph_size,
      typename graph_traits<GraphFirst>::vertex_descriptor new_vertex1,
      typename graph_traits<GraphSecond>::vertex_descriptor new_vertex2,
index ff257ab7aca14f541cb7b8ec662dde197109b194..02709539e7788a935c7e348f574f47a85d367c19 100644 (file)
@@ -34,7 +34,8 @@
 #include <boost/graph/graph_as_tree.hpp>
 #include <boost/graph/adjacency_list.hpp>
 #include <boost/graph/prim_minimum_spanning_tree.hpp>
-
+#include <boost/graph/lookup_edge.hpp>
+#include <boost/throw_exception.hpp>
 
 namespace boost
 {
@@ -68,11 +69,11 @@ namespace boost
 
         PreorderTraverser(std::vector<Node>& p) : path_(p) {}
 
-        void preorder(Node n, const Tree& t)
+        void preorder(Node n, const Tree&)
         { path_.push_back(n); }
 
-        void inorder(Node n, const Tree& t) const {}
-        void postorder(Node, const Tree& t) const {}
+        void inorder(Node, const Tree&) const {}
+        void postorder(Node, const Tree&) const {}
 
         const_iterator begin() const { return path_.begin(); }
         const_iterator end() const { return path_.end(); }
@@ -241,7 +242,7 @@ namespace boost
         { }
 
         template <typename Vertex, typename Graph>
-        void visit_vertex(Vertex v, const Graph& g)
+        void visit_vertex(Vertex v, const Graph&)
         {
             BOOST_CONCEPT_ASSERT((OutputIterator<OutItr, Vertex>));
             *itr_++ = v;
@@ -284,9 +285,9 @@ namespace boost
                 // would require revisiting the core algorithm.
                 Edge e;
                 bool found;
-                tie(e, found) = edge(previous_, v, g);
+                tie(e, found) = lookup_edge(previous_, v, g);
                 if(!found) {
-                    throw not_complete();
+                    BOOST_THROW_EXCEPTION(not_complete());
                 }
 
                 tourlen_ += wmap_[e];
index 1e2647c6a3f38c921f7b3e2f97d202fe33fcd16f..42c5ef87d03ea297d0ca7441e17ed94154732e18 100644 (file)
@@ -383,13 +383,13 @@ BOOST_BGL_DECLARE_NAMED_PARAMS
     template <typename ArgType, typename Prop, typename Graph, bool Exists>
     struct override_const_property_t {
       typedef ArgType result_type;
-      result_type operator()(const Graph& g, const typename boost::add_reference<ArgType>::type a) const {return a;}
+      result_type operator()(const Graph&, const typename boost::add_reference<ArgType>::type a) const {return a;}
     };
 
     template <typename ArgType, typename Prop, typename Graph>
     struct override_const_property_t<ArgType, Prop, Graph, false> {
       typedef typename boost::property_map<Graph, Prop>::const_type result_type;
-      result_type operator()(const Graph& g, const ArgType& a) const {return get(Prop(), g);}
+      result_type operator()(const Graph& g, const ArgType&) const {return get(Prop(), g);}
     };
 
     template <typename ArgPack, typename Tag, typename Prop, typename Graph>
@@ -399,7 +399,7 @@ BOOST_BGL_DECLARE_NAMED_PARAMS
                Graph,
                boost::detail::parameter_exists<ArgPack, Tag>::value
              >::result_type
-    override_const_property(const ArgPack& ap, const boost::parameter::keyword<Tag>& t, const Graph& g, Prop prop) {
+    override_const_property(const ArgPack& ap, const boost::parameter::keyword<Tag>& t, const Graph& g, Prop) {
     return override_const_property_t<
              typename boost::parameter::value_type<ArgPack, Tag, int>::type,
              Prop,
diff --git a/deal.II/contrib/boost/include/boost/graph/one_bit_color_map.hpp b/deal.II/contrib/boost/include/boost/graph/one_bit_color_map.hpp
new file mode 100644 (file)
index 0000000..95a9604
--- /dev/null
@@ -0,0 +1,103 @@
+// Copyright (C) 2005-2010 The Trustees of Indiana University.
+
+// 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)
+
+//  Authors: Jeremiah Willcock
+//           Douglas Gregor
+//           Andrew Lumsdaine
+
+// One bit per color property map (gray and black are the same, green is not
+// supported)
+
+#ifndef BOOST_ONE_BIT_COLOR_MAP_HPP
+#define BOOST_ONE_BIT_COLOR_MAP_HPP
+
+#include <boost/property_map/property_map.hpp>
+#include <boost/graph/properties.hpp>
+#include <boost/shared_array.hpp>
+#include <boost/config.hpp>
+#include <algorithm>
+#include <limits>
+
+namespace boost {
+
+enum one_bit_color_type { 
+  one_bit_white     = 0, 
+  one_bit_not_white  = 1
+};
+
+template <>
+struct color_traits<one_bit_color_type>
+{
+  static one_bit_color_type white() { return one_bit_white; }
+  static one_bit_color_type gray()  { return one_bit_not_white; }
+  static one_bit_color_type black() { return one_bit_not_white; }
+};
+
+
+template<typename IndexMap = identity_property_map>
+struct one_bit_color_map 
+{
+  BOOST_STATIC_CONSTANT(int, bits_per_char = std::numeric_limits<unsigned char>::digits);
+  std::size_t n;
+  IndexMap index;
+  shared_array<unsigned char> data;
+
+  typedef typename property_traits<IndexMap>::key_type key_type;
+  typedef one_bit_color_type value_type;
+  typedef void reference;
+  typedef read_write_property_map_tag category;
+
+  explicit one_bit_color_map(std::size_t n, const IndexMap& index = IndexMap())
+    : n(n), index(index), data(new unsigned char[(n + bits_per_char - 1) / bits_per_char])
+  {
+    // Fill to white
+    std::fill(data.get(), data.get() + (n + bits_per_char - 1) / bits_per_char, 0);
+  }
+};
+
+template<typename IndexMap>
+inline one_bit_color_type
+get(const one_bit_color_map<IndexMap>& pm, 
+    typename property_traits<IndexMap>::key_type key) 
+{
+  BOOST_STATIC_CONSTANT(int, bits_per_char = one_bit_color_map<IndexMap>::bits_per_char);
+  typename property_traits<IndexMap>::value_type i = get(pm.index, key);
+  assert ((std::size_t)i < pm.n);
+  return one_bit_color_type((pm.data.get()[i / bits_per_char] >> (i % bits_per_char)) & 1);
+}
+
+template<typename IndexMap>
+inline void
+put(const one_bit_color_map<IndexMap>& pm, 
+    typename property_traits<IndexMap>::key_type key,
+    one_bit_color_type value)
+{
+  BOOST_STATIC_CONSTANT(int, bits_per_char = one_bit_color_map<IndexMap>::bits_per_char);
+  typename property_traits<IndexMap>::value_type i = get(pm.index, key);
+  assert ((std::size_t)i < pm.n);
+  assert (value >= 0 && value < 2);
+  std::size_t byte_num = i / bits_per_char;
+  std::size_t bit_position = (i % bits_per_char);
+    pm.data.get()[byte_num] =
+      (unsigned char)
+        ((pm.data.get()[byte_num] & ~(1 << bit_position))
+         | (value << bit_position));
+}
+
+template<typename IndexMap>
+inline one_bit_color_map<IndexMap>
+make_one_bit_color_map(std::size_t n, const IndexMap& index_map)
+{
+  return one_bit_color_map<IndexMap>(n, index_map);
+}
+
+} // end namespace boost
+
+#endif // BOOST_ONE_BIT_COLOR_MAP_HPP
+
+#ifdef BOOST_GRAPH_USE_MPI
+#  include <boost/graph/distributed/one_bit_color_map.hpp>
+#endif
index 041a55003c45c03278e1c3623d2d37667bd22edb..ee31c85ec9ee2c39a2f0eabf3e192561d8d52be2 100644 (file)
@@ -104,7 +104,7 @@ namespace boost
     }
     
     template <typename Vertex, typename Graph>
-    void finish_vertex(const Vertex& u, Graph& g)
+    void finish_vertex(const Vertex& u, Graph&)
     {
       typedef typename graph_traits<Graph>::vertices_size_type v_size_t;
 
@@ -889,7 +889,7 @@ namespace boost
     }          
 
 
-    void add_to_merge_points(vertex_t v, graph::detail::no_old_handles) {}
+    void add_to_merge_points(vertex_t, graph::detail::no_old_handles) {}
 
     void add_to_merge_points(vertex_t v, graph::detail::store_old_handles)
     {
@@ -897,7 +897,7 @@ namespace boost
     }
 
     
-    void add_to_embedded_edges(edge_t e, graph::detail::no_old_handles) {}
+    void add_to_embedded_edges(edge_t, graph::detail::no_old_handles) {}
 
     void add_to_embedded_edges(edge_t e, graph::detail::store_old_handles)
     {
index 6f392c49a3d5d4098c6240b4fead411cc7fd768d..2f8a2ee33ae52e209f1fa89bbd575e24908caa8f 100644 (file)
@@ -29,11 +29,11 @@ namespace boost
     {}
 
     template <typename Edge>
-    void next_edge(Edge e)
+    void next_edge(Edge)
     {}
 
     template <typename Vertex>
-    void next_vertex(Vertex v)
+    void next_vertex(Vertex)
     {}
 
     void end_face()
index 3a313b17ba6ab472a5ffa9f9c062adeac89e0b7a..3245962453cc9c6113c342d0fd6bfd5e0d834e68 100644 (file)
@@ -175,10 +175,22 @@ namespace boost {
 
   namespace detail {
 
+    template <typename A> struct return_void {typedef void type;};
+
+    template <typename Graph, typename Enable = void>
+    struct graph_tag_or_void {
+      typedef void type;
+    };
+
+    template <typename Graph>
+    struct graph_tag_or_void<Graph, typename return_void<typename Graph::graph_tag>::type> {
+      typedef typename Graph::graph_tag type;
+    };
+
     template <class Graph, class PropertyTag>
     struct edge_property_map {
-      typedef typename Graph::edge_property_type Property;
-      typedef typename Graph::graph_tag graph_tag;
+      typedef typename edge_property_type<Graph>::type Property;
+      typedef typename graph_tag_or_void<Graph>::type graph_tag;
       typedef typename edge_property_selector<graph_tag>::type Selector;
       typedef typename Selector::template bind_<Graph,Property,PropertyTag>
         Bind;
@@ -187,8 +199,8 @@ namespace boost {
     };
     template <class Graph, class PropertyTag>
     class vertex_property_map {
-      typedef typename Graph::vertex_property_type Property;
-      typedef typename Graph::graph_tag graph_tag;
+      typedef typename vertex_property_type<Graph>::type Property;
+      typedef typename graph_tag_or_void<Graph>::type graph_tag;
       typedef typename vertex_property_selector<graph_tag>::type Selector;
       typedef typename Selector::template bind_<Graph,Property,PropertyTag>
         Bind;
index 9f7f0394e75544357c06b7570a93855d59fe0b0d..dd2461e7edea9cd3927997c4438ab8a63c4a198b 100644 (file)
@@ -43,7 +43,7 @@ struct constant_property_map
         : m_value(copy.m_value)
     { }
 
-    inline reference operator [](const key_type& v) const
+    inline reference operator [](const key_type&) const
     { return m_value; }
 
     value_type m_value;
index 22cdad850051b6562ac45135cbc09b9345dd2a67..b1bd75742ca61023cae0d94e14d2cd7413973815 100644 (file)
@@ -162,7 +162,7 @@ template<class Graph,
 void r_c_shortest_paths_dispatch
 ( const Graph& g, 
   const VertexIndexMap& vertex_index_map, 
-  const EdgeIndexMap& edge_index_map
+  const EdgeIndexMap& /*edge_index_map*/
   typename graph_traits<Graph>::vertex_descriptor s, 
   typename graph_traits<Graph>::vertex_descriptor t, 
   // each inner vector corresponds to a pareto-optimal path
@@ -179,7 +179,7 @@ void r_c_shortest_paths_dispatch
   Resource_Extension_Function& ref, 
   Dominance_Function& dominance, 
   // to specify the memory management strategy for the labels
-  Label_Allocator la
+  Label_Allocator /*la*/
   Visitor vis )
 {
   pareto_optimal_resource_containers.clear();
@@ -449,15 +449,15 @@ void r_c_shortest_paths_dispatch
 struct default_r_c_shortest_paths_visitor
 {
   template<class Label, class Graph>
-  void on_label_popped( const Label& l, const Graph& g ) {}
+  void on_label_popped( const Label&, const Graph& ) {}
   template<class Label, class Graph>
-  void on_label_feasible( const Label& l, const Graph& g ) {}
+  void on_label_feasible( const Label&, const Graph& ) {}
   template<class Label, class Graph>
-  void on_label_not_feasible( const Label& l, const Graph& g ) {}
+  void on_label_not_feasible( const Label&, const Graph& ) {}
   template<class Label, class Graph>
-  void on_label_dominated( const Label& l, const Graph& g ) {}
+  void on_label_dominated( const Label&, const Graph& ) {}
   template<class Label, class Graph>
-  void on_label_not_dominated( const Label& l, const Graph& g ) {}
+  void on_label_not_dominated( const Label&, const Graph& ) {}
 }; // default_r_c_shortest_paths_visitor
 
 
index 8fbd6364b811b90ac41507246cf3bf23d20508f8..3a81c2940ed4b5c0a047521e1a412db8be7a712c 100644 (file)
@@ -9,6 +9,8 @@
 #include <boost/graph/adjacency_iterator.hpp>
 #include <boost/graph/properties.hpp>
 #include <boost/tuple/tuple.hpp>
+#include <boost/type_traits.hpp>
+#include <boost/mpl/if.hpp>
 
 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
 // Stay out of the way of the concept checking class
@@ -75,11 +77,6 @@ class reverse_graph {
     typedef typename Traits::vertices_size_type vertices_size_type;
     typedef typename Traits::edges_size_type edges_size_type;
 
-    // More typedefs used by detail::edge_property_map, vertex_property_map
-    typedef typename boost::edge_property_type<BidirectionalGraph>::type
-      edge_property_type;
-    typedef typename boost::vertex_property_type<BidirectionalGraph>::type
-      vertex_property_type;
     typedef reverse_graph_tag graph_tag;
 
 #ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
@@ -105,6 +102,18 @@ class reverse_graph {
     GraphRef m_g;
 };
 
+
+// These are separate so they are not instantiated unless used (see bug 1021)
+template <class BidirectionalGraph, class GraphRef>
+struct vertex_property_type<reverse_graph<BidirectionalGraph, GraphRef> > {
+  typedef typename boost::vertex_property_type<BidirectionalGraph>::type type;
+};
+
+template <class BidirectionalGraph, class GraphRef>
+struct edge_property_type<reverse_graph<BidirectionalGraph, GraphRef> > {
+  typedef typename boost::edge_property_type<BidirectionalGraph>::type type;
+};
+
 #ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES
   template<typename Graph, typename GraphRef>
   struct vertex_bundle_type<reverse_graph<Graph, GraphRef> > 
@@ -176,6 +185,14 @@ out_degree(const typename graph_traits<BidirectionalGraph>::vertex_descriptor u,
     return in_degree(u, g.m_g);
 }
 
+template <class BidirectionalGraph, class GRef>
+inline typename graph_traits<BidirectionalGraph>::vertex_descriptor
+vertex(const typename graph_traits<BidirectionalGraph>::vertices_size_type v,
+       const reverse_graph<BidirectionalGraph,GRef>& g)
+{
+    return vertex(v, g.m_g);
+}
+
 template <class BidirectionalGraph, class GRef>
 inline std::pair<typename graph_traits<BidirectionalGraph>::edge_descriptor, 
                  bool>
@@ -267,14 +284,14 @@ struct edge_property_selector<reverse_graph_tag> {
 };
 
 template <class BidirGraph, class GRef, class Property>
-typename property_map<BidirGraph, Property>::type
+typename property_map<reverse_graph<BidirGraph,GRef>, Property>::type
 get(Property p, reverse_graph<BidirGraph,GRef>& g)
 {
   return get(p, g.m_g);
 }
 
 template <class BidirGraph, class GRef, class Property>
-typename property_map<BidirGraph, Property>::const_type
+typename property_map<reverse_graph<BidirGraph,GRef>, Property>::const_type
 get(Property p, const reverse_graph<BidirGraph,GRef>& g)
 {
   const BidirGraph& gref = g.m_g; // in case GRef is non-const
@@ -309,7 +326,10 @@ set_property(const reverse_graph<BidirectionalGraph,GRef>& g, Tag tag,
 
 template<typename BidirectionalGraph, typename GRef, typename Tag>
 inline
-typename graph_property<BidirectionalGraph, Tag>::type
+typename boost::mpl::if_<
+           boost::is_const<typename boost::remove_reference<GRef>::type>,
+           const typename graph_property<BidirectionalGraph, Tag>::type&,
+           typename graph_property<BidirectionalGraph, Tag>::type& >::type
 get_property(const reverse_graph<BidirectionalGraph,GRef>& g, Tag tag)
 {
   return get_property(g.m_g, tag);
index ba2405f1fdffefb6a848c78f6a7fec8ce01223c5..15cdace53b5172bccb403780770eeadddbed1025 100644 (file)
@@ -175,25 +175,27 @@ typedef typename Traits::traversal_category        traversal_category;
 
     // local <-> global descriptor conversion functions
     vertex_descriptor local_to_global(vertex_descriptor u_local) const
-    { return m_global_vertex[u_local]; }
+    { return is_root() ? u_local : m_global_vertex[u_local]; }
 
     vertex_descriptor global_to_local(vertex_descriptor u_global) const {
         vertex_descriptor u_local; bool in_subgraph;
+        if (is_root()) return u_global;
         tie(u_local, in_subgraph) = this->find_vertex(u_global);
         assert(in_subgraph == true);
         return u_local;
     }
 
     edge_descriptor local_to_global(edge_descriptor e_local) const
-    { return m_global_edge[get(get(edge_index, m_graph), e_local)]; }
+    { return is_root() ? e_local : m_global_edge[get(get(edge_index, m_graph), e_local)]; }
 
     edge_descriptor global_to_local(edge_descriptor e_global) const
-    { return (*m_local_edge.find(get(get(edge_index, root().m_graph), e_global))).second; }
+    { return is_root() ? e_global : (*m_local_edge.find(get(get(edge_index, root().m_graph), e_global))).second; }
 
     // Is vertex u (of the root graph) contained in this subgraph?
     // If so, return the matching local vertex.
     std::pair<vertex_descriptor, bool>
     find_vertex(vertex_descriptor u_global) const {
+        if (is_root()) return std::make_pair(u_global, true);
         typename std::map<vertex_descriptor, vertex_descriptor>::const_iterator
             i = m_local_vertex.find(u_global);
         bool valid = i != m_local_vertex.end();
index 9a7f6eb889be492f5dc354f3f11f89f91e8c0bd3..08baf69b8997f718fdbadd18c7c07318945c1b2c 100644 (file)
@@ -16,6 +16,7 @@
 #include <boost/graph/depth_first_search.hpp>
 #include <boost/graph/visitors.hpp>
 #include <boost/graph/exception.hpp>
+#include <boost/throw_exception.hpp>
 
 namespace boost { 
 
@@ -37,7 +38,7 @@ namespace boost {
       : m_iter(_iter) { }
     
     template <typename Edge, typename Graph>
-    void back_edge(const Edge&, Graph&) { throw not_a_dag(); }
+    void back_edge(const Edge&, Graph&) { BOOST_THROW_EXCEPTION(not_a_dag()); }
     
     template <typename Vertex, typename Graph> 
     void finish_vertex(const Vertex& u, Graph&) { *m_iter++ = u; }
index 3dbcdcef9c00bca03656b44e69c816985223eda2..9a3872fd04846ce2f1c5732ca25f32128fbe0ab6 100644 (file)
 #define BOOST_TWO_BIT_COLOR_MAP_HPP
 
 #include <boost/property_map/property_map.hpp>
+#include <boost/graph/properties.hpp>
 #include <boost/shared_array.hpp>
+#include <boost/config.hpp>
 #include <algorithm>
+#include <limits>
 
 namespace boost {
 
@@ -43,42 +46,50 @@ struct two_bit_color_map
   IndexMap index;
   shared_array<unsigned char> data;
 
+  BOOST_STATIC_CONSTANT(int, bits_per_char = std::numeric_limits<unsigned char>::digits);
+  BOOST_STATIC_CONSTANT(int, elements_per_char = bits_per_char / 2);
   typedef typename property_traits<IndexMap>::key_type key_type;
   typedef two_bit_color_type value_type;
   typedef void reference;
   typedef read_write_property_map_tag category;
 
   explicit two_bit_color_map(std::size_t n, const IndexMap& index = IndexMap())
-    : n(n), index(index), data(new unsigned char[(n + 3) / 4])
+    : n(n), index(index), data(new unsigned char[(n + elements_per_char - 1) / elements_per_char])
   {
     // Fill to white
-    std::fill(data.get(), data.get() + (n + 3) / 4, 0);
+    std::fill(data.get(), data.get() + (n + elements_per_char - 1) / elements_per_char, 0);
   }
 };
 
 template<typename IndexMap>
 inline two_bit_color_type
 get(const two_bit_color_map<IndexMap>& pm, 
-    typename two_bit_color_map<IndexMap>::key_type key) 
+    typename property_traits<IndexMap>::key_type key) 
 {
+  BOOST_STATIC_CONSTANT(int, elements_per_char = two_bit_color_map<IndexMap>::elements_per_char);
   typename property_traits<IndexMap>::value_type i = get(pm.index, key);
   assert ((std::size_t)i < pm.n);
-  return two_bit_color_type((pm.data.get()[i / 4] >> ((i % 4) * 2)) & 3);
+  std::size_t byte_num = i / elements_per_char;
+  std::size_t bit_position = ((i % elements_per_char) * 2);
+  return two_bit_color_type((pm.data.get()[byte_num] >> bit_position) & 3);
 }
 
 template<typename IndexMap>
 inline void
 put(const two_bit_color_map<IndexMap>& pm, 
-    typename two_bit_color_map<IndexMap>::key_type key,
+    typename property_traits<IndexMap>::key_type key,
     two_bit_color_type value)
 {
+  BOOST_STATIC_CONSTANT(int, elements_per_char = two_bit_color_map<IndexMap>::elements_per_char);
   typename property_traits<IndexMap>::value_type i = get(pm.index, key);
   assert ((std::size_t)i < pm.n);
   assert (value >= 0 && value < 4);
-  std::size_t byte_num = i / 4;
-  std::size_t bit_position = ((i % 4) * 2);
-    pm.data.get()[byte_num] = (pm.data.get()[byte_num] & ~(3 << bit_position))
-      | (value << bit_position);
+  std::size_t byte_num = i / elements_per_char;
+  std::size_t bit_position = ((i % elements_per_char) * 2);
+    pm.data.get()[byte_num] =
+      (unsigned char)
+        ((pm.data.get()[byte_num] & ~(3 << bit_position))
+         | (value << bit_position));
 }
 
 template<typename IndexMap>
index 1091f101573992a62345f8aef07f12a734d82337..f986c96ce4913a250f72ce2379ecdca5ec35d2b1 100644 (file)
@@ -251,6 +251,52 @@ namespace boost {
     return property_writer<PA, OutputIterator, Tag>(pa, out);
   }
 
+  //========================================================================
+  // property_put
+
+    /**
+     * Functor which just sets a given value to a vertex or edge in a property map.
+     */
+
+  template <typename PropertyMap, typename EventTag>
+  struct property_put
+  {
+    typedef EventTag event_filter;
+    
+    property_put (PropertyMap property_map,
+                  typename property_traits <PropertyMap>::value_type value) :
+      property_map_ (property_map), value_ (value)
+    {}
+
+    template <typename VertexOrEdge, typename Graph>
+    void operator() (VertexOrEdge v, const Graph& g)
+    {
+      put (property_map_, v, value_);
+    }
+
+  private:
+    PropertyMap property_map_;
+    typename property_traits <PropertyMap>::value_type value_;
+  };
+
+  /**
+   * Creates a property_put functor which just sets a given value to a vertex or edge.
+   * 
+   * @param property_map Given writeable property map 
+   * @param value Fixed value of the map
+   * @param tag Event Filter
+   * @return The functor.
+   */
+
+    template <typename PropertyMap, typename EventTag>
+    inline property_put <PropertyMap, EventTag>
+    put_property (PropertyMap property_map,
+                  typename property_traits <PropertyMap>::value_type value,
+                  EventTag tag)
+    {
+      return property_put <PropertyMap, EventTag> (property_map, value);
+    }
+
 #define BOOST_GRAPH_EVENT_STUB(Event,Kind)                                 \
     typedef ::boost::Event Event##_type;                                   \
     template<typename Visitor>                                             \
index dc57dff778b5f2c63cc1c63ed8eb10a478edb757..3393c81ea81f86931f9feef80f7e51ba91018ddc 100644 (file)
 
 #include <boost/integer_fwd.hpp>  // self include
 
-#include <boost/integer_traits.hpp>  // for boost::integer_traits
-#include <boost/limits.hpp>          // for std::numeric_limits
+#include <boost/integer_traits.hpp>  // for boost::::boost::integer_traits
+#include <boost/limits.hpp>          // for ::std::numeric_limits
+#include <boost/cstdint.hpp>         // for boost::int64_t and BOOST_NO_INTEGRAL_INT64_T
+
+//
+// We simply cannot include this header on gcc without getting copious warnings of the kind:
+//
+// boost/integer.hpp:77:30: warning: use of C99 long long integer constant
+//
+// And yet there is no other reasonable implementation, so we declare this a system header
+// to suppress these warnings.
+//
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+#pragma GCC system_header
+#endif
 
 namespace boost
 {
@@ -28,7 +41,13 @@ namespace boost
   //  fast integers from least integers
   //  int_fast_t<> works correctly for unsigned too, in spite of the name.
   template< typename LeastInt >
-  struct int_fast_t { typedef LeastInt fast; }; // imps may specialize
+  struct int_fast_t 
+  { 
+     typedef LeastInt fast; 
+     typedef fast     type;
+  }; // imps may specialize
+
+  namespace detail{
 
   //  convert category to type 
   template< int Category > struct int_least_helper {}; // default is empty
@@ -36,89 +55,196 @@ namespace boost
   //  specializatons: 1=long, 2=int, 3=short, 4=signed char,
   //     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; };
-  template<> struct int_least_helper<3> { typedef short least; };
-  template<> struct int_least_helper<4> { typedef signed char least; };
-  template<> struct int_least_helper<6> { typedef unsigned long least; };
-  template<> struct int_least_helper<7> { typedef unsigned int least; };
-  template<> struct int_least_helper<8> { typedef unsigned short least; };
-  template<> struct int_least_helper<9> { typedef unsigned char least; };
+#ifdef BOOST_HAS_LONG_LONG
+  template<> struct int_least_helper<1> { typedef boost::long_long_type least; };
+#endif
+  template<> struct int_least_helper<2> { typedef long least; };
+  template<> struct int_least_helper<3> { typedef int least; };
+  template<> struct int_least_helper<4> { typedef short least; };
+  template<> struct int_least_helper<5> { typedef signed char least; };
+#ifdef BOOST_HAS_LONG_LONG
+  template<> struct int_least_helper<6> { typedef boost::ulong_long_type least; };
+#endif
+  template<> struct int_least_helper<7> { typedef unsigned long least; };
+  template<> struct int_least_helper<8> { typedef unsigned int least; };
+  template<> struct int_least_helper<9> { typedef unsigned short least; };
+  template<> struct int_least_helper<10> { typedef unsigned char least; };
+
+  template <int Bits>
+  struct exact_signed_base_helper{};
+  template <int Bits>
+  struct exact_unsigned_base_helper{};
+
+  template <> struct exact_signed_base_helper<sizeof(signed char)* CHAR_BIT> { typedef signed char exact; };
+  template <> struct exact_unsigned_base_helper<sizeof(unsigned char)* CHAR_BIT> { typedef unsigned char exact; };
+#if USHRT_MAX != UCHAR_MAX
+  template <> struct exact_signed_base_helper<sizeof(short)* CHAR_BIT> { typedef short exact; };
+  template <> struct exact_unsigned_base_helper<sizeof(unsigned short)* CHAR_BIT> { typedef unsigned short exact; };
+#endif
+#if UINT_MAX != USHRT_MAX
+  template <> struct exact_signed_base_helper<sizeof(int)* CHAR_BIT> { typedef int exact; };
+  template <> struct exact_unsigned_base_helper<sizeof(unsigned int)* CHAR_BIT> { typedef unsigned int exact; };
+#endif
+#if ULONG_MAX != UINT_MAX
+  template <> struct exact_signed_base_helper<sizeof(long)* CHAR_BIT> { typedef long exact; };
+  template <> struct exact_unsigned_base_helper<sizeof(unsigned long)* CHAR_BIT> { typedef unsigned long exact; };
+#endif
+#if defined(BOOST_HAS_LONG_LONG) &&\
+   ((defined(ULLONG_MAX) && (ULLONG_MAX != ULONG_MAX)) ||\
+    (defined(ULONG_LONG_MAX) && (ULONG_LONG_MAX != ULONG_MAX)) ||\
+    (defined(ULONGLONG_MAX) && (ULONGLONG_MAX != ULONG_MAX)) ||\
+    (defined(_ULLONG_MAX) && (_ULLONG_MAX != ULONG_MAX)))
+  template <> struct exact_signed_base_helper<sizeof(boost::long_long_type)* CHAR_BIT> { typedef boost::long_long_type exact; };
+  template <> struct exact_unsigned_base_helper<sizeof(boost::ulong_long_type)* CHAR_BIT> { typedef boost::ulong_long_type exact; };
+#endif
+
+
+  } // namespace detail
 
   //  integer templates specifying number of bits  ---------------------------//
 
   //  signed
   template< int Bits >   // bits (including sign) required
-  struct int_t 
+  struct int_t : public detail::exact_signed_base_helper<Bits>
   {
-      typedef typename int_least_helper
+      typedef typename detail::int_least_helper
         <
-          (Bits-1 <= std::numeric_limits<long>::digits) +
-          (Bits-1 <= std::numeric_limits<int>::digits) +
-          (Bits-1 <= std::numeric_limits<short>::digits) +
-          (Bits-1 <= std::numeric_limits<signed char>::digits)
+#ifdef BOOST_HAS_LONG_LONG
+          (Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
+#else
+           1 +
+#endif
+          (Bits-1 <= ::std::numeric_limits<long>::digits) +
+          (Bits-1 <= ::std::numeric_limits<int>::digits) +
+          (Bits-1 <= ::std::numeric_limits<short>::digits) +
+          (Bits-1 <= ::std::numeric_limits<signed char>::digits)
         >::least  least;
-      typedef typename int_fast_t<least>::fast  fast;
+      typedef typename int_fast_t<least>::type  fast;
   };
 
   //  unsigned
   template< int Bits >   // bits required
-  struct uint_t 
+  struct uint_t : public detail::exact_unsigned_base_helper<Bits>
   {
-      typedef typename int_least_helper
+#if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T)
+     // It's really not clear why this workaround should be needed... shrug I guess!  JM
+     BOOST_STATIC_CONSTANT(int, s = 
+           6 +
+          (Bits <= ::std::numeric_limits<unsigned long>::digits) +
+          (Bits <= ::std::numeric_limits<unsigned int>::digits) +
+          (Bits <= ::std::numeric_limits<unsigned short>::digits) +
+          (Bits <= ::std::numeric_limits<unsigned char>::digits));
+     typedef typename detail::int_least_helper< ::boost::uint_t<Bits>::s>::least least;
+#else
+      typedef typename detail::int_least_helper
         < 
           5 +
-          (Bits <= std::numeric_limits<unsigned long>::digits) +
-          (Bits <= std::numeric_limits<unsigned int>::digits) +
-          (Bits <= std::numeric_limits<unsigned short>::digits) +
-          (Bits <= std::numeric_limits<unsigned char>::digits)
+#ifdef BOOST_HAS_LONG_LONG
+          (Bits-1 <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) +
+#else
+           1 +
+#endif
+          (Bits <= ::std::numeric_limits<unsigned long>::digits) +
+          (Bits <= ::std::numeric_limits<unsigned int>::digits) +
+          (Bits <= ::std::numeric_limits<unsigned short>::digits) +
+          (Bits <= ::std::numeric_limits<unsigned char>::digits)
         >::least  least;
-      typedef typename int_fast_t<least>::fast  fast;
+#endif
+      typedef typename int_fast_t<least>::type  fast;
       // int_fast_t<> works correctly for unsigned too, in spite of the name.
   };
 
   //  integer templates specifying extreme value  ----------------------------//
 
   //  signed
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
+  template< boost::long_long_type MaxValue >   // maximum value to require support
+#else
   template< long MaxValue >   // maximum value to require support
+#endif
   struct int_max_value_t 
   {
-      typedef typename int_least_helper
+      typedef typename detail::int_least_helper
         <
-          (MaxValue <= integer_traits<long>::const_max) +
-          (MaxValue <= integer_traits<int>::const_max) +
-          (MaxValue <= integer_traits<short>::const_max) +
-          (MaxValue <= integer_traits<signed char>::const_max)
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
+          (MaxValue <= ::boost::integer_traits<boost::long_long_type>::const_max) +
+#else
+           1 +
+#endif
+          (MaxValue <= ::boost::integer_traits<long>::const_max) +
+          (MaxValue <= ::boost::integer_traits<int>::const_max) +
+          (MaxValue <= ::boost::integer_traits<short>::const_max) +
+          (MaxValue <= ::boost::integer_traits<signed char>::const_max)
         >::least  least;
-      typedef typename int_fast_t<least>::fast  fast;
+      typedef typename int_fast_t<least>::type  fast;
   };
 
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
+  template< boost::long_long_type MinValue >   // minimum value to require support
+#else
   template< long MinValue >   // minimum value to require support
+#endif
   struct int_min_value_t 
   {
-      typedef typename int_least_helper
+      typedef typename detail::int_least_helper
         <
-          (MinValue >= integer_traits<long>::const_min) +
-          (MinValue >= integer_traits<int>::const_min) +
-          (MinValue >= integer_traits<short>::const_min) +
-          (MinValue >= integer_traits<signed char>::const_min)
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
+          (MinValue >= ::boost::integer_traits<boost::long_long_type>::const_min) +
+#else
+           1 +
+#endif
+          (MinValue >= ::boost::integer_traits<long>::const_min) +
+          (MinValue >= ::boost::integer_traits<int>::const_min) +
+          (MinValue >= ::boost::integer_traits<short>::const_min) +
+          (MinValue >= ::boost::integer_traits<signed char>::const_min)
         >::least  least;
-      typedef typename int_fast_t<least>::fast  fast;
+      typedef typename int_fast_t<least>::type  fast;
   };
 
   //  unsigned
-  template< unsigned long Value >   // maximum value to require support
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
+  template< boost::ulong_long_type MaxValue >   // minimum value to require support
+#else
+  template< unsigned long MaxValue >   // minimum value to require support
+#endif
   struct uint_value_t 
   {
-      typedef typename int_least_helper
+#if (defined(__BORLANDC__) || defined(__CODEGEAR__))
+     // It's really not clear why this workaround should be needed... shrug I guess!  JM
+#if defined(BOOST_NO_INTEGRAL_INT64_T)
+      BOOST_STATIC_CONSTANT(unsigned, which = 
+           6 +
+          (MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
+          (MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
+          (MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
+          (MaxValue <= ::boost::integer_traits<unsigned char>::const_max));
+      typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
+#else // BOOST_NO_INTEGRAL_INT64_T
+      BOOST_STATIC_CONSTANT(unsigned, which = 
+           5 +
+          (MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
+          (MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
+          (MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
+          (MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
+          (MaxValue <= ::boost::integer_traits<unsigned char>::const_max));
+      typedef typename detail::int_least_helper< ::boost::uint_value_t<MaxValue>::which>::least least;
+#endif // BOOST_NO_INTEGRAL_INT64_T
+#else
+      typedef typename detail::int_least_helper
         < 
           5 +
-          (Value <= integer_traits<unsigned long>::const_max) +
-          (Value <= integer_traits<unsigned int>::const_max) +
-          (Value <= integer_traits<unsigned short>::const_max) +
-          (Value <= integer_traits<unsigned char>::const_max)
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
+          (MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
+#else
+           1 +
+#endif
+          (MaxValue <= ::boost::integer_traits<unsigned long>::const_max) +
+          (MaxValue <= ::boost::integer_traits<unsigned int>::const_max) +
+          (MaxValue <= ::boost::integer_traits<unsigned short>::const_max) +
+          (MaxValue <= ::boost::integer_traits<unsigned char>::const_max)
         >::least  least;
-      typedef typename int_fast_t<least>::fast  fast;
+#endif
+      typedef typename int_fast_t<least>::type  fast;
   };
 
 
index 0a092d385037a16e9d8ed28103009e122f4eebd8..8c4e1bb1c4dce14ea82c0e1103d8d43c664d250b 100644 (file)
@@ -70,6 +70,11 @@ struct low_bits_mask_t
       BOOST_STATIC_CONSTANT( std::size_t, bit_count = limits_type::digits );    \
   }
 
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4245)  // 'initializing' : conversion from 'int' to 'const boost::low_bits_mask_t<8>::least', signed/unsigned mismatch
+#endif
+
 BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned char );
 
 #if USHRT_MAX > UCHAR_MAX
@@ -84,6 +89,10 @@ BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned int );
 BOOST_LOW_BITS_MASK_SPECIALIZE( unsigned long );
 #endif
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #undef BOOST_LOW_BITS_MASK_SPECIALIZE
 
 
index 219a48e34116ef5b61027afafc634c5ef239630f..56c7a001251a25a7c9a37fed5729317a8d0e2918 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef BOOST_INTEGER_STATIC_LOG2_HPP
 #define BOOST_INTEGER_STATIC_LOG2_HPP
 
-#include "boost/config.hpp" // for BOOST_STATIC_CONSTANT
+#include "boost/integer_fwd.hpp" // for boost::intmax_t
 
 namespace boost {
 
@@ -41,9 +41,8 @@ namespace boost {
      // terminates with x = 1 and n = 0 (see the algorithm's
      // invariant).
 
-     typedef unsigned long argument_type;
-     typedef          int  result_type;
-
+     typedef boost::static_log2_argument_type argument_type;
+     typedef boost::static_log2_result_type result_type;
 
      template <result_type n>
      struct choose_initial_n {
@@ -107,10 +106,6 @@ namespace boost {
  // static_log2<x>
  // ----------------------------------------
 
- typedef detail::static_log2_impl::argument_type static_log2_argument_type;
- typedef detail::static_log2_impl::result_type   static_log2_result_type;
-
-
  template <static_log2_argument_type x>
  struct static_log2 {
 
index 264603727f405a1bcb6c35b68b5ccbda15e66a87..ee76fd424a127a8fe82b86bbd070327a12b6d4dd 100644 (file)
 
 #include <boost/integer_fwd.hpp>  // self include
 
-#include <boost/config.hpp>  // for BOOST_STATIC_CONSTANT
-
-
 namespace boost
 {
 
-
 //  Compile-time extrema class declarations  ---------------------------------//
 //  Get the minimum or maximum of two values, signed or unsigned.
 
-template < long Value1, long Value2 >
+template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
 struct static_signed_min
 {
-    BOOST_STATIC_CONSTANT( long, value = (Value1 > Value2) ? Value2 : Value1 );
+    BOOST_STATIC_CONSTANT(static_min_max_signed_type, value = (Value1 > Value2) ? Value2 : Value1 );
 };
 
-template < long Value1, long Value2 >
+template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
 struct static_signed_max
 {
-    BOOST_STATIC_CONSTANT( long, value = (Value1 < Value2) ? Value2 : Value1 );
+    BOOST_STATIC_CONSTANT(static_min_max_signed_type, value = (Value1 < Value2) ? Value2 : Value1 );
 };
 
-template < unsigned long Value1, unsigned long Value2 >
+template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
 struct static_unsigned_min
 {
-    BOOST_STATIC_CONSTANT( unsigned long, value
+    BOOST_STATIC_CONSTANT(static_min_max_unsigned_type, value
      = (Value1 > Value2) ? Value2 : Value1 );
 };
 
-template < unsigned long Value1, unsigned long Value2 >
+template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
 struct static_unsigned_max
 {
-    BOOST_STATIC_CONSTANT( unsigned long, value
+    BOOST_STATIC_CONSTANT(static_min_max_unsigned_type, value
      = (Value1 < Value2) ? Value2 : Value1 );
 };
 
index 33cfc9986f382c400cc3a8ac7898367a956a2a24..01b0a0844f82a03755e133fdd64f6f74f6925641 100644 (file)
 
 #include <boost/config.hpp>  // for BOOST_NO_INTRINSIC_WCHAR_T
 #include <boost/limits.hpp>  // for std::numeric_limits
+#include <boost/cstdint.hpp>  // For intmax_t
 
 
 namespace boost
 {
 
+#ifdef BOOST_NO_INTEGRAL_INT64_T
+     typedef unsigned long static_log2_argument_type;
+     typedef          int  static_log2_result_type;
+     typedef long          static_min_max_signed_type;
+     typedef unsigned long static_min_max_unsigned_type;
+#else
+     typedef boost::uintmax_t static_min_max_unsigned_type;
+     typedef boost::intmax_t  static_min_max_signed_type;
+     typedef boost::uintmax_t static_log2_argument_type;
+     typedef int              static_log2_result_type;
+#endif
 
 //  From <boost/cstdint.hpp>  ------------------------------------------------//
 
@@ -65,7 +77,7 @@ template <  >
 template <  >
     class integer_traits< unsigned long >;
 
-#ifdef ULLONG_MAX
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && (defined(BOOST_HAS_LONG_LONG) || defined(BOOST_HAS_MS_INT64))
 template <  >
     class integer_traits<  ::boost::long_long_type>;
 
@@ -85,13 +97,25 @@ template< int Bits >
 template< int Bits >
     struct uint_t;
 
-template< long MaxValue >
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
+    template< boost::long_long_type MaxValue >   // maximum value to require support
+#else
+  template< long MaxValue >   // maximum value to require support
+#endif
     struct int_max_value_t;
 
-template< long MinValue >
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
+  template< boost::long_long_type MinValue >   // minimum value to require support
+#else
+  template< long MinValue >   // minimum value to require support
+#endif
     struct int_min_value_t;
 
-template< unsigned long Value >
+#if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
+  template< boost::ulong_long_type MaxValue >   // maximum value to require support
+#else
+  template< unsigned long MaxValue >   // maximum value to require support
+#endif
     struct uint_value_t;
 
 
@@ -124,28 +148,26 @@ template <  >
 
 //  From <boost/integer/static_log2.hpp>  ------------------------------------//
 
-template < unsigned long Value >
+template <static_log2_argument_type Value >
     struct static_log2;
 
-template <  >
-    struct static_log2< 0ul >;
+template <> struct static_log2<0u>;
 
 
 //  From <boost/integer/static_min_max.hpp>  ---------------------------------//
 
-template < long Value1, long Value2 >
+template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
     struct static_signed_min;
 
-template < long Value1, long Value2 >
+template <static_min_max_signed_type Value1, static_min_max_signed_type Value2>
     struct static_signed_max;
 
-template < unsigned long Value1, unsigned long Value2 >
+template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
     struct static_unsigned_min;
 
-template < unsigned long Value1, unsigned long Value2 >
+template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
     struct static_unsigned_max;
 
-
 }  // namespace boost
 
 
index ac4ef32f307ae3b770baf38d7cefdf77819d4585..129ce82c65375180deea6af122dee7fa90945ec1 100644 (file)
@@ -5,7 +5,7 @@
  * accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * $Id: integer_traits.hpp 32576 2006-02-05 10:19:42Z johnmaddock $
+ * $Id: integer_traits.hpp 58381 2009-12-14 18:14:48Z johnmaddock $
  *
  * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers
  */
 #include <wchar.h>
 #endif
 
+//
+// We simply cannot include this header on gcc without getting copious warnings of the kind:
+//
+// ../../../boost/integer_traits.hpp:164:66: warning: use of C99 long long integer constant
+//
+// And yet there is no other reasonable implementation, so we declare this a system header
+// to suppress these warnings.
+//
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+#pragma GCC system_header
+#endif
 
 namespace boost {
 template<class T>
@@ -225,6 +236,20 @@ class integer_traits< ::boost::ulong_long_type>
     public detail::integer_traits_base< ::boost::ulong_long_type, 0, ~0uLL>
 { };
 
+#elif defined(BOOST_HAS_MS_INT64)
+
+template<>
+class integer_traits< __int64>
+  : public std::numeric_limits< __int64>,
+    public detail::integer_traits_base< __int64, _I64_MIN, _I64_MAX>
+{ };
+
+template<>
+class integer_traits< unsigned __int64>
+  : public std::numeric_limits< unsigned __int64>,
+    public detail::integer_traits_base< unsigned __int64, 0, _UI64_MAX>
+{ };
+
 #endif
 #endif
 
index 9c45c0b5878e39757523aa26047c1da0ca38a183..07cfb345ff517348b2d07679d143a360c59ad593 100644 (file)
@@ -128,6 +128,7 @@ public:
 private:
     state_type &       s_save_;
     aspect_type const  a_save_;
+    basic_ios_iostate_saver& operator=(const basic_ios_iostate_saver&);
 };
 
 template < typename Ch, class Tr >
@@ -156,6 +157,7 @@ public:
 private:
     state_type &       s_save_;
     aspect_type const  a_save_;
+    basic_ios_exception_saver& operator=(const basic_ios_exception_saver&);
 };
 
 template < typename Ch, class Tr >
@@ -180,6 +182,7 @@ public:
 private:
     state_type &       s_save_;
     aspect_type const  a_save_;
+    basic_ios_tie_saver& operator=(const basic_ios_tie_saver&);
 };
 
 template < typename Ch, class Tr >
@@ -204,6 +207,7 @@ public:
 private:
     state_type &       s_save_;
     aspect_type const  a_save_;
+    basic_ios_rdbuf_saver& operator=(const basic_ios_rdbuf_saver&);
 };
 
 template < typename Ch, class Tr >
@@ -228,6 +232,7 @@ public:
 private:
     state_type &       s_save_;
     aspect_type const  a_save_;
+    basic_ios_fill_saver& operator=(const basic_ios_fill_saver&);
 };
 
 #ifndef BOOST_NO_STD_LOCALE
@@ -253,6 +258,7 @@ public:
 private:
     state_type &       s_save_;
     aspect_type const  a_save_;
+    basic_ios_locale_saver& operator=(const basic_ios_locale_saver&);
 };
 #endif
 
@@ -392,6 +398,8 @@ private:
     #ifndef BOOST_NO_STD_LOCALE
     ::std::locale const                     a9_save_;
     #endif
+
+    basic_ios_all_saver& operator=(const basic_ios_all_saver&);
 };
 
 class ios_all_word_saver
index 28718fafe9dd04158b7afde32c2d0247998647bd..90fd18410d59219f33c7abec4f88a32677f0fda5 100644 (file)
@@ -36,6 +36,7 @@
 #include <boost/next_prior.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 #include <boost/type.hpp>
 #include <boost/iostreams/detail/execute.hpp>   // VC6.5 requires this
@@ -149,17 +150,20 @@ public:
     // Sets the size of the buffer created for the devices to be added to this
     // chain. Does not affect the size of the buffer for devices already
     // added.
-    void set_device_buffer_size(int n) { pimpl_->device_buffer_size_ = n; }
+    void set_device_buffer_size(std::streamsize n) 
+        { pimpl_->device_buffer_size_ = n; }
 
     // Sets the size of the buffer created for the filters to be added
     // to this chain. Does not affect the size of the buffer for filters already
     // added.
-    void set_filter_buffer_size(int n) { pimpl_->filter_buffer_size_ = n; }
+    void set_filter_buffer_size(std::streamsize n) 
+        { pimpl_->filter_buffer_size_ = n; }
 
     // Sets the size of the putback buffer for filters and devices to be added
     // to this chain. Does not affect the size of the buffer for filters or
     // devices already added.
-    void set_pback_size(int n) { pimpl_->pback_size_ = n; }
+    void set_pback_size(std::streamsize n) 
+        { pimpl_->pback_size_ = n; }
 
     //----------Device interface----------------------------------------------//
 
@@ -172,7 +176,7 @@ public:
     const std::type_info& component_type(int n) const
     {
         if (static_cast<size_type>(n) >= size())
-            throw std::out_of_range("bad chain offset");
+            boost::throw_exception(std::out_of_range("bad chain offset"));
         return (*boost::next(list().begin(), n))->component_type();
     }
 
@@ -196,7 +200,7 @@ public:
     T* component(int n, boost::type<T>) const
     {
         if (static_cast<size_type>(n) >= size())
-            throw std::out_of_range("bad chain offset");
+            boost::throw_exception(std::out_of_range("bad chain offset"));
         streambuf_type* link = *boost::next(list().begin(), n);
         if (BOOST_IOSTREAMS_COMPARE_TYPE_ID(link->component_type(), typeid(T)))
             return static_cast<T*>(link->component_impl());
@@ -226,7 +230,8 @@ public:
     bool strict_sync();
 private:
     template<typename T>
-    void push_impl(const T& t, int buffer_size = -1, int pback_size = -1)
+    void push_impl(const T& t, std::streamsize buffer_size = -1, 
+                   std::streamsize pback_size = -1)
     {
         typedef typename iostreams::category_of<T>::type  category;
         typedef typename unwrap_ios<T>::type              component_type;
@@ -238,7 +243,7 @@ private:
         typedef typename list_type::iterator              iterator;
         BOOST_STATIC_ASSERT((is_convertible<category, Mode>::value));
         if (is_complete())
-            throw std::logic_error("chain complete");
+            boost::throw_exception(std::logic_error("chain complete"));
         streambuf_type* prev = !empty() ? list().back() : 0;
         buffer_size =
             buffer_size != -1 ?
@@ -361,12 +366,12 @@ private:
                 flags_ &= ~f_complete;
                 flags_ &= ~f_open;
             }
-        list_type     links_;
-        client_type*  client_;
-        int           device_buffer_size_,
-                      filter_buffer_size_,
-                      pback_size_;
-        int           flags_;
+        list_type        links_;
+        client_type*     client_;
+        std::streamsize  device_buffer_size_,
+                         filter_buffer_size_,
+                         pback_size_;
+        int              flags_;
     };
     friend struct chain_impl;
 
index 2c999c370a11cf190e242fd272918005baa5e093..667d9254438b287b81825d918c655ea0131d32a9 100644 (file)
 #include <boost/iostreams/categories.hpp>
 #include <boost/iostreams/detail/dispatch.hpp>
 #include <boost/iostreams/detail/error.hpp>
+#include <boost/iostreams/detail/config/unreachable_return.hpp>
 #include <boost/iostreams/get.hpp>
 #include <boost/iostreams/put.hpp>
 #include <boost/iostreams/read.hpp>
 #include <boost/iostreams/seek.hpp>
 #include <boost/iostreams/traits.hpp>
 #include <boost/iostreams/write.hpp>
+#include <boost/throw_exception.hpp>
 
 // Must come last.
 #include <boost/iostreams/detail/config/disable_warnings.hpp>  // MSVC.
@@ -93,24 +95,28 @@ struct read_write_if_impl<input> {
 
     template<typename T>
     static bool put(T&, typename char_type_of<T>::type)
-    { throw cant_write(); }
+    { boost::throw_exception(cant_write());
+      BOOST_IOSTREAMS_UNREACHABLE_RETURN(false) }
 
     template<typename T>
     static std::streamsize 
     write(T&, const typename char_type_of<T>::type*, std::streamsize)
-    { throw cant_write(); }
+    { boost::throw_exception(cant_write());
+      BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
 };
 
 template<>
 struct read_write_if_impl<output> {
     template<typename T>
     static typename int_type_of<T>::type get(T&)
-    { throw cant_read(); }
+    { boost::throw_exception(cant_read());
+      BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
 
     template<typename T>
     static std::streamsize
     read(T&, typename char_type_of<T>::type*, std::streamsize)
-    { throw cant_read(); }
+    { boost::throw_exception(cant_read());
+      BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
 
     template<typename T>
     static bool put(T& t, typename char_type_of<T>::type c)
@@ -139,7 +145,8 @@ struct seek_if_impl<any_tag> {
     template<typename T>
     static std::streampos 
     seek(T&, stream_offset, BOOST_IOS::seekdir, BOOST_IOS::openmode)
-    { throw cant_seek(); }
+    { boost::throw_exception(cant_seek());
+      BOOST_IOSTREAMS_UNREACHABLE_RETURN(std::streampos()) }
 };
 
 } // End namespace detail.
index 39526961550fd79d4f296c1957e867b4b2ca6999..280a5d0974658b53a5a6d563ebd50c075a049d9b 100644 (file)
@@ -44,6 +44,7 @@
 #include <boost/iostreams/operations.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 #include <boost/type_traits/is_same.hpp>
 
@@ -152,10 +153,11 @@ struct code_converter_impl {
         } catch (...) { /* */ } 
     }
 
-    void open(const Device& dev, int buffer_size)
+    template <class T>
+    void open(const T& dev, int buffer_size)
     {
         if (flags_ & f_open)
-            throw BOOST_IOSTREAMS_FAILURE("already open");
+            boost::throw_exception(BOOST_IOSTREAMS_FAILURE("already open"));
         if (buffer_size == -1)
             buffer_size = default_filter_buffer_size;
         int max_length = cvt_.get().max_length();
@@ -354,7 +356,7 @@ std::streamsize code_converter<Device, Codevt, Alloc>::read
         case std::codecvt_base::error:
         default:
             buf.state() = state_type();
-            throw code_conversion_error();
+            boost::throw_exception(code_conversion_error());
         }
 
     } while (total < n && status != EOF && status != WOULD_BLOCK);
@@ -407,7 +409,7 @@ std::streamsize code_converter<Device, Codevt, Alloc>::write
         case std::codecvt_base::error:
         default:
             buf.state() = state_type();
-            throw code_conversion_error();
+            boost::throw_exception(code_conversion_error());
         }
     }
     return total;
index c2cd2af4485bbb31d1c734a4aa482f7897a86852..0963d8905b8c1da8d9212ecc59359ad1afb1c830 100644 (file)
 #include <boost/iostreams/detail/dispatch.hpp>
 #include <boost/iostreams/detail/error.hpp>
 #include <boost/iostreams/detail/streambuf.hpp>        // pubsync.
+#include <boost/iostreams/detail/config/unreachable_return.hpp>
 #include <boost/iostreams/device/null.hpp>
 #include <boost/iostreams/traits.hpp>
 #include <boost/iostreams/operations.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
 
 // Must come last.
 #include <boost/iostreams/detail/config/disable_warnings.hpp>  // MSVC.
 
+
 namespace boost { namespace iostreams { namespace detail {
 
 template<typename Category> struct device_wrapper_impl;
@@ -137,7 +140,8 @@ struct device_wrapper_impl<any_tag> {
     seek( Device&, stream_offset, BOOST_IOS::seekdir, 
           BOOST_IOS::openmode, any_tag )
     { 
-        throw cant_seek(); 
+        boost::throw_exception(cant_seek());
+        BOOST_IOSTREAMS_UNREACHABLE_RETURN(0)
     }
 
     template<typename Device>
@@ -171,7 +175,8 @@ struct device_wrapper_impl<input> : device_wrapper_impl<any_tag>  {
     static std::streamsize 
     write( Device&, Dummy*, const typename char_type_of<Device>::type*,
            std::streamsize )
-    { throw cant_write(); }
+    { boost::throw_exception(cant_write());
+      BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
 };
 
 template<>
@@ -179,7 +184,8 @@ struct device_wrapper_impl<output> {
     template<typename Device, typename Dummy>
     static std::streamsize
     read(Device&, Dummy*, typename char_type_of<Device>::type*, std::streamsize)
-    { throw cant_read(); }
+    { boost::throw_exception(cant_read());
+      BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
 
     template<typename Device, typename Dummy>
     static std::streamsize 
@@ -205,7 +211,8 @@ struct flt_wrapper_impl<any_tag> {
     static std::streampos
     seek( Filter&, Device*, stream_offset,
           BOOST_IOS::seekdir, BOOST_IOS::openmode, any_tag )
-    { throw cant_seek(); }
+    { boost::throw_exception(cant_seek());
+      BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
 
     template<typename Filter, typename Device>
     static std::streampos
@@ -252,7 +259,8 @@ struct flt_wrapper_impl<input> {
     static std::streamsize 
     write( Filter&, Sink*, const typename char_type_of<Filter>::type*, 
            std::streamsize )
-    { throw cant_write(); }
+    { boost::throw_exception(cant_write());
+      BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
 };
 
 template<>
@@ -260,7 +268,8 @@ struct flt_wrapper_impl<output> {
     template<typename Filter, typename Source>
     static std::streamsize
     read(Filter&, Source*, typename char_type_of<Filter>::type*,std::streamsize)
-    { throw cant_read(); }
+    { boost::throw_exception(cant_read());
+      BOOST_IOSTREAMS_UNREACHABLE_RETURN(0) }
 
     template<typename Filter, typename Sink>
     static std::streamsize 
index c70bacc1f8ad9d6fabd6178443de7157cc4b907f..88ab735a1751ffe3d38eb15d7a36bfadc3cc7209 100644 (file)
@@ -30,6 +30,7 @@
 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
 #include <boost/preprocessor/repetition/enum_params.hpp>
 #include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 
 // Must come last.
@@ -209,7 +210,7 @@ inline std::streamsize direct_adapter<Direct>::write
     using namespace std;
     pointers& put = ptrs_.second();
     if (n > static_cast<std::streamsize>(put.end - put.ptr))
-        throw write_area_exhausted();
+        boost::throw_exception(write_area_exhausted());
     std::copy(s, s + n, put.ptr);
     put.ptr += n;
     return n;
@@ -224,7 +225,7 @@ inline std::streampos direct_adapter<Direct>::seek
     pointers& get = ptrs_.first();
     pointers& put = ptrs_.second();
     if (way == BOOST_IOS::cur && get.ptr != put.ptr)
-       throw bad_seek();
+       boost::throw_exception(bad_seek());
     ptrdiff_t next = 0;
     if ((which & BOOST_IOS::in) || !is_double::value) {
         if (way == BOOST_IOS::beg)
@@ -236,7 +237,7 @@ inline std::streampos direct_adapter<Direct>::seek
         if (next >= 0 && next <= get.end - get.beg)
             get.ptr = get.beg + next;
         else
-            throw bad_seek();
+            boost::throw_exception(bad_seek());
     }
     if ((which & BOOST_IOS::out) && is_double::value) {
         if (way == BOOST_IOS::beg)
@@ -248,7 +249,7 @@ inline std::streampos direct_adapter<Direct>::seek
         if (next >= 0 && next <= put.end - put.beg)
             put.ptr = put.beg + next;
         else
-            throw bad_seek();
+            boost::throw_exception(bad_seek());
     }
     return offset_to_position(next);
 }
index f11958db9a7d8a30818c75e190cf958199e69943..d2b9bc55fdda3ffbde100225cd096a844e22ea80 100644 (file)
@@ -21,6 +21,7 @@
 #include <boost/iostreams/detail/error.hpp>
 #include <boost/iostreams/positioning.hpp>
 #include <boost/mpl/if.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 #include <boost/utility/enable_if.hpp>
 
@@ -116,7 +117,7 @@ struct range_adapter_impl<std::forward_iterator_tag> {
     {
         while (cur != last && n-- > 0) *cur++ = *s++;
         if (cur == last && n > 0)
-            throw write_area_exhausted();
+            boost::throw_exception(write_area_exhausted());
         return n;
     }
 };
@@ -144,7 +145,7 @@ struct range_adapter_impl<std::random_access_iterator_tag> {
         std::copy(s, s + count, cur);
         cur += count;
         if (count < n) 
-            throw write_area_exhausted();
+            boost::throw_exception(write_area_exhausted());
         return n;
     }
 
@@ -156,18 +157,21 @@ struct range_adapter_impl<std::random_access_iterator_tag> {
         using namespace std;
         switch (way) {
         case BOOST_IOS::beg:
-            if (off > last - first || off < 0) throw bad_seek();
+            if (off > last - first || off < 0)
+                boost::throw_exception(bad_seek());
             cur = first + off;
             break;
         case BOOST_IOS::cur:
             {
                 std::ptrdiff_t newoff = cur - first + off;
-                if (newoff > last - first || newoff < 0) throw bad_seek();
+                if (newoff > last - first || newoff < 0)
+                    boost::throw_exception(bad_seek());
                 cur += off;
                 break;
             }
         case BOOST_IOS::end:
-            if (last - first + off < 0 || off > 0) throw bad_seek();
+            if (last - first + off < 0 || off > 0)
+                boost::throw_exception(bad_seek());
             cur = last + off;
             break;
         default:
index 5f98b2151d0ef3463dc34fc3dd292d659daef6c3..d5c7107087e0bcdd10deee80857b74d3aa51e588 100644 (file)
@@ -9,6 +9,7 @@
 #define BOOST_IOSTREAMS_DETAIL_BROKEN_OVERLOAD_RESOLUTION_STREAM_BUFFER_HPP_INCLUDED
 
 #include <boost/iostreams/detail/broken_overload_resolution/forward.hpp>
+#include <boost/throw_exception.hpp>
 
 namespace boost { namespace iostreams {
 
@@ -179,7 +180,7 @@ private:
     void check_open()
     {
         if (this->is_open()) 
-            throw BOOST_IOSTREAMS_FAILURE("already open");
+            boost::throw_exception(BOOST_IOSTREAMS_FAILURE("already open"));
     }
 };
 
index f6b6f5cf07302da942a97f56ac4a64aa49b77375..c830ae5bf76a32100884dbc9bfbf93b4b8525f21 100644 (file)
@@ -148,7 +148,12 @@ basic_buffer<Ch, Alloc>::basic_buffer(int buffer_size)
 
 template<typename Ch, typename Alloc>
 inline basic_buffer<Ch, Alloc>::~basic_buffer()
-{ if (buf_) allocator_type().deallocate(buf_, size_); }
+{
+    if (buf_) {
+        allocator_type().deallocate(buf_,
+            static_cast<BOOST_DEDUCED_TYPENAME Alloc::size_type>(size_));
+    }
+}
 
 template<typename Ch, typename Alloc>
 inline void basic_buffer<Ch, Alloc>::resize(int buffer_size)
diff --git a/deal.II/contrib/boost/include/boost/iostreams/detail/config/unreachable_return.hpp b/deal.II/contrib/boost/include/boost/iostreams/detail/config/unreachable_return.hpp
new file mode 100644 (file)
index 0000000..9e40033
--- /dev/null
@@ -0,0 +1,25 @@
+// (C) Copyright 2010 Daniel James
+// 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 http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef BOOST_IOSTREAMS_DETAIL_UNREACHABLE_RETURN_HPP_INCLUDED
+#define BOOST_IOSTREAMS_DETAIL_UNREACHABLE_RETURN_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif              
+
+#include <boost/config.hpp>
+
+// If Boost.Exception has BOOST_ATTRIBUTE_NORETURN
+#if defined(_MSC_VER) || defined(__GNUC__)
+#define BOOST_IOSTREAMS_UNREACHABLE_RETURN(x) \
+    BOOST_UNREACHABLE_RETURN(x)
+#else
+#define BOOST_IOSTREAMS_UNREACHABLE_RETURN(x) \
+    return x;
+#endif
+
+#endif
index 62cf429f5dd68e67a2f66f062bb6d38ac17c6fa4..89252a35477dad6bd27a256c3d856bd6946e77c4 100644 (file)
@@ -49,10 +49,10 @@ namespace is_dereferenceable_
 # endif 
   
   // two check overloads help us identify which operator++ was picked
-  char (& check(tag) )[2];
+  char (& check BOOST_PREVENT_MACRO_SUBSTITUTION(tag) )[2];
   
   template <class T>
-  char check(T const&);
+  char check BOOST_PREVENT_MACRO_SUBSTITUTION(T const&);
   
   template <class T>
   struct impl
@@ -61,7 +61,7 @@ namespace is_dereferenceable_
 
       BOOST_STATIC_CONSTANT(
           bool
-        , value = sizeof(is_dereferenceable_::check(BOOST_comma(*x,0))) == 1
+        , value = sizeof(is_dereferenceable_::check BOOST_PREVENT_MACRO_SUBSTITUTION(BOOST_comma(*x,0))) == 1
       );
   };
 }
index af64c3018eb2e954b95ae580f9039e9e141da6a7..a78e0c6be31cea5ce48569aa8f935a027c4e40c6 100644 (file)
@@ -48,7 +48,7 @@ public:
 
     // Constructor taking a boost::filesystem::path or boost::filesystem::wpath
     template<typename Path>
-    explicit path(const Path& p)
+    explicit path(const Path& p, typename Path::external_string_type* = 0)
     {
         typedef typename Path::external_string_type string_type;
         init(p, boost::type<string_type>());
index 736d5b836052ad88eabaf04d3a4d2a821ca842ae..7e80d09af1272ac95e7e1d1f2e8481fc2e199814 100644 (file)
@@ -13,7 +13,7 @@
 #endif                    
 
 #define BOOST_IOSTREAMS_PUSH_PARAMS() \
-    , int buffer_size = -1 , int pback_size = -1 \
+    , std::streamsize buffer_size = -1 , std::streamsize pback_size = -1 \
     /**/
 
 #define BOOST_IOSTREAMS_PUSH_ARGS() , buffer_size, pback_size     
index 611b50cc0fdd23081332bba1cf21e8cf1ff305a9..3175bf1f2aa58d3362af2b206954ea44941dc5a8 100644 (file)
@@ -44,6 +44,7 @@
 # include <boost/iostreams/traits.hpp>         // mode_of, is_direct.
 # include <boost/mpl/bool.hpp>
 # include <boost/static_assert.hpp>
+# include <boost/throw_exception.hpp>
 # include <boost/type_traits/is_convertible.hpp>
 
 # include <boost/iostreams/detail/config/disable_warnings.hpp>
@@ -159,8 +160,12 @@ public:
     {
         if (!open_)
             open(snk, BOOST_IOS::out);
-        if (end_ != -1 && pos_ + n >= end_)
-            bad_write();
+        if (end_ != -1 && pos_ + n >= end_) {
+            if(pos_ < end_)
+                pos_ += iostreams::write(this->component(),
+                    snk, s, end_ - pos_);
+            boost::throw_exception(bad_write());
+        }
         std::streamsize result = 
             iostreams::write(this->component(), snk, s, n);
         pos_ += result;
@@ -181,11 +186,11 @@ public:
             // Restriction is half-open; seek relative to the actual end.
             pos_ = this->component().seek(dev, off, BOOST_IOS::end);
             if (pos_ < beg_)
-                bad_seek();
+                boost::throw_exception(bad_seek());
             return offset_to_position(pos_ - beg_);
         }
         if (next < beg_ || (end_ != -1 && next >= end_))
-            bad_seek();
+            boost::throw_exception(bad_seek());
         pos_ = this->component().seek(dev, next, BOOST_IOS::cur);
         return offset_to_position(pos_ - beg_);
     }
@@ -248,7 +253,7 @@ restricted_indirect_device<Device>::restricted_indirect_device
       end_(len != -1 ? off + len : -1)
 {
     if (len < -1 || off < 0)
-        throw BOOST_IOSTREAMS_FAILURE("bad offset");
+        boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset"));
     iostreams::skip(this->component(), off);
 }
 
@@ -271,8 +276,11 @@ template<typename Device>
 inline std::streamsize restricted_indirect_device<Device>::write
     (const char_type* s, std::streamsize n)
 {
-    if (end_ != -1 && pos_ + n >= end_)
-        bad_write();
+    if (end_ != -1 && pos_ + n >= end_) {
+        if(pos_ < end_)
+            pos_ += iostreams::write(this->component(), s, end_ - pos_);
+        boost::throw_exception(bad_write());
+    }
     std::streamsize result = iostreams::write(this->component(), s, n);
     pos_ += result;
     return result;
@@ -293,11 +301,11 @@ std::streampos restricted_indirect_device<Device>::seek
         // Restriction is half-open; seek relative to the actual end.
         pos_ = iostreams::seek(this->component(), off, BOOST_IOS::end);
         if (pos_ < beg_)
-            bad_seek();
+            boost::throw_exception(bad_seek());
         return offset_to_position(pos_ - beg_);
     }
-    if (next < beg_ || (end_ != -1 && next >= end_))
-        bad_seek();
+    if (next < beg_ || (end_ != -1 && next > end_))
+        boost::throw_exception(bad_seek());
     pos_ = iostreams::seek(this->component(), next - pos_, BOOST_IOS::cur);
     return offset_to_position(pos_ - beg_);
 }
@@ -314,7 +322,7 @@ restricted_direct_device<Device>::restricted_direct_device
     if ( off < 0 || len < -1 || 
          (len != -1 && off + len > seq.second - seq.first) )
     {
-        throw BOOST_IOSTREAMS_FAILURE("bad offset");
+        boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset"));
     }
     beg_ = seq.first + off;
     end_ = len != -1 ? 
@@ -357,7 +365,7 @@ restricted_filter<Filter>::restricted_filter
       pos_(off), end_(len != -1 ? off + len : -1), open_(false)
 {
     if (len < -1 || off < 0)
-        throw BOOST_IOSTREAMS_FAILURE("bad offset");
+        boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset"));
 }
 
 } // End namespace detail.
index 8872e0f63c83e80c859894eaae9d036810ebd8ce..1dad9af101648e55941308068500b75fe3e2ee98 100644 (file)
@@ -29,6 +29,7 @@
 #include <boost/iostreams/operations.hpp>
 #include <boost/iostreams/positioning.hpp>
 #include <boost/iostreams/traits.hpp>
+#include <boost/throw_exception.hpp>
 
 // Must come last.
 #include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC.
@@ -55,7 +56,8 @@ private:
                 char_type, traits_type
             )                                             streambuf_type;
 public: // stream needs access.
-    void open(const T& t, int buffer_size, int pback_size);
+    void open(const T& t, std::streamsize buffer_size, 
+              std::streamsize pback_size);
     bool is_open() const;
     void close();
     bool auto_close() const { return auto_close_; }
@@ -111,7 +113,8 @@ direct_streambuf<T, Tr>::direct_streambuf()
 { this->set_true_eof(true); }
 
 template<typename T, typename Tr>
-void direct_streambuf<T, Tr>::open(const T& t, int, int)
+void direct_streambuf<T, Tr>::open
+    (const T& t, std::streamsize, std::streamsize)
 {
     storage_.reset(t);
     init_input(category());
@@ -138,7 +141,7 @@ typename direct_streambuf<T, Tr>::int_type
 direct_streambuf<T, Tr>::underflow()
 {
     if (!ibeg_) 
-        throw cant_read();
+        boost::throw_exception(cant_read());
     if (!gptr()) 
         init_get_area();
     return gptr() != iend_ ? 
@@ -152,14 +155,14 @@ direct_streambuf<T, Tr>::pbackfail(int_type c)
 {
     using namespace std;
     if (!ibeg_) 
-        throw cant_read();
+        boost::throw_exception(cant_read());
     if (gptr() != 0 && gptr() != ibeg_) {
         gbump(-1);
         if (!traits_type::eq_int_type(c, traits_type::eof()))
             *gptr() = traits_type::to_char_type(c);
         return traits_type::not_eof(c);
     }
-    throw bad_putback();
+    boost::throw_exception(bad_putback());
 }
 
 template<typename T, typename Tr>
@@ -167,11 +170,14 @@ typename direct_streambuf<T, Tr>::int_type
 direct_streambuf<T, Tr>::overflow(int_type c)
 {
     using namespace std;
-    if (!obeg_) throw BOOST_IOSTREAMS_FAILURE("no write access");
+    if (!obeg_)
+        boost::throw_exception(BOOST_IOSTREAMS_FAILURE("no write access"));
     if (!pptr()) init_put_area();
     if (!traits_type::eq_int_type(c, traits_type::eof())) {
         if (pptr() == oend_)
-            throw BOOST_IOSTREAMS_FAILURE("write area exhausted");
+            boost::throw_exception(
+                BOOST_IOSTREAMS_FAILURE("write area exhausted")
+            );
         *pptr() = traits_type::to_char_type(c);
         pbump(1);
         return c;
@@ -215,7 +221,7 @@ typename direct_streambuf<T, Tr>::pos_type direct_streambuf<T, Tr>::seek_impl
     using namespace std;
     BOOST_IOS::openmode both = BOOST_IOS::in | BOOST_IOS::out;
     if (two_head() && (which & both) == both)
-        throw bad_seek();
+        boost::throw_exception(bad_seek());
     stream_offset result = -1;
     bool one = one_head();
     if (one && (pptr() != 0 || gptr()== 0))
@@ -230,7 +236,7 @@ typename direct_streambuf<T, Tr>::pos_type direct_streambuf<T, Tr>::seek_impl
         default: assert(0);
         }
         if (next < 0 || next > (iend_ - ibeg_))
-            throw bad_seek();
+            boost::throw_exception(bad_seek());
         setg(ibeg_, ibeg_ + next, iend_);
         result = next;
     }
@@ -244,7 +250,7 @@ typename direct_streambuf<T, Tr>::pos_type direct_streambuf<T, Tr>::seek_impl
         default: assert(0);
         }
         if (next < 0 || next > (oend_ - obeg_))
-            throw bad_seek();
+            boost::throw_exception(bad_seek());
         pbump(static_cast<int>(next - (pptr() - obeg_)));
         result = next;
     }
index bb43050b6b470e07e38e78ba19b896b11d5248f7..2926f8ab28f043d22bf903754ca353af74dfda0d 100644 (file)
@@ -35,6 +35,7 @@
 #include <boost/iostreams/traits.hpp>
 #include <boost/iostreams/operations.hpp>
 #include <boost/mpl/if.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 
 // Must come last.
@@ -151,7 +152,7 @@ indirect_streambuf<T, Tr, Alloc, Mode>::indirect_streambuf()
 
 template<typename T, typename Tr, typename Alloc, typename Mode>
 void indirect_streambuf<T, Tr, Alloc, Mode>::open
-    (const T& t, int buffer_size, int pback_size)
+    (const T& t, std::streamsize buffer_size, std::streamsize pback_size)
 {
     using namespace std;
 
@@ -167,7 +168,7 @@ void indirect_streambuf<T, Tr, Alloc, Mode>::open
 
     // Construct input buffer.
     if (can_read()) {
-        pback_size_ = (std::max)(2, pback_size); // STLPort needs 2.
+        pback_size_ = (std::max)(std::streamsize(2), pback_size); // STLPort needs 2.
         std::streamsize size =
             pback_size_ +
             ( buffer_size ? buffer_size: 1 );
@@ -274,7 +275,7 @@ indirect_streambuf<T, Tr, Alloc, Mode>::pbackfail(int_type c)
             *gptr() = traits_type::to_char_type(c);
         return traits_type::not_eof(c);
     } else {
-        throw bad_putback();
+        boost::throw_exception(bad_putback());
     }
 }
 
index 3d12299f766582d52a88d0f7e8fd8b2a22c3065e..7d86eafec421e8a461f6df40ef6fb414cf928527 100644 (file)
@@ -18,6 +18,7 @@
 #include <cstring>
 #include <string>
 #include <boost/config.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/iostreams/detail/config/windows_posix.hpp>
 #include <boost/iostreams/detail/ios.hpp>  // failure.
 
@@ -73,10 +74,10 @@ inline BOOST_IOSTREAMS_FAILURE system_failure(const std::string& msg)
 { return system_failure(msg.c_str()); }
 
 inline void throw_system_failure(const char* msg)
-{ throw system_failure(msg); }
+{ boost::throw_exception(system_failure(msg)); }
 
 inline void throw_system_failure(const std::string& msg)
-{ throw system_failure(msg); }
+{ boost::throw_exception(system_failure(msg)); }
 
 } } } // End namespaces detail, iostreams, boost.
 
index 9c137798221a9c51495114c6dcfd33f0f358abe7..8493b17736bd9aa772581641da39bd32e1a6e074 100644 (file)
@@ -4,6 +4,9 @@
 // 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.)
 
+#ifndef BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
+#define BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
+
 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
 # pragma once
 #endif
@@ -25,6 +28,7 @@
 #include <boost/iostreams/positioning.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/type_traits/is_same.hpp>
 
 // Must come last.
@@ -393,10 +397,10 @@ void mapped_file_source::open(const basic_mapped_file_params<Path>& p)
     param_type params(p);
     if (params.flags) {
         if (params.flags != mapped_file::readonly)
-            throw new BOOST_IOSTREAMS_FAILURE("invalid flags");
+            boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid flags"));
     } else {
         if (params.mode & BOOST_IOS::out)
-            throw new BOOST_IOSTREAMS_FAILURE("invalid mode");
+            boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid mode"));
         params.mode |= BOOST_IOS::in;
     }
     open_impl(params);
@@ -479,10 +483,10 @@ void mapped_file_sink::open(const basic_mapped_file_params<Path>& p)
     param_type params(p);
     if (params.flags) {
         if (params.flags & mapped_file::readonly)
-            throw new BOOST_IOSTREAMS_FAILURE("invalid flags");
+            boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid flags"));
     } else {
         if (params.mode & BOOST_IOS::in)
-            throw new BOOST_IOSTREAMS_FAILURE("invalid mode");
+            boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid mode"));
         params.mode |= BOOST_IOS::out;
     }
     mapped_file::open(params);
@@ -591,3 +595,5 @@ operator^=(mapped_file::mapmode& a, mapped_file::mapmode b)
 } } // End namespaces iostreams, boost.
 
 #include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
+
+#endif // #ifndef BOOST_IOSTREAMS_MAPPED_FILE_HPP_INCLUDED
index 982d432bf3541068e061025b2694cbdce86ffe8a..45fea085a35dff78dcba6cd8242030747f5497cb 100644 (file)
@@ -113,7 +113,7 @@ class BOOST_IOSTREAMS_DECL bzip2_error : public BOOST_IOSTREAMS_FAILURE {
 public:
     explicit bzip2_error(int error);
     int error() const { return error_; }
-    static void check(int error);
+    static void check BOOST_PREVENT_MACRO_SUBSTITUTION(int error);
 private:
     int error_;
 };
@@ -316,7 +316,7 @@ bool bzip2_compressor_impl<Alloc>::filter
     before(src_begin, src_end, dest_begin, dest_end);
     int result = compress(flush ? bzip2::finish : bzip2::run);
     after(src_begin, dest_begin);
-    bzip2_error::check(result);
+    bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
     return result != bzip2::stream_end;
 }
 
@@ -348,7 +348,7 @@ bool bzip2_decompressor_impl<Alloc>::filter
     before(src_begin, src_end, dest_begin, dest_end);
     int result = decompress();
     after(src_begin, dest_begin);
-    bzip2_error::check(result);
+    bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
     return !(eof_ = result == bzip2::stream_end); 
 }
 
index 4faee788bcf02811165eeac04b2d3ead76756be8..112a296472aa9ce41dff968794598e97cc10f431 100644 (file)
 #include <boost/iostreams/detail/adapter/range_adapter.hpp>
 #include <boost/iostreams/detail/char_traits.hpp>
 #include <boost/iostreams/detail/ios.hpp> // failure.
+#include <boost/iostreams/detail/error.hpp>
 #include <boost/iostreams/operations.hpp>
 #include <boost/iostreams/device/back_inserter.hpp>
 #include <boost/iostreams/filter/zlib.hpp>
 #include <boost/iostreams/pipeline.hpp>     
-#include <boost/iostreams/putback.hpp>         
+#include <boost/iostreams/putback.hpp>
+#include <boost/throw_exception.hpp>
 
 // Must come last.
 #if defined(BOOST_MSVC)
@@ -417,7 +419,7 @@ public:
             if (state_ == s_header) {
                 int c = boost::iostreams::get(peek);
                 if (traits_type::is_eof(c)) {
-                    throw gzip_error(gzip::bad_header);
+                    boost::throw_exception(gzip_error(gzip::bad_header));
                 } else if (traits_type::would_block(c)) {
                     break;
                 }
@@ -437,19 +439,19 @@ public:
                         state_ = s_footer;
                     }
                 } catch (const zlib_error& e) {
-                    throw gzip_error(e);
+                    boost::throw_exception(gzip_error(e));
                 }
             } else { // state_ == s_footer
                 int c = boost::iostreams::get(peek);
                 if (traits_type::is_eof(c)) {
-                    throw gzip_error(gzip::bad_footer);
+                    boost::throw_exception(gzip_error(gzip::bad_footer));
                 } else if (traits_type::would_block(c)) {
                     break;
                 }
                 footer_.process(c);
                 if (footer_.done()) {
                     if (footer_.crc() != this->crc())
-                        throw gzip_error(gzip::bad_crc);
+                        boost::throw_exception(gzip_error(gzip::bad_crc));
                     int c = boost::iostreams::get(peek);
                     if (traits_type::is_eof(c)) {
                         state_ = s_done;
@@ -482,7 +484,7 @@ public:
             state_ = s_start;
             header_.reset();
             footer_.reset();
-            throw gzip_error(e);
+            boost::throw_exception(gzip_error(e));
         }
         state_ = s_start;
     }
@@ -530,10 +532,11 @@ private:
         {
             if (offset_) {
                 putback_[--offset_] = c;
-                return true;
             } else {
-                return boost::iostreams::putback(src_, c);
+                boost::throw_exception(
+                    boost::iostreams::detail::bad_putback());
             }
+            return true;
         }
         void putback(const string_type& s)
         {
index d6c5f1fc6418d7a066b056c191e4de243d6e3ff0..279fb9a8317f7c9f148ace911156c63ac1d04f20 100644 (file)
@@ -27,6 +27,7 @@
 #include <boost/iostreams/pipeline.hpp>
 #include <boost/iostreams/putback.hpp>
 #include <boost/mpl/bool.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 
 // Must come last.
@@ -120,11 +121,11 @@ public:
 
     explicit newline_filter(int target) : flags_(target)
     {
-        if ( target != newline::posix &&
-             target != newline::dos &&
-             target != newline::mac )
+        if ( target != iostreams::newline::posix &&
+             target != iostreams::newline::dos &&
+             target != iostreams::newline::mac )
         {
-            throw std::logic_error("bad flags");
+            boost::throw_exception(std::logic_error("bad flags"));
         }
     }
 
@@ -226,12 +227,12 @@ private:
         using iostreams::newline::CR;
         using iostreams::newline::LF;
 
-        switch (flags_ & newline::platform_mask) {
-        case newline::posix:
+        switch (flags_ & iostreams::newline::platform_mask) {
+        case iostreams::newline::posix:
             return LF;
-        case newline::mac:
+        case iostreams::newline::mac:
             return CR;
-        case newline::dos:
+        case iostreams::newline::dos:
             if (flags_ & f_has_LF) {
                 flags_ &= ~f_has_LF;
                 return LF;
@@ -251,14 +252,14 @@ private:
         using iostreams::newline::LF;
 
         bool success = false;
-        switch (flags_ & newline::platform_mask) {
-        case newline::posix:
+        switch (flags_ & iostreams::newline::platform_mask) {
+        case iostreams::newline::posix:
             success = boost::iostreams::put(dest, LF);
             break;
-        case newline::mac:
+        case iostreams::newline::mac:
             success = boost::iostreams::put(dest, CR);
             break;
-        case newline::dos:
+        case iostreams::newline::dos:
             if ((flags_ & f_has_LF) != 0) {
                 if ((success = boost::iostreams::put(dest, LF)))
                     flags_ &= ~f_has_LF;
@@ -420,7 +421,7 @@ public:
         }
     }
 private:
-    void fail() { throw newline_error(source()); }
+    void fail() { boost::throw_exception(newline_error(source())); }
     int& source() { return flags_; }
     int source() const { return flags_; }
 
index 56f7f71c870e2ff25412d43b28a4041a9c5fa07c..f3293566970e0db3c6d7864b2ca195d4cc5c1796 100644 (file)
@@ -20,6 +20,7 @@
 #include <memory>            // allocator, bad_alloc.
 #include <new>          
 #include <boost/config.hpp>  // MSVC, STATIC_CONSTANT, DEDUCED_TYPENAME, DINKUM.
+#include <boost/cstdint.hpp> // uint*_t
 #include <boost/detail/workaround.hpp>
 #include <boost/iostreams/constants.hpp>   // buffer size.
 #include <boost/iostreams/detail/config/auto_link.hpp>
@@ -43,9 +44,9 @@ namespace boost { namespace iostreams {
 namespace zlib {
                     // Typedefs
 
-typedef unsigned int uint;
-typedef unsigned char byte;
-typedef unsigned long ulong;
+typedef uint32_t uint;
+typedef uint8_t byte;
+typedef uint32_t ulong;
 
 // Prefix 'x' prevents symbols from being redefined when Z_PREFIX is defined
 typedef void* (*xalloc_func)(void*, zlib::uint, zlib::uint);
@@ -138,7 +139,7 @@ class BOOST_IOSTREAMS_DECL zlib_error : public BOOST_IOSTREAMS_FAILURE {
 public:
     explicit zlib_error(int error);
     int error() const { return error_; }
-    static void check(int error);
+    static void check BOOST_PREVENT_MACRO_SUBSTITUTION(int error);
 private:
     int error_;
 };
@@ -344,7 +345,7 @@ bool zlib_compressor_impl<Alloc>::filter
     before(src_begin, src_end, dest_begin, dest_end);
     int result = xdeflate(flush ? zlib::finish : zlib::no_flush);
     after(src_begin, dest_begin, true);
-    zlib_error::check(result);
+    zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
     return result != zlib::stream_end; 
 }
 
@@ -377,7 +378,7 @@ bool zlib_decompressor_impl<Alloc>::filter
     before(src_begin, src_end, dest_begin, dest_end);
     int result = xinflate(zlib::sync_flush);
     after(src_begin, dest_begin, false);
-    zlib_error::check(result);
+    zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
     return result != zlib::stream_end;
 }
 
index cb174dd45e3a853e757e8f0975cf6d31aad5d789..12493d935319f352841bde509d226197bdfa186e 100644 (file)
@@ -102,8 +102,10 @@ inline std::fpos_t streampos_to_fpos_t(std::streampos pos)
 inline stream_offset position_to_offset(std::streampos pos)
 {
     return fpos_t_to_offset(streampos_to_fpos_t(pos)) +
-           static_cast<stream_offset>(static_cast<std::streamoff>(pos)) -
-           static_cast<stream_offset>(_FPOSOFF(streampos_to_fpos_t(pos)));
+        static_cast<stream_offset>(
+            static_cast<std::streamoff>(pos) -
+            _FPOSOFF(streampos_to_fpos_t(pos))
+        );
 }
 
 # endif // # ifndef BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS 
index c99d1291b11eda6d23ed28c421297f245f232dd5..4c62d4528b59c718f7c9fb63d2b746b4f376d698 100644 (file)
@@ -22,6 +22,7 @@
 #include <boost/mpl/and.hpp>
 #include <boost/mpl/bool.hpp>
 #include <boost/mpl/or.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 
 namespace boost { namespace iostreams {
@@ -40,7 +41,7 @@ void skip(Device& dev, stream_offset off, mpl::false_)
     for (stream_offset z = 0; z < off; ) {
         typename traits_type::int_type c;
         if (traits_type::is_eof(c = iostreams::get(dev)))
-            throw BOOST_IOSTREAMS_FAILURE("bad skip offset");
+            boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad skip offset"));
         if (!traits_type::would_block(c))
             ++z;
     }
@@ -60,7 +61,7 @@ void skip( Filter& flt, Device& dev, stream_offset off,
     for (stream_offset z = 0; z < off; ) {
         std::streamsize amt;
         if ((amt = iostreams::read(flt, dev, &c, 1)) == -1)
-            throw BOOST_IOSTREAMS_FAILURE("bad skip offset");
+            boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad skip offset"));
         if (amt == 1)
             ++z;
     }
index 6d7ade3f7b1a1329b5020ebe4692f387de8e40ee..0f8a64754e617db3fabc77b9a5f9c1bf2244979b 100644 (file)
@@ -22,6 +22,7 @@
 #include <boost/iostreams/detail/streambuf/indirect_streambuf.hpp>
 #include <boost/iostreams/traits.hpp>
 #include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/type_traits/is_convertible.hpp>
 
 // Must come last.
@@ -99,7 +100,9 @@ private:
     void open_impl(const T& t BOOST_IOSTREAMS_PUSH_PARAMS())
         {   // Used for forwarding.
             if (this->is_open())
-                BOOST_IOSTREAMS_FAILURE("already open");
+                boost::throw_exception(
+                    BOOST_IOSTREAMS_FAILURE("already open")
+                );
             base_type::open(t BOOST_IOSTREAMS_PUSH_ARGS());
         }
 };
index 4f3771a94eedf8af8a303906c0cc2040f1811125..91cb9bd550c50cce10876ee41352f3039aba2d6b 100644 (file)
@@ -83,7 +83,7 @@ struct write_device_impl<ostream_tag> {
     {
         typedef typename char_type_of<T>::type          char_type;
         typedef BOOST_IOSTREAMS_CHAR_TRAITS(char_type)  traits_type;
-        return !traits_type::eq_int_type( t.rdbuf()->s.sputc(),
+        return !traits_type::eq_int_type( t.rdbuf()->sputc(c),
                                           traits_type::eof() );
     }
 
index 2bfa4fb3239b1c85ce68d9df997ebb2d170cd807..384c3de8517b69f18b9b876bd318adbcc4ba6368 100644 (file)
@@ -327,7 +327,7 @@ T hypergeometric_pdf_prime_loop_imp(hypergeometric_pdf_prime_loop_data& data, hy
 template <class T, class Policy>
 inline T hypergeometric_pdf_prime_imp(unsigned x, unsigned r, unsigned n, unsigned N, const Policy&)
 {
-   hypergeometric_pdf_prime_loop_result_entry<T> result = { 1 };
+   hypergeometric_pdf_prime_loop_result_entry<T> result = { 1, 0 };
    hypergeometric_pdf_prime_loop_data data = { x, r, n, N, 0, prime(0) };
    return hypergeometric_pdf_prime_loop_imp<T>(data, result);
 }
index 8e020b7d09f9d7131b6b58e405cfaef570513052..066714adb580a5482a21d1c2185457910882c0f1 100644 (file)
@@ -177,7 +177,9 @@ inline RealType quantile(const fisher_f_distribution<RealType, Policy>& dist, co
             function, p, &error_result, Policy()))
       return error_result;
 
-   RealType x, y;
+   // With optimizations turned on, gcc wrongly warns about y being used 
+   // uninitializated unless we initialize it to something:
+   RealType x, y(0);
 
    x = boost::math::ibeta_inv(df1 / 2, df2 / 2, p, &y, Policy());
 
index d9310638e586f960b84f120b733392168637eca9..1cf37de694243819c7b7da49d1903f6102fcb4d6 100644 (file)
@@ -21,6 +21,7 @@
 #include <boost/math/special_functions/detail/bessel_i0.hpp>
 #include <boost/math/special_functions/detail/bessel_i1.hpp>
 #include <boost/math/special_functions/detail/bessel_kn.hpp>
+#include <boost/math/special_functions/detail/iconv.hpp>
 #include <boost/math/special_functions/sin_pi.hpp>
 #include <boost/math/special_functions/cos_pi.hpp>
 #include <boost/math/special_functions/sinc.hpp>
@@ -145,8 +146,13 @@ T cyl_bessel_j_imp(T v, T x, const bessel_no_int_tag& t, const Policy& pol)
             "Got v = %1%, but require v >= 0 or a negative integer: the result would be complex.", v, pol);
    
    
-   if((v >= 0) && ((x < 1) || (v > x * x / 4)))
+   if((v >= 0) && ((x < 1) || (v > x * x / 4) || (x < 5)))
    {
+      //
+      // This series will actually converge rapidly for all small
+      // x - say up to x < 20 - but the first few terms are large
+      // and divergent which leads to large errors :-(
+      //
       return bessel_j_small_z_series(v, x, pol);
    }
    
@@ -159,13 +165,10 @@ template <class T, class Policy>
 inline T cyl_bessel_j_imp(T v, T x, const bessel_maybe_int_tag&, const Policy& pol)
 {
    BOOST_MATH_STD_USING  // ADL of std names.
-   typedef typename bessel_asymptotic_tag<T, Policy>::type tag_type;
-   if((fabs(v) < 200) && (floor(v) == v))
+   int ival = detail::iconv(v, pol);
+   if((abs(ival) < 200) && (0 == v - ival))
    {
-      if(fabs(x) > asymptotic_bessel_j_limit<T>(v, tag_type()))
-         return asymptotic_bessel_j_large_x_2(v, x);
-      else
-         return bessel_jn(iround(v, pol), x, pol);
+      return bessel_jn(ival/*iround(v, pol)*/, x, pol);
    }
    return cyl_bessel_j_imp(v, x, bessel_no_int_tag(), pol);
 }
@@ -174,16 +177,7 @@ template <class T, class Policy>
 inline T cyl_bessel_j_imp(int v, T x, const bessel_int_tag&, const Policy& pol)
 {
    BOOST_MATH_STD_USING
-   typedef typename bessel_asymptotic_tag<T, Policy>::type tag_type;
-   if(fabs(x) > asymptotic_bessel_j_limit<T>(abs(v), tag_type()))
-   {
-      T r = asymptotic_bessel_j_large_x_2(static_cast<T>(abs(v)), x);
-      if((v < 0) && (v & 1))
-         r = -r;
-      return r;
-   }
-   else
-      return bessel_jn(v, x, pol);
+   return bessel_jn(v, x, pol);
 }
 
 template <class T, class Policy>
index 6e66bcf95c0884c145b2add2b270a62917b68c64..0e17af2424dbd2f44a690cf61bfaded51d935fe4 100644 (file)
@@ -884,21 +884,36 @@ T ibeta_imp(T a, T b, T x, const Policy& pol, bool inv, bool normalised, T* p_de
    if(p_derivative)
       *p_derivative = -1; // value not set.
 
+   if((x < 0) || (x > 1))
+      policies::raise_domain_error<T>(function, "Parameter x outside the range [0,1] in the incomplete beta function (got x=%1%).", x, pol);
+
    if(normalised)
    {
+      if(a < 0)
+         policies::raise_domain_error<T>(function, "The argument a to the incomplete beta function must be >= zero (got a=%1%).", a, pol);
+      if(b < 0)
+         policies::raise_domain_error<T>(function, "The argument b to the incomplete beta function must be >= zero (got b=%1%).", b, pol);
       // extend to a few very special cases:
-      if((a == 0) && (b != 0))
-         return inv ? 0 : 1;
+      if(a == 0)
+      {
+         if(b == 0)
+            policies::raise_domain_error<T>(function, "The arguments a and b to the incomplete beta function cannot both be zero, with x=%1%.", x, pol);
+         if(b > 0)
+            return inv ? 0 : 1;
+      }
       else if(b == 0)
-         return inv ? 1 : 0;
+      {
+         if(a > 0)
+            return inv ? 1 : 0;
+      }
+   }
+   else
+   {
+      if(a <= 0)
+         policies::raise_domain_error<T>(function, "The argument a to the incomplete beta function must be greater than zero (got a=%1%).", a, pol);
+      if(b <= 0)
+         policies::raise_domain_error<T>(function, "The argument b to the incomplete beta function must be greater than zero (got b=%1%).", b, pol);
    }
-
-   if(a <= 0)
-      policies::raise_domain_error<T>(function, "The argument a to the incomplete beta function must be greater than zero (got a=%1%).", a, pol);
-   if(b <= 0)
-      policies::raise_domain_error<T>(function, "The argument b to the incomplete beta function must be greater than zero (got b=%1%).", b, pol);
-   if((x < 0) || (x > 1))
-      policies::raise_domain_error<T>(function, "Parameter x outside the range [0,1] in the incomplete beta function (got x=%1%).", x, pol);
 
    if(x == 0)
    {
index acbc75039c130615e87c7ed02b60ec887ffb6919..e6e5a2ad3296cbf61adb3cde9b6774acc730b8e1 100644 (file)
 #pragma once
 #endif
 
-#include <boost/math/tools/roots.hpp>
+#include <boost/math/tools/rational.hpp>
+#include <boost/math/policies/error_handling.hpp>
 #include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/mpl/divides.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_convertible.hpp>
 
 namespace boost{ namespace math{
 
 namespace detail
 {
 
-   template <class T>
-   struct cbrt_functor
-   {
-       cbrt_functor(T const& target) : a(target){}
-       std::tr1::tuple<T, T, T> operator()(T const& z)
-       {
-         T sqr = z * z;
-         return std::tr1::make_tuple(sqr * z - a, 3 * sqr, 6 * z);
-       }
-   private:
-       T a;
-   };
+template <class T>
+struct largest_cbrt_int_type
+{
+   typedef typename mpl::if_<
+      boost::is_convertible<boost::uintmax_t, T>,
+      boost::uintmax_t,
+      unsigned int
+   >::type type;
+};
 
 template <class T, class Policy>
 T cbrt_imp(T z, const Policy& pol)
 {
    BOOST_MATH_STD_USING
+   //
+   // cbrt approximation for z in the range [0.5,1]
+   // It's hard to say what number of terms gives the optimum
+   // trade off between precision and performance, this seems
+   // to be about the best for double precision.
+   //
+   // Maximum Deviation Found:                     1.231e-006
+   // Expected Error Term:                         -1.231e-006
+   // Maximum Relative Change in Control Points:   5.982e-004
+   //
+   static const T P[] = { 
+      static_cast<T>(0.37568269008611818),
+      static_cast<T>(1.3304968705558024),
+      static_cast<T>(-1.4897101632445036),
+      static_cast<T>(1.2875573098219835),
+      static_cast<T>(-0.6398703759826468),
+      static_cast<T>(0.13584489959258635),
+   };
+   static const T correction[] = {
+      static_cast<T>(0.62996052494743658238360530363911),  // 2^-2/3
+      static_cast<T>(0.79370052598409973737585281963615),  // 2^-1/3
+      static_cast<T>(1),
+      static_cast<T>(1.2599210498948731647672106072782),   // 2^1/3
+      static_cast<T>(1.5874010519681994747517056392723),   // 2^2/3
+   };
+
+   if(!boost::math::isfinite(z))
+   {
+      return policies::raise_domain_error("boost::math::cbrt<%1%>(%1%)", "Argument to function must be finite but got %1%.", z, pol);
+   }
+
    int i_exp, sign(1);
    if(z < 0)
    {
@@ -44,15 +78,73 @@ T cbrt_imp(T z, const Policy& pol)
    if(z == 0)
       return 0;
 
-   frexp(z, &i_exp);
-   T min = static_cast<T>(ldexp(0.5, i_exp/3));
-   T max = static_cast<T>(ldexp(2.0, i_exp/3));
-   T guess = static_cast<T>(ldexp(1.0, i_exp/3));
-   int digits = (policies::digits<T, Policy>()) / 2;
-   boost::uintmax_t max_iter = policies::get_max_root_iterations<Policy>();
-   guess = sign * tools::halley_iterate(detail::cbrt_functor<T>(z), guess, min, max, digits, max_iter);
-   policies::check_root_iterations("boost::math::cbrt<%1%>", max_iter, pol);
-   return guess;
+   T guess = frexp(z, &i_exp);
+   int original_i_exp = i_exp; // save for later
+   guess = tools::evaluate_polynomial(P, guess);
+   int i_exp3 = i_exp / 3;
+
+   typedef typename largest_cbrt_int_type<T>::type shift_type;
+
+   if(abs(i_exp3) < std::numeric_limits<shift_type>::digits)
+   {
+      if(i_exp3 > 0)
+         guess *= shift_type(1u) << i_exp3;
+      else
+         guess /= shift_type(1u) << -i_exp3;
+   }
+   else
+   {
+      guess = ldexp(guess, i_exp3);
+   }
+   i_exp %= 3;
+   guess *= correction[i_exp + 2];
+   //
+   // Now inline Halley iteration.
+   // We do this here rather than calling tools::halley_iterate since we can
+   // simplify the expressions algebraically, and don't need most of the error
+   // checking of the boilerplate version as we know in advance that the function
+   // is well behaved...
+   //
+   typedef typename policies::precision<T, Policy>::type prec;
+   typedef typename mpl::divides<prec, mpl::int_<3> >::type prec3;
+   typedef typename mpl::plus<prec3, mpl::int_<3> >::type new_prec;
+   typedef typename policies::normalise<Policy, policies::digits2<new_prec::value> >::type new_policy;
+   //
+   // Epsilon calculation uses compile time arithmetic when it's available for type T,
+   // otherwise uses ldexp to calculate at runtime:
+   //
+   T eps = (new_prec::value > 3) ? policies::get_epsilon<T, new_policy>() : ldexp(T(1), -2 - tools::digits<T>() / 3);
+   T diff;
+
+   if(original_i_exp < std::numeric_limits<T>::max_exponent - 3)
+   {
+      //
+      // Safe from overflow, use the fast method:
+      //
+      do
+      {
+         T g3 = guess * guess * guess;
+         diff = (g3 + z + z) / (g3 + g3 + z);
+         guess *= diff;
+      }
+      while(fabs(1 - diff) > eps);
+   }
+   else
+   {
+      //
+      // Either we're ready to overflow, or we can't tell because numeric_limits isn't
+      // available for type T:
+      //
+      do
+      {
+         T g2 = guess * guess;
+         diff = (g2 - z / guess) / (2 * guess + z / g2);
+         guess -= diff;
+      }
+      while((guess * eps) < fabs(diff));
+   }
+
+   return sign * guess;
 }
 
 } // namespace detail
index d6ba8d81b5d04e0f9f88da159bbb5641c454b9ee..b759f5408fe856a696d7aeb46fd773238419e25d 100644 (file)
@@ -13,6 +13,7 @@
 #include <boost/math/special_functions/detail/bessel_j0.hpp>
 #include <boost/math/special_functions/detail/bessel_j1.hpp>
 #include <boost/math/special_functions/detail/bessel_jy.hpp>
+#include <boost/math/special_functions/detail/bessel_jy_asym.hpp>
 
 // Bessel function of the first kind of integer order
 // J_n(z) is the minimal solution
@@ -57,6 +58,10 @@ T bessel_jn(int n, T x, const Policy& pol)
         return static_cast<T>(0);
     }
 
+    typedef typename bessel_asymptotic_tag<T, Policy>::type tag_type;
+    if(fabs(x) > asymptotic_bessel_j_limit<T>(n, tag_type()))
+      return factor * asymptotic_bessel_j_large_x_2<T>(n, x);
+
     BOOST_ASSERT(n > 1);
     if (n < abs(x))                         // forward recurrence
     {
index a13b99852fed01d97c546441e67a588a6d7b7d5d..727631691ead0e3c157164fecbbdc7c3d6ba2564 100644 (file)
@@ -16,7 +16,6 @@
 #include <boost/math/special_functions/hypot.hpp>
 #include <boost/math/special_functions/sin_pi.hpp>
 #include <boost/math/special_functions/cos_pi.hpp>
-#include <boost/math/special_functions/detail/simple_complex.hpp>
 #include <boost/math/special_functions/detail/bessel_jy_asym.hpp>
 #include <boost/math/constants/constants.hpp>
 #include <boost/math/policies/error_handling.hpp>
@@ -30,6 +29,45 @@ namespace boost { namespace math {
 
 namespace detail {
 
+//
+// Simultaneous calculation of A&S 9.2.9 and 9.2.10
+// for use in A&S 9.2.5 and 9.2.6.
+// This series is quick to evaluate, but divergent unless
+// x is very large, in fact it's pretty hard to figure out
+// with any degree of precision when this series actually 
+// *will* converge!!  Consequently, we may just have to
+// try it and see...
+//
+template <class T, class Policy>
+bool hankel_PQ(T v, T x, T* p, T* q, const Policy& )
+{
+   BOOST_MATH_STD_USING
+   T tolerance = 2 * policies::get_epsilon<T, Policy>();
+   *p = 1;
+   *q = 0;
+   T k = 1;
+   T z8 = 8 * x;
+   T sq = 1;
+   T mu = 4 * v * v;
+   T term = 1;
+   bool ok = true;
+   do
+   {
+      term *= (mu - sq * sq) / (k * z8);
+      *q += term;
+      k += 1;
+      sq += 2;
+      T mult = (sq * sq - mu) / (k * z8);
+      ok = fabs(mult) < 0.5f;
+      term *= mult;
+      *p += term;
+      k += 1;
+      sq += 2;
+   }
+   while((fabs(term) > tolerance * *p) && ok);
+   return ok;
+}
+
 // Calculate Y(v, x) and Y(v+1, x) by Temme's method, see
 // Temme, Journal of Computational Physics, vol 21, 343 (1976)
 template <typename T, typename Policy>
@@ -76,7 +114,7 @@ int temme_jy(T v, T x, T* Y, T* Y1, const Policy& pol)
     T coef_mult = -x * x / 4;
 
     // series summation
-    tolerance = tools::epsilon<T>();
+    tolerance = policies::get_epsilon<T, Policy>();
     for (k = 1; k < policies::get_max_series_iterations<Policy>(); k++)
     {
         f = (k * f + p + q) / (k*k - v2);
@@ -115,7 +153,7 @@ int CF1_jy(T v, T x, T* fv, int* sign, const Policy& pol)
 
     // modified Lentz's method, see
     // Lentz, Applied Optics, vol 15, 668 (1976)
-    tolerance = 2 * tools::epsilon<T>();
+    tolerance = 2 * policies::get_epsilon<T, Policy>();;
     tiny = sqrt(tools::min_value<T>());
     C = f = tiny;                           // b0 = 0, replace with tiny
     D = 0;
@@ -140,59 +178,87 @@ int CF1_jy(T v, T x, T* fv, int* sign, const Policy& pol)
 
     return 0;
 }
-
-template <class T>
-struct complex_trait
-{
-   typedef typename mpl::if_<is_floating_point<T>,
-      std::complex<T>, sc::simple_complex<T> >::type type;
-};
-
-// Evaluate continued fraction p + iq = (J' + iY') / (J + iY), see
-// Press et al, Numerical Recipes in C, 2nd edition, 1992
+//
+// This algorithm was originally written by Xiaogang Zhang
+// using std::complex to perform the complex arithmetic.
+// However, that turns out to 10x or more slower than using
+// all real-valued arithmetic, so it's been rewritten using
+// real values only.
+//
 template <typename T, typename Policy>
 int CF2_jy(T v, T x, T* p, T* q, const Policy& pol)
 {
-    BOOST_MATH_STD_USING
-
-    typedef typename complex_trait<T>::type complex_type;
-
-    complex_type C, D, f, a, b, delta, one(1);
-    T tiny, zero(0);
-    unsigned long k;
-
-    // |x| >= |v|, CF2_jy converges rapidly
-    // |x| -> 0, CF2_jy fails to converge
-    BOOST_ASSERT(fabs(x) > 1);
-
-    // modified Lentz's method, complex numbers involved, see
-    // Lentz, Applied Optics, vol 15, 668 (1976)
-    T tolerance = 2 * tools::epsilon<T>();
-    tiny = sqrt(tools::min_value<T>());
-    C = f = complex_type(-0.5f/x, 1);
-    D = 0;
-    for (k = 1; k < policies::get_max_series_iterations<Policy>(); k++)
-    {
-        a = (k - 0.5f)*(k - 0.5f) - v*v;
-        if (k == 1)
-        {
-            a *= complex_type(T(0), 1/x);
-        }
-        b = complex_type(2*x, T(2*k));
-        C = b + a / C;
-        D = b + a * D;
-        if (C == zero) { C = tiny; }
-        if (D == zero) { D = tiny; }
-        D = one / D;
-        delta = C * D;
-        f *= delta;
-        if (abs(delta - one) < tolerance) { break; }
-    }
-    policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%) in CF2_jy", k, pol);
-    *p = real(f);
-    *q = imag(f);
-
-    return 0;
+   BOOST_MATH_STD_USING
+
+   T Cr, Ci, Dr, Di, fr, fi, a, br, bi, delta_r, delta_i, temp;
+   T tiny;
+   unsigned long k;
+
+   // |x| >= |v|, CF2_jy converges rapidly
+   // |x| -> 0, CF2_jy fails to converge
+   BOOST_ASSERT(fabs(x) > 1);
+
+   // modified Lentz's method, complex numbers involved, see
+   // Lentz, Applied Optics, vol 15, 668 (1976)
+   T tolerance = 2 * policies::get_epsilon<T, Policy>();
+   tiny = sqrt(tools::min_value<T>());
+   Cr = fr = -0.5f / x;
+   Ci = fi = 1;
+   //Dr = Di = 0;
+   T v2 = v * v;
+   a = (0.25f - v2) / x; // Note complex this one time only!
+   br = 2 * x;
+   bi = 2;
+   temp = Cr * Cr + 1;
+   Ci = bi + a * Cr / temp;
+   Cr = br + a / temp;
+   Dr = br;
+   Di = bi;
+   //std::cout << "C = " << Cr << " " << Ci << std::endl;
+   //std::cout << "D = " << Dr << " " << Di << std::endl;
+   if (fabs(Cr) + fabs(Ci) < tiny) { Cr = tiny; }
+   if (fabs(Dr) + fabs(Di) < tiny) { Dr = tiny; }
+   temp = Dr * Dr + Di * Di;
+   Dr = Dr / temp;
+   Di = -Di / temp;
+   delta_r = Cr * Dr - Ci * Di;
+   delta_i = Ci * Dr + Cr * Di;
+   temp = fr;
+   fr = temp * delta_r - fi * delta_i;
+   fi = temp * delta_i + fi * delta_r;
+   //std::cout << fr << " " << fi << std::endl;
+   for (k = 2; k < policies::get_max_series_iterations<Policy>(); k++)
+   {
+      a = k - 0.5f;
+      a *= a;
+      a -= v2;
+      bi += 2;
+      temp = Cr * Cr + Ci * Ci;
+      Cr = br + a * Cr / temp;
+      Ci = bi - a * Ci / temp;
+      Dr = br + a * Dr;
+      Di = bi + a * Di;
+      //std::cout << "C = " << Cr << " " << Ci << std::endl;
+      //std::cout << "D = " << Dr << " " << Di << std::endl;
+      if (fabs(Cr) + fabs(Ci) < tiny) { Cr = tiny; }
+      if (fabs(Dr) + fabs(Di) < tiny) { Dr = tiny; }
+      temp = Dr * Dr + Di * Di;
+      Dr = Dr / temp;
+      Di = -Di / temp;
+      delta_r = Cr * Dr - Ci * Di;
+      delta_i = Ci * Dr + Cr * Di;
+      temp = fr;
+      fr = temp * delta_r - fi * delta_i;
+      fi = temp * delta_i + fi * delta_r;
+      if (fabs(delta_r - 1) + fabs(delta_i) < tolerance)
+         break;
+      //std::cout << fr << " " << fi << std::endl;
+   }
+   policies::check_series_iterations("boost::math::bessel_jy<%1%>(%1%,%1%) in CF2_jy", k, pol);
+   *p = fr;
+   *q = fi;
+
+   return 0;
 }
 
 enum
@@ -237,7 +303,22 @@ int bessel_jy(T v, T x, T* J, T* Y, int kind, const Policy& pol)
 
     // x is positive until reflection
     W = T(2) / (x * pi<T>());               // Wronskian
-    if (x <= 2)                           // x in (0, 2]
+    if((x > 8) && (x < 1000) && hankel_PQ(v, x, &p, &q, pol))
+    {
+       //
+       // Hankel approximation: note that this method works best when x 
+       // is large, but in that case we end up calculating sines and cosines
+       // of large values, with horrendous resulting accuracy.  It is fast though
+       // when it works....
+       //
+       T chi = x - fmod(T(v / 2 + 0.25f), T(2)) * boost::math::constants::pi<T>();
+       T sc = sin(chi);
+       T cc = cos(chi);
+       chi = sqrt(2 / (boost::math::constants::pi<T>() * x));
+       Yv = chi * (p * sc + q * cc);
+       Jv = chi * (p * cc - q * sc);
+    }
+    else if (x <= 2)                           // x in (0, 2]
     {
         if(temme_jy(u, x, &Yu, &Yu1, pol))             // Temme series
         {
diff --git a/deal.II/contrib/boost/include/boost/math/special_functions/detail/iconv.hpp b/deal.II/contrib/boost/include/boost/math/special_functions/detail/iconv.hpp
new file mode 100644 (file)
index 0000000..1d0dc94
--- /dev/null
@@ -0,0 +1,41 @@
+//  Copyright (c) 2009 John Maddock
+//  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)
+
+#ifndef BOOST_MATH_ICONV_HPP
+#define BOOST_MATH_ICONV_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/special_functions/round.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+namespace boost { namespace math { namespace detail{
+
+template <class T, class Policy>
+inline int iconv_imp(T v, Policy const&, mpl::true_ const&)
+{
+   return static_cast<int>(v);
+}
+
+template <class T, class Policy>
+inline int iconv_imp(T v, Policy const& pol, mpl::false_ const&)
+{
+   return boost::math::iround(v);
+}
+
+template <class T, class Policy>
+inline int iconv(T v, Policy const& pol)
+{
+   typedef typename boost::is_convertible<T, int>::type tag_type;
+   return iconv_imp(v, pol, tag_type());
+}
+
+
+}}} // namespaces
+
+#endif // BOOST_MATH_ICONV_HPP
+
index a62568647a22fb93287aecc67ee332ff70051bbe..a7dce6f99b5667f5d1ba1fc789456800191f6425 100644 (file)
@@ -277,7 +277,7 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol, bool* p_has_10_digits)
          T ap1 = a + 1;
          if(w < 0.15f * ap1)
          {
-         // DiDonato and Morris Eq 35:
+            // DiDonato and Morris Eq 35:
             T v = log(p) + boost::math::lgamma(ap1, pol);
             T s = 1;
             z = exp((v + w) / a);
@@ -286,7 +286,7 @@ T find_inverse_gamma(T a, T p, T q, const Policy& pol, bool* p_has_10_digits)
             z = exp((v + z - s) / a);
             s = boost::math::log1p(z / ap1 * (1 + z / (a + 2) * (1 + z / (a + 3))));
             z = exp((v + z - s) / a);
-         BOOST_MATH_INSTRUMENT_VARIABLE(z);
+            BOOST_MATH_INSTRUMENT_VARIABLE(z);
          }
 
          if((z <= 0.01 * ap1) || (z > 0.7 * ap1))
index bd2e91f98e509ea2e4886d61dc94b281c2b3081e..a58935f4e7eb35ce2946c5c813cbd3271a58b9c9 100644 (file)
@@ -430,7 +430,7 @@ inline T fast_students_t_quantile_imp(T df, T p, const Policy& pol, const mpl::f
    // required precision so not so fast:
    //
    T probability = (p > 0.5) ? 1 - p : p;
-   T t, x, y;
+   T t, x, y(0);
    x = ibeta_inv(df / 2, T(0.5), 2 * probability, &y, pol);
    if(df * y > tools::max_value<T>() * x)
       t = policies::raise_overflow_error<T>("boost::math::students_t_quantile<%1%>(%1%,%1%)", 0, pol);
index 23579cee58372488b97fdcd07f5c99a02785b725..5c23f49784d149b31ed637c8d9d6ad0e9ef42d9a 100644 (file)
@@ -199,14 +199,14 @@ T erf_imp(T z, bool invert, const Policy& pol, const mpl::int_<53>& t)
       //
       if(z < 1e-10)
       {
-      if(z == 0)
-      {
-         result = T(0);
-      }
+         if(z == 0)
+         {
+            result = T(0);
+         }
          else
-      {
-         result = static_cast<T>(z * 1.125f + z * 0.003379167095512573896158903121545171688L);
-      }
+         {
+            result = static_cast<T>(z * 1.125f + z * 0.003379167095512573896158903121545171688L);
+         }
       }
       else
       {
index 0ecc576bfbfafed3e39ee67fd3a606036abdb92e..d3dc42b0caf6ba98fe4d6e51d6f09288b5745ecb 100644 (file)
@@ -106,7 +106,7 @@ inline bool is_nan_helper(T t, const boost::true_type&)
 }
 
 template <class T>
-inline bool is_nan_helper(T t, const boost::false_type&)
+inline bool is_nan_helper(T, const boost::false_type&)
 {
    return false;
 }
@@ -390,6 +390,7 @@ namespace detail {
     template<class T> 
     inline bool isinf_impl(T x, generic_tag<true> const&)
     {
+        (void)x; // in case the compiler thinks that x is unused because std::numeric_limits<T>::has_infinity is false
         return std::numeric_limits<T>::has_infinity 
             && ( x == std::numeric_limits<T>::infinity()
                  || x == -std::numeric_limits<T>::infinity());
index abf8bbc110b0fb902d094ba8c9db13b86b64674a..f809fa6f40634bd346b8275bfd815e6e9f45661c 100644 (file)
@@ -1048,7 +1048,7 @@ T gamma_incomplete_imp(T a, T x, bool normalised, bool invert,
             *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
          break;
       }
-         }
+   }
 
    if(normalised && (result > 1))
       result = 1;
index daf24602417d0d1579b0525d8b353da276dd26c1..e7eb4c23ffa86f0d3af26f8f75c341e573cefb05 100644 (file)
 // Tune performance options for specific compilers:
 //
 #ifdef BOOST_MSVC
-#  define BOOST_MATH_POLY_METHOD 3
+#  define BOOST_MATH_POLY_METHOD 2
 #elif defined(BOOST_INTEL)
 #  define BOOST_MATH_POLY_METHOD 2
 #  define BOOST_MATH_RATIONAL_METHOD 2
index e9de6a54f24258376b403d3933e00de15ff1064e..0966f8bdfcd1b20e6e2c791c6ae55a2d6e593a40 100644 (file)
@@ -11,6 +11,8 @@
 #pragma once
 #endif
 
+#include <math.h> // So we can check which std C lib we're using
+
 #ifdef __cplusplus
 
 #include <boost/config.hpp>
@@ -39,6 +41,15 @@ namespace boost{ namespace math{ namespace tr1{ extern "C"{
 #ifndef BOOST_MATH_TR1_DECL
 #define BOOST_MATH_TR1_DECL
 #endif
+//
+// Set any throw specifications on the C99 extern "C" functions - these have to be
+// the same as used in the std lib if any.
+//
+#if defined(__GLIBC__) && defined(__THROW)
+#  define BOOST_MATH_C99_THROW_SPEC __THROW
+#else
+#  define BOOST_MATH_C99_THROW_SPEC
+#endif
 
 //
 // Now set up the libraries to link against:
@@ -109,260 +120,260 @@ typedef long double double_t;
 #endif
 
 // C99 Functions:
-double BOOST_MATH_TR1_DECL acosh BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL acoshf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL acoshl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL acosh BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL acoshf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL acoshl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 
-double BOOST_MATH_TR1_DECL asinh BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL asinhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL asinhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL asinh BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL asinhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL asinhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 
-double BOOST_MATH_TR1_DECL atanh BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL atanhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL atanhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL atanh BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL atanhf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL atanhl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 
-double BOOST_MATH_TR1_DECL cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL cbrtf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL cbrtl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL cbrtf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL cbrtl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 
-double BOOST_MATH_TR1_DECL copysign BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
-float BOOST_MATH_TR1_DECL copysignf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
-long double BOOST_MATH_TR1_DECL copysignl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+double BOOST_MATH_TR1_DECL copysign BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL copysignf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL copysignl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) BOOST_MATH_C99_THROW_SPEC;
 
-double BOOST_MATH_TR1_DECL erf BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL erff BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL erfl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL erf BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL erff BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL erfl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 
-double BOOST_MATH_TR1_DECL erfc BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL erfcf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL erfcl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL erfc BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL erfcf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL erfcl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 #if 0
-double BOOST_MATH_TR1_DECL exp2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL exp2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL exp2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL exp2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL exp2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL exp2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 #endif
-double BOOST_MATH_TR1_DECL boost_expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL boost_expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL boost_expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL boost_expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL boost_expm1f BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL boost_expm1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 #if 0
-double BOOST_MATH_TR1_DECL fdim BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
-float BOOST_MATH_TR1_DECL fdimf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
-long double BOOST_MATH_TR1_DECL fdiml BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
-double BOOST_MATH_TR1_DECL fma BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, double z);
-float BOOST_MATH_TR1_DECL fmaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, float z);
-long double BOOST_MATH_TR1_DECL fmal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, long double z);
-#endif
-double BOOST_MATH_TR1_DECL fmax BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
-float BOOST_MATH_TR1_DECL fmaxf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
-long double BOOST_MATH_TR1_DECL fmaxl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
-
-double BOOST_MATH_TR1_DECL fmin BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
-float BOOST_MATH_TR1_DECL fminf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
-long double BOOST_MATH_TR1_DECL fminl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
-
-double BOOST_MATH_TR1_DECL hypot BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
-float BOOST_MATH_TR1_DECL hypotf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
-long double BOOST_MATH_TR1_DECL hypotl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+double BOOST_MATH_TR1_DECL fdim BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL fdimf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL fdiml BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) BOOST_MATH_C99_THROW_SPEC;
+double BOOST_MATH_TR1_DECL fma BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, double z) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL fmaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, float z) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL fmal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, long double z) BOOST_MATH_C99_THROW_SPEC;
+#endif
+double BOOST_MATH_TR1_DECL fmax BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL fmaxf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL fmaxl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) BOOST_MATH_C99_THROW_SPEC;
+
+double BOOST_MATH_TR1_DECL fmin BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL fminf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL fminl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) BOOST_MATH_C99_THROW_SPEC;
+
+double BOOST_MATH_TR1_DECL hypot BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL hypotf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL hypotl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) BOOST_MATH_C99_THROW_SPEC;
 #if 0
-int BOOST_MATH_TR1_DECL ilogb BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-int BOOST_MATH_TR1_DECL ilogbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-int BOOST_MATH_TR1_DECL ilogbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+int BOOST_MATH_TR1_DECL ilogb BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+int BOOST_MATH_TR1_DECL ilogbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+int BOOST_MATH_TR1_DECL ilogbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 #endif
-double BOOST_MATH_TR1_DECL lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL lgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL lgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL lgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 #ifdef BOOST_HAS_LONG_LONG
 #if 0
-::boost::long_long_type BOOST_MATH_TR1_DECL llrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-::boost::long_long_type BOOST_MATH_TR1_DECL llrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-::boost::long_long_type BOOST_MATH_TR1_DECL llrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+::boost::long_long_type BOOST_MATH_TR1_DECL llrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+::boost::long_long_type BOOST_MATH_TR1_DECL llrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+::boost::long_long_type BOOST_MATH_TR1_DECL llrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 #endif
-::boost::long_long_type BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-::boost::long_long_type BOOST_MATH_TR1_DECL llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-::boost::long_long_type BOOST_MATH_TR1_DECL llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+::boost::long_long_type BOOST_MATH_TR1_DECL llround BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+::boost::long_long_type BOOST_MATH_TR1_DECL llroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+::boost::long_long_type BOOST_MATH_TR1_DECL llroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 #endif
-double BOOST_MATH_TR1_DECL boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL boost_log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL boost_log1p BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL boost_log1pf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL boost_log1pl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 #if 0
-double BOOST_MATH_TR1_DECL log2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL log2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL log2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
-
-double BOOST_MATH_TR1_DECL logb BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL logbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL logbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
-long BOOST_MATH_TR1_DECL lrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-long BOOST_MATH_TR1_DECL lrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long BOOST_MATH_TR1_DECL lrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
-#endif
-long BOOST_MATH_TR1_DECL lround BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-long BOOST_MATH_TR1_DECL lroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long BOOST_MATH_TR1_DECL lroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL log2 BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL log2f BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL log2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
+
+double BOOST_MATH_TR1_DECL logb BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL logbf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL logbl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
+long BOOST_MATH_TR1_DECL lrint BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+long BOOST_MATH_TR1_DECL lrintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long BOOST_MATH_TR1_DECL lrintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
+#endif
+long BOOST_MATH_TR1_DECL lround BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+long BOOST_MATH_TR1_DECL lroundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long BOOST_MATH_TR1_DECL lroundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 #if 0
-double BOOST_MATH_TR1_DECL nan BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str);
-float BOOST_MATH_TR1_DECL nanf BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str);
-long double BOOST_MATH_TR1_DECL nanl BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str);
-double BOOST_MATH_TR1_DECL nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL nearbyintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL nearbyintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
-#endif
-double BOOST_MATH_TR1_DECL boost_nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
-float BOOST_MATH_TR1_DECL boost_nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
-long double BOOST_MATH_TR1_DECL boost_nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
-
-double BOOST_MATH_TR1_DECL nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long double y);
-float BOOST_MATH_TR1_DECL nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y);
-long double BOOST_MATH_TR1_DECL nexttowardl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+double BOOST_MATH_TR1_DECL nan BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL nanf BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL nanl BOOST_PREVENT_MACRO_SUBSTITUTION(const char *str) BOOST_MATH_C99_THROW_SPEC;
+double BOOST_MATH_TR1_DECL nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL nearbyintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL nearbyintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
+#endif
+double BOOST_MATH_TR1_DECL boost_nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL boost_nextafterf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL boost_nextafterl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) BOOST_MATH_C99_THROW_SPEC;
+
+double BOOST_MATH_TR1_DECL nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long double y) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL nexttowardf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long double y) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL nexttowardl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) BOOST_MATH_C99_THROW_SPEC;
 #if 0
-double BOOST_MATH_TR1_DECL remainder BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
-float BOOST_MATH_TR1_DECL remainderf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
-long double BOOST_MATH_TR1_DECL remainderl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
-double BOOST_MATH_TR1_DECL remquo BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, int *pquo);
-float BOOST_MATH_TR1_DECL remquof BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, int *pquo);
-long double BOOST_MATH_TR1_DECL remquol BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, int *pquo);
-double BOOST_MATH_TR1_DECL rint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL rintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL rintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
-#endif
-double BOOST_MATH_TR1_DECL round BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL roundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL roundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL remainder BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL remainderf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL remainderl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) BOOST_MATH_C99_THROW_SPEC;
+double BOOST_MATH_TR1_DECL remquo BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y, int *pquo) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL remquof BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y, int *pquo) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL remquol BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y, int *pquo) BOOST_MATH_C99_THROW_SPEC;
+double BOOST_MATH_TR1_DECL rint BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL rintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL rintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
+#endif
+double BOOST_MATH_TR1_DECL round BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL roundf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL roundl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 #if 0
-double BOOST_MATH_TR1_DECL scalbln BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long ex);
-float BOOST_MATH_TR1_DECL scalblnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long ex);
-long double BOOST_MATH_TR1_DECL scalblnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long ex);
-double BOOST_MATH_TR1_DECL scalbn BOOST_PREVENT_MACRO_SUBSTITUTION(double x, int ex);
-float BOOST_MATH_TR1_DECL scalbnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, int ex);
-long double BOOST_MATH_TR1_DECL scalbnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, int ex);
+double BOOST_MATH_TR1_DECL scalbln BOOST_PREVENT_MACRO_SUBSTITUTION(double x, long ex) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL scalblnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, long ex) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL scalblnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long ex) BOOST_MATH_C99_THROW_SPEC;
+double BOOST_MATH_TR1_DECL scalbn BOOST_PREVENT_MACRO_SUBSTITUTION(double x, int ex) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL scalbnf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, int ex) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL scalbnl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, int ex) BOOST_MATH_C99_THROW_SPEC;
 #endif
-double BOOST_MATH_TR1_DECL tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL tgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL tgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL tgammaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL tgammal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 
-double BOOST_MATH_TR1_DECL trunc BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL truncf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL truncl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL trunc BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL truncf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL truncl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.1] associated Laguerre polynomials:
-double BOOST_MATH_TR1_DECL assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, double x);
-float BOOST_MATH_TR1_DECL assoc_laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x);
-long double BOOST_MATH_TR1_DECL assoc_laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x);
+double BOOST_MATH_TR1_DECL assoc_laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL assoc_laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL assoc_laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, unsigned m, long double x) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.2] associated Legendre functions:
-double BOOST_MATH_TR1_DECL assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double x);
-float BOOST_MATH_TR1_DECL assoc_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float x);
-long double BOOST_MATH_TR1_DECL assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x);
+double BOOST_MATH_TR1_DECL assoc_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL assoc_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL assoc_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double x) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.3] beta function:
-double BOOST_MATH_TR1_DECL beta BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y);
-float BOOST_MATH_TR1_DECL betaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y);
-long double BOOST_MATH_TR1_DECL betal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y);
+double BOOST_MATH_TR1_DECL beta BOOST_PREVENT_MACRO_SUBSTITUTION(double x, double y) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL betaf BOOST_PREVENT_MACRO_SUBSTITUTION(float x, float y) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL betal BOOST_PREVENT_MACRO_SUBSTITUTION(long double x, long double y) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.4] (complete) elliptic integral of the first kind:
-double BOOST_MATH_TR1_DECL comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k);
-float BOOST_MATH_TR1_DECL comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k);
-long double BOOST_MATH_TR1_DECL comp_ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k);
+double BOOST_MATH_TR1_DECL comp_ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL comp_ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL comp_ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.5] (complete) elliptic integral of the second kind:
-double BOOST_MATH_TR1_DECL comp_ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k);
-float BOOST_MATH_TR1_DECL comp_ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k);
-long double BOOST_MATH_TR1_DECL comp_ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k);
+double BOOST_MATH_TR1_DECL comp_ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL comp_ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL comp_ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.6] (complete) elliptic integral of the third kind:
-double BOOST_MATH_TR1_DECL comp_ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu);
-float BOOST_MATH_TR1_DECL comp_ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu);
-long double BOOST_MATH_TR1_DECL comp_ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu);
+double BOOST_MATH_TR1_DECL comp_ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL comp_ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL comp_ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu) BOOST_MATH_C99_THROW_SPEC;
 #if 0
 // [5.2.1.7] confluent hypergeometric functions:
-double BOOST_MATH_TR1_DECL conf_hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double c, double x);
-float BOOST_MATH_TR1_DECL conf_hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float c, float x);
-long double BOOST_MATH_TR1_DECL conf_hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double c, long double x);
+double BOOST_MATH_TR1_DECL conf_hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double c, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL conf_hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float c, float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL conf_hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double c, long double x) BOOST_MATH_C99_THROW_SPEC;
 #endif
 // [5.2.1.8] regular modified cylindrical Bessel functions:
-double BOOST_MATH_TR1_DECL cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x);
-float BOOST_MATH_TR1_DECL cyl_bessel_if BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x);
-long double BOOST_MATH_TR1_DECL cyl_bessel_il BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x);
+double BOOST_MATH_TR1_DECL cyl_bessel_i BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL cyl_bessel_if BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL cyl_bessel_il BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.9] cylindrical Bessel functions (of the first kind):
-double BOOST_MATH_TR1_DECL cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x);
-float BOOST_MATH_TR1_DECL cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x);
-long double BOOST_MATH_TR1_DECL cyl_bessel_jl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x);
+double BOOST_MATH_TR1_DECL cyl_bessel_j BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL cyl_bessel_jf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL cyl_bessel_jl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.10] irregular modified cylindrical Bessel functions:
-double BOOST_MATH_TR1_DECL cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x);
-float BOOST_MATH_TR1_DECL cyl_bessel_kf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x);
-long double BOOST_MATH_TR1_DECL cyl_bessel_kl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x);
+double BOOST_MATH_TR1_DECL cyl_bessel_k BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL cyl_bessel_kf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL cyl_bessel_kl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) BOOST_MATH_C99_THROW_SPEC;
 
-// [5.2.1.11] cylindrical Neumann functions;
+// [5.2.1.11] cylindrical Neumann functions BOOST_MATH_C99_THROW_SPEC;
 // cylindrical Bessel functions (of the second kind):
-double BOOST_MATH_TR1_DECL cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x);
-float BOOST_MATH_TR1_DECL cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x);
-long double BOOST_MATH_TR1_DECL cyl_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x);
+double BOOST_MATH_TR1_DECL cyl_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(double nu, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL cyl_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(float nu, float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL cyl_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(long double nu, long double x) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.12] (incomplete) elliptic integral of the first kind:
-double BOOST_MATH_TR1_DECL ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi);
-float BOOST_MATH_TR1_DECL ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi);
-long double BOOST_MATH_TR1_DECL ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi);
+double BOOST_MATH_TR1_DECL ellint_1 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL ellint_1f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL ellint_1l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.13] (incomplete) elliptic integral of the second kind:
-double BOOST_MATH_TR1_DECL ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi);
-float BOOST_MATH_TR1_DECL ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi);
-long double BOOST_MATH_TR1_DECL ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi);
+double BOOST_MATH_TR1_DECL ellint_2 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double phi) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL ellint_2f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float phi) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL ellint_2l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double phi) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.14] (incomplete) elliptic integral of the third kind:
-double BOOST_MATH_TR1_DECL ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu, double phi);
-float BOOST_MATH_TR1_DECL ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu, float phi);
-long double BOOST_MATH_TR1_DECL ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu, long double phi);
+double BOOST_MATH_TR1_DECL ellint_3 BOOST_PREVENT_MACRO_SUBSTITUTION(double k, double nu, double phi) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL ellint_3f BOOST_PREVENT_MACRO_SUBSTITUTION(float k, float nu, float phi) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL ellint_3l BOOST_PREVENT_MACRO_SUBSTITUTION(long double k, long double nu, long double phi) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.15] exponential integral:
-double BOOST_MATH_TR1_DECL expint BOOST_PREVENT_MACRO_SUBSTITUTION(double x);
-float BOOST_MATH_TR1_DECL expintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x);
-long double BOOST_MATH_TR1_DECL expintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x);
+double BOOST_MATH_TR1_DECL expint BOOST_PREVENT_MACRO_SUBSTITUTION(double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL expintf BOOST_PREVENT_MACRO_SUBSTITUTION(float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL expintl BOOST_PREVENT_MACRO_SUBSTITUTION(long double x) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.16] Hermite polynomials:
-double BOOST_MATH_TR1_DECL hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x);
-float BOOST_MATH_TR1_DECL hermitef BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x);
-long double BOOST_MATH_TR1_DECL hermitel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x);
+double BOOST_MATH_TR1_DECL hermite BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL hermitef BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL hermitel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) BOOST_MATH_C99_THROW_SPEC;
 
 #if 0
 // [5.2.1.17] hypergeometric functions:
-double BOOST_MATH_TR1_DECL hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double b, double c, double x);
-float BOOST_MATH_TR1_DECL hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float b, float c, float x);
+double BOOST_MATH_TR1_DECL hyperg BOOST_PREVENT_MACRO_SUBSTITUTION(double a, double b, double c, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL hypergf BOOST_PREVENT_MACRO_SUBSTITUTION(float a, float b, float c, float x) BOOST_MATH_C99_THROW_SPEC;
 long double BOOST_MATH_TR1_DECL hypergl BOOST_PREVENT_MACRO_SUBSTITUTION(long double a, long double b, long double c,
-long double x);
+long double x) BOOST_MATH_C99_THROW_SPEC;
 #endif
 
 // [5.2.1.18] Laguerre polynomials:
-double BOOST_MATH_TR1_DECL laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x);
-float BOOST_MATH_TR1_DECL laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x);
-long double BOOST_MATH_TR1_DECL laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x);
+double BOOST_MATH_TR1_DECL laguerre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL laguerref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL laguerrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.19] Legendre polynomials:
-double BOOST_MATH_TR1_DECL legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, double x);
-float BOOST_MATH_TR1_DECL legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, float x);
-long double BOOST_MATH_TR1_DECL legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, long double x);
+double BOOST_MATH_TR1_DECL legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, long double x) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.20] Riemann zeta function:
-double BOOST_MATH_TR1_DECL riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(double);
-float BOOST_MATH_TR1_DECL riemann_zetaf BOOST_PREVENT_MACRO_SUBSTITUTION(float);
-long double BOOST_MATH_TR1_DECL riemann_zetal BOOST_PREVENT_MACRO_SUBSTITUTION(long double);
+double BOOST_MATH_TR1_DECL riemann_zeta BOOST_PREVENT_MACRO_SUBSTITUTION(double) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL riemann_zetaf BOOST_PREVENT_MACRO_SUBSTITUTION(float) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL riemann_zetal BOOST_PREVENT_MACRO_SUBSTITUTION(long double) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.21] spherical Bessel functions (of the first kind):
-double BOOST_MATH_TR1_DECL sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x);
-float BOOST_MATH_TR1_DECL sph_besself BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x);
-long double BOOST_MATH_TR1_DECL sph_bessell BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x);
+double BOOST_MATH_TR1_DECL sph_bessel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL sph_besself BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL sph_bessell BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) BOOST_MATH_C99_THROW_SPEC;
 
 // [5.2.1.22] spherical associated Legendre functions:
-double BOOST_MATH_TR1_DECL sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double theta);
-float BOOST_MATH_TR1_DECL sph_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float theta);
-long double BOOST_MATH_TR1_DECL sph_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double theta);
+double BOOST_MATH_TR1_DECL sph_legendre BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, double theta) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL sph_legendref BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, float theta) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL sph_legendrel BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned l, unsigned m, long double theta) BOOST_MATH_C99_THROW_SPEC;
 
-// [5.2.1.23] spherical Neumann functions;
+// [5.2.1.23] spherical Neumann functions BOOST_MATH_C99_THROW_SPEC;
 // spherical Bessel functions (of the second kind):
-double BOOST_MATH_TR1_DECL sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x);
-float BOOST_MATH_TR1_DECL sph_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x);
-long double BOOST_MATH_TR1_DECL sph_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x);
+double BOOST_MATH_TR1_DECL sph_neumann BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, double x) BOOST_MATH_C99_THROW_SPEC;
+float BOOST_MATH_TR1_DECL sph_neumannf BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, float x) BOOST_MATH_C99_THROW_SPEC;
+long double BOOST_MATH_TR1_DECL sph_neumannl BOOST_PREVENT_MACRO_SUBSTITUTION(unsigned n, long double x) BOOST_MATH_C99_THROW_SPEC;
 
 #ifdef __cplusplus
 
index 2524e8aa43c4cfeb4965e96aa01335df4580e045..4945af623b265a3f298d261038202235200e5079 100644 (file)
@@ -11,7 +11,7 @@
 //
 //  Defines enum boost::memory_order per the C++0x working draft
 //
-//  Copyright (c) 2008 Peter Dimov
+//  Copyright (c) 2008, 2009 Peter Dimov
 //
 //  Distributed under the Boost Software License, Version 1.0.
 //  See accompanying file LICENSE_1_0.txt or copy at
 namespace boost
 {
 
+//
+// Enum values are chosen so that code that needs to insert
+// a trailing fence for acquire semantics can use a single
+// test such as:
+//
+// if( mo & memory_order_acquire ) { ...fence... }
+//
+// For leading fences one can use:
+//
+// if( mo & memory_order_release ) { ...fence... }
+//
+// Architectures such as Alpha that need a fence on consume
+// can use:
+//
+// if( mo & ( memory_order_acquire | memory_order_consume ) ) { ...fence... }
+//
+
 enum memory_order
 {
     memory_order_relaxed = 0,
     memory_order_acquire = 1,
     memory_order_release = 2,
     memory_order_acq_rel = 3, // acquire | release
-    memory_order_seq_cst = 7  // acq_rel | 4
+    memory_order_seq_cst = 7, // acq_rel | 4
+    memory_order_consume = 8
 };
 
 } // namespace boost
index 3e7bfba1eaececa1e9d847aba25dffa70bce7011..daec4b8a8e17fa1ba82decda707e741f13370879 100644 (file)
@@ -6,11 +6,10 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 
-// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
+// *Preprocessed* version of the main "template_arity.hpp" header
 // -- DO NOT modify by hand!
 
 namespace boost { namespace mpl { namespace aux {
-
 template< int N > struct arity_tag
 {
     typedef char (&type)[N + 1];
@@ -23,7 +22,6 @@ struct max_arity
 {
     BOOST_STATIC_CONSTANT(int, value =
           ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) )
-
         );
 };
 
@@ -83,7 +81,7 @@ template< typename F, int N >
 struct template_arity_impl
 {
     BOOST_STATIC_CONSTANT(int, value =
-          sizeof(arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1
+          sizeof(::boost::mpl::aux::arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1
         );
 };
 
@@ -92,9 +90,7 @@ struct template_arity
 {
     BOOST_STATIC_CONSTANT(int, value  = (
           max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value
-
         ));
-
     typedef mpl::int_<value> type;
 };
 
index 47e4eeb54fb88583b4fad187f788110ed73e0f63..ed26ea24bb9dc84f6c8fb7e7f03cd53d219688db 100644 (file)
@@ -14,9 +14,9 @@
 //
 // See http://www.boost.org/libs/mpl for documentation.
 
-// $Id: template_arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
-// $Revision: 49267 $
+// $Id: template_arity.hpp 61584 2010-04-26 18:48:26Z agurtovoy $
+// $Date: 2010-04-26 14:48:26 -0400 (Mon, 26 Apr 2010) $
+// $Revision: 61584 $
 
 #include <boost/mpl/aux_/config/ttp.hpp>
 #include <boost/mpl/aux_/config/lambda.hpp>
@@ -98,7 +98,7 @@ template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) >
 struct template_arity_impl
 {
     BOOST_STATIC_CONSTANT(int, value = 
-          sizeof(arity_helper(type_wrapper<F>(),arity_tag<N>())) - 1
+          sizeof(::boost::mpl::aux::arity_helper(type_wrapper<F>(),arity_tag<N>())) - 1
         );
 };
 
index 7e8e1ac716722196cead95fc5ebfecb76a174605..fc5225f5f6114f249843b1b3eabd5d14c5bd653e 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
 #define BOOST_MPL_ZIP_VIEW_HPP_INCLUDED
 
-// Copyright Aleksey Gurtovoy 2000-2002
+// Copyright Aleksey Gurtovoy 2000-2010
 // Copyright David Abrahams 2000-2002
 //
 // Distributed under the Boost Software License, Version 1.0.
@@ -11,9 +11,9 @@
 //
 // See http://www.boost.org/libs/mpl for documentation.
 
-// $Id: zip_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
-// $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
-// $Revision: 49267 $
+// $Id: zip_view.hpp 61591 2010-04-26 21:31:09Z agurtovoy $
+// $Date: 2010-04-26 17:31:09 -0400 (Mon, 26 Apr 2010) $
+// $Revision: 61591 $
 
 #include <boost/mpl/transform.hpp>
 #include <boost/mpl/begin_end.hpp>
@@ -53,6 +53,7 @@ struct zip_view
     
  public:
     typedef nested_begin_end_tag tag;
+    typedef zip_view type;
     typedef zip_iterator<first_ones_> begin;
     typedef zip_iterator<last_ones_> end;
 };
diff --git a/deal.II/contrib/boost/include/boost/multi_index/detail/serialization_version.hpp b/deal.II/contrib/boost/include/boost/multi_index/detail/serialization_version.hpp
new file mode 100644 (file)
index 0000000..03bf24e
--- /dev/null
@@ -0,0 +1,75 @@
+/* Copyright 2003-2010 Joaquin M Lopez Munoz.
+ * 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 http://www.boost.org/libs/multi_index for library home page.
+ */
+
+#ifndef BOOST_MULTI_INDEX_DETAIL_SERIALIZATION_VERSION_HPP
+#define BOOST_MULTI_INDEX_DETAIL_SERIALIZATION_VERSION_HPP
+
+#if defined(_MSC_VER)&&(_MSC_VER>=1200)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <boost/serialization/split_member.hpp>
+#include <boost/serialization/version.hpp>
+
+namespace boost{
+
+namespace multi_index{
+
+namespace detail{
+
+/* Helper class for storing and retrieving a given type serialization class
+ * version while avoiding saving the number multiple times in the same
+ * archive.
+ * Behavior undefined if template partial specialization is not supported.
+ */
+
+template<typename T>
+struct serialization_version
+{
+  serialization_version():
+    value(boost::serialization::version<serialization_version>::value){}
+
+  serialization_version& operator=(unsigned int x){value=x;return *this;};
+
+  operator unsigned int()const{return value;}
+
+private:
+  friend class boost::serialization::access;
+
+  BOOST_SERIALIZATION_SPLIT_MEMBER()
+
+  template<class Archive>
+  void save(Archive&,const unsigned int)const{}
+
+  template<class Archive>
+  void load(Archive&,const unsigned int version)
+  {
+    this->value=version;
+  }
+
+  unsigned int value;
+};
+
+} /* namespace multi_index::detail */
+
+} /* namespace multi_index */
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+namespace serialization {
+template<typename T>
+struct version<boost::multi_index::detail::serialization_version<T> >
+{
+  BOOST_STATIC_CONSTANT(unsigned int,value=version<T>::value);
+};
+} /* namespace serialization */
+#endif
+
+} /* namespace boost */
+
+#endif
index 7b4815fbca1dd047ae4044e95b9ac389e627f187..2070b1597059a25f00d58806f86e996284e6ffac 100644 (file)
@@ -1,6 +1,6 @@
 /* Multiply indexed container.
  *
- * Copyright 2003-2009 Joaquin M Lopez Munoz.
+ * Copyright 2003-2010 Joaquin M Lopez Munoz.
  * 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)
@@ -44,6 +44,7 @@
 
 #if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
 #include <boost/multi_index/detail/archive_constructed.hpp>
+#include <boost/multi_index/detail/serialization_version.hpp>
 #include <boost/serialization/collection_size_type.hpp>
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/split_member.hpp>
@@ -634,16 +635,20 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
   {
 
 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-    const serialization::collection_size_type s(size_());
+    const serialization::collection_size_type       s(size_());
+    const detail::serialization_version<value_type> value_version;
     ar<<serialization::make_nvp("count",s);
+    ar<<serialization::make_nvp("value_version",value_version);
 #else
-    const std::size_t s=size_();
+    const std::size_t  s=size_();
+    const unsigned int value_version=0;
     ar<<serialization::make_nvp("count",s);
 #endif
 
     index_saver_type sm(bfm_allocator::member,s);
 
     for(iterator it=super::begin(),it_end=super::end();it!=it_end;++it){
+      serialization::save_construct_data_adl(ar,&*it,value_version);
       ar<<serialization::make_nvp("item",*it);
       sm.add(it.get_node(),ar,version);
     }
@@ -660,7 +665,8 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
     clear_(); 
 
 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-    serialization::collection_size_type s;
+    serialization::collection_size_type       s;
+    detail::serialization_version<value_type> value_version;
     if(version<1){
       std::size_t sz;
       ar>>serialization::make_nvp("count",sz);
@@ -669,15 +675,22 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
     else{
       ar>>serialization::make_nvp("count",s);
     }
+    if(version<2){
+      value_version=0;
+    }
+    else{
+      ar>>serialization::make_nvp("value_version",value_version);
+    }
 #else
-    std::size_t s;
+    std::size_t  s;
+    unsigned int value_version=0;
     ar>>serialization::make_nvp("count",s);
 #endif
 
     index_loader_type lm(bfm_allocator::member,s);
 
     for(std::size_t n=0;n<s;++n){
-      detail::archive_constructed<Value> value("item",ar,version);
+      detail::archive_constructed<Value> value("item",ar,value_version);
       std::pair<node_type*,bool> p=insert_(
         value.get(),super::end().get_node());
       if(!p.second)throw_exception(
@@ -1100,8 +1113,9 @@ void swap(
 
 #if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)&&\
     !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
-/* Serialization class version bump as we now serialize the size
- * through boost::serialization::collection_size_type.
+/* class version = 1 : we now serialize the size through
+ * boost::serialization::collection_size_type.
+ * class version = 2 : proper use of {save|load}_construct_data.
  */
 
 namespace serialization {
@@ -1110,7 +1124,7 @@ struct version<
   boost::multi_index_container<Value,IndexSpecifierList,Allocator>
 >
 {
-  BOOST_STATIC_CONSTANT(unsigned int,value=1);
+  BOOST_STATIC_CONSTANT(unsigned int,value=2);
 };
 } /* namespace serialization */
 #endif
index 913246cd4b1dafa296a4dfde3fbbb9b6a9d647dc..bbe5bce0d059f83b915b250230a67b2a5c5cca42 100644 (file)
@@ -5,7 +5,7 @@
  * accompanying file LICENSE_1_0.txt or copy at
  * http://www.boost.org/LICENSE_1_0.txt)
  *
- * $Id: nondet_random.hpp 49314 2008-10-13 09:00:03Z johnmaddock $
+ * $Id: nondet_random.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2000-02-18  Portability fixes (thanks to Beman Dawes)
 #include <boost/config.hpp>
 #include <boost/utility.hpp>            // noncopyable
 #include <boost/integer_traits.hpp>     // compile-time integral limits
+#include <boost/random/detail/auto_link.hpp>
 
 namespace boost {
 
-// use some OS service to generate non-deterministic random numbers
+/**
+ * Class \random_device models a \nondeterministic_random_number_generator.
+ * It uses one or more implementation-defined stochastic processes to
+ * generate a sequence of uniformly distributed non-deterministic random
+ * numbers. For those environments where a non-deterministic random number
+ * generator is not available, class random_device must not be implemented. See
+ *
+ *  @blockquote
+ *  "Randomness Recommendations for Security", D. Eastlake, S. Crocker,
+ *  J. Schiller, Network Working Group, RFC 1750, December 1994
+ *  @endblockquote
+ *
+ * for further discussions. 
+ *
+ * @xmlnote
+ * Some operating systems abstract the computer hardware enough
+ * to make it difficult to non-intrusively monitor stochastic processes.
+ * However, several do provide a special device for exactly this purpose.
+ * It seems to be impossible to emulate the functionality using Standard
+ * C++ only, so users should be aware that this class may not be available
+ * on all platforms.
+ * @endxmlnote
+ *
+ * <b>Implementation Note for Linux</b>
+ *
+ * On the Linux operating system, token is interpreted as a filesystem
+ * path. It is assumed that this path denotes an operating system
+ * pseudo-device which generates a stream of non-deterministic random
+ * numbers. The pseudo-device should never signal an error or end-of-file.
+ * Otherwise, @c std::ios_base::failure is thrown. By default,
+ * \random_device uses the /dev/urandom pseudo-device to retrieve
+ * the random numbers. Another option would be to specify the /dev/random
+ * pseudo-device, which blocks on reads if the entropy pool has no more
+ * random bits available.
+ *
+ * <b>Inplementation Note for Windows</b>
+ *
+ * On the Windows operating system, token is interpreted as the name
+ * of a cryptographic service provider.  By default \random_device uses
+ * MS_DEF_PROV.
+ *
+ * <b>Performance</b>
+ *
+ * The test program <a href="\boost/libs/random/performance/nondet_random_speed.cpp">
+ * nondet_random_speed.cpp</a> measures the execution times of the
+ * nondet_random.hpp implementation of the above algorithms in a tight
+ * loop. The performance has been evaluated on a Pentium Pro 200 MHz
+ * with gcc 2.95.2, Linux 2.2.13, glibc 2.1.2.
+ *
+ * <table cols="2">
+ *   <tr><th>class</th><th>time per invocation [usec]</th></tr>
+ *   <tr><td> @xmlonly <classname alt="boost::random_device">random_device</classname> @endxmlonly </td><td>92.0</td></tr>
+ * </table>
+ *
+ * The measurement error is estimated at +/- 1 usec.
+ */
 class random_device : private noncopyable
 {
 public:
@@ -35,15 +91,37 @@ public:
   BOOST_STATIC_CONSTANT(result_type, min_value = integer_traits<result_type>::const_min);
   BOOST_STATIC_CONSTANT(result_type, max_value = integer_traits<result_type>::const_max);
 
+  /**
+   * Returns: The smallest value that the \random_device can produce.
+   */
   result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return min_value; }
+  /**
+   * Returns: The largest value that the \random_device can produce.
+   */
   result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return max_value; }
-  explicit random_device(const std::string& token = default_token);
-  ~random_device();
-  double entropy() const;
-  unsigned int operator()();
+  /** 
+   * Constructs a @c random_device, optionally using the given token as an
+   * access specification (for example, a URL) to some implementation-defined
+   * service for monitoring a stochastic process. 
+   */
+  BOOST_RANDOM_DECL explicit random_device(const std::string& token = default_token);
+  BOOST_RANDOM_DECL ~random_device();
+  /**
+   * Returns: An entropy estimate for the random numbers returned by
+   * operator(), in the range min() to log2( max()+1). A deterministic
+   * random number generator (e.g. a pseudo-random number engine)
+   * has entropy 0.
+   *
+   * Throws: Nothing.
+   */
+  BOOST_RANDOM_DECL double entropy() const;
+  /**
+   * Returns: A random value in the range [min, max]
+   */
+  BOOST_RANDOM_DECL unsigned int operator()();
 
 private:
-  static const char * const default_token;
+  BOOST_RANDOM_DECL static const char * const default_token;
 
   /*
    * std:5.3.5/5 [expr.delete]: "If the object being deleted has incomplete
index d70205f0b154300f9bb9f55dd7b69dace2b5b900..5c0e00bc95c783b322a8da61f8e3107c6baf5a14 100644 (file)
@@ -24,6 +24,7 @@
 #include <boost/type_traits/is_same.hpp>
 #include <boost/type_traits/is_base_and_derived.hpp>
 #include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
 #include <boost/preprocessor/facilities/intercept.hpp>
 
 namespace boost { namespace parameter { 
index 571eedb1c1a1fdf4479af5c6be622a86175651e2..72651d5877a36a1147bedd389a9ed6b5c3a9314c 100644 (file)
@@ -1,4 +1,6 @@
 //  (C) Copyright Jeremy Siek 2004 
+//  (C) Copyright Thomas Claveirole 2010
+//  (C) Copyright Ignacy Gawedzki 2010
 //  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)
 #include <list>
 #include <map>
 #include <set>
-
-#if !defined BOOST_NO_HASH
-#  ifdef BOOST_HASH_SET_HEADER
-#    include BOOST_HASH_SET_HEADER
-#  else
-#    include <hash_set>
-#  endif
-#  ifdef BOOST_HASH_MAP_HEADER
-#    include BOOST_HASH_MAP_HEADER
-#  else
-#    include <hash_map>
-#  endif
-#endif
+#include <boost/unordered_set.hpp>
+#include <boost/unordered_map.hpp>
 
 #if !defined BOOST_NO_SLIST
 #  ifdef BOOST_SLIST_HEADER
@@ -273,34 +264,87 @@ namespace boost { namespace graph_detail {
 
  // hash_set, hash_map
 
+  struct unordered_set_tag :
+    virtual public simple_associative_container_tag,
+    virtual public unique_associative_container_tag
+    { };
+
+  struct unordered_multiset_tag :
+    virtual public simple_associative_container_tag,
+    virtual public multiple_associative_container_tag
+    { };
+
+
+  struct unordered_map_tag :
+    virtual public pair_associative_container_tag,
+    virtual public unique_associative_container_tag
+    { };
+
+  struct unordered_multimap_tag :
+    virtual public pair_associative_container_tag,
+    virtual public multiple_associative_container_tag
+    { };
+
+
 #ifndef BOOST_NO_HASH
 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
   template <class Key, class Eq, class Hash, class Alloc> 
-  struct container_traits< BOOST_STD_EXTENSION_NAMESPACE::hash_set<Key,Eq,Hash,Alloc> > {
-    typedef set_tag category;
-    typedef stable_tag iterator_stability; // is this right?
+  struct container_traits< boost::unordered_set<Key,Eq,Hash,Alloc> > {
+    typedef unordered_set_tag category;
+    typedef unstable_tag iterator_stability;
   };
   template <class Key, class T, class Eq, class Hash, class Alloc>
-  struct container_traits< BOOST_STD_EXTENSION_NAMESPACE::hash_map<Key,T,Eq,Hash,Alloc> > {
-    typedef map_tag category;
-    typedef stable_tag iterator_stability; // is this right?
+  struct container_traits< boost::unordered_map<Key,T,Eq,Hash,Alloc> > {
+    typedef unordered_map_tag category;
+    typedef unstable_tag iterator_stability;
+  };
+  template <class Key, class Eq, class Hash, class Alloc>
+  struct container_traits< boost::unordered_multiset<Key,Eq,Hash,Alloc> > {
+    typedef unordered_multiset_tag category;
+    typedef unstable_tag iterator_stability;
+  };
+  template <class Key, class T, class Eq, class Hash, class Alloc>
+  struct container_traits< boost::unordered_multimap<Key,T,Eq,Hash,Alloc> > {
+    typedef unordered_multimap_tag category;
+    typedef unstable_tag iterator_stability;
   };
 #endif
   template <class Key, class Eq, class Hash, class Alloc>
-  set_tag container_category(const BOOST_STD_EXTENSION_NAMESPACE::hash_set<Key,Eq,Hash,Alloc>&)
-  { return set_tag(); }
+  unordered_set_tag
+  container_category(const boost::unordered_set<Key,Eq,Hash,Alloc>&)
+  { return unordered_set_tag(); }
 
   template <class Key, class T, class Eq, class Hash, class Alloc>
-  map_tag container_category(const BOOST_STD_EXTENSION_NAMESPACE::hash_map<Key,T,Eq,Hash,Alloc>&)
-  { return map_tag(); }
+  unordered_map_tag
+  container_category(const boost::unordered_map<Key,T,Eq,Hash,Alloc>&)
+  { return unordered_map_tag(); }
 
   template <class Key, class Eq, class Hash, class Alloc>
-  stable_tag iterator_stability(const BOOST_STD_EXTENSION_NAMESPACE::hash_set<Key,Eq,Hash,Alloc>&)
-  { return stable_tag(); }
+  unstable_tag iterator_stability(const boost::unordered_set<Key,Eq,Hash,Alloc>&)
+  { return unstable_tag(); }
 
   template <class Key, class T, class Eq, class Hash, class Alloc>
-  stable_tag iterator_stability(const BOOST_STD_EXTENSION_NAMESPACE::hash_map<Key,T,Eq,Hash,Alloc>&)
-  { return stable_tag(); }
+  unstable_tag iterator_stability(const boost::unordered_map<Key,T,Eq,Hash,Alloc>&)
+  { return unstable_tag(); }
+  template <class Key, class Eq, class Hash, class Alloc>
+  unordered_multiset_tag
+  container_category(const boost::unordered_multiset<Key,Eq,Hash,Alloc>&)
+  { return unordered_multiset_tag(); }
+
+  template <class Key, class T, class Eq, class Hash, class Alloc>
+  unordered_multimap_tag
+  container_category(const boost::unordered_multimap<Key,T,Eq,Hash,Alloc>&)
+  { return unordered_multimap_tag(); }
+
+  template <class Key, class Eq, class Hash, class Alloc>
+  unstable_tag
+  iterator_stability(const boost::unordered_multiset<Key,Eq,Hash,Alloc>&)
+  { return unstable_tag(); }
+
+  template <class Key, class T, class Eq, class Hash, class Alloc>
+  unstable_tag
+  iterator_stability(const boost::unordered_multimap<Key,T,Eq,Hash,Alloc>&)
+  { return unstable_tag(); }
 #endif
 
 
@@ -414,6 +458,37 @@ namespace boost { namespace graph_detail {
     return push_dispatch(c, v, container_category(c));
   }
 
+  // Equal range
+  template <class Container,
+            class LessThanComparable>
+  std::pair<typename Container::iterator, typename Container::iterator>
+  equal_range_dispatch(Container& c,
+                       const LessThanComparable& value,
+                       container_tag)
+  {
+    // c must be sorted for std::equal_range to behave properly.
+    return std::equal_range(c.begin(), c.end(), value);
+  }
+
+  template <class AssociativeContainer, class LessThanComparable>
+  std::pair<typename AssociativeContainer::iterator,
+            typename AssociativeContainer::iterator>
+  equal_range_dispatch(AssociativeContainer& c,
+                       const LessThanComparable& value,
+                       associative_container_tag)
+  {
+    return c.equal_range(value);
+  }
+
+  template <class Container, class LessThanComparable>
+  std::pair<typename Container::iterator, typename Container::iterator>
+  equal_range(Container& c,
+              const LessThanComparable& value)
+  {
+    return equal_range_dispatch(c, value,
+                                graph_detail::container_category(c));
+  }
+
 }} // namespace boost::graph_detail
 
 #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
index 5e866561b7683967b81d5a6fab0de040d2b110d1..638625cecdf11b0b58582c983838f96e8ec2dccf 100644 (file)
@@ -65,7 +65,7 @@ namespace boost {
     inline indirect_pmap(const ReadablePropertyMap& df)
       : d(df) { }
 
-    inline bool operator()(const K& u) const {
+    inline T operator()(const K& u) const {
       return get(d, u);
     }
   protected:
index a4e2050d9f45a4d53c73d3f55cadbd5d88aab721..82cfdd818217aacf971eaa58e0ba735857da3243 100644 (file)
 namespace boost {
 
   // The mutable queue whose elements are indexed
-  // 
+  //
   // This adaptor provides a special kind of priority queue that has
   // and update operation. This allows the ordering of the items to
   // change. After the ordering criteria for item x changes, one must
   // call the Q.update(x)
-  // 
+  //
   // In order to efficiently find x in the queue, a functor must be
   // provided to map value_type to a unique ID, which the
   // mutable_queue will then use to map to the location of the
   // item. The ID's generated must be between 0 and N, where N is the
   // value passed to the constructor of mutable_queue
 
-  template <class IndexedType, 
-            class RandomAccessContainer = std::vector<IndexedType>, 
+  template <class IndexedType,
+            class RandomAccessContainer = std::vector<IndexedType>,
             class Comp = std::less<typename RandomAccessContainer::value_type>,
             class ID = identity_property_map >
   class mutable_queue {
@@ -46,23 +46,23 @@ namespace boost {
   protected:
     typedef typename RandomAccessContainer::iterator iterator;
 #if !defined BOOST_NO_STD_ITERATOR_TRAITS
-    typedef  adstl::array_binary_tree_node<iterator, ID> Node;
+    typedef array_binary_tree_node<iterator, ID> Node;
 #else
-    typedef  adstl::array_binary_tree_node<iterator, value_type, ID> Node;
+    typedef array_binary_tree_node<iterator, value_type, ID> Node;
 #endif
-    typedef  adstl::compare_array_node<RandomAccessContainer,Comp> Compare;
+    typedef compare_array_node<RandomAccessContainer,Comp> Compare;
     typedef std::vector<size_type> IndexArray;
   public:
     typedef Compare value_compare;
     typedef ID id_generator;
 
-    mutable_queue(size_type n, const Comp& x, const ID& _id) 
+    mutable_queue(size_type n, const Comp& x, const ID& _id)
       : index_array(n), comp(x), id(_id) {
-      c.reserve(n); 
+      c.reserve(n);
     }
     template <class ForwardIterator>
-    mutable_queue(ForwardIterator first, ForwardIterator last, 
-                  const Comp& x, const ID& _id) 
+    mutable_queue(ForwardIterator first, ForwardIterator last,
+                  const Comp& x, const ID& _id)
       : index_array(std::distance(first, last)), comp(x), id(_id)
     {
       while( first != last ) {
@@ -72,7 +72,7 @@ namespace boost {
     }
 
     bool empty() const { return c.empty(); }
-    
+
     void pop() {
       value_type tmp = c.back();
       c.back() = c.front();
@@ -86,7 +86,7 @@ namespace boost {
 
       c.pop_back();
       Node node(c.begin(), c.end(), c.begin(), id);
-      down_heap(node, comp, index_array);       
+      down_heap(node, comp, index_array);
     }
     void push(const IndexedType& x) {
       c.push_back(x);
@@ -120,7 +120,7 @@ namespace boost {
     bool test() {
       return std::is_heap(c.begin(), c.end(), Comp());
     }
-#endif 
+#endif
 
    protected:
     IndexArray index_array;
index 448a71911d5eeef29a910b46684b80910d3b83fe..07cea5f070764e4bd3db48904379eea5381587ac 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef BOOST_PROPERTY_HPP
 #define BOOST_PROPERTY_HPP
 
-#include <boost/pending/ct_if.hpp>
+#include <boost/mpl/bool.hpp>
 
 namespace boost {
 
@@ -47,15 +47,9 @@ namespace boost {
   };
 
   template <class P>
-  struct has_property {
-    BOOST_STATIC_CONSTANT(bool, value = true);
-    typedef true_type type;
-  };
+  struct has_property : boost::mpl::true_ {};
   template <>
-  struct has_property<no_property> {
-    BOOST_STATIC_CONSTANT(bool, value = false);
-    typedef false_type type;
-  };
+  struct has_property<no_property> : boost::mpl::false_ {};
 
 } // namespace boost
 
diff --git a/deal.II/contrib/boost/include/boost/property_map.hpp b/deal.II/contrib/boost/include/boost/property_map.hpp
deleted file mode 100644 (file)
index 3a64e93..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*=============================================================================
-Copyright (c) 2009 Trustees of Indiana University
-
-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)
-=============================================================================*/
-// Redirect/warning header, adapted from the version in Spirit
-
-#include <boost/version.hpp>
-
-#if BOOST_VERSION >= 103800
-#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
-#  pragma message ("Warning: This header is deprecated. Please use: boost/property_map/property_map.hpp")
-#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-#  warning "This header is deprecated. Please use: boost/property_map/property_map.hpp"
-#endif
-#endif
-
-#include <boost/property_map/property_map.hpp>
index ea95d544388732c5cc3033aa8281187d376b0996..f1fde81fb573ed348719d1dd075cca66843fbf0c 100644 (file)
@@ -18,6 +18,7 @@
 
 
 #include <boost/config.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/property_map/property_map.hpp>
 #include <boost/lexical_cast.hpp>
 #include <boost/any.hpp>
@@ -29,6 +30,7 @@
 #include <sstream>
 #include <map>
 #include <boost/type.hpp>
+#include <boost/smart_ptr.hpp>
 
 namespace boost {
 
@@ -165,7 +167,7 @@ class dynamic_property_map_adaptor : public dynamic_property_map
 
   void do_put(const any&, const any&, mpl::bool_<false>)
   {
-    throw dynamic_const_put_error();
+    BOOST_THROW_EXCEPTION(dynamic_const_put_error());
   }
 
 public:
@@ -223,9 +225,9 @@ private:
 //
 struct dynamic_properties
 {
-  typedef std::multimap<std::string, dynamic_property_map*>
+  typedef std::multimap<std::string, boost::shared_ptr<dynamic_property_map> >
     property_maps_type;
-  typedef boost::function3<std::auto_ptr<dynamic_property_map>,
+  typedef boost::function3<boost::shared_ptr<dynamic_property_map>,
                            const std::string&,
                            const boost::any&,
                            const boost::any&> generate_fn_type;
@@ -237,24 +239,16 @@ public:
   dynamic_properties() : generate_fn() { }
   dynamic_properties(const generate_fn_type& g) : generate_fn(g) {}
 
-  ~dynamic_properties()
-  {
-    for (property_maps_type::iterator i = property_maps.begin();
-         i != property_maps.end(); ++i) {
-      delete i->second;
-    }
-  }
+  ~dynamic_properties() {}
 
   template<typename PropertyMap>
   dynamic_properties&
   property(const std::string& name, PropertyMap property_map)
   {
     // Tbd: exception safety
-    std::auto_ptr<dynamic_property_map> pm(
+    boost::shared_ptr<dynamic_property_map> pm(
       new detail::dynamic_property_map_adaptor<PropertyMap>(property_map));
-    property_maps_type::iterator i =
-      property_maps.insert(property_maps_type::value_type(name, (dynamic_property_map*)0));
-    i->second = pm.release();
+    property_maps.insert(property_maps_type::value_type(name, pm));
 
     return *this;
   }
@@ -271,17 +265,17 @@ public:
   { return property_maps.lower_bound(name); }
 
   void
-  insert(const std::string& name, std::auto_ptr<dynamic_property_map> pm)
+  insert(const std::string& name, boost::shared_ptr<dynamic_property_map> pm)
   {
-    property_maps.insert(property_maps_type::value_type(name, pm.release()));
+    property_maps.insert(property_maps_type::value_type(name, pm));
   }
 
   template<typename Key, typename Value>
-  std::auto_ptr<dynamic_property_map>
+  boost::shared_ptr<dynamic_property_map>
   generate(const std::string& name, const Key& key, const Value& value)
   {
     if(!generate_fn) {
-      throw property_not_found(name);
+      BOOST_THROW_EXCEPTION(property_not_found(name));
     } else {
       return generate_fn(name,key,value);
     }
@@ -305,7 +299,7 @@ put(const std::string& name, dynamic_properties& dp, const Key& key,
     }
   }
 
-  std::auto_ptr<dynamic_property_map> new_map = dp.generate(name, key, value);
+  boost::shared_ptr<dynamic_property_map> new_map = dp.generate(name, key, value);
   if (new_map.get()) {
     new_map->put(key, value);
     dp.insert(name, new_map);
@@ -326,7 +320,7 @@ get(const std::string& name, const dynamic_properties& dp, const Key& key)
       return any_cast<Value>(i->second->get(key));
   }
 
-  throw dynamic_get_failure(name);
+  BOOST_THROW_EXCEPTION(dynamic_get_failure(name));
 }
 #endif
 
@@ -340,7 +334,7 @@ get(const std::string& name, const dynamic_properties& dp, const Key& key, type<
       return any_cast<Value>(i->second->get(key));
   }
 
-  throw dynamic_get_failure(name);
+  BOOST_THROW_EXCEPTION(dynamic_get_failure(name));
 }
 
 template<typename Key>
@@ -353,16 +347,16 @@ get(const std::string& name, const dynamic_properties& dp, const Key& key)
       return i->second->get_string(key);
   }
 
-  throw dynamic_get_failure(name);
+  BOOST_THROW_EXCEPTION(dynamic_get_failure(name));
 }
 
 // The easy way to ignore properties.
 inline
-std::auto_ptr<boost::dynamic_property_map> 
+boost::shared_ptr<boost::dynamic_property_map> 
 ignore_other_properties(const std::string&,
                         const boost::any&,
                         const boost::any&) {
-  return std::auto_ptr<boost::dynamic_property_map>(0);
+  return boost::shared_ptr<boost::dynamic_property_map>();
 }
 
 } // namespace boost
index 1f1c51ff6619ea8568d8b5045a1fa8f185a81474..d64d6e279919feb115c4b9829a09ae6566f65eb8 100644 (file)
@@ -19,6 +19,8 @@
 #include <boost/concept_archetype.hpp>
 #include <boost/mpl/assert.hpp>
 #include <boost/mpl/or.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/has_xxx.hpp>
 #include <boost/type_traits/is_same.hpp>
 
 namespace boost {
@@ -26,6 +28,39 @@ namespace boost {
   //=========================================================================
   // property_traits class
 
+  BOOST_MPL_HAS_XXX_TRAIT_DEF(key_type)
+  BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type)
+  BOOST_MPL_HAS_XXX_TRAIT_DEF(reference)
+  BOOST_MPL_HAS_XXX_TRAIT_DEF(category)
+  template<class PA>
+  struct is_property_map :
+    boost::mpl::and_<
+      has_key_type<PA>,
+      has_value_type<PA>,
+      has_reference<PA>,
+      has_category<PA>
+    >
+  {};
+  template <typename PA>
+  struct default_property_traits {
+    typedef typename PA::key_type key_type;
+    typedef typename PA::value_type value_type;
+    typedef typename PA::reference reference;
+    typedef typename PA::category   category;
+  };
+  struct null_property_traits {};
+  template <typename PA>
+  struct property_traits :
+    boost::mpl::if_<is_property_map<PA>,
+      default_property_traits<PA>,
+      null_property_traits>::type
+  {};
+
+#if 0
   template <typename PA>
   struct property_traits {
     typedef typename PA::key_type key_type;
@@ -33,6 +68,7 @@ namespace boost {
     typedef typename PA::reference reference;
     typedef typename PA::category   category;
   };
+#endif
 
   //=========================================================================
   // property_traits category tags
@@ -302,7 +338,8 @@ namespace boost {
     }
   };
 
-  struct identity_property_map;
+  template <typename T>
+  struct typed_identity_property_map;
 
   // A helper class for constructing a property map
   // from a class that implements operator[]
@@ -539,19 +576,23 @@ namespace boost {
   };
 
   //=========================================================================
-  // A property map that applies the identity function to integers
-  struct identity_property_map
-    : public boost::put_get_helper<std::size_t, 
-        identity_property_map>
+  // A generalized identity property map
+  template <typename T>
+  struct typed_identity_property_map
+    : public boost::put_get_helper<T, typed_identity_property_map<T> >
   {
-    typedef std::size_t key_type;
-    typedef std::size_t value_type;
-    typedef std::size_t reference;
+    typedef T key_type;
+    typedef T value_type;
+    typedef T reference;
     typedef boost::readable_property_map_tag category;
 
     inline value_type operator[](const key_type& v) const { return v; }
   };
 
+//=========================================================================
+  // A property map that applies the identity function to integers
+  typedef typed_identity_property_map<std::size_t> identity_property_map;
+
   //=========================================================================
   // A property map that does not do anything, for
   // when you have to supply a property map, but don't need it.
diff --git a/deal.II/contrib/boost/include/boost/property_map_iterator.hpp b/deal.II/contrib/boost/include/boost/property_map_iterator.hpp
deleted file mode 100644 (file)
index 3079971..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*=============================================================================
-Copyright (c) 2009 Trustees of Indiana University
-
-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)
-=============================================================================*/
-// Redirect/warning header, adapted from the version in Spirit
-
-#include <boost/version.hpp>
-
-#if BOOST_VERSION >= 103800
-#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
-#  pragma message ("Warning: This header is deprecated. Please use: boost/property_map/property_map_iterator.hpp")
-#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-#  warning "This header is deprecated. Please use: boost/property_map/property_map_iterator.hpp"
-#endif
-#endif
-
-#include <boost/property_map/property_map_iterator.hpp>
index 7df31d4c2a1bbf23c80f70b1cbcca1791386d780..0172dca28fed620a4a369247634748eeb6f7799f 100644 (file)
@@ -30,7 +30,7 @@ struct value_destroyer<
     template <class T>
     static void execute(T const volatile* p)
     {
-        p->T::~T();
+        p->~T();
     }
 };
 
index 8f355fe2edc9480d1709d9f3d2105377c9fb31ea..1ffded1249072bd49eeb54c47eb35e48bcb5220b 100644 (file)
@@ -10,6 +10,7 @@
 # include <boost/python/converter/registered.hpp>
 # include <boost/python/detail/decref_guard.hpp>
 # include <boost/python/detail/none.hpp>
+# include <boost/type_traits/is_union.hpp>
 
 namespace boost { namespace python { namespace objects { 
 
@@ -21,7 +22,7 @@ struct make_instance_impl
     template <class Arg>
     static inline PyObject* execute(Arg& x)
     {
-        BOOST_STATIC_ASSERT(is_class<T>::value);
+        BOOST_MPL_ASSERT((mpl::or_<is_class<T>, is_union<T> >));
 
         PyTypeObject* type = Derived::get_class_object(x);
 
index 2dc6dda93d50573fcb9479c69b14346b41a1ad66..4627e34ad289f4c8c54508b1ef7f41fff26f6fe1 100644 (file)
@@ -35,6 +35,8 @@
 
 #  include <boost/detail/workaround.hpp>
 
+#  include <boost/type_traits/remove_const.hpp>
+
 namespace boost { namespace python {
 
 template <class T> class wrapper;
@@ -122,26 +124,29 @@ inline pointer_holder_back_reference<Pointer,Value>::pointer_holder_back_referen
 template <class Pointer, class Value>
 void* pointer_holder<Pointer, Value>::holds(type_info dst_t, bool null_ptr_only)
 {
+    typedef typename boost::remove_const< Value >::type non_const_value;
+
     if (dst_t == python::type_id<Pointer>()
         && !(null_ptr_only && get_pointer(this->m_p))
     )
         return &this->m_p;
 
-    Value* p
+    Value* p0
 #  if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
         = static_cast<Value*>( get_pointer(this->m_p) )
 #  else 
         = get_pointer(this->m_p)
 #  endif
         ;
-    
+    non_const_value* p = const_cast<non_const_value*>( p0 );
+
     if (p == 0)
         return 0;
     
     if (void* wrapped = holds_wrapped(dst_t, p, p))
         return wrapped;
     
-    type_info src_t = python::type_id<Value>();
+    type_info src_t = python::type_id<non_const_value>();
     return src_t == dst_t ? p : find_dynamic_type(p, src_t, dst_t);
 }
 
index 5857422f0459328a1c187d0d77f72f3e2b02b1ce..4d81e2eae8c213e037023210b291aef525b760d4 100644 (file)
@@ -5,6 +5,8 @@
 #ifndef OBJECT_CORE_DWA2002615_HPP
 # define OBJECT_CORE_DWA2002615_HPP
 
+# define BOOST_PYTHON_OBJECT_HAS_IS_NONE // added 2010-03-15 by rwgk
+
 # include <boost/python/detail/prefix.hpp>
 
 # include <boost/type.hpp>
@@ -239,7 +241,9 @@ namespace api
         
       // Underlying object access -- returns a borrowed reference
       inline PyObject* ptr() const;
-      
+
+      inline bool is_none() const;
+
    private:
       PyObject* m_ptr;
   };
@@ -539,6 +543,11 @@ inline PyObject* api::object_base::ptr() const
     return m_ptr;
 }
 
+inline bool api::object_base::is_none() const
+{
+    return (m_ptr == Py_None);
+}
+
 //
 // Converter specialization implementations
 //
index 1bb2b226f543a807f714fe5f19c7bcaf4a7d8c47..f1143e3abe1c3e549d1016087bb9eee2820740d1 100644 (file)
@@ -52,16 +52,23 @@ struct most_derived
 //
 //      template <class RT, class T0... class TN>
 //      inline mpl::vector<RT, T0...TN>
-//      get_signature(RT(*)(T0...TN), void* = 0)
+//      get_signature(RT(BOOST_PYTHON_FN_CC *)(T0...TN), void* = 0)
 //      {
 //          return mpl::list<RT, T0...TN>();
 //      }
 //
+//    where BOOST_PYTHON_FN_CC is a calling convention keyword, can be
+//
+//        empty, for default calling convention
+//        __cdecl (if BOOST_PYTHON_ENABLE_CDECL is defined)
+//        __stdcall (if BOOST_PYTHON_ENABLE_STDCALL is defined)
+//        __fastcall (if BOOST_PYTHON_ENABLE_FASTCALL is defined)
+//
 //   And, for an appropriate assortment of cv-qualifications::
 //
 //      template <class RT, class ClassT, class T0... class TN>
 //      inline mpl::vector<RT, ClassT&, T0...TN>
-//      get_signature(RT(ClassT::*)(T0...TN) cv))
+//      get_signature(RT(BOOST_PYTHON_FN_CC ClassT::*)(T0...TN) cv))
 //      {
 //          return mpl::list<RT, ClassT&, T0...TN>();
 //      }
@@ -72,7 +79,7 @@ struct most_derived
 //        , typename most_derived<Target, ClassT>::type&
 //        , T0...TN
 //      >
-//      get_signature(RT(ClassT::*)(T0...TN) cv), Target*)
+//      get_signature(RT(BOOST_PYTHON_FN_CC ClassT::*)(T0...TN) cv), Target*)
 //      {
 //          return mpl::list<RT, ClassT&, T0...TN>();
 //      }
@@ -87,7 +94,8 @@ struct most_derived
 //
 //  These functions extract the return type, class (for member
 //  functions) and arguments of the input signature and stuff them in
-//  an mpl type sequence.  Note that cv-qualification is dropped from
+//  an mpl type sequence (the calling convention is dropped).
+//  Note that cv-qualification is dropped from
 //  the "hidden this" argument of member functions; that is a
 //  necessary sacrifice to ensure that an lvalue from_python converter
 //  is used.  A pointer is not used so that None will be rejected for
@@ -100,10 +108,64 @@ struct most_derived
 //
 // @group {
 
+// 'default' calling convention
+
+#  define BOOST_PYTHON_FN_CC
+
 #  define BOOST_PP_ITERATION_PARAMS_1                                   \
     (3, (0, BOOST_PYTHON_MAX_ARITY, <boost/python/signature.hpp>))
 
 #  include BOOST_PP_ITERATE()
+
+#  undef BOOST_PYTHON_FN_CC
+
+// __cdecl calling convention
+
+#  if defined(BOOST_PYTHON_ENABLE_CDECL)
+
+#   define BOOST_PYTHON_FN_CC __cdecl
+#   define BOOST_PYTHON_FN_CC_IS_CDECL
+
+#   define BOOST_PP_ITERATION_PARAMS_1                                   \
+     (3, (0, BOOST_PYTHON_MAX_ARITY, <boost/python/signature.hpp>))
+
+#   include BOOST_PP_ITERATE()
+
+#   undef BOOST_PYTHON_FN_CC
+#   undef BOOST_PYTHON_FN_CC_IS_CDECL
+
+#  endif // defined(BOOST_PYTHON_ENABLE_CDECL)
+
+// __stdcall calling convention
+
+#  if defined(BOOST_PYTHON_ENABLE_STDCALL)
+
+#   define BOOST_PYTHON_FN_CC __stdcall
+
+#   define BOOST_PP_ITERATION_PARAMS_1                                   \
+     (3, (0, BOOST_PYTHON_MAX_ARITY, <boost/python/signature.hpp>))
+
+#   include BOOST_PP_ITERATE()
+
+#   undef BOOST_PYTHON_FN_CC
+
+#  endif // defined(BOOST_PYTHON_ENABLE_STDCALL)
+
+// __fastcall calling convention
+
+#  if defined(BOOST_PYTHON_ENABLE_FASTCALL)
+
+#   define BOOST_PYTHON_FN_CC __fastcall
+
+#   define BOOST_PP_ITERATION_PARAMS_1                                   \
+     (3, (0, BOOST_PYTHON_MAX_ARITY, <boost/python/signature.hpp>))
+
+#   include BOOST_PP_ITERATE()
+
+#   undef BOOST_PYTHON_FN_CC
+
+#  endif // defined(BOOST_PYTHON_ENABLE_FASTCALL)
+
 #  undef BOOST_PYTHON_LIST_INC
 
 // }
@@ -120,17 +182,24 @@ struct most_derived
 
 # define N BOOST_PP_ITERATION()
 
+   // as 'get_signature(RT(*)(T0...TN), void* = 0)' is the same
+   // function as 'get_signature(RT(__cdecl *)(T0...TN), void* = 0)',
+   // we don't define it twice
+#  if !defined(BOOST_PYTHON_FN_CC_IS_CDECL)
+
 template <
     class RT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class T)>
 inline BOOST_PYTHON_LIST_INC(N)<
     RT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T)>
-get_signature(RT(*)(BOOST_PP_ENUM_PARAMS_Z(1, N, T)), void* = 0)
+get_signature(RT(BOOST_PYTHON_FN_CC *)(BOOST_PP_ENUM_PARAMS_Z(1, N, T)), void* = 0)
 {
     return BOOST_PYTHON_LIST_INC(N)<
             RT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T)
         >();
 }
 
+#  endif // !defined(BOOST_PYTHON_FN_CC_IS_CDECL)
+
 # undef N
 
 # define BOOST_PP_ITERATION_PARAMS_2 \
@@ -146,7 +215,7 @@ template <
     class RT, class ClassT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class T)>
 inline BOOST_PYTHON_LIST_INC(BOOST_PP_INC(N))<
     RT, ClassT& BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T)>
-get_signature(RT(ClassT::*)(BOOST_PP_ENUM_PARAMS_Z(1, N, T)) Q)
+get_signature(RT(BOOST_PYTHON_FN_CC ClassT::*)(BOOST_PP_ENUM_PARAMS_Z(1, N, T)) Q)
 {
     return BOOST_PYTHON_LIST_INC(BOOST_PP_INC(N))<
             RT, ClassT& BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T)
@@ -165,7 +234,7 @@ inline BOOST_PYTHON_LIST_INC(BOOST_PP_INC(N))<
     BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T)
 >
 get_signature(
-    RT(ClassT::*)(BOOST_PP_ENUM_PARAMS_Z(1, N, T)) Q
+    RT(BOOST_PYTHON_FN_CC ClassT::*)(BOOST_PP_ENUM_PARAMS_Z(1, N, T)) Q
   , Target*
 )
 {
index 60a6abfb2b3f972ee014ba71fa9a1f2c1a4037dc..ad72a214901150b18eb268bf74fa7e56f84234fb 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org/libs/random for documentation.
  *
- * $Id: random.hpp 24096 2004-07-27 03:43:34Z dgregor $
+ * $Id: random.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2000-02-18  portability fixes (thanks to Beman Dawes)
 #include <boost/random/ranlux.hpp>
 #include <boost/random/linear_feedback_shift.hpp>
 #include <boost/random/xor_combine.hpp>
+#include <boost/random/discard_block.hpp>
+#include <boost/random/subtract_with_carry.hpp>
+#include <boost/random/variate_generator.hpp>
 
 namespace boost {
+  /** 
+   * The specialization taus88 was suggested in
+   *
+   *  @blockquote
+   *  "Maximally Equidistributed Combined Tausworthe Generators",
+   *  Pierre L'Ecuyer, Mathematics of Computation, Volume 65,
+   *  Number 213, January 1996, Pages 203-213
+   *  @endblockquote
+   */
   typedef random::xor_combine<random::xor_combine<random::linear_feedback_shift<uint32_t, 32, 31, 13, 12, 0>, 0,
     random::linear_feedback_shift<uint32_t, 32, 29, 2, 4, 0>, 0, 0>, 0,
                       random::linear_feedback_shift<uint32_t, 32, 28, 3, 17, 0>, 0, 0> taus88;
index 2a43239f94b9732f7265b5028b399554163331be..90eff93fe553023510542e2ba197c7bb5ec4155a 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: additive_combine.hpp 53871 2009-06-13 17:54:06Z steven_watanabe $
+ * $Id: additive_combine.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
 namespace boost {
 namespace random {
 
-// L'Ecuyer 1988
+/**
+ * An instantiation of class template \additive_combine model a
+ * \pseudo_random_number_generator. It combines two multiplicative
+ * \linear_congruential number generators, i.e. those with @c c = 0.
+ * It is described in
+ *
+ *  @blockquote
+ *  "Efficient and Portable Combined Random Number Generators", Pierre L'Ecuyer,
+ *  Communications of the ACM, Vol. 31, No. 6, June 1988, pp. 742-749, 774
+ *  @endblockquote
+ *
+ * The template parameters MLCG1 and MLCG2 shall denote two different
+ * \linear_congruential number generators, each with c = 0. Each invocation
+ * returns a random number X(n) := (MLCG1(n) - MLCG2(n)) mod (m1 - 1), where
+ * m1 denotes the modulus of MLCG1. 
+ *
+ * The template parameter @c val is the validation value checked by validation.
+ */
 template<class MLCG1, class MLCG2,
 #ifndef BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
   typename MLCG1::result_type 
@@ -47,30 +64,71 @@ public:
 #else
   enum { has_fixed_range = false };
 #endif
+  /**
+   * Returns: The smallest value that the generator can produce
+   */
   result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return 1; }
+  /**
+   * Returns: The largest value that the generator can produce
+   */
   result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return (_mlcg1.max)()-1; }
 
+  /**
+   * Constructs an \additive_combine generator using the
+   * default constructors of the two base generators.
+   */
   additive_combine() : _mlcg1(), _mlcg2() { }
+  /**
+   * Constructs an \additive_combine generator, using aseed as
+   * the constructor argument for both base generators.
+   */
+  explicit additive_combine(result_type aseed)
+    : _mlcg1(aseed), _mlcg2(aseed) { }
+  /**
+   * Constructs an \additive_combine generator, using
+   * @c seed1 and @c seed2 as the constructor argument to
+   * the first and second base generators, respectively.
+   */
   additive_combine(typename MLCG1::result_type seed1, 
                    typename MLCG2::result_type seed2)
     : _mlcg1(seed1), _mlcg2(seed2) { }
-  additive_combine(result_type seed)
-    : _mlcg1(seed), _mlcg2(seed) { }
+  /**
+   * Contructs an \additive_combine generator with
+   * values from the range defined by the input iterators first
+   * and last.  first will be modified to point to the element
+   * after the last one used.
+   *
+   * Throws: @c std::invalid_argument if the input range is too small.
+   *
+   * Exception Safety: Basic
+   */
   template<class It> additive_combine(It& first, It last)
     : _mlcg1(first, last), _mlcg2(first, last) { }
 
+  /**
+   * Seeds an \additive_combine generator using the default
+   * seeds of the two base generators.
+   */
   void seed()
   {
     _mlcg1.seed();
     _mlcg2.seed();
   }
 
-  void seed(result_type seed)
+  /**
+   * Seeds an \additive_combine generator, using @c aseed as the
+   * seed for both base generators.
+   */
+  void seed(result_type aseed)
   {
-    _mlcg1.seed(seed);
-    _mlcg2.seed(seed);
+    _mlcg1.seed(aseed);
+    _mlcg2.seed(aseed);
   }
 
+  /**
+   * Seeds an \additive_combine generator, using @c seed1 and @c seed2 as
+   * the seeds to the first and second base generators, respectively.
+   */
   void seed(typename MLCG1::result_type seed1,
             typename MLCG2::result_type seed2)
   {
@@ -78,36 +136,69 @@ public:
     _mlcg2.seed(seed2);
   }
 
+  /**
+   * Seeds an \additive_combine generator with
+   * values from the range defined by the input iterators first
+   * and last.  first will be modified to point to the element
+   * after the last one used.
+   *
+   * Throws: @c std::invalid_argument if the input range is too small.
+   *
+   * Exception Safety: Basic
+   */
   template<class It> void seed(It& first, It last)
   {
     _mlcg1.seed(first, last);
     _mlcg2.seed(first, last);
   }
 
+  /**
+   * Returns: the next value of the generator
+   */
   result_type operator()() {
     result_type z = _mlcg1() - _mlcg2();
     if(z < 1)
       z += MLCG1::modulus-1;
     return z;
   }
+
   static bool validation(result_type x) { return val == x; }
 
 #ifndef BOOST_NO_OPERATORS_IN_NAMESPACE
 
 #ifndef BOOST_RANDOM_NO_STREAM_OPERATORS
+  /**
+   * Writes the state of an \additive_combine generator to a @c
+   * std::ostream.  The textual representation of an \additive_combine
+   * generator is the textual representation of the first base
+   * generator followed by the textual representation of the
+   * second base generator.
+   */
   template<class CharT, class Traits>
   friend std::basic_ostream<CharT,Traits>&
   operator<<(std::basic_ostream<CharT,Traits>& os, const additive_combine& r)
   { os << r._mlcg1 << " " << r._mlcg2; return os; }
 
+  /**
+   * Reads the state of an \additive_combine generator from a
+   * @c std::istream.
+   */
   template<class CharT, class Traits>
   friend std::basic_istream<CharT,Traits>&
   operator>>(std::basic_istream<CharT,Traits>& is, additive_combine& r)
   { is >> r._mlcg1 >> std::ws >> r._mlcg2; return is; }
 #endif
 
+  /**
+   * Returns: true iff the two \additive_combine generators will
+   * produce the same sequence of values.
+   */
   friend bool operator==(const additive_combine& x, const additive_combine& y)
   { return x._mlcg1 == y._mlcg1 && x._mlcg2 == y._mlcg2; }
+  /**
+   * Returns: true iff the two \additive_combine generators will
+   * produce different sequences of values.
+   */
   friend bool operator!=(const additive_combine& x, const additive_combine& y)
   { return !(x == y); }
 #else
@@ -117,6 +208,7 @@ public:
   bool operator!=(const additive_combine& rhs) const
   { return !(*this == rhs); }
 #endif
+
 private:
   MLCG1 _mlcg1;
   MLCG2 _mlcg2;
@@ -124,6 +216,14 @@ private:
 
 } // namespace random
 
+/**
+ * The specialization \ecuyer1988 was suggested in
+ *
+ *  @blockquote
+ *  "Efficient and Portable Combined Random Number Generators", Pierre L'Ecuyer,
+ *  Communications of the ACM, Vol. 31, No. 6, June 1988, pp. 742-749, 774
+ *  @endblockquote
+ */
 typedef random::additive_combine<
     random::linear_congruential<int32_t, 40014, 0, 2147483563, 0>,
     random::linear_congruential<int32_t, 40692, 0, 2147483399, 0>,
index a716edf000ca9fc31052a71a34ba70e47b2f656d..78e54a91edd614fd7d7b81568099cdc23f45f297 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: bernoulli_distribution.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: bernoulli_distribution.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
 
 namespace boost {
 
-// Bernoulli distribution: p(true) = p, p(false) = 1-p   (boolean)
+/**
+ * Instantiations of class template \bernoulli_distribution model a
+ * \random_distribution. Such a random distribution produces bool values
+ * distributed with probabilities P(true) = p and P(false) = 1-p. p is
+ * the parameter of the distribution.
+ */
 template<class RealType = double>
 class bernoulli_distribution
 {
@@ -33,6 +38,12 @@ public:
   typedef int input_type;
   typedef bool result_type;
 
+  /** 
+   * Constructs a \bernoulli_distribution object.
+   * p is the parameter of the distribution.
+   *
+   * Requires: 0 <= p <= 1
+   */
   explicit bernoulli_distribution(const RealType& p_arg = RealType(0.5)) 
     : _p(p_arg)
   {
@@ -42,9 +53,20 @@ public:
 
   // compiler-generated copy ctor and assignment operator are fine
 
+  /**
+   * Returns: The "p" parameter of the distribution.
+   */
   RealType p() const { return _p; }
+  /**
+   * Effects: Subsequent uses of the distribution do not depend
+   * on values produced by any engine prior to invoking reset.
+   */
   void reset() { }
 
+  /**
+   * Returns: a random variate distributed according to the
+   * \bernoulli_distribution.
+   */
   template<class Engine>
   result_type operator()(Engine& eng)
   {
@@ -55,6 +77,9 @@ public:
   }
 
 #ifndef BOOST_RANDOM_NO_STREAM_OPERATORS
+  /**
+   * Writes the parameters of the distribution to a @c std::ostream.
+   */
   template<class CharT, class Traits>
   friend std::basic_ostream<CharT,Traits>&
   operator<<(std::basic_ostream<CharT,Traits>& os, const bernoulli_distribution& bd)
@@ -63,6 +88,9 @@ public:
     return os;
   }
 
+  /**
+   * Reads the parameters of the distribution from a @c std::istream.
+   */
   template<class CharT, class Traits>
   friend std::basic_istream<CharT,Traits>&
   operator>>(std::basic_istream<CharT,Traits>& is, bernoulli_distribution& bd)
index 17c96e1926a4677e2f4d80daf3029f860e0b4dba..f0e46a50eaa3f01e59565efa506b2cd8dffaead8 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: binomial_distribution.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: binomial_distribution.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  */
 
 
 namespace boost {
 
-// Knuth
+/**
+ * The binomial distribution is an integer valued distribution with
+ * two parameters, @c t and @c p.  The values of the distribution
+ * are within the range [0,t].
+ *
+ * The probability that the distribution produces a value k is
+ * \f${t \choose k}p^k(1-p)^{t-k}\f$.
+ */
 template<class IntType = int, class RealType = double>
 class binomial_distribution
 {
@@ -29,20 +36,36 @@ public:
   typedef typename bernoulli_distribution<RealType>::input_type input_type;
   typedef IntType result_type;
 
-  explicit binomial_distribution(IntType t_arg = 1,
-                                 const RealType& p_arg = RealType(0.5))
-    : _bernoulli(p_arg), _t(t_arg)
+  /**
+   * Construct an @c binomial_distribution object. @c t and @c p
+   * are the parameters of the distribution.
+   *
+   * Requires: t >=0 && 0 <= p <= 1
+   */
+  explicit binomial_distribution(IntType t = 1,
+                                 const RealType& p = RealType(0.5))
+    : _bernoulli(p), _t(t)
   {
     assert(_t >= 0);
-    assert(RealType(0) <= p_arg && p_arg <= RealType(1));
+    assert(RealType(0) <= p && p <= RealType(1));
   }
 
   // compiler-generated copy ctor and assignment operator are fine
 
+  /** Returns: the @c t parameter of the distribution */
   IntType t() const { return _t; }
+  /** Returns: the @c p parameter of the distribution */
   RealType p() const { return _bernoulli.p(); }
+  /**
+   * Effects: Subsequent uses of the distribution do not depend
+   * on values produced by any engine prior to invoking reset.
+   */
   void reset() { }
 
+  /**
+   * Returns: a random variate distributed according to the
+   * binomial distribution.
+   */
   template<class Engine>
   result_type operator()(Engine& eng)
   {
@@ -55,6 +78,9 @@ public:
   }
 
 #ifndef BOOST_RANDOM_NO_STREAM_OPERATORS
+  /**
+   * Writes the parameters of the distribution to a @c std::ostream.
+   */
   template<class CharT, class Traits>
   friend std::basic_ostream<CharT,Traits>&
   operator<<(std::basic_ostream<CharT,Traits>& os, const binomial_distribution& bd)
@@ -63,6 +89,9 @@ public:
     return os;
   }
 
+  /**
+   * Reads the parameters of the distribution from a @c std::istream.
+   */
   template<class CharT, class Traits>
   friend std::basic_istream<CharT,Traits>&
   operator>>(std::basic_istream<CharT,Traits>& is, binomial_distribution& bd)
index 9723ced2b2566d2dd12f4fa5ad0b18228ea8dc5e..c11ba2bf7773f523a23e5d46a39b68fd6fa3b681 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: cauchy_distribution.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: cauchy_distribution.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
@@ -30,7 +30,14 @@ namespace boost {
   using std::tan;
 #endif
 
-// Cauchy distribution: p(x) = sigma/(pi*(sigma**2 + (x-median)**2))
+// Cauchy distribution: 
+
+/**
+ * The cauchy distribution is a continuous distribution with two
+ * parameters, sigma and median.
+ *
+ * It has \f$p(x) = \frac{\sigma}{\pi(\sigma^2 + (x-m)^2)}\f$
+ */
 template<class RealType = double>
 class cauchy_distribution
 {
@@ -42,16 +49,34 @@ public:
   BOOST_STATIC_ASSERT(!std::numeric_limits<RealType>::is_integer);
 #endif
 
+  /**
+   * Constructs a \cauchy_distribution with the paramters @c median
+   * and @c sigma.
+   */
   explicit cauchy_distribution(result_type median_arg = result_type(0), 
                                result_type sigma_arg = result_type(1))
     : _median(median_arg), _sigma(sigma_arg) { }
 
   // compiler-generated copy ctor and assignment operator are fine
 
+  /**
+   * Returns: the "median" parameter of the distribution
+   */
   result_type median() const { return _median; }
+  /**
+   * Returns: the "sigma" parameter of the distribution
+   */
   result_type sigma() const { return _sigma; }
+  /**
+   * Effects: Subsequent uses of the distribution do not depend
+   * on values produced by any engine prior to invoking reset.
+   */
   void reset() { }
 
+  /**
+   * Returns: A random variate distributed according to the
+   * cauchy distribution.
+   */
   template<class Engine>
   result_type operator()(Engine& eng)
   {
@@ -64,6 +89,9 @@ public:
   }
 
 #ifndef BOOST_RANDOM_NO_STREAM_OPERATORS
+  /**
+   * Writes the parameters of the distribution to a @c std::ostream.
+   */
   template<class CharT, class Traits>
   friend std::basic_ostream<CharT,Traits>&
   operator<<(std::basic_ostream<CharT,Traits>& os, const cauchy_distribution& cd)
@@ -72,6 +100,9 @@ public:
     return os;
   }
 
+  /**
+   * Reads the parameters of the distribution from a @c std::istream.
+   */
   template<class CharT, class Traits>
   friend std::basic_istream<CharT,Traits>&
   operator>>(std::basic_istream<CharT,Traits>& is, cauchy_distribution& cd)
diff --git a/deal.II/contrib/boost/include/boost/random/detail/auto_link.hpp b/deal.II/contrib/boost/include/boost/random/detail/auto_link.hpp
new file mode 100644 (file)
index 0000000..1f30fd5
--- /dev/null
@@ -0,0 +1,42 @@
+/* boost random auto_link.hpp header file
+ *
+ * Copyright Steven Watanabe 2010
+ * 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)
+ *
+ * $Id: auto_link.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
+ */
+
+#ifndef BOOST_RANDOM_DETAIL_AUTO_LINK_HPP
+#define BOOST_RANDOM_DETAIL_AUTO_LINK_HPP
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_HAS_DECLSPEC
+    #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_RANDOM_DYN_LINK)
+        #if defined(BOOST_RANDOM_SOURCE)
+            #define BOOST_RANDOM_DECL __declspec(dllexport)
+        #else
+            #define BOOST_RANDOM_DECL __declspec(dllimport)
+        #endif
+    #endif
+#endif
+
+#ifndef BOOST_RANDOM_DECL
+    #define BOOST_RANDOM_DECL
+#endif
+
+#if !defined(BOOST_RANDOM_NO_LIB) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_RANDOM_SOURCE)
+
+#define BOOST_LIB_NAME boost_random
+
+#if defined(BOOST_RANDOM_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
+    #define BOOST_DYN_LINK
+#endif
+
+#include <boost/config/auto_link.hpp>
+
+#endif
+
+#endif
index a32e2b90653a84022d2675db4b86249e05967ebc..e0a8839031a2c400b58573f6ef97368f2dcce5bb 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: const_mod.hpp 41369 2007-11-25 18:07:19Z bemandawes $
+ * $Id: const_mod.hpp 58649 2010-01-02 21:23:17Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
@@ -22,6 +22,8 @@
 #include <boost/integer_traits.hpp>
 #include <boost/detail/workaround.hpp>
 
+#include <boost/random/detail/disable_warnings.hpp>
+
 namespace boost {
 namespace random {
 
@@ -356,4 +358,6 @@ private:
 } // namespace random
 } // namespace boost
 
+#include <boost/random/detail/enable_warnings.hpp>
+
 #endif // BOOST_RANDOM_CONST_MOD_HPP
diff --git a/deal.II/contrib/boost/include/boost/random/detail/disable_warnings.hpp b/deal.II/contrib/boost/include/boost/random/detail/disable_warnings.hpp
new file mode 100644 (file)
index 0000000..f3ade5e
--- /dev/null
@@ -0,0 +1,23 @@
+/* boost random/detail/disable_warnings.hpp header file
+ *
+ * Copyright Steven Watanabe 2009
+ * 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 http://www.boost.org for most recent version including documentation.
+ *
+ * $Id: disable_warnings.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
+ *
+ */
+
+// No #include guard.  This header is intended to be included multiple times.
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4512)
+#pragma warning(disable:4127)
+#pragma warning(disable:4724)
+#endif
diff --git a/deal.II/contrib/boost/include/boost/random/detail/enable_warnings.hpp b/deal.II/contrib/boost/include/boost/random/detail/enable_warnings.hpp
new file mode 100644 (file)
index 0000000..26184ea
--- /dev/null
@@ -0,0 +1,18 @@
+/* boost random/detail/enable_warnings.hpp header file
+ *
+ * Copyright Steven Watanabe 2009
+ * 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 http://www.boost.org for most recent version including documentation.
+ *
+ * $Id: enable_warnings.hpp 58649 2010-01-02 21:23:17Z steven_watanabe $
+ *
+ */
+
+// No #include guard.  This header is intended to be included multiple times.
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
index 02dd391a32fafa58f452e065a81177a98a1bee80..468427c62ae4ae0ec2523408821d905a90844105 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: pass_through_engine.hpp 24096 2004-07-27 03:43:34Z dgregor $
+ * $Id: pass_through_engine.hpp 58649 2010-01-02 21:23:17Z steven_watanabe $
  *
  */
 
@@ -16,7 +16,7 @@
 
 #include <boost/config.hpp>
 #include <boost/random/detail/ptr_helper.hpp>
-
+#include <boost/random/detail/disable_warnings.hpp>
 
 namespace boost {
 namespace random {
@@ -94,5 +94,7 @@ operator>>(std::istream& is,
 } // namespace random
 } // namespace boost
 
+#include <boost/random/detail/enable_warnings.hpp>
+
 #endif // BOOST_RANDOM_DETAIL_PASS_THROUGH_ENGINE_HPP
 
index e1df4333540ddedc907fc0f67717d7d263db3188..48cc17e332b65aab8a33a021911bc405d64e7278 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: seed.hpp 53871 2009-06-13 17:54:06Z steven_watanabe $
+ * $Id: seed.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  */
 
 #ifndef BOOST_RANDOM_DETAIL_SEED_HPP
@@ -15,7 +15,9 @@
 
 #include <boost/config.hpp>
 
-#if !defined(BOOST_NO_SFINAE)
+// Sun seems to have trouble with the use of SFINAE for the
+// templated constructor.  So does Borland.
+#if !defined(BOOST_NO_SFINAE) && !defined(__SUNPRO_CC) && !defined(__BORLANDC__)
 
 #include <boost/utility/enable_if.hpp>
 #include <boost/type_traits/is_arithmetic.hpp>
@@ -31,8 +33,7 @@ template<class Engine, class T>
 struct disable_constructor : disable_seed<T> {};
 
 template<class Engine>
-struct disable_constructor<Engine, Engine> {
-};
+struct disable_constructor<Engine, Engine> {};
 
 #define BOOST_RANDOM_DETAIL_GENERATOR_CONSTRUCTOR(Self, Generator, gen) \
     template<class Generator>                                           \
index 6b97ab332cc381273615466f2b29764060faf20c..27abd66e712ccd8b1e2272597b131f8422bb0df6 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: discard_block.hpp 53871 2009-06-13 17:54:06Z steven_watanabe $
+ * $Id: discard_block.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-03-02  created
 namespace boost {
 namespace random {
 
+/**
+ * The class template \discard_block is a model of
+ * \pseudo_random_number_generator.  It modifies
+ * another generator by discarding parts of its output.
+ * Out of every block of @c r results, the first @c p
+ * will be returned and the rest discarded.
+ *
+ * Requires: 0 < p <= r
+ */
 template<class UniformRandomNumberGenerator, unsigned int p, unsigned int r>
 class discard_block
 {
index 56ac8a21ca76f51b300cdb661ea2a3739228371f..022faef8f61e5040997f6b90198abb3b2377828f 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: exponential_distribution.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: exponential_distribution.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
 
 namespace boost {
 
-// exponential distribution: p(x) = lambda * exp(-lambda * x)
+/**
+ * The exponential distribution has a single parameter lambda.
+ *
+ * It has \f$p(x) = \lambda e^{-\lambda x}\f$
+ */
 template<class RealType = double>
 class exponential_distribution
 {
index 9e95bb8ef807a83bab02048a35fefb3b67b0fdeb..384954baca2994c4afcb7a183dbce988489d06a8 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: gamma_distribution.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: gamma_distribution.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  */
 
 
 namespace boost {
 
-// Knuth
+// The algorithm is taken from Knuth
+
+/**
+ * The gamma distribution is a continuous distribution with a single
+ * parameter alpha.
+ *
+ * It has \f$p(x) = x^{\alpha-1}\frac{e^{-x}}{\Gamma(\alpha)}\f$.
+ */
 template<class RealType = double>
 class gamma_distribution
 {
@@ -114,6 +121,7 @@ public:
 #endif
 
 private:
+  /// \cond hide_private_members
   void init()
   {
 #ifndef BOOST_NO_STDC_NAMESPACE
@@ -122,6 +130,7 @@ private:
 #endif
     _p = exp(result_type(1)) / (_alpha + exp(result_type(1)));
   }
+  /// \endcond
 
   exponential_distribution<RealType> _exp;
   result_type _alpha;
index b7e98a1d7b78653851a6c1f4028f96221d7d9a9c..d96fc45e570890d58ca6d2151b49a535a39f8d6c 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: geometric_distribution.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: geometric_distribution.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
@@ -30,7 +30,14 @@ namespace boost {
   using std::log;
 #endif
 
-// geometric distribution: p(i) = (1-p) * pow(p, i-1)   (integer)
+/**
+ * An instantiation of the class template @c geometric_distribution models
+ * a \random_distribution.  The distribution produces positive
+ * integers which are the number of bernoulli trials
+ * with probability @c p required to get one that fails.
+ *
+ * For the geometric distribution, \f$p(i) = (1-p) p^{i-1}\f$.
+ */
 template<class IntType = int, class RealType = double>
 class geometric_distribution
 {
@@ -38,8 +45,13 @@ public:
   typedef RealType input_type;
   typedef IntType result_type;
 
-  explicit geometric_distribution(const RealType& p_arg = RealType(0.5))
-    : _p(p_arg)
+  /**
+   * Contructs a new geometric_distribution with the paramter @c p.
+   *
+   * Requires: 0 < p < 1
+   */
+  explicit geometric_distribution(const RealType& p = RealType(0.5))
+    : _p(p)
   {
     assert(RealType(0) < _p && _p < RealType(1));
     init();
@@ -47,6 +59,9 @@ public:
 
   // compiler-generated copy ctor and assignment operator are fine
 
+  /**
+   * Returns: the distribution parameter @c p
+   */
   RealType p() const { return _p; }
   void reset() { }
 
@@ -80,6 +95,9 @@ public:
 #endif
 
 private:
+
+  /// \cond hide_private_functions
+
   void init()
   {
 #ifndef BOOST_NO_STDC_NAMESPACE
@@ -88,6 +106,8 @@ private:
     _log_p = log(_p);
   }
 
+  /// \endcond
+
   RealType _p;
   RealType _log_p;
 };
index aa001a96f144591b31d67b34d872adb95777c2ca..93604b324e58ee32b9de97462f2059bf6b512056 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: inversive_congruential.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: inversive_congruential.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
@@ -28,6 +28,35 @@ namespace boost {
 namespace random {
 
 // Eichenauer and Lehn 1986
+/**
+ * Instantiations of class template @c inversive_congruential model a
+ * \pseudo_random_number_generator. It uses the inversive congruential
+ * algorithm (ICG) described in
+ *
+ *  @blockquote
+ *  "Inversive pseudorandom number generators: concepts, results and links",
+ *  Peter Hellekalek, In: "Proceedings of the 1995 Winter Simulation
+ *  Conference", C. Alexopoulos, K. Kang, W.R. Lilegdon, and D. Goldsman
+ *  (editors), 1995, pp. 255-262. ftp://random.mat.sbg.ac.at/pub/data/wsc95.ps
+ *  @endblockquote
+ *
+ * The output sequence is defined by x(n+1) = (a*inv(x(n)) - b) (mod p),
+ * where x(0), a, b, and the prime number p are parameters of the generator.
+ * The expression inv(k) denotes the multiplicative inverse of k in the
+ * field of integer numbers modulo p, with inv(0) := 0.
+ *
+ * The template parameter IntType shall denote a signed integral type large
+ * enough to hold p; a, b, and p are the parameters of the generators. The
+ * template parameter val is the validation value checked by validation.
+ *
+ * @xmlnote
+ * The implementation currently uses the Euclidian Algorithm to compute
+ * the multiplicative inverse. Therefore, the inversive generators are about
+ * 10-20 times slower than the others (see section"performance"). However,
+ * the paper talks of only 3x slowdown, so the Euclidian Algorithm is probably
+ * not optimal for calculating the multiplicative inverse.
+ * @endxmlnote
+ */
 template<class IntType, IntType a, IntType b, IntType p, IntType val>
 class inversive_congruential
 {
@@ -47,6 +76,10 @@ public:
   result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return b == 0 ? 1 : 0; }
   result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return p-1; }
 
+  /**
+   * Constructs an inversive_congruential generator with
+   * @c y0 as the initial state.
+   */
   explicit inversive_congruential(IntType y0 = 1) : value(y0)
   {
     BOOST_STATIC_ASSERT(b >= 0);
@@ -58,6 +91,7 @@ public:
   template<class It> inversive_congruential(It& first, It last)
   { seed(first, last); }
 
+  /** Changes the current state to y0. */
   void seed(IntType y0 = 1) { value = y0; if(b == 0) assert(y0 > 0); }
   template<class It> void seed(It& first, It last)
   {
@@ -121,6 +155,16 @@ const typename inversive_congruential<IntType, a, b, p, val>::result_type invers
 
 } // namespace random
 
+/**
+ * The specialization hellekalek1995 was suggested in
+ *
+ *  @blockquote
+ *  "Inversive pseudorandom number generators: concepts, results and links",
+ *  Peter Hellekalek, In: "Proceedings of the 1995 Winter Simulation
+ *  Conference", C. Alexopoulos, K. Kang, W.R. Lilegdon, and D. Goldsman
+ *  (editors), 1995, pp. 255-262. ftp://random.mat.sbg.ac.at/pub/data/wsc95.ps
+ *  @endblockquote
+ */
 typedef random::inversive_congruential<int32_t, 9102, 2147483647-36884165,
   2147483647, 0> hellekalek1995;
 
index 5432885d83d10e62cdcd2a4117153b20192d2e09..20860dae69156067a6292d173ff5591a51a7e4ae 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: lagged_fibonacci.hpp 53871 2009-06-13 17:54:06Z steven_watanabe $
+ * $Id: lagged_fibonacci.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
@@ -80,6 +80,12 @@ namespace detail
 }
 #  endif
 
+/** 
+ * Instantiations of class template \lagged_fibonacci model a
+ * \pseudo_random_number_generator. It uses a lagged Fibonacci
+ * algorithm with two lags @c p and @c q:
+ * x(i) = x(i-p) + x(i-q) (mod 2<sup>w</sup>) with p > q.
+ */
 template<class UIntType, int w, unsigned int p, unsigned int q,
          UIntType val = 0>
 class lagged_fibonacci
@@ -91,24 +97,45 @@ public:
   BOOST_STATIC_CONSTANT(unsigned int, long_lag = p);
   BOOST_STATIC_CONSTANT(unsigned int, short_lag = q);
 
+  /**
+   * Returns: the smallest value that the generator can produce
+   */
   result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return 0; }
+  /**
+   * Returns: the largest value that the generator can produce
+   */
   result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return wordmask; }
 
+  /**
+   * Creates a new @c lagged_fibonacci generator and calls @c seed()
+   */
   lagged_fibonacci() { init_wordmask(); seed(); }
+  /**
+   * Creates a new @c lagged_fibonacci generator and calls @c seed(value)
+   */
   explicit lagged_fibonacci(uint32_t value) { init_wordmask(); seed(value); }
+  /**
+   * Creates a new @c lagged_fibonacci generator and calls @c seed(first, last)
+   */
   template<class It> lagged_fibonacci(It& first, It last)
   { init_wordmask(); seed(first, last); }
   // compiler-generated copy ctor and assignment operator are fine
 
 private:
+  /// \cond hide_private_members
   void init_wordmask()
   {
     wordmask = 0;
     for(int j = 0; j < w; ++j)
       wordmask |= (1u << j);
   }
+  /// \endcond
 
 public:
+  /**
+   * Sets the state of the generator to values produced by
+   * a \minstd_rand generator.
+   */
   void seed(uint32_t value = 331u)
   {
     minstd_rand0 gen(value);
@@ -117,6 +144,11 @@ public:
     i = long_lag;
   }
 
+  /**
+   * Sets the state of the generator to values from the iterator
+   * range [first, last).  If there are not enough elements in the
+   * range [first, last) throws @c std::invalid_argument.
+   */
   template<class It>
   void seed(It& first, It last)
   {
@@ -129,6 +161,9 @@ public:
       throw std::invalid_argument("lagged_fibonacci::seed");
   }
 
+  /**
+   * Returns: the next value of the generator
+   */
   result_type operator()()
   {
     if(i >= long_lag)
@@ -183,7 +218,10 @@ public:
 #endif
 
 private:
+  /// \cond hide_private_members
   void fill();
+  /// \endcond
+
   UIntType wordmask;
   unsigned int i;
   UIntType x[long_lag];
@@ -199,6 +237,8 @@ template<class UIntType, int w, unsigned int p, unsigned int q, UIntType val>
 const unsigned int lagged_fibonacci<UIntType, w, p, q, val>::short_lag;
 #endif
 
+/// \cond hide_private_members
+
 template<class UIntType, int w, unsigned int p, unsigned int q, UIntType val>
 void lagged_fibonacci<UIntType, w, p, q, val>::fill()
 {
@@ -257,6 +297,30 @@ BOOST_RANDOM_FIBONACCI_VAL(double, 44497,21034, 0.254135073399297, 1e-14)
 
 #undef BOOST_RANDOM_FIBONACCI_VAL
 
+/// \endcond
+
+/**
+ * Instantiations of class template @c lagged_fibonacci_01 model a
+ * \pseudo_random_number_generator. It uses a lagged Fibonacci
+ * algorithm with two lags @c p and @c q, evaluated in floating-point
+ * arithmetic: x(i) = x(i-p) + x(i-q) (mod 1) with p > q. See
+ *
+ *  @blockquote
+ *  "Uniform random number generators for supercomputers", Richard Brent,
+ *  Proc. of Fifth Australian Supercomputer Conference, Melbourne,
+ *  Dec. 1992, pp. 704-706.
+ *  @endblockquote
+ *
+ * @xmlnote
+ * The quality of the generator crucially depends on the choice
+ * of the parameters. User code should employ one of the sensibly
+ * parameterized generators such as \lagged_fibonacci607 instead.
+ * @endxmlnote
+ *
+ * The generator requires considerable amounts of memory for the storage
+ * of its state array. For example, \lagged_fibonacci607 requires about
+ * 4856 bytes and \lagged_fibonacci44497 requires about 350 KBytes.
+ */
 template<class RealType, int w, unsigned int p, unsigned int q>
 class lagged_fibonacci_01
 {
@@ -267,9 +331,12 @@ public:
   BOOST_STATIC_CONSTANT(unsigned int, long_lag = p);
   BOOST_STATIC_CONSTANT(unsigned int, short_lag = q);
 
+  /** Constructs a @c lagged_fibonacci_01 generator and calls @c seed(). */
   lagged_fibonacci_01() { init_modulus(); seed(); }
+  /** Constructs a @c lagged_fibonacci_01 generator and calls @c seed(value). */
   BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(lagged_fibonacci_01, uint32_t, value)
   { init_modulus(); seed(value); }
+  /** Constructs a @c lagged_fibonacci_01 generator and calls @c seed(gen). */
   BOOST_RANDOM_DETAIL_GENERATOR_CONSTRUCTOR(lagged_fibonacci_01, Generator, gen)
   { init_modulus(); seed(gen); }
   template<class It> lagged_fibonacci_01(It& first, It last)
@@ -277,6 +344,7 @@ public:
   // compiler-generated copy ctor and assignment operator are fine
 
 private:
+  /// \cond hide_private_members
   void init_modulus()
   {
 #ifndef BOOST_NO_STDC_NAMESPACE
@@ -285,18 +353,30 @@ private:
 #endif
     _modulus = pow(RealType(2), word_size);
   }
+  /// \endcond
 
 public:
+  /** Calls seed(331u). */
   void seed() { seed(331u); }
+  /**
+   * Constructs a \minstd_rand0 generator with the constructor parameter
+   * value and calls seed with it. Distinct seeds in the range
+   * [1, 2147483647) will produce generators with different states. Other
+   * seeds will be equivalent to some seed within this range. See
+   * \linear_congruential for details.
+   */
   BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(lagged_fibonacci_01, uint32_t, value)
   {
     minstd_rand0 intgen(value);
     seed(intgen);
   }
 
-  // For GCC, moving this function out-of-line prevents inlining, which may
-  // reduce overall object code size.  However, MSVC does not grok
-  // out-of-line template member functions.
+  /**
+   * Sets the state of this @c lagged_fibonacci_01 to the values returned
+   * by p invocations of \uniform_01<code>\<RealType\>()(gen)</code>.
+   *
+   * Complexity: Exactly p invocations of gen.
+   */
   BOOST_RANDOM_DETAIL_GENERATOR_SEED(lagged_fibonacci, Generator, gen)
   {
     // use pass-by-reference, but wrap argument in pass_through_engine
@@ -407,7 +487,9 @@ public:
 #endif
 
 private:
+  /// \cond hide_private_members
   void fill();
+  /// \endcond
   unsigned int i;
   RealType x[long_lag];
   RealType _modulus;
@@ -426,6 +508,7 @@ const int lagged_fibonacci_01<RealType,w,p,q>::word_size;
 
 #endif
 
+/// \cond hide_private_members
 template<class RealType, int w, unsigned int p, unsigned int q>
 void lagged_fibonacci_01<RealType, w, p, q>::fill()
 {
@@ -446,17 +529,70 @@ void lagged_fibonacci_01<RealType, w, p, q>::fill()
   }
   i = 0;
 }
+/// \endcond
 
 } // namespace random
 
+#ifdef BOOST_RANDOM_DOXYGEN
+namespace detail {
+/**
+ * The specializations lagged_fibonacci607 ... lagged_fibonacci44497
+ * use well tested lags.
+ *
+ * See
+ *
+ *  @blockquote
+ *  "On the Periods of Generalized Fibonacci Recurrences", Richard P. Brent
+ *  Computer Sciences Laboratory Australian National University, December 1992
+ *  @endblockquote
+ *
+ * The lags used here can be found in
+ *
+ *  @blockquote
+ *  "Uniform random number generators for supercomputers", Richard Brent,
+ *  Proc. of Fifth Australian Supercomputer Conference, Melbourne,
+ *  Dec. 1992, pp. 704-706.
+ *  @endblockquote
+ */
+struct lagged_fibonacci_doc {};
+}
+#endif
+
+/**
+ * @copydoc boost::detail::lagged_fibonacci_doc
+ */
 typedef random::lagged_fibonacci_01<double, 48, 607, 273> lagged_fibonacci607;
+/**
+ * @copydoc boost::detail::lagged_fibonacci_doc
+ */
 typedef random::lagged_fibonacci_01<double, 48, 1279, 418> lagged_fibonacci1279;
+/**
+ * @copydoc boost::detail::lagged_fibonacci_doc
+ */
 typedef random::lagged_fibonacci_01<double, 48, 2281, 1252> lagged_fibonacci2281;
+/**
+ * @copydoc boost::detail::lagged_fibonacci_doc
+ */
 typedef random::lagged_fibonacci_01<double, 48, 3217, 576> lagged_fibonacci3217;
+/**
+ * @copydoc boost::detail::lagged_fibonacci_doc
+ */
 typedef random::lagged_fibonacci_01<double, 48, 4423, 2098> lagged_fibonacci4423;
+/**
+ * @copydoc boost::detail::lagged_fibonacci_doc
+ */
 typedef random::lagged_fibonacci_01<double, 48, 9689, 5502> lagged_fibonacci9689;
+/**
+ * @copydoc boost::detail::lagged_fibonacci_doc
+ */
 typedef random::lagged_fibonacci_01<double, 48, 19937, 9842> lagged_fibonacci19937;
+/**
+ * @copydoc boost::detail::lagged_fibonacci_doc
+ */
 typedef random::lagged_fibonacci_01<double, 48, 23209, 13470> lagged_fibonacci23209;
+/**
+ * @copydoc boost::detail::lagged_fibonacci_doc
+ */
 typedef random::lagged_fibonacci_01<double, 48, 44497, 21034> lagged_fibonacci44497;
 
 
index ce971ca29bbc564f85133f735e371cbc468bc564..351b9c19c8d98f90e0a97d35fed02513c469fd0e 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: linear_congruential.hpp 53871 2009-06-13 17:54:06Z steven_watanabe $
+ * $Id: linear_congruential.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
 #include <boost/random/detail/const_mod.hpp>
 #include <boost/detail/workaround.hpp>
 
+#include <boost/random/detail/disable_warnings.hpp>
+
 namespace boost {
 namespace random {
 
-// compile-time configurable linear congruential generator
+/**
+ * Instantiations of class template linear_congruential model a
+ * \pseudo_random_number_generator. Linear congruential pseudo-random
+ * number generators are described in:
+ *
+ *  "Mathematical methods in large-scale computing units", D. H. Lehmer,
+ *  Proc. 2nd Symposium on Large-Scale Digital Calculating Machines,
+ *  Harvard University Press, 1951, pp. 141-146
+ *
+ * Let x(n) denote the sequence of numbers returned by some pseudo-random
+ * number generator. Then for the linear congruential generator,
+ * x(n+1) := (a * x(n) + c) mod m. Parameters for the generator are
+ * x(0), a, c, m. The template parameter IntType shall denote an integral
+ * type. It must be large enough to hold values a, c, and m. The template
+ * parameters a and c must be smaller than m.
+ *
+ * Note: The quality of the generator crucially depends on the choice of
+ * the parameters. User code should use one of the sensibly parameterized
+ * generators such as minstd_rand instead.
+ */
 template<class IntType, IntType a, IntType c, IntType m, IntType val>
 class linear_congruential
 {
@@ -51,13 +72,12 @@ public:
   // BOOST_STATIC_ASSERT(m == 0 || a < m);
   // BOOST_STATIC_ASSERT(m == 0 || c < m);
 
+  /**
+   * Constructs a linear_congruential generator, seeding it with @c x0.
+   */
   explicit linear_congruential(IntType x0 = 1)
-    : _modulus(modulus), _x(_modulus ? (x0 % _modulus) : x0)
   { 
-    assert(c || x0); /* if c == 0 and x(0) == 0 then x(n) = 0 for all n */
-    // overflow check
-    // disabled because it gives spurious "divide by zero" gcc warnings
-    // assert(m == 0 || (a*(m-1)+c) % m == (c < a ? c-a+m : c-a)); 
+    seed(x0);
 
     // MSVC fails BOOST_STATIC_ASSERT with std::numeric_limits at class scope
 #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
@@ -65,32 +85,76 @@ public:
 #endif
   }
 
+  /**
+   * Constructs a @c linear_congruential generator and seeds it
+   * with values taken from the itrator range [first, last)
+   * and adjusts first to point to the element after the last one
+   * used.  If there are not enough elements, throws @c std::invalid_argument.
+   *
+   * first and last must be input iterators.
+   */
   template<class It>
   linear_congruential(It& first, It last)
-    : _modulus(modulus)
   {
       seed(first, last);
   }
 
   // compiler-generated copy constructor and assignment operator are fine
+
+  /**
+   * If c mod m is zero and x0 mod m is zero, changes the current value of
+   * the generator to 1. Otherwise, changes it to x0 mod m. If c is zero,
+   * distinct seeds in the range [1,m) will leave the generator in distinct
+   * states. If c is not zero, the range is [0,m).
+   */
   void seed(IntType x0 = 1)
   {
-    assert(c || x0);
-    _x = (_modulus ? (x0 % _modulus) : x0);
+    // wrap _x if it doesn't fit in the destination
+    if(modulus == 0) {
+      _x = x0;
+    } else {
+      _x = x0 % modulus;
+    }
+    // handle negative seeds
+    if(_x <= 0 && _x != 0) {
+      _x += modulus;
+    }
+    // adjust to the correct range
+    if(increment == 0 && _x == 0) {
+      _x = 1;
+    }
+    assert(_x >= (min)());
+    assert(_x <= (max)());
   }
 
+  /**
+   * seeds a @c linear_congruential generator with values taken
+   * from the itrator range [first, last) and adjusts @c first to
+   * point to the element after the last one used.  If there are
+   * not enough elements, throws @c std::invalid_argument.
+   *
+   * @c first and @c last must be input iterators.
+   */
   template<class It>
   void seed(It& first, It last)
   {
     if(first == last)
       throw std::invalid_argument("linear_congruential::seed");
-    IntType value = *first++;
-    _x = (_modulus ? (value % _modulus) : value);
+    seed(*first++);
   }
 
+  /**
+   * Returns the smallest value that the @c linear_congruential generator
+   * can produce.
+   */
   result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return c == 0 ? 1 : 0; }
+  /**
+   * Returns the largest value that the @c linear_congruential generator
+   * can produce.
+   */
   result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return modulus-1; }
 
+  /** Returns the next value of the @c linear_congruential generator. */
   IntType operator()()
   {
     _x = const_mod<IntType, m>::mult_add(a, _x, c);
@@ -135,8 +199,7 @@ public:
 private:
 #endif
 #endif
-    
-  IntType _modulus;   // work-around for gcc "divide by zero" warning in ctor
+
   IntType _x;
 };
 
@@ -190,14 +253,48 @@ const IntType linear_congruential<IntType,a,c,m,val>::modulus;
 } // namespace random
 
 // validation values from the publications
+/**
+ * The specialization \minstd_rand0 was originally suggested in
+ *
+ *  @blockquote
+ *  A pseudo-random number generator for the System/360, P.A. Lewis,
+ *  A.S. Goodman, J.M. Miller, IBM Systems Journal, Vol. 8, No. 2,
+ *  1969, pp. 136-146
+ *  @endblockquote
+ *
+ * It is examined more closely together with \minstd_rand in
+ *
+ *  @blockquote
+ *  "Random Number Generators: Good ones are hard to find",
+ *  Stephen K. Park and Keith W. Miller, Communications of
+ *  the ACM, Vol. 31, No. 10, October 1988, pp. 1192-1201 
+ *  @endblockquote
+ */
 typedef random::linear_congruential<int32_t, 16807, 0, 2147483647, 
   1043618065> minstd_rand0;
+
+/** The specialization \minstd_rand was suggested in
+ *
+ *  @blockquote
+ *  "Random Number Generators: Good ones are hard to find",
+ *  Stephen K. Park and Keith W. Miller, Communications of
+ *  the ACM, Vol. 31, No. 10, October 1988, pp. 1192-1201
+ *  @endblockquote
+ */
 typedef random::linear_congruential<int32_t, 48271, 0, 2147483647,
   399268537> minstd_rand;
 
 
 #if !defined(BOOST_NO_INT64_T) && !defined(BOOST_NO_INTEGRAL_INT64_T)
-// emulate the lrand48() C library function; requires support for uint64_t
+/** Class @c rand48 models a \pseudo_random_number_generator. It uses
+ * the linear congruential algorithm with the parameters a = 0x5DEECE66D,
+ * c = 0xB, m = 2**48. It delivers identical results to the @c lrand48()
+ * function available on some systems (assuming lcong48 has not been called).
+ *
+ * It is only available on systems where @c uint64_t is provided as an
+ * integral type, so that for example static in-class constants and/or
+ * enum definitions with large @c uint64_t numbers work.
+ */
 class rand48 
 {
 public:
@@ -209,17 +306,46 @@ public:
 #else
   enum { has_fixed_range = false };
 #endif
+  /**
+   * Returns the smallest value that the generator can produce
+   */
   int32_t min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return 0; }
+  /**
+   * Returns the largest value that the generator can produce
+   */
   int32_t max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return std::numeric_limits<int32_t>::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
   
+#ifdef BOOST_RANDOM_DOXYGEN
+  /**
+   * If T is an integral type smaller than int46_t, constructs
+   * a \rand48 generator with x(0) := (x0 << 16) | 0x330e.  Otherwise
+   * constructs a \rand48 generator with x(0) = x0.
+   */
+  template<class T> explicit rand48(T x0 = 1);
+#else
   rand48() : lcf(cnv(static_cast<int32_t>(1))) {}
   template<class T> explicit rand48(T x0) : lcf(cnv(x0)) { }
+#endif
   template<class It> rand48(It& first, It last) : lcf(first, last) { }
+
   // compiler-generated copy ctor and assignment operator are fine
+
+#ifdef BOOST_RANDOM_DOXYGEN
+  /**
+   * If T is an integral type smaller than int46_t, changes
+   * the current value x(n) of the generator to (x0 << 16) | 0x330e.
+   * Otherwise changes the current value x(n) to x0.
+   */
+  template<class T> void seed(T x0 = 1);
+#else
   void seed() { seed(static_cast<int32_t>(1)); }
   template<class T> void seed(T x0) { lcf.seed(cnv(x0)); }
+#endif
   template<class It> void seed(It& first, It last) { lcf.seed(first,last); }
 
+  /**
+   * Returns the next value of the generator.
+   */
   int32_t operator()() { return static_cast<int32_t>(lcf() >> 17); }
   // by experiment from lrand48()
   static bool validation(int32_t x) { return x == 1993516219; }
@@ -250,6 +376,7 @@ public:
   { return !(*this == rhs); }
 #endif
 private:
+  /// \cond hide_private_members
   random::linear_congruential<uint64_t,
     uint64_t(0xDEECE66DUL) | (uint64_t(0x5) << 32), // xxxxULL is not portable
     0xB, uint64_t(1)<<48, /* unknown */ 0> lcf;
@@ -259,15 +386,18 @@ private:
     if(sizeof(T) < sizeof(uint64_t)) {
       return (static_cast<uint64_t>(x) << 16) | 0x330e;
     } else {
-        return(static_cast<uint64_t>(x));
+      return(static_cast<uint64_t>(x));
     }
   }
   static uint64_t cnv(float x) { return(static_cast<uint64_t>(x)); }
   static uint64_t cnv(double x) { return(static_cast<uint64_t>(x)); }
   static uint64_t cnv(long double x) { return(static_cast<uint64_t>(x)); }
+  /// \endcond
 };
 #endif /* !BOOST_NO_INT64_T && !BOOST_NO_INTEGRAL_INT64_T */
 
 } // namespace boost
 
+#include <boost/random/detail/enable_warnings.hpp>
+
 #endif // BOOST_RANDOM_LINEAR_CONGRUENTIAL_HPP
index cb01062c62a53e6800bb2d8ee658cddf965fb645..5e9b016a6ba97697e97223fc9d663464a437210b 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: linear_feedback_shift.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: linear_feedback_shift.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  */
 
 namespace boost {
 namespace random {
 
-// Tausworte 1965
+/**
+ * Instatiation of @c linear_feedback_shift model a
+ * \pseudo_random_number_generator.  It was originally
+ * proposed in
+ *
+ *  @blockquote
+ *  "Random numbers generated by linear recurrence modulo two.",
+ *  Tausworthe, R. C.(1965), Mathematics of Computation 19, 201-209.
+ *  @endblockquote
+ */
 template<class UIntType, int w, int k, int q, int s, UIntType val>
 class linear_feedback_shift
 {
@@ -77,7 +86,12 @@ public:
     seed(first, last);
   }
 
-  void seed(UIntType s0 = 341) { assert(s0 >= (1 << (w-k))); value = s0; }
+  void seed(UIntType s0 = 341) {
+      if(s0 < (1 << (w-k))) {
+          s0 += 1 << (w-k);
+      }
+      value = s0;
+  }
   template<class It> void seed(It& first, It last)
   {
     if(first == last)
index 05f6ff6ad63da24cf124019f246cb061811d8048..ed7d900dc08ea03117092ab79f1b75f8011b4fb3 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: lognormal_distribution.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: lognormal_distribution.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
@@ -40,6 +40,13 @@ namespace boost {
   using std::exp;
 #endif
 
+/**
+ * Instantiations of class template lognormal_distribution model a
+ * \random_distribution. Such a distribution produces random numbers
+ * with \f$p(x) = \frac{1}{x \sigma_N \sqrt{2\pi}} e^{\frac{-\left(\log(x)-\mu_N\right)^2}{2\sigma_N^2}}\f$
+ * for x > 0, where \f$\mu_N = \log\left(\frac{\mu^2}{\sqrt{\sigma^2 + \mu^2}}\right)\f$ and
+ * \f$\sigma_N = \sqrt{\log\left(1 + \frac{\sigma^2}{\mu^2}\right)}\f$.
+ */
 template<class RealType = double>
 class lognormal_distribution
 {
@@ -51,6 +58,10 @@ public:
     BOOST_STATIC_ASSERT(!std::numeric_limits<RealType>::is_integer);
 #endif
 
+  /**
+   * Constructs a lognormal_distribution. @c mean and @c sigma are the
+   * mean and standard deviation of the lognormal distribution.
+   */
   explicit lognormal_distribution(result_type mean_arg = result_type(1),
                                   result_type sigma_arg = result_type(1))
     : _mean(mean_arg), _sigma(sigma_arg)
@@ -95,6 +106,8 @@ public:
 #endif
 
 private:
+
+  /// \cond hide_private_members
   void init()
   {
 #ifndef BOOST_NO_STDC_NAMESPACE
@@ -104,6 +117,7 @@ private:
     _nmean = log(_mean*_mean/sqrt(_sigma*_sigma + _mean*_mean));
     _nsigma = sqrt(log(_sigma*_sigma/_mean/_mean+result_type(1)));
   }
+  /// \endcond
 
   RealType _mean, _sigma;
   RealType _nmean, _nsigma;
index b60aadfab0100c94af3b7041aa810f6b63d453da..fa80aa622f254f39ac49e4416ac6fcbeabdcd576 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: mersenne_twister.hpp 53871 2009-06-13 17:54:06Z steven_watanabe $
+ * $Id: mersenne_twister.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
 namespace boost {
 namespace random {
 
-// http://www.math.keio.ac.jp/matumoto/emt.html
+/**
+ * Instantiations of class template mersenne_twister model a
+ * \pseudo_random_number_generator. It uses the algorithm described in
+ *
+ *  @blockquote
+ *  "Mersenne Twister: A 623-dimensionally equidistributed uniform
+ *  pseudo-random number generator", Makoto Matsumoto and Takuji Nishimura,
+ *  ACM Transactions on Modeling and Computer Simulation: Special Issue on
+ *  Uniform Random Number Generation, Vol. 8, No. 1, January 1998, pp. 3-30. 
+ *  @endblockquote
+ *
+ * @xmlnote
+ * The boost variant has been implemented from scratch and does not
+ * derive from or use mt19937.c provided on the above WWW site. However, it
+ * was verified that both produce identical output.
+ * @endxmlnote
+ *
+ * The seeding from an integer was changed in April 2005 to address a
+ * <a href="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html">weakness</a>.
+ * 
+ * The quality of the generator crucially depends on the choice of the
+ * parameters.  User code should employ one of the sensibly parameterized
+ * generators such as \mt19937 instead.
+ *
+ * The generator requires considerable amounts of memory for the storage of
+ * its state array. For example, \mt11213b requires about 1408 bytes and
+ * \mt19937 requires about 2496 bytes.
+ */
 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
   int s, UIntType b, int t, UIntType c, int l, UIntType val>
 class mersenne_twister
@@ -54,19 +81,39 @@ public:
 
   BOOST_STATIC_CONSTANT(bool, has_fixed_range = false);
   
+  /**
+   * Constructs a @c mersenne_twister and calls @c seed().
+   */
   mersenne_twister() { seed(); }
 
+  /**
+   * Constructs a @c mersenne_twister and calls @c seed(value).
+   */
   BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(mersenne_twister, UIntType, value)
   { seed(value); }
   template<class It> mersenne_twister(It& first, It last) { seed(first,last); }
 
+  /**
+   * Constructs a mersenne_twister and calls @c seed(gen).
+   *
+   * @xmlnote
+   * The copy constructor will always be preferred over
+   * the templated constructor.
+   * @endxmlnote
+   */
   BOOST_RANDOM_DETAIL_GENERATOR_CONSTRUCTOR(mersenne_twister, Generator, gen)
   { seed(gen); }
 
   // compiler-generated copy ctor and assignment operator are fine
 
+  /** Calls @c seed(result_type(5489)). */
   void seed() { seed(UIntType(5489)); }
 
+  /**
+   * Sets the state x(0) to v mod 2w. Then, iteratively,
+   * sets x(i) to (i + 1812433253 * (x(i-1) xor (x(i-1) rshift w-2))) mod 2<sup>w</sup>
+   * for i = 1 .. n-1. x(n) is the first value to be returned by operator().
+   */
   BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(mersenne_twister, UIntType, value)
   {
     // New seeding algorithm from 
@@ -81,9 +128,12 @@ public:
     }
   }
 
-  // For GCC, moving this function out-of-line prevents inlining, which may
-  // reduce overall object code size.  However, MSVC does not grok
-  // out-of-line definitions of member function templates.
+  /**
+   * Sets the state of this mersenne_twister to the values
+   * returned by n invocations of gen.
+   *
+   * Complexity: Exactly n invocations of gen.
+   */
   BOOST_RANDOM_DETAIL_GENERATOR_SEED(mersenne_twister, Generator, gen)
   {
 #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
@@ -170,6 +220,7 @@ public:
 #endif
 
 private:
+  /// \cond hide_private_members
   // returns x(i-n+index), where index is in 0..n-1
   UIntType compute(unsigned int index) const
   {
@@ -177,6 +228,7 @@ private:
     return x[ (i + n + index) % (2*n) ];
   }
   void twist(int block);
+  /// \endcond
 
   // state representation: next output is o(x(i))
   //   x[0]  ... x[k] x[k+1] ... x[n-1]     x[n]     ... x[2*n-1]   represents
@@ -225,6 +277,7 @@ template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
 const int mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::output_l;
 #endif
 
+/// \cond hide_private_members
 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
   int s, UIntType b, int t, UIntType c, int l, UIntType val>
 void mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::twist(int block)
@@ -256,6 +309,7 @@ void mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::twist(int block)
     i = 0;
   }
 }
+/// \endcond
 
 template<class UIntType, int w, int n, int m, int r, UIntType a, int u,
   int s, UIntType b, int t, UIntType c, int l, UIntType val>
@@ -278,11 +332,31 @@ mersenne_twister<UIntType,w,n,m,r,a,u,s,b,t,c,l,val>::operator()()
 
 } // namespace random
 
-
+/**
+ * The specializations \mt11213b and \mt19937 are from
+ *
+ *  @blockquote
+ *  "Mersenne Twister: A 623-dimensionally equidistributed
+ *  uniform pseudo-random number generator", Makoto Matsumoto
+ *  and Takuji Nishimura, ACM Transactions on Modeling and
+ *  Computer Simulation: Special Issue on Uniform Random Number
+ *  Generation, Vol. 8, No. 1, January 1998, pp. 3-30. 
+ *  @endblockquote
+ */
 typedef random::mersenne_twister<uint32_t,32,351,175,19,0xccab8ee7,11,
   7,0x31b6ab00,15,0xffe50000,17, 0xa37d3c92> mt11213b;
 
-// validation by experiment from mt19937.c
+/**
+ * The specializations \mt11213b and \mt19937 are from
+ *
+ *  @blockquote
+ *  "Mersenne Twister: A 623-dimensionally equidistributed
+ *  uniform pseudo-random number generator", Makoto Matsumoto
+ *  and Takuji Nishimura, ACM Transactions on Modeling and
+ *  Computer Simulation: Special Issue on Uniform Random Number
+ *  Generation, Vol. 8, No. 1, January 1998, pp. 3-30. 
+ *  @endblockquote
+ */
 typedef random::mersenne_twister<uint32_t,32,624,397,31,0x9908b0df,11,
   7,0x9d2c5680,15,0xefc60000,18, 3346425566U> mt19937;
 
index 486411e02a923808356f511ee2294dd3b10ae396..3375993456a8e1768fcb63af3040e2ad581f1028 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: normal_distribution.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: normal_distribution.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
 
 namespace boost {
 
+/**
+ * Instantiations of class template normal_distribution model a
+ * \random_distribution. Such a distribution produces random numbers
+ * @c x distributed with probability density function
+ * \f$p(x) = \frac{1}{\sqrt{2\pi\sigma}} e^{-\frac{(x-\mu)^2}{2\sigma^2}}\f$,
+ * where mean and sigma are the parameters of the distribution.
+ */
 // deterministic Box-Muller method, uses trigonometric functions
 template<class RealType = double>
 class normal_distribution
@@ -37,6 +44,12 @@ public:
     BOOST_STATIC_ASSERT(!std::numeric_limits<RealType>::is_integer);
 #endif
 
+  /**
+   * Constructs a normal_distribution object. @c mean and @c sigma are
+   * the parameters for the distribution.
+   *
+   * Requires: sigma > 0
+   */
   explicit normal_distribution(const result_type& mean_arg = result_type(0),
                                const result_type& sigma_arg = result_type(1))
     : _mean(mean_arg), _sigma(sigma_arg), _valid(false)
@@ -52,7 +65,13 @@ public:
 
   // compiler-generated copy ctor and assignment operator are fine
 
+  /**
+   * Returns: The "mean" parameter of the distribution.
+   */
   RealType mean() const { return _mean; }
+  /**
+   * Returns: The "sigma" parameter of the distribution.
+   */
   RealType sigma() const { return _sigma; }
 
   void reset() { _valid = false; }
index 3cc2ba6cbc32892de128123931ea8a17581c12ae..9a2e4b9846bbab2c71d48ad42e8db25d7cea3233 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: poisson_distribution.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: poisson_distribution.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  */
 
 namespace boost {
 
 // Knuth
+
+/**
+ * An instantiation of the class template @c poisson_distribution is a
+ * model of \random_distribution.  The poisson distribution has
+ * \f$p(i) = \frac{e^{-\lambda}\lambda^i}{i!}\f$
+ */
 template<class IntType = int, class RealType = double>
 class poisson_distribution
 {
@@ -31,6 +37,11 @@ public:
   typedef RealType input_type;
   typedef IntType result_type;
 
+  /**
+   * Constructs a @c poisson_distribution with the parameter @c mean.
+   *
+   * Requires: mean > 0
+   */
   explicit poisson_distribution(const RealType& mean_arg = RealType(1))
     : _mean(mean_arg)
   {
@@ -46,6 +57,9 @@ public:
 
   // compiler-generated copy ctor and assignment operator are fine
 
+  /**
+   * Returns: the "mean" parameter of the distribution.
+   */
   RealType mean() const { return _mean; }
   void reset() { }
 
@@ -81,6 +95,7 @@ public:
 #endif
 
 private:
+  /// \cond hide_private_members
   void init()
   {
 #ifndef BOOST_NO_STDC_NAMESPACE
@@ -89,6 +104,7 @@ private:
 #endif
     _exp_mean = exp(-_mean);
   }
+  /// \endcond
 
   RealType _mean;
   // some precomputed data from the parameters
index 3402a4799a715dafbb87f37c7cd4198a1b205bcc..55a945b9e37efc80a5a1e9df79205b52a051343c 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: random_number_generator.hpp 26164 2004-11-09 21:22:00Z jmaurer $
+ * $Id: random_number_generator.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
 
 namespace boost {
 
-// a model for RandomNumberGenerator std:25.2.11 [lib.alg.random.shuffle]
+/**
+ * Instantiations of class template random_number_generator model a
+ * RandomNumberGenerator (std:25.2.11 [lib.alg.random.shuffle]). On
+ * each invocation, it returns a uniformly distributed integer in
+ * the range [0..n).
+ *
+ * The template parameter IntType shall denote some integer-like value type.
+ */
 template<class UniformRandomNumberGenerator, class IntType = long>
 class random_number_generator
 {
@@ -32,6 +39,11 @@ public:
   typedef UniformRandomNumberGenerator base_type;
   typedef IntType argument_type;
   typedef IntType result_type;
+  /**
+   * Constructs a random_number_generator functor with the given
+   * \uniform_random_number_generator as the underlying source of
+   * random numbers.
+   */
   random_number_generator(base_type& rng) : _rng(rng)
   { 
 #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
@@ -41,6 +53,9 @@ public:
   // compiler-generated copy ctor is fine
   // assignment is disallowed because there is a reference member
 
+  /**
+   * Returns a value in the range [0, n)
+   */
   result_type operator()(argument_type n)
   {
     typedef uniform_int<IntType> dist_type;
index 3859843c893f141075a7e83a1da2b9c72357d35b..2faa1cc2dedd7456886c66a26ce25a477ecce1c6 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: ranlux.hpp 24096 2004-07-27 03:43:34Z dgregor $
+ * $Id: ranlux.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  created
@@ -28,20 +28,51 @@ namespace random {
   typedef subtract_with_carry_01<double, 48, 10, 24> ranlux64_base_01;
 }
 
+namespace random {
+namespace detail {
+/**
+ * The ranlux family of generators are described in
+ *
+ *  @blockquote
+ *  "A portable high-quality random number generator for lattice field theory
+ *  calculations", M. Luescher, Computer Physics Communications, 79 (1994)
+ *  pp 100-110. 
+ *  @endblockquote
+ *
+ * The levels are given in
+ * 
+ *  @blockquote
+ *  "RANLUX: A Fortran implementation ofthe high-quality
+ *  pseudorandom number generator of Luescher", F. James,
+ *  Computer Physics Communications 79 (1994) 111-114
+ *  @endblockquote
+ */
+class ranlux_documentation {};
+}
+}
+
+/** @copydoc boost::random::detail::ranlux_documentation */
 typedef random::discard_block<random::ranlux_base, 223, 24> ranlux3;
+/** @copydoc boost::random::detail::ranlux_documentation */
 typedef random::discard_block<random::ranlux_base, 389, 24> ranlux4;
 
+/** @copydoc boost::random::detail::ranlux_documentation */
 typedef random::discard_block<random::ranlux_base_01, 223, 24> ranlux3_01;
+/** @copydoc boost::random::detail::ranlux_documentation */
 typedef random::discard_block<random::ranlux_base_01, 389, 24> ranlux4_01;
 
+/** @copydoc boost::random::detail::ranlux_documentation */
 typedef random::discard_block<random::ranlux64_base_01, 223, 24> ranlux64_3_01;
+/** @copydoc boost::random::detail::ranlux_documentation */
 typedef random::discard_block<random::ranlux64_base_01, 389, 24> ranlux64_4_01;
 
 #if !defined(BOOST_NO_INT64_T) && !defined(BOOST_NO_INTEGRAL_INT64_T)
 namespace random {
   typedef random::subtract_with_carry<int64_t, (int64_t(1)<<48), 10, 24, 0> ranlux64_base;
 }
+/** @copydoc boost::random::detail::ranlux_documentation */
 typedef random::discard_block<random::ranlux64_base, 223, 24> ranlux64_3;
+/** @copydoc boost::random::detail::ranlux_documentation */
 typedef random::discard_block<random::ranlux64_base, 389, 24> ranlux64_4;
 #endif /* !BOOST_NO_INT64_T && !BOOST_NO_INTEGRAL_INT64_T */
 
index cacf8c380474f6b10ebea294a146181e93a6d8bb..f06f462104012a00f6a6dbac5e5441c48bfb65f7 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: shuffle_output.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: shuffle_output.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
 namespace boost {
 namespace random {
 
-// Carter Bays and S.D. Durham 1979
+/**
+ * Instatiations of class template shuffle_output model a
+ * \pseudo_random_number_generator. It mixes the output
+ * of some (usually \linear_congruential) \uniform_random_number_generator
+ * to get better statistical properties.
+ * The algorithm is described in
+ *
+ *  @blockquote
+ *  "Improving a poor random number generator", Carter Bays
+ *  and S.D. Durham, ACM Transactions on Mathematical Software,
+ *  Vol 2, No. 1, March 1976, pp. 59-64.
+ *  http://doi.acm.org/10.1145/355666.355670
+ *  @endblockquote
+ *
+ * The output of the base generator is buffered in an array of
+ * length k. Every output X(n) has a second role: It gives an
+ * index into the array where X(n+1) will be retrieved. Used
+ * array elements are replaced with fresh output from the base
+ * generator.
+ *
+ * Template parameters are the base generator and the array
+ * length k, which should be around 100. The template parameter
+ * val is the validation value checked by validation.
+ */
 template<class UniformRandomNumberGenerator, int k,
 #ifndef BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
   typename UniformRandomNumberGenerator::result_type 
@@ -45,18 +68,45 @@ public:
   BOOST_STATIC_CONSTANT(bool, has_fixed_range = false);
   BOOST_STATIC_CONSTANT(int, buffer_size = k);
 
+  /**
+   * Constructs a @c shuffle_output generator by invoking the
+   * default constructor of the base generator.
+   *
+   * Complexity: Exactly k+1 invocations of the base generator.
+   */
   shuffle_output() : _rng() { init(); }
 #if defined(BOOST_MSVC) && _MSC_VER < 1300
   // MSVC does not implicitly generate the copy constructor here
   shuffle_output(const shuffle_output & x)
     : _rng(x._rng), y(x.y) { std::copy(x.v, x.v+k, v); }
 #endif
+  /**
+   * Constructs a shuffle_output generator by invoking the one-argument
+   * constructor of the base generator with the parameter seed.
+   *
+   * Complexity: Exactly k+1 invocations of the base generator.
+   */
   template<class T>
   explicit shuffle_output(T s) : _rng(s) { init(); }
+  /**
+   * Constructs a shuffle_output generator by using a copy
+   * of the provided generator.
+   *
+   * Precondition: The template argument UniformRandomNumberGenerator
+   * shall denote a CopyConstructible type.
+   *
+   * Complexity: Exactly k+1 invocations of the base generator.
+   */
   explicit shuffle_output(const base_type & rng) : _rng(rng) { init(); }
   template<class It> shuffle_output(It& first, It last)
     : _rng(first, last) { init(); }
   void seed() { _rng.seed(); init(); }
+  /**
+   * Invokes the one-argument seed method of the base generator
+   * with the parameter seed and re-initializes the internal buffer array.
+   *
+   * Complexity: Exactly k+1 invocations of the base generator.
+   */
   template<class T>
   void seed(T s) { _rng.seed(s); init(); }
   template<class It> void seed(It& first, It last)
@@ -165,6 +215,15 @@ const int shuffle_output<UniformRandomNumberGenerator, k, val>::buffer_size;
 } // namespace random
 
 // validation by experiment from Harry Erwin's generator.h (private e-mail)
+/**
+ * According to Harry Erwin (private e-mail), the specialization
+ * @c kreutzer1986 was suggested in:
+ *
+ * @blockquote
+ * "System Simulation: Programming Styles and Languages (International
+ * Computer Science Series)", Wolfgang Kreutzer, Addison-Wesley, December 1986.
+ * @endblockquote
+ */
 typedef random::shuffle_output<
     random::linear_congruential<uint32_t, 1366, 150889, 714025, 0>,
   97, 139726> kreutzer1986;
index 2c851ff738270fbe42c84a3fce7e7b19fbd3ac89..ca5c78ba6d07f5989bbe960952cd47d79b7467ac 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: subtract_with_carry.hpp 53871 2009-06-13 17:54:06Z steven_watanabe $
+ * $Id: subtract_with_carry.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2002-03-02  created
@@ -62,10 +62,19 @@ namespace detail
     carry = value / modulus;
   }
 }
-# endif 
-// subtract-with-carry generator
-// Marsaglia and Zaman
+# endif
 
+/**
+ * Instantiations of @c subtract_with_carry model a
+ * \pseudo_random_number_generator.  The algorithm is
+ * described in
+ *
+ *  @blockquote
+ *  "A New Class of Random Number Generators", George
+ *  Marsaglia and Arif Zaman, Annals of Applied Probability,
+ *  Volume 1, Number 3 (1991), 462-480.
+ *  @endblockquote
+ */
 template<class IntType, IntType m, unsigned int s, unsigned int r,
   IntType val>
 class subtract_with_carry
@@ -205,11 +214,13 @@ public:
 #endif
 
 private:
+  /// \cond hide_private_members
   // returns x(i-r+index), where index is in 0..r-1
   IntType compute(unsigned int index) const
   {
     return x[(k+index) % long_lag];
   }
+  /// \endcond
 
   // state representation; next output (state) is x(i)
   //   x[0]  ... x[k] x[k+1] ... x[long_lag-1]     represents
@@ -248,6 +259,7 @@ const unsigned int subtract_with_carry<IntType, m, s, r, val>::short_lag;
 
 
 // use a floating-point representation to produce values in [0..1)
+/** @copydoc boost::random::subtract_with_carry */
 template<class RealType, int w, unsigned int s, unsigned int r, int val=0>
 class subtract_with_carry_01
 {
@@ -269,6 +281,7 @@ public:
   { init_modulus(); seed(first,last); }
 
 private:
+  /// \cond hide_private_members
   void init_modulus()
   {
 #ifndef BOOST_NO_STDC_NAMESPACE
@@ -277,6 +290,7 @@ private:
 #endif
     _modulus = pow(RealType(2), word_size);
   }
+  /// \endcond hide_private_members
 
 public:
   // compiler-generated copy ctor and assignment operator are fine
@@ -416,7 +430,9 @@ public:
 #endif
 
 private:
+  /// \cond hide_private_members
   RealType compute(unsigned int index) const;
+  /// \endcond
   unsigned int k;
   RealType carry;
   RealType x[long_lag];
@@ -435,12 +451,13 @@ template<class RealType, int w, unsigned int s, unsigned int r, int val>
 const unsigned int subtract_with_carry_01<RealType, w, s, r, val>::short_lag;
 #endif
 
+/// \cond hide_private_members
 template<class RealType, int w, unsigned int s, unsigned int r, int val>
 RealType subtract_with_carry_01<RealType, w, s, r, val>::compute(unsigned int index) const
 {
   return x[(k+index) % long_lag];
 }
-
+/// \endcond
 
 } // namespace random
 } // namespace boost
index 1659b933460b5fa2b4f6266f6abc33337b21ad5b..7112eb9041cdbb89d95413565b19075c1cccb291 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: triangle_distribution.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: triangle_distribution.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
 
 namespace boost {
 
-// triangle distribution, with a smallest, b most probable, and c largest
-// value.
+/**
+ * Instantiations of @c triangle_distribution model a \random_distribution.
+ * A @c triangle_distribution has three parameters, @c a, @c b, and @c c,
+ * which are the smallest, the most probable and the largest values of
+ * the distribution respectively.
+ */
 template<class RealType = double>
 class triangle_distribution
 {
@@ -32,6 +36,12 @@ public:
   typedef RealType input_type;
   typedef RealType result_type;
 
+  /**
+   * Constructs a @c triangle_distribution with the parameters
+   * @c a, @c b, and @c c.
+   *
+   * Preconditions: a <= b <= c.
+   */
   explicit triangle_distribution(result_type a_arg = result_type(0),
                                  result_type b_arg = result_type(0.5),
                                  result_type c_arg = result_type(1))
@@ -42,8 +52,12 @@ public:
   }
 
   // compiler-generated copy ctor and assignment operator are fine
+
+  /** Returns the @c a parameter of the distribution */
   result_type a() const { return _a; }
+  /** Returns the @c b parameter of the distribution */
   result_type b() const { return _b; }
+  /** Returns the @c c parameter of the distribution */
   result_type c() const { return _c; }
 
   void reset() { }
@@ -81,6 +95,7 @@ public:
 #endif
 
 private:
+  /// \cond hide_private_members
   void init()
   {
 #ifndef BOOST_NO_STDC_NAMESPACE
@@ -92,6 +107,7 @@ private:
     q1 = d1 / d2;
     p1 = sqrt(d1 * d2);
   }
+  /// \endcond
 
   result_type _a, _b, _c;
   result_type d1, d2, d3, q1, p1;
index 459735c4f1bac10d86f86e11751cda9b7a5b3d43..2cdd05f6519327a7d146b92a5f6a131a0fc1fb4b 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: uniform_01.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: uniform_01.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
 #include <boost/random/detail/config.hpp>
 #include <boost/random/detail/pass_through_engine.hpp>
 
+#include <boost/random/detail/disable_warnings.hpp>
+
 namespace boost {
 
+#ifdef BOOST_RANDOM_DOXYGEN
+
+/**
+ * The distribution function uniform_01 models a \random_distribution.
+ * On each invocation, it returns a random floating-point value
+ * uniformly distributed in the range [0..1).
+ *
+ * The template parameter RealType shall denote a float-like value type
+ * with support for binary operators +, -, and /.
+ *
+ * Note: The current implementation is buggy, because it may not fill
+ * all of the mantissa with random bits. I'm unsure how to fill a
+ * (to-be-invented) @c boost::bigfloat class with random bits efficiently.
+ * It's probably time for a traits class.
+ */
+template<class RealType = double>
+class uniform_01
+{
+public:
+  typedef RealType input_type;
+  typedef RealType result_type;
+  result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const;
+  result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
+  void reset();
+
+  template<class Engine>
+  result_type operator()(Engine& eng);
+
+#ifndef BOOST_RANDOM_NO_STREAM_OPERATORS
+  template<class CharT, class Traits>
+  friend std::basic_ostream<CharT,Traits>&
+  operator<<(std::basic_ostream<CharT,Traits>& os, const new_uniform_01&)
+  {
+    return os;
+  }
+
+  template<class CharT, class Traits>
+  friend std::basic_istream<CharT,Traits>&
+  operator>>(std::basic_istream<CharT,Traits>& is, new_uniform_01&)
+  {
+    return is;
+  }
+#endif
+};
+
+#else
+
 namespace detail {
 
 template<class RealType>
@@ -215,6 +264,10 @@ public:
 #endif
 };
 
+#endif
+
 } // namespace boost
 
+#include <boost/random/detail/enable_warnings.hpp>
+
 #endif // BOOST_RANDOM_UNIFORM_01_HPP
index 372a6c7a5c8a8dd1103fa0146559f7b28c6cdd78..426a9e1510581533437a2c794556833f112301c7 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: uniform_int.hpp 56814 2009-10-14 04:54:01Z steven_watanabe $
+ * $Id: uniform_int.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-04-08  added min<max assertion (N. Becker)
 
 namespace boost {
 
-// uniform integer distribution on [min, max]
+/**
+ * The distribution function uniform_int models a \random_distribution.
+ * On each invocation, it returns a random integer value uniformly
+ * distributed in the set of integer numbers {min, min+1, min+2, ..., max}.
+ *
+ * The template parameter IntType shall denote an integer-like value type.
+ */
 template<class IntType = int>
 class uniform_int
 {
 public:
   typedef IntType input_type;
   typedef IntType result_type;
+
+  /// \cond hide_private_members
   typedef typename make_unsigned<result_type>::type range_type;
+  /// \endcond
 
+  /**
+   * Constructs a uniform_int object. @c min and @c max are
+   * the parameters of the distribution.
+   *
+   * Requires: min <= max
+   */
   explicit uniform_int(IntType min_arg = 0, IntType max_arg = 9)
     : _min(min_arg), _max(max_arg)
   {
@@ -49,7 +64,13 @@ public:
     init();
   }
 
+  /**
+   * Returns: The "min" parameter of the distribution
+   */
   result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return _min; }
+  /**
+   * Returns: The "max" parameter of the distribution
+   */
   result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return _max; }
   void reset() { }
   
@@ -93,8 +114,17 @@ public:
 #endif
 
 private:
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+// disable division by zero warning, since we can't
+// actually divide by zero.
+#pragma warning(disable:4723)
+#endif
+
+  /// \cond hide_private_members
   template<class Engine>
-  static result_type generate(Engine& eng, result_type min_value, result_type max_value, range_type range)
+  static result_type generate(Engine& eng, result_type min_value, result_type /*max_value*/, range_type range)
   {
     typedef typename Engine::result_type base_result;
     // ranges are always unsigned
@@ -248,11 +278,17 @@ private:
     }
   }
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
   void init()
   {
     _range = random::detail::subtract<result_type>()(_max, _min);
   }
 
+  /// \endcond
+
   // The result_type may be signed or unsigned, but the _range is always
   // unsigned.
   result_type _min, _max;
index 650030ee83a7d57ef0e8f5f1d65280c13f9a9162..c5c7280696fb7c319e032a670b6100f906b74eff 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: uniform_on_sphere.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: uniform_on_sphere.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-02-18  moved to individual header files
 
 namespace boost {
 
+/**
+ * Instantiations of class template uniform_on_sphere model a
+ * \random_distribution. Such a distribution produces random
+ * numbers uniformly distributed on the unit sphere of arbitrary
+ * dimension @c dim. The @c Cont template parameter must be a STL-like
+ * container type with begin and end operations returning non-const
+ * ForwardIterators of type @c Cont::iterator. Each invocation of the
+ * @c UniformRandomNumberGenerator shall result in a floating-point
+ * value in the range [0,1). 
+ */
 template<class RealType = double, class Cont = std::vector<RealType> >
 class uniform_on_sphere
 {
@@ -31,6 +41,10 @@ public:
   typedef RealType input_type;
   typedef Cont result_type;
 
+  /**
+   * Constructs a @c uniform_on_sphere distribution.
+   * @c dim is the dimension of the sphere.
+   */
   explicit uniform_on_sphere(int dim = 2) : _container(dim), _dim(dim) { }
 
   // compiler-generated copy ctor and assignment operator are fine
index 6a6e90065b5aa63e976bed0e8a3e3bdd81961eab..06bfbc39ab16fc1daac9fb4497fa2cf35d99d07a 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: uniform_real.hpp 56814 2009-10-14 04:54:01Z steven_watanabe $
+ * $Id: uniform_real.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-04-08  added min<max assertion (N. Becker)
 
 namespace boost {
 
-// uniform distribution on a real range
+/**
+ * The distribution function uniform_real models a random distribution.
+ * On each invocation, it returns a random floating-point value uniformly
+ * distributed in the range [min..max). The value is computed using
+ * std::numeric_limits<RealType>::digits random binary digits, i.e.
+ * the mantissa of the floating-point value is completely filled with
+ * random bits.
+ *
+ * Note: The current implementation is buggy, because it may not fill
+ * all of the mantissa with random bits.
+ */
 template<class RealType = double>
 class uniform_real
 {
@@ -34,6 +44,12 @@ public:
   typedef RealType input_type;
   typedef RealType result_type;
 
+  /**
+   * Constructs a uniform_real object. @c min and @c max are the
+   * parameters of the distribution.
+   *
+   * Requires: min <= max
+   */
   explicit uniform_real(RealType min_arg = RealType(0),
                         RealType max_arg = RealType(1))
     : _min(min_arg), _max(max_arg)
@@ -46,7 +62,13 @@ public:
 
   // compiler-generated copy ctor and assignment operator are fine
 
+  /**
+   * Returns: The "min" parameter of the distribution
+   */
   result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return _min; }
+  /**
+   * Returns: The "max" parameter of the distribution
+   */
   result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return _max; }
   void reset() { }
 
index 60ea38480cc066ee1fe5f0636822155029256e33..af03b83e0eb87a98e30e6d62d5d39f786a3d2ea5 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: uniform_smallint.hpp 52492 2009-04-19 14:55:57Z steven_watanabe $
+ * $Id: uniform_smallint.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  * Revision history
  *  2001-04-08  added min<max assertion (N. Becker)
@@ -30,6 +30,52 @@ namespace boost {
 
 // uniform integer distribution on a small range [min, max]
 
+/**
+ * The distribution function uniform_smallint models a \random_distribution.
+ * On each invocation, it returns a random integer value uniformly distributed
+ * in the set of integer numbers {min, min+1, min+2, ..., max}. It assumes
+ * that the desired range (max-min+1) is small compared to the range of the
+ * underlying source of random numbers and thus makes no attempt to limit
+ * quantization errors.
+ *
+ * Let r<sub>out</sub>=(max-min+1) the desired range of integer numbers, and
+ * let r<sub>base</sub> be the range of the underlying source of random
+ * numbers. Then, for the uniform distribution, the theoretical probability
+ * for any number i in the range r<sub>out</sub> will be p<sub>out</sub>(i) =
+ * 1/r<sub>out</sub>. Likewise, assume a uniform distribution on r<sub>base</sub> for
+ * the underlying source of random numbers, i.e. p<sub>base</sub>(i) =
+ * 1/r<sub>base</sub>. Let p<sub>out_s</sub>(i) denote the random
+ * distribution generated by @c uniform_smallint. Then the sum over all
+ * i in r<sub>out</sub> of (p<sub>out_s</sub>(i)/p<sub>out</sub>(i) - 1)<sup>2</sup>
+ * shall not exceed r<sub>out</sub>/r<sub>base</sub><sup>2</sup>
+ * (r<sub>base</sub> mod r<sub>out</sub>)(r<sub>out</sub> -
+ * r<sub>base</sub> mod r<sub>out</sub>).
+ *
+ * The template parameter IntType shall denote an integer-like value type.
+ *
+ * Note: The property above is the square sum of the relative differences
+ * in probabilities between the desired uniform distribution
+ * p<sub>out</sub>(i) and the generated distribution p<sub>out_s</sub>(i).
+ * The property can be fulfilled with the calculation
+ * (base_rng mod r<sub>out</sub>), as follows: Let r = r<sub>base</sub> mod
+ * r<sub>out</sub>. The base distribution on r<sub>base</sub> is folded onto the
+ * range r<sub>out</sub>. The numbers i < r have assigned (r<sub>base</sub>
+ * div r<sub>out</sub>)+1 numbers of the base distribution, the rest has
+ * only (r<sub>base</sub> div r<sub>out</sub>). Therefore,
+ * p<sub>out_s</sub>(i) = ((r<sub>base</sub> div r<sub>out</sub>)+1) /
+ * r<sub>base</sub> for i < r and p<sub>out_s</sub>(i) = (r<sub>base</sub>
+ * div r<sub>out</sub>)/r<sub>base</sub> otherwise. Substituting this in the
+ * above sum formula leads to the desired result.
+ *
+ * Note: The upper bound for (r<sub>base</sub> mod r<sub>out</sub>)
+ * (r<sub>out</sub> - r<sub>base</sub> mod r<sub>out</sub>) is
+ * r<sub>out</sub><sup>2</sup>/4.  Regarding the upper bound for the
+ * square sum of the relative quantization error of
+ * r<sub>out</sub><sup>3</sup>/(4*r<sub>base</sub><sup>2</sup>), it
+ * seems wise to either choose r<sub>base</sub> so that r<sub>base</sub> >
+ * 10*r<sub>out</sub><sup>2</sup> or ensure that r<sub>base</sub> is
+ * divisible by r<sub>out</sub>.
+ */
 template<class IntType = int>
 class uniform_smallint
 {
@@ -37,6 +83,10 @@ public:
   typedef IntType input_type;
   typedef IntType result_type;
 
+  /**
+   * Constructs a @c uniform_smallint. @c min and @c max are the
+   * lower and upper bounds of the output range, respectively.
+   */
   explicit uniform_smallint(IntType min_arg = 0, IntType max_arg = 9)
     : _min(min_arg), _max(max_arg)
   {
@@ -76,7 +126,7 @@ public:
         r_base /= 2;
     }
 
-    return ((eng() - (eng.min)()) / _factor) % _range + _min;
+    return static_cast<result_type>(((eng() - (eng.min)()) / _factor) % _range + _min);
   }
 
 #ifndef BOOST_RANDOM_NO_STREAM_OPERATORS
index 0c6cc2032da39999f79a69ec22ebd22acb34e403..930d96187f987fb883e1e252f4fefc4f8b577213 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: variate_generator.hpp 27375 2005-02-14 11:53:50Z johnmaddock $
+ * $Id: variate_generator.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  */
 
 #include <boost/type_traits/is_integral.hpp>
 #endif
 
+#include <boost/random/detail/disable_warnings.hpp>
+
 namespace boost {
 
+/// \cond hide_private_members
+
 namespace random {
 namespace detail {
 
@@ -81,7 +85,31 @@ struct engine_helper<false, true>
 } // namespace detail
 } // namespace random
 
+///\endcond
 
+/**
+ * A random variate generator is used to join a random number
+ * generator together with a random number distribution.
+ * Boost.Random provides a vast choice of \generators as well
+ * as \distributions.
+ *
+ * Instantations of class template @c variate_generator model
+ * a \number_generator.
+ *
+ * The argument for the template parameter Engine shall be of
+ * the form U, U&, or U*, where U models a
+ * \uniform_random_number_generator.  Then, the member
+ * engine_value_type names U (not the pointer or reference to U).
+ *
+ * Specializations of @c variate_generator satisfy the
+ * requirements of CopyConstructible. They also satisfy the
+ * requirements of Assignable unless the template parameter
+ * Engine is of the form U&.
+ *
+ * The complexity of all functions specified in this section
+ * is constant. No function described in this section except
+ * the constructor throws an exception.
+ */
 template<class Engine, class Distribution>
 class variate_generator
 {
@@ -94,27 +122,84 @@ public:
   typedef Distribution distribution_type;
   typedef typename Distribution::result_type result_type;
 
+  /**
+   * Constructs a @c variate_generator object with the associated
+   * \uniform_random_number_generator eng and the associated
+   * \random_distribution d.
+   *
+   * Throws: If and what the copy constructor of Engine or
+   * Distribution throws.
+   */
   variate_generator(Engine e, Distribution d)
     : _eng(decorated_engine(e)), _dist(d) { }
 
+  /**
+   * Returns: distribution()(e)
+   *
+   * Notes: The sequence of numbers produced by the
+   * \uniform_random_number_generator e, s<sub>e</sub>, is
+   * obtained from the sequence of numbers produced by the
+   * associated \uniform_random_number_generator eng, s<sub>eng</sub>,
+   * as follows: Consider the values of @c numeric_limits<T>::is_integer
+   * for @c T both @c Distribution::input_type and
+   * @c engine_value_type::result_type. If the values for both types are
+   * true, then se is identical to s<sub>eng</sub>. Otherwise, if the
+   * values for both types are false, then the numbers in s<sub>eng</sub>
+   * are divided by engine().max()-engine().min() to obtain the numbers
+   * in s<sub>e</sub>. Otherwise, if the value for
+   * @c engine_value_type::result_type is true and the value for
+   * @c Distribution::input_type is false, then the numbers in s<sub>eng</sub>
+   * are divided by engine().max()-engine().min()+1 to obtain the numbers in
+   * s<sub>e</sub>. Otherwise, the mapping from s<sub>eng</sub> to
+   * s<sub>e</sub> is implementation-defined. In all cases, an
+   * implicit conversion from @c engine_value_type::result_type to
+   * @c Distribution::input_type is performed. If such a conversion does
+   * not exist, the program is ill-formed.
+   */
   result_type operator()() { return _dist(_eng); }
+  /**
+   * Returns: distribution()(e, value).
+   * For the semantics of e, see the description of operator()().
+   */
   template<class T>
   result_type operator()(T value) { return _dist(_eng, value); }
 
+  /**
+   * Returns: A reference to the associated uniform random number generator.
+   */
   engine_value_type& engine() { return _eng.base().base(); }
+  /**
+   * Returns: A reference to the associated uniform random number generator.
+   */
   const engine_value_type& engine() const { return _eng.base().base(); }
 
+  /**
+   * Returns: A reference to the associated random distribution.
+   */
   distribution_type& distribution() { return _dist; }
+  /**
+   * Returns: A reference to the associated random distribution.
+   */
   const distribution_type& distribution() const { return _dist; }
 
+  /**
+   * Precondition: distribution().min() is well-formed
+   *
+   * Returns: distribution().min()
+   */
   result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return (distribution().min)(); }
+  /**
+   * Precondition: distribution().max() is well-formed
+   *
+   * Returns: distribution().max()
+   */
   result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return (distribution().max)(); }
 
 private:
 #if BOOST_WORKAROUND(__BORLANDC__, <= 0x564)
   typedef typename random::detail::engine_helper<
-    boost::is_integral<typename decorated_engine::result_type>::value,
-    boost::is_integral<typename Distribution::input_type>::value
+    ::boost::is_integral<typename decorated_engine::result_type>::value,
+    ::boost::is_integral<typename Distribution::input_type>::value
     >::BOOST_NESTED_TEMPLATE impl<decorated_engine, typename Distribution::input_type>::type internal_engine_type;
 #else
   enum {
@@ -130,4 +215,6 @@ private:
 
 } // namespace boost
 
+#include <boost/random/detail/disable_warnings.hpp>
+
 #endif // BOOST_RANDOM_RANDOM_GENERATOR_HPP
index 02fbfa677099d9653a903f4b3e1d734eef385329..fb39490fba1e720912e00f351dc70fb838c54923 100644 (file)
@@ -7,7 +7,7 @@
  *
  * See http://www.boost.org for most recent version including documentation.
  *
- * $Id: xor_combine.hpp 53871 2009-06-13 17:54:06Z steven_watanabe $
+ * $Id: xor_combine.hpp 60755 2010-03-22 00:45:06Z steven_watanabe $
  *
  */
 
 namespace boost {
 namespace random {
 
+/// \cond hide_private_members
 #ifndef BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
   #define BOOST_RANDOM_VAL_TYPE typename URNG1::result_type 
 #else
   #define BOOST_RANDOM_VAL_TYPE uint32_t
 #endif
+/// \endcond
 
-template<class URNG1, int s1, class URNG2, int s2, BOOST_RANDOM_VAL_TYPE val = 0>
+/**
+ * Instantiations of @c xor_combine model a \pseudo_random_number_generator.
+ * To produce its output it invokes each of the base generators, shifts
+ * their results and xors them together.
+ */
+template<class URNG1, int s1, class URNG2, int s2
+#ifndef BOOST_RANDOM_DOXYGEN
+, BOOST_RANDOM_VAL_TYPE val = 0
+#endif
+>
 class xor_combine
 {
 public:
@@ -45,25 +56,58 @@ public:
   BOOST_STATIC_CONSTANT(int, shift1 = s1);
   BOOST_STATIC_CONSTANT(int, shift2 = s2);
 
+  /**
+   * Constructors a @c xor_combine by default constructing
+   * both base generators.
+   */
   xor_combine() : _rng1(), _rng2()
   { }
+  /**
+   * Constructs a @c xor_combine by copying two base generators.
+   */
   xor_combine(const base1_type & rng1, const base2_type & rng2)
     : _rng1(rng1), _rng2(rng2) { }
+  /**
+   * Constructs a @c xor_combine, seeding both base generators
+   * with @c v.
+   */
   xor_combine(const result_type & v)
     : _rng1(v), _rng2(v) { }
+  /**
+   * Constructs a @c xor_combine, seeding both base generators
+   * with values from the iterator range [first, last) and changes
+   * first to point to the element after the last one used.  If there
+   * are not enough elements in the range to seed both generators,
+   * throws @c std::invalid_argument.
+   */
   template<class It> xor_combine(It& first, It last)
     : _rng1(first, last), _rng2( /* advanced by other call */ first, last) { }
+  /**
+   * Calls @c seed() for both base generators.
+   */
   void seed() { _rng1.seed(); _rng2.seed(); }
+  /**
+   * @c seeds both base generators with @c v.
+   */
   void seed(const result_type & v) { _rng1.seed(v); _rng2.seed(v); }
+  /**
+   * seeds both base generators with values from the iterator
+   * range [first, last) and changes first to point to the element
+   * after the last one used.  If there are not enough elements in
+   * the range to seed both generators, throws @c std::invalid_argument.
+   */
   template<class It> void seed(It& first, It last)
   {
     _rng1.seed(first, last);
     _rng2.seed(first, last);
   }
 
+  /** Returns the first base generator. */
   const base1_type& base1() { return _rng1; }
+  /** Returns the second base generator. */
   const base2_type& base2() { return _rng2; }
 
+  /** Returns the next value of the generator. */
   result_type operator()()
   {
     // MSVC fails BOOST_STATIC_ASSERT with std::numeric_limits at class scope
@@ -75,7 +119,13 @@ public:
     return (_rng1() << s1) ^ (_rng2() << s2);
   }
 
+  /**
+   * Returns the smallest value that the generator can produce.
+   */
   result_type min BOOST_PREVENT_MACRO_SUBSTITUTION () const { return std::min BOOST_PREVENT_MACRO_SUBSTITUTION((_rng1.min)(), (_rng2.min)()); }
+  /**
+   * Returns the largest value that the generator can produce.
+   */
   result_type max BOOST_PREVENT_MACRO_SUBSTITUTION () const { return std::max BOOST_PREVENT_MACRO_SUBSTITUTION((_rng1.min)(), (_rng2.max)()); }
   static bool validation(result_type x) { return val == x; }
 
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/adjacent_filtered.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/adjacent_filtered.hpp
new file mode 100644 (file)
index 0000000..c01f1c1
--- /dev/null
@@ -0,0 +1,239 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_ADJACENT_FILTER_IMPL_HPP
+#define BOOST_RANGE_ADAPTOR_ADJACENT_FILTER_IMPL_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+#pragma warning( push )
+#pragma warning( disable : 4355 )
+#endif
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/next_prior.hpp>
+
+
+namespace boost
+{
+
+    namespace range_detail
+    {
+        template< class Iter, class Pred, bool default_pass >
+        class skip_iterator
+          : public boost::iterator_adaptor<
+                    skip_iterator<Iter,Pred,default_pass>,
+                    Iter,
+                    BOOST_DEDUCED_TYPENAME std::iterator_traits<Iter>::value_type,
+                    boost::forward_traversal_tag,
+                    BOOST_DEDUCED_TYPENAME std::iterator_traits<Iter>::reference,
+                    BOOST_DEDUCED_TYPENAME std::iterator_traits<Iter>::difference_type
+                >
+          , private Pred
+        {
+        private:
+            typedef boost::iterator_adaptor<
+                        skip_iterator<Iter,Pred,default_pass>,
+                        Iter,
+                        BOOST_DEDUCED_TYPENAME std::iterator_traits<Iter>::value_type,
+                        boost::forward_traversal_tag,
+                        BOOST_DEDUCED_TYPENAME std::iterator_traits<Iter>::reference,
+                        BOOST_DEDUCED_TYPENAME std::iterator_traits<Iter>::difference_type
+                    > base_t;
+
+        public:
+            typedef Pred pred_t;
+            typedef Iter iter_t;
+
+            skip_iterator() : m_last() {}
+
+            skip_iterator(iter_t it, iter_t last, const Pred& pred)
+                : base_t(it)
+                , pred_t(pred)
+                , m_last(last)
+            {
+                move_to_next_valid();
+            }
+
+            template<class OtherIter>
+            skip_iterator( const skip_iterator<OtherIter, pred_t, default_pass>& other )
+            : base_t(other.base())
+            , pred_t(other)
+            , m_last(other.m_last) {}
+
+            void move_to_next_valid()
+            {
+                iter_t& it = this->base_reference();
+                pred_t& bi_pred = *this;
+                if (it != m_last)
+                {
+                    if (default_pass)
+                    {
+                        iter_t nxt = ::boost::next(it);
+                        while (nxt != m_last && !bi_pred(*it, *nxt))
+                        {
+                            ++it;
+                            ++nxt;
+                        }
+                    }
+                    else
+                    {
+                        iter_t nxt = ::boost::next(it);
+                        for(; nxt != m_last; ++it, ++nxt)
+                        {
+                            if (bi_pred(*it, *nxt))
+                            {
+                                break;
+                            }
+                        }
+                        if (nxt == m_last)
+                        {
+                            it = m_last;
+                        }
+                    }
+                }
+            }
+
+            void increment()
+            {
+                iter_t& it = this->base_reference();
+                BOOST_ASSERT( it != m_last );
+                ++it;
+                move_to_next_valid();
+            }
+
+            iter_t m_last;
+        };
+
+        template< class P, class R, bool default_pass >
+        struct adjacent_filter_range
+            : iterator_range< skip_iterator<
+                                BOOST_DEDUCED_TYPENAME range_iterator<R>::type,
+                                P,
+                                default_pass
+                            >
+                        >
+        {
+        private:
+            typedef skip_iterator<
+                        BOOST_DEDUCED_TYPENAME range_iterator<R>::type,
+                        P,
+                        default_pass
+                     >
+                skip_iter;
+
+            typedef iterator_range<skip_iter>
+                base_range;
+
+            typedef BOOST_DEDUCED_TYPENAME range_iterator<R>::type raw_iterator;
+
+        public:
+            adjacent_filter_range( const P& p, R& r )
+            : base_range( skip_iter( boost::begin(r), boost::end(r), p),
+                          skip_iter( boost::end(r), boost::end(r), p) )
+            {
+            }
+        };
+
+        template< class T >
+        struct adjacent_holder : holder<T>
+        {
+            adjacent_holder( T r ) : holder<T>(r)
+            { }
+        };
+
+        template< class T >
+        struct adjacent_excl_holder : holder<T>
+        {
+            adjacent_excl_holder( T r ) : holder<T>(r)
+            { }
+        };
+
+        template< class ForwardRng, class BinPredicate >
+        inline adjacent_filter_range<BinPredicate, ForwardRng, true>
+        operator|( ForwardRng& r,
+                   const adjacent_holder<BinPredicate>& f )
+        {
+            return adjacent_filter_range<BinPredicate, ForwardRng, true>( f.val, r );
+        }
+
+        template< class ForwardRng, class BinPredicate >
+        inline adjacent_filter_range<BinPredicate, const ForwardRng, true>
+        operator|( const ForwardRng& r,
+                   const adjacent_holder<BinPredicate>& f )
+        {
+            return adjacent_filter_range<BinPredicate,
+                                         const ForwardRng, true>( f.val, r );
+        }
+
+        template< class ForwardRng, class BinPredicate >
+        inline adjacent_filter_range<BinPredicate, ForwardRng, false>
+        operator|( ForwardRng& r,
+                   const adjacent_excl_holder<BinPredicate>& f )
+        {
+            return adjacent_filter_range<BinPredicate, ForwardRng, false>( f.val, r );
+        }
+
+        template< class ForwardRng, class BinPredicate >
+        inline adjacent_filter_range<BinPredicate, ForwardRng, false>
+        operator|( const ForwardRng& r,
+                   const adjacent_excl_holder<BinPredicate>& f )
+        {
+            return adjacent_filter_range<BinPredicate,
+                                         const ForwardRng, false>( f.val, r );
+        }
+
+    } // 'range_detail'
+
+    // Bring adjacent_filter_range into the boost namespace so that users of
+    // this library may specify the return type of the '|' operator and
+    // adjacent_filter()
+    using range_detail::adjacent_filter_range;
+
+    namespace adaptors
+    {
+        namespace
+        {
+            const range_detail::forwarder<range_detail::adjacent_holder>
+                adjacent_filtered =
+                   range_detail::forwarder<range_detail::adjacent_holder>();
+
+            const range_detail::forwarder<range_detail::adjacent_excl_holder>
+                adjacent_filtered_excl =
+                    range_detail::forwarder<range_detail::adjacent_excl_holder>();
+        }
+
+        template<class ForwardRng, class BinPredicate>
+        inline adjacent_filter_range<BinPredicate, ForwardRng, true>
+        adjacent_filter(ForwardRng& rng, BinPredicate filter_pred)
+        {
+            return adjacent_filter_range<BinPredicate, ForwardRng, true>(filter_pred, rng);
+        }
+
+        template<class ForwardRng, class BinPredicate>
+        inline adjacent_filter_range<BinPredicate, const ForwardRng, true>
+        adjacent_filter(const ForwardRng& rng, BinPredicate filter_pred)
+        {
+            return adjacent_filter_range<BinPredicate, const ForwardRng, true>(filter_pred, rng);
+        }
+
+    } // 'adaptors'
+
+}
+
+#ifdef BOOST_MSVC
+#pragma warning( pop )
+#endif
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/argument_fwd.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/argument_fwd.hpp
new file mode 100755 (executable)
index 0000000..fbfd40c
--- /dev/null
@@ -0,0 +1,80 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_ARGUMENT_FWD_HPP
+#define BOOST_RANGE_ADAPTOR_ARGUMENT_FWD_HPP
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable : 4512) // assignment operator could not be generated
+#endif
+
+namespace boost
+{
+    namespace range_detail
+    {  
+        template< class T >
+        struct holder
+        {
+            T val;
+            holder( T t ) : val(t)
+            { }
+        };
+
+        template< class T >
+        struct holder2
+        {
+            T val1, val2;
+            holder2( T t, T u ) : val1(t), val2(u)
+            { }
+        };
+        
+        template< template<class> class Holder >
+        struct forwarder
+        {
+            template< class T >
+            Holder<T> operator()( T t ) const
+            {
+                return Holder<T>(t);
+            }
+        };
+
+        template< template<class> class Holder >
+        struct forwarder2
+        {
+            template< class T >
+            Holder<T> operator()( T t, T u ) const
+            {
+                return Holder<T>(t,u);
+            }
+        };
+
+        template< template<class,class> class Holder >
+        struct forwarder2TU
+        {
+            template< class T, class U >
+            Holder<T, U> operator()( T t, U u ) const
+            {
+                return Holder<T, U>(t, u);
+            }
+        };
+
+
+    } 
+        
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/copied.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/copied.hpp
new file mode 100755 (executable)
index 0000000..f4cf2d1
--- /dev/null
@@ -0,0 +1,58 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_COPIED_HPP
+#define BOOST_RANGE_ADAPTOR_COPIED_HPP
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/adaptor/sliced.hpp>
+#include <boost/range/size_type.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+    namespace adaptors
+    {
+        struct copied
+        {
+            copied(std::size_t t_, std::size_t u_)
+                : t(t_), u(u_) {}
+
+            std::size_t t;
+            std::size_t u;
+        };
+
+        template< class CopyableRandomAccessRng >
+        inline CopyableRandomAccessRng
+        operator|( const CopyableRandomAccessRng& r, const copied& f )
+        {
+            iterator_range<
+                BOOST_DEDUCED_TYPENAME range_iterator<const
+                                               CopyableRandomAccessRng>::type >
+            temp( adaptors::slice( r, f.t, f.u ) );
+            return CopyableRandomAccessRng( temp.begin(), temp.end() );
+        }
+
+        template<class CopyableRandomAccessRange>
+        inline CopyableRandomAccessRange
+        copy(const CopyableRandomAccessRange& rng, std::size_t t, std::size_t u)
+        {
+            iterator_range<
+                BOOST_DEDUCED_TYPENAME range_iterator<const
+                    CopyableRandomAccessRange>::type> temp(
+                        adaptors::slice(rng, t, u));
+
+            return CopyableRandomAccessRange( temp.begin(), temp.end() );
+        }
+    } // 'adaptors'
+
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/define_adaptor.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/define_adaptor.hpp
new file mode 100644 (file)
index 0000000..d68c64e
--- /dev/null
@@ -0,0 +1,117 @@
+#ifndef BOOST_RANGE_DEFINE_ADAPTOR_HPP_INCLUDED
+#define BOOST_RANGE_DEFINE_ADAPTOR_HPP_INCLUDED
+
+#include <boost/tuple/tuple.hpp>
+
+#define BOOST_DEFINE_RANGE_ADAPTOR( adaptor_name, range_adaptor ) \
+    struct adaptor_name##_forwarder {}; \
+    \
+    template<typename Range> range_adaptor <Range> \
+        operator|(Range& rng, adaptor_name##_forwarder) \
+    { \
+        return range_adaptor <Range>( rng ); \
+    } \
+    \
+    template<typename Range> range_adaptor <const Range> \
+        operator|(const Range& rng, adaptor_name##_forwarder) \
+    { \
+        return range_adaptor <const Range>( rng ); \
+    } \
+    \
+    static adaptor_name##_forwarder adaptor_name = adaptor_name##_forwarder(); \
+    \
+    template<typename Range> \
+    range_adaptor <Range> \
+    make_##adaptor_name(Range& rng) \
+    { \
+        return range_adaptor <Range>(rng); \
+    } \
+    \
+    template<typename Range> \
+    range_adaptor <const Range> \
+    make_##adaptor_name(const Range& rng) \
+    { \
+        return range_adaptor <const Range>(rng); \
+    }
+
+#define BOOST_DEFINE_RANGE_ADAPTOR_1( adaptor_name, range_adaptor, adaptor_class ) \
+    template<typename Range> range_adaptor <Range> \
+        operator|(Range& rng, const adaptor_name & args) \
+    { \
+        return range_adaptor <Range>(rng, args.arg1); \
+    } \
+    template<typename Range> range_adaptor <const Range> \
+        operator|(const Range& rng, const adaptor_name & args) \
+    { \
+        return range_adaptor <Range>(rng, args.arg1); \
+    } \
+    template<typename Range, typename Arg1> \
+    range_adaptor<Range> \
+    make_##adaptor_name(Range& rng, Arg1 arg1) \
+    { \
+        return range_adaptor<Range>(rng, arg1); \
+    }
+
+#define BOOST_DEFINE_RANGE_ADAPTOR_1( adaptor_name, range_adaptor, arg1_type ) \
+    struct adaptor_name \
+    { \
+        explicit adaptor_name (arg1_type arg1_) \
+            : arg1(arg1_) {} \
+        arg1_type arg1; \
+    }; \
+    \
+    template<typename Range> range_adaptor <Range> \
+        operator|(Range& rng, adaptor_name args) \
+    { \
+        return range_adaptor <Range>(rng, args.arg1); \
+    } \
+    \
+    template<typename Range> range_adaptor <const Range> \
+        operator|(const Range& rng, adaptor_name args) \
+    { \
+        return range_adaptor <const Range>(rng, args.arg1); \
+    } \
+    \
+    template<typename Range> \
+    range_adaptor <Range> \
+    make_##adaptor_name(Range& rng, arg1_type arg1) \
+    { \
+        return range_adaptor <Range>(rng, arg1); \
+    } \
+    \
+    template<typename Range> \
+    range_adaptor <const Range> \
+    make_##adaptor_name(const Range& rng, arg1_type arg1) \
+    { \
+        return range_adaptor <const Range>(rng, arg1); \
+    }
+
+#define BOOST_RANGE_ADAPTOR_2( adaptor_name, range_adaptor, arg1_type, arg2_type ) \
+    struct adaptor_name \
+    { \
+        explicit adaptor_name (arg1_type arg1_, arg2_type arg2_) \
+            : arg1(arg1_), arg2(arg2_) {} \
+        arg1_type arg1; \
+        arg2_type arg2; \
+    }; \
+    \
+    template<typename Range> range_adaptor <Range> \
+    operator|(Range& rng, adaptor_name args) \
+    { \
+        return range_adaptor <Range>(rng, args.arg1, args.arg2); \
+    } \
+    template<typename Range> \
+    range_adaptor <Range> \
+    make_##adaptor_name(Range& rng, arg1_type arg1, arg2_type arg2) \
+    { \
+        return range_adaptor <Range>(rng, arg1, arg2); \
+    } \
+    template<typename Range> \
+    range_adaptor <const Range> \
+    make_##adaptor_name(const Range& rng, arg1_type arg1, arg2_type arg2) \
+    { \
+        return range_adaptor <const Range>(rng, arg1, arg2); \
+    }
+
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/filtered.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/filtered.hpp
new file mode 100755 (executable)
index 0000000..62888e7
--- /dev/null
@@ -0,0 +1,101 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_FILTERED_HPP
+#define BOOST_RANGE_ADAPTOR_FILTERED_HPP
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/iterator/filter_iterator.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        template< class P, class R >
+        struct filter_range :
+            boost::iterator_range<
+                boost::filter_iterator< P,
+                    BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+                >
+            >
+        {
+        private:
+            typedef boost::iterator_range<
+                        boost::filter_iterator< P,
+                            BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+                        >
+                    > base;
+        public:
+            filter_range( P p, R& r )
+            : base( make_filter_iterator( p, boost::begin(r), boost::end(r) ),
+                    make_filter_iterator( p, boost::end(r), boost::end(r) ) )
+            { }
+        };
+
+        template< class T >
+        struct filter_holder : holder<T>
+        {
+            filter_holder( T r ) : holder<T>(r)
+            { }
+        };
+
+        template< class InputRng, class Predicate >
+        inline filter_range<Predicate, InputRng>
+        operator|( InputRng& r,
+                   const filter_holder<Predicate>& f )
+        {
+            return filter_range<Predicate, InputRng>( f.val, r );
+        }
+
+        template< class InputRng, class Predicate >
+        inline filter_range<Predicate, const InputRng>
+        operator|( const InputRng& r,
+                   const filter_holder<Predicate>& f )
+        {
+            return filter_range<Predicate, const InputRng>( f.val, r );
+        }
+
+    } // 'range_detail'
+
+    // Unusual use of 'using' is intended to bring filter_range into the boost namespace
+    // while leaving the mechanics of the '|' operator in range_detail and maintain
+    // argument dependent lookup.
+    // filter_range logically needs to be in the boost namespace to allow user of
+    // the library to define the return type for filter()
+    using range_detail::filter_range;
+
+    namespace adaptors
+    {
+        namespace
+        {
+            const range_detail::forwarder<range_detail::filter_holder>
+                    filtered =
+                       range_detail::forwarder<range_detail::filter_holder>();
+        }
+
+        template<class InputRange, class Predicate>
+        inline filter_range<Predicate, InputRange>
+        filter(InputRange& rng, Predicate filter_pred)
+        {
+            return range_detail::filter_range<Predicate, InputRange>( filter_pred, rng );
+        }
+
+        template<class InputRange, class Predicate>
+        inline filter_range<Predicate, const InputRange>
+        filter(const InputRange& rng, Predicate filter_pred)
+        {
+            return range_detail::filter_range<Predicate, const InputRange>( filter_pred, rng );
+        }
+    } // 'adaptors'
+
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/indexed.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/indexed.hpp
new file mode 100755 (executable)
index 0000000..5a523ce
--- /dev/null
@@ -0,0 +1,156 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_INDEXED_IMPL_HPP
+#define BOOST_RANGE_ADAPTOR_INDEXED_IMPL_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+#pragma warning( push )
+#pragma warning( disable : 4355 )
+#endif
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+
+
+
+namespace boost
+{
+    namespace adaptors
+    {
+        // This structure exists to carry the parameters from the '|' operator
+        // to the index adapter. The expression rng | indexed(1) instantiates
+        // this structure and passes it as the right-hand operand to the
+        // '|' operator.
+        struct indexed
+        {
+            explicit indexed(std::size_t x) : val(x) {}
+            std::size_t val;
+        };
+    }
+
+    namespace range_detail
+    {
+        template< class Iter >
+        class indexed_iterator
+            : public boost::iterator_adaptor< indexed_iterator<Iter>, Iter >
+        {
+        private:
+            typedef boost::iterator_adaptor< indexed_iterator<Iter>, Iter >
+                  base;
+
+            typedef BOOST_DEDUCED_TYPENAME base::difference_type index_type;
+
+            index_type m_index;
+
+        public:
+            explicit indexed_iterator( Iter i, index_type index )
+            : base(i), m_index(index)
+            {
+                BOOST_ASSERT( m_index >= 0 && "Indexed Iterator out of bounds" );
+            }
+
+            index_type index() const
+            {
+                return m_index;
+            }
+
+         private:
+            friend class boost::iterator_core_access;
+
+            void increment()
+            {
+                ++m_index;
+                ++(this->base_reference());
+            }
+
+
+            void decrement()
+            {
+                BOOST_ASSERT( m_index > 0 && "Indexed Iterator out of bounds" );
+                --m_index;
+                --(this->base_reference());
+            }
+
+            void advance( index_type n )
+            {
+                m_index += n;
+                BOOST_ASSERT( m_index >= 0 && "Indexed Iterator out of bounds" );
+                this->base_reference() += n;
+            }
+        };
+
+        template< class Rng >
+        struct indexed_range :
+            iterator_range< indexed_iterator<BOOST_DEDUCED_TYPENAME range_iterator<Rng>::type> >
+        {
+        private:
+            typedef indexed_iterator<BOOST_DEDUCED_TYPENAME range_iterator<Rng>::type>
+                iter_type;
+            typedef iterator_range<iter_type>
+                base;
+        public:
+            template< class Index >
+            indexed_range( Index i, Rng& r )
+              : base( iter_type(boost::begin(r), i), iter_type(boost::end(r),i) )
+            { }
+        };
+
+    } // 'range_detail'
+
+    // Make this available to users of this library. It will sometimes be
+    // required since it is the return type of operator '|' and
+    // index().
+    using range_detail::indexed_range;
+
+    namespace adaptors
+    {
+        template< class SinglePassRange >
+        inline indexed_range<SinglePassRange>
+        operator|( SinglePassRange& r,
+                   const indexed& f )
+        {
+            return indexed_range<SinglePassRange>( f.val, r );
+        }
+
+        template< class SinglePassRange >
+        inline indexed_range<const SinglePassRange>
+        operator|( const SinglePassRange& r,
+                   const indexed& f )
+        {
+            return indexed_range<const SinglePassRange>( f.val, r );
+        }
+
+        template<class SinglePassRange, class Index>
+        inline indexed_range<SinglePassRange>
+        index(SinglePassRange& rng, Index index_value)
+        {
+            return indexed_range<SinglePassRange>(index_value, rng);
+        }
+
+        template<class SinglePassRange, class Index>
+        inline indexed_range<const SinglePassRange>
+        index(const SinglePassRange& rng, Index index_value)
+        {
+            return indexed_range<const SinglePassRange>(index_value, rng);
+        }
+    } // 'adaptors'
+
+}
+
+#ifdef BOOST_MSVC
+#pragma warning( pop )
+#endif
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/indirected.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/indirected.hpp
new file mode 100644 (file)
index 0000000..4abb3ec
--- /dev/null
@@ -0,0 +1,88 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_INDIRECTED_HPP
+#define BOOST_RANGE_ADAPTOR_INDIRECTED_HPP
+
+#include <boost/range/iterator_range.hpp>
+#include <boost/iterator/indirect_iterator.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        template< class R >
+        struct indirect_range :
+            public boost::iterator_range<
+                        boost::indirect_iterator<
+                            BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+                        >
+                    >
+        {
+        private:
+            typedef boost::iterator_range<
+                        boost::indirect_iterator<
+                            BOOST_DEDUCED_TYPENAME range_iterator<R>::type
+                        >
+                    >
+                base;
+
+        public:
+            explicit indirect_range( R& r )
+                : base( r )
+            { }
+        };
+
+        struct indirect_forwarder {};
+
+        template< class InputRng >
+        inline indirect_range<InputRng>
+        operator|( InputRng& r, indirect_forwarder )
+        {
+            return indirect_range<InputRng>( r );
+        }
+
+        template< class InputRng >
+        inline indirect_range<const InputRng>
+        operator|( const InputRng& r, indirect_forwarder )
+        {
+            return indirect_range<const InputRng>( r );
+        }
+
+    } // 'range_detail'
+
+    using range_detail::indirect_range;
+
+    namespace adaptors
+    {
+        namespace
+        {
+            const range_detail::indirect_forwarder indirected =
+                                            range_detail::indirect_forwarder();
+        }
+
+        template<class InputRange>
+        inline indirect_range<InputRange>
+        indirect(InputRange& rng)
+        {
+            return indirect_range<InputRange>(rng);
+        }
+
+        template<class InputRange>
+        inline indirect_range<const InputRange>
+        indirect(const InputRange& rng)
+        {
+            return indirect_range<const InputRange>(rng);
+        }
+    } // 'adaptors'
+
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/map.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/map.hpp
new file mode 100755 (executable)
index 0000000..a8a2c20
--- /dev/null
@@ -0,0 +1,188 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_MAP_HPP
+#define BOOST_RANGE_ADAPTOR_MAP_HPP
+
+#include <boost/range/adaptor/transformed.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/value_type.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        struct map_keys_forwarder {};
+        struct map_values_forwarder {};
+
+        template< class Map >
+        struct select_first
+        {
+            typedef BOOST_DEDUCED_TYPENAME Map::value_type pair_t;
+            typedef const BOOST_DEDUCED_TYPENAME pair_t::first_type& 
+                result_type;  
+
+            result_type operator()( const pair_t& r ) const
+            {
+                return r.first;
+            }
+        };
+
+        template< class Map >
+        struct select_second_mutable
+        {
+            typedef BOOST_DEDUCED_TYPENAME Map::value_type pair_t;
+            typedef BOOST_DEDUCED_TYPENAME pair_t::second_type& result_type;  
+
+            result_type operator()( pair_t& r ) const
+            {
+                return r.second;
+            }
+        };
+
+        template< class Map >
+        struct select_second_const
+        {
+            typedef BOOST_DEDUCED_TYPENAME Map::value_type pair_t;
+            typedef const BOOST_DEDUCED_TYPENAME pair_t::second_type& 
+                result_type;  
+            
+            result_type operator()( const pair_t& r ) const
+            {
+                return r.second;
+            }
+        };
+        
+        template<class StdPairRng>
+        class select_first_range
+            : public transform_range<
+                        select_first<StdPairRng>,
+                        const StdPairRng>
+        {
+            typedef transform_range<select_first<StdPairRng>, const StdPairRng> base;
+        public:
+            typedef select_first<StdPairRng> transform_fn_type;
+            typedef const StdPairRng source_range_type;
+
+            select_first_range(transform_fn_type fn, source_range_type& rng)
+                : base(fn, rng)
+            {
+            }
+
+            select_first_range(const base& other) : base(other) {}
+        };
+        
+        template<class StdPairRng>
+        class select_second_mutable_range
+            : public transform_range<
+                        select_second_mutable<StdPairRng>,
+                        StdPairRng>
+        {
+            typedef transform_range<select_second_mutable<StdPairRng>, StdPairRng> base;
+        public:
+            typedef select_second_mutable<StdPairRng> transform_fn_type;
+            typedef StdPairRng source_range_type;
+
+            select_second_mutable_range(transform_fn_type fn, source_range_type& rng)
+                : base(fn, rng)
+            {
+            }
+
+            select_second_mutable_range(const base& other) : base(other) {}
+        };
+        
+        template<class StdPairRng>
+        class select_second_const_range
+            : public transform_range<
+                        select_second_const<StdPairRng>,
+                        const StdPairRng>
+        {
+            typedef transform_range<select_second_const<StdPairRng>, const StdPairRng> base;
+        public:
+            typedef select_second_const<StdPairRng> transform_fn_type;
+            typedef const StdPairRng source_range_type;
+
+            select_second_const_range(transform_fn_type fn, source_range_type& rng)
+                : base(fn, rng)
+            {
+            }
+
+            select_second_const_range(const base& other) : base(other) {}
+        };
+        
+        template< class StdPairRng >
+        inline select_first_range<StdPairRng> 
+        operator|( const StdPairRng& r, map_keys_forwarder )
+        {
+            return operator|( r, 
+              boost::adaptors::transformed( select_first<StdPairRng>() ) );
+        }
+
+        template< class StdPairRng >
+        inline select_second_mutable_range<StdPairRng> 
+        operator|( StdPairRng& r, map_values_forwarder )
+        {
+            return operator|( r, 
+          boost::adaptors::transformed( select_second_mutable<StdPairRng>() ) );
+        }
+
+        template< class StdPairRng >
+        inline select_second_const_range<StdPairRng>
+        operator|( const StdPairRng& r, map_values_forwarder )
+        {
+            return operator|( r, 
+           boost::adaptors::transformed( select_second_const<StdPairRng>() ) ); 
+        }
+        
+    } // 'range_detail'
+    
+    using range_detail::select_first_range;
+    using range_detail::select_second_mutable_range;
+    using range_detail::select_second_const_range;
+
+    namespace adaptors
+    { 
+        namespace
+        {
+            const range_detail::map_keys_forwarder map_keys = 
+                                            range_detail::map_keys_forwarder();
+
+            const range_detail::map_values_forwarder map_values = 
+                                           range_detail::map_values_forwarder();
+        }
+        
+        template<class StdPairRange>
+        inline select_first_range<StdPairRange>
+        keys(const StdPairRange& rng)
+        {
+            return select_first_range<StdPairRange>(
+                range_detail::select_first<StdPairRange>(), rng );
+        }
+        
+        template<class StdPairRange>
+        inline select_second_const_range<StdPairRange>
+        values(const StdPairRange& rng)
+        {
+            return select_second_const_range<StdPairRange>(
+                range_detail::select_second_const<StdPairRange>(), rng );
+        }
+        
+        template<class StdPairRange>
+        inline select_second_mutable_range<StdPairRange>
+        values(StdPairRange& rng)
+        {
+            return select_second_mutable_range<StdPairRange>(
+                range_detail::select_second_mutable<StdPairRange>(), rng );
+        }
+    } // 'adaptors'
+    
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/replaced.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/replaced.hpp
new file mode 100644 (file)
index 0000000..3c40918
--- /dev/null
@@ -0,0 +1,134 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2007. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_REPLACED_IMPL_HPP_INCLUDED
+#define BOOST_RANGE_ADAPTOR_REPLACED_IMPL_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        template< class Value >
+        class replace_value
+        {
+        public:
+            typedef const Value& result_type;
+            typedef const Value& first_argument_type;
+
+            replace_value(const Value& from, const Value& to)
+                :   m_from(from), m_to(to)
+            {
+            }
+
+            const Value& operator()(const Value& x) const
+            {
+                return (x == m_from) ? m_to : x;
+            }
+
+        private:
+            Value m_from;
+            Value m_to;
+        };
+
+        template< class R >
+        class replace_range :
+            public boost::iterator_range<
+                boost::transform_iterator<
+                    replace_value< BOOST_DEDUCED_TYPENAME range_value<R>::type >,
+                    BOOST_DEDUCED_TYPENAME range_iterator<R>::type > >
+        {
+        private:
+            typedef replace_value< BOOST_DEDUCED_TYPENAME range_value<R>::type > Fn;
+
+            typedef boost::iterator_range<
+                boost::transform_iterator<
+                    replace_value< BOOST_DEDUCED_TYPENAME range_value<R>::type >,
+                    BOOST_DEDUCED_TYPENAME range_iterator<R>::type > > base_t;
+
+        public:
+            typedef BOOST_DEDUCED_TYPENAME range_value<R>::type value_type;
+
+            replace_range( R& r, value_type from, value_type to )
+                : base_t( make_transform_iterator( boost::begin(r), Fn(from, to) ),
+                          make_transform_iterator( boost::end(r), Fn(from, to) ) )
+            { }
+        };
+
+        template< class T >
+        class replace_holder : public holder2<T>
+        {
+        public:
+            replace_holder( const T& from, const T& to )
+                : holder2<T>(from, to)
+            { }
+        private:
+            // not assignable
+            void operator=(const replace_holder&);
+        };
+
+        template< class InputRng >
+        inline replace_range<InputRng>
+        operator|( InputRng& r,
+                   const replace_holder<BOOST_DEDUCED_TYPENAME range_value<InputRng>::type>& f )
+        {
+            return replace_range<InputRng>(r, f.val1, f.val2);
+        }
+
+        template< class InputRng >
+        inline replace_range<const InputRng>
+        operator|( const InputRng& r,
+                   const replace_holder<BOOST_DEDUCED_TYPENAME range_value<InputRng>::type>& f )
+        {
+            return replace_range<const InputRng>(r, f.val1, f.val2);
+        }
+    } // 'range_detail'
+
+    using range_detail::replace_range;
+
+    namespace adaptors
+    {
+        namespace
+        {
+            const range_detail::forwarder2<range_detail::replace_holder>
+                replaced =
+                    range_detail::forwarder2<range_detail::replace_holder>();
+        }
+
+        template<class InputRange>
+        inline replace_range<InputRange>
+        replace(InputRange& rng,
+                BOOST_DEDUCED_TYPENAME range_value<InputRange>::type from,
+                BOOST_DEDUCED_TYPENAME range_value<InputRange>::type to)
+        {
+            return replace_range<InputRange>(rng, from, to);
+        }
+
+        template<class InputRange>
+        inline replace_range<const InputRange>
+        replace(const InputRange& rng,
+                BOOST_DEDUCED_TYPENAME range_value<const InputRange>::type from,
+                BOOST_DEDUCED_TYPENAME range_value<const InputRange>::type to)
+        {
+            return replace_range<const InputRange>(rng, from ,to);
+        }
+
+    } // 'adaptors'
+} // 'boost'
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/replaced_if.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/replaced_if.hpp
new file mode 100644 (file)
index 0000000..9353abd
--- /dev/null
@@ -0,0 +1,136 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2007. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_REPLACED_IF_IMPL_HPP_INCLUDED
+#define BOOST_RANGE_ADAPTOR_REPLACED_IF_IMPL_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        template< class Pred, class Value >
+        class replace_value_if
+        {
+        public:
+            typedef const Value& result_type;
+            typedef const Value& first_argument_type;
+
+            replace_value_if(const Pred& pred, const Value& to)
+                :   m_pred(pred), m_to(to)
+            {
+            }
+
+            const Value& operator()(const Value& x) const
+            {
+                return m_pred(x) ? m_to : x;
+            }
+
+        private:
+            Pred  m_pred;
+            Value m_to;
+        };
+
+        template< class Pred, class R >
+        class replace_if_range :
+            public boost::iterator_range<
+                boost::transform_iterator<
+                    replace_value_if< Pred, BOOST_DEDUCED_TYPENAME range_value<R>::type >,
+                    BOOST_DEDUCED_TYPENAME range_iterator<R>::type > >
+        {
+        private:
+            typedef replace_value_if< Pred, BOOST_DEDUCED_TYPENAME range_value<R>::type > Fn;
+
+            typedef boost::iterator_range<
+                boost::transform_iterator<
+                    replace_value_if< Pred, BOOST_DEDUCED_TYPENAME range_value<R>::type >,
+                    BOOST_DEDUCED_TYPENAME range_iterator<R>::type > > base_t;
+
+        public:
+            typedef BOOST_DEDUCED_TYPENAME range_value<R>::type value_type;
+
+            replace_if_range( R& r, const Pred& pred, value_type to )
+                : base_t( make_transform_iterator( boost::begin(r), Fn(pred, to) ),
+                          make_transform_iterator( boost::end(r), Fn(pred, to) ) )
+            { }
+        };
+
+        template< class Pred, class T >
+        class replace_if_holder
+        {
+        public:
+            replace_if_holder( const Pred& pred, const T& to )
+                : m_pred(pred), m_to(to)
+            { }
+
+            const Pred& pred() const { return m_pred; }
+            const T& to() const { return m_to; }
+
+        private:
+            Pred m_pred;
+            T m_to;
+        };
+
+        template< class Pred, class InputRng >
+        inline replace_if_range<Pred, InputRng>
+        operator|( InputRng& r,
+                   const replace_if_holder<Pred, BOOST_DEDUCED_TYPENAME range_value<InputRng>::type>& f )
+        {
+            return replace_if_range<Pred, InputRng>(r, f.pred(), f.to());
+        }
+
+        template< class Pred, class InputRng >
+        inline replace_if_range<Pred, const InputRng>
+        operator|( const InputRng& r,
+                   const replace_if_holder<Pred, BOOST_DEDUCED_TYPENAME range_value<InputRng>::type>& f )
+        {
+            return replace_if_range<Pred, const InputRng>(r, f.pred(), f.to());
+        }
+    } // 'range_detail'
+
+    using range_detail::replace_if_range;
+
+    namespace adaptors
+    {
+        namespace
+        {
+            const range_detail::forwarder2TU<range_detail::replace_if_holder>
+                replaced_if =
+                    range_detail::forwarder2TU<range_detail::replace_if_holder>();
+        }
+        
+        template<class Pred, class InputRange>
+        inline replace_if_range<Pred, InputRange>
+        replace_if(InputRange& rng, Pred pred,
+                   BOOST_DEDUCED_TYPENAME range_value<InputRange>::type to)
+        {
+            return range_detail::replace_if_range<Pred, InputRange>(rng, pred, to);
+        }
+
+        template<class Pred, class InputRange>
+        inline replace_if_range<Pred, const InputRange>
+        replace_if(const InputRange& rng, Pred pred,
+                   BOOST_DEDUCED_TYPENAME range_value<const InputRange>::type to)
+        {
+            return range_detail::replace_if_range<Pred, const InputRange>(rng, pred, to);
+        }
+    } // 'adaptors'
+    
+} // 'boost'
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/reversed.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/reversed.hpp
new file mode 100755 (executable)
index 0000000..229702b
--- /dev/null
@@ -0,0 +1,90 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_REVERSED_HPP
+#define BOOST_RANGE_ADAPTOR_REVERSED_HPP
+
+#include <boost/range/iterator_range.hpp>
+#include <boost/iterator/reverse_iterator.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        template< class R >
+        struct reverse_range : 
+            public boost::iterator_range< 
+                      boost::reverse_iterator<
+                        BOOST_DEDUCED_TYPENAME range_iterator<R>::type 
+                                              >
+                                         >
+        {
+        private:
+            typedef boost::iterator_range< 
+                      boost::reverse_iterator<
+                        BOOST_DEDUCED_TYPENAME range_iterator<R>::type 
+                                              >
+                                         >
+                base;
+            
+        public:
+            typedef boost::reverse_iterator<BOOST_DEDUCED_TYPENAME range_iterator<R>::type> iterator;
+
+            reverse_range( R& r ) 
+                : base( iterator(boost::end(r)), iterator(boost::begin(r)) )
+            { }
+        };
+
+        struct reverse_forwarder {};
+        
+        template< class BidirectionalRng >
+        inline reverse_range<BidirectionalRng> 
+        operator|( BidirectionalRng& r, reverse_forwarder )
+        {
+            return reverse_range<BidirectionalRng>( r );   
+        }
+    
+        template< class BidirectionalRng >
+        inline reverse_range<const BidirectionalRng> 
+        operator|( const BidirectionalRng& r, reverse_forwarder )
+        {
+            return reverse_range<const BidirectionalRng>( r );   
+        }
+        
+    } // 'range_detail'
+    
+    using range_detail::reverse_range;
+
+    namespace adaptors
+    { 
+        namespace
+        {
+            const range_detail::reverse_forwarder reversed = 
+                                            range_detail::reverse_forwarder();
+        }
+        
+        template<class BidirectionalRange>
+        inline reverse_range<BidirectionalRange>
+        reverse(BidirectionalRange& rng)
+        {
+            return reverse_range<BidirectionalRange>(rng);
+        }
+        
+        template<class BidirectionalRange>
+        inline reverse_range<const BidirectionalRange>
+        reverse(const BidirectionalRange& rng)
+        {
+            return reverse_range<const BidirectionalRange>(rng);
+        }
+    } // 'adaptors'
+    
+} // 'boost'
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/sliced.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/sliced.hpp
new file mode 100755 (executable)
index 0000000..eb506e0
--- /dev/null
@@ -0,0 +1,71 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_SLICED_HPP
+#define BOOST_RANGE_ADAPTOR_SLICED_HPP
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/size_type.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+    namespace adaptors
+    {
+        struct sliced
+        {
+            sliced(std::size_t t_, std::size_t u_)
+                : t(t_), u(u_) {}
+            std::size_t t;
+            std::size_t u;
+        };
+
+               template< class RandomAccessRange >
+               inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type >
+               slice( RandomAccessRange& rng, std::size_t t, std::size_t u )
+               {
+                       BOOST_ASSERT( t <= u && "error in slice indices" );
+            BOOST_ASSERT( static_cast<std::size_t>(boost::size(rng)) >= u &&
+                                                 "second slice index out of bounds" );
+
+                       return boost::make_iterator_range( rng, t, u - boost::size(rng) );
+               }
+
+               template< class RandomAccessRange >
+               inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type >
+               slice( const RandomAccessRange& rng, std::size_t t, std::size_t u )
+               {
+                   BOOST_ASSERT( t <= u && "error in slice indices" );
+                   BOOST_ASSERT( static_cast<std::size_t>(boost::size(rng)) >= u &&
+                                 "second slice index out of bounds" );
+
+            return boost::make_iterator_range( rng, t, u - boost::size(rng) );
+               }
+
+               template< class RandomAccessRange >
+               inline iterator_range<
+                            BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type >
+               operator|( RandomAccessRange& r, const sliced& f )
+               {
+                       return adaptors::slice( r, f.t, f.u );
+               }
+
+               template< class RandomAccessRange >
+               inline iterator_range<
+                                BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type >
+               operator|( const RandomAccessRange& r, const sliced& f )
+               {
+                       return adaptors::slice( r, f.t, f.u );
+               }
+
+    } // namespace adaptors
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/strided.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/strided.hpp
new file mode 100755 (executable)
index 0000000..5f4c4fa
--- /dev/null
@@ -0,0 +1,149 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2007. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ADAPTOR_STRIDED_HPP_INCLUDED
+#define BOOST_RANGE_ADAPTOR_STRIDED_HPP_INCLUDED
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/iterator/iterator_adaptor.hpp>
+#include <iterator>
+
+namespace boost
+{
+    namespace range_detail
+    {
+
+        template<typename BaseIterator>
+        class strided_iterator
+            : public iterator_adaptor<
+                        strided_iterator<BaseIterator>,
+                        BaseIterator>
+        {
+            friend class iterator_core_access;
+
+            typedef iterator_adaptor<strided_iterator<BaseIterator>, BaseIterator> super_t;
+        
+        public:
+            typedef BOOST_DEDUCED_TYPENAME std::iterator_traits<BaseIterator>::difference_type          difference_type;
+                
+            strided_iterator() : m_stride() { }
+        
+            strided_iterator(const strided_iterator& other)
+                : super_t(other), m_stride(other.m_stride) { }
+        
+            explicit strided_iterator(BaseIterator base_it, difference_type stride)
+                : super_t(base_it), m_stride(stride) { }
+        
+            strided_iterator&
+            operator=(const strided_iterator& other)
+            {
+                super_t::operator=(other);
+            
+                // Is the interoperation of the stride safe?
+                m_stride = other.m_stride;
+                return *this;
+            }
+        
+            void increment() { std::advance(this->base_reference(), m_stride); }
+        
+            void decrement() { std::advance(this->base_reference(), -m_stride); }
+        
+            void advance(difference_type n) { std::advance(this->base_reference(), n * m_stride); }
+        
+            difference_type
+            distance_to(const strided_iterator& other) const
+            {
+                return std::distance(this->base_reference(), other.base_reference()) / m_stride;
+            }
+
+            // Using the compiler generated copy constructor and
+            // and assignment operator
+        
+        private:
+            difference_type m_stride;
+        };
+    
+        template<class BaseIterator> inline
+        strided_iterator<BaseIterator>
+        make_strided_iterator(
+            const BaseIterator& first,
+            BOOST_DEDUCED_TYPENAME std::iterator_traits<BaseIterator>::difference_type stride)
+        {
+            return strided_iterator<BaseIterator>(first, stride);
+        }
+
+        template< class Rng >
+        class strided_range
+            : public iterator_range<range_detail::strided_iterator<BOOST_DEDUCED_TYPENAME range_iterator<Rng>::type> >
+        {
+            typedef range_detail::strided_iterator<BOOST_DEDUCED_TYPENAME range_iterator<Rng>::type> iter_type;
+            typedef iterator_range<iter_type> super_t;
+        public:
+            template< typename Difference >
+            strided_range(Difference stride, Rng& rng)
+                : super_t(make_strided_iterator(boost::begin(rng), stride),
+                    make_strided_iterator(boost::end(rng), stride))
+            {
+            }
+        };
+
+        template<class Difference>
+        class strided_holder : public holder<Difference>
+        {
+        public:
+            strided_holder(Difference value) : holder<Difference>(value) {}
+        };
+
+        template<class Rng, class Difference>
+        inline strided_range<Rng>
+        operator|(Rng& rng, const strided_holder<Difference>& stride)
+        {
+            return strided_range<Rng>(stride.val, rng);
+        }
+
+        template<class Rng, class Difference>
+        inline strided_range<const Rng>
+        operator|(const Rng& rng, const strided_holder<Difference>& stride)
+        {
+            return strided_range<const Rng>(stride.val, rng);
+        }
+
+    } // namespace range_detail
+    
+    using range_detail::strided_range;
+
+    namespace adaptors
+    {
+    
+        namespace
+        {
+            const range_detail::forwarder<range_detail::strided_holder>
+                strided = range_detail::forwarder<range_detail::strided_holder>();
+        }
+        
+        template<class Range, class Difference>
+        inline strided_range<Range>
+        stride(Range& rng, Difference step)
+        {
+            return strided_range<Range>(step, rng);
+        }
+        
+        template<class Range, class Difference>
+        inline strided_range<const Range>
+        stride(const Range& rng, Difference step)
+        {
+            return strided_range<const Range>(step, rng);
+        }
+        
+    } // namespace 'adaptors'
+} // namespace 'boost'
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/tokenized.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/tokenized.hpp
new file mode 100755 (executable)
index 0000000..6b6a6fa
--- /dev/null
@@ -0,0 +1,137 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen, Neil Groves 2006. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_TOKENIZED_HPP
+#define BOOST_RANGE_ADAPTOR_TOKENIZED_HPP
+
+#include <boost/regex.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+
+        template< class R >
+        struct token_range : 
+            public boost::iterator_range< 
+                      boost::regex_token_iterator< 
+                          BOOST_DEDUCED_TYPENAME range_iterator<R>::type 
+                                              >
+                                         >
+        {
+        private:
+            typedef           
+                boost::regex_token_iterator< 
+                          BOOST_DEDUCED_TYPENAME range_iterator<R>::type 
+                                            >
+                regex_iter;
+            
+            typedef BOOST_DEDUCED_TYPENAME regex_iter::regex_type 
+                regex_type;
+        
+            typedef boost::iterator_range<regex_iter> 
+                base;
+
+        public:
+            template< class Regex, class Submatch, class Flag >
+            token_range( R& r, const Regex& re, const Submatch& sub, Flag f )
+              : base( regex_iter( boost::begin(r), boost::end(r), 
+                                  regex_type(re), sub, f ),
+                      regex_iter() )
+            { }
+        };
+
+        template< class T, class U, class V >
+        struct regex_holder
+        {
+            const T&  re;
+            const U&  sub;
+            V         f;
+
+            regex_holder( const T& rex, const U& subm, V flag ) :
+                re(rex), sub(subm), f(flag)
+            { }
+        private:
+            // Not assignable
+            void operator=(const regex_holder&);
+        };
+
+        struct regex_forwarder
+        {           
+            template< class Regex >
+            regex_holder<Regex,int,regex_constants::match_flag_type>
+            operator()( const Regex& re, 
+                        int submatch = 0,    
+                        regex_constants::match_flag_type f = 
+                            regex_constants::match_default ) const
+            {
+                return regex_holder<Regex,int,
+                           regex_constants::match_flag_type>( re, submatch, f );
+            }
+             
+            template< class Regex, class Submatch >
+            regex_holder<Regex,Submatch,regex_constants::match_flag_type> 
+            operator()( const Regex& re, 
+                        const Submatch& sub, 
+                        regex_constants::match_flag_type f = 
+                            regex_constants::match_default ) const
+            {
+                return regex_holder<Regex,Submatch,
+                           regex_constants::match_flag_type>( re, sub, f ); 
+            }
+        };
+        
+        template< class BidirectionalRng, class R, class S, class F >
+        inline token_range<BidirectionalRng> 
+        operator|( BidirectionalRng& r, 
+                   const regex_holder<R,S,F>& f )
+        {
+            return token_range<BidirectionalRng>( r, f.re, f.sub, f.f );   
+        }
+
+        template< class BidirectionalRng, class R, class S, class F  >
+        inline token_range<const BidirectionalRng> 
+        operator|( const BidirectionalRng& r, 
+                   const regex_holder<R,S,F>& f )
+        {
+            return token_range<const BidirectionalRng>( r, f.re, f.sub, f.f );
+        }
+        
+    } // 'range_detail'
+
+    using range_detail::token_range;
+
+    namespace adaptors
+    { 
+        namespace
+        {
+            const range_detail::regex_forwarder tokenized = 
+                    range_detail::regex_forwarder();
+        }
+        
+        template<class BidirectionalRange, class Regex, class Submatch, class Flag>
+        inline token_range<BidirectionalRange>
+        tokenize(BidirectionalRange& rng, const Regex& reg, const Submatch& sub, Flag f)
+        {
+            return token_range<BidirectionalRange>(rng, reg, sub, f);
+        }
+        
+        template<class BidirectionalRange, class Regex, class Submatch, class Flag>
+        inline token_range<const BidirectionalRange>
+        tokenize(const BidirectionalRange& rng, const Regex& reg, const Submatch& sub, Flag f)
+        {
+            return token_range<const BidirectionalRange>(rng, reg, sub, f);
+        }
+    } // 'adaptors'
+    
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/transformed.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/transformed.hpp
new file mode 100755 (executable)
index 0000000..00297ca
--- /dev/null
@@ -0,0 +1,103 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_TRANSFORMED_HPP
+#define BOOST_RANGE_ADAPTOR_TRANSFORMED_HPP
+
+#include <boost/range/adaptor/argument_fwd.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+
+        template< class F, class R >
+        struct transform_range : 
+            public boost::iterator_range< 
+                      boost::transform_iterator< F,
+                          BOOST_DEDUCED_TYPENAME range_iterator<R>::type 
+                                              >
+                                         >
+        {
+        private:
+            typedef boost::iterator_range< 
+                      boost::transform_iterator< F,
+                        BOOST_DEDUCED_TYPENAME range_iterator<R>::type 
+                                              >
+                                         >
+                base;
+
+        public:
+            typedef F transform_fn_type;
+            typedef R source_range_type;
+            
+            transform_range( F f, R& r )
+                : base( make_transform_iterator( boost::begin(r), f ),
+                        make_transform_iterator( boost::end(r), f ) ) 
+            
+            { }
+        };
+
+        template< class T >
+        struct transform_holder : holder<T>
+        {
+            transform_holder( T r ) : holder<T>(r)
+            { }
+        };
+        
+        template< class InputRng, class UnaryFunction >
+        inline transform_range<UnaryFunction,InputRng> 
+        operator|( InputRng& r, 
+                   const transform_holder<UnaryFunction>& f )
+        {
+            return transform_range<UnaryFunction,InputRng>( f.val, r );   
+        }
+    
+        template< class InputRng, class UnaryFunction >
+        inline transform_range<UnaryFunction, const InputRng> 
+        operator|( const InputRng& r, 
+                   const transform_holder<UnaryFunction>& f )
+        {
+           return transform_range<UnaryFunction, const InputRng>( f.val, r );   
+        }
+        
+    } // 'range_detail'
+
+    using range_detail::transform_range;
+        
+    namespace adaptors
+    { 
+        namespace
+        {
+            const range_detail::forwarder<range_detail::transform_holder> 
+                    transformed = 
+                      range_detail::forwarder<range_detail::transform_holder>();
+        }
+        
+        template<class UnaryFunction, class InputRange>
+        inline transform_range<UnaryFunction, InputRange>
+        transform(InputRange& rng, UnaryFunction fn)
+        {
+            return transform_range<UnaryFunction, InputRange>(fn, rng);
+        }
+        
+        template<class UnaryFunction, class InputRange>
+        inline transform_range<UnaryFunction, const InputRange>
+        transform(const InputRange& rng, UnaryFunction fn)
+        {
+            return transform_range<UnaryFunction, const InputRange>(fn, rng);
+        }
+    } // 'adaptors'
+    
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptor/uniqued.hpp b/deal.II/contrib/boost/include/boost/range/adaptor/uniqued.hpp
new file mode 100755 (executable)
index 0000000..ad6f7f4
--- /dev/null
@@ -0,0 +1,90 @@
+// Boost.Range library
+//
+//  Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTOR_UNIQUED_IMPL_HPP
+#define BOOST_RANGE_ADAPTOR_UNIQUED_IMPL_HPP
+
+#include <boost/range/adaptor/adjacent_filtered.hpp>
+
+namespace boost
+{
+
+    namespace range_detail
+    {
+        struct unique_forwarder { };
+
+        struct unique_not_equal_to
+        {
+            typedef bool result_type;
+
+            template< class T >
+            bool operator()( const T& l, const T& r ) const
+            {
+                return !(l == r);
+            }
+        };
+
+        template<class ForwardRng>
+        class unique_range : public adjacent_filter_range<unique_not_equal_to, ForwardRng, true>
+        {
+            typedef adjacent_filter_range<unique_not_equal_to, ForwardRng, true> base;
+        public:
+            explicit unique_range(ForwardRng& rng)
+                : base(unique_not_equal_to(), rng)
+            {
+            }
+        };
+
+        template< class ForwardRng >
+        inline unique_range<ForwardRng>
+        operator|( ForwardRng& r,
+                   unique_forwarder )
+        {
+            return unique_range<ForwardRng>(r);
+        }
+
+        template< class ForwardRng >
+        inline unique_range<const ForwardRng>
+        operator|( const ForwardRng& r,
+                   unique_forwarder )
+        {
+            return unique_range<const ForwardRng>(r);
+        }
+
+    } // 'range_detail'
+
+    using range_detail::unique_range;
+
+    namespace adaptors
+    {
+        namespace
+        {
+            const range_detail::unique_forwarder uniqued =
+                       range_detail::unique_forwarder();
+        }
+
+        template<class ForwardRange>
+        inline unique_range<ForwardRange>
+        unique(ForwardRange& rng)
+        {
+            return unique_range<ForwardRange>(rng);
+        }
+
+        template<class ForwardRange>
+        inline unique_range<const ForwardRange>
+        unique(const ForwardRange& rng)
+        {
+            return unique_range<const ForwardRange>(rng);
+        }
+    } // 'adaptors'
+
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/adaptors.hpp b/deal.II/contrib/boost/include/boost/range/adaptors.hpp
new file mode 100755 (executable)
index 0000000..92062a9
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2007.
+//  Copyright Thorsten Ottosen 2006.
+//  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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_ADAPTORS_HPP
+#define BOOST_RANGE_ADAPTORS_HPP
+
+#include <boost/range/adaptor/adjacent_filtered.hpp>
+#include <boost/range/adaptor/copied.hpp>
+#include <boost/range/adaptor/filtered.hpp>
+#include <boost/range/adaptor/indexed.hpp>
+#include <boost/range/adaptor/indirected.hpp>
+#include <boost/range/adaptor/map.hpp>
+#include <boost/range/adaptor/replaced.hpp>
+#include <boost/range/adaptor/replaced_if.hpp>
+#include <boost/range/adaptor/reversed.hpp>
+#include <boost/range/adaptor/sliced.hpp>
+#include <boost/range/adaptor/strided.hpp>
+#include <boost/range/adaptor/tokenized.hpp>
+#include <boost/range/adaptor/transformed.hpp>
+#include <boost/range/adaptor/uniqued.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm.hpp b/deal.II/contrib/boost/include/boost/range/algorithm.hpp
new file mode 100755 (executable)
index 0000000..b7d8dd7
--- /dev/null
@@ -0,0 +1,104 @@
+///////////////////////////////////////////////////////////////////////////////
+/// \file algorithm.hpp
+///   Includes the range-based versions of the algorithms in the
+///   C++ standard header file <algorithm>
+//
+/////////////////////////////////////////////////////////////////////////////
+
+// Copyright 2009 Neil Groves.
+// 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)
+//
+// Acknowledgements:
+// This code uses combinations of ideas, techniques and code snippets
+// from: Thorsten Ottosen, Eric Niebler, Jeremy Siek,
+// and Vladimir Prus'
+//
+// The original mutating algorithms that served as the first version
+// were originally written by Vladimir Prus'
+// <ghost@cs.msu.su> code from Boost Wiki
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+#pragma once
+#endif
+
+#ifndef BOOST_RANGE_ALGORITHM_HPP_INCLUDED_01012009
+#define BOOST_RANGE_ALGORITHM_HPP_INCLUDED_01012009
+
+#include <boost/range/concepts.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/next_prior.hpp>
+#include <algorithm>
+
+// Non-mutating algorithms
+#include <boost/range/algorithm/adjacent_find.hpp>
+#include <boost/range/algorithm/count.hpp>
+#include <boost/range/algorithm/count_if.hpp>
+#include <boost/range/algorithm/equal.hpp>
+#include <boost/range/algorithm/for_each.hpp>
+#include <boost/range/algorithm/find.hpp>
+#include <boost/range/algorithm/find_end.hpp>
+#include <boost/range/algorithm/find_first_of.hpp>
+#include <boost/range/algorithm/find_if.hpp>
+#include <boost/range/algorithm/lexicographical_compare.hpp>
+#include <boost/range/algorithm/mismatch.hpp>
+#include <boost/range/algorithm/search.hpp>
+#include <boost/range/algorithm/search_n.hpp>
+
+// Mutating algorithms
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/range/algorithm/copy_backward.hpp>
+#include <boost/range/algorithm/fill.hpp>
+#include <boost/range/algorithm/fill_n.hpp>
+#include <boost/range/algorithm/generate.hpp>
+#include <boost/range/algorithm/inplace_merge.hpp>
+#include <boost/range/algorithm/merge.hpp>
+#include <boost/range/algorithm/nth_element.hpp>
+#include <boost/range/algorithm/partial_sort.hpp>
+#include <boost/range/algorithm/partial_sort_copy.hpp>
+#include <boost/range/algorithm/partition.hpp>
+#include <boost/range/algorithm/random_shuffle.hpp>
+#include <boost/range/algorithm/remove.hpp>
+#include <boost/range/algorithm/remove_copy.hpp>
+#include <boost/range/algorithm/remove_copy_if.hpp>
+#include <boost/range/algorithm/remove_if.hpp>
+#include <boost/range/algorithm/replace.hpp>
+#include <boost/range/algorithm/replace_copy.hpp>
+#include <boost/range/algorithm/replace_copy_if.hpp>
+#include <boost/range/algorithm/replace_if.hpp>
+#include <boost/range/algorithm/reverse.hpp>
+#include <boost/range/algorithm/reverse_copy.hpp>
+#include <boost/range/algorithm/rotate.hpp>
+#include <boost/range/algorithm/rotate_copy.hpp>
+#include <boost/range/algorithm/sort.hpp>
+#include <boost/range/algorithm/stable_partition.hpp>
+#include <boost/range/algorithm/stable_sort.hpp>
+#include <boost/range/algorithm/transform.hpp>
+#include <boost/range/algorithm/unique.hpp>
+#include <boost/range/algorithm/unique_copy.hpp>
+
+// Binary search
+#include <boost/range/algorithm/binary_search.hpp>
+#include <boost/range/algorithm/equal_range.hpp>
+#include <boost/range/algorithm/lower_bound.hpp>
+#include <boost/range/algorithm/upper_bound.hpp>
+
+// Set operations of sorted ranges
+#include <boost/range/algorithm/set_algorithm.hpp>
+
+// Heap operations
+#include <boost/range/algorithm/heap_algorithm.hpp>
+
+// Minimum and Maximum
+#include <boost/range/algorithm/max_element.hpp>
+#include <boost/range/algorithm/min_element.hpp>
+
+// Permutations
+#include <boost/range/algorithm/permutation.hpp>
+
+#endif // include guard
+
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/adjacent_find.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/adjacent_find.hpp
new file mode 100755 (executable)
index 0000000..1b88dae
--- /dev/null
@@ -0,0 +1,125 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_ADJACENT_FIND_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_ADJACENT_FIND_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function adjacent_find
+///
+/// range-based version of the adjacent_find std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template< typename ForwardRange >
+inline typename range_iterator<ForwardRange>::type
+adjacent_find(ForwardRange & rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    return std::adjacent_find(boost::begin(rng),boost::end(rng));
+}
+
+/// \overload
+template< typename ForwardRange >
+inline typename range_iterator<const ForwardRange>::type
+adjacent_find(const ForwardRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    return std::adjacent_find(boost::begin(rng),boost::end(rng));
+}
+
+/// \overload
+template< typename ForwardRange, typename BinaryPredicate >
+inline typename range_iterator<ForwardRange>::type
+adjacent_find(ForwardRange & rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+        typename range_value<ForwardRange>::type,
+        typename range_value<ForwardRange>::type>));
+    return std::adjacent_find(boost::begin(rng),boost::end(rng),pred);
+}
+
+/// \overload
+template< typename ForwardRange, typename BinaryPredicate >
+inline typename range_iterator<const ForwardRange>::type
+adjacent_find(const ForwardRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+        typename range_value<const ForwardRange>::type,
+        typename range_value<const ForwardRange>::type>));
+    return std::adjacent_find(boost::begin(rng),boost::end(rng),pred);
+}
+
+//  range_return overloads
+
+/// \overload
+template< range_return_value re, typename ForwardRange >
+inline typename range_return<ForwardRange,re>::type
+adjacent_find(ForwardRange & rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    return range_return<ForwardRange,re>::
+        pack(std::adjacent_find(boost::begin(rng),boost::end(rng)),
+             rng);
+}
+
+/// \overload
+template< range_return_value re, typename ForwardRange >
+inline typename range_return<const ForwardRange,re>::type
+adjacent_find(const ForwardRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    return range_return<const ForwardRange,re>::
+        pack(std::adjacent_find(boost::begin(rng),boost::end(rng)),
+             rng);
+}
+
+/// \overload
+template< range_return_value re, typename ForwardRange, typename BinaryPredicate >
+inline typename range_return<ForwardRange,re>::type
+adjacent_find(ForwardRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+        typename range_value<ForwardRange>::type,
+        typename range_value<ForwardRange>::type>));
+    return range_return<ForwardRange,re>::
+        pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred),
+             rng);
+}
+
+/// \overload
+template< range_return_value re, typename ForwardRange, typename BinaryPredicate >
+inline typename range_return<const ForwardRange,re>::type
+adjacent_find(const ForwardRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    return range_return<const ForwardRange,re>::
+        pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred),
+             rng);
+}
+
+    } // namespace range
+    using range::adjacent_find;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/binary_search.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/binary_search.hpp
new file mode 100755 (executable)
index 0000000..bb64ec8
--- /dev/null
@@ -0,0 +1,49 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_BINARY_SEARCH_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_BINARY_SEARCH_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function binary_search
+///
+/// range-based version of the binary_search std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class ForwardRange, class Value>
+inline bool binary_search(const ForwardRange& rng, const Value& val)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return std::binary_search(boost::begin(rng), boost::end(rng), val);
+}
+
+/// \overload
+template<class ForwardRange, class Value, class BinaryPredicate>
+inline bool binary_search(const ForwardRange& rng, const Value& val,
+                          BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return std::binary_search(boost::begin(rng), boost::end(rng), val, pred);
+}
+
+    } // namespace range
+    using range::binary_search;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/copy.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/copy.hpp
new file mode 100644 (file)
index 0000000..dc5a0c3
--- /dev/null
@@ -0,0 +1,41 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function copy
+///
+/// range-based version of the copy std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+/// \pre OutputIterator is a model of the OutputIteratorConcept
+template< class SinglePassRange, class OutputIterator >
+inline OutputIterator copy(const SinglePassRange& rng, OutputIterator out)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+    return std::copy(boost::begin(rng),boost::end(rng),out);
+}
+
+    } // namespace range
+    using range::copy;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/copy_backward.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/copy_backward.hpp
new file mode 100755 (executable)
index 0000000..52dc922
--- /dev/null
@@ -0,0 +1,43 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_COPY_BACKWARD_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_COPY_BACKWARD_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function copy_backward
+///
+/// range-based version of the copy_backwards std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+/// \pre BidirectionalTraversalWriteableIterator is a model of the BidirectionalIteratorConcept
+/// \pre BidirectionalTraversalWriteableIterator is a model of the WriteableIteratorConcept
+template< class BidirectionalRange, class BidirectionalTraversalWriteableIterator >
+inline BidirectionalTraversalWriteableIterator
+copy_backward(const BidirectionalRange& rng,
+              BidirectionalTraversalWriteableIterator out)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+    return std::copy_backward(boost::begin(rng), boost::end(rng), out);
+}
+
+    } // namespace range
+    using range::copy_backward;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/count.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/count.hpp
new file mode 100755 (executable)
index 0000000..8316ce0
--- /dev/null
@@ -0,0 +1,50 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_COUNT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_COUNT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/difference_type.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function count
+///
+/// range-based version of the count std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+template< class SinglePassRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_difference<SinglePassRange>::type
+count(SinglePassRange& rng, const Value& val)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+    return std::count(boost::begin(rng), boost::end(rng), val);
+}
+
+/// \overload
+template< class SinglePassRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_difference<SinglePassRange const>::type
+count(const SinglePassRange& rng, const Value& val)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+    return std::count(boost::begin(rng), boost::end(rng), val);
+}
+
+    } // namespace range
+    using range::count;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/count_if.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/count_if.hpp
new file mode 100755 (executable)
index 0000000..ae17b0e
--- /dev/null
@@ -0,0 +1,51 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_COUNT_IF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_COUNT_IF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/difference_type.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function count_if
+///
+/// range-based version of the count_if std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+/// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+template< class SinglePassRange, class UnaryPredicate >
+inline BOOST_DEDUCED_TYPENAME boost::range_difference<SinglePassRange>::type
+count_if(SinglePassRange& rng, UnaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+    return std::count_if(boost::begin(rng), boost::end(rng), pred);
+}
+
+/// \overload
+template< class SinglePassRange, class UnaryPredicate >
+inline BOOST_DEDUCED_TYPENAME boost::range_difference<const SinglePassRange>::type
+count_if(const SinglePassRange& rng, UnaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+    return std::count_if(boost::begin(rng), boost::end(rng), pred);
+}
+
+    } // namespace range
+    using range::count_if;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/equal.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/equal.hpp
new file mode 100755 (executable)
index 0000000..7226440
--- /dev/null
@@ -0,0 +1,188 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009.
+//  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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/range/concepts.hpp>
+#include <iterator>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        // An implementation of equality comparison that is optimized for iterator
+        // traversal categories less than RandomAccessTraversal.
+        template< class SinglePassTraversalReadableIterator1,
+                  class SinglePassTraversalReadableIterator2,
+                  class IteratorCategoryTag1,
+                  class IteratorCategoryTag2 >
+        inline bool equal_impl( SinglePassTraversalReadableIterator1 first1,
+                                SinglePassTraversalReadableIterator1 last1,
+                                SinglePassTraversalReadableIterator2 first2,
+                                SinglePassTraversalReadableIterator2 last2,
+                                IteratorCategoryTag1,
+                                IteratorCategoryTag2 )
+        {
+            do
+            {
+                // If we have reached the end of the left range then this is
+                // the end of the loop. They are equal if and only if we have
+                // simultaneously reached the end of the right range.
+                if (first1 == last1)
+                    return first2 == last2;
+
+                // If we have reached the end of the right range at this line
+                // it indicates that the right range is shorter than the left
+                // and hence the result is false.
+                if (first2 == last2)
+                    return false;
+
+                // continue looping if and only if the values are equal
+            } while(*first1++ == *first2++);
+
+            // Reaching this line in the algorithm indicates that a value
+            // inequality has been detected.
+            return false;
+        }
+
+        template< class SinglePassTraversalReadableIterator1,
+                  class SinglePassTraversalReadableIterator2,
+                  class IteratorCategoryTag1,
+                  class IteratorCategoryTag2,
+                  class BinaryPredicate >
+        inline bool equal_impl( SinglePassTraversalReadableIterator1 first1,
+                                SinglePassTraversalReadableIterator1 last1,
+                                SinglePassTraversalReadableIterator2 first2,
+                                SinglePassTraversalReadableIterator2 last2,
+                                BinaryPredicate                      pred,
+                                IteratorCategoryTag1,
+                                IteratorCategoryTag2 )
+        {
+            do
+            {
+                // If we have reached the end of the left range then this is
+                // the end of the loop. They are equal if and only if we have
+                // simultaneously reached the end of the right range.
+                if (first1 == last1)
+                    return first2 == last2;
+
+                // If we have reached the end of the right range at this line
+                // it indicates that the right range is shorter than the left
+                // and hence the result is false.
+                if (first2 == last2)
+                    return false;
+
+                // continue looping if and only if the values are equal
+            } while(pred(*first1++, *first2++));
+
+            // Reaching this line in the algorithm indicates that a value
+            // inequality has been detected.
+            return false;
+        }
+
+        // An implementation of equality comparison that is optimized for
+        // random access iterators.
+        template< class RandomAccessTraversalReadableIterator1,
+                  class RandomAccessTraversalReadableIterator2 >
+        inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1,
+                                RandomAccessTraversalReadableIterator1 last1,
+                                RandomAccessTraversalReadableIterator2 first2,
+                                RandomAccessTraversalReadableIterator2 last2,
+                                std::random_access_iterator_tag,
+                                std::random_access_iterator_tag )
+        {
+            return ((last1 - first1) == (last2 - first2))
+                && std::equal(first1, last1, first2);
+        }
+
+        template< class RandomAccessTraversalReadableIterator1,
+                  class RandomAccessTraversalReadableIterator2,
+                  class BinaryPredicate >
+        inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1,
+                                RandomAccessTraversalReadableIterator1 last1,
+                                RandomAccessTraversalReadableIterator2 first2,
+                                RandomAccessTraversalReadableIterator2 last2,
+                                BinaryPredicate                        pred )
+        {
+            return ((last1 - first1) == (last2 - first2))
+                && std::equal(first1, last1, first2, pred);
+        }
+
+        template< class SinglePassTraversalReadableIterator1,
+                  class SinglePassTraversalReadableIterator2 >
+        inline bool equal( SinglePassTraversalReadableIterator1 first1,
+                           SinglePassTraversalReadableIterator1 last1,
+                           SinglePassTraversalReadableIterator2 first2,
+                           SinglePassTraversalReadableIterator2 last2 )
+        {
+            BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1;
+            BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2;
+
+            return equal_impl(first1, last1, first2, last2, tag1, tag2);
+        }
+
+        template< class SinglePassTraversalReadableIterator1,
+                  class SinglePassTraversalReadableIterator2,
+                  class BinaryPredicate >
+        inline bool equal( SinglePassTraversalReadableIterator1 first1,
+                           SinglePassTraversalReadableIterator1 last1,
+                           SinglePassTraversalReadableIterator2 first2,
+                           SinglePassTraversalReadableIterator2 last2,
+                           BinaryPredicate                      pred )
+        {
+            BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1;
+            BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2;
+
+            return equal_impl(first1, last1, first2, last2, pred, tag1, tag2);
+        }
+
+    } // namespace range_detail
+
+    namespace range
+    {
+
+        /// \brief template function equal
+        ///
+        /// range-based version of the equal std algorithm
+        ///
+        /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+        /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+        /// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+        template< class SinglePassRange1, class SinglePassRange2 >
+        inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 )
+        {
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+            return ::boost::range_detail::equal(
+                ::boost::begin(rng1), ::boost::end(rng1),
+                ::boost::begin(rng2), ::boost::end(rng2) );
+        }
+
+        /// \overload
+        template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+        inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2,
+                           BinaryPredicate pred )
+        {
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+            return ::boost::range_detail::equal(
+                ::boost::begin(rng1), ::boost::end(rng1),
+                ::boost::begin(rng2), ::boost::end(rng2),
+                pred);
+        }
+
+    } // namespace range
+    using range::equal;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/equal_range.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/equal_range.hpp
new file mode 100755 (executable)
index 0000000..4aa4a54
--- /dev/null
@@ -0,0 +1,80 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EQUAL_RANGE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EQUAL_RANGE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function equal_range
+///
+/// range-based version of the equal_range std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre SortPredicate is a model of the BinaryPredicateConcept
+template<class ForwardRange, class Value>
+inline std::pair<
+        BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type,
+        BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type
+       >
+equal_range(ForwardRange& rng, const Value& val)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::equal_range(boost::begin(rng), boost::end(rng), val);
+}
+
+/// \overload
+template<class ForwardRange, class Value>
+inline std::pair<
+        BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type,
+        BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type
+       >
+equal_range(const ForwardRange& rng, const Value& val)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return std::equal_range(boost::begin(rng), boost::end(rng), val);
+}
+
+/// \overload
+template<class ForwardRange, class Value, class SortPredicate>
+inline std::pair<
+        BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type,
+        BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type
+       >
+equal_range(ForwardRange& rng, const Value& val, SortPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::equal_range(boost::begin(rng), boost::end(rng), val, pred);
+}
+
+/// \overload
+template<class ForwardRange, class Value, class SortPredicate>
+inline std::pair<
+        BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type,
+        BOOST_DEDUCED_TYPENAME boost::range_iterator<const ForwardRange>::type
+       >
+equal_range(const ForwardRange& rng, const Value& val, SortPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return std::equal_range(boost::begin(rng), boost::end(rng), val, pred);
+}
+
+    } // namespace range
+    using range::equal_range;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/fill.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/fill.hpp
new file mode 100755 (executable)
index 0000000..72c5d58
--- /dev/null
@@ -0,0 +1,40 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FILL_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FILL_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function fill
+///
+/// range-based version of the fill std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class Value >
+inline ForwardRange& fill(ForwardRange& rng, const Value& val)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    std::fill(boost::begin(rng), boost::end(rng), val);
+    return rng;
+}
+
+    } // namespace range
+    using range::fill;
+}
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/fill_n.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/fill_n.hpp
new file mode 100755 (executable)
index 0000000..29d7d6f
--- /dev/null
@@ -0,0 +1,43 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FILL_N_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FILL_N_HPP_INCLUDED
+
+#include <boost/assert.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function fill_n
+///
+/// range-based version of the fill_n std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre n <= std::distance(boost::begin(rng), boost::end(rng))
+template< class ForwardRange, class Size, class Value >
+inline ForwardRange& fill_n(ForwardRange& rng, Size n, const Value& val)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    BOOST_ASSERT( static_cast<Size>(std::distance(boost::begin(rng), boost::end(rng))) >= n );
+    std::fill_n(boost::begin(rng), n, val);
+    return rng;
+}
+
+    } // namespace range
+    using range::fill_n;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/find.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/find.hpp
new file mode 100755 (executable)
index 0000000..b4bf6d9
--- /dev/null
@@ -0,0 +1,54 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FIND_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FIND_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function find
+///
+/// range-based version of the find std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+template< class SinglePassRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type
+find( SinglePassRange& rng, const Value& val )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+    return std::find(boost::begin(rng), boost::end(rng), val);
+}
+
+// range_return overloads
+
+/// \overload
+template< range_return_value re, class SinglePassRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange,re>::type
+find( SinglePassRange& rng, const Value& val )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+    return range_return<SinglePassRange,re>::
+        pack(std::find(boost::begin(rng), boost::end(rng), val),
+             rng);
+}
+
+    } // namespace range
+    using range::find;
+}
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/find_end.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/find_end.hpp
new file mode 100755 (executable)
index 0000000..864d4b0
--- /dev/null
@@ -0,0 +1,87 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FIND_END_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FIND_END_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function find_end
+///
+/// range-based version of the find_end std algorithm
+///
+/// \pre ForwardRange1 is a model of the ForwardRangeConcept
+/// \pre ForwardRange2 is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template< class ForwardRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_iterator< ForwardRange1 >::type
+find_end(ForwardRange1 & rng1, const ForwardRange2& rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+    return std::find_end(boost::begin(rng1),boost::end(rng1),
+                         boost::begin(rng2),boost::end(rng2));
+}
+
+/// \overload
+template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type
+find_end(ForwardRange1 & rng1, const ForwardRange2& rng2, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+    return std::find_end(boost::begin(rng1),boost::end(rng1),
+                         boost::begin(rng2),boost::end(rng2),pred);
+}
+
+/// \overload
+template< range_return_value re, class ForwardRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
+find_end(ForwardRange1& rng1, const ForwardRange2& rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+    return range_return<ForwardRange1,re>::
+        pack(std::find_end(boost::begin(rng1), boost::end(rng1),
+                           boost::begin(rng2), boost::end(rng2)),
+             rng1);
+}
+
+/// \overload
+template< range_return_value re, class ForwardRange1, class ForwardRange2,
+          class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
+find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+    return range_return<ForwardRange1,re>::
+        pack(std::find_end(boost::begin(rng1), boost::end(rng1),
+                           boost::begin(rng2), boost::end(rng2), pred),
+             rng1);
+}
+
+    } // namespace range
+    using range::find_end;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/find_first_of.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/find_first_of.hpp
new file mode 100755 (executable)
index 0000000..f7543b7
--- /dev/null
@@ -0,0 +1,89 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FIND_FIRST_OF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FIND_FIRST_OF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function find_first_of
+///
+/// range-based version of the find_first_of std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre ForwardRange2 is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template< class SinglePassRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type
+find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+    return std::find_first_of(boost::begin(rng1),boost::end(rng1),
+                              boost::begin(rng2),boost::end(rng2));
+}
+
+/// \overload
+template< class SinglePassRange1, class ForwardRange2, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type
+find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+    return std::find_first_of(boost::begin(rng1),boost::end(rng1),
+                              boost::begin(rng2),boost::end(rng2),pred);
+}
+
+// range return overloads
+/// \overload
+template< range_return_value re, class SinglePassRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange1,re>::type
+find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+    return range_return<SinglePassRange1,re>::
+        pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
+                                boost::begin(rng2), boost::end(rng2)),
+             rng1);
+}
+
+/// \overload
+template< range_return_value re, class SinglePassRange1, class ForwardRange2,
+          class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange1,re>::type
+find_first_of(SinglePassRange1 & rng1, const ForwardRange2& rng2,
+              BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+
+    return range_return<SinglePassRange1,re>::
+        pack(std::find_first_of(boost::begin(rng1), boost::end(rng1),
+                                boost::begin(rng2), boost::end(rng2), pred),
+             rng1);
+}
+
+    } // namespace range
+    using range::find_first_of;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/find_if.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/find_if.hpp
new file mode 100755 (executable)
index 0000000..3254d8c
--- /dev/null
@@ -0,0 +1,55 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FIND_IF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FIND_IF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function find_if
+///
+/// range-based version of the find_if std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+/// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+template< class SinglePassRange, class UnaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type
+find_if( SinglePassRange& rng, UnaryPredicate pred )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+    return std::find_if(boost::begin(rng), boost::end(rng), pred);
+}
+
+// range_return overloads
+
+/// \overload
+template< range_return_value re, class SinglePassRange, class UnaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<SinglePassRange,re>::type
+find_if( SinglePassRange& rng, UnaryPredicate pred )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+    return range_return<SinglePassRange,re>::
+        pack(std::find_if(boost::begin(rng), boost::end(rng), pred),
+             rng);
+}
+
+    } // namespace range
+    using range::find_if;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/for_each.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/for_each.hpp
new file mode 100755 (executable)
index 0000000..714a06f
--- /dev/null
@@ -0,0 +1,48 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_FOR_EACH_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_FOR_EACH_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function for_each
+///
+/// range-based version of the for_each std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+/// \pre UnaryFunction is a model of the UnaryFunctionConcept
+template< class SinglePassRange, class UnaryFunction >
+inline UnaryFunction for_each(SinglePassRange & rng, UnaryFunction fun)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+    return std::for_each(boost::begin(rng),boost::end(rng),fun);
+}
+
+/// \overload
+template< class SinglePassRange, class UnaryFunction >
+inline UnaryFunction for_each(const SinglePassRange& rng, UnaryFunction fun)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+    return std::for_each(boost::begin(rng), boost::end(rng), fun);
+}
+
+    } // namespace range
+    using range::for_each;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/generate.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/generate.hpp
new file mode 100755 (executable)
index 0000000..bd63a48
--- /dev/null
@@ -0,0 +1,40 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_GENERATE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_GENERATE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+/// \brief template function generate
+///
+/// range-based version of the generate std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre Generator is a model of the UnaryFunctionConcept
+template< class ForwardRange, class Generator >
+inline ForwardRange& generate( ForwardRange& rng, Generator gen )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    std::generate(boost::begin(rng), boost::end(rng), gen);
+    return rng;
+}
+
+    } // namespace range
+    using range::generate;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/heap_algorithm.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/heap_algorithm.hpp
new file mode 100755 (executable)
index 0000000..64df3e9
--- /dev/null
@@ -0,0 +1,122 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_HEAP_ALGORITHM_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_HEAP_ALGORITHM_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function push_heap
+///
+/// range-based version of the push_heap std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre Compare is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& push_heap(RandomAccessRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::push_heap(boost::begin(rng), boost::end(rng));
+    return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class Compare>
+inline RandomAccessRange& push_heap(RandomAccessRange& rng, Compare comp_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::push_heap(boost::begin(rng), boost::end(rng), comp_pred);
+    return rng;
+}
+
+/// \brief template function pop_heap
+///
+/// range-based version of the pop_heap std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre Compare is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& pop_heap(RandomAccessRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::pop_heap(boost::begin(rng), boost::end(rng));
+    return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class Compare>
+inline RandomAccessRange& pop_heap(RandomAccessRange& rng, Compare comp_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred);
+    return rng;
+}
+
+/// \brief template function make_heap
+///
+/// range-based version of the make_heap std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre Compare is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& make_heap(RandomAccessRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::make_heap(boost::begin(rng), boost::end(rng));
+    return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class Compare>
+inline RandomAccessRange& make_heap(RandomAccessRange& rng, Compare comp_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::make_heap(boost::begin(rng), boost::end(rng), comp_pred);
+    return rng;
+}
+
+/// \brief template function sort_heap
+///
+/// range-based version of the sort_heap std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre Compare is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& sort_heap(RandomAccessRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::sort_heap(boost::begin(rng), boost::end(rng));
+    return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class Compare>
+inline RandomAccessRange& sort_heap(RandomAccessRange& rng, Compare comp_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred);
+    return rng;
+}
+
+    } // namespace range
+    using range::push_heap;
+    using range::pop_heap;
+    using range::make_heap;
+    using range::sort_heap;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/inplace_merge.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/inplace_merge.hpp
new file mode 100755 (executable)
index 0000000..dfadbaa
--- /dev/null
@@ -0,0 +1,74 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_INPLACE_MERGE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_INPLACE_MERGE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function inplace_merge
+///
+/// range-based version of the inplace_merge std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class BidirectionalRange>
+inline BidirectionalRange& inplace_merge(BidirectionalRange& rng,
+    BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type middle)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+    std::inplace_merge(boost::begin(rng), middle, boost::end(rng));
+    return rng;
+}
+
+/// \overload
+template<class BidirectionalRange>
+inline const BidirectionalRange& inplace_merge(const BidirectionalRange& rng,
+    BOOST_DEDUCED_TYPENAME boost::range_iterator<const BidirectionalRange>::type middle)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
+    std::inplace_merge(boost::begin(rng), middle, boost::end(rng));
+    return rng;
+}
+
+/// \overload
+template<class BidirectionalRange, class BinaryPredicate>
+inline BidirectionalRange& inplace_merge(BidirectionalRange& rng,
+    BOOST_DEDUCED_TYPENAME boost::range_iterator<BidirectionalRange>::type middle,
+    BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+    std::inplace_merge(boost::begin(rng), middle, boost::end(rng), pred);
+    return rng;
+}
+
+/// \overload
+template<class BidirectionalRange, class BinaryPredicate>
+inline const BidirectionalRange& inplace_merge(const BidirectionalRange& rng,
+    BOOST_DEDUCED_TYPENAME boost::range_iterator<const BidirectionalRange>::type middle,
+    BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
+    std::inplace_merge(boost::begin(rng), middle, boost::end(rng), pred);
+    return rng;
+}
+
+    } // namespace range
+    using range::inplace_merge;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/lexicographical_compare.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/lexicographical_compare.hpp
new file mode 100755 (executable)
index 0000000..c6e4bc8
--- /dev/null
@@ -0,0 +1,58 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_LEXICOGRAPHICAL_COMPARE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function lexicographic_compare
+///
+/// range-based version of the lexicographic_compare std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+template<class SinglePassRange1, class SinglePassRange2>
+inline bool lexicographical_compare(const SinglePassRange1& rng1,
+                                    const SinglePassRange2& rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::lexicographical_compare(
+        boost::begin(rng1), boost::end(rng1),
+        boost::begin(rng2), boost::end(rng2));
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+         class BinaryPredicate>
+inline bool lexicographical_compare(const SinglePassRange1& rng1,
+                                    const SinglePassRange2& rng2,
+                                    BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::lexicographical_compare(
+        boost::begin(rng1), boost::end(rng1),
+        boost::begin(rng2), boost::end(rng2), pred);
+}
+
+    } // namespace range
+    using range::lexicographical_compare;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/lower_bound.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/lower_bound.hpp
new file mode 100755 (executable)
index 0000000..5d3945e
--- /dev/null
@@ -0,0 +1,69 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_LOWER_BOUND_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_LOWER_BOUND_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function lower_bound
+///
+/// range-based version of the lower_bound std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+lower_bound( ForwardRange& rng, Value val )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::lower_bound(boost::begin(rng), boost::end(rng), val);
+}
+/// \overload
+template< class ForwardRange, class Value, class SortPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred);
+}
+/// \overload
+template< range_return_value re, class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+lower_bound( ForwardRange& rng, Value val )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return range_return<ForwardRange,re>::
+        pack(std::lower_bound(boost::begin(rng), boost::end(rng), val),
+             rng);
+}
+/// \overload
+template< range_return_value re, class ForwardRange, class Value, class SortPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+lower_bound( ForwardRange& rng, Value val, SortPredicate pred )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return range_return<ForwardRange,re>::
+        pack(std::lower_bound(boost::begin(rng), boost::end(rng), val, pred),
+             rng);
+}
+
+    } // namespace range
+    using range::lower_bound;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/max_element.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/max_element.hpp
new file mode 100755 (executable)
index 0000000..a0c1ffd
--- /dev/null
@@ -0,0 +1,115 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_MAX_ELEMENT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_MAX_ELEMENT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function max_element
+///
+/// range-based version of the max_element std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+max_element(ForwardRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::max_element(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+max_element(const ForwardRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return std::max_element(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class ForwardRange, class BinaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+max_element(ForwardRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::max_element(boost::begin(rng), boost::end(rng), pred);
+}
+
+/// \overload
+template<class ForwardRange, class BinaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+max_element(const ForwardRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return std::max_element(boost::begin(rng), boost::end(rng), pred);
+}
+
+// range_return overloads
+
+/// \overload
+template<range_return_value re, class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+max_element(ForwardRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return range_return<ForwardRange,re>::pack(
+        std::max_element(boost::begin(rng), boost::end(rng)),
+        rng);
+}
+
+/// \overload
+template<range_return_value re, class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+max_element(const ForwardRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return range_return<const ForwardRange,re>::pack(
+        std::max_element(boost::begin(rng), boost::end(rng)),
+        rng);
+}
+
+/// \overload
+template<range_return_value re, class ForwardRange, class BinaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+max_element(ForwardRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return range_return<ForwardRange,re>::pack(
+        std::max_element(boost::begin(rng), boost::end(rng), pred),
+        rng);
+}
+
+/// \overload
+template<range_return_value re, class ForwardRange, class BinaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+max_element(const ForwardRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return range_return<const ForwardRange,re>::pack(
+        std::max_element(boost::begin(rng), boost::end(rng), pred),
+        rng);
+}
+
+    } // namespace range
+    using range::max_element;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/merge.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/merge.hpp
new file mode 100755 (executable)
index 0000000..c81b8c7
--- /dev/null
@@ -0,0 +1,61 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_MERGE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_MERGE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function merge
+///
+/// range-based version of the merge std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+///
+template<class SinglePassRange1, class SinglePassRange2,
+         class OutputIterator>
+inline OutputIterator merge(const SinglePassRange1& rng1,
+                            const SinglePassRange2& rng2,
+                            OutputIterator          out)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::merge(boost::begin(rng1), boost::end(rng1),
+                      boost::begin(rng2), boost::end(rng2), out);
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+         class OutputIterator, class BinaryPredicate>
+inline OutputIterator merge(const SinglePassRange1& rng1,
+                            const SinglePassRange2& rng2,
+                            OutputIterator          out,
+                            BinaryPredicate         pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::merge(boost::begin(rng1), boost::end(rng1),
+                      boost::begin(rng2), boost::end(rng2), out, pred);
+}
+
+    } // namespace range
+    using range::merge;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/min_element.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/min_element.hpp
new file mode 100755 (executable)
index 0000000..c966b1e
--- /dev/null
@@ -0,0 +1,115 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_MIN_ELEMENT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_MIN_ELEMENT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function min_element
+///
+/// range-based version of the min_element std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+min_element(ForwardRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::min_element(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+min_element(const ForwardRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return std::min_element(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class ForwardRange, class BinaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+min_element(ForwardRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::min_element(boost::begin(rng), boost::end(rng), pred);
+}
+
+/// \overload
+template<class ForwardRange, class BinaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+min_element(const ForwardRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return std::min_element(boost::begin(rng), boost::end(rng), pred);
+}
+
+// range_return overloads
+
+/// \overload
+template<range_return_value re, class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+min_element(ForwardRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return range_return<ForwardRange,re>::pack(
+        std::min_element(boost::begin(rng), boost::end(rng)),
+        rng);
+}
+
+/// \overload
+template<range_return_value re, class ForwardRange>
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+min_element(const ForwardRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return range_return<const ForwardRange,re>::pack(
+        std::min_element(boost::begin(rng), boost::end(rng)),
+        rng);
+}
+
+/// \overload
+template<range_return_value re, class ForwardRange, class BinaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+min_element(ForwardRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return range_return<ForwardRange,re>::pack(
+        std::min_element(boost::begin(rng), boost::end(rng), pred),
+        rng);
+}
+
+/// \overload
+template<range_return_value re, class ForwardRange, class BinaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+min_element(const ForwardRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return range_return<const ForwardRange,re>::pack(
+        std::min_element(boost::begin(rng), boost::end(rng), pred),
+        rng);
+}
+
+    } // namespace range
+    using range::min_element;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/mismatch.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/mismatch.hpp
new file mode 100755 (executable)
index 0000000..2819c33
--- /dev/null
@@ -0,0 +1,195 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_MISMATCH_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_MISMATCH_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/difference_type.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        template< class SinglePassTraversalReadableIterator1,
+                  class SinglePassTraversalReadableIterator2 >
+        inline std::pair<SinglePassTraversalReadableIterator1,
+                         SinglePassTraversalReadableIterator2>
+        mismatch_impl(SinglePassTraversalReadableIterator1 first1,
+                      SinglePassTraversalReadableIterator1 last1,
+                      SinglePassTraversalReadableIterator2 first2,
+                      SinglePassTraversalReadableIterator2 last2)
+        {
+            while (first1 != last1 && first2 != last2 && *first1 == *first2)
+            {
+                ++first1;
+                ++first2;
+            }
+            return std::pair<SinglePassTraversalReadableIterator1,
+                             SinglePassTraversalReadableIterator2>(first1, first2);
+        }
+
+        template< class SinglePassTraversalReadableIterator1,
+                  class SinglePassTraversalReadableIterator2,
+                  class BinaryPredicate >
+        inline std::pair<SinglePassTraversalReadableIterator1,
+                         SinglePassTraversalReadableIterator2>
+        mismatch_impl(SinglePassTraversalReadableIterator1 first1,
+                      SinglePassTraversalReadableIterator1 last1,
+                      SinglePassTraversalReadableIterator2 first2,
+                      SinglePassTraversalReadableIterator2 last2,
+                      BinaryPredicate pred)
+        {
+            while (first1 != last1 && first2 != last2 && pred(*first1, *first2))
+            {
+                ++first1;
+                ++first2;
+            }
+            return std::pair<SinglePassTraversalReadableIterator1,
+                             SinglePassTraversalReadableIterator2>(first1, first2);
+        }
+    } // namespace range_detail
+
+    namespace range
+    {
+/// \brief template function mismatch
+///
+/// range-based version of the mismatch std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template< class SinglePassRange1, class SinglePassRange2 >
+inline std::pair<
+    BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+    BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
+mismatch(SinglePassRange1& rng1, const SinglePassRange2 & rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+    return ::boost::range_detail::mismatch_impl(
+        ::boost::begin(rng1), ::boost::end(rng1),
+        ::boost::begin(rng2), ::boost::end(rng2));
+}
+
+/// \overload
+template< class SinglePassRange1, class SinglePassRange2 >
+inline std::pair<
+    BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
+    BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
+mismatch(const SinglePassRange1& rng1, const SinglePassRange2& rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+    return ::boost::range_detail::mismatch_impl(
+        ::boost::begin(rng1), ::boost::end(rng1),
+        ::boost::begin(rng2), ::boost::end(rng2));
+}
+
+/// \overload
+template< class SinglePassRange1, class SinglePassRange2 >
+inline std::pair<
+    BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+    BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
+mismatch(SinglePassRange1& rng1, SinglePassRange2 & rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+    return ::boost::range_detail::mismatch_impl(
+        ::boost::begin(rng1), ::boost::end(rng1),
+        ::boost::begin(rng2), ::boost::end(rng2));
+}
+
+/// \overload
+template< class SinglePassRange1, class SinglePassRange2 >
+inline std::pair<
+    BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
+    BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
+mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+    return ::boost::range_detail::mismatch_impl(
+        ::boost::begin(rng1), ::boost::end(rng1),
+        ::boost::begin(rng2), ::boost::end(rng2));
+}
+
+
+/// \overload
+template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+inline std::pair<
+    BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+    BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
+mismatch(SinglePassRange1& rng1, const SinglePassRange2& rng2, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+    return ::boost::range_detail::mismatch_impl(
+        ::boost::begin(rng1), ::boost::end(rng1),
+        ::boost::begin(rng2), ::boost::end(rng2), pred);
+}
+
+/// \overload
+template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+inline std::pair<
+    BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
+    BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type >
+mismatch(const SinglePassRange1& rng1, const SinglePassRange2& rng2, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+    return ::boost::range_detail::mismatch_impl(
+        ::boost::begin(rng1), ::boost::end(rng1),
+        ::boost::begin(rng2), ::boost::end(rng2), pred);
+}
+
+/// \overload
+template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+inline std::pair<
+    BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+    BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
+mismatch(SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+    return ::boost::range_detail::mismatch_impl(
+        ::boost::begin(rng1), ::boost::end(rng1),
+        ::boost::begin(rng2), ::boost::end(rng2), pred);
+}
+
+/// \overload
+template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate >
+inline std::pair<
+    BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
+    BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type >
+mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+    return ::boost::range_detail::mismatch_impl(
+        ::boost::begin(rng1), ::boost::end(rng1),
+        ::boost::begin(rng2), ::boost::end(rng2), pred);
+}
+
+    } // namespace range
+    using range::mismatch;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/nth_element.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/nth_element.hpp
new file mode 100755 (executable)
index 0000000..a605595
--- /dev/null
@@ -0,0 +1,74 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_NTH_ELEMENT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_NTH_ELEMENT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function nth_element
+///
+/// range-based version of the nth_element std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& nth_element(RandomAccessRange& rng,
+    BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type nth)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::nth_element(boost::begin(rng), nth, boost::end(rng));
+    return rng;
+}
+
+/// \overload
+template<class RandomAccessRange>
+inline const RandomAccessRange& nth_element(const RandomAccessRange& rng,
+    BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+    std::nth_element(boost::begin(rng), nth, boost::end(rng));
+    return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class BinaryPredicate>
+inline RandomAccessRange& nth_element(RandomAccessRange& rng,
+    BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type nth,
+    BinaryPredicate sort_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::nth_element(boost::begin(rng), nth, boost::end(rng), sort_pred);
+    return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class BinaryPredicate>
+inline const RandomAccessRange& nth_element(const RandomAccessRange& rng,
+    BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type nth,
+    BinaryPredicate sort_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+    std::nth_element(boost::begin(rng), nth, boost::end(rng), sort_pred);
+    return rng;
+}
+
+    } // namespace range
+    using range::nth_element;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/partial_sort.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/partial_sort.hpp
new file mode 100755 (executable)
index 0000000..1797c55
--- /dev/null
@@ -0,0 +1,54 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_PARTIAL_SORT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_PARTIAL_SORT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function partial_sort
+///
+/// range-based version of the partial_sort std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& partial_sort(RandomAccessRange& rng,
+    BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type middle)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::partial_sort(boost::begin(rng), middle, boost::end(rng));
+    return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class BinaryPredicate>
+inline RandomAccessRange& partial_sort(RandomAccessRange& rng,
+    BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type middle,
+    BinaryPredicate sort_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::partial_sort(boost::begin(rng), middle, boost::end(rng),
+                        sort_pred);
+    return rng;
+}
+
+    } // namespace range
+    using range::partial_sort;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/partial_sort_copy.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/partial_sort_copy.hpp
new file mode 100755 (executable)
index 0000000..a2fe761
--- /dev/null
@@ -0,0 +1,58 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_PARTIAL_SORT_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_PARTIAL_SORT_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/value_type.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function partial_sort_copy
+///
+/// range-based version of the partial_sort_copy std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+/// \pre RandomAccessRange is a model of the Mutable_RandomAccessRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class SinglePassRange, class RandomAccessRange>
+inline BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type
+partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
+
+    return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1),
+        boost::begin(rng2), boost::end(rng2));
+}
+
+/// \overload
+template<class SinglePassRange, class RandomAccessRange,
+         class BinaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type
+partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2,
+    BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
+
+    return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1),
+        boost::begin(rng2), boost::end(rng2), pred);
+}
+
+    } // namespace range
+    using range::partial_sort_copy;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/partition.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/partition.hpp
new file mode 100755 (executable)
index 0000000..6404918
--- /dev/null
@@ -0,0 +1,54 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_PARTITION__HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_PARTITION__HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function partition
+///
+/// range-based version of the partition std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template<class ForwardRange, class UnaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+partition(ForwardRange& rng, UnaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::partition(boost::begin(rng),boost::end(rng),pred);
+}
+
+// range_return overloads
+
+/// \overload
+template< range_return_value re, class ForwardRange,
+          class UnaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+partition(ForwardRange& rng, UnaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return boost::range_return<ForwardRange,re>::
+        pack(std::partition(boost::begin(rng), boost::end(rng), pred), rng);
+}
+
+    } // namespace range
+    using range::partition;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/permutation.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/permutation.hpp
new file mode 100755 (executable)
index 0000000..75388cc
--- /dev/null
@@ -0,0 +1,108 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_PERMUTATION_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_PERMUTATION_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function next_permutation
+///
+/// range-based version of the next_permutation std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+/// \pre Compare is a model of the BinaryPredicateConcept
+template<class BidirectionalRange>
+inline bool next_permutation(BidirectionalRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+    return std::next_permutation(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class BidirectionalRange>
+inline bool next_permutation(const BidirectionalRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
+    return std::next_permutation(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class BidirectionalRange, class Compare>
+inline bool next_permutation(BidirectionalRange& rng, Compare comp_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+    return std::next_permutation(boost::begin(rng), boost::end(rng),
+                                 comp_pred);
+}
+
+/// \overload
+template<class BidirectionalRange, class Compare>
+inline bool next_permutation(const BidirectionalRange& rng,
+                             Compare                   comp_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
+    return std::next_permutation(boost::begin(rng), boost::end(rng),
+                                 comp_pred);
+}
+
+/// \brief template function prev_permutation
+///
+/// range-based version of the prev_permutation std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+/// \pre Compare is a model of the BinaryPredicateConcept
+template<class BidirectionalRange>
+inline bool prev_permutation(BidirectionalRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+    return std::prev_permutation(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class BidirectionalRange>
+inline bool prev_permutation(const BidirectionalRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
+    return std::prev_permutation(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class BidirectionalRange, class Compare>
+inline bool prev_permutation(BidirectionalRange& rng, Compare comp_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+    return std::prev_permutation(boost::begin(rng), boost::end(rng),
+                                 comp_pred);
+}
+
+/// \overload
+template<class BidirectionalRange, class Compare>
+inline bool prev_permutation(const BidirectionalRange& rng,
+                             Compare                   comp_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
+    return std::prev_permutation(boost::begin(rng), boost::end(rng),
+                                 comp_pred);
+}
+
+    } // namespace range
+    using range::next_permutation;
+    using range::prev_permutation;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/random_shuffle.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/random_shuffle.hpp
new file mode 100755 (executable)
index 0000000..0b17333
--- /dev/null
@@ -0,0 +1,50 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_RANDOM_SHUFFLE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_RANDOM_SHUFFLE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function random_shuffle
+///
+/// range-based version of the random_shuffle std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre Generator is a model of the UnaryFunctionConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& random_shuffle(RandomAccessRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::random_shuffle(boost::begin(rng), boost::end(rng));
+    return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class Generator>
+inline RandomAccessRange& random_shuffle(RandomAccessRange& rng, Generator& gen)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::random_shuffle(boost::begin(rng), boost::end(rng), gen);
+    return rng;
+}
+
+    } // namespace range
+    using range::random_shuffle;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/remove.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/remove.hpp
new file mode 100755 (executable)
index 0000000..638dff2
--- /dev/null
@@ -0,0 +1,54 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REMOVE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REMOVE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function remove
+///
+/// range-based version of the remove std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+remove(ForwardRange& rng, const Value& val)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::remove(boost::begin(rng),boost::end(rng),val);
+}
+
+// range_return overloads
+
+/// \overload
+template< range_return_value re, class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+remove(ForwardRange& rng, const Value& val)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return range_return<ForwardRange,re>::pack(
+        std::remove(boost::begin(rng), boost::end(rng), val),
+        rng);
+}
+
+    } // namespace range
+    using range::remove;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/remove_copy.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/remove_copy.hpp
new file mode 100755 (executable)
index 0000000..0d3d83d
--- /dev/null
@@ -0,0 +1,44 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REMOVE_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REMOVE_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function remove_copy
+///
+/// range-based version of the remove_copy std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+/// \pre OutputIterator is a model of the OutputIteratorConcept
+/// \pre Value is a model of the EqualityComparableConcept
+/// \pre Objects of type Value can be compared for equality with objects of
+/// InputIterator's value type.
+template< class SinglePassRange, class OutputIterator, class Value >
+inline OutputIterator
+remove_copy(SinglePassRange& rng, OutputIterator out_it, const Value& val)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange> ));
+    return std::remove_copy(boost::begin(rng), boost::end(rng), out_it, val);
+}
+
+    } // namespace range
+    using range::remove_copy;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/remove_copy_if.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/remove_copy_if.hpp
new file mode 100755 (executable)
index 0000000..791a38f
--- /dev/null
@@ -0,0 +1,38 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REMOVE_COPY_IF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REMOVE_COPY_IF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    /// \brief template function remove_copy_if
+    ///
+    /// range-based version of the remove_copy_if std algorithm
+    ///
+    /// \pre SinglePassRange is a model of the SinglePassRangeConcept
+    /// \pre OutputIterator is a model of the OutputIteratorConcept
+    /// \pre Predicate is a model of the PredicateConcept
+    /// \pre InputIterator's value type is convertible to Predicate's argument type
+    /// \pre out_it is not an iterator in the range rng
+    template< class SinglePassRange, class OutputIterator, class Predicate >
+    inline OutputIterator
+    remove_copy_if(SinglePassRange& rng, OutputIterator out_it, Predicate pred)
+    {
+        boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+        return std::remove_copy_if(boost::begin(rng), boost::end(rng), out_it, pred); 
+    }
+}
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/remove_if.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/remove_if.hpp
new file mode 100755 (executable)
index 0000000..349e7a4
--- /dev/null
@@ -0,0 +1,55 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REMOVE_IF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REMOVE_IF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function remove_if
+///
+/// range-based version of the remove_if std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+template< class ForwardRange, class UnaryPredicate >
+inline BOOST_DEDUCED_TYPENAME boost::range_iterator<ForwardRange>::type
+remove_if(ForwardRange& rng, UnaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::remove_if(boost::begin(rng), boost::end(rng), pred);
+}
+
+// range_return overloads
+
+/// \overload
+template< range_return_value re, class ForwardRange, class UnaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+remove_if(ForwardRange& rng, UnaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return range_return<ForwardRange,re>::pack(
+        std::remove_if(boost::begin(rng), boost::end(rng), pred),
+        rng);
+}
+
+    } // namespace range
+    using range::remove_if;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/replace.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/replace.hpp
new file mode 100755 (executable)
index 0000000..3f2d72c
--- /dev/null
@@ -0,0 +1,42 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REPLACE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REPLACE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function replace
+///
+/// range-based version of the replace std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class Value >
+inline ForwardRange&
+replace(ForwardRange& rng, const Value& what,
+        const Value& with_what)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    std::replace(boost::begin(rng), boost::end(rng), what, with_what);
+    return rng;
+}
+
+    } // namespace range
+    using range::replace;
+} // namespace boost;
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/replace_copy.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/replace_copy.hpp
new file mode 100755 (executable)
index 0000000..36c91ce
--- /dev/null
@@ -0,0 +1,42 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REPLACE_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REPLACE_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function replace_copy
+///
+/// range-based version of the replace_copy std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class OutputIterator, class Value >
+inline OutputIterator
+replace_copy(ForwardRange& rng, OutputIterator out_it, const Value& what,
+        const Value& with_what)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::replace_copy(boost::begin(rng), boost::end(rng), out_it,
+        what, with_what);
+}
+
+    } // namespace range
+    using range::replace_copy;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/replace_copy_if.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/replace_copy_if.hpp
new file mode 100755 (executable)
index 0000000..5d4bfb6
--- /dev/null
@@ -0,0 +1,46 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REPLACE_COPY_IF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REPLACE_COPY_IF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function replace_copy_if
+///
+/// range-based version of the replace_copy_if std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre Predicate is a model of the PredicateConcept
+/// \pre Value is convertible to Predicate's argument type
+/// \pre Value is Assignable
+/// \pre Value is convertible to a type in OutputIterator's set of value types.
+template< class ForwardRange, class OutputIterator, class Predicate, class Value >
+inline OutputIterator
+replace_copy_if(ForwardRange& rng, OutputIterator out_it, Predicate pred,
+        const Value& with_what)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::replace_copy_if(boost::begin(rng), boost::end(rng), out_it,
+        pred, with_what);
+}
+
+    } // namespace range
+    using range::replace_copy_if;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/replace_if.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/replace_if.hpp
new file mode 100755 (executable)
index 0000000..393a4ca
--- /dev/null
@@ -0,0 +1,43 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REPLACE_IF_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REPLACE_IF_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function replace_if
+///
+/// range-based version of the replace_if std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+template< class ForwardRange, class UnaryPredicate, class Value >
+inline ForwardRange&
+    replace_if(ForwardRange& rng, UnaryPredicate pred,
+               const Value& val)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    std::replace_if(boost::begin(rng), boost::end(rng), pred, val);
+    return rng;
+}
+
+    } // namespace range
+    using range::replace_if;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/reverse.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/reverse.hpp
new file mode 100755 (executable)
index 0000000..8741d66
--- /dev/null
@@ -0,0 +1,41 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REVERSE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REVERSE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function reverse
+///
+/// range-based version of the reverse std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+template<class BidirectionalRange>
+inline BidirectionalRange& reverse(BidirectionalRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+    std::reverse(boost::begin(rng), boost::end(rng));
+    return rng;
+}
+
+    } // namespace range
+    using range::reverse;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/reverse_copy.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/reverse_copy.hpp
new file mode 100755 (executable)
index 0000000..d86145d
--- /dev/null
@@ -0,0 +1,40 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_REVERSE_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_REVERSE_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/iterator/iterator_concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function reverse_copy
+///
+/// range-based version of the reverse_copy std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+template<class BidirectionalRange, class OutputIterator>
+inline OutputIterator reverse_copy(const BidirectionalRange& rng, OutputIterator out)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+    return std::reverse_copy(boost::begin(rng), boost::end(rng), out);
+}
+
+    } // namespace range
+    using range::reverse_copy;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/rotate.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/rotate.hpp
new file mode 100755 (executable)
index 0000000..aef6062
--- /dev/null
@@ -0,0 +1,41 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_ROTATE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_ROTATE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function rotate
+///
+/// range-based version of the rotate std algorithm
+///
+/// \pre Rng meets the requirements for a Forward range
+template<class ForwardRange>
+inline ForwardRange& rotate(ForwardRange& rng,
+    BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type middle)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    std::rotate(boost::begin(rng), middle, boost::end(rng));
+    return rng;
+}
+
+    } // namespace range
+    using range::rotate;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/rotate_copy.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/rotate_copy.hpp
new file mode 100755 (executable)
index 0000000..0409ac5
--- /dev/null
@@ -0,0 +1,44 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_ROTATE_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_ROTATE_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/iterator.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+    /// \brief template function rotate
+    ///
+    /// range-based version of the rotate std algorithm
+    ///
+    /// \pre Rng meets the requirements for a Forward range
+    template<typename ForwardRange, typename OutputIterator>
+    inline OutputIterator rotate_copy(
+        const ForwardRange&                                             rng,
+        BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type middle,
+        OutputIterator                                                  target
+        )
+    {
+        BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+        return std::rotate_copy(boost::begin(rng), middle, boost::end(rng), target);
+    }
+
+    } // namespace range
+    using range::rotate_copy;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/search.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/search.hpp
new file mode 100755 (executable)
index 0000000..28cc6e6
--- /dev/null
@@ -0,0 +1,134 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_SEARCH_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_SEARCH_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function search
+///
+/// range-based version of the search std algorithm
+///
+/// \pre ForwardRange1 is a model of the ForwardRangeConcept
+/// \pre ForwardRange2 is a model of the ForwardRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template< class ForwardRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type
+search(ForwardRange1& rng1, const ForwardRange2& rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+    return std::search(boost::begin(rng1),boost::end(rng1),
+                       boost::begin(rng2),boost::end(rng2));
+}
+
+/// \overload
+template< class ForwardRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
+search(const ForwardRange1& rng1, const ForwardRange2& rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+    return std::search(boost::begin(rng1), boost::end(rng1),
+                       boost::begin(rng2), boost::end(rng2));
+}
+
+/// \overload
+template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type
+search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+    return std::search(boost::begin(rng1),boost::end(rng1),
+                       boost::begin(rng2),boost::end(rng2),pred);
+}
+
+/// \overload
+template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
+search(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+    return std::search(boost::begin(rng1), boost::end(rng1),
+                       boost::begin(rng2), boost::end(rng2), pred);
+}
+
+// range_return overloads
+
+/// \overload
+template< range_return_value re, class ForwardRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
+search(ForwardRange1& rng1, const ForwardRange2& rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+    return range_return<ForwardRange1,re>::
+        pack(std::search(boost::begin(rng1),boost::end(rng1),
+                         boost::begin(rng2),boost::end(rng2)),
+             rng1);
+}
+
+/// \overload
+template< range_return_value re, class ForwardRange1, class ForwardRange2 >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
+search(const ForwardRange1& rng1, const ForwardRange2& rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+    return range_return<const ForwardRange1,re>::
+        pack(std::search(boost::begin(rng1),boost::end(rng1),
+                         boost::begin(rng2),boost::end(rng2)),
+             rng1);
+}
+
+/// \overload
+template< range_return_value re, class ForwardRange1, class ForwardRange2,
+          class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
+search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+    return range_return<ForwardRange1,re>::
+        pack(std::search(boost::begin(rng1),boost::end(rng1),
+                         boost::begin(rng2),boost::end(rng2),pred),
+             rng1);
+}
+
+/// \overload
+template< range_return_value re, class ForwardRange1, class ForwardRange2,
+          class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
+search(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
+    return range_return<const ForwardRange1,re>::
+        pack(std::search(boost::begin(rng1),boost::end(rng1),
+                         boost::begin(rng2),boost::end(rng2),pred),
+             rng1);
+}
+
+    } // namespace range
+    using range::search;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/search_n.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/search_n.hpp
new file mode 100755 (executable)
index 0000000..2ced140
--- /dev/null
@@ -0,0 +1,145 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_SEARCH_N_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_SEARCH_N_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <boost/range/value_type.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function search
+///
+/// range-based version of the search std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+/// \pre Integer is an integral type
+/// \pre Value is a model of the EqualityComparableConcept
+/// \pre ForwardRange's value type is a model of the EqualityComparableConcept
+/// \pre Object's of ForwardRange's value type can be compared for equality with Objects of type Value
+template< class ForwardRange, class Integer, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+search_n(ForwardRange& rng, Integer count, const Value& value)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    return std::search_n(boost::begin(rng),boost::end(rng), count, value);
+}
+
+/// \overload
+template< class ForwardRange, class Integer, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+search_n(const ForwardRange& rng, Integer count, const Value& value)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    return std::search_n(boost::begin(rng), boost::end(rng), count, value);
+}
+
+/// \overload
+template< class ForwardRange, class Integer, class Value,
+          class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+search_n(ForwardRange& rng, Integer count, const Value& value,
+         BinaryPredicate binary_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+        BOOST_DEDUCED_TYPENAME range_value<ForwardRange>::type, const Value&>));
+    return std::search_n(boost::begin(rng), boost::end(rng),
+        count, value, binary_pred);
+}
+
+/// \overload
+template< class ForwardRange, class Integer, class Value,
+          class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+search_n(const ForwardRange& rng, Integer count, const Value& value,
+         BinaryPredicate binary_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+        BOOST_DEDUCED_TYPENAME range_value<const ForwardRange>::type, const Value&>));
+    return std::search_n(boost::begin(rng), boost::end(rng),
+        count, value, binary_pred);
+}
+
+// range_return overloads
+
+/// \overload
+template< range_return_value re, class ForwardRange, class Integer,
+          class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+search_n(ForwardRange& rng, Integer count, const Value& value)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    return range_return<ForwardRange,re>::
+        pack(std::search_n(boost::begin(rng),boost::end(rng),
+                           count, value),
+             rng);
+}
+
+/// \overload
+template< range_return_value re, class ForwardRange, class Integer,
+          class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+search_n(const ForwardRange& rng, Integer count, const Value& value)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    return range_return<const ForwardRange,re>::
+        pack(std::search_n(boost::begin(rng), boost::end(rng),
+                           count, value),
+             rng);
+}
+
+/// \overload
+template< range_return_value re, class ForwardRange, class Integer,
+          class Value, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+search_n(ForwardRange& rng, Integer count, const Value& value,
+         BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+        BOOST_DEDUCED_TYPENAME range_value<ForwardRange>::type,
+        const Value&>));
+    return range_return<ForwardRange,re>::
+        pack(std::search_n(boost::begin(rng), boost::end(rng),
+                           count, value, pred),
+             rng);
+}
+
+/// \overload
+template< range_return_value re, class ForwardRange, class Integer,
+          class Value, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+search_n(const ForwardRange& rng, Integer count, const Value& value,
+         BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
+    BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
+        BOOST_DEDUCED_TYPENAME range_value<const ForwardRange>::type,
+        const Value&>));
+    return range_return<const ForwardRange,re>::
+        pack(std::search_n(boost::begin(rng), boost::end(rng),
+                           count, value, pred),
+             rng);
+}
+
+    } // namespace range
+    using range::search_n;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/set_algorithm.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/set_algorithm.hpp
new file mode 100755 (executable)
index 0000000..82ef8ec
--- /dev/null
@@ -0,0 +1,198 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_SET_ALGORITHM_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_SET_ALGORITHM_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function includes
+///
+/// range-based version of the includes std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class SinglePassRange1, class SinglePassRange2>
+inline bool includes(const SinglePassRange1& rng1,
+                     const SinglePassRange2& rng2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::includes(boost::begin(rng1),boost::end(rng1),
+                         boost::begin(rng2),boost::end(rng2));
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+         class BinaryPredicate>
+inline bool includes(const SinglePassRange1& rng1,
+                     const SinglePassRange2& rng2,
+                     BinaryPredicate         pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::includes(boost::begin(rng1), boost::end(rng1),
+                         boost::begin(rng2), boost::end(rng2), pred);
+}
+
+/// \brief template function set_union
+///
+/// range-based version of the set_union std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class SinglePassRange1, class SinglePassRange2,
+         class OutputIterator>
+inline OutputIterator set_union(const SinglePassRange1& rng1,
+                                const SinglePassRange2& rng2,
+                                OutputIterator          out)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::set_union(boost::begin(rng1), boost::end(rng1),
+                          boost::begin(rng2), boost::end(rng2), out);
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+         class OutputIterator, class BinaryPredicate>
+inline OutputIterator set_union(const SinglePassRange1& rng1,
+                                const SinglePassRange2& rng2,
+                                OutputIterator          out,
+                                BinaryPredicate         pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::set_union(boost::begin(rng1), boost::end(rng1),
+                          boost::begin(rng2), boost::end(rng2), out, pred);
+}
+
+/// \brief template function set_intersection
+///
+/// range-based version of the set_intersection std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class SinglePassRange1, class SinglePassRange2,
+         class OutputIterator>
+inline OutputIterator set_intersection(const SinglePassRange1& rng1,
+                                       const SinglePassRange2& rng2,
+                                       OutputIterator          out)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::set_intersection(boost::begin(rng1), boost::end(rng1),
+                                 boost::begin(rng2), boost::end(rng2), out);
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+         class OutputIterator, class BinaryPredicate>
+inline OutputIterator set_intersection(const SinglePassRange1& rng1,
+                                       const SinglePassRange2& rng2,
+                                       OutputIterator          out,
+                                       BinaryPredicate         pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::set_intersection(boost::begin(rng1), boost::end(rng1),
+                                 boost::begin(rng2), boost::end(rng2),
+                                 out, pred);
+}
+
+/// \brief template function set_difference
+///
+/// range-based version of the set_difference std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class SinglePassRange1, class SinglePassRange2,
+         class OutputIterator>
+inline OutputIterator set_difference(const SinglePassRange1& rng1,
+                                     const SinglePassRange2& rng2,
+                                     OutputIterator out)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::set_difference(boost::begin(rng1), boost::end(rng1),
+                               boost::begin(rng2), boost::end(rng2), out);
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+         class OutputIterator, class BinaryPredicate>
+inline OutputIterator set_difference(const SinglePassRange1& rng1,
+                                     const SinglePassRange2& rng2,
+                                     OutputIterator          out,
+                                     BinaryPredicate         pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::set_difference(
+        boost::begin(rng1), boost::end(rng1),
+        boost::begin(rng2), boost::end(rng2), out, pred);
+}
+
+/// \brief template function set_symmetric_difference
+///
+/// range-based version of the set_symmetric_difference std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class SinglePassRange1, class SinglePassRange2,
+         class OutputIterator>
+inline OutputIterator
+set_symmetric_difference(const SinglePassRange1& rng1,
+                         const SinglePassRange2& rng2,
+                         OutputIterator          out)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::set_symmetric_difference(boost::begin(rng1), boost::end(rng1),
+                                         boost::begin(rng2), boost::end(rng2), out);
+}
+
+/// \overload
+template<class SinglePassRange1, class SinglePassRange2,
+         class OutputIterator, class BinaryPredicate>
+inline OutputIterator
+set_symmetric_difference(const SinglePassRange1& rng1,
+                         const SinglePassRange2& rng2,
+                         OutputIterator          out,
+                         BinaryPredicate         pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+    return std::set_symmetric_difference(
+        boost::begin(rng1), boost::end(rng1),
+        boost::begin(rng2), boost::end(rng2), out, pred);
+}
+
+    } // namespace range
+    using range::includes;
+    using range::set_union;
+    using range::set_intersection;
+    using range::set_difference;
+    using range::set_symmetric_difference;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/sort.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/sort.hpp
new file mode 100755 (executable)
index 0000000..0c6e3b2
--- /dev/null
@@ -0,0 +1,50 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_SORT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_SORT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function sort
+///
+/// range-based version of the sort std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& sort(RandomAccessRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::sort(boost::begin(rng), boost::end(rng));
+    return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class BinaryPredicate>
+inline RandomAccessRange& sort(RandomAccessRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::sort(boost::begin(rng), boost::end(rng), pred);
+    return rng;
+}
+
+    } // namespace range
+    using range::sort;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/stable_partition.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/stable_partition.hpp
new file mode 100755 (executable)
index 0000000..24febfc
--- /dev/null
@@ -0,0 +1,73 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_STABLE_PARTITION_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_STABLE_PARTITION_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function stable_partition
+///
+/// range-based version of the stable_partition std algorithm
+///
+/// \pre BidirectionalRange is a model of the BidirectionalRangeConcept
+/// \pre UnaryPredicate is a model of the UnaryPredicateConcept
+template<class BidirectionalRange, class UnaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type
+stable_partition(BidirectionalRange& rng, UnaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+    return std::stable_partition(boost::begin(rng), boost::end(rng), pred);
+}
+
+/// \overload
+template<class BidirectionalRange, class UnaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_iterator<const BidirectionalRange>::type
+stable_partition(const BidirectionalRange& rng, UnaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
+    return std::stable_partition(boost::begin(rng),boost::end(rng),pred);
+}
+
+// range_return overloads
+template<range_return_value re, class BidirectionalRange, class UnaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_return<BidirectionalRange,re>::type
+stable_partition(BidirectionalRange& rng, UnaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<BidirectionalRange> ));
+    return range_return<BidirectionalRange,re>::pack(
+        std::stable_partition(boost::begin(rng), boost::end(rng), pred),
+        rng);
+}
+
+/// \overload
+template<range_return_value re, class BidirectionalRange, class UnaryPredicate>
+inline BOOST_DEDUCED_TYPENAME range_return<const BidirectionalRange,re>::type
+stable_partition(const BidirectionalRange& rng, UnaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalRangeConcept<const BidirectionalRange> ));
+    return range_return<const BidirectionalRange,re>::pack(
+        std::stable_partition(boost::begin(rng),boost::end(rng),pred),
+        rng);
+}
+
+    } // namespace range
+    using range::stable_partition;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/stable_sort.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/stable_sort.hpp
new file mode 100755 (executable)
index 0000000..6a27aa4
--- /dev/null
@@ -0,0 +1,50 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_STABLE_SORT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_STABLE_SORT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function stable_sort
+///
+/// range-based version of the stable_sort std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& stable_sort(RandomAccessRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::stable_sort(boost::begin(rng), boost::end(rng));
+    return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class BinaryPredicate>
+inline RandomAccessRange& stable_sort(RandomAccessRange& rng, BinaryPredicate sort_pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+    std::stable_sort(boost::begin(rng), boost::end(rng), sort_pred);
+    return rng;
+}
+
+    } // namespace range
+    using range::stable_sort;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/swap_ranges.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/swap_ranges.hpp
new file mode 100755 (executable)
index 0000000..5b8967a
--- /dev/null
@@ -0,0 +1,87 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_SWAP_RANGES_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_SWAP_RANGES_HPP_INCLUDED
+
+#include <boost/assert.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/iterator.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        template<class Iterator1, class Iterator2>
+        void swap_ranges_impl(Iterator1 it1, Iterator1 last1,
+                              Iterator2 it2, Iterator2 last2,
+                              single_pass_traversal_tag,
+                              single_pass_traversal_tag)
+        {
+            ignore_unused_variable_warning(last2);
+            for (; it1 != last1; ++it1, ++it2)
+            {
+                BOOST_ASSERT( it2 != last2 );
+                std::iter_swap(it1, it2);
+            }
+        }
+
+        template<class Iterator1, class Iterator2>
+        void swap_ranges_impl(Iterator1 it1, Iterator1 last1,
+                              Iterator2 it2, Iterator2 last2,
+                              random_access_traversal_tag,
+                              random_access_traversal_tag)
+        {
+            ignore_unused_variable_warning(last2);
+            BOOST_ASSERT( last2 - it2 >= last1 - it1 );
+            std::swap_ranges(it1, last1, it2);
+        }
+
+        template<class Iterator1, class Iterator2>
+        void swap_ranges_impl(Iterator1 first1, Iterator1 last1,
+                              Iterator2 first2, Iterator2 last2)
+        {
+            swap_ranges_impl(first1, last1, first2, last2,
+                BOOST_DEDUCED_TYPENAME iterator_traversal<Iterator1>::type(),
+                BOOST_DEDUCED_TYPENAME iterator_traversal<Iterator2>::type());
+        }
+    } // namespace range_detail
+
+    namespace range
+    {
+
+/// \brief template function swap_ranges
+///
+/// range-based version of the swap_ranges std algorithm
+///
+/// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+/// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+template< class SinglePassRange1, class SinglePassRange2 >
+inline SinglePassRange2&
+swap_ranges(SinglePassRange1& range1, SinglePassRange2& range2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange1>));
+    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange2>));
+
+    boost::range_detail::swap_ranges_impl(
+        boost::begin(range1), boost::end(range1),
+        boost::begin(range2), boost::end(range2));
+
+    return range2;
+}
+
+    } // namespace range
+    using range::swap_ranges;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/transform.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/transform.hpp
new file mode 100755 (executable)
index 0000000..28f423d
--- /dev/null
@@ -0,0 +1,97 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_TRANSFORM_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_TRANSFORM_HPP_INCLUDED
+
+#include <boost/assert.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+        /// \brief template function transform
+        ///
+        /// range-based version of the transform std algorithm
+        ///
+        /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept
+        /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept
+        /// \pre OutputIterator is a model of the OutputIteratorConcept
+        /// \pre UnaryOperation is a model of the UnaryFunctionConcept
+        /// \pre BinaryOperation is a model of the BinaryFunctionConcept
+        template< class SinglePassRange1,
+                  class OutputIterator,
+                  class UnaryOperation >
+        inline OutputIterator
+        transform(const SinglePassRange1& rng,
+                  OutputIterator          out,
+                  UnaryOperation          fun)
+        {
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+            return std::transform(boost::begin(rng),boost::end(rng),out,fun);
+        }
+
+    } // namespace range
+
+    namespace range_detail
+    {
+        template< class SinglePassTraversalReadableIterator1,
+                  class SinglePassTraversalReadableIterator2,
+                  class OutputIterator,
+                  class BinaryFunction >
+        inline OutputIterator
+        transform_impl(SinglePassTraversalReadableIterator1 first1,
+                       SinglePassTraversalReadableIterator1 last1,
+                       SinglePassTraversalReadableIterator2 first2,
+                       SinglePassTraversalReadableIterator2 last2,
+                       OutputIterator                       out,
+                       BinaryFunction                       fn)
+        {
+            for (; first1 != last1; ++first1, ++first2)
+            {
+                BOOST_ASSERT( first2 != last2 );
+                *out = fn(*first1, *first2);
+                ++out;
+            }
+            return out;
+        }
+    }
+
+    namespace range
+    {
+
+        /// \overload
+        template< class SinglePassRange1,
+                  class SinglePassRange2,
+                  class OutputIterator,
+                  class BinaryOperation >
+        inline OutputIterator
+        transform(const SinglePassRange1& rng1,
+                  const SinglePassRange2& rng2,
+                  OutputIterator          out,
+                  BinaryOperation         fun)
+        {
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+            return range_detail::transform_impl(
+                        boost::begin(rng1), boost::end(rng1),
+                        boost::begin(rng2), boost::end(rng2),
+                        out, fun);
+        }
+
+    } // namespace range
+    using range::transform;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/unique.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/unique.hpp
new file mode 100755 (executable)
index 0000000..be6eaf9
--- /dev/null
@@ -0,0 +1,107 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_UNIQUE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_UNIQUE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function unique
+///
+/// range-based version of the unique std algorithm
+///
+/// \pre Rng meets the requirements for a Forward range
+template< range_return_value re, class ForwardRange >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+unique( ForwardRange& rng )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return range_return<ForwardRange,re>::
+        pack( std::unique( boost::begin(rng),
+                           boost::end(rng)), rng );
+}
+
+/// \overload
+template< range_return_value re, class ForwardRange >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+unique( const ForwardRange& rng )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return range_return<const ForwardRange,re>::
+        pack( std::unique( boost::begin(rng),
+                           boost::end(rng)), rng );
+}
+/// \overload
+template< range_return_value re, class ForwardRange, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+unique( ForwardRange& rng, BinaryPredicate pred )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return range_return<ForwardRange,re>::
+        pack(std::unique(boost::begin(rng), boost::end(rng), pred),
+             rng);
+}
+/// \overload
+template< range_return_value re, class ForwardRange, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange,re>::type
+unique( const ForwardRange& rng, BinaryPredicate pred )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return range_return<const ForwardRange,re>::
+        pack(std::unique(boost::begin(rng), boost::end(rng), pred),
+             rng);
+}
+
+/// \overload
+template< class ForwardRange >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange, return_begin_found>::type
+unique( ForwardRange& rng )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return ::boost::range::unique<return_begin_found>(rng);
+}
+/// \overload
+template< class ForwardRange >
+inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange, return_begin_found>::type
+unique( const ForwardRange& rng )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return ::boost::range::unique<return_begin_found>(rng);
+}
+/// \overload
+template< class ForwardRange, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange, return_begin_found>::type
+unique( ForwardRange& rng, BinaryPredicate pred )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return ::boost::range::unique<return_begin_found>(rng);
+}
+/// \overload
+template< class ForwardRange, class BinaryPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type
+unique( const ForwardRange& rng, BinaryPredicate pred )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> ));
+    return ::boost::range::unique<return_begin_found>(rng, pred);
+}
+
+    } // namespace range
+    using range::unique;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/unique_copy.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/unique_copy.hpp
new file mode 100755 (executable)
index 0000000..0682d74
--- /dev/null
@@ -0,0 +1,51 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_UNIQUE_COPY_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_UNIQUE_COPY_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function unique_copy
+///
+/// range-based version of the unique_copy std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+/// \pre OutputIterator is a model of the OutputIteratorConcept
+/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
+template< class SinglePassRange, class OutputIterator >
+inline OutputIterator
+unique_copy( const SinglePassRange& rng, OutputIterator out_it )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+    return std::unique_copy(boost::begin(rng), boost::end(rng), out_it);
+}
+/// \overload
+template< class SinglePassRange, class OutputIterator, class BinaryPredicate >
+inline OutputIterator
+unique_copy( const SinglePassRange& rng, OutputIterator out_it,
+             BinaryPredicate pred )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+    return std::unique_copy(boost::begin(rng), boost::end(rng), out_it, pred);
+}
+
+    } // namespace range
+    using range::unique_copy;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm/upper_bound.hpp b/deal.II/contrib/boost/include/boost/range/algorithm/upper_bound.hpp
new file mode 100755 (executable)
index 0000000..8aa26bd
--- /dev/null
@@ -0,0 +1,71 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_UPPER_BOUND_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_UPPER_BOUND_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/detail/range_return.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function upper_bound
+///
+/// range-based version of the upper_bound std algorithm
+///
+/// \pre ForwardRange is a model of the ForwardRangeConcept
+template< class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+upper_bound( ForwardRange& rng, Value val )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::upper_bound(boost::begin(rng), boost::end(rng), val);
+}
+/// \overload
+/// \overload
+template< class ForwardRange, class Value, class SortPredicate >
+inline BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type
+upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred);
+}
+/// \overload
+template< range_return_value re, class ForwardRange, class Value >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+upper_bound( ForwardRange& rng, Value val )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return range_return<ForwardRange,re>::
+        pack(std::upper_bound(boost::begin(rng), boost::end(rng), val),
+             rng);
+}
+/// \overload
+template< range_return_value re, class ForwardRange, class Value,
+          class SortPredicate >
+inline BOOST_DEDUCED_TYPENAME range_return<ForwardRange,re>::type
+upper_bound( ForwardRange& rng, Value val, SortPredicate pred )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    return range_return<ForwardRange,re>::
+        pack(std::upper_bound(boost::begin(rng), boost::end(rng), val, pred),
+             rng);
+}
+
+    } // namespace range
+    using range::upper_bound;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm_ext.hpp b/deal.II/contrib/boost/include/boost/range/algorithm_ext.hpp
new file mode 100755 (executable)
index 0000000..783d38a
--- /dev/null
@@ -0,0 +1,28 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2007. 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)
+//
+//  Copyright Thorsten Ottosen 2006. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_HPP
+#define BOOST_RANGE_ALGORITHM_EXT_HPP
+
+#include <boost/range/algorithm_ext/copy_n.hpp>
+#include <boost/range/algorithm_ext/for_each.hpp>
+#include <boost/range/algorithm_ext/is_sorted.hpp>
+#include <boost/range/algorithm_ext/iota.hpp>
+#include <boost/range/algorithm_ext/overwrite.hpp>
+#include <boost/range/algorithm_ext/push_back.hpp>
+#include <boost/range/algorithm_ext/push_front.hpp>
+#include <boost/range/algorithm_ext/insert.hpp>
+#include <boost/range/algorithm_ext/erase.hpp>
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm_ext/copy_n.hpp b/deal.II/contrib/boost/include/boost/range/algorithm_ext/copy_n.hpp
new file mode 100755 (executable)
index 0000000..ba7ad1c
--- /dev/null
@@ -0,0 +1,53 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_COPY_N_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_COPY_N_HPP_INCLUDED
+
+#include <boost/assert.hpp>
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/distance.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range
+    {
+
+/// \brief template function copy
+///
+/// range-based version of the copy std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+/// \pre OutputIterator is a model of the OutputIteratorConcept
+/// \pre 0 <= n < distance(rng)
+template< class SinglePassRange, class Size, class OutputIterator >
+inline OutputIterator copy_n(const SinglePassRange& rng, Size n, OutputIterator out)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> ));
+    BOOST_ASSERT( n < static_cast<Size>(boost::distance(rng)) );
+    BOOST_ASSERT( n >= static_cast<Size>(0) );
+
+    BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange>::type source = boost::begin(rng);
+
+    for (Size i = 0; i < n; ++i, ++out, ++source)
+        *out = *source;
+
+    return out;
+}
+
+    } // namespace range
+    using range::copy_n;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm_ext/erase.hpp b/deal.II/contrib/boost/include/boost/range/algorithm_ext/erase.hpp
new file mode 100755 (executable)
index 0000000..107d32b
--- /dev/null
@@ -0,0 +1,61 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_ERASE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_ERASE_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/iterator_range_core.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+    namespace range
+    {
+
+template< class Container >
+inline Container& erase( Container& on,
+      iterator_range<BOOST_DEDUCED_TYPENAME Container::iterator> to_erase )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
+    on.erase( boost::begin(to_erase), boost::end(to_erase) );
+    return on;
+}
+
+template< class Container, class T >
+inline Container& remove_erase( Container& on, const T& val )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
+    on.erase(
+        std::remove(boost::begin(on), boost::end(on), val),
+        boost::end(on));
+    return on;
+}
+
+template< class Container, class Pred >
+inline Container& remove_erase_if( Container& on, Pred pred )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
+    on.erase(
+        std::remove_if(boost::begin(on), boost::end(on), pred),
+        boost::end(on));
+    return on;
+}
+
+    } // namespace range
+    using range::erase;
+    using range::remove_erase;
+    using range::remove_erase_if;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm_ext/for_each.hpp b/deal.II/contrib/boost/include/boost/range/algorithm_ext/for_each.hpp
new file mode 100755 (executable)
index 0000000..a470e2b
--- /dev/null
@@ -0,0 +1,86 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_FOR_EACH_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_FOR_EACH_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        template<class InputIterator1, class InputIterator2, class Fn2>
+        inline Fn2 for_each_impl(InputIterator1 first1, InputIterator1 last1,
+                                 InputIterator2 first2, InputIterator2 last2,
+                                 Fn2 fn)
+        {
+            for (; first1 != last1 && first2 != last2; ++first1, ++first2)
+            {
+                fn(*first1, *first2);
+            }
+            return fn;
+        }
+    }
+
+    namespace range
+    {
+        template<class SinglePassRange1, class SinglePassRange2, class Fn2>
+        inline Fn2 for_each(const SinglePassRange1& rng1, const SinglePassRange2& rng2, Fn2 fn)
+        {
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+            return ::boost::range_detail::for_each_impl(
+                ::boost::begin(rng1), ::boost::end(rng1),
+                ::boost::begin(rng2), ::boost::end(rng2), fn);
+        }
+
+        template<class SinglePassRange1, class SinglePassRange2, class Fn2>
+        inline Fn2 for_each(const SinglePassRange1& rng1, SinglePassRange2& rng2, Fn2 fn)
+        {
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+            return ::boost::range_detail::for_each_impl(
+                ::boost::begin(rng1), ::boost::end(rng1),
+                ::boost::begin(rng2), ::boost::end(rng2), fn);
+        }
+
+        template<class SinglePassRange1, class SinglePassRange2, class Fn2>
+        inline Fn2 for_each(SinglePassRange1& rng1, const SinglePassRange2& rng2, Fn2 fn)
+        {
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2> ));
+
+            return ::boost::range_detail::for_each_impl(
+                ::boost::begin(rng1), ::boost::end(rng1),
+                ::boost::begin(rng2), ::boost::end(rng2), fn);
+        }
+
+        template<class SinglePassRange1, class SinglePassRange2, class Fn2>
+        inline Fn2 for_each(SinglePassRange1& rng1, SinglePassRange2& rng2, Fn2 fn)
+        {
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+            BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+            return ::boost::range_detail::for_each_impl(
+                ::boost::begin(rng1), ::boost::end(rng1),
+                ::boost::begin(rng2), ::boost::end(rng2), fn);
+        }
+    } // namespace range
+    using range::for_each;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm_ext/insert.hpp b/deal.II/contrib/boost/include/boost/range/algorithm_ext/insert.hpp
new file mode 100755 (executable)
index 0000000..b9adfdd
--- /dev/null
@@ -0,0 +1,42 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_INSERT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_INSERT_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+    namespace range
+    {
+
+template< class Container, class Range >
+inline Container& insert( Container& on,
+                          BOOST_DEDUCED_TYPENAME Container::iterator before,
+                          const Range& from )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<Container> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Range> ));
+    BOOST_ASSERT( (void*)&on != (void*)&from &&
+                  "cannot copy from a container to itself" );
+    on.insert( before, boost::begin(from), boost::end(from) );
+    return on;
+}
+
+    } // namespace range
+    using range::insert;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm_ext/iota.hpp b/deal.II/contrib/boost/include/boost/range/algorithm_ext/iota.hpp
new file mode 100644 (file)
index 0000000..65cbc89
--- /dev/null
@@ -0,0 +1,41 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_IOTA_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_IOTA_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+
+namespace boost
+{
+    namespace range
+    {
+
+template< class ForwardRange, class Value >
+inline ForwardRange& iota( ForwardRange& rng, Value x )
+{
+    BOOST_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange> ));
+    typedef BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type iterator_t;
+
+    iterator_t last_target = ::boost::end(rng);
+    for (iterator_t target = ::boost::begin(rng); target != last_target; ++target, ++x)
+        *target = x;
+
+    return rng;
+}
+
+    } // namespace range
+    using range::iota;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm_ext/is_sorted.hpp b/deal.II/contrib/boost/include/boost/range/algorithm_ext/is_sorted.hpp
new file mode 100755 (executable)
index 0000000..69ead10
--- /dev/null
@@ -0,0 +1,71 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_IS_SORTED_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_IS_SORTED_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/value_type.hpp>
+#include <algorithm>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        template<class ForwardIterator>
+        inline bool is_sorted(ForwardIterator first, ForwardIterator last)
+        {
+            for (ForwardIterator next = first; first != last && ++next != last; ++first)
+                if (*next < *first)
+                    return false;
+            return true;
+        }
+
+        template<class ForwardIterator, class BinaryPredicate>
+        inline bool is_sorted(ForwardIterator first, ForwardIterator last, BinaryPredicate pred)
+        {
+            for (ForwardIterator next = first; first != last && ++next != last; ++first)
+                if (pred(*next, *first))
+                    return false;
+            return true;
+        }
+    }
+
+    namespace range
+    {
+
+/// \brief template function count
+///
+/// range-based version of the count std algorithm
+///
+/// \pre SinglePassRange is a model of the SinglePassRangeConcept
+template<class SinglePassRange>
+inline bool is_sorted(const SinglePassRange& rng)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<const SinglePassRange>));
+    BOOST_RANGE_CONCEPT_ASSERT((LessThanComparableConcept<BOOST_DEDUCED_TYPENAME range_value<SinglePassRange>::type>));
+    return range_detail::is_sorted(boost::begin(rng), boost::end(rng));
+}
+
+/// \overload
+template<class SinglePassRange, class BinaryPredicate>
+inline bool is_sorted(const SinglePassRange& rng, BinaryPredicate pred)
+{
+    BOOST_RANGE_CONCEPT_ASSERT((SinglePassRangeConcept<SinglePassRange>));
+    BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate, BOOST_DEDUCED_TYPENAME range_value<SinglePassRange>::type, BOOST_DEDUCED_TYPENAME range_value<SinglePassRange>::type>));
+    return range_detail::is_sorted(boost::begin(rng), boost::end(rng), pred);
+}
+
+    } // namespace range
+    using range::is_sorted;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm_ext/overwrite.hpp b/deal.II/contrib/boost/include/boost/range/algorithm_ext/overwrite.hpp
new file mode 100755 (executable)
index 0000000..d2cf4ed
--- /dev/null
@@ -0,0 +1,57 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_OVERWRITE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_OVERWRITE_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+    namespace range
+    {
+
+template< class SinglePassRange1, class SinglePassRange2 >
+inline void overwrite( const SinglePassRange1& from, SinglePassRange2& to )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+    BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type
+        i = boost::begin(from), e = boost::end(from);
+
+    BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type
+        out = boost::begin(to);
+
+#ifndef NDEBUG
+    BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type
+        last_out = boost::end(to);
+#endif
+
+    for( ; i != e; ++out, ++i )
+    {
+#ifndef NDEBUG
+        BOOST_ASSERT( out != last_out
+            && "out of bounds in boost::overwrite()" );
+#endif
+        *out = *i;
+    }
+}
+
+    } // namespace range
+    using range::overwrite;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm_ext/push_back.hpp b/deal.II/contrib/boost/include/boost/range/algorithm_ext/push_back.hpp
new file mode 100755 (executable)
index 0000000..51a7a7b
--- /dev/null
@@ -0,0 +1,40 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_PUSH_BACK_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_PUSH_BACK_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+    namespace range
+    {
+
+template< class Container, class Range >
+inline Container& push_back( Container& on, const Range& from )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Container> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const Range> ));
+    BOOST_ASSERT( (void*)&on != (void*)&from &&
+                  "cannot copy from a container to itself" );
+    on.insert( on.end(), boost::begin(from), boost::end(from) );
+    return on;
+}
+
+    } // namespace range
+    using range::push_back;
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/algorithm_ext/push_front.hpp b/deal.II/contrib/boost/include/boost/range/algorithm_ext/push_front.hpp
new file mode 100755 (executable)
index 0000000..470d793
--- /dev/null
@@ -0,0 +1,40 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009. 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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_EXT_PUSH_FRONT_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_EXT_PUSH_FRONT_HPP_INCLUDED
+
+#include <boost/range/config.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+    namespace range
+    {
+
+template< class Container, class Range >
+inline Container& push_front( Container& on, const Range& from )
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<Container> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const Range> ));
+    BOOST_ASSERT( (void*)&on != (void*)&from &&
+                  "cannot copy from a container to itself" );
+    on.insert( on.begin(), boost::begin(from), boost::end(from) );
+    return on;
+}
+
+    } // namespace range
+    using range::push_front;
+} // namespace boost
+
+#endif // include guard
index 2f04ca8f0c0a029b8e713a4f8f23deca8d8f0a82..f67ead7d30a0cf2aedb54304df0ac5d576618007 100644 (file)
@@ -25,7 +25,7 @@
 #include <boost/detail/workaround.hpp>
 
 #include <cstring>
-#ifndef BOOST_NO_CWCHAR 
+#ifndef BOOST_NO_CWCHAR
 #include <cwchar>
 #endif
 
@@ -38,41 +38,41 @@ namespace boost
             return strlen( s );
         }
 
-#ifndef BOOST_NO_CWCHAR  
+#ifndef BOOST_NO_CWCHAR
         inline std::size_t length( const wchar_t* s )
         {
             return wcslen( s );
         }
-#endif        
+#endif
 
         //
         // Remark: the compiler cannot choose between T* and T[sz]
         // overloads, so we must put the T* internal to the
         // unconstrained version.
-        // 
+        //
 
         inline bool is_char_ptr( char* )
         {
             return true;
         }
-        
+
         inline bool is_char_ptr( const char* )
         {
             return true;
         }
 
-#ifndef BOOST_NO_CWCHAR  
+#ifndef BOOST_NO_CWCHAR
         inline bool is_char_ptr( wchar_t* )
         {
             return true;
         }
-        
+
         inline bool is_char_ptr( const wchar_t* )
         {
             return true;
         }
 #endif
-        
+
         template< class T >
         inline long is_char_ptr( T /* r */ )
         {
@@ -80,30 +80,30 @@ namespace boost
         }
 
         template< class T >
-        inline iterator_range<T*> 
+        inline iterator_range<T*>
         make_range( T* const r, bool )
         {
             return iterator_range<T*>( r, r + length(r) );
         }
 
         template< class T >
-        inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<T>::type> 
+        inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<T>::type>
         make_range( T& r, long )
         {
             return boost::make_iterator_range( r );
         }
 
     }
-    
+
     template< class Range >
-    inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<Range>::type> 
+    inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<Range>::type>
     as_literal( Range& r )
     {
         return range_detail::make_range( r, range_detail::is_char_ptr(r) );
     }
 
     template< class Range >
-    inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type> 
+    inline iterator_range<BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type>
     as_literal( const Range& r )
     {
         return range_detail::make_range( r, range_detail::is_char_ptr(r) );
@@ -112,9 +112,9 @@ namespace boost
     template< class Char, std::size_t sz >
     inline iterator_range<Char*> as_literal( Char (&arr)[sz] )
     {
-        return range_detail::make_range( arr, range_detail::is_char_ptr(arr) );        
+        return range_detail::make_range( arr, range_detail::is_char_ptr(arr) );
     }
-    
+
     template< class Char, std::size_t sz >
     inline iterator_range<const Char*> as_literal( const Char (&arr)[sz] )
     {
diff --git a/deal.II/contrib/boost/include/boost/range/combine.hpp b/deal.II/contrib/boost/include/boost/range/combine.hpp
new file mode 100755 (executable)
index 0000000..8b1be00
--- /dev/null
@@ -0,0 +1,296 @@
+#ifndef BOOST_RANGE_COMBINE_HPP
+#define BOOST_RANGE_COMBINE_HPP
+
+#include <boost/iterator/zip_iterator.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/arithmetic.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        struct void_ { typedef void_ type; };
+    }
+
+    template<> struct range_iterator< ::boost::range_detail::void_ >
+    {
+       typedef ::boost::tuples::null_type type;
+    };
+
+    namespace range_detail
+    {
+        inline ::boost::tuples::null_type range_begin( ::boost::range_detail::void_& )
+        { return ::boost::tuples::null_type(); }
+
+        inline ::boost::tuples::null_type range_begin( const ::boost::range_detail::void_& )
+        { return ::boost::tuples::null_type(); }
+
+        inline ::boost::tuples::null_type range_end( ::boost::range_detail::void_& )
+        { return ::boost::tuples::null_type(); }
+
+        inline ::boost::tuples::null_type range_end( const ::boost::range_detail::void_& )
+        { return ::boost::tuples::null_type(); }
+
+        template< class T >
+        struct tuple_iter
+        {
+            typedef BOOST_DEDUCED_TYPENAME ::boost::mpl::eval_if_c<
+                ::boost::is_same<T, ::boost::range_detail::void_ >::value,
+                ::boost::mpl::identity< ::boost::tuples::null_type >,
+                ::boost::range_iterator<T>
+            >::type type;
+        };
+
+        template< class Rng1, class Rng2 >
+        struct tuple_range
+        {
+            typedef BOOST_DEDUCED_TYPENAME ::boost::mpl::eval_if_c<
+                ::boost::is_same<Rng1, ::boost::range_detail::void_ >::value,
+                ::boost::range_detail::void_,
+                ::boost::mpl::identity<Rng1>
+            >::type type;
+        };
+
+        template
+        <
+            class R1,
+            class R2,
+            class R3,
+            class R4,
+            class R5,
+            class R6
+        >
+        struct generate_tuple
+        {
+            typedef ::boost::tuples::tuple<
+                        BOOST_DEDUCED_TYPENAME tuple_iter<R1>::type,
+                        BOOST_DEDUCED_TYPENAME tuple_iter<R2>::type,
+                        BOOST_DEDUCED_TYPENAME tuple_iter<R3>::type,
+                        BOOST_DEDUCED_TYPENAME tuple_iter<R4>::type,
+                        BOOST_DEDUCED_TYPENAME tuple_iter<R5>::type,
+                        BOOST_DEDUCED_TYPENAME tuple_iter<R6>::type
+                    > type;
+
+            static type begin( R1& r1, R2& r2, R3& r3, R4& r4, R5& r5, R6& r6 )
+            {
+                return ::boost::tuples::make_tuple( ::boost::begin(r1),
+                                                    ::boost::begin(r2),
+                                                    ::boost::begin(r3),
+                                                    ::boost::begin(r4),
+                                                    ::boost::begin(r5),
+                                                    ::boost::begin(r6) );
+            }
+
+            static type end( R1& r1, R2& r2, R3& r3, R4& r4, R5& r5, R6& r6 )
+            {
+                return ::boost::tuples::make_tuple( ::boost::end(r1),
+                                                    ::boost::end(r2),
+                                                    ::boost::end(r3),
+                                                    ::boost::end(r4),
+                                                    ::boost::end(r5),
+                                                    ::boost::end(r6) );
+            }
+        };
+
+        template
+        <
+            class R1,
+            class R2 = void_,
+            class R3 = void_,
+            class R4 = void_,
+            class R5 = void_,
+            class R6 = void_
+        >
+        struct zip_rng
+            : iterator_range<
+                zip_iterator<
+                    BOOST_DEDUCED_TYPENAME generate_tuple<R1,R2,R3,R4,R5,R6>::type
+                >
+            >
+        {
+        private:
+            typedef generate_tuple<R1,R2,R3,R4,R5,R6>        generator_t;
+            typedef BOOST_DEDUCED_TYPENAME generator_t::type tuple_t;
+            typedef zip_iterator<tuple_t>                    zip_iter_t;
+            typedef iterator_range<zip_iter_t>               base_t;
+
+        public:
+            zip_rng( R1& r1, R2& r2, R3& r3, R4& r4, R5& r5, R6& r6 )
+            : base_t( zip_iter_t( generator_t::begin(r1,r2,r3,r4,r5,r6) ),
+                      zip_iter_t( generator_t::end(r1,r2,r3,r4,r5,r6) ) )
+            {
+                BOOST_ASSERT(::boost::distance(r1) <= ::boost::distance(r2));
+                BOOST_ASSERT(::boost::distance(r1) <= ::boost::distance(r3));
+                BOOST_ASSERT(::boost::distance(r1) <= ::boost::distance(r4));
+                BOOST_ASSERT(::boost::distance(r1) <= ::boost::distance(r5));
+                BOOST_ASSERT(::boost::distance(r1) <= ::boost::distance(r6));
+            }
+
+            template< class Zip, class Rng >
+            zip_rng( Zip& z, Rng& r )
+            : base_t( zip_iter_t( generator_t::begin( z, r ) ),
+                      zip_iter_t( generator_t::end( z, r ) ) )
+            {
+
+                // @todo: tuple::begin( should be overloaded for this situation
+            }
+
+            struct tuple_length : ::boost::tuples::length<tuple_t>
+            { };
+
+            template< unsigned N >
+            struct get
+            {
+                template< class Z, class R >
+                static BOOST_DEDUCED_TYPENAME ::boost::tuples::element<N,tuple_t>::type begin( Z& z, R& )
+                {
+                    return get<N>( z.begin().get_iterator_tuple() );
+                }
+
+                template< class Z, class R >
+                static BOOST_DEDUCED_TYPENAME ::boost::tuples::element<N,tuple_t>::type end( Z& z, R& r )
+                {
+                    return get<N>( z.end().get_iterator_tuple() );
+                }
+            };
+
+        };
+
+        template< class Rng1, class Rng2 >
+        struct zip_range
+            : iterator_range<
+                zip_iterator<
+                    ::boost::tuples::tuple<
+                        BOOST_DEDUCED_TYPENAME ::boost::range_iterator<Rng1>::type,
+                        BOOST_DEDUCED_TYPENAME ::boost::range_iterator<Rng2>::type
+                    >
+                >
+            >
+        {
+        private:
+            typedef zip_iterator<
+                        ::boost::tuples::tuple<
+                            BOOST_DEDUCED_TYPENAME ::boost::range_iterator<Rng1>::type,
+                            BOOST_DEDUCED_TYPENAME ::boost::range_iterator<Rng2>::type
+                        >
+                    > zip_iter_t;
+            typedef iterator_range<zip_iter_t> base_t;
+
+        public:
+            zip_range( Rng1& r1, Rng2& r2 )
+            : base_t( zip_iter_t( ::boost::tuples::make_tuple(::boost::begin(r1),
+                                                              ::boost::begin(r2)) ),
+                      zip_iter_t( ::boost::tuples::make_tuple(::boost::end(r1),
+                                                              ::boost::end(r2)) ) )
+            {
+                BOOST_ASSERT(::boost::distance(r1) <= ::boost::distance(r2));
+            }
+        };
+
+        template< class Rng1, class Rng2, class Rng3 >
+        struct zip_range3
+            : iterator_range<
+                zip_iterator<
+                    ::boost::tuples::tuple<
+                        BOOST_DEDUCED_TYPENAME ::boost::range_iterator<Rng1>::type,
+                        BOOST_DEDUCED_TYPENAME ::boost::range_iterator<Rng2>::type,
+                        BOOST_DEDUCED_TYPENAME ::boost::range_iterator<Rng3>::type
+                    >
+                >
+            >
+        {
+        private:
+            typedef zip_iterator<
+                ::boost::tuples::tuple<
+                    BOOST_DEDUCED_TYPENAME ::boost::range_iterator<Rng1>::type,
+                    BOOST_DEDUCED_TYPENAME ::boost::range_iterator<Rng2>::type,
+                    BOOST_DEDUCED_TYPENAME ::boost::range_iterator<Rng3>::type
+                >
+            > zip_iter_t;
+            typedef iterator_range<zip_iter_t> base_t;
+
+        public:
+            zip_range3( Rng1& r1, Rng2& r2, Rng3& r3 )
+            : base_t( zip_iter_t( ::boost::tuples::make_tuple(::boost::begin(r1),
+                                                              ::boost::begin(r2),
+                                                              ::boost::begin(r3)) ),
+                      zip_iter_t( ::boost::tuples::make_tuple(::boost::end(r1),
+                                                              ::boost::end(r2),
+                                                              ::boost::end(r3)) )
+                    )
+            {
+                BOOST_ASSERT(::boost::distance(r1) <= ::boost::distance(r2));
+                BOOST_ASSERT(::boost::distance(r1) <= ::boost::distance(r3));
+            }
+        };
+
+
+        struct combine_tag {};
+
+        template< class Rng >
+        inline zip_rng<Rng>
+        operator&( combine_tag, Rng& r )
+        {
+            return zip_rng<Rng>(r);
+        }
+
+        template< class Rng >
+        inline iterator_range<const Rng>
+        operator&( combine_tag, const Rng& r )
+        {
+            return iterator_range<const Rng>(r);
+        }
+
+        template
+        <
+            class R1,
+            class R2,
+            class R3,
+            class R4,
+            class R5,
+            class Rng
+        >
+        inline BOOST_DEDUCED_TYPENAME zip_rng<R1,R2,R3,R4,R5>::next
+        operator&( const zip_rng<R1,R2,R3,R4,R5>& zip,
+                   Rng& r )
+        {
+            return zip_rng<R1,R2,R3,R4,R5>::next( zip, r );
+        }
+
+    } // namespace range_detail
+
+    template< class Rng1, class Rng2 >
+    inline ::boost::range_detail::zip_range<Rng1, Rng2> combine( Rng1& r1, Rng2& r2 )
+    {
+        return ::boost::range_detail::zip_range<Rng1, Rng2>(r1, r2);
+    }
+
+    template< class Rng1, class Rng2 >
+    inline ::boost::range_detail::zip_range<const Rng1, Rng2> combine( const Rng1& r1, Rng2& r2 )
+    {
+        return ::boost::range_detail::zip_range<const Rng1, Rng2>(r1, r2);
+    }
+
+    template< class Rng1, class Rng2 >
+    inline ::boost::range_detail::zip_range<Rng1, const Rng2> combine( Rng1& r1, const Rng2& r2 )
+    {
+        return ::boost::range_detail::zip_range<Rng1, const Rng2>(r1, r2);
+    }
+
+    template< class Rng1, class Rng2 >
+    inline ::boost::range_detail::zip_range<const Rng1, const Rng2> combine( const Rng1& r1, const Rng2& r2 )
+    {
+        return ::boost::range_detail::zip_range<const Rng1, const Rng2>(r1, r2);
+    }
+
+} // namespace boost
+
+#endif
index 53a88dc3d95d7d584b8c85208ab86cd94575bdb2..8e4d2cfd573dcf02ddfdd11740b0af6a907b853f 100644 (file)
@@ -1,5 +1,10 @@
 // Boost.Range library concept checks
 //
+//  Copyright Neil Groves 2009. 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)
+//
 //  Copyright Daniel Walker 2006. Use, modification and distribution
 //  are subject to the Boost Software License, Version 1.0. (See
 //  accompanying file LICENSE_1_0.txt or copy at
@@ -15,6 +20,9 @@
 #include <boost/iterator/iterator_concepts.hpp>
 #include <boost/range/begin.hpp>
 #include <boost/range/end.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/range/detail/misc_concept.hpp>
 
 /*!
  * \file
  * concept.
  *
  * \code
- * function_requires<ForwardRangeConcept<T> >();
+ * BOOST_CONCEPT_ASSERT((ForwardRangeConcept<T>));
  * \endcode
  *
- * An additional concept check is required for the value access
- * property of the range. For example to check for a
- * ForwardReadableRange, the following code is required.
+ * A different concept check is required to ensure writeable value
+ * access. For example to check for a ForwardRange that can be written
+ * to, the following code is required.
  *
  * \code
- * function_requires<ForwardRangeConcept<T> >();
- * function_requires<
- *     ReadableIteratorConcept<
- *         typename range_iterator<T>::type
- *     >
- * >();
+ * BOOST_CONCEPT_ASSERT((WriteableForwardRangeConcept<T>));
  * \endcode
  *
  * \see http://www.boost.org/libs/range/doc/range.html for details
 
 namespace boost {
 
+    namespace range_detail {
+
+#ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+
+// List broken compiler versions here:
+    #ifdef __GNUC__
+        // GNUC 4.2 has strange issues correctly detecting compliance with the Concepts
+        // hence the least disruptive approach is to turn-off the concept checking for
+        // this version of the compiler.
+        #if __GNUC__ == 4 && __GNUC_MINOR__ == 2
+            #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0
+        #endif
+    #endif
+
+    #ifdef __BORLANDC__
+        #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0
+    #endif
+
+    #ifdef __PATHCC__
+        #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0
+    #endif
+
+// Default to using the concept asserts unless we have defined it off
+// during the search for black listed compilers.
+    #ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+        #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 1
+    #endif
+
+#endif
+
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+    #define BOOST_RANGE_CONCEPT_ASSERT( x ) BOOST_CONCEPT_ASSERT( x )
+#else
+    #define BOOST_RANGE_CONCEPT_ASSERT( x )
+#endif
+
+        // Rationale for the inclusion of redefined iterator concept
+        // classes:
+        //
+        // The Range algorithms often do not require that the iterators are
+        // Assignable, but the correct standard conformant iterators
+        // do require the iterators to be a model of the Assignable concept.
+        // Iterators that contains a functor that is not assignable therefore
+        // are not correct models of the standard iterator concepts,
+        // despite being adequate for most algorithms. An example of this
+        // use case is the combination of the boost::adaptors::filtered
+        // class with a boost::lambda::bind generated functor.
+        // Ultimately modeling the range concepts using composition
+        // with the Boost.Iterator concepts would render the library
+        // incompatible with many common Boost.Lambda expressions.
+        template<class Iterator>
+        struct IncrementableIteratorConcept : CopyConstructible<Iterator>
+        {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+            typedef BOOST_DEDUCED_TYPENAME iterator_traversal<Iterator>::type traversal_category;
+
+            BOOST_RANGE_CONCEPT_ASSERT((
+                Convertible<
+                    traversal_category,
+                    incrementable_traversal_tag
+                >));
+
+            BOOST_CONCEPT_USAGE(IncrementableIteratorConcept)
+            {
+                ++i;
+                (void)i++;
+            }
+        private:
+            Iterator i;
+#endif
+        };
+
+        template<class Iterator>
+        struct SinglePassIteratorConcept
+            : IncrementableIteratorConcept<Iterator>
+            , EqualityComparable<Iterator>
+        {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+            BOOST_RANGE_CONCEPT_ASSERT((
+                Convertible<
+                    BOOST_DEDUCED_TYPENAME SinglePassIteratorConcept::traversal_category,
+                    single_pass_traversal_tag
+                >));
+#endif
+        };
+
+        template<class Iterator>
+        struct ForwardIteratorConcept
+            : SinglePassIteratorConcept<Iterator>
+            , DefaultConstructible<Iterator>
+        {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+            typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<Iterator>::difference_type difference_type;
+
+            BOOST_MPL_ASSERT((is_integral<difference_type>));
+            BOOST_MPL_ASSERT_RELATION(std::numeric_limits<difference_type>::is_signed, ==, true);
+
+            BOOST_RANGE_CONCEPT_ASSERT((
+                Convertible<
+                    BOOST_DEDUCED_TYPENAME ForwardIteratorConcept::traversal_category,
+                    forward_traversal_tag
+                >));
+#endif
+         };
+
+         template<class Iterator>
+         struct BidirectionalIteratorConcept
+             : ForwardIteratorConcept<Iterator>
+         {
+ #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+             BOOST_RANGE_CONCEPT_ASSERT((
+                 Convertible<
+                     BOOST_DEDUCED_TYPENAME BidirectionalIteratorConcept::traversal_category,
+                     bidirectional_traversal_tag
+                 >));
+
+             BOOST_CONCEPT_USAGE(BidirectionalIteratorConcept)
+             {
+                 --i;
+                 (void)i--;
+             }
+         private:
+             Iterator i;
+ #endif
+         };
+
+         template<class Iterator>
+         struct RandomAccessIteratorConcept
+             : BidirectionalIteratorConcept<Iterator>
+         {
+ #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+             BOOST_RANGE_CONCEPT_ASSERT((
+                 Convertible<
+                     BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::traversal_category,
+                     random_access_traversal_tag
+                 >));
+
+             BOOST_CONCEPT_USAGE(RandomAccessIteratorConcept)
+             {
+                 i += n;
+                 i = i + n;
+                 i = n + i;
+                 i -= n;
+                 i = i - n;
+                 n = i - j;
+             }
+         private:
+             BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::difference_type n;
+             Iterator i;
+             Iterator j;
+ #endif
+         };
+
+    } // namespace range_detail
+
     //! Check if a type T models the SinglePassRange range concept.
-    template<typename T>
-    struct SinglePassRangeConcept 
+    template<class T>
+    struct SinglePassRangeConcept
     {
-        typedef typename range_iterator<T const>::type  range_const_iterator;
-        typedef typename range_iterator<T>::type        range_iterator;
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+         typedef BOOST_DEDUCED_TYPENAME range_iterator<T const>::type  const_iterator;
+         typedef BOOST_DEDUCED_TYPENAME range_iterator<T>::type        iterator;
 
-        void constraints()
-        {
-            function_requires<
-                boost_concepts::SinglePassIteratorConcept<
-                    range_iterator
-                >
-            >();
-            i = boost::begin(a);
-            i = boost::end(a);
-            const_constraints(a);
+         BOOST_RANGE_CONCEPT_ASSERT((range_detail::SinglePassIteratorConcept<iterator>));
+         BOOST_RANGE_CONCEPT_ASSERT((range_detail::SinglePassIteratorConcept<const_iterator>));
+
+         BOOST_CONCEPT_USAGE(SinglePassRangeConcept)
+         {
+            // This has been modified from assigning to this->i
+            // (where i was a member variable) to improve
+            // compatibility with Boost.Lambda
+            iterator i1 = boost::begin(*m_range);
+            iterator i2 = boost::end(*m_range);
+
+            ignore_unused_variable_warning(i1);
+            ignore_unused_variable_warning(i2);
+
+            const_constraints(*m_range);
         }
-        
-        void const_constraints(const T& a)
+
+    private:
+        void const_constraints(const T& const_range)
         {
-            ci = boost::begin(a);
-            ci = boost::end(a);
+            const_iterator ci1 = boost::begin(const_range);
+            const_iterator ci2 = boost::end(const_range);
+
+            ignore_unused_variable_warning(ci1);
+            ignore_unused_variable_warning(ci2);
         }
-        T a;
-        range_iterator i;
-        range_const_iterator ci;
+
+       // Rationale:
+       // The type of m_range is T* rather than T because it allows
+       // T to be an abstract class. The other obvious alternative of
+       // T& produces a warning on some compilers.
+       T* m_range;
+#endif
     };
 
     //! Check if a type T models the ForwardRange range concept.
-    template<typename T>
-    struct ForwardRangeConcept 
+    template<class T>
+    struct ForwardRangeConcept : SinglePassRangeConcept<T>
+    {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+        BOOST_RANGE_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept<BOOST_DEDUCED_TYPENAME ForwardRangeConcept::iterator>));
+        BOOST_RANGE_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept<BOOST_DEDUCED_TYPENAME ForwardRangeConcept::const_iterator>));
+#endif
+    };
+
+    template<class Range>
+    struct WriteableRangeConcept
     {
-        void constraints()
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+        typedef BOOST_DEDUCED_TYPENAME range_iterator<Range>::type iterator;
+
+        BOOST_CONCEPT_USAGE(WriteableRangeConcept)
         {
-            function_requires<
-                SinglePassRangeConcept<T>
-            >();        
-            function_requires<
-                boost_concepts::ForwardTraversalConcept<
-                    typename range_iterator<T>::type
-                >
-            >();
+            *i = v;
         }
+    private:
+        iterator i;
+        BOOST_DEDUCED_TYPENAME range_value<Range>::type v;
+#endif
+    };
+
+    //! Check if a type T models the WriteableForwardRange range concept.
+    template<class T>
+    struct WriteableForwardRangeConcept
+        : ForwardRangeConcept<T>
+        , WriteableRangeConcept<T>
+    {
     };
 
     //! Check if a type T models the BidirectionalRange range concept.
-    template<typename T>
-    struct BidirectionalRangeConcept 
+    template<class T>
+    struct BidirectionalRangeConcept : ForwardRangeConcept<T>
+    {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+        BOOST_RANGE_CONCEPT_ASSERT((BidirectionalIteratorConcept<BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::iterator>));
+        BOOST_RANGE_CONCEPT_ASSERT((BidirectionalIteratorConcept<BOOST_DEDUCED_TYPENAME BidirectionalRangeConcept::const_iterator>));
+#endif
+    };
+
+    //! Check if a type T models the WriteableBidirectionalRange range concept.
+    template<class T>
+    struct WriteableBidirectionalRangeConcept
+        : BidirectionalRangeConcept<T>
+        , WriteableRangeConcept<T>
     {
-        void constraints()
-        {
-            function_requires<
-                    ForwardRangeConcept<T>
-            >();        
-            function_requires<
-                boost_concepts::BidirectionalTraversalConcept<
-                    typename range_iterator<T>::type
-                >
-            >();
-        }
     };
 
     //! Check if a type T models the RandomAccessRange range concept.
-    template<typename T>
-    struct RandomAccessRangeConcept 
+    template<class T>
+    struct RandomAccessRangeConcept : BidirectionalRangeConcept<T>
+    {
+#if BOOST_RANGE_ENABLE_CONCEPT_ASSERT
+        BOOST_RANGE_CONCEPT_ASSERT((RandomAccessIteratorConcept<BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::iterator>));
+        BOOST_RANGE_CONCEPT_ASSERT((RandomAccessIteratorConcept<BOOST_DEDUCED_TYPENAME RandomAccessRangeConcept::const_iterator>));
+#endif
+    };
+
+    //! Check if a type T models the WriteableRandomAccessRange range concept.
+    template<class T>
+    struct WriteableRandomAccessRangeConcept
+        : RandomAccessRangeConcept<T>
+        , WriteableRangeConcept<T>
     {
-        void constraints()
-        {
-            function_requires<
-                BidirectionalRangeConcept<T>
-            >();        
-            function_requires<
-                boost_concepts::RandomAccessTraversalConcept<
-                    typename range_iterator<T>::type
-                >
-            >();
-         }
     };
 
 } // namespace boost
index 195f9d4e7a44d9385eb250fa45e0e6cd6583a78e..875320fb0075d47dda587fad79fd2103e7530831 100644 (file)
@@ -21,6 +21,7 @@
 #include <boost/range/detail/const_iterator.hpp>
 #else
 
+#include <boost/range/detail/extract_optional_type.hpp>
 #include <boost/type_traits/remove_const.hpp>
 #include <cstddef>
 #include <utility>
@@ -31,11 +32,13 @@ namespace boost
     // default
     //////////////////////////////////////////////////////////////////////////
     
+    namespace range_detail {
+        BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator )
+    }
+
     template< typename C >
-    struct range_const_iterator
-    {
-        typedef BOOST_DEDUCED_TYPENAME C::const_iterator type;
-    };
+    struct range_const_iterator : range_detail::extract_const_iterator<C>
+    {};
     
     //////////////////////////////////////////////////////////////////////////
     // pair
diff --git a/deal.II/contrib/boost/include/boost/range/counting_range.hpp b/deal.II/contrib/boost/include/boost/range/counting_range.hpp
new file mode 100755 (executable)
index 0000000..bf22f7c
--- /dev/null
@@ -0,0 +1,69 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2008. Use, modification and
+// distribution is subject to the Boost Software Licence, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+//
+// For more information, see http://www.boost.org/libs/range
+//
+
+#ifndef BOOST_RANGE_COUNTING_RANGE_HPP_INCLUDED
+#define BOOST_RANGE_COUNTING_RANGE_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#if BOOST_MSVC >= 1400
+#pragma warning(push)
+#pragma warning(disable : 4244)
+#endif
+
+#include <boost/range/iterator_range_core.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/iterator/counting_iterator.hpp>
+#include <boost/utility.hpp>
+
+namespace boost
+{
+
+    template<class Value>
+    inline iterator_range<counting_iterator<Value> >
+    counting_range(Value first, Value last)
+    {
+        typedef counting_iterator<Value> counting_iterator_t;
+        typedef iterator_range<counting_iterator_t> result_t;
+        return result_t(counting_iterator_t(first),
+                        counting_iterator_t(last));
+    }
+
+    template<class Range>
+    inline iterator_range<counting_iterator<BOOST_DEDUCED_TYPENAME range_value<const Range>::type> >
+    counting_range(const Range& rng)
+    {
+        typedef counting_iterator<BOOST_DEDUCED_TYPENAME range_value<const Range>::type> counting_iterator_t;
+        typedef iterator_range<counting_iterator_t> result_t;
+        return boost::empty(rng)
+            ? result_t()
+            : result_t(
+                counting_iterator_t(*boost::begin(rng)),
+                counting_iterator_t(*boost::prior(boost::end(rng))));
+    }
+
+    template<class Range>
+    inline iterator_range<counting_iterator<BOOST_DEDUCED_TYPENAME range_value<Range>::type> >
+    counting_range(Range& rng)
+    {
+        typedef counting_iterator<BOOST_DEDUCED_TYPENAME range_value<Range>::type> counting_iterator_t;
+        typedef iterator_range<counting_iterator_t> result_t;
+        return boost::empty(rng)
+            ? result_t()
+            : result_t(
+                counting_iterator_t(*boost::begin(rng)),
+                counting_iterator_t(*boost::prior(boost::end(rng))));
+    }
+} // namespace boost
+
+#if BOOST_MSVC >= 1400
+#pragma warning(pop)
+#endif
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/detail/demote_iterator_traversal_tag.hpp b/deal.II/contrib/boost/include/boost/range/detail/demote_iterator_traversal_tag.hpp
new file mode 100755 (executable)
index 0000000..5d77678
--- /dev/null
@@ -0,0 +1,79 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_DETAIL_DEMOTE_ITERATOR_TRAVERSAL_TAG_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_DEMOTE_ITERATOR_TRAVERSAL_TAG_HPP_INCLUDED
+
+#include <boost/iterator/iterator_categories.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+
+template<class IteratorTraversalTag1, class IteratorTraversalTag2>
+struct demote_iterator_traversal_tag
+{
+};
+
+#define BOOST_DEMOTE_TRAVERSAL_TAG( Tag1, Tag2, ResultTag ) \
+template<> struct demote_iterator_traversal_tag< Tag1 , Tag2 > \
+{ \
+    typedef ResultTag type; \
+};
+
+BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, no_traversal_tag,            no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, incrementable_traversal_tag, no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, single_pass_traversal_tag,   no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, forward_traversal_tag,       no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, bidirectional_traversal_tag, no_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( no_traversal_tag, random_access_traversal_tag, no_traversal_tag )
+
+BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, no_traversal_tag,            no_traversal_tag            )
+BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, single_pass_traversal_tag,   incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, forward_traversal_tag,       incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, bidirectional_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( incrementable_traversal_tag, random_access_traversal_tag, incrementable_traversal_tag )
+
+BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, no_traversal_tag,            no_traversal_tag            )
+BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, single_pass_traversal_tag,   single_pass_traversal_tag   )
+BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, forward_traversal_tag,       single_pass_traversal_tag   )
+BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, bidirectional_traversal_tag, single_pass_traversal_tag   )
+BOOST_DEMOTE_TRAVERSAL_TAG( single_pass_traversal_tag, random_access_traversal_tag, single_pass_traversal_tag   )
+
+BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, no_traversal_tag,            no_traversal_tag            )
+BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, single_pass_traversal_tag,   single_pass_traversal_tag   )
+BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, forward_traversal_tag,       forward_traversal_tag       )
+BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, bidirectional_traversal_tag, forward_traversal_tag       )
+BOOST_DEMOTE_TRAVERSAL_TAG( forward_traversal_tag, random_access_traversal_tag, forward_traversal_tag       )
+
+BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, no_traversal_tag,            no_traversal_tag            )
+BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, single_pass_traversal_tag,   single_pass_traversal_tag   )
+BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, forward_traversal_tag,       forward_traversal_tag       )
+BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, bidirectional_traversal_tag, bidirectional_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( bidirectional_traversal_tag, random_access_traversal_tag, bidirectional_traversal_tag )
+
+BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, no_traversal_tag,            no_traversal_tag            )
+BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, incrementable_traversal_tag, incrementable_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, single_pass_traversal_tag,   single_pass_traversal_tag   )
+BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, forward_traversal_tag,       forward_traversal_tag       )
+BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, bidirectional_traversal_tag, bidirectional_traversal_tag )
+BOOST_DEMOTE_TRAVERSAL_TAG( random_access_traversal_tag, random_access_traversal_tag, random_access_traversal_tag )
+
+#undef BOOST_DEMOTE_TRAVERSAL_TAG
+
+    } // namespace range_detail
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/detail/extract_optional_type.hpp b/deal.II/contrib/boost/include/boost/range/detail/extract_optional_type.hpp
new file mode 100755 (executable)
index 0000000..8292e34
--- /dev/null
@@ -0,0 +1,52 @@
+// Boost.Range library
+//
+//  Copyright Arno Schoedl & Neil Groves 2009.
+//  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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_NO_PARTIAL_TEMPLATE_SPECIALIZATION
+
+#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef )                         \
+    template< typename C >                                                     \
+    struct extract_ ## a_typedef                                               \
+    {                                                                          \
+        typedef BOOST_DEDUCED_TYPENAME C::a_typedef type;                      \
+    };
+
+#else
+
+namespace boost {
+    namespace range_detail {
+        template< typename T > struct exists { typedef void type; };
+    }
+}
+
+// Defines extract_some_typedef<T> which exposes T::some_typedef as
+// extract_some_typedef<T>::type if T::some_typedef exists. Otherwise
+// extract_some_typedef<T> is empty.
+#define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef )                         \
+    template< typename C, typename Enable=void >                               \
+    struct extract_ ## a_typedef                                               \
+    {};                                                                        \
+    template< typename C >                                                     \
+    struct extract_ ## a_typedef< C                                            \
+    , BOOST_DEDUCED_TYPENAME boost::range_detail::exists< BOOST_DEDUCED_TYPENAME C::a_typedef >::type \
+    > {                                                                        \
+        typedef BOOST_DEDUCED_TYPENAME C::a_typedef type;                      \
+    };
+
+#endif
+
+#endif // include guard
index ca12fa4d1083c5fc768096e4d7023f524d01b63e..1f7d163edc9a13d2ee887b480767e3a0d1aab24d 100644 (file)
 #include <wchar.h>
 #endif
 
-namespace boost 
+namespace boost
 {
     namespace range_detail
     {
         template <typename T>
         inline void boost_range_silence_warning( const T& ) { }
-        
+
         /////////////////////////////////////////////////////////////////////
         // end() help
         /////////////////////////////////////////////////////////////////////
@@ -36,7 +36,7 @@ namespace boost
         {
             return s + strlen( s );
         }
-        
+
 #ifndef BOOST_NO_CWCHAR
         inline const wchar_t* str_end( const wchar_t* s, const wchar_t* )
         {
@@ -51,7 +51,7 @@ namespace boost
                 ;
             return s;
         }
-#endif         
+#endif
 
         template< class Char >
         inline Char* str_end( Char* s )
@@ -64,7 +64,7 @@ namespace boost
         {
             return boost_range_array + sz;
         }
-        
+
         template< class T, std::size_t sz >
         inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] )
         {
@@ -74,7 +74,7 @@ namespace boost
         /////////////////////////////////////////////////////////////////////
         // size() help
         /////////////////////////////////////////////////////////////////////
-        
+
         template< class Char >
         inline std::size_t str_size( const Char* const& s )
         {
@@ -96,7 +96,7 @@ namespace boost
         }
 
     } // namespace 'range_detail'
-    
+
 } // namespace 'boost'
 
 
diff --git a/deal.II/contrib/boost/include/boost/range/detail/join_iterator.hpp b/deal.II/contrib/boost/include/boost/range/detail/join_iterator.hpp
new file mode 100644 (file)
index 0000000..792f834
--- /dev/null
@@ -0,0 +1,357 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_DETAIL_JOIN_ITERATOR_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_JOIN_ITERATOR_HPP_INCLUDED
+
+#include <iterator>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/intrusive_ptr.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/empty.hpp>
+#include <boost/range/detail/demote_iterator_traversal_tag.hpp>
+#include <boost/range/value_type.hpp>
+#include <boost/utility.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+
+template<typename Iterator1, typename Iterator2>
+struct join_iterator_link
+{
+private:
+    class reference_count_t
+    {
+    public:
+        reference_count_t() : m_count(0u) {}
+        reference_count_t(const reference_count_t&) : m_count(0u) {}
+        reference_count_t& operator=(const reference_count_t&) { return *this; }
+
+        void increment() { ++m_count; }
+        bool decrement() { return --m_count ? false : true; }
+
+    private:
+        unsigned int m_count;
+    };
+
+public:
+    join_iterator_link(Iterator1 last1, Iterator2 first2)
+        :    last1(last1)
+        ,    first2(first2)
+    {
+    }
+
+    void add_reference() const
+    {
+        count.increment();
+    }
+
+    bool release_reference() const
+    {
+        return count.decrement();
+    }
+
+    Iterator1 last1;
+    Iterator2 first2;
+
+private:
+    join_iterator_link() /* = delete */ ;
+
+    mutable reference_count_t count;
+};
+
+} // range_detail
+
+template<typename Iterator1, typename Iterator2>
+inline void intrusive_ptr_add_ref(const range_detail::join_iterator_link<Iterator1,Iterator2>* p)
+{
+    p->add_reference();
+}
+
+template<typename Iterator1, typename Iterator2>
+inline void intrusive_ptr_release(const range_detail::join_iterator_link<Iterator1,Iterator2>* p)
+{
+    if (p->release_reference())
+        delete p;
+}
+
+namespace range_detail
+{
+
+class join_iterator_begin_tag {};
+class join_iterator_end_tag {};
+
+template<typename Iterator1
+       , typename Iterator2
+       , typename Reference
+>
+class join_iterator_union
+{
+public:
+    typedef Iterator1 iterator1_t;
+    typedef Iterator2 iterator2_t;
+
+    join_iterator_union() {}
+    join_iterator_union(unsigned int /*selected*/, const iterator1_t& it1, const iterator2_t& it2) : m_it1(it1), m_it2(it2) {}
+
+    iterator1_t& it1() { return m_it1; }
+    const iterator1_t& it1() const { return m_it1; }
+
+    iterator2_t& it2() { return m_it2; }
+    const iterator2_t& it2() const { return m_it2; }
+
+    Reference dereference(unsigned int selected) const
+    {
+        return selected ? *m_it2 : *m_it1;
+    }
+
+    bool equal(const join_iterator_union& other, unsigned int selected) const
+    {
+        return selected
+            ? m_it2 == other.m_it2
+            : m_it1 == other.m_it1;
+    }
+
+private:
+    iterator1_t m_it1;
+    iterator2_t m_it2;
+};
+
+template<class Iterator, class Reference>
+class join_iterator_union<Iterator, Iterator, Reference>
+{
+public:
+    typedef Iterator iterator1_t;
+    typedef Iterator iterator2_t;
+
+    join_iterator_union() {}
+
+    join_iterator_union(unsigned int selected, const iterator1_t& it1, const iterator2_t& it2)
+        : m_it(selected ? it2 : it1)
+    {
+    }
+
+    iterator1_t& it1() { return m_it; }
+    const iterator1_t& it1() const { return m_it; }
+
+    iterator2_t& it2() { return m_it; }
+    const iterator2_t& it2() const { return m_it; }
+
+    Reference dereference(unsigned int) const
+    {
+        return *m_it;
+    }
+
+    bool equal(const join_iterator_union& other, unsigned int selected) const
+    {
+        return m_it == other.m_it;
+    }
+
+private:
+    iterator1_t m_it;
+};
+
+template<typename Iterator1
+       , typename Iterator2
+       , typename ValueType = typename iterator_value<Iterator1>::type
+       , typename Reference = typename iterator_reference<Iterator1>::type
+       , typename Traversal = typename demote_iterator_traversal_tag<
+                                  typename iterator_traversal<Iterator1>::type
+                                , typename iterator_traversal<Iterator2>::type>::type
+>
+class join_iterator
+    : public iterator_facade<join_iterator<Iterator1,Iterator2,ValueType,Reference,Traversal>, ValueType, Traversal, Reference>
+{
+    typedef join_iterator_link<Iterator1, Iterator2> link_t;
+    typedef join_iterator_union<Iterator1, Iterator2, Reference> iterator_union;
+public:
+    typedef Iterator1 iterator1_t;
+    typedef Iterator2 iterator2_t;
+
+    join_iterator() : m_section(0u) {}
+
+    join_iterator(unsigned int section, Iterator1 current1, Iterator1 last1, Iterator2 first2, Iterator2 current2)
+        : m_section(section)
+        , m_it(section, current1, current2)
+        , m_link(new link_t(last1, first2))
+        {
+        }
+
+    template<typename Range1, typename Range2>
+    join_iterator(Range1& r1, Range2& r2, join_iterator_begin_tag)
+        : m_section(boost::empty(r1) ? 1u : 0u)
+        , m_it(boost::empty(r1) ? 1u : 0u, boost::begin(r1), boost::begin(r2))
+        , m_link(new link_t(boost::end(r1), boost::begin(r2)))
+    {
+    }
+
+    template<typename Range1, typename Range2>
+    join_iterator(const Range1& r1, const Range2& r2, join_iterator_begin_tag)
+        : m_section(boost::empty(r1) ? 1u : 0u)
+        , m_it(boost::empty(r1) ? 1u : 0u, boost::const_begin(r1), boost::const_begin(r2))
+        , m_link(new link_t(boost::const_end(r1), boost::const_begin(r2)))
+    {
+    }
+
+    template<typename Range1, typename Range2>
+    join_iterator(Range1& r1, Range2& r2, join_iterator_end_tag)
+        : m_section(1u)
+        , m_it(1u, boost::end(r1), boost::end(r2))
+        , m_link(new link_t(boost::end(r1), boost::begin(r2)))
+    {
+    }
+
+    template<typename Range1, typename Range2>
+    join_iterator(const Range1& r1, const Range2& r2, join_iterator_end_tag)
+        : m_section(1u)
+        , m_it(1u, boost::const_end(r1), boost::const_end(r2))
+        , m_link(new link_t(boost::const_end(r1), boost::const_begin(r2)))
+    {
+    }
+
+private:
+    void increment()
+    {
+        if (m_section)
+            ++m_it.it2();
+        else
+        {
+            ++m_it.it1();
+            if (m_it.it1() == m_link->last1)
+            {
+                m_it.it2() = m_link->first2;
+                m_section = 1u;
+            }
+        }
+    }
+
+    void decrement()
+    {
+        if (m_section)
+        {
+            if (m_it.it2() == m_link->first2)
+            {
+                m_it.it1() = boost::prior(m_link->last1);
+                m_section = 0u;
+            }
+            else
+                --m_it.it2();
+        }
+        else
+            --m_it.it1();
+    }
+
+    typename join_iterator::reference dereference() const
+    {
+        return m_it.dereference(m_section);
+    }
+
+    bool equal(const join_iterator& other) const
+    {
+        return m_section == other.m_section
+            && m_it.equal(other.m_it, m_section);
+    }
+
+    void advance(typename join_iterator::difference_type offset)
+    {
+        if (m_section)
+            advance_from_range2(offset);
+        else
+            advance_from_range1(offset);
+    }
+
+    typename join_iterator::difference_type distance_to(const join_iterator& other) const
+    {
+        typename join_iterator::difference_type result;
+        if (m_section)
+        {
+            if (other.m_section)
+                result = other.m_it.it2() - m_it.it2();
+            else
+            {
+                result = (m_link->first2 - m_it.it2())
+                       + (other.m_it.it1() - m_link->last1);
+
+                BOOST_ASSERT( result <= 0 );
+            }
+        }
+        else
+        {
+            if (other.m_section)
+            {
+                result = (m_link->last1 - m_it.it1())
+                       + (other.m_it.it2() - m_link->first2);
+            }
+            else
+                result = other.m_it.it1() - m_it.it1();
+        }
+        return result;
+    }
+
+    void advance_from_range2(typename join_iterator::difference_type offset)
+    {
+        typedef typename join_iterator::difference_type difference_t;
+        BOOST_ASSERT( m_section == 1u );
+        if (offset < 0)
+        {
+            difference_t r2_dist = m_link->first2 - m_it.it2();
+            BOOST_ASSERT( r2_dist <= 0 );
+            if (offset >= r2_dist)
+                std::advance(m_it.it2(), offset);
+            else
+            {
+                difference_t r1_dist = offset - r2_dist;
+                BOOST_ASSERT( r1_dist <= 0 );
+                m_it.it1() = m_link->last1 + r1_dist;
+                m_section = 0u;
+            }
+        }
+        else
+            std::advance(m_it.it2(), offset);
+    }
+
+    void advance_from_range1(typename join_iterator::difference_type offset)
+    {
+        typedef typename join_iterator::difference_type difference_t;
+        BOOST_ASSERT( m_section == 0u );
+        if (offset > 0)
+        {
+            difference_t r1_dist = m_link->last1 - m_it.it1();
+            BOOST_ASSERT( r1_dist >= 0 );
+            if (offset < r1_dist)
+                std::advance(m_it.it1(), offset);
+            else
+            {
+                difference_t r2_dist = offset - r1_dist;
+                BOOST_ASSERT( r2_dist >= 0 );
+                m_it.it2() = m_link->first2 + r2_dist;
+                m_section = 1u;
+            }
+        }
+        else
+            std::advance(m_it.it1(), offset);
+    }
+
+    unsigned int m_section;
+    iterator_union m_it;
+    intrusive_ptr<const link_t> m_link;
+
+    friend class ::boost::iterator_core_access;
+};
+
+    } // namespace range_detail
+
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/detail/misc_concept.hpp b/deal.II/contrib/boost/include/boost/range/detail/misc_concept.hpp
new file mode 100755 (executable)
index 0000000..74cb919
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Range library concept checks
+//
+//  Copyright Neil Groves 2009. 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)
+//
+#ifndef BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        template<typename T1, typename T2>
+        class SameTypeConcept
+        {
+        public:
+            BOOST_CONCEPT_USAGE(SameTypeConcept)
+            {
+                same_type(a,b);
+            }
+        private:
+            template<typename T> void same_type(T,T) {}
+            T1 a;
+            T2 b;
+        };
+    }
+}
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/detail/range_return.hpp b/deal.II/contrib/boost/include/boost/range/detail/range_return.hpp
new file mode 100755 (executable)
index 0000000..52a6073
--- /dev/null
@@ -0,0 +1,180 @@
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_DETAIL_RANGE_RETURN_HPP_INCLUDED
+#define BOOST_RANGE_DETAIL_RANGE_RETURN_HPP_INCLUDED
+
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+    enum range_return_value
+    {
+        // (*) indicates the most common values
+        return_found,       // only the found resulting iterator (*)
+        return_next,        // next(found) iterator
+        return_prior,       // prior(found) iterator
+        return_begin_found, // [begin, found) range (*)
+        return_begin_next,  // [begin, next(found)) range
+        return_begin_prior, // [begin, prior(found)) range
+        return_found_end,   // [found, end) range (*)
+        return_next_end,    // [next(found), end) range
+        return_prior_end,   // [prior(found), end) range
+        return_begin_end    // [begin, end) range
+    };
+
+    template< class SinglePassRange, range_return_value >
+    struct range_return
+    {
+        typedef boost::iterator_range<
+            BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type;
+
+        static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found,
+                         SinglePassRange& rng)
+        {
+            return type(found, boost::end(rng));
+        }
+    };
+
+    template< class SinglePassRange >
+    struct range_return< SinglePassRange, return_found >
+    {
+        typedef BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type type;
+
+        static type pack(type found, SinglePassRange&)
+        {
+            return found;
+        }
+    };
+
+    template< class SinglePassRange >
+    struct range_return< SinglePassRange, return_next >
+    {
+        typedef BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type type;
+
+        static type pack(type found, SinglePassRange& rng)
+        {
+            return found == boost::end(rng)
+                ? found
+                : boost::next(found);
+        }
+    };
+
+    template< class BidirectionalRange >
+    struct range_return< BidirectionalRange, return_prior >
+    {
+        typedef BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type type;
+
+        static type pack(type found, BidirectionalRange& rng)
+        {
+            return found == boost::begin(rng)
+                ? found
+                : boost::prior(found);
+        }
+    };
+
+    template< class SinglePassRange >
+    struct range_return< SinglePassRange, return_begin_found >
+    {
+        typedef boost::iterator_range<
+            BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type;
+
+        static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found,
+                         SinglePassRange& rng)
+        {
+            return type(boost::begin(rng), found);
+        }
+    };
+
+    template< class SinglePassRange >
+    struct range_return< SinglePassRange, return_begin_next >
+    {
+        typedef boost::iterator_range<
+            BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type;
+
+        static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found,
+                         SinglePassRange& rng)
+        {
+            return type( boost::begin(rng), 
+                         found == boost::end(rng) ? found : boost::next(found) );
+        }
+    };
+
+    template< class BidirectionalRange >
+    struct range_return< BidirectionalRange, return_begin_prior >
+    {
+        typedef boost::iterator_range<
+            BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type > type;
+
+        static type pack(BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type found,
+                         BidirectionalRange& rng)
+        {
+            return type( boost::begin(rng),
+                         found == boost::begin(rng) ? found : boost::prior(found) );
+        }
+    };
+
+    template< class SinglePassRange >
+    struct range_return< SinglePassRange, return_found_end >
+    {
+        typedef boost::iterator_range<
+            BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type;
+
+        static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found,
+                         SinglePassRange& rng)
+        {
+            return type(found, boost::end(rng));
+        }
+    };
+
+    template< class SinglePassRange >
+    struct range_return< SinglePassRange, return_next_end >
+    {
+        typedef boost::iterator_range<
+            BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type;
+
+        static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found,
+                         SinglePassRange& rng)
+        {
+            return type( found == boost::end(rng) ? found : boost::next(found),
+                         boost::end(rng) );
+        }
+    };
+
+    template< class BidirectionalRange >
+    struct range_return< BidirectionalRange, return_prior_end >
+    {
+        typedef boost::iterator_range<
+            BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type > type;
+
+        static type pack(BOOST_DEDUCED_TYPENAME range_iterator<BidirectionalRange>::type found,
+                         BidirectionalRange& rng)
+        {
+            return type( found == boost::begin(rng) ? found : boost::prior(found),
+                         boost::end(rng) );
+        }
+    };
+
+    template< class SinglePassRange >
+    struct range_return< SinglePassRange, return_begin_end >
+    {
+        typedef boost::iterator_range<
+            BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type > type;
+
+        static type pack(BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange>::type found,
+                         SinglePassRange& rng)
+        {
+            return type(boost::begin(rng), boost::end(rng));
+        }
+    };
+
+}
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/irange.hpp b/deal.II/contrib/boost/include/boost/range/irange.hpp
new file mode 100644 (file)
index 0000000..ee25d45
--- /dev/null
@@ -0,0 +1,204 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2010. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_IRANGE_HPP_INCLUDED
+#define BOOST_RANGE_IRANGE_HPP_INCLUDED
+
+#include <boost/assert.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+    namespace range_detail
+    {
+        // integer_iterator is an iterator over an integer sequence that
+        // is bounded only by the limits of the underlying integer
+        // representation.
+        //
+        // This is useful for implementing the irange(first, last)
+        // function.
+        //
+        // Note:
+        // This use of this iterator and irange is appreciably less
+        // performant than the corresponding hand-written integer
+        // loop on many compilers.
+        template<typename Integer>
+        class integer_iterator
+            : public boost::iterator_facade<
+                        integer_iterator<Integer>,
+                        Integer,
+                        boost::random_access_traversal_tag,
+                        Integer,
+                        std::ptrdiff_t
+                    >
+        {
+            typedef boost::iterator_facade<
+                        integer_iterator<Integer>,
+                        Integer,
+                        boost::random_access_traversal_tag,
+                        Integer,
+                        std::ptrdiff_t
+                    > base_t;
+        public:
+            typedef typename base_t::value_type value_type;
+            typedef typename base_t::difference_type difference_type;
+            typedef typename base_t::reference reference;
+
+            integer_iterator() : m_value() {}
+            explicit integer_iterator(value_type x) : m_value(x) {}
+
+        private:
+            void increment()
+            {
+                ++m_value;
+            }
+
+            void decrement()
+            {
+                --m_value;
+            }
+
+            void advance(difference_type offset)
+            {
+                m_value += offset;
+            }
+
+            difference_type distance_to(const integer_iterator& other) const
+            {
+                return other.m_value - m_value;
+            }
+
+            bool equal(const integer_iterator& other) const
+            {
+                return m_value == other.m_value;
+            }
+
+            reference dereference() const
+            {
+                return m_value;
+            }
+
+            friend class ::boost::iterator_core_access;
+            value_type m_value;
+        };
+
+        // integer_iterator_with_step is similar in nature to the
+        // integer_iterator but provides the ability to 'move' in
+        // a number of steps specified at construction time.
+        //
+        // The three variable implementation provides the best guarantees
+        // of loop termination upon various combinations of input.
+        //
+        // While this design is less performant than some less
+        // safe alternatives, the use of ranges and iterators to
+        // perform counting will never be optimal anyhow, hence
+        // if optimal performance is desired a handcoded loop
+        // is the solution.
+        template<typename Integer>
+        class integer_iterator_with_step
+            : public boost::iterator_facade<
+                        integer_iterator_with_step<Integer>,
+                        Integer,
+                        boost::random_access_traversal_tag,
+                        Integer,
+                        std::ptrdiff_t
+                    >
+        {
+            typedef boost::iterator_facade<
+                        integer_iterator_with_step<Integer>,
+                        Integer,
+                        boost::random_access_traversal_tag,
+                        Integer,
+                        std::ptrdiff_t
+                    > base_t;
+        public:
+            typedef typename base_t::value_type value_type;
+            typedef typename base_t::difference_type difference_type;
+            typedef typename base_t::reference reference;
+
+            integer_iterator_with_step(value_type first, value_type step, difference_type step_size)
+                : m_first(first)
+                , m_step(step)
+                , m_step_size(step_size)
+            {
+                BOOST_ASSERT( step >= 0 );
+                BOOST_ASSERT( step_size != 0 );
+            }
+
+        private:
+            void increment()
+            {
+                ++m_step;
+            }
+
+            void decrement()
+            {
+                --m_step;
+            }
+
+            void advance(difference_type offset)
+            {
+                m_step += offset;
+            }
+
+            difference_type distance_to(const integer_iterator_with_step& other) const
+            {
+                return other.m_step - m_step;
+            }
+
+            bool equal(const integer_iterator_with_step& other) const
+            {
+                return m_step == other.m_step;
+            }
+
+            reference dereference() const
+            {
+                return m_first + (m_step * m_step_size);
+            }
+
+            friend class ::boost::iterator_core_access;
+            value_type m_first;
+            value_type m_step;
+            difference_type m_step_size;
+        };
+
+    } // namespace range_detail
+
+    template<typename Integer>
+    iterator_range< range_detail::integer_iterator<Integer> >
+        irange(Integer first, Integer last)
+    {
+        BOOST_ASSERT( first <= last );
+        return boost::iterator_range< range_detail::integer_iterator<Integer> >(
+                range_detail::integer_iterator<Integer>(first),
+                range_detail::integer_iterator<Integer>(last));
+    }
+
+    template<typename Integer, typename StepSize>
+    iterator_range< range_detail::integer_iterator_with_step<Integer> >
+        irange(Integer first, Integer last, StepSize step_size)
+    {
+        BOOST_ASSERT( step_size != 0 );
+        BOOST_ASSERT( (step_size > 0) ? (last >= first) : (last <= first) );
+        typedef typename range_detail::integer_iterator_with_step<Integer> iterator_t;
+
+        const std::ptrdiff_t last_step
+            = (static_cast<std::ptrdiff_t>(last) - static_cast<std::ptrdiff_t>(first))
+            / (static_cast<std::ptrdiff_t>(step_size));
+
+        return boost::iterator_range< iterator_t >(
+            iterator_t(first, 0, step_size),
+            iterator_t(first, last_step, step_size));
+    }
+
+} // namespace boost
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/istream_range.hpp b/deal.II/contrib/boost/include/boost/range/istream_range.hpp
new file mode 100755 (executable)
index 0000000..f0e9ef4
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Range library
+//
+// Copyright Neil Groves 2008. Use, modification and
+// distribution is subject to the Boost Software Licence, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+//
+// For more information, see http://www.boost.org/libs/range
+//
+
+#ifndef BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED
+#define BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED
+
+/*!
+ * \file istream_range.hpp
+ */
+
+#include <iterator>
+#include <istream>
+#include <boost/config.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+    namespace range
+    {
+        template<class Type, class Elem, class Traits> inline
+            iterator_range<std::istream_iterator<Type, Elem, Traits> >
+        istream_range(std::basic_istream<Elem, Traits>& in)
+        {
+            return iterator_range<std::istream_iterator<Type, Elem, Traits> >(
+                std::istream_iterator<Type>(in),
+                std::istream_iterator<Type>());
+        }
+    } // namespace range
+    using range::istream_range;
+} // namespace boost
+
+#endif // include guard
index 21798c54de16557c54e8d710784c11cf98152119..ec73ddc233a636eb7b5a76578472a9b7f4a5cdfb 100644 (file)
 namespace boost
 {
 
-#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)  
-
-    namespace range_detail_vc7_1  
-    {  
-       template< typename C, typename Sig = void(C) >  
-       struct range_iterator  
-       {  
-           typedef BOOST_RANGE_DEDUCED_TYPENAME   
-               mpl::eval_if_c< is_const<C>::value,   
-                               range_const_iterator< typename remove_const<C>::type >,  
-                               range_mutable_iterator<C> >::type type;  
-       };  
-    
-       template< typename C, typename T >  
-       struct range_iterator< C, void(T[]) >  
-       {  
-           typedef T* type;  
-       };       
-    }  
-    
-#endif  
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+
+    namespace range_detail_vc7_1
+    {
+       template< typename C, typename Sig = void(C) >
+       struct range_iterator
+       {
+           typedef BOOST_RANGE_DEDUCED_TYPENAME
+               mpl::eval_if_c< is_const<C>::value,
+                               range_const_iterator< typename remove_const<C>::type >,
+                               range_mutable_iterator<C> >::type type;
+       };
+
+       template< typename C, typename T >
+       struct range_iterator< C, void(T[]) >
+       {
+           typedef T* type;
+       };
+    }
+
+#endif
 
     template< typename C >
     struct range_iterator
     {
 #if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
-  
-        typedef BOOST_RANGE_DEDUCED_TYPENAME  
-               range_detail_vc7_1::range_iterator<C>::type type;  
-           
-#else  
-
-        typedef BOOST_RANGE_DEDUCED_TYPENAME 
-            mpl::eval_if_c< is_const<C>::value, 
+
+        typedef BOOST_RANGE_DEDUCED_TYPENAME
+               range_detail_vc7_1::range_iterator<C>::type type;
+
+#else
+
+        typedef BOOST_RANGE_DEDUCED_TYPENAME
+            mpl::eval_if_c< is_const<C>::value,
                             range_const_iterator< typename remove_const<C>::type >,
                             range_mutable_iterator<C> >::type type;
-        
-#endif         
+
+#endif
     };
-    
+
 } // namespace boost
 
 //#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
index d1182246281c4075c2bfd8c9b83abc005f85ac64..dfcd4d2f860eb3e79dff9e8c1d4e22f963495e78 100644 (file)
 // Boost.Range library
 //
-//  Copyright Thorsten Ottosen & Pavol Droba 2003-2004. Use, modification and
-//  distribution is subject to the Boost Software License, Version
-//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  Copyright Neil Groves 2009.
+//  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)
 //
 // For more information, see http://www.boost.org/libs/range/
 //
+#ifndef BOOST_RANGE_ITERATOR_RANGE_HPP_INCLUDED
+#define BOOST_RANGE_ITERATOR_RANGE_HPP_INCLUDED
 
-#ifndef BOOST_RANGE_ITERATOR_RANGE_HPP
-#define BOOST_RANGE_ITERATOR_RANGE_HPP
-
-#include <boost/config.hpp> // Define __STL_CONFIG_H, if appropriate.
-#include <boost/detail/workaround.hpp>
-
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
-    #pragma warning( push )
-    #pragma warning( disable : 4996 )
-#endif
-
-// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch.
-#ifndef BOOST_OLD_IOSTREAMS 
-# if defined(__STL_CONFIG_H) && \
-    !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \
-    /**/
-#  define BOOST_OLD_IOSTREAMS
-# endif
-#endif // #ifndef BOOST_OLD_IOSTREAMS
-
-#include <boost/assert.hpp>
-#include <boost/iterator/iterator_traits.hpp>    
-#include <boost/type_traits/is_abstract.hpp>
-#include <boost/range/functions.hpp>
-#include <boost/range/iterator.hpp>
-#include <boost/range/difference_type.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <iterator>
-#include <algorithm>
-#ifndef _STLP_NO_IOSTREAMS
-# ifndef BOOST_OLD_IOSTREAMS
-#  include <ostream>
-# else
-#  include <ostream.h>
-# endif
-#endif // _STLP_NO_IOSTREAMS
-#include <cstddef>
-
-/*! \file
-    Defines the \c iterator_class and related functions. 
-    \c iterator_range is a simple wrapper of iterator pair idiom. It provides
-    a rich subset of Container interface.
-*/
-
-
-namespace boost 
-{
-    namespace iterator_range_detail
-    {
-        //
-        // The functions adl_begin and adl_end are implemented in a separate
-        // class for gcc-2.9x
-        //
-        template<typename IteratorT>
-        struct iterator_range_impl {
-            template< class ForwardRange >
-            static IteratorT adl_begin( ForwardRange& r )
-            {
-                return IteratorT( boost::begin( r ) );
-            }
-            
-            template< class ForwardRange >
-            static IteratorT adl_end( ForwardRange& r )
-            {
-                return IteratorT( boost::end( r ) );
-            }
-        };
-        template< class Left, class Right >
-        inline bool equal( const Left& l, const Right& r )
-        {
-            typedef BOOST_DEDUCED_TYPENAME boost::range_difference<Left>::type sz_type;
-
-            sz_type l_size = boost::distance( l ),
-                    r_size = boost::distance( r );
-
-            if( l_size != r_size )
-                return false;
-
-            return std::equal( boost::begin(l), boost::end(l), 
-                               boost::begin(r) );                
-        }
-
-        template< class Left, class Right >
-        inline bool less_than( const Left& l, const Right& r )
-        {                
-            return std::lexicographical_compare( boost::begin(l), 
-                                                 boost::end(l), 
-                                                 boost::begin(r), 
-                                                 boost::end(r) );                
-        }
-           
-        struct range_tag { };
-        struct const_range_tag { };
-
-    }
-
-//  iterator range template class -----------------------------------------//
-
-        //! iterator_range class
-        /*!
-            An \c iterator_range delimits a range in a sequence by beginning and ending iterators. 
-            An iterator_range can be passed to an algorithm which requires a sequence as an input. 
-            For example, the \c toupper() function may be used most frequently on strings, 
-            but can also be used on iterator_ranges: 
-            
-            \code
-                boost::tolower( find( s, "UPPERCASE STRING" ) );
-            \endcode
-
-            Many algorithms working with sequences take a pair of iterators, 
-            delimiting a working range, as an arguments. The \c iterator_range class is an 
-            encapsulation of a range identified by a pair of iterators. 
-            It provides a collection interface, 
-            so it is possible to pass an instance to an algorithm requiring a collection as an input. 
-        */
-        template<typename IteratorT> 
-        class iterator_range
-        {
-        protected: // Used by sub_range
-            //! implementation class
-            typedef iterator_range_detail::iterator_range_impl<IteratorT> impl;
-        public:
-
-            //! this type
-            typedef iterator_range<IteratorT> type;
-            //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type);
-        
-            //! Encapsulated value type
-            typedef BOOST_DEDUCED_TYPENAME 
-                iterator_value<IteratorT>::type value_type;
-
-            //! Difference type
-            typedef BOOST_DEDUCED_TYPENAME 
-                iterator_difference<IteratorT>::type difference_type;
-            
-            //! Size type
-            typedef std::size_t size_type; // note: must be unsigned
-
-            //! This type
-            typedef iterator_range<IteratorT> this_type;
-
-            //! Refence type
-            //
-            // Needed because value-type is the same for 
-            // const and non-const iterators
-            //
-            typedef BOOST_DEDUCED_TYPENAME
-                iterator_reference<IteratorT>::type reference;
-            
-            //! const_iterator type
-            /*! 
-                There is no distinction between const_iterator and iterator.
-                These typedefs are provides to fulfill container interface
-            */ 
-            typedef IteratorT const_iterator;
-            //! iterator type
-            typedef IteratorT iterator;
-
-        private: // for return value of operator()()
-            typedef BOOST_DEDUCED_TYPENAME 
-                boost::mpl::if_< boost::is_abstract<value_type>,
-                                 reference, value_type >::type abstract_value_type;
-
-        public:
-            iterator_range() : m_Begin( iterator() ), m_End( iterator() )
-                #ifndef NDEBUG
-            , singular( true )
-                #endif
-            { }
-           
-            //! Constructor from a pair of iterators
-            template< class Iterator >
-            iterator_range( Iterator Begin, Iterator End ) : 
-                m_Begin(Begin), m_End(End)
-                #ifndef NDEBUG
-            , singular(false) 
-                #endif
-            {}
-
-            //! Constructor from a Range
-            template< class Range >
-            iterator_range( const Range& r ) : 
-                m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
-                #ifndef NDEBUG
-            , singular(false) 
-                #endif
-            {}
-            
-            //! Constructor from a Range
-            template< class Range >
-            iterator_range( Range& r ) : 
-                m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
-                #ifndef NDEBUG
-            , singular(false) 
-                #endif
-            {}
-
-            //! Constructor from a Range
-            template< class Range >
-            iterator_range( const Range& r, iterator_range_detail::const_range_tag ) : 
-                m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
-                #ifndef NDEBUG
-            , singular(false) 
-                #endif
-            {}
-
-            //! Constructor from a Range
-            template< class Range >
-            iterator_range( Range& r, iterator_range_detail::range_tag ) : 
-                m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
-                #ifndef NDEBUG
-            , singular(false) 
-                #endif
-            {}
-
-            #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
-            this_type& operator=( const this_type& r )    
-            {
-                m_Begin  = r.begin(); 
-                m_End    = r.end();
-
-                #ifndef NDEBUG
-                singular = r.singular;
-                #endif
-                return *this;
-            }
-            #endif
-                
-            template< class Iterator >
-            iterator_range& operator=( const iterator_range<Iterator>& r )    
-            {
-                m_Begin  = r.begin(); 
-                m_End    = r.end();
-                #ifndef NDEBUG
-                singular = r.is_singular();
-                #endif
-                return *this;
-            }
-                                      
-            template< class ForwardRange >
-            iterator_range& operator=( ForwardRange& r )
-            {
-                m_Begin  = impl::adl_begin( r ); 
-                m_End    = impl::adl_end( r );
-                #ifndef NDEBUG
-                singular = false;
-                #endif
-                return *this;
-            }
-
-            template< class ForwardRange >
-            iterator_range& operator=( const ForwardRange& r )
-            {
-                m_Begin  = impl::adl_begin( r ); 
-                m_End    = impl::adl_end( r );
-                #ifndef NDEBUG    
-                singular = false;
-                #endif
-                return *this;
-            }
-
-            IteratorT begin() const 
-            { 
-                BOOST_ASSERT( !is_singular() );
-                return m_Begin; 
-            }
-
-            IteratorT end() const 
-            { 
-                BOOST_ASSERT( !is_singular() );
-                return m_End; 
-            } 
-
-            difference_type size() const
-            { 
-                BOOST_ASSERT( !is_singular() );
-                return m_End - m_Begin;
-            }
-            
-            bool empty() const
-            {
-                BOOST_ASSERT( !is_singular() );
-                return m_Begin == m_End;
-            }
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))  
-            operator bool() const
-            {
-                return !empty();
-            }                                    
-#else            
-            typedef iterator (iterator_range::*unspecified_bool_type) () const;
-            operator unspecified_bool_type() const
-            {
-                return empty() ? 0: &iterator_range::end;
-            }
-#endif
-
-            bool equal( const iterator_range& r ) const
-            {
-                BOOST_ASSERT( !is_singular() );
-                return m_Begin == r.m_Begin && m_End == r.m_End;
-            }
-
-
-#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
-            bool operator==( const iterator_range& r ) const
-            {
-                BOOST_ASSERT( !is_singular() );
-                return iterator_range_detail::equal( *this, r );
-            }
-
-            bool operator!=( const iterator_range& r ) const
-            {
-                BOOST_ASSERT( !is_singular() );
-                return !operator==(r);
-            }
-
-           bool operator<( const iterator_range& r ) const
-           {
-               BOOST_ASSERT( !is_singular() );
-               return iterator_range_detail::less_than( *this, r );
-           }
-
-#endif            
-
-        public: // convenience
-           reference front() const
-           {
-               BOOST_ASSERT( !empty() );
-               return *m_Begin;
-           }
-    
-           reference back() const
-           {
-               BOOST_ASSERT( !empty() );
-               IteratorT last( m_End );
-               return *--last;
-           }
-    
-           reference operator[]( difference_type at ) const
-           {
-               BOOST_ASSERT( at >= 0 && at < size() );
-               return m_Begin[at];
-           }
-
-           //
-           // When storing transform iterators, operator[]()
-           // fails because it returns by reference. Therefore
-           // operator()() is provided for these cases.
-           // 
-           abstract_value_type operator()( difference_type at ) const                              
-           {
-               BOOST_ASSERT( at >= 0 && at < size() );
-               return m_Begin[at];               
-           }
-
-           iterator_range& advance_begin( difference_type n )
-           {
-               BOOST_ASSERT( !is_singular() );
-               std::advance( m_Begin, n );
-               return *this;
-           }
-           
-           iterator_range& advance_end( difference_type n )
-           {
-               BOOST_ASSERT( !is_singular() );
-               std::advance( m_End, n );
-               return *this;
-           }
-           
-        private:
-            // begin and end iterators
-            IteratorT m_Begin;
-            IteratorT m_End;
-
-            #ifndef NDEBUG
-            bool      singular;
-            #endif
-
-        public:
-            bool is_singular() const
-            {
-                 #ifndef NDEBUG
-                 return singular;
-                 #else
-                 return false;
-                 #endif
-            }
-
-        protected:
-            //
-            // Allow subclasses an easy way to access the
-            // base type
-            //
-            typedef iterator_range iterator_range_;
-        };
-
-//  iterator range free-standing operators ---------------------------//
-
-#ifndef _STLP_NO_IOSTREAMS
-# ifndef BOOST_OLD_IOSTREAMS   
-
-        //! iterator_range output operator
-        /*!
-            Output the range to an ostream. Elements are outputed
-            in a sequence without separators.
-        */
-        template< typename IteratorT, typename Elem, typename Traits >
-        inline std::basic_ostream<Elem,Traits>& operator<<( 
-                    std::basic_ostream<Elem, Traits>& Os,
-                    const iterator_range<IteratorT>& r )
-        {
-            std::copy( r.begin(), r.end(), 
-                       std::ostream_iterator< BOOST_DEDUCED_TYPENAME 
-                                              iterator_value<IteratorT>::type, 
-                                              Elem, Traits>(Os) );
-            return Os;
-        }
-
-# else
-
-        //! iterator_range output operator
-        /*!
-            Output the range to an ostream. Elements are outputed
-            in a sequence without separators.
-        */
-        template< typename IteratorT >
-        inline std::ostream& operator<<( 
-                    std::ostream& Os,
-                    const iterator_range<IteratorT>& r )
-        {
-            std::copy( r.begin(), r.end(), std::ostream_iterator<char>(Os));
-            return Os;
-        }
-
-# endif
-#endif // _STLP_NO_IOSTREAMS
-
-        /////////////////////////////////////////////////////////////////////
-        // comparison operators
-        /////////////////////////////////////////////////////////////////////
-
-        template< class IteratorT, class ForwardRange >
-        inline bool operator==( const ForwardRange& l, 
-                                const iterator_range<IteratorT>& r )
-        {
-            return iterator_range_detail::equal( l, r );
-        }
-
-        template< class IteratorT, class ForwardRange >
-        inline bool operator!=( const ForwardRange& l, 
-                                const iterator_range<IteratorT>& r )
-        {
-            return !iterator_range_detail::equal( l, r );
-        }
-
-        template< class IteratorT, class ForwardRange >
-        inline bool operator<( const ForwardRange& l, 
-                               const iterator_range<IteratorT>& r )
-        {
-            return iterator_range_detail::less_than( l, r );
-        }
-
-#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-#else
-        template< class Iterator1T, class Iterator2T >
-        inline bool operator==( const iterator_range<Iterator1T>& l, 
-                                const iterator_range<Iterator2T>& r )
-        {
-            return iterator_range_detail::equal( l, r );
-        }
-
-        template< class IteratorT, class ForwardRange >
-        inline bool operator==( const iterator_range<IteratorT>& l, 
-                                const ForwardRange& r )
-        {
-            return iterator_range_detail::equal( l, r );
-        }
-
-
-        template< class Iterator1T, class Iterator2T >
-        inline bool operator!=( const iterator_range<Iterator1T>& l, 
-                                const iterator_range<Iterator2T>& r )
-        {
-            return !iterator_range_detail::equal( l, r );
-        }
-        
-        template< class IteratorT, class ForwardRange >
-        inline bool operator!=( const iterator_range<IteratorT>& l, 
-                                const ForwardRange& r )
-        {
-            return !iterator_range_detail::equal( l, r );
-        }
-
-        
-        template< class Iterator1T, class Iterator2T >
-        inline bool operator<( const iterator_range<Iterator1T>& l, 
-                               const iterator_range<Iterator2T>& r )
-        {
-            return iterator_range_detail::less_than( l, r );
-        }
-
-        template< class IteratorT, class ForwardRange >
-        inline bool operator<( const iterator_range<IteratorT>& l, 
-                               const ForwardRange& r )
-        {            
-            return iterator_range_detail::less_than( l, r );
-        }
-
-#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-                    
-//  iterator range utilities -----------------------------------------//
-
-        //! iterator_range construct helper 
-        /*!
-            Construct an \c iterator_range from a pair of iterators
-
-            \param Begin A begin iterator
-            \param End An end iterator
-            \return iterator_range object
-        */
-        template< typename IteratorT >
-        inline iterator_range< IteratorT > 
-        make_iterator_range( IteratorT Begin, IteratorT End ) 
-        {   
-            return iterator_range<IteratorT>( Begin, End );
-        }
-                     
-#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
-        template< typename Range >
-        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
-        make_iterator_range( Range& r ) 
-        {   
-            return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
-                ( boost::begin( r ), boost::end( r ) );
-        }
-        
-#else
-        //! iterator_range construct helper
-        /*!
-            Construct an \c iterator_range from a \c Range containing the begin
-            and end iterators.
-        */
-        template< class ForwardRange >
-        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
-        make_iterator_range( ForwardRange& r ) 
-        {   
-           return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
-                ( r, iterator_range_detail::range_tag() );
-        }
-
-        template< class ForwardRange >
-        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type >
-        make_iterator_range( const ForwardRange& r ) 
-        {   
-           return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type >
-                ( r, iterator_range_detail::const_range_tag() );
-        }
-
-#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
-        namespace iterator_range_detail
-        {    
-            template< class Range >
-            inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
-            make_range_impl( Range& r, 
-                             BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
-                             BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
-            {
-                //
-                // Not worth the effort
-                //
-                //if( advance_begin == 0 && advance_end == 0 )
-                //    return make_iterator_range( r );
-                //
-
-                BOOST_DEDUCED_TYPENAME range_iterator<Range>::type 
-                    new_begin = boost::begin( r ),
-                    new_end   = boost::end( r );
-                std::advance( new_begin, advance_begin );
-                std::advance( new_end, advance_end );
-                return make_iterator_range( new_begin, new_end );
-            }
-        }
-        
-#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
-        template< class Range >
-        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
-        make_iterator_range( Range& r, 
-                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
-                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
-        {
-            //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
-            return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
-        }
-
-#else
-
-        template< class Range >
-        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
-        make_iterator_range( Range& r, 
-                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
-                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
-        {
-            //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
-            return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
-        }
-
-        template< class Range >
-        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type >
-        make_iterator_range( const Range& r, 
-                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
-                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
-        {
-            //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
-            return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
-        }
-
-#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
-        //! copy a range into a sequence
-        /*!
-            Construct a new sequence of the specified type from the elements
-            in the given range
-
-            \param Range An input range
-            \return New sequence
-        */
-        template< typename SeqT, typename Range >
-        inline SeqT copy_range( const Range& r )
-        {
-            return SeqT( boost::begin( r ), boost::end( r ) );
-        }
-
-} // namespace 'boost'
-
-#undef BOOST_OLD_IOSTREAMS
-
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) 
-    #pragma warning( pop )
-#endif
-
-#endif
+#include "boost/range/iterator_range_core.hpp"
+#include "boost/range/iterator_range_io.hpp"
 
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/iterator_range_core.hpp b/deal.II/contrib/boost/include/boost/range/iterator_range_core.hpp
new file mode 100755 (executable)
index 0000000..497b1e3
--- /dev/null
@@ -0,0 +1,542 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves & Thorsten Ottosen & Pavol Droba 2003-2004.
+//  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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED
+#define BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED
+
+#include <boost/config.hpp> // Define __STL_CONFIG_H, if appropriate.
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+    #pragma warning( push )
+    #pragma warning( disable : 4996 )
+#endif
+
+#include <boost/assert.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/type_traits/is_abstract.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/range/functions.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/difference_type.hpp>
+#include <boost/range/algorithm/equal.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <iterator>
+#include <algorithm>
+#include <cstddef>
+
+/*! \file
+    Defines the \c iterator_class and related functions.
+    \c iterator_range is a simple wrapper of iterator pair idiom. It provides
+    a rich subset of Container interface.
+*/
+
+
+namespace boost
+{
+    namespace iterator_range_detail
+    {
+        //
+        // The functions adl_begin and adl_end are implemented in a separate
+        // class for gcc-2.9x
+        //
+        template<class IteratorT>
+        struct iterator_range_impl {
+            template< class ForwardRange >
+            static IteratorT adl_begin( ForwardRange& r )
+            {
+                return IteratorT( boost::begin( r ) );
+            }
+
+            template< class ForwardRange >
+            static IteratorT adl_end( ForwardRange& r )
+            {
+                return IteratorT( boost::end( r ) );
+            }
+        };
+
+        template< class Left, class Right >
+        inline bool less_than( const Left& l, const Right& r )
+        {
+            return std::lexicographical_compare( boost::begin(l),
+                                                 boost::end(l),
+                                                 boost::begin(r),
+                                                 boost::end(r) );
+        }
+
+        // This version is maintained since it is used in other boost libraries
+        // such as Boost.Assign
+        template< class Left, class Right >
+        inline bool equal(const Left& l, const Right& r)
+        {
+            return boost::equal(l, r);
+        }
+
+        struct range_tag { };
+        struct const_range_tag { };
+
+    }
+
+//  iterator range template class -----------------------------------------//
+
+        //! iterator_range class
+        /*!
+            An \c iterator_range delimits a range in a sequence by beginning and ending iterators.
+            An iterator_range can be passed to an algorithm which requires a sequence as an input.
+            For example, the \c toupper() function may be used most frequently on strings,
+            but can also be used on iterator_ranges:
+
+            \code
+                boost::tolower( find( s, "UPPERCASE STRING" ) );
+            \endcode
+
+            Many algorithms working with sequences take a pair of iterators,
+            delimiting a working range, as an arguments. The \c iterator_range class is an
+            encapsulation of a range identified by a pair of iterators.
+            It provides a collection interface,
+            so it is possible to pass an instance to an algorithm requiring a collection as an input.
+        */
+        template<class IteratorT>
+        class iterator_range
+        {
+        protected: // Used by sub_range
+            //! implementation class
+            typedef iterator_range_detail::iterator_range_impl<IteratorT> impl;
+        public:
+
+            //! this type
+            typedef iterator_range<IteratorT> type;
+            //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type);
+
+            //! Encapsulated value type
+            typedef BOOST_DEDUCED_TYPENAME
+                iterator_value<IteratorT>::type value_type;
+
+            //! Difference type
+            typedef BOOST_DEDUCED_TYPENAME
+                iterator_difference<IteratorT>::type difference_type;
+
+            //! Size type
+            typedef std::size_t size_type; // note: must be unsigned
+
+            //! This type
+            typedef iterator_range<IteratorT> this_type;
+
+            //! Reference type
+            //
+            // Needed because value-type is the same for
+            // const and non-const iterators
+            //
+            typedef BOOST_DEDUCED_TYPENAME
+                iterator_reference<IteratorT>::type reference;
+
+            //! const_iterator type
+            /*!
+                There is no distinction between const_iterator and iterator.
+                These typedefs are provides to fulfill container interface
+            */
+            typedef IteratorT const_iterator;
+            //! iterator type
+            typedef IteratorT iterator;
+
+        private: // for return value of operator()()
+            typedef BOOST_DEDUCED_TYPENAME
+                boost::mpl::if_< boost::is_abstract<value_type>,
+                                 reference, value_type >::type abstract_value_type;
+
+        public:
+            iterator_range() : m_Begin( iterator() ), m_End( iterator() )
+            { }
+
+            //! Constructor from a pair of iterators
+            template< class Iterator >
+            iterator_range( Iterator Begin, Iterator End ) :
+                m_Begin(Begin), m_End(End)
+            {}
+
+            //! Constructor from a Range
+            template< class Range >
+            iterator_range( const Range& r ) :
+                m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+            {}
+
+            //! Constructor from a Range
+            template< class Range >
+            iterator_range( Range& r ) :
+                m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+            {}
+
+            //! Constructor from a Range
+            template< class Range >
+            iterator_range( const Range& r, iterator_range_detail::const_range_tag ) :
+                m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+            {}
+
+            //! Constructor from a Range
+            template< class Range >
+            iterator_range( Range& r, iterator_range_detail::range_tag ) :
+                m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) )
+            {}
+
+            #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
+            this_type& operator=( const this_type& r )
+            {
+                m_Begin  = r.begin();
+                m_End    = r.end();
+                return *this;
+            }
+            #endif
+
+            template< class Iterator >
+            iterator_range& operator=( const iterator_range<Iterator>& r )
+            {
+                m_Begin  = r.begin();
+                m_End    = r.end();
+                return *this;
+            }
+
+            template< class ForwardRange >
+            iterator_range& operator=( ForwardRange& r )
+            {
+                m_Begin  = impl::adl_begin( r );
+                m_End    = impl::adl_end( r );
+                return *this;
+            }
+
+            template< class ForwardRange >
+            iterator_range& operator=( const ForwardRange& r )
+            {
+                m_Begin  = impl::adl_begin( r );
+                m_End    = impl::adl_end( r );
+                return *this;
+            }
+
+            IteratorT begin() const
+            {
+                return m_Begin;
+            }
+
+            IteratorT end() const
+            {
+                return m_End;
+            }
+
+            difference_type size() const
+            {
+                return m_End - m_Begin;
+            }
+
+            bool empty() const
+            {
+                return m_Begin == m_End;
+            }
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+            operator bool() const
+            {
+                return !empty();
+            }
+#else
+            typedef iterator (iterator_range::*unspecified_bool_type) () const;
+            operator unspecified_bool_type() const
+            {
+                return empty() ? 0: &iterator_range::end;
+            }
+#endif
+
+            bool equal( const iterator_range& r ) const
+            {
+                return m_Begin == r.m_Begin && m_End == r.m_End;
+            }
+
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+            bool operator==( const iterator_range& r ) const
+            {
+                return boost::equal( *this, r );
+            }
+
+            bool operator!=( const iterator_range& r ) const
+            {
+                return !operator==(r);
+            }
+
+           bool operator<( const iterator_range& r ) const
+           {
+               return iterator_range_detail::less_than( *this, r );
+           }
+
+#endif
+
+        public: // convenience
+           reference front() const
+           {
+               BOOST_ASSERT( !empty() );
+               return *m_Begin;
+           }
+
+           reference back() const
+           {
+               BOOST_ASSERT( !empty() );
+               IteratorT last( m_End );
+               return *--last;
+           }
+
+           reference operator[]( difference_type at ) const
+           {
+               BOOST_ASSERT( at >= 0 && at < size() );
+               return m_Begin[at];
+           }
+
+           //
+           // When storing transform iterators, operator[]()
+           // fails because it returns by reference. Therefore
+           // operator()() is provided for these cases.
+           //
+           abstract_value_type operator()( difference_type at ) const
+           {
+               BOOST_ASSERT( at >= 0 && at < size() );
+               return m_Begin[at];
+           }
+
+           iterator_range& advance_begin( difference_type n )
+           {
+               std::advance( m_Begin, n );
+               return *this;
+           }
+
+           iterator_range& advance_end( difference_type n )
+           {
+               std::advance( m_End, n );
+               return *this;
+           }
+
+        private:
+            // begin and end iterators
+            IteratorT m_Begin;
+            IteratorT m_End;
+
+        protected:
+            //
+            // Allow subclasses an easy way to access the
+            // base type
+            //
+            typedef iterator_range iterator_range_;
+        };
+
+//  iterator range free-standing operators ---------------------------//
+
+        /////////////////////////////////////////////////////////////////////
+        // comparison operators
+        /////////////////////////////////////////////////////////////////////
+
+        template< class IteratorT, class ForwardRange >
+        inline bool operator==( const ForwardRange& l,
+                                const iterator_range<IteratorT>& r )
+        {
+            return boost::equal( l, r );
+        }
+
+        template< class IteratorT, class ForwardRange >
+        inline bool operator!=( const ForwardRange& l,
+                                const iterator_range<IteratorT>& r )
+        {
+            return !boost::equal( l, r );
+        }
+
+        template< class IteratorT, class ForwardRange >
+        inline bool operator<( const ForwardRange& l,
+                               const iterator_range<IteratorT>& r )
+        {
+            return iterator_range_detail::less_than( l, r );
+        }
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+#else
+        template< class Iterator1T, class Iterator2T >
+        inline bool operator==( const iterator_range<Iterator1T>& l,
+                                const iterator_range<Iterator2T>& r )
+        {
+            return boost::equal( l, r );
+        }
+
+        template< class IteratorT, class ForwardRange >
+        inline bool operator==( const iterator_range<IteratorT>& l,
+                                const ForwardRange& r )
+        {
+            return boost::equal( l, r );
+        }
+
+
+        template< class Iterator1T, class Iterator2T >
+        inline bool operator!=( const iterator_range<Iterator1T>& l,
+                                const iterator_range<Iterator2T>& r )
+        {
+            return !boost::equal( l, r );
+        }
+
+        template< class IteratorT, class ForwardRange >
+        inline bool operator!=( const iterator_range<IteratorT>& l,
+                                const ForwardRange& r )
+        {
+            return !boost::equal( l, r );
+        }
+
+
+        template< class Iterator1T, class Iterator2T >
+        inline bool operator<( const iterator_range<Iterator1T>& l,
+                               const iterator_range<Iterator2T>& r )
+        {
+            return iterator_range_detail::less_than( l, r );
+        }
+
+        template< class IteratorT, class ForwardRange >
+        inline bool operator<( const iterator_range<IteratorT>& l,
+                               const ForwardRange& r )
+        {
+            return iterator_range_detail::less_than( l, r );
+        }
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+//  iterator range utilities -----------------------------------------//
+
+        //! iterator_range construct helper
+        /*!
+            Construct an \c iterator_range from a pair of iterators
+
+            \param Begin A begin iterator
+            \param End An end iterator
+            \return iterator_range object
+        */
+        template< typename IteratorT >
+        inline iterator_range< IteratorT >
+        make_iterator_range( IteratorT Begin, IteratorT End )
+        {
+            return iterator_range<IteratorT>( Begin, End );
+        }
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+        template< typename Range >
+        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+        make_iterator_range( Range& r )
+        {
+            return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+                ( boost::begin( r ), boost::end( r ) );
+        }
+
+#else
+        //! iterator_range construct helper
+        /*!
+            Construct an \c iterator_range from a \c Range containing the begin
+            and end iterators.
+        */
+        template< class ForwardRange >
+        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
+        make_iterator_range( ForwardRange& r )
+        {
+           return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
+                ( r, iterator_range_detail::range_tag() );
+        }
+
+        template< class ForwardRange >
+        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type >
+        make_iterator_range( const ForwardRange& r )
+        {
+           return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type >
+                ( r, iterator_range_detail::const_range_tag() );
+        }
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+        namespace iterator_range_detail
+        {
+            template< class Range >
+            inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+            make_range_impl( Range& r,
+                             BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+                             BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+            {
+                //
+                // Not worth the effort
+                //
+                //if( advance_begin == 0 && advance_end == 0 )
+                //    return make_iterator_range( r );
+                //
+
+                BOOST_DEDUCED_TYPENAME range_iterator<Range>::type
+                    new_begin = boost::begin( r ),
+                    new_end   = boost::end( r );
+                std::advance( new_begin, advance_begin );
+                std::advance( new_end, advance_end );
+                return make_iterator_range( new_begin, new_end );
+            }
+        }
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+        template< class Range >
+        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+        make_iterator_range( Range& r,
+                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+        {
+            //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
+            return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+        }
+
+#else
+
+        template< class Range >
+        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<Range>::type >
+        make_iterator_range( Range& r,
+                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+        {
+            //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
+            return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+        }
+
+        template< class Range >
+        inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const Range>::type >
+        make_iterator_range( const Range& r,
+                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_begin,
+                    BOOST_DEDUCED_TYPENAME range_difference<Range>::type advance_end )
+        {
+            //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" );
+            return iterator_range_detail::make_range_impl( r, advance_begin, advance_end );
+        }
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+        //! copy a range into a sequence
+        /*!
+            Construct a new sequence of the specified type from the elements
+            in the given range
+
+            \param Range An input range
+            \return New sequence
+        */
+        template< typename SeqT, typename Range >
+        inline SeqT copy_range( const Range& r )
+        {
+            return SeqT( boost::begin( r ), boost::end( r ) );
+        }
+
+} // namespace 'boost'
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+    #pragma warning( pop )
+#endif
+
+#endif
+
diff --git a/deal.II/contrib/boost/include/boost/range/iterator_range_io.hpp b/deal.II/contrib/boost/include/boost/range/iterator_range_io.hpp
new file mode 100755 (executable)
index 0000000..51e3a4f
--- /dev/null
@@ -0,0 +1,93 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009.
+//  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)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED
+#define BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+    #pragma warning( push )
+    #pragma warning( disable : 4996 )
+#endif
+
+// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch.
+#ifndef BOOST_OLD_IOSTREAMS 
+# if defined(__STL_CONFIG_H) && \
+    !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \
+    /**/
+#  define BOOST_OLD_IOSTREAMS
+# endif
+#endif // #ifndef BOOST_OLD_IOSTREAMS
+
+#ifndef _STLP_NO_IOSTREAMS
+# ifndef BOOST_OLD_IOSTREAMS
+#  include <ostream>
+# else
+#  include <ostream.h>
+# endif
+#endif // _STLP_NO_IOSTREAMS
+
+#include <boost/range/iterator_range_core.hpp>
+#include <iterator>
+#include <algorithm>
+#include <cstddef>
+
+namespace boost
+{
+
+#ifndef _STLP_NO_IOSTREAMS
+# ifndef BOOST_OLD_IOSTREAMS   
+
+        //! iterator_range output operator
+        /*!
+            Output the range to an ostream. Elements are outputed
+            in a sequence without separators.
+        */
+        template< typename IteratorT, typename Elem, typename Traits >
+        inline std::basic_ostream<Elem,Traits>& operator<<( 
+                    std::basic_ostream<Elem, Traits>& Os,
+                    const iterator_range<IteratorT>& r )
+        {
+            std::copy( r.begin(), r.end(), 
+                       std::ostream_iterator< BOOST_DEDUCED_TYPENAME 
+                                              iterator_value<IteratorT>::type, 
+                                              Elem, Traits>(Os) );
+            return Os;
+        }
+
+# else
+
+        //! iterator_range output operator
+        /*!
+            Output the range to an ostream. Elements are outputed
+            in a sequence without separators.
+        */
+        template< typename IteratorT >
+        inline std::ostream& operator<<( 
+                    std::ostream& Os,
+                    const iterator_range<IteratorT>& r )
+        {
+            std::copy( r.begin(), r.end(), std::ostream_iterator<char>(Os));
+            return Os;
+        }
+
+# endif
+#endif // _STLP_NO_IOSTREAMS
+
+} // namespace boost
+
+#undef BOOST_OLD_IOSTREAMS
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
+    #pragma warning(pop)
+#endif
+
+#endif // include guard
diff --git a/deal.II/contrib/boost/include/boost/range/join.hpp b/deal.II/contrib/boost/include/boost/range/join.hpp
new file mode 100644 (file)
index 0000000..518026c
--- /dev/null
@@ -0,0 +1,68 @@
+// Boost.Range library
+//
+//  Copyright Neil Groves 2009. 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)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_JOIN_HPP_INCLUDED
+#define BOOST_RANGE_JOIN_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/range/detail/join_iterator.hpp>
+#include <boost/range/concepts.hpp>
+#include <boost/range/iterator_range.hpp>
+
+namespace boost
+{
+
+template<class SinglePassRange1, class SinglePassRange2>
+iterator_range<range_detail::join_iterator<
+    BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
+    BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type,
+    BOOST_DEDUCED_TYPENAME add_const<
+        BOOST_DEDUCED_TYPENAME range_value<const SinglePassRange1>::type>::type>
+>
+join(const SinglePassRange1& r1, const SinglePassRange2& r2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+    typedef range_detail::join_iterator<
+                BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type,
+                BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange2>::type,
+                BOOST_DEDUCED_TYPENAME add_const<
+                    BOOST_DEDUCED_TYPENAME range_value<const SinglePassRange1>::type>::type> iterator_t;
+
+    return iterator_range<iterator_t>(
+        iterator_t(r1, r2, range_detail::join_iterator_begin_tag()),
+        iterator_t(r1, r2, range_detail::join_iterator_end_tag()));
+}
+
+template<class SinglePassRange1, class SinglePassRange2>
+iterator_range<range_detail::join_iterator<
+    BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+    BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type,
+    BOOST_DEDUCED_TYPENAME range_value<SinglePassRange1>::type>
+>
+join(SinglePassRange1& r1, SinglePassRange2& r2)
+{
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange1> ));
+    BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<SinglePassRange2> ));
+
+    typedef range_detail::join_iterator<
+        BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange1>::type,
+        BOOST_DEDUCED_TYPENAME range_iterator<SinglePassRange2>::type,
+        BOOST_DEDUCED_TYPENAME range_value<SinglePassRange1>::type> iterator_t;
+
+    return iterator_range<iterator_t>(
+        iterator_t(r1, r2, range_detail::join_iterator_begin_tag()),
+        iterator_t(r1, r2, range_detail::join_iterator_end_tag()));
+}
+
+} // namespace boost
+
+#endif // include guard
index 2f45c1627e3cf8431a1552138e2bc67d0a2a3a7d..7beca66a29d37c38951e8c34bd9d5747540d092b 100644 (file)
@@ -21,6 +21,7 @@
 #include <boost/range/detail/iterator.hpp>
 #else
 
+#include <boost/range/detail/extract_optional_type.hpp>
 #include <boost/iterator/iterator_traits.hpp>
 #include <cstddef>
 #include <utility>
@@ -31,11 +32,13 @@ namespace boost
     // default
     //////////////////////////////////////////////////////////////////////////
     
+    namespace range_detail {
+        BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator )
+    }
+
     template< typename C >
-    struct range_mutable_iterator
-    {
-        typedef BOOST_DEDUCED_TYPENAME C::iterator type;
-    };
+    struct range_mutable_iterator : range_detail::extract_iterator<C>
+    {};
     
     //////////////////////////////////////////////////////////////////////////
     // pair
diff --git a/deal.II/contrib/boost/include/boost/range/numeric.hpp b/deal.II/contrib/boost/include/boost/range/numeric.hpp
new file mode 100755 (executable)
index 0000000..0a76151
--- /dev/null
@@ -0,0 +1,117 @@
+///////////////////////////////////////////////////////////////////////////////
+/// \file algorithm.hpp
+///   Contains range-based versions of the std algorithms
+//
+/////////////////////////////////////////////////////////////////////////////
+// Copyright 2009 Neil Groves.
+// 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)
+// 
+
+// Copyright 2006 Thorsten Ottosen.
+// 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)
+// 
+// Copyright 2004 Eric Niebler.
+// 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)
+
+#if defined(_MSC_VER) && _MSC_VER >= 1000
+    #pragma once
+#endif
+
+#ifndef BOOST_RANGE_NUMERIC_HPP
+#define BOOST_RANGE_NUMERIC_HPP
+
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <numeric>
+
+
+namespace boost
+{
+    template< class SinglePassRange, class Value >
+    inline Value accumulate( const SinglePassRange& rng, Value init )
+    {
+        boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+        return std::accumulate( boost::begin(rng), boost::end(rng), init );
+    }
+
+    template< class SinglePassRange, class Value, class BinaryOperation >
+    inline Value accumulate( const SinglePassRange& rng, Value init, BinaryOperation op )
+    {
+        boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+        return std::accumulate( boost::begin(rng), boost::end(rng), init, op );
+    }
+
+
+    template< class SinglePassRange1, class SinglePassRange2, class Value >
+    inline Value inner_product( const SinglePassRange1& rng1, const SinglePassRange2& rng2, Value init )
+    {
+        boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+        boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+        BOOST_ASSERT( boost::distance(rng2) >= boost::distance(rng1) );
+        return std::inner_product( boost::begin(rng1), boost::end(rng1), 
+            boost::begin(rng2), init ); 
+    }
+
+    template< class SinglePassRange1,
+              class SinglePassRange2,
+              class Value, 
+              class BinaryOperation1, class BinaryOperation2 >
+    inline Value inner_product( const SinglePassRange1& rng1, const SinglePassRange2& rng2,
+                                Value init, 
+                                BinaryOperation1 op1, BinaryOperation2 op2 )
+    {
+        boost::function_requires< SinglePassRangeConcept<SinglePassRange1> >();
+        boost::function_requires< SinglePassRangeConcept<SinglePassRange2> >();
+        BOOST_ASSERT( boost::distance(rng2) >= boost::distance(rng1) );
+
+        return std::inner_product( boost::begin(rng1), boost::end(rng1), 
+                                   boost::begin(rng2), init, op1, op2 ); 
+    }
+
+    template< class SinglePassRange, class OutputIterator >
+    inline OutputIterator partial_sum ( const SinglePassRange& rng, 
+                                        OutputIterator result )
+    {
+        boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+        return std::partial_sum( boost::begin(rng), boost::end(rng), result );
+    }
+
+    template< class SinglePassRange, class OutputIterator, class BinaryOperation >
+    inline OutputIterator partial_sum ( const SinglePassRange& rng, OutputIterator result, 
+                                        BinaryOperation op )
+    {
+        boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+        return std::partial_sum( boost::begin(rng), boost::end(rng), result, op );
+    }
+
+    template< class SinglePassRange, class OutputIterator >
+    inline OutputIterator adjacent_difference ( const SinglePassRange& rng,
+                                                OutputIterator result )
+    {
+        boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+        return std::adjacent_difference( boost::begin(rng), boost::end(rng), 
+                                         result );
+    }
+
+    template< class SinglePassRange, class OutputIterator, class BinaryOperation >
+    inline OutputIterator adjacent_difference ( const SinglePassRange& rng,
+                                                OutputIterator result,
+                                                BinaryOperation op )
+    {
+        boost::function_requires< SinglePassRangeConcept<SinglePassRange> >();
+        return std::adjacent_difference( boost::begin(rng), boost::end(rng), 
+                                         result, op );
+    }
+    
+}
+
+#endif
index 311a69210bb215f5a0835df515dbe10e1034042b..2b572d41e7156bed86f26d44771a785d3abc2094 100644 (file)
@@ -20,7 +20,7 @@
 #include <boost/range/difference_type.hpp>
 #include <boost/assert.hpp>
 
-namespace boost 
+namespace boost
 {
 
     template< class T >
index 7ed8dfa8707a579b37ec7d7a2e49e3a19970dbf0..8c184f87d2db19ca6cffcb93accda22da4d9e5c8 100644 (file)
@@ -67,7 +67,8 @@ namespace boost
     { };
 
     template< class T >
-    struct range_size<const T > : range_size<T>
+    struct range_size<const T >
+        : detail::range_size<T>
     { };
     
 } // namespace boost
index dc66692a936f0422441bbabdf44bbd05ea329594..d5544b91f16a880ebb05ac8d27d82d18800cd885 100644 (file)
@@ -1,5 +1,6 @@
 // Boost.Range library
 //
+//  Copyright Neil Groves 2009.
 //  Copyright Thorsten Ottosen 2003-2004. Use, modification and
 //  distribution is subject to the Boost Software License, Version
 //  1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -11,7 +12,7 @@
 #ifndef BOOST_RANGE_SUB_RANGE_HPP
 #define BOOST_RANGE_SUB_RANGE_HPP
 
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) 
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
     #pragma warning( push )
     #pragma warning( disable : 4996 )
 #endif
 #include <boost/range/value_type.hpp>
 #include <boost/range/size_type.hpp>
 #include <boost/range/difference_type.hpp>
+#include <boost/range/algorithm/equal.hpp>
 #include <boost/assert.hpp>
 #include <boost/type_traits/is_reference.hpp>
 #include <boost/type_traits/remove_reference.hpp>
 
 namespace boost
 {
-    
-    template< class ForwardRange > 
-    class sub_range : public iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type > 
+
+    template< class ForwardRange >
+    class sub_range : public iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type >
     {
         typedef BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type iterator_t;
         typedef iterator_range< iterator_t  > base;
@@ -51,40 +53,40 @@ namespace boost
                                  reference >::type const_reference;
 
     public:
-        sub_range() : base() 
+        sub_range() : base()
+        { }
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500) )
+        sub_range( const sub_range& r )
+            : base( static_cast<const base&>( r ) )
         { }
-        
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500) ) 
-        sub_range( const sub_range& r ) 
-            : base( static_cast<const base&>( r ) )  
-        { }  
 #endif
 
         template< class ForwardRange2 >
-        sub_range( ForwardRange2& r ) : 
-            
+        sub_range( ForwardRange2& r ) :
+
 #if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 800 )
             base( impl::adl_begin( r ), impl::adl_end( r ) )
 #else
             base( r )
-#endif        
+#endif
         { }
-        
+
         template< class ForwardRange2 >
-        sub_range( const ForwardRange2& r ) : 
+        sub_range( const ForwardRange2& r ) :
 
 #if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 800 )
             base( impl::adl_begin( r ), impl::adl_end( r ) )
 #else
             base( r )
-#endif                
+#endif
         { }
 
         template< class Iter >
         sub_range( Iter first, Iter last ) :
             base( first, last )
         { }
-        
+
         template< class ForwardRange2 >
         sub_range& operator=( ForwardRange2& r )
         {
@@ -97,23 +99,23 @@ namespace boost
         {
             base::operator=( r );
             return *this;
-        }   
+        }
 
         sub_range& operator=( const sub_range& r )
         {
             base::operator=( static_cast<const base&>(r) );
-            return *this;            
+            return *this;
         }
-        
+
     public:
-        
+
         iterator        begin()          { return base::begin(); }
         const_iterator  begin() const    { return base::begin(); }
         iterator        end()            { return base::end();   }
         const_iterator  end() const      { return base::end();   }
-        difference_type size() const     { return base::size();  }   
+        difference_type size() const     { return base::size();  }
+
 
-        
     public: // convenience
         reference front()
         {
@@ -151,14 +153,14 @@ namespace boost
     inline bool operator==( const sub_range<ForwardRange>& l,
                             const sub_range<ForwardRange2>& r )
     {
-        return iterator_range_detail::equal( l, r );
+        return boost::equal( l, r );
     }
 
     template< class ForwardRange, class ForwardRange2 >
     inline bool operator!=( const sub_range<ForwardRange>& l,
                             const sub_range<ForwardRange2>& r )
     {
-        return !iterator_range_detail::equal( l, r );
+        return !boost::equal( l, r );
     }
 
     template< class ForwardRange, class ForwardRange2 >
@@ -171,7 +173,7 @@ namespace boost
 
 } // namespace 'boost'
 
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) 
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500))
     #pragma warning( pop )
 #endif
 
diff --git a/deal.II/contrib/boost/include/boost/scope_exit.hpp b/deal.II/contrib/boost/include/boost/scope_exit.hpp
new file mode 100644 (file)
index 0000000..17f8003
--- /dev/null
@@ -0,0 +1,267 @@
+// Copyright Alexander Nasonov 2006-2009
+//
+// 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)
+
+#ifndef FILE_boost_scope_exit_hpp_INCLUDED
+#define FILE_boost_scope_exit_hpp_INCLUDED
+
+#include <boost/config.hpp>
+
+#include <boost/detail/workaround.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
+#include <boost/preprocessor/punctuation/comma_if.hpp>
+#include <boost/preprocessor/seq/cat.hpp>
+#include <boost/preprocessor/seq/for_each_i.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/typeof/typeof.hpp>
+
+#if defined(__GNUC__) && !defined(BOOST_INTEL)
+# define BOOST_SCOPE_EXIT_AUX_GCC (__GNUC__ * 100 + __GNUC_MINOR__)
+#else
+# define BOOST_SCOPE_EXIT_AUX_GCC 0
+#endif
+
+#if BOOST_WORKAROUND(BOOST_SCOPE_EXIT_AUX_GCC, BOOST_TESTED_AT(413))
+#define BOOST_SCOPE_EXIT_AUX_TPL_WORKAROUND
+#endif
+
+// Steven Watanabe's trick with a modification suggested by Kim Barrett
+namespace boost { namespace scope_exit { namespace aux {
+
+    // Type of a local boost_scope_exit_args variable.
+    // First use in a local scope will declare the boost_scope_exit_args
+    // variable, subsequent uses will be resolved as two comparisons
+    // (cmp1 with 0 and cmp2 with boost_scope_exit_args).
+    template<int Dummy = 0>
+    struct declared
+    {
+        void* value;
+        static int const cmp2 = 0;
+        friend void operator>(int, declared const&) {}
+    };
+
+    struct undeclared { declared<> dummy[2]; };
+
+    template<int> struct resolve;
+
+    template<>
+    struct resolve<sizeof(declared<>)>
+    {
+        static const int cmp1 = 0;
+    };
+
+    template<>
+    struct resolve<sizeof(undeclared)>
+    {
+        template<int>
+        struct cmp1
+        {
+            static int const cmp2 = 0;
+        };
+    };
+} } }
+
+extern boost::scope_exit::aux::undeclared boost_scope_exit_args; // undefined
+
+
+namespace boost { namespace scope_exit { namespace aux {
+
+typedef void (*ref_tag)(int&);
+typedef void (*val_tag)(int );
+
+template<class T, class Tag> struct member;
+
+template<class T>
+struct member<T,ref_tag>
+{
+    T& value;
+#ifndef BOOST_SCOPE_EXIT_AUX_TPL_WORKAROUND
+    member(T& ref) : value(ref) {}
+#endif
+};
+
+template<class T>
+struct member<T,val_tag>
+{
+    T value;
+#ifndef BOOST_SCOPE_EXIT_AUX_TPL_WORKAROUND
+    member(T& val) : value(val) {}
+#endif
+};
+
+template<class T> inline T& deref(T* p, ref_tag) { return *p; }
+template<class T> inline T& deref(T& r, val_tag) { return  r; }
+
+template<class T>
+struct wrapper
+{
+    typedef T type;
+};
+
+template<class T> wrapper<T> wrap(T&);
+
+} } }
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::scope_exit::aux::wrapper, 1)
+
+#define BOOST_SCOPE_EXIT_AUX_GUARD(id)     BOOST_PP_CAT(boost_se_guard_,    id)
+#define BOOST_SCOPE_EXIT_AUX_GUARD_T(id)   BOOST_PP_CAT(boost_se_guard_t_,  id)
+#define BOOST_SCOPE_EXIT_AUX_PARAMS(id)    BOOST_PP_CAT(boost_se_params_,   id)
+#define BOOST_SCOPE_EXIT_AUX_PARAMS_T(id)  BOOST_PP_CAT(boost_se_params_t_, id)
+
+#define BOOST_SCOPE_EXIT_AUX_TAG(id, i) \
+    BOOST_PP_SEQ_CAT( (boost_se_tag_)(i)(_)(id) )
+
+#define BOOST_SCOPE_EXIT_AUX_PARAM(id, i, var) \
+    BOOST_PP_SEQ_CAT( (boost_se_param_)(i)(_)(id) )
+
+#define BOOST_SCOPE_EXIT_AUX_PARAM_T(id, i, var) \
+    BOOST_PP_SEQ_CAT( (boost_se_param_t_)(i)(_)(id) )
+
+#define BOOST_SCOPE_EXIT_AUX_CAPTURE_T(id, i, var) \
+    BOOST_PP_SEQ_CAT( (boost_se_capture_t_)(i)(_)(id) )
+
+#define BOOST_SCOPE_EXIT_AUX_WRAPPED(id, i) \
+    BOOST_PP_SEQ_CAT( (boost_se_wrapped_t_)(i)(_)(id) )
+
+#define BOOST_SCOPE_EXIT_AUX_DEREF(id, i, var) \
+    boost::scope_exit::aux::deref(var, (BOOST_SCOPE_EXIT_AUX_TAG(id,i))0)
+
+#define BOOST_SCOPE_EXIT_AUX_MEMBER(r, id, i, var) \
+    boost::scope_exit::aux::member<                \
+        BOOST_SCOPE_EXIT_AUX_PARAM_T(id,i,var),    \
+        BOOST_SCOPE_EXIT_AUX_TAG(id,i)             \
+    > BOOST_SCOPE_EXIT_AUX_PARAM(id,i,var);
+
+// idty is (id,typename) or (id,BOOST_PP_EMPTY())
+#define BOOST_SCOPE_EXIT_AUX_ARG_DECL(r, idty, i, var)             \
+    BOOST_PP_COMMA_IF(i) BOOST_PP_TUPLE_ELEM(2,1,idty)             \
+    BOOST_SCOPE_EXIT_AUX_PARAMS_T(BOOST_PP_TUPLE_ELEM(2,0,idty)):: \
+    BOOST_SCOPE_EXIT_AUX_PARAM_T(BOOST_PP_TUPLE_ELEM(2,0,idty), i, var) var
+#define BOOST_SCOPE_EXIT_AUX_ARG(r, id, i, var) BOOST_PP_COMMA_IF(i) \
+    boost_se_params_->BOOST_SCOPE_EXIT_AUX_PARAM(id,i,var).value
+
+#define BOOST_SCOPE_EXIT_AUX_TAG_DECL(r, id, i, var) \
+    typedef void (*BOOST_SCOPE_EXIT_AUX_TAG(id,i))(int var);
+
+
+#ifdef BOOST_SCOPE_EXIT_AUX_TPL_WORKAROUND
+
+#define BOOST_SCOPE_EXIT_AUX_PARAMS_T_CTOR(id, seq)
+
+#define BOOST_SCOPE_EXIT_AUX_PARAM_INIT(r, id, i, var) \
+    BOOST_PP_COMMA_IF(i) { BOOST_SCOPE_EXIT_AUX_DEREF(id,i,var) }
+
+#define BOOST_SCOPE_EXIT_AUX_PARAMS_INIT(id, seq) \
+    = { BOOST_PP_SEQ_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_PARAM_INIT, id, seq) };
+
+#else
+
+#define BOOST_SCOPE_EXIT_AUX_CTOR_ARG(r, id, i, var) BOOST_PP_COMMA_IF(i) \
+    BOOST_SCOPE_EXIT_AUX_PARAM_T(id,i,var) & BOOST_PP_CAT(a,i)
+
+#define BOOST_SCOPE_EXIT_AUX_MEMBER_INIT(r, id, i, var) BOOST_PP_COMMA_IF(i) \
+    BOOST_SCOPE_EXIT_AUX_PARAM(id,i,var) ( BOOST_PP_CAT(a,i) )
+
+#define BOOST_SCOPE_EXIT_AUX_PARAMS_T_CTOR(id, seq)                        \
+    BOOST_SCOPE_EXIT_AUX_PARAMS_T(id)(                                     \
+        BOOST_PP_SEQ_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_CTOR_ARG, id, seq ) ) \
+    : BOOST_PP_SEQ_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_MEMBER_INIT, id, seq) {}
+
+#define BOOST_SCOPE_EXIT_AUX_PARAM_INIT(r, id, i, var) \
+    BOOST_PP_COMMA_IF(i) BOOST_SCOPE_EXIT_AUX_DEREF(id,i,var)
+
+#define BOOST_SCOPE_EXIT_AUX_PARAMS_INIT(id, seq) \
+    ( BOOST_PP_SEQ_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_PARAM_INIT, id, seq) );
+
+#endif
+
+#if defined(BOOST_TYPEOF_EMULATION)
+
+#define BOOST_SCOPE_EXIT_AUX_CAPTURE_DECL(r, idty, i, var)                   \
+    struct BOOST_SCOPE_EXIT_AUX_WRAPPED(BOOST_PP_TUPLE_ELEM(2,0,idty), i)    \
+        : BOOST_TYPEOF(boost::scope_exit::aux::wrap(                         \
+        BOOST_SCOPE_EXIT_AUX_DEREF(BOOST_PP_TUPLE_ELEM(2,0,idty), i, var)))  \
+    {}; typedef BOOST_PP_TUPLE_ELEM(2,1,idty)                                \
+        BOOST_SCOPE_EXIT_AUX_WRAPPED(BOOST_PP_TUPLE_ELEM(2,0,idty), i)::type \
+        BOOST_SCOPE_EXIT_AUX_CAPTURE_T(BOOST_PP_TUPLE_ELEM(2,0,idty), i, var);
+
+#elif defined(BOOST_INTEL)
+
+#define BOOST_SCOPE_EXIT_AUX_CAPTURE_DECL(r, idty, i, var)                 \
+    typedef BOOST_TYPEOF_KEYWORD(                                          \
+        BOOST_SCOPE_EXIT_AUX_DEREF(BOOST_PP_TUPLE_ELEM(2,0,idty), i, var)) \
+        BOOST_SCOPE_EXIT_AUX_CAPTURE_T(BOOST_PP_TUPLE_ELEM(2,0,idty), i, var);
+
+#else
+
+#define BOOST_SCOPE_EXIT_AUX_CAPTURE_DECL(r, idty, i, var)                   \
+    typedef BOOST_TYPEOF(boost::scope_exit::aux::wrap(                       \
+        BOOST_SCOPE_EXIT_AUX_DEREF(BOOST_PP_TUPLE_ELEM(2,0,idty), i, var)))  \
+        BOOST_SCOPE_EXIT_AUX_WRAPPED(BOOST_PP_TUPLE_ELEM(2,0,idty), i);      \
+    typedef BOOST_PP_TUPLE_ELEM(2,1,idty)                                    \
+        BOOST_SCOPE_EXIT_AUX_WRAPPED(BOOST_PP_TUPLE_ELEM(2,0,idty), i)::type \
+        BOOST_SCOPE_EXIT_AUX_CAPTURE_T(BOOST_PP_TUPLE_ELEM(2,0,idty), i, var);
+
+#endif
+
+#define BOOST_SCOPE_EXIT_AUX_PARAM_DECL(r, idty, i, var) \
+    typedef BOOST_SCOPE_EXIT_AUX_CAPTURE_T(              \
+        BOOST_PP_TUPLE_ELEM(2,0,idty), i, var)           \
+        BOOST_SCOPE_EXIT_AUX_PARAM_T(BOOST_PP_TUPLE_ELEM(2,0,idty), i, var);
+
+
+#define BOOST_SCOPE_EXIT_AUX_IMPL(id, seq, ty)                                 \
+    BOOST_PP_SEQ_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_TAG_DECL, id, seq)            \
+    BOOST_PP_SEQ_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_CAPTURE_DECL, (id,ty), seq)   \
+    struct BOOST_SCOPE_EXIT_AUX_PARAMS_T(id) {                                 \
+        BOOST_PP_SEQ_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_PARAM_DECL, (id,ty), seq) \
+        BOOST_PP_SEQ_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_MEMBER, id, seq)          \
+        BOOST_SCOPE_EXIT_AUX_PARAMS_T_CTOR(id, seq)                            \
+    } BOOST_SCOPE_EXIT_AUX_PARAMS(id) BOOST_SCOPE_EXIT_AUX_PARAMS_INIT(id,seq) \
+    boost::scope_exit::aux::declared< boost::scope_exit::aux::resolve<         \
+        sizeof(boost_scope_exit_args)>::cmp1<0>::cmp2 > boost_scope_exit_args; \
+    boost_scope_exit_args.value = &BOOST_SCOPE_EXIT_AUX_PARAMS(id);            \
+    struct BOOST_SCOPE_EXIT_AUX_GUARD_T(id) {                                  \
+        BOOST_SCOPE_EXIT_AUX_PARAMS_T(id)* boost_se_params_;                   \
+        BOOST_SCOPE_EXIT_AUX_GUARD_T(id) (void* boost_se_params)               \
+            : boost_se_params_(                                                \
+                  (BOOST_SCOPE_EXIT_AUX_PARAMS_T(id)*)boost_se_params)         \
+        {}                                                                     \
+        ~BOOST_SCOPE_EXIT_AUX_GUARD_T(id)() { boost_se_body(                   \
+            BOOST_PP_SEQ_FOR_EACH_I(BOOST_SCOPE_EXIT_AUX_ARG, id, seq) ); }    \
+        static void boost_se_body(BOOST_PP_SEQ_FOR_EACH_I(                     \
+            BOOST_SCOPE_EXIT_AUX_ARG_DECL, (id,ty), seq) )
+
+#if defined(BOOST_MSVC)
+
+#define BOOST_SCOPE_EXIT_END } BOOST_SCOPE_EXIT_AUX_GUARD(__COUNTER__) ( \
+    boost_scope_exit_args.value);
+
+#define BOOST_SCOPE_EXIT(seq) \
+    BOOST_SCOPE_EXIT_AUX_IMPL(__COUNTER__, seq, BOOST_PP_EMPTY())
+
+#else
+
+#define BOOST_SCOPE_EXIT_END } BOOST_SCOPE_EXIT_AUX_GUARD(__LINE__) ( \
+    boost_scope_exit_args.value);
+
+#define BOOST_SCOPE_EXIT(seq) \
+    BOOST_SCOPE_EXIT_AUX_IMPL(__LINE__, seq, BOOST_PP_EMPTY())
+
+#endif
+
+#ifdef BOOST_SCOPE_EXIT_AUX_TPL_WORKAROUND
+#define BOOST_SCOPE_EXIT_TPL(seq) \
+    BOOST_SCOPE_EXIT_AUX_IMPL(__LINE__, seq, typename)
+#else
+#define BOOST_SCOPE_EXIT_TPL(seq) BOOST_SCOPE_EXIT(seq)
+#endif
+
+#endif // #ifndef FILE_boost_scope_exit_hpp_INCLUDED
+
index 990f034e75c4921382ba3b27b4d8a2a95d89c4f5..40256d6cd3dccea295afd58c2b8f941a852e647b 100644 (file)
@@ -106,6 +106,15 @@ public:
         T & t, 
         const unsigned int file_version
     ){
+        // note: if you get a compile time error here with a
+        // message something like:
+        // cannot convert parameter 1 from <file type 1> to <file type 2 &>
+        // a likely possible cause is that the class T contains a 
+        // serialize function - but that serialize function isn't 
+        // a template and corresponds to a file type different than
+        // the class Archive.  To resolve this, don't include an
+        // archive type other than that for which the serialization
+        // function is defined!!!
         t.serialize(ar, file_version);
     }
     template<class T>
index cdc9b59d38947f7573eaa6054bab7708eb913aa5..3640c5d8c1865beb883052d98f957d67e947322b 100644 (file)
@@ -6,16 +6,7 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/split_member.hpp>
-#include <boost/serialization/wrapper.hpp>
-#include <boost/mpl/always.hpp>
-#include <boost/mpl/apply.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/array.hpp>
 #include <iostream>
-
 #include <cstddef> // std::size_t
 #include <cstddef>
 #include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
@@ -25,6 +16,15 @@ namespace std{
 } // namespace std
 #endif
 
+#include <boost/serialization/nvp.hpp>
+#include <boost/serialization/split_member.hpp>
+#include <boost/serialization/wrapper.hpp>
+#include <boost/mpl/always.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/array.hpp>
+
 namespace boost { namespace serialization {
 
 // traits to specify whether to use  an optimized array serialization
@@ -42,8 +42,8 @@ struct use_array_optimization : boost::mpl::always<boost::mpl::false_> {};
 #endif
 
 template<class T>
-class array
: public wrapper_traits<const array<T> >
+class array :
   public wrapper_traits<const array<T> >
 {
 public:    
     typedef T value_type;
@@ -52,7 +52,15 @@ public:
         m_t(t),
         m_element_count(s)
     {}
-    
+    array(const array & rhs) :
+        m_t(rhs.m_t),
+        m_element_count(rhs.m_element_count)
+    {}
+    array & operator=(const array & rhs){
+        m_t = rhs.m_t;
+        m_element_count = rhs.m_element_count;
+    }
+
     // default implementation
     template<class Archive>
     void serialize_optimized(Archive &ar, const unsigned int, mpl::false_ ) const
@@ -108,7 +116,7 @@ public:
     
 private:
     value_type* m_t;
-    std::size_t const m_element_count;
+    std::size_t m_element_count;
 };
 
 template<class T>
@@ -126,8 +134,6 @@ void serialize(Archive& ar, boost::array<T,N>& a, const unsigned int /* version
   ar & boost::serialization::make_nvp("elems",a.elems);
 }
 
-
-
 } } // end namespace boost::serialization
 
 #ifdef __BORLANDC__
index 2a2d2af87820a4ef4ed10d4c3a825f07fd3d2ac9..0d8d027cd0ca0d711e26f7b468fc78fe79c12e56 100644 (file)
@@ -39,8 +39,8 @@ namespace serialization {
 struct binary_object :
     public wrapper_traits<nvp<const binary_object> >
 {
-    /* const */ void * const m_t;
-    const std::size_t m_size;
+    void const * m_t;
+    std::size_t m_size;
     template<class Archive>
     void save(Archive & ar, const unsigned int /* file_version */) const {
         ar.save_binary(m_t, m_size);
@@ -50,6 +50,11 @@ struct binary_object :
         ar.load_binary(const_cast<void *>(m_t), m_size);
     }
     BOOST_SERIALIZATION_SPLIT_MEMBER()
+    binary_object & operator=(const binary_object & rhs) {
+        m_t = rhs.m_t;
+        m_size = rhs.m_size;
+        return *this;
+    }
     binary_object(/* const */ void * const t, std::size_t size) :
         m_t(t),
         m_size(size)
index 568b8074022c899e551163347d58966978d6864b..60453c79390806b55591cb0bbd51a146d1133dd7 100644 (file)
@@ -27,6 +27,7 @@
 #include <boost/mpl/integral_c_tag.hpp>
 
 #include <boost/cstdint.hpp>
+#include <boost/integer_traits.hpp>
 #include <climits> // ULONG_MAX
 #include <boost/serialization/level.hpp>
 
@@ -47,30 +48,10 @@ struct implementation_level< C < T > > {                            \
     /**/
 #endif
 
-// determine if its necessary to handle (u)int64_t specifically
-// i.e. that its not a synonym for (unsigned) long
-// if there is no 64 bit int or if its the same as a long
-// we shouldn't define separate functions for int64 data types.
-#if defined(BOOST_NO_INT64_T)  
-     #define BOOST_NO_INTRINSIC_INT64_T  
-#else   
-    #if defined(ULLONG_MAX)  
-        #if(ULONG_MAX == 18446744073709551615ul) // 2**64 - 1  
-            #define BOOST_NO_INTRINSIC_INT64_T  
-        #endif  
-    #elif defined(ULONG_MAX)  
-        #if(ULONG_MAX != 0xffffffff && ULONG_MAX == 18446744073709551615ul) // 2**64 - 1  
-            #define BOOST_NO_INTRINSIC_INT64_T  
-        #endif  
-    #else   
-        #define BOOST_NO_INTRINSIC_INT64_T  
-    #endif  
-#endif  
-
-#if !defined(BOOST_NO_INTRINSIC_INT64_T)
+#if defined(BOOST_HAS_LONG_LONG)
     #define BOOST_SERIALIZATION_COLLECTION_TRAITS_HELPER_INT64(C)    \
-    BOOST_SERIALIZATION_COLLECTION_TRAITS_HELPER(boost::int64_t, C)  \
-    BOOST_SERIALIZATION_COLLECTION_TRAITS_HELPER(boost::uint64_t, C) \
+    BOOST_SERIALIZATION_COLLECTION_TRAITS_HELPER(boost::long_long_type, C)  \
+    BOOST_SERIALIZATION_COLLECTION_TRAITS_HELPER(boost::ulong_long_type, C) \
     /**/
 #else
     #define BOOST_SERIALIZATION_COLLECTION_TRAITS_HELPER_INT64(C)
index 04e50519938238fa8717616b11f74b286f3ea080..4013778c650513f3c88d6f9e7022f40aec7abbf3 100644 (file)
@@ -50,10 +50,12 @@ namespace stl {
 template<class Archive, class Container>
 struct archive_input_seq
 {
-    inline void operator()(
+    inline BOOST_DEDUCED_TYPENAME Container::iterator
+    operator()(
         Archive &ar, 
         Container &s, 
-        const unsigned int v
+        const unsigned int v,
+        BOOST_DEDUCED_TYPENAME Container::iterator hint
     ){
         typedef BOOST_DEDUCED_TYPENAME Container::value_type type;
         detail::stack_construct<Archive, type> t(ar, v);
@@ -61,6 +63,7 @@ struct archive_input_seq
         ar >> boost::serialization::make_nvp("item", t.reference());
         s.push_back(t.reference());
         ar.reset_object_address(& s.back() , & t.reference());
+        return hint;
     }
 };
 
@@ -68,51 +71,27 @@ struct archive_input_seq
 template<class Archive, class Container>
 struct archive_input_map
 {
-    inline void operator()(
+    inline BOOST_DEDUCED_TYPENAME Container::iterator
+    operator()(
         Archive &ar, 
         Container &s, 
-        const unsigned int v
+        const unsigned int v,
+        BOOST_DEDUCED_TYPENAME Container::iterator hint
     ){
         typedef BOOST_DEDUCED_TYPENAME Container::value_type type;
         detail::stack_construct<Archive, type> t(ar, v);
         // borland fails silently w/o full namespace
         ar >> boost::serialization::make_nvp("item", t.reference());
-        std::pair<BOOST_DEDUCED_TYPENAME Container::const_iterator, bool> result = 
-            s.insert(t.reference());
-        // note: the following presumes that the map::value_type was NOT tracked
-        // in the archive.  This is the usual case, but here there is no way
-        // to determine that.  
-        if(result.second){
-            ar.reset_object_address(
-                & (result.first->second),
-                & t.reference().second
-            );
-        }
-    }
-};
-
-// multimap input
-template<class Archive, class Container>
-struct archive_input_multimap
-{
-    inline void operator()(
-        Archive &ar, 
-        Container &s, 
-        const unsigned int v
-    ){
-        typedef BOOST_DEDUCED_TYPENAME Container::value_type type;
-        detail::stack_construct<Archive, type> t(ar, v);
-        // borland fails silently w/o full namespace
-        ar >> boost::serialization::make_nvp("item", t.reference());
-        BOOST_DEDUCED_TYPENAME Container::const_iterator result 
-            = s.insert(t.reference());
+        BOOST_DEDUCED_TYPENAME Container::iterator result = 
+            s.insert(hint, t.reference());
         // note: the following presumes that the map::value_type was NOT tracked
         // in the archive.  This is the usual case, but here there is no way
         // to determine that.  
         ar.reset_object_address(
-            & result->second,
-            & t.reference()
+            & (result->second),
+            & t.reference().second
         );
+        return result;
     }
 };
 
@@ -120,38 +99,21 @@ struct archive_input_multimap
 template<class Archive, class Container>
 struct archive_input_set
 {
-    inline void operator()(
-        Archive &ar, 
-        Container &s, 
-        const unsigned int v
-    ){
-        typedef BOOST_DEDUCED_TYPENAME Container::value_type type;
-        detail::stack_construct<Archive, type> t(ar, v);
-        // borland fails silently w/o full namespace
-        ar >> boost::serialization::make_nvp("item", t.reference());
-        std::pair<BOOST_DEDUCED_TYPENAME Container::const_iterator, bool> result = 
-            s.insert(t.reference());
-        if(result.second)
-            ar.reset_object_address(& (* result.first), & t.reference());
-    }
-};
-
-// multiset input
-template<class Archive, class Container>
-struct archive_input_multiset
-{
-    inline void operator()(
+    inline BOOST_DEDUCED_TYPENAME Container::iterator
+    operator()(
         Archive &ar, 
         Container &s, 
-        const unsigned int v
+        const unsigned int v,
+        BOOST_DEDUCED_TYPENAME Container::iterator hint
     ){
         typedef BOOST_DEDUCED_TYPENAME Container::value_type type;
         detail::stack_construct<Archive, type> t(ar, v);
         // borland fails silently w/o full namespace
         ar >> boost::serialization::make_nvp("item", t.reference());
-        BOOST_DEDUCED_TYPENAME Container::const_iterator result 
-            = s.insert(t.reference());
+        BOOST_DEDUCED_TYPENAME Container::iterator result = 
+            s.insert(hint, t.reference());
         ar.reset_object_address(& (* result), & t.reference());
+        return result;
     }
 };
 
@@ -187,8 +149,10 @@ inline void load_collection(Archive & ar, Container &s)
     rx(s, count);
     std::size_t c = count;
     InputFunction ifunc;
+    BOOST_DEDUCED_TYPENAME Container::iterator hint;
+    hint = s.begin();
     while(c-- > 0){
-        ifunc(ar, s, item_version);
+        hint = ifunc(ar, s, item_version, hint);
     }
 }
 
index 60580f65f1f530fdc319eb78e3e1e00a9de62697..02f8944c82fd105301c6f9cf6886172aa50869ca 100644 (file)
@@ -47,7 +47,7 @@ inline void save_collection(Archive & ar, const Container &s)
         ar << BOOST_SERIALIZATION_NVP(item_version);
     }
     BOOST_DEDUCED_TYPENAME Container::const_iterator it = s.begin();
-    std::size_t c=count;
+    collection_size_type c=count;
     while(c-- > 0){
             // note borland emits a no-op without the explicit namespace
             boost::serialization::save_construct_data_adl(
index d1637007eb2544f76d3a2c7366c2f31a2bbfbc07..da397feb3bcf741af0c2ab686089c2133f7fdff8 100644 (file)
@@ -34,6 +34,7 @@
 #include <boost/mpl/not.hpp>
 #include <boost/mpl/bool.hpp>
 
+#include <boost/serialization/extended_type_info.hpp> // for guid_defined only
 #include <boost/serialization/static_warning.hpp>
 #include <boost/serialization/assume_abstract.hpp>
 #include <boost/serialization/force_include.hpp>
@@ -115,6 +116,10 @@ ptr_serialization_support<Archive,Serializable>::instantiate()
     );
 }
 
+// Note INTENTIONAL usage of anonymous namespace in header.
+// This was made this way so that export.hpp could be included
+// in other headers.  This is still under study.
+
 namespace {
 
 template<class T>
index ef8f8bcfae50a7665c0ed9ff399cda37eae4ab2d..4799432885fe6df13ee5bb490e014cb311a98187 100644 (file)
@@ -82,13 +82,8 @@ public:
     }
     static const extended_type_info * find(const char *key);
     // for plugins
-    virtual void * construct(unsigned int /*count*/ = 0, ...) const {
-        assert(false); // must be implemented if used
-        return NULL;
-    };
-    virtual void destroy(void const * const /*p*/) const {
-        assert(false); // must be implemented if used
-    }
+    virtual void * construct(unsigned int /*count*/ = 0, ...) const = 0;
+    virtual void destroy(void const * const /*p*/) const = 0;
 };
 
 template<class T>
index 15254fba37f6d45fdf5180c127d2963efd29cf21..5ba09b2e186f45fd7df72eb3963bbb6d35cb49f0 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <boost/mpl/if.hpp>
 #include <boost/type_traits/is_polymorphic.hpp>
+#include <boost/type_traits/remove_const.hpp>
 
 #include <boost/serialization/static_warning.hpp>
 #include <boost/serialization/singleton.hpp>
 #include <boost/serialization/factory.hpp>
 #include <boost/serialization/throw_exception.hpp>
 
+// hijack serialization access
+#include <boost/serialization/access.hpp>
+
 #include <boost/config/abi_prefix.hpp> // must be the last header
 #ifdef BOOST_MSVC
 #  pragma warning(push)
-#  pragma warning(disable : 4251 4231 4660 4275)
+#  pragma warning(disable : 4251 4231 4660 4275 4511 4512)
 #endif
 
 namespace boost {
@@ -125,15 +129,15 @@ public:
         va_start(ap, count);
         switch(count){
         case 0:
-            return factory<T, 0>(ap);
+            return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 0>(ap);
         case 1:
-            return factory<T, 1>(ap);
+            return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 1>(ap);
         case 2:
-            return factory<T, 2>(ap);
+            return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 2>(ap);
         case 3:
-            return factory<T, 3>(ap);
+            return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 3>(ap);
         case 4:
-            return factory<T, 4>(ap);
+            return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 4>(ap);
         default:
             assert(false); // too many arguments
             // throw exception here?
@@ -141,7 +145,10 @@ public:
         }
     }
     virtual void destroy(void const * const p) const{
-        delete static_cast<T const *>(p) ;
+        boost::serialization::access::destroy(
+            static_cast<T const * const>(p)
+        );
+        //delete static_cast<T const * const>(p) ;
     }
 };
 
index eb0175333ec1d4c8723ccf5f8f0fdd0c3547b9e3..701cd5aecc4784f97b40ecb39e66939a96672845 100644 (file)
 #include <boost/serialization/extended_type_info.hpp>
 #include <boost/serialization/factory.hpp>
 
+// hijack serialization access
+#include <boost/serialization/access.hpp>
+
 #include <boost/mpl/if.hpp>
 
 #include <boost/config/abi_prefix.hpp> // must be the last header
+
 #ifdef BOOST_MSVC
 #  pragma warning(push)
-#  pragma warning(disable : 4251 4231 4660 4275)
+#  pragma warning(disable : 4251 4231 4660 4275 4511 4512)
 #endif
 
 namespace boost {
@@ -109,30 +113,26 @@ public:
         va_start(ap, count);
         switch(count){
         case 0:
-            return factory<boost::remove_const<T>, 0>(ap);
+            return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 0>(ap);
         case 1:
-            return factory<boost::remove_const<T>, 1>(ap);
+            return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 1>(ap);
         case 2:
-            return factory<boost::remove_const<T>, 2>(ap);
+            return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 2>(ap);
         case 3:
-            return factory<boost::remove_const<T>, 3>(ap);
+            return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 3>(ap);
         case 4:
-            return factory<boost::remove_const<T>, 4>(ap);
+            return factory<BOOST_DEDUCED_TYPENAME boost::remove_const<T>::type, 4>(ap);
         default:
             assert(false); // too many arguments
             // throw exception here?
             return NULL;
         }
     }
-    virtual void destroy(void const * const /* p */) const {
-        // the only current usage of extended type info is in the
-        // serialization library.  The statement below requires
-        // that destructor of type T be public and this creates
-        // a problem for some users.  So, for now, comment this
-        // out 
-        //delete static_cast<T const *>(p);
-        // and trap any attempt to invoke this function
-        assert(false);
+    virtual void destroy(void const * const p) const {
+        boost::serialization::access::destroy(
+            static_cast<T const * const>(p)
+        );
+        //delete static_cast<T const * const>(p);
     }
 };
 
index c7730cb8c4d90ce693a1d393f38619e5d931baef..9039a32c7af0abf29880bebcc101099c6f748d89 100644 (file)
@@ -24,7 +24,7 @@
 #include <boost/preprocessor/facilities/empty.hpp>
 
 namespace std{
-    #if defined(__LIBCOMO__)
+    #if defined(__LIBCOMO__) || defined(__QNXNTO__) 
         using ::va_list;
     #endif
 } // namespace std
@@ -88,6 +88,14 @@ namespace serialization {                                 \
     BOOST_SERIALIZATION_FACTORY(1, T, A0, 0, 0, 0)
 
 #define BOOST_SERIALIZATION_FACTORY_0(T)                 \
-    BOOST_SERIALIZATION_FACTORY(0, T, 0, 0, 0, 0)
+namespace boost {                                        \
+namespace serialization {                                \
+    template<>                                           \
+    T * factory<T, 0>(std::va_list){                     \
+        return new T();                                  \
+    }                                                    \
+}                                                        \
+}                                                        \
+/**/
 
 #endif // BOOST_SERIALIZATION_FACTORY_HPP
index cd5bea8d1895e30cf3d7412cb124c29e15b49c0b..45319153d66d2e08eb8d00ec45f240a1978c2a02 100644 (file)
@@ -20,7 +20,7 @@
 // helper function templates for serialization of hashed collections
 #include <boost/config.hpp>
 #include <boost/serialization/nvp.hpp>
-#include <boost/serialization/collections_load_imp.hpp>
+//#include <boost/serialization/collections_load_imp.hpp>
 
 namespace boost{
 namespace serialization {
index 06d4c306dc1aaf99d408a1f8eee53f5caeef25e5..f5327388aa7eaace62b075462311634693bba901 100644 (file)
 namespace boost { 
 namespace serialization {
 
+namespace stl {
+
+// map input
+template<class Archive, class Container>
+struct archive_input_hash_map
+{
+    inline void operator()(
+        Archive &ar, 
+        Container &s, 
+        const unsigned int v
+    ){
+        typedef BOOST_DEDUCED_TYPENAME Container::value_type type;
+        detail::stack_construct<Archive, type> t(ar, v);
+        // borland fails silently w/o full namespace
+        ar >> boost::serialization::make_nvp("item", t.reference());
+        std::pair<BOOST_DEDUCED_TYPENAME Container::const_iterator, bool> result = 
+            s.insert(t.reference());
+        // note: the following presumes that the map::value_type was NOT tracked
+        // in the archive.  This is the usual case, but here there is no way
+        // to determine that.  
+        if(result.second){
+            ar.reset_object_address(
+                & (result.first->second),
+                & t.reference().second
+            );
+        }
+    }
+};
+
+// multimap input
+template<class Archive, class Container>
+struct archive_input_hash_multimap
+{
+    inline void operator()(
+        Archive &ar, 
+        Container &s, 
+        const unsigned int v
+    ){
+        typedef BOOST_DEDUCED_TYPENAME Container::value_type type;
+        detail::stack_construct<Archive, type> t(ar, v);
+        // borland fails silently w/o full namespace
+        ar >> boost::serialization::make_nvp("item", t.reference());
+        BOOST_DEDUCED_TYPENAME Container::const_iterator result 
+            = s.insert(t.reference());
+        // note: the following presumes that the map::value_type was NOT tracked
+        // in the archive.  This is the usual case, but here there is no way
+        // to determine that.  
+        ar.reset_object_address(
+            & result->second,
+            & t.reference()
+        );
+    }
+};
+
+} // stl
+
 template<
     class Archive, 
     class Key, 
@@ -70,7 +126,7 @@ inline void load(
         BOOST_STD_EXTENSION_NAMESPACE::hash_map<
             Key, HashFcn, EqualKey, Allocator
         >,
-        boost::serialization::stl::archive_input_map<
+        boost::serialization::stl::archive_input_hash_map<
             Archive, 
             BOOST_STD_EXTENSION_NAMESPACE::hash_map<
                 Key, HashFcn, EqualKey, Allocator
@@ -140,7 +196,7 @@ inline void load(
         BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
             Key, HashFcn, EqualKey, Allocator
         >,
-        boost::serialization::stl::archive_input_multimap<
+        boost::serialization::stl::archive_input_hash_multimap<
             Archive, 
             BOOST_STD_EXTENSION_NAMESPACE::hash_multimap<
                 Key, HashFcn, EqualKey, Allocator
index 62aeea46017fa7debca9dba7434441ed3cc553f3..916c2dd146edeca82b0a9903f0e7540af57fe317 100644 (file)
 namespace boost { 
 namespace serialization {
 
+namespace stl {
+
+// hash_set input
+template<class Archive, class Container>
+struct archive_input_hash_set
+{
+    inline void operator()(
+        Archive &ar, 
+        Container &s, 
+        const unsigned int v
+    ){
+        typedef BOOST_DEDUCED_TYPENAME Container::value_type type;
+        detail::stack_construct<Archive, type> t(ar, v);
+        // borland fails silently w/o full namespace
+        ar >> boost::serialization::make_nvp("item", t.reference());
+        std::pair<BOOST_DEDUCED_TYPENAME Container::const_iterator, bool> result = 
+            s.insert(t.reference());
+        if(result.second)
+            ar.reset_object_address(& (* result.first), & t.reference());
+    }
+};
+
+// hash_multiset input
+template<class Archive, class Container>
+struct archive_input_hash_multiset
+{
+    inline void operator()(
+        Archive &ar, 
+        Container &s, 
+        const unsigned int v
+    ){
+        typedef BOOST_DEDUCED_TYPENAME Container::value_type type;
+        detail::stack_construct<Archive, type> t(ar, v);
+        // borland fails silently w/o full namespace
+        ar >> boost::serialization::make_nvp("item", t.reference());
+        BOOST_DEDUCED_TYPENAME Container::const_iterator result 
+            = s.insert(t.reference());
+        ar.reset_object_address(& (* result), & t.reference());
+    }
+};
+
+} // stl
+
 template<
     class Archive, 
     class Key, 
@@ -68,7 +111,7 @@ inline void load(
         BOOST_STD_EXTENSION_NAMESPACE::hash_set<
             Key, HashFcn, EqualKey, Allocator
         >,
-        boost::serialization::stl::archive_input_set<
+        boost::serialization::stl::archive_input_hash_set<
             Archive, 
             BOOST_STD_EXTENSION_NAMESPACE::hash_set<
                 Key, HashFcn, EqualKey, Allocator
@@ -138,7 +181,7 @@ inline void load(
         BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<
             Key, HashFcn, EqualKey, Allocator
         >,
-        boost::serialization::stl::archive_input_multiset<
+        boost::serialization::stl::archive_input_hash_multiset<
             Archive,
             BOOST_STD_EXTENSION_NAMESPACE::hash_multiset<
                 Key, HashFcn, EqualKey, Allocator
index 6cf965ff8b1d0e3f1ad17d908c9e39575275ffb1..624290df1ab8f7606e2ea374e22d554bc7e8d6b5 100644 (file)
@@ -92,7 +92,7 @@ inline void load(
     boost::serialization::stl::load_collection<
         Archive,
         std::multimap<Key, Type, Compare, Allocator>,
-        boost::serialization::stl::archive_input_multimap<
+        boost::serialization::stl::archive_input_map<
             Archive, std::multimap<Key, Type, Compare, Allocator> 
         >,
         boost::serialization::stl::no_reserve_imp<
index c67c27ed4da5662f22d4d886ae16087cb3314792..4bb69abb9360576833e0a0887ebaca6242d99b3d 100644 (file)
@@ -89,7 +89,7 @@ inline void load(
     boost::serialization::stl::load_collection<
         Archive,
         std::multiset<Key, Compare, Allocator>,
-        boost::serialization::stl::archive_input_multiset<
+        boost::serialization::stl::archive_input_set<
             Archive, std::multiset<Key, Compare, Allocator> 
         >,
         boost::serialization::stl::no_reserve_imp<
index 53c0384604889e982c798bcd5836f4092b956e9e..ff2f718fe228785ac9f7debe6beb8eb1e9456351 100644 (file)
@@ -16,7 +16,6 @@
 
 //  See http://www.boost.org for updates, documentation, and revision history.
 
-#include <map>
 #include <cstddef> // NULL
 
 #include <boost/config.hpp>
@@ -108,6 +107,7 @@ inline void save(
     ar << boost::serialization::make_nvp("px", t_ptr);
 }
 
+#ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP
 template<class Archive, class T>
 inline void load(
     Archive & ar,
@@ -119,7 +119,6 @@ inline void load(
     // is never tracked by default.  Wrap int in a trackable type
     BOOST_STATIC_ASSERT((tracking_level<T>::value != track_never));
     T* r;
-    #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP
     if(file_version < 1){
         //ar.register_type(static_cast<
         //    boost_132::detail::sp_counted_base_impl<T *, boost::checked_deleter<T> > *
@@ -134,14 +133,29 @@ inline void load(
         ar.append(sp);
         r = sp.get();
     }
-    else    
-    #endif
-    {
+    else{
         ar >> boost::serialization::make_nvp("px", r);
     }
     ar.reset(t,r);
 }
 
+#else
+template<class Archive, class T>
+inline void load(
+    Archive & ar,
+    boost::shared_ptr<T> &t,
+    const unsigned int /*file_version*/
+){
+    // The most common cause of trapping here would be serializing
+    // something like shared_ptr<int>.  This occurs because int
+    // is never tracked by default.  Wrap int in a trackable type
+    BOOST_STATIC_ASSERT((tracking_level<T>::value != track_never));
+    T* r;
+    ar >> boost::serialization::make_nvp("px", r);
+    ar.reset(t,r);
+}
+#endif
+
 template<class Archive, class T>
 inline void serialize(
     Archive & ar,
index cca3b3eb00c658186438826655fc7ca57b618fc4..b22e517c3b341cf38d0223c3cb68518759be80e3 100644 (file)
 #endif 
 
 #include <cassert>
+#include <boost/config.hpp>
 #include <boost/noncopyable.hpp>
 #include <boost/serialization/force_include.hpp>
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4511 4512)
+#endif
+
 namespace boost { 
 namespace serialization { 
 
@@ -71,7 +77,8 @@ namespace serialization {
 // attempt to retieve a mutable instances while locked will
 // generate a assertion if compiled for debug.
 
-class singleton_module  : public boost::noncopyable
+class singleton_module : 
+    public boost::noncopyable
 {
 private:
     static bool & get_lock(){
@@ -144,4 +151,8 @@ BOOST_DLLEXPORT T & singleton<T>::instance = singleton<T>::get_instance();
 } // namespace serialization
 } // namespace boost
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 #endif // BOOST_SERIALIZATION_SINGLETON_HPP
index 0a03acf92beb41520beaf29e8662966eb382e751..9e741cc3690d42b8a1fc0ea84312f8234467b459 100644 (file)
@@ -69,7 +69,7 @@ inline void load(
     t.push_front(u.reference());
     BOOST_DEDUCED_TYPENAME BOOST_STD_EXTENSION_NAMESPACE::slist<U, Allocator>::iterator last;
     last = t.begin();
-    std::size_t c = count;
+    collection_size_type c = count;
     while(--c > 0){
         boost::serialization::detail::stack_construct<Archive, U> 
             u(ar, file_version);
index 280598e3d10ea77d3e50e1bd4ca5eeffa3cc627b..b41791ad86c0de40b6f9ff8bfdde5ab294dc2970 100644 (file)
@@ -77,7 +77,7 @@ namespace boost {
 namespace serialization {
 
 template<int L> 
-struct STATIC_WARNING_LINE{};
+struct BOOST_SERIALIZATION_STATIC_WARNING_LINE{};
 
 template<bool B, int L>
 struct static_warning_test{
@@ -86,23 +86,23 @@ struct static_warning_test{
         boost::mpl::true_,
         typename boost::mpl::identity<
             boost::mpl::print<
-                STATIC_WARNING_LINE<L>
+                BOOST_SERIALIZATION_STATIC_WARNING_LINE<L>
             >
         >
     >::type type;
 };
 
 template<int i>
-struct SS {};
+struct BOOST_SERIALIZATION_SS {};
 
 } // serialization
 } // boost
 
-#define BSW(B, L) \
-    typedef boost::serialization::SS< \
+#define BOOST_SERIALIZATION_BSW(B, L) \
+    typedef boost::serialization::BOOST_SERIALIZATION_SS< \
         sizeof( boost::serialization::static_warning_test< B, L > ) \
     > BOOST_JOIN(STATIC_WARNING_LINE, L);
 
-#define BOOST_STATIC_WARNING(B) BSW(B, __LINE__)
+#define BOOST_STATIC_WARNING(B) BOOST_SERIALIZATION_BSW(B, __LINE__)
 
 #endif // BOOST_SERIALIZATION_STATIC_WARNING_HPP
index dad0efe5799022c648a8e5698d0de96cf0a2db6d..ed7d8109f2ab29f802337335c516c46048f21809 100644 (file)
@@ -26,7 +26,7 @@ namespace serialization {
 
 #ifdef BOOST_NO_EXCEPTIONS
 
-void inline throw_exception(std::exception const & e) {
+inline void throw_exception(std::exception const & e) {
     ::boost::throw_exception(e);
 }
 
index fef50956d881311d2fb13192ef1ce3d82d3326e9..5ab822d5431a704f980d6c62f9c9ee8f03a2a0c2 100644 (file)
@@ -46,7 +46,9 @@ namespace boost {
 namespace serialization {
 
 template<class Archive>
-struct variant_save_visitor : boost::static_visitor<> {
+struct variant_save_visitor : 
+    boost::static_visitor<> 
+{
     variant_save_visitor(Archive& ar) :
         m_ar(ar)
     {}
index 54c72fc26e8255ab0aa69a4ff50e15bba8676eb5..e1a2fad3333ca549bdd44daa4f0d9153a2e28827 100644 (file)
@@ -23,7 +23,6 @@
 #include <boost/mpl/integral_c_tag.hpp>
 
 #include <boost/type_traits/is_base_and_derived.hpp>
-//#include <boost/serialization/traits.hpp>
 
 namespace boost { 
 namespace serialization {
@@ -67,8 +66,19 @@ struct version
 //#include <boost/serialization/level.hpp>
 //#include <boost/mpl/equal_to.hpp>
 
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/comparison.hpp>
+
 // specify the current version number for the class
+// version numbers limited to 8 bits !!!
 #define BOOST_CLASS_VERSION(T, N)                                      \
+BOOST_MPL_ASSERT((                                                     \
+    boost::mpl::less<                                                  \
+        boost::mpl::int_<N>,                                           \
+        boost::mpl::int_<256>                                          \
+    >                                                                  \
+));                                                                    \
 namespace boost {                                                      \
 namespace serialization {                                              \
 template<>                                                             \
index 183a4710d62b37bdfc99446697f3948dc132dcc3..6190849da2086e781fa3a3b0067cdc538969c7af 100644 (file)
@@ -143,6 +143,11 @@ public:
     virtual ~void_caster(){}
 };
 
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable : 4251 4231 4660 4275 4511 4512)
+#endif
+
 template <class Derived, class Base>
 class void_caster_primitive : 
     public void_caster
@@ -163,7 +168,7 @@ class void_caster_primitive :
     }
 public:
     void_caster_primitive();
-    ~void_caster_primitive();
+    virtual ~void_caster_primitive();
 };
 
 template <class Derived, class Base>
@@ -208,9 +213,13 @@ public:
         return b;
     }
     void_caster_virtual_base();
-    ~void_caster_virtual_base();
+    virtual ~void_caster_virtual_base();
 };
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 template <class Derived, class Base>
 void_caster_virtual_base<Derived,Base>::void_caster_virtual_base() :
     void_caster( 
index a0db064c4a46f6f76dc8095f08a349c3ee1834d9..403c18ab550d17b965a079acc1af0e314653cd25 100644 (file)
@@ -29,7 +29,7 @@ inline void save(
     const unsigned int /* file_version */
 ){
     const boost::shared_ptr<T> sp = t.lock();
-        ar << boost::serialization::make_nvp("shared_ptr", sp);
+    ar << boost::serialization::make_nvp("weak_ptr", sp);
 }
 
 template<class Archive, class T>
@@ -39,7 +39,7 @@ inline void load(
     const unsigned int /* file_version */
 ){
     boost::shared_ptr<T> sp;
-        ar >> boost::serialization::make_nvp("shared_ptr", sp);
+    ar >> boost::serialization::make_nvp("weak_ptr", sp);
     t = sp;
 }
 
diff --git a/deal.II/contrib/boost/include/boost/signals2.hpp b/deal.II/contrib/boost/include/boost/signals2.hpp
new file mode 100644 (file)
index 0000000..09fe640
--- /dev/null
@@ -0,0 +1,18 @@
+//  A convenience header for Boost.Signals2, should pull in everying in the library.
+
+//  Copyright (c) 2008-2009 Frank Mori Hess
+
+// 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)
+
+// For documentation, see http://www.boost.org/libs/signals2/
+
+#include <boost/signals2/deconstruct.hpp>
+#include <boost/signals2/deconstruct_ptr.hpp>
+#include <boost/signals2/dummy_mutex.hpp>
+#include <boost/signals2/last_value.hpp>
+#include <boost/signals2/signal.hpp>
+#include <boost/signals2/signal_type.hpp>
+#include <boost/signals2/shared_connection_block.hpp>
index fc20dbb14515f6bb1f7ac3e54aca73ad63864571..8eda51823383bfd6dd17486a657a5fde8c884e0a 100644 (file)
@@ -17,6 +17,7 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 
+#include <boost/assert.hpp>
 #include <pthread.h>
 
 namespace boost
@@ -42,15 +43,15 @@ public:
 // HPUX 10.20 / DCE has a nonstandard pthread_mutex_init
 
 #if defined(__hpux) && defined(_DECTHREADS_)
-        pthread_mutex_init(&m_, pthread_mutexattr_default);
+        BOOST_VERIFY( pthread_mutex_init( &m_, pthread_mutexattr_default ) == 0 );
 #else
-        pthread_mutex_init(&m_, 0);
+        BOOST_VERIFY( pthread_mutex_init( &m_, 0 ) == 0 );
 #endif
     }
 
     ~lightweight_mutex()
     {
-        pthread_mutex_destroy(&m_);
+        BOOST_VERIFY( pthread_mutex_destroy( &m_ ) == 0 );
     }
 
     class scoped_lock;
@@ -69,12 +70,12 @@ public:
 
         scoped_lock(lightweight_mutex & m): m_(m.m_)
         {
-            pthread_mutex_lock(&m_);
+            BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
         }
 
         ~scoped_lock()
         {
-            pthread_mutex_unlock(&m_);
+            BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
         }
     };
 };
index 6d136f82d73f2dbb25561260ecd9d0aa6c1978c3..159bd5e7aa88e86cf8b519ac39af944a189bd5e0 100644 (file)
@@ -74,8 +74,9 @@ template<unsigned size, unsigned align_> struct allocator_impl
 
     static lightweight_mutex & mutex()
     {
-        static lightweight_mutex m;
-        return m;
+        static freeblock< sizeof( lightweight_mutex ), boost::alignment_of< lightweight_mutex >::value > fbm;
+        static lightweight_mutex * pm = new( &fbm ) lightweight_mutex;
+        return *pm;
     }
 
     static lightweight_mutex * mutex_init;
index 66e5ec7338aeb326f1fb0b24a0e6d7257bafae91..fe440690ac680d95e72f6492672960290f065c0f 100644 (file)
@@ -25,7 +25,7 @@
 # define BOOST_SP_NO_SP_CONVERTIBLE
 #endif
 
-#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x610 )
+#if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x630 )
 # define BOOST_SP_NO_SP_CONVERTIBLE
 #endif
 
index 8af6f0a972ab11f1157573e5c6e5a4e496ab84fb..21fa59dcc4fa3cc58dd95b1b2af2fcc952f74f15 100644 (file)
@@ -30,9 +30,9 @@ namespace detail
 
 inline int32_t compare_and_swap( int32_t * dest_, int32_t compare_, int32_t swap_ )
 {
-    __asm__ __volatile__( "cas %0, %2, %1"
-                        : "+m" (*dest_), "+r" (swap_)
-                        : "r" (compare_)
+    __asm__ __volatile__( "cas [%1], %2, %0"
+                        : "+r" (swap_)
+                        : "r" (dest_), "r" (compare_)
                         : "memory" );
 
     return swap_;
index cb0282dbad7bb528a4c991980229aba9d2e5eff9..7fcd09ef08bf89f62b1be1d20bf08c194b0b2f8a 100644 (file)
@@ -40,7 +40,7 @@
 #undef BOOST_SP_HAS_SYNC
 #endif
 
-#if defined( __INTEL_COMPILER ) && !defined( __ia64__ )
+#if defined( __INTEL_COMPILER ) && !defined( __ia64__ ) && ( __INTEL_COMPILER < 1100 )
 #undef BOOST_SP_HAS_SYNC
 #endif
 
index 6927a591850fac6197616a0342279c1488ccf68c..e72eb2186985d93acbb9387e874895a23bdf1e79 100644 (file)
@@ -77,7 +77,7 @@ public:
     template<class U>
 #if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
 
-    intrusive_ptr( intrusive_ptr<U> const & rhs, typename detail::sp_enable_if_convertible<U,T>::type = detail::sp_empty() )
+    intrusive_ptr( intrusive_ptr<U> const & rhs, typename boost::detail::sp_enable_if_convertible<U,T>::type = boost::detail::sp_empty() )
 
 #else
 
@@ -122,7 +122,7 @@ public:
 
     intrusive_ptr & operator=(intrusive_ptr && rhs)
     {
-        this_type(std::move(rhs)).swap(*this);
+        this_type( static_cast< intrusive_ptr && >( rhs ) ).swap(*this);
         return *this;
     }
 
index 7e1e793e1934d4a31cc2efb160bce68a9403c90a..d47718808c44c0473ba5ba0f2ebcb75028609509 100644 (file)
@@ -86,10 +86,12 @@ public:
     }
 };
 
-template< class T > T forward( T t )
+#if defined( BOOST_HAS_RVALUE_REFS )
+template< class T > T&& forward( T &&t )
 {
     return t;
 }
+#endif
 
 } // namespace detail
 
index 1b367f0f4da8da05719b8df75b52cea3f1299db8..609cce903221ab5687ccbabc9d651348e883dc76 100644 (file)
@@ -228,7 +228,7 @@ public:
     template<class Y>
 #if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
 
-    shared_ptr( shared_ptr<Y> const & r, typename detail::sp_enable_if_convertible<Y,T>::type = detail::sp_empty() )
+    shared_ptr( shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )
 
 #else
 
@@ -353,7 +353,7 @@ public:
     template<class Y>
 #if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
 
-    shared_ptr( shared_ptr<Y> && r, typename detail::sp_enable_if_convertible<Y,T>::type = detail::sp_empty() )
+    shared_ptr( shared_ptr<Y> && r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )
 
 #else
 
@@ -368,14 +368,14 @@ public:
 
     shared_ptr & operator=( shared_ptr && r ) // never throws
     {
-        this_type( std::move( r ) ).swap( *this );
+        this_type( static_cast< shared_ptr && >( r ) ).swap( *this );
         return *this;
     }
 
     template<class Y>
     shared_ptr & operator=( shared_ptr<Y> && r ) // never throws
     {
-        this_type( std::move( r ) ).swap( *this );
+        this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this );
         return *this;
     }
 
@@ -448,7 +448,7 @@ public:
         return pn < rhs.pn;
     }
 
-    void * _internal_get_deleter( detail::sp_typeinfo const & ti ) const
+    void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const
     {
         return pn.get_deleter( ti );
     }
index 621c433a0356c37ef46cb6a8f55cd0c49bddb6f8..d314b0df3eabca979f96ab0041250ff38335273b 100644 (file)
@@ -63,7 +63,7 @@ public:
     template<class Y>
 #if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
 
-    weak_ptr( weak_ptr<Y> const & r, typename detail::sp_enable_if_convertible<Y,T>::type = detail::sp_empty() )
+    weak_ptr( weak_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )
 
 #else
 
@@ -79,20 +79,20 @@ public:
     template<class Y>
 #if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
 
-    weak_ptr( weak_ptr<Y> && r, typename detail::sp_enable_if_convertible<Y,T>::type = detail::sp_empty() )
+    weak_ptr( weak_ptr<Y> && r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )
 
 #else
 
     weak_ptr( weak_ptr<Y> && r )
 
 #endif
-    : px(r.lock().get()), pn(std::move(r.pn)) // never throws
+    : px( r.lock().get() ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) // never throws
     {
         r.px = 0;
     }
 
     // for better efficiency in the T == Y case
-    weak_ptr( weak_ptr && r ): px( r.px ), pn(std::move(r.pn)) // never throws
+    weak_ptr( weak_ptr && r ): px( r.px ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) // never throws
     {
         r.px = 0;
     }
@@ -100,7 +100,7 @@ public:
     // for better efficiency in the T == Y case
     weak_ptr & operator=( weak_ptr && r ) // never throws
     {
-        this_type( std::move( r ) ).swap( *this );
+        this_type( static_cast< weak_ptr && >( r ) ).swap( *this );
         return *this;
     }
 
@@ -110,7 +110,7 @@ public:
     template<class Y>
 #if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
 
-    weak_ptr( shared_ptr<Y> const & r, typename detail::sp_enable_if_convertible<Y,T>::type = detail::sp_empty() )
+    weak_ptr( shared_ptr<Y> const & r, typename boost::detail::sp_enable_if_convertible<Y,T>::type = boost::detail::sp_empty() )
 
 #else
 
@@ -134,9 +134,9 @@ public:
 #if defined( BOOST_HAS_RVALUE_REFS )
 
     template<class Y>
-    weak_ptr & operator=(weak_ptr<Y> && r)
+    weak_ptr & operator=( weak_ptr<Y> && r )
     {
-        this_type( std::move( r ) ).swap( *this );
+        this_type( static_cast< weak_ptr<Y> && >( r ) ).swap( *this );
         return *this;
     }
 
index 546f5e977978152a9d34fc9d18b61cc1ad7f4dee..4ca30cb4df430f2ab264976cfafe6456b6219012 100644 (file)
@@ -9,6 +9,7 @@
 #define BOOST_BARRIER_JDM030602_HPP
 
 #include <boost/thread/detail/config.hpp>
+#include <boost/throw_exception.hpp>
 
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/condition_variable.hpp>
@@ -27,7 +28,7 @@ namespace boost
             : m_threshold(count), m_count(count), m_generation(0)
         {
             if (count == 0)
-                throw std::invalid_argument("count cannot be zero.");
+                boost::throw_exception(std::invalid_argument("count cannot be zero."));
         }
     
         bool wait()
index 170801b61d52ac017f41873578646075ea59c64f..9615a39e495e70488ddbfe4bccd6dcb775696cc9 100644 (file)
@@ -39,10 +39,13 @@ namespace boost
             public detail::thread_data_base
         {
         public:
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
             thread_data(F&& f_):
                 f(static_cast<F&&>(f_))
             {}
+            thread_data(F& f_):
+                f(f_)
+            {}
 #else
             thread_data(F f_):
                 f(f_)
@@ -119,7 +122,7 @@ namespace boost
 
         detail::thread_data_ptr get_thread_info() const;
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         template<typename F>
         static inline detail::thread_data_ptr make_thread_info(F&& f)
         {
@@ -127,7 +130,7 @@ namespace boost
         }
         static inline detail::thread_data_ptr make_thread_info(void (*f)())
         {
-            return detail::thread_data_ptr(detail::heap_new<detail::thread_data<void(*)()> >(f));
+            return detail::thread_data_ptr(detail::heap_new<detail::thread_data<void(*)()> >(static_cast<void(*&&)()>(f)));
         }
 #else
         template<typename F>
@@ -141,8 +144,8 @@ namespace boost
             return detail::thread_data_ptr(detail::heap_new<detail::thread_data<F> >(f));
         }
 
-        struct dummy;
 #endif
+        struct dummy;
     public:
 #ifdef __SUNPRO_CC 
         thread(const volatile thread&); 
@@ -150,13 +153,22 @@ namespace boost
         thread();
         ~thread();
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifdef BOOST_MSVC
+        template <class F>
+        explicit thread(F f,typename disable_if<boost::is_convertible<F&,detail::thread_move_t<F> >, dummy* >::type=0):
+            thread_info(make_thread_info(f))
+        {
+            start_thread();
+        }
+#else
         template <class F>
         thread(F&& f):
             thread_info(make_thread_info(static_cast<F&&>(f)))
         {
             start_thread();
         }
+#endif
 
         thread(thread&& other)
         {
@@ -343,10 +355,14 @@ namespace boost
         return lhs.swap(rhs);
     }
     
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
+    inline thread&& move(thread& t)
+    {
+        return static_cast<thread&&>(t);
+    }
     inline thread&& move(thread&& t)
     {
-        return t;
+        return static_cast<thread&&>(t);
     }
 #else
     inline detail::thread_move_t<thread> move(detail::thread_move_t<thread> t)
@@ -445,7 +461,7 @@ namespace boost
         {
             virtual ~thread_exit_function_base()
             {}
-            virtual void operator()() const=0;
+            virtual void operator()()=0;
         };
         
         template<typename F>
@@ -458,13 +474,13 @@ namespace boost
                 f(f_)
             {}
             
-            void operator()() const
+            void operator()()
             {
                 f();
             }
         };
         
-        void add_thread_exit_function(thread_exit_function_base*);
+        void BOOST_THREAD_DECL add_thread_exit_function(thread_exit_function_base*);
     }
     
     namespace this_thread
index 3d694ebcb18ce5b3a19f3650060cde70554af4e5..8111d9edc65021e1bacebc6e2d7ed4d482b3133a 100644 (file)
@@ -1,4 +1,4 @@
-//  (C) Copyright 2008-9 Anthony Williams 
+//  (C) Copyright 2008-10 Anthony Williams 
 //
 //  Distributed under the Boost Software License, Version 1.0. (See
 //  accompanying file LICENSE_1_0.txt or copy at
@@ -16,6 +16,7 @@
 #include <boost/type_traits/is_convertible.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/config.hpp>
+#include <boost/throw_exception.hpp>
 #include <algorithm>
 #include <boost/function.hpp>
 #include <boost/bind.hpp>
@@ -218,7 +219,7 @@ namespace boost
         struct future_traits
         {
             typedef boost::scoped_ptr<T> storage_type;
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
             typedef T const& source_reference_type;
             struct dummy;
             typedef typename boost::mpl::if_<boost::is_fundamental<T>,dummy&,T&&>::type rvalue_source_type;
@@ -323,7 +324,7 @@ namespace boost
             move_dest_type get()
             {
                 wait();
-                return *result;
+                return static_cast<move_dest_type>(*result);
             }
 
             future_state::state get_state()
@@ -403,13 +404,14 @@ namespace boost
             
             struct all_futures_lock
             {
-                unsigned count;
+                typedef std::vector<registered_waiter>::size_type count_type;
+                count_type count;
                 boost::scoped_array<boost::unique_lock<boost::mutex> > locks;
                 
                 all_futures_lock(std::vector<registered_waiter>& futures):
                     count(futures.size()),locks(new boost::unique_lock<boost::mutex>[count])
                 {
-                    for(unsigned i=0;i<count;++i)
+                    for(count_type i=0;i<count;++i)
                     {
                         locks[i]=boost::unique_lock<boost::mutex>(futures[i].future->mutex);
                     }
@@ -632,7 +634,7 @@ namespace boost
         ~unique_future()
         {}
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         unique_future(unique_future && other)
         {
             future.swap(other.future);
@@ -673,7 +675,7 @@ namespace boost
         {
             if(!future)
             {
-                throw future_uninitialized();
+                boost::throw_exception(future_uninitialized());
             }
 
             return future->get();
@@ -709,7 +711,7 @@ namespace boost
         {
             if(!future)
             {
-                throw future_uninitialized();
+                boost::throw_exception(future_uninitialized());
             }
             future->wait(false);
         }
@@ -724,7 +726,7 @@ namespace boost
         {
             if(!future)
             {
-                throw future_uninitialized();
+                boost::throw_exception(future_uninitialized());
             }
             return future->timed_wait_until(abs_time);
         }
@@ -767,7 +769,7 @@ namespace boost
             future=other.future;
             return *this;
         }
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         shared_future(shared_future && other)
         {
             future.swap(other.future);
@@ -830,7 +832,7 @@ namespace boost
         {
             if(!future)
             {
-                throw future_uninitialized();
+                boost::throw_exception(future_uninitialized());
             }
 
             return future->get();
@@ -866,7 +868,7 @@ namespace boost
         {
             if(!future)
             {
-                throw future_uninitialized();
+                boost::throw_exception(future_uninitialized());
             }
             future->wait(false);
         }
@@ -881,7 +883,7 @@ namespace boost
         {
             if(!future)
             {
-                throw future_uninitialized();
+                boost::throw_exception(future_uninitialized());
             }
             return future->timed_wait_until(abs_time);
         }
@@ -929,7 +931,7 @@ namespace boost
         }
 
         // Assignment
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         promise(promise && rhs):
             future_obtained(rhs.future_obtained)
         {
@@ -974,7 +976,7 @@ namespace boost
             lazy_init();
             if(future_obtained)
             {
-                throw future_already_retrieved();
+                boost::throw_exception(future_already_retrieved());
             }
             future_obtained=true;
             return unique_future<R>(future);
@@ -986,7 +988,7 @@ namespace boost
             boost::lock_guard<boost::mutex> lock(future->mutex);
             if(future->done)
             {
-                throw promise_already_satisfied();
+                boost::throw_exception(promise_already_satisfied());
             }
             future->mark_finished_with_result_internal(r);
         }
@@ -998,7 +1000,7 @@ namespace boost
             boost::lock_guard<boost::mutex> lock(future->mutex);
             if(future->done)
             {
-                throw promise_already_satisfied();
+                boost::throw_exception(promise_already_satisfied());
             }
             future->mark_finished_with_result_internal(static_cast<typename detail::future_traits<R>::rvalue_source_type>(r));
         }
@@ -1009,7 +1011,7 @@ namespace boost
             boost::lock_guard<boost::mutex> lock(future->mutex);
             if(future->done)
             {
-                throw promise_already_satisfied();
+                boost::throw_exception(promise_already_satisfied());
             }
             future->mark_exceptional_finish_internal(p);
         }
@@ -1063,7 +1065,7 @@ namespace boost
         }
 
         // Assignment
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         promise(promise && rhs):
             future_obtained(rhs.future_obtained)
         {
@@ -1109,7 +1111,7 @@ namespace boost
             
             if(future_obtained)
             {
-                throw future_already_retrieved();
+                boost::throw_exception(future_already_retrieved());
             }
             future_obtained=true;
             return unique_future<void>(future);
@@ -1121,7 +1123,7 @@ namespace boost
             boost::lock_guard<boost::mutex> lock(future->mutex);
             if(future->done)
             {
-                throw promise_already_satisfied();
+                boost::throw_exception(promise_already_satisfied());
             }
             future->mark_finished_with_result_internal();
         }
@@ -1132,7 +1134,7 @@ namespace boost
             boost::lock_guard<boost::mutex> lock(future->mutex);
             if(future->done)
             {
-                throw promise_already_satisfied();
+                boost::throw_exception(promise_already_satisfied());
             }
             future->mark_exceptional_finish_internal(p);
         }
@@ -1164,7 +1166,7 @@ namespace boost
                     boost::lock_guard<boost::mutex> lk(this->mutex);
                     if(started)
                     {
-                        throw task_already_started();
+                        boost::throw_exception(task_already_started());
                     }
                     started=true;
                 }
@@ -1283,7 +1285,7 @@ namespace boost
         }
 
         // assignment
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         packaged_task(packaged_task&& other):
             future_obtained(other.future_obtained)
         {
@@ -1326,7 +1328,7 @@ namespace boost
         {
             if(!task)
             {
-                throw task_moved();
+                boost::throw_exception(task_moved());
             }
             else if(!future_obtained)
             {
@@ -1335,7 +1337,7 @@ namespace boost
             }
             else
             {
-                throw future_already_retrieved();
+                boost::throw_exception(future_already_retrieved());
             }
         }
         
@@ -1345,7 +1347,7 @@ namespace boost
         {
             if(!task)
             {
-                throw task_moved();
+                boost::throw_exception(task_moved());
             }
             task->run();
         }
index 82394a595c0bab9e51ba927668bf3e2e61e02431..3cd6f28216d85e34ca771d5869e4612d42f83847 100644 (file)
@@ -248,7 +248,7 @@ namespace boost
         {
             timed_lock(target_time);
         }
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         unique_lock(unique_lock&& other):
             m(other.m),is_locked(other.is_locked)
         {
@@ -321,17 +321,17 @@ namespace boost
             swap(temp);
             return *this;
         }
-        void swap(unique_lock& other)
-        {
-            std::swap(m,other.m);
-            std::swap(is_locked,other.is_locked);
-        }
         void swap(detail::thread_move_t<unique_lock<Mutex> > other)
         {
             std::swap(m,other->m);
             std::swap(is_locked,other->is_locked);
         }
 #endif
+        void swap(unique_lock& other)
+        {
+            std::swap(m,other.m);
+            std::swap(is_locked,other.is_locked);
+        }
         
         ~unique_lock()
         {
@@ -344,7 +344,7 @@ namespace boost
         {
             if(owns_lock())
             {
-                throw boost::lock_error();
+                boost::throw_exception(boost::lock_error());
             }
             m->lock();
             is_locked=true;
@@ -353,7 +353,7 @@ namespace boost
         {
             if(owns_lock())
             {
-                throw boost::lock_error();
+                boost::throw_exception(boost::lock_error());
             }
             is_locked=m->try_lock();
             return is_locked;
@@ -379,7 +379,7 @@ namespace boost
         {
             if(!owns_lock())
             {
-                throw boost::lock_error();
+                boost::throw_exception(boost::lock_error());
             }
             m->unlock();
             is_locked=false;
@@ -416,25 +416,30 @@ namespace boost
         friend class upgrade_lock<Mutex>;
     };
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     template<typename Mutex>
     void swap(unique_lock<Mutex>&& lhs,unique_lock<Mutex>&& rhs)
     {
         lhs.swap(rhs);
     }
-#else
+#endif
     template<typename Mutex>
     void swap(unique_lock<Mutex>& lhs,unique_lock<Mutex>& rhs)
     {
         lhs.swap(rhs);
     }
-#endif
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     template<typename Mutex>
     inline unique_lock<Mutex>&& move(unique_lock<Mutex>&& ul)
     {
-        return ul;
+        return static_cast<unique_lock<Mutex>&&>(ul);
+    }
+
+    template<typename Mutex>
+    inline unique_lock<Mutex>&& move(unique_lock<Mutex>& ul)
+    {
+        return static_cast<unique_lock<Mutex>&&>(ul);
     }
 #endif
 
@@ -535,24 +540,24 @@ namespace boost
             return *this;
         }
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         void swap(shared_lock&& other)
         {
             std::swap(m,other.m);
             std::swap(is_locked,other.is_locked);
         }
 #else
-        void swap(shared_lock& other)
-        {
-            std::swap(m,other.m);
-            std::swap(is_locked,other.is_locked);
-        }
         void swap(boost::detail::thread_move_t<shared_lock<Mutex> > other)
         {
             std::swap(m,other->m);
             std::swap(is_locked,other->is_locked);
         }
 #endif
+        void swap(shared_lock& other)
+        {
+            std::swap(m,other.m);
+            std::swap(is_locked,other.is_locked);
+        }
 
         Mutex* mutex() const
         {
@@ -570,7 +575,7 @@ namespace boost
         {
             if(owns_lock())
             {
-                throw boost::lock_error();
+                boost::throw_exception(boost::lock_error());
             }
             m->lock_shared();
             is_locked=true;
@@ -579,7 +584,7 @@ namespace boost
         {
             if(owns_lock())
             {
-                throw boost::lock_error();
+                boost::throw_exception(boost::lock_error());
             }
             is_locked=m->try_lock_shared();
             return is_locked;
@@ -588,7 +593,7 @@ namespace boost
         {
             if(owns_lock())
             {
-                throw boost::lock_error();
+                boost::throw_exception(boost::lock_error());
             }
             is_locked=m->timed_lock_shared(target_time);
             return is_locked;
@@ -598,7 +603,7 @@ namespace boost
         {
             if(owns_lock())
             {
-                throw boost::lock_error();
+                boost::throw_exception(boost::lock_error());
             }
             is_locked=m->timed_lock_shared(target_time);
             return is_locked;
@@ -607,7 +612,7 @@ namespace boost
         {
             if(!owns_lock())
             {
-                throw boost::lock_error();
+                boost::throw_exception(boost::lock_error());
             }
             m->unlock_shared();
             is_locked=false;
@@ -629,7 +634,7 @@ namespace boost
 
     };
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     template<typename Mutex>
     void swap(shared_lock<Mutex>&& lhs,shared_lock<Mutex>&& rhs)
     {
@@ -733,7 +738,7 @@ namespace boost
         {
             if(owns_lock())
             {
-                throw boost::lock_error();
+                boost::throw_exception(boost::lock_error());
             }
             m->lock_upgrade();
             is_locked=true;
@@ -742,7 +747,7 @@ namespace boost
         {
             if(owns_lock())
             {
-                throw boost::lock_error();
+                boost::throw_exception(boost::lock_error());
             }
             is_locked=m->try_lock_upgrade();
             return is_locked;
@@ -751,7 +756,7 @@ namespace boost
         {
             if(!owns_lock())
             {
-                throw boost::lock_error();
+                boost::throw_exception(boost::lock_error());
             }
             m->unlock_upgrade();
             is_locked=false;
@@ -775,7 +780,7 @@ namespace boost
     };
 
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     template<typename Mutex>
     unique_lock<Mutex>::unique_lock(upgrade_lock<Mutex>&& other):
         m(other.m),is_locked(other.is_locked)
@@ -875,7 +880,7 @@ namespace boost
             try_lock_wrapper(Mutex& m_,try_to_lock_t):
                 base(m_,try_to_lock)
             {}
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
             try_lock_wrapper(try_lock_wrapper&& other):
                 base(other.move())
             {}
@@ -963,7 +968,7 @@ namespace boost
             }
         };
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         template<typename Mutex>
         void swap(try_lock_wrapper<Mutex>&& lhs,try_lock_wrapper<Mutex>&& rhs)
         {
index 8ec6ae7fcfd14c14f8ce38c9da495b1a148cf76a..8e8f5b5a270e931b2ed86c3ee250b81446d7c61a 100644 (file)
@@ -57,13 +57,13 @@ namespace boost
             int const res=pthread_mutex_init(&internal_mutex,NULL);
             if(res)
             {
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
             int const res2=pthread_cond_init(&cond,NULL);
             if(res2)
             {
                 BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex));
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
         }
         ~condition_variable_any()
@@ -87,7 +87,7 @@ namespace boost
             }
             if(res)
             {
-                throw condition_error();
+                boost::throw_exception(condition_error());
             }
         }
 
@@ -117,7 +117,7 @@ namespace boost
             }
             if(res)
             {
-                throw condition_error();
+                boost::throw_exception(condition_error());
             }
             return true;
         }
index 4048cdfb2d5aa7d5d7e8d0d347dada8d3f31c717..59908f42ff7131dc9ba948e0e79c179d90e38f9f 100644 (file)
@@ -6,6 +6,7 @@
 // (C) Copyright 2007-8 Anthony Williams
 
 #include <boost/assert.hpp>
+#include <boost/throw_exception.hpp>
 #include <pthread.h>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/locks.hpp>
@@ -30,7 +31,7 @@ namespace boost
             int const res=pthread_cond_init(&cond,NULL);
             if(res)
             {
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
         }
         ~condition_variable()
index 51d62ae546eca607a497391671bdf77eb80497de..1f7f790da87c023d81480ec61ec7fb9f7bb07198 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <pthread.h>
 #include <boost/utility.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/thread/exceptions.hpp>
 #include <boost/thread/locks.hpp>
 #include <boost/thread/thread_time.hpp>
@@ -37,7 +38,7 @@ namespace boost
             int const res=pthread_mutex_init(&m,NULL);
             if(res)
             {
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
         }
         ~mutex()
@@ -89,14 +90,14 @@ namespace boost
             int const res=pthread_mutex_init(&m,NULL);
             if(res)
             {
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
 #ifndef BOOST_PTHREAD_HAS_TIMEDLOCK
             int const res2=pthread_cond_init(&cond,NULL);
             if(res2)
             {
                 BOOST_VERIFY(!pthread_mutex_destroy(&m));
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
             is_locked=false;
 #endif
index f278a578f48928b293a851ee9bf524b98717047f..6321aa2f02a2f327e5d16293c97a153911d7a28f 100644 (file)
@@ -10,6 +10,7 @@
 //  http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/thread/detail/config.hpp>
+#include <boost/config.hpp>
 
 #include <pthread.h>
 #include <boost/assert.hpp>
@@ -58,10 +59,13 @@ namespace boost
                 if(flag.epoch==uninitialized_flag)
                 {
                     flag.epoch=being_initialized;
+#ifndef BOOST_NO_EXCEPTIONS
                     try
                     {
+#endif
                         pthread::pthread_mutex_scoped_unlock relocker(&detail::once_epoch_mutex);
                         f();
+#ifndef BOOST_NO_EXCEPTIONS
                     }
                     catch(...)
                     {
@@ -69,6 +73,7 @@ namespace boost
                         BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv));
                         throw;
                     }
+#endif
                     flag.epoch=--detail::once_global_epoch;
                     BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv));
                 }
index f3f7bf1dda17a10f2692ab3eac65f1473af817ce..ad3b7e1530172919ab1138168661816cdc54a627 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <pthread.h>
 #include <boost/utility.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/thread/exceptions.hpp>
 #include <boost/thread/locks.hpp>
 #include <boost/thread/thread_time.hpp>
@@ -42,18 +43,18 @@ namespace boost
             int const init_attr_res=pthread_mutexattr_init(&attr);
             if(init_attr_res)
             {
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
             int const set_attr_res=pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
             if(set_attr_res)
             {
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
             
             int const res=pthread_mutex_init(&m,&attr);
             if(res)
             {
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
             BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
         }
@@ -111,32 +112,32 @@ namespace boost
             int const init_attr_res=pthread_mutexattr_init(&attr);
             if(init_attr_res)
             {
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
             int const set_attr_res=pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
             if(set_attr_res)
             {
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
             
             int const res=pthread_mutex_init(&m,&attr);
             if(res)
             {
                 BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
             BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
 #else
             int const res=pthread_mutex_init(&m,NULL);
             if(res)
             {
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
             int const res2=pthread_cond_init(&cond,NULL);
             if(res2)
             {
                 BOOST_VERIFY(!pthread_mutex_destroy(&m));
-                throw thread_resource_error();
+                boost::throw_exception(thread_resource_error());
             }
             is_locked=false;
             count=0;
index 7cc0aa0476087dab9dd2bc25081e53fae30768e6..737c29858b286f4d3914108cdcd8e4cc5efac504 100644 (file)
@@ -17,7 +17,7 @@ namespace boost
             return new T();
         }
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         template<typename T,typename A1>
         inline T* heap_new(A1&& a1)
         {
index 751bdbdacc016011c5b5030b190d3df95fae1225..7c6797d14f1a65a8a1c76f96af0b9cb55c2ee7e8 100644 (file)
@@ -61,15 +61,30 @@ namespace boost
             
             void lock()
             {
-                BOOST_VERIFY(timed_lock(::boost::detail::get_system_time_sentinel()));
-            }
-            bool timed_lock(::boost::system_time const& wait_until)
-            {
-                if(!win32::interlocked_bit_test_and_set(&active_count,lock_flag_bit))
+                if(try_lock())
                 {
-                    return true;
+                    return;
                 }
                 long old_count=active_count;
+                mark_waiting_and_try_lock(old_count);
+
+                if(old_count&lock_flag_value)
+                {
+                    bool lock_acquired=false;
+                    void* const sem=get_event();
+
+                    do
+                    {
+                        BOOST_VERIFY(win32::WaitForSingleObject(
+                                         sem,::boost::detail::win32::infinite)==0);
+                        clear_waiting_and_try_lock(old_count);
+                        lock_acquired=!(old_count&lock_flag_value);
+                    }
+                    while(!lock_acquired);
+                }
+            }
+            void mark_waiting_and_try_lock(long& old_count)
+            {
                 for(;;)
                 {
                     long const new_count=(old_count&lock_flag_value)?(old_count+1):(old_count|lock_flag_value);
@@ -80,6 +95,33 @@ namespace boost
                     }
                     old_count=current;
                 }
+            }
+
+            void clear_waiting_and_try_lock(long& old_count)
+            {
+                old_count&=~lock_flag_value;
+                old_count|=event_set_flag_value;
+                for(;;)
+                {
+                    long const new_count=((old_count&lock_flag_value)?old_count:((old_count-1)|lock_flag_value))&~event_set_flag_value;
+                    long const current=BOOST_INTERLOCKED_COMPARE_EXCHANGE(&active_count,new_count,old_count);
+                    if(current==old_count)
+                    {
+                        break;
+                    }
+                    old_count=current;
+                }
+            }
+            
+            
+            bool timed_lock(::boost::system_time const& wait_until)
+            {
+                if(try_lock())
+                {
+                    return true;
+                }
+                long old_count=active_count;
+                mark_waiting_and_try_lock(old_count);
 
                 if(old_count&lock_flag_value)
                 {
@@ -93,18 +135,7 @@ namespace boost
                             BOOST_INTERLOCKED_DECREMENT(&active_count);
                             return false;
                         }
-                        old_count&=~lock_flag_value;
-                        old_count|=event_set_flag_value;
-                        for(;;)
-                        {
-                            long const new_count=((old_count&lock_flag_value)?old_count:((old_count-1)|lock_flag_value))&~event_set_flag_value;
-                            long const current=BOOST_INTERLOCKED_COMPARE_EXCHANGE(&active_count,new_count,old_count);
-                            if(current==old_count)
-                            {
-                                break;
-                            }
-                            old_count=current;
-                        }
+                        clear_waiting_and_try_lock(old_count);
                         lock_acquired=!(old_count&lock_flag_value);
                     }
                     while(!lock_acquired);
index a6fcc94dc8bb68980f8a88da9b8641d8c997b49d..c25f9ab3867b1ee60f275fb2c5cbca483fe997f7 100644 (file)
@@ -30,81 +30,47 @@ namespace std
 
 namespace boost
 {
-    typedef long once_flag;
-
-#define BOOST_ONCE_INIT 0
-
-    namespace detail
+    struct once_flag
     {
-        struct win32_mutex_scoped_lock
-        {
-            void* const mutex_handle;
-            explicit win32_mutex_scoped_lock(void* mutex_handle_):
-                mutex_handle(mutex_handle_)
-            {
-                BOOST_VERIFY(!win32::WaitForSingleObject(mutex_handle,win32::infinite));
-            }
-            ~win32_mutex_scoped_lock()
-            {
-                BOOST_VERIFY(win32::ReleaseMutex(mutex_handle)!=0);
-            }
-        private:
-            void operator=(win32_mutex_scoped_lock&);
-        };
+        long status;
+        long count;
+        long throw_count;
+        void* event_handle;
 
-#ifdef BOOST_NO_ANSI_APIS
-        template <class I>
-        void int_to_string(I p, wchar_t* buf)
+        ~once_flag()
         {
-            for(unsigned i=0; i < sizeof(I)*2; ++i,++buf)
+            if(count)
             {
-                *buf = L'A' + static_cast<wchar_t>((p >> (i*4)) & 0x0f);
+                BOOST_ASSERT(count==throw_count);
             }
-            *buf = 0;
-        }
-#else
-        template <class I>
-        void int_to_string(I p, char* buf)
-        {
-            for(unsigned i=0; i < sizeof(I)*2; ++i,++buf)
+            
+            void* const old_event=BOOST_INTERLOCKED_EXCHANGE_POINTER(&event_handle,0);
+            if(old_event)
             {
-                *buf = 'A' + static_cast<char>((p >> (i*4)) & 0x0f);
+                ::boost::detail::win32::CloseHandle(old_event);
             }
-            *buf = 0;
         }
-#endif
+    };
+
+#define BOOST_ONCE_INIT {0,0,0,0}
 
-        // create a named mutex. It doesn't really matter what this name is
-        // as long as it is unique both to this process, and to the address of "flag":
-        inline void* create_once_mutex(void* flag_address)
+    namespace detail
+    {
+        inline void* allocate_event_handle(void*& handle)
         {
-        
-#ifdef BOOST_NO_ANSI_APIS
-            typedef wchar_t char_type;
-            static const char_type fixed_mutex_name[]=L"{C15730E2-145C-4c5e-B005-3BC753F42475}-once-flag";
-#else
-            typedef char char_type;
-            static const char_type fixed_mutex_name[]="{C15730E2-145C-4c5e-B005-3BC753F42475}-once-flag";
-#endif
-            unsigned const once_mutex_name_fixed_buffer_size=sizeof(fixed_mutex_name)/sizeof(char_type);
-            unsigned const once_mutex_name_fixed_length=once_mutex_name_fixed_buffer_size-1;
-            unsigned const once_mutex_name_length=once_mutex_name_fixed_buffer_size+sizeof(void*)*2+sizeof(unsigned long)*2;
-            char_type mutex_name[once_mutex_name_length];
+            void* const new_handle=::boost::detail::win32::create_anonymous_event(
+                ::boost::detail::win32::manual_reset_event,
+                ::boost::detail::win32::event_initially_reset);
             
-            std::memcpy(mutex_name,fixed_mutex_name,sizeof(fixed_mutex_name));
-
-            BOOST_STATIC_ASSERT(sizeof(void*) == sizeof(std::ptrdiff_t));
-            detail::int_to_string(reinterpret_cast<std::ptrdiff_t>(flag_address), mutex_name + once_mutex_name_fixed_length);
-            detail::int_to_string(win32::GetCurrentProcessId(), mutex_name + once_mutex_name_fixed_length + sizeof(void*)*2);
-
-#ifdef BOOST_NO_ANSI_APIS
-            return win32::CreateMutexW(0, 0, mutex_name);
-#else
-            return win32::CreateMutexA(0, 0, mutex_name);
-#endif
+            void* event_handle=BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(&handle,
+                                                                          new_handle,0);
+            if(event_handle)
+            {
+                ::boost::detail::win32::CloseHandle(new_handle);
+                return event_handle;
+            }
+            return new_handle;
         }
-
-        
     }
     
 
@@ -114,18 +80,98 @@ namespace boost
         // Try for a quick win: if the procedure has already been called
         // just skip through:
         long const function_complete_flag_value=0xc15730e2;
+        long const running_value=0x7f0725e3;
+        long status;
+        bool counted=false;
+        void* event_handle=0;
+        long throw_count=0;
+
+        while((status=::boost::detail::interlocked_read_acquire(&flag.status))
+              !=function_complete_flag_value)
+        {
+            status=BOOST_INTERLOCKED_COMPARE_EXCHANGE(&flag.status,running_value,0);
+            if(!status)
+            {
+                try
+                {
+                    if(!event_handle)
+                    {
+                        event_handle=::boost::detail::interlocked_read_acquire(&flag.event_handle);
+                    }
+                    if(event_handle)
+                    {
+                        ::boost::detail::win32::ResetEvent(event_handle);
+                    }
+                    f();
+                    if(!counted)
+                    {
+                        BOOST_INTERLOCKED_INCREMENT(&flag.count);
+                        counted=true;
+                    }
+                    BOOST_INTERLOCKED_EXCHANGE(&flag.status,function_complete_flag_value);
+                    if(!event_handle && 
+                       (::boost::detail::interlocked_read_acquire(&flag.count)>1))
+                    {
+                        event_handle=::boost::detail::allocate_event_handle(flag.event_handle);
+                    }
+                    if(event_handle)
+                    {
+                        ::boost::detail::win32::SetEvent(event_handle);
+                    }
+                    throw_count=::boost::detail::interlocked_read_acquire(&flag.throw_count);
+                    break;
+                }
+                catch(...)
+                {
+                    if(counted)
+                    {
+                        BOOST_INTERLOCKED_INCREMENT(&flag.throw_count);
+                    }
+                    BOOST_INTERLOCKED_EXCHANGE(&flag.status,0);
+                    if(!event_handle)
+                    {
+                        event_handle=::boost::detail::interlocked_read_acquire(&flag.event_handle);
+                    }
+                    if(event_handle)
+                    {
+                        ::boost::detail::win32::SetEvent(event_handle);
+                    }
+                    throw;
+                }
+            }
 
-        if(::boost::detail::interlocked_read_acquire(&flag)!=function_complete_flag_value)
+            if(!counted)
+            {
+                BOOST_INTERLOCKED_INCREMENT(&flag.count);
+                counted=true;
+                status=::boost::detail::interlocked_read_acquire(&flag.status);
+                if(status==function_complete_flag_value)
+                {
+                    break;
+                }
+                event_handle=::boost::detail::interlocked_read_acquire(&flag.event_handle);
+                if(!event_handle)
+                {
+                    event_handle=::boost::detail::allocate_event_handle(flag.event_handle);
+                    continue;
+                }
+            }
+            BOOST_VERIFY(!::boost::detail::win32::WaitForSingleObject(
+                             event_handle,::boost::detail::win32::infinite));
+        }
+        if(counted || throw_count)
         {
-            void* const mutex_handle(::boost::detail::create_once_mutex(&flag));
-            BOOST_ASSERT(mutex_handle);
-            detail::win32::handle_manager const closer(mutex_handle);
-            detail::win32_mutex_scoped_lock const lock(mutex_handle);
-      
-            if(flag!=function_complete_flag_value)
+            if(!BOOST_INTERLOCKED_EXCHANGE_ADD(&flag.count,(counted?-1:0)-throw_count))
             {
-                f();
-                BOOST_INTERLOCKED_EXCHANGE(&flag,function_complete_flag_value);
+                if(!event_handle)
+                {
+                    event_handle=::boost::detail::interlocked_read_acquire(&flag.event_handle);
+                }
+                if(event_handle)
+                {
+                    BOOST_INTERLOCKED_EXCHANGE_POINTER(&flag.event_handle,0);
+                    ::boost::detail::win32::CloseHandle(event_handle);
+                }
             }
         }
     }
index 9f8186f55cb021d6ec6fe8cd77cdc9743826ecf0..b70623aaa9097781612e44af3bb96e8bc6ccf32f 100644 (file)
@@ -8,6 +8,7 @@
 #include "thread_primitives.hpp"
 #include <stdexcept>
 #include <boost/assert.hpp>
+#include <boost/throw_exception.hpp>
 
 #if defined( BOOST_USE_WINDOWS_H )
 # include <windows.h>
@@ -60,7 +61,7 @@ namespace boost
             void* const heap_memory=detail::win32::HeapAlloc(detail::win32::GetProcessHeap(),0,size);
             if(!heap_memory)
             {
-                throw std::bad_alloc();
+                boost::throw_exception(std::bad_alloc());
             }
             return heap_memory;
         }
@@ -86,7 +87,7 @@ namespace boost
             }
         }
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
         template<typename T,typename A1>
         inline T* heap_new(A1&& a1)
         {
index 67a1bc3cb2a3c2479109df8b50c71411ead895fe..2359c38e1a6d6328edce30e1ab10b03046e954a4 100644 (file)
@@ -11,6 +11,7 @@
 //  http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/config.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/assert.hpp>
 #include <boost/thread/exceptions.hpp>
 #include <boost/detail/interlocked.hpp>
@@ -177,7 +178,7 @@ namespace boost
 #endif                
                 if(!res)
                 {
-                    throw thread_resource_error();
+                    boost::throw_exception(thread_resource_error());
                 }
                 return res;
             }
@@ -191,7 +192,7 @@ namespace boost
 #endif               
                 if(!res)
                 {
-                    throw thread_resource_error();
+                    boost::throw_exception(thread_resource_error());
                 }
                 return res;
             }
@@ -204,7 +205,7 @@ namespace boost
                 bool const success=DuplicateHandle(current_process,source,current_process,&new_handle,0,false,same_access_flag)!=0;
                 if(!success)
                 {
-                    throw thread_resource_error();
+                    boost::throw_exception(thread_resource_error());
                 }
                 return new_handle;
             }
index a5a5f9ea0bf96d9999a1bd32882293b16525e4a2..1d018c531b840d6357d326e49af208c0c058dc32 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <boost/exception/detail/attribute_noreturn.hpp>
 #include <boost/detail/workaround.hpp>
+#include <boost/config.hpp>
 #include <exception>
 
 #if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) )
 #if !defined( BOOST_EXCEPTION_DISABLE )
 # include <boost/exception/exception.hpp>
 # include <boost/current_function.hpp>
-# define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(::boost::enable_error_info(x) <<\
-    ::boost::throw_function(BOOST_CURRENT_FUNCTION) <<\
-    ::boost::throw_file(__FILE__) <<\
-    ::boost::throw_line((int)__LINE__))
+# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_CURRENT_FUNCTION,__FILE__,__LINE__)
 #else
 # define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x)
 #endif
 
 namespace boost
 {
+#if !defined( BOOST_EXCEPTION_DISABLE )
+    namespace
+    exception_detail
+    {
+        template <class E>
+        void
+        throw_exception_( E const & x, char const * current_function, char const * file, int line )
+        {
+            throw_exception(
+                set_info(
+                    set_info(
+                        set_info(
+                            enable_error_info(x),
+                            throw_function(current_function)),
+                        throw_file(file)),
+                    throw_line(line)));
+        }
+    }
+#endif
 
 #ifdef BOOST_NO_EXCEPTIONS
 
index 6d5351e080096bf2803a9503ce19dde94baad5cb..2c2c32228f26682ebf708aa46deec1a220151b5b 100644 (file)
@@ -26,7 +26,7 @@ namespace detail {
     template <typename T>
     struct has_new_operator_impl {
         template<class U>
-        static type_traits::yes_type check_sig(
+        static type_traits::yes_type check_sig1(
             U*, 
             test<
             void *(*)(std::size_t),
@@ -34,7 +34,10 @@ namespace detail {
             >* = NULL
         );
         template<class U>
-        static type_traits::yes_type check_sig(
+        static type_traits::no_type check_sig1(...);
+
+        template<class U>
+        static type_traits::yes_type check_sig2(
             U*, 
             test<
             void *(*)(std::size_t, const std::nothrow_t&),
@@ -42,7 +45,10 @@ namespace detail {
             >* = NULL
         );
         template<class U>
-        static type_traits::yes_type check_sig(
+        static type_traits::no_type check_sig2(...);
+
+        template<class U>
+        static type_traits::yes_type check_sig3(
             U*, 
             test<
             void *(*)(std::size_t, void*),
@@ -50,10 +56,11 @@ namespace detail {
             >* = NULL
         );
         template<class U>
-        static type_traits::no_type check_sig(...);
+        static type_traits::no_type check_sig3(...);
+
 
         template<class U>
-        static type_traits::yes_type check_sig2(
+        static type_traits::yes_type check_sig4(
             U*, 
             test<
             void *(*)(std::size_t),
@@ -61,7 +68,10 @@ namespace detail {
             >* = NULL
         );
         template<class U>
-        static type_traits::yes_type check_sig2(
+        static type_traits::no_type check_sig4(...);
+
+        template<class U>
+        static type_traits::yes_type check_sig5(
             U*, 
             test<
             void *(*)(std::size_t, const std::nothrow_t&),
@@ -69,7 +79,10 @@ namespace detail {
             >* = NULL
         );
         template<class U>
-        static type_traits::yes_type check_sig2(
+        static type_traits::no_type check_sig5(...);
+
+        template<class U>
+        static type_traits::yes_type check_sig6(
             U*, 
             test<
             void *(*)(std::size_t, void*),
@@ -77,21 +90,29 @@ namespace detail {
             >* = NULL
         );
         template<class U>
-        static type_traits::no_type check_sig2(...);
+        static type_traits::no_type check_sig6(...);
 
         // GCC2 won't even parse this template if we embed the computation
         // of s1 in the computation of value.
         #ifdef __GNUC__
-            BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(has_new_operator_impl<T>::template check_sig<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(has_new_operator_impl<T>::template check_sig1<T>(0)));
             BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(has_new_operator_impl<T>::template check_sig2<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s3 = sizeof(has_new_operator_impl<T>::template check_sig3<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s4 = sizeof(has_new_operator_impl<T>::template check_sig4<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s5 = sizeof(has_new_operator_impl<T>::template check_sig5<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s6 = sizeof(has_new_operator_impl<T>::template check_sig6<T>(0)));
         #else
             #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
                 #pragma warning(push)
                 #pragma warning(disable:6334)
             #endif
 
-            BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig1<T>(0)));
             BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(check_sig2<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s3 = sizeof(check_sig3<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s4 = sizeof(check_sig4<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s5 = sizeof(check_sig5<T>(0)));
+            BOOST_STATIC_CONSTANT(unsigned, s6 = sizeof(check_sig6<T>(0)));
 
             #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
                 #pragma warning(pop)
@@ -100,7 +121,11 @@ namespace detail {
         BOOST_STATIC_CONSTANT(bool, value = 
            (::boost::type_traits::ice_or<
             (s1 == sizeof(type_traits::yes_type)),
-            (s2 == sizeof(type_traits::yes_type))
+            (s2 == sizeof(type_traits::yes_type)),
+            (s3 == sizeof(type_traits::yes_type)),
+            (s4 == sizeof(type_traits::yes_type)),
+            (s5 == sizeof(type_traits::yes_type)),
+            (s6 == sizeof(type_traits::yes_type))
            >::value)
         );
     };
index 74b64a7d43df3d7c9c200c092bb79a809ccb1997..8f88036e20294005835611c2782df89a6f005104 100644 (file)
 #   define BOOST_IS_CLASS(T) __is_class(T)
 #   define BOOST_IS_ENUM(T) __is_enum(T)
 #   define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
-#   if !defined(unix) || defined(__LP64__)
+#   if (!defined(unix) && !defined(__unix__)) || defined(__LP64__)
       // GCC sometimes lies about alignment requirements
       // of type double on 32-bit unix platforms, use the
       // old implementation instead in that case:
index c8eb7912da05177feed8c6ee340c4859d50921de..45c4e9e1eeb610314931b23fa9fc17e1e98eb954 100644 (file)
@@ -36,6 +36,12 @@ namespace boost {
 namespace detail {
 
 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4624) // destructor could not be generated
+#endif
+
 template <typename T>
 struct empty_helper_t1 : public T
 {
@@ -47,6 +53,10 @@ private:
    empty_helper_t1& operator=(const empty_helper_t1&);
 };
 
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
 struct empty_helper_t2 { int i[256]; };
 
 #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600)
index e06b47cc85aa9ed2660015fb99324a5c9e4cb7b8..bf7bbfdb7686c7ead861ecf0aae62d9f0e7c2acd 100644 (file)
@@ -26,11 +26,19 @@ namespace detail{
 
 #if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238)
 
+template <class T>
+struct is_signed_values
+{
+   typedef typename remove_cv<T>::type no_cv_t;
+   BOOST_STATIC_CONSTANT(no_cv_t, minus_one = (static_cast<no_cv_t>(-1)));
+   BOOST_STATIC_CONSTANT(no_cv_t, zero = (static_cast<no_cv_t>(0)));
+};
+
 template <class T>
 struct is_signed_helper
 {
    typedef typename remove_cv<T>::type no_cv_t;
-   BOOST_STATIC_CONSTANT(bool, value = (!(static_cast<no_cv_t>(-1) > 0)));
+   BOOST_STATIC_CONSTANT(bool, value = (!(::boost::detail::is_signed_values<T>::minus_one  > boost::detail::is_signed_values<T>::zero)));
 };
 
 template <bool integral_type>
index 486648692fab9eafa860d3429fc8685d74510671..98baf4e94e38130b825720c20b639fc516d4f14e 100644 (file)
@@ -27,10 +27,17 @@ namespace detail{
 #if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238)
 
 template <class T>
-struct is_ununsigned_helper
+struct is_unsigned_values
 {
    typedef typename remove_cv<T>::type no_cv_t;
-   BOOST_STATIC_CONSTANT(bool, value = (static_cast<no_cv_t>(-1) > 0));
+   BOOST_STATIC_CONSTANT(no_cv_t, minus_one = (static_cast<no_cv_t>(-1)));
+   BOOST_STATIC_CONSTANT(no_cv_t, zero = (static_cast<no_cv_t>(0)));
+};
+
+template <class T>
+struct is_ununsigned_helper
+{
+   BOOST_STATIC_CONSTANT(bool, value = (::boost::detail::is_unsigned_values<T>::minus_one > ::boost::detail::is_unsigned_values<T>::zero));
 };
 
 template <bool integral_type>
diff --git a/deal.II/contrib/boost/include/boost/units/absolute.hpp b/deal.II/contrib/boost/include/boost/units/absolute.hpp
new file mode 100644 (file)
index 0000000..9f36019
--- /dev/null
@@ -0,0 +1,147 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ABSOLUTE_HPP
+#define BOOST_UNITS_ABSOLUTE_HPP
+
+#include <iosfwd>
+
+#include <boost/units/detail/absolute_impl.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// A wrapper to represent absolute units (points rather than vectors).  Intended
+/// originally for temperatures, this class implements operators for absolute units 
+/// so that addition of a relative unit to an absolute unit results in another
+/// absolute unit : absolute<T> +/- T -> absolute<T> and subtraction of one absolute
+/// unit from another results in a relative unit : absolute<T> - absolute<T> -> T
+template<class Y>
+class absolute
+{
+    public:
+        typedef absolute<Y>     this_type;
+        typedef Y               value_type;
+        
+        absolute() : val_() { }
+        absolute(const value_type& val) : val_(val) { }
+        absolute(const this_type& source) : val_(source.val_) { }
+   
+        this_type& operator=(const this_type& source)           { val_ = source.val_; return *this; }
+        
+        const value_type& value() const                         { return val_; }
+        
+        const this_type& operator+=(const value_type& val)      { val_ += val; return *this; }
+        const this_type& operator-=(const value_type& val)      { val_ -= val; return *this; }
+        
+    private:
+        value_type   val_;
+};
+
+/// add a relative value to an absolute one
+template<class Y>
+absolute<Y> operator+(const absolute<Y>& aval,const Y& rval)
+{
+    return absolute<Y>(aval.value()+rval);
+}
+
+/// add a relative value to an absolute one
+template<class Y>
+absolute<Y> operator+(const Y& rval,const absolute<Y>& aval)
+{
+    return absolute<Y>(aval.value()+rval);
+}
+
+/// subtract a relative value from an absolute one
+template<class Y>
+absolute<Y> operator-(const absolute<Y>& aval,const Y& rval)
+{
+    return absolute<Y>(aval.value()-rval);
+}
+
+/// subtracting two absolutes gives a difference
+template<class Y>
+Y operator-(const absolute<Y>& aval1,const absolute<Y>& aval2)
+{
+    return Y(aval1.value()-aval2.value());
+}
+
+/// creates a quantity from an absolute unit and a raw value
+template<class D, class S, class T>
+quantity<absolute<unit<D, S> >, T> operator*(const T& t, const absolute<unit<D, S> >&)
+{
+    return(quantity<absolute<unit<D, S> >, T>::from_value(t));
+}
+
+/// creates a quantity from an absolute unit and a raw value
+template<class D, class S, class T>
+quantity<absolute<unit<D, S> >, T> operator*(const absolute<unit<D, S> >&, const T& t)
+{
+    return(quantity<absolute<unit<D, S> >, T>::from_value(t));
+}
+
+/// Print an absolute unit
+template<class Char, class Traits, class Y>
+std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os,const absolute<Y>& aval)
+{
+
+    os << "absolute " << aval.value();
+    
+    return os;
+}
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::absolute, (class))
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+/// Macro to define the offset between two absolute units.
+/// Requires the value to be in the destination units e.g
+/// @code
+/// BOOST_UNITS_DEFINE_CONVERSION_OFFSET(celsius_base_unit, fahrenheit_base_unit, double, 32.0);
+/// @endcode
+/// @c BOOST_UNITS_DEFINE_CONVERSION_FACTOR is also necessary to
+/// specify the conversion factor.  Like @c BOOST_UNITS_DEFINE_CONVERSION_FACTOR
+/// this macro defines both forward and reverse conversions so 
+/// defining, e.g., the conversion from celsius to fahrenheit as above will also
+/// define the inverse conversion from fahrenheit to celsius.
+#define BOOST_UNITS_DEFINE_CONVERSION_OFFSET(From, To, type_, value_)   \
+    namespace boost {                                                   \
+    namespace units {                                                   \
+    template<>                                                          \
+    struct affine_conversion_helper<                                    \
+        reduce_unit<From::unit_type>::type,                             \
+        reduce_unit<To::unit_type>::type>                               \
+    {                                                                   \
+        static const bool is_defined = true;                            \
+        typedef type_ type;                                             \
+        static type value() { return(value_); }                         \
+    };                                                                  \
+    }                                                                   \
+    }                                                                   \
+    void boost_units_require_semicolon()
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ABSOLUTE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_dimension.hpp b/deal.II/contrib/boost/include/boost/units/base_dimension.hpp
new file mode 100644 (file)
index 0000000..57b4d27
--- /dev/null
@@ -0,0 +1,93 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_DIMENSION_HPP
+#define BOOST_UNITS_BASE_DIMENSION_HPP
+
+#include <boost/units/config.hpp>
+#include <boost/units/dim.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/detail/dimension_list.hpp>
+#include <boost/units/detail/ordinal.hpp>
+#include <boost/units/detail/prevent_redefinition.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// This must be in namespace boost::units so that ADL
+/// will work with friend functions defined inline.
+/// INTERNAL ONLY
+template<long N> struct base_dimension_ordinal { };
+
+/// INTERNAL ONLY
+template<class T, long N> struct base_dimension_pair { };
+
+/// INTERNAL ONLY
+template<class T, long N>
+struct check_base_dimension {
+    enum {
+        value = 
+            sizeof(boost_units_is_registered(units::base_dimension_ordinal<N>())) == sizeof(detail::yes) &&
+            sizeof(boost_units_is_registered(units::base_dimension_pair<T, N>())) != sizeof(detail::yes)
+    };
+};
+
+/// Defines a base dimension.  To define a dimension you need to provide
+/// the derived class (CRTP) and a unique integer.
+/// @code
+/// struct my_dimension : boost::units::base_dimension<my_dimension, 1> {};
+/// @endcode
+/// It is designed so that you will get an error message if you try
+/// to use the same value in multiple definitions.
+template<class Derived,
+         long N
+#if !defined(BOOST_UNITS_DOXYGEN) && !defined(__BORLANDC__)
+         ,
+         class = typename detail::ordinal_has_already_been_defined<
+             check_base_dimension<Derived, N>::value
+         >::type
+#endif
+>
+class base_dimension : 
+    public ordinal<N> 
+{
+    public:
+        /// INTERNAL ONLY
+        typedef base_dimension                                                          this_type;
+        /// A convenience typedef.  Equivalent to boost::units::derived_dimension<Derived,1>::type.
+#ifndef BOOST_UNITS_DOXYGEN 
+        typedef list<dim<Derived,static_rational<1> >, dimensionless_type>    dimension_type;
+#else
+        typedef detail::unspecified dimension_type;
+#endif
+        /// Provided for mpl compatability.
+        typedef Derived type;
+
+    private:
+        /// Register this ordinal
+        /// INTERNAL ONLY
+        friend detail::yes 
+        boost_units_is_registered(const units::base_dimension_ordinal<N>&) 
+        { detail::yes result; return(result); }
+        
+        /// But make sure we can identify the current instantiation!
+        /// INTERNAL ONLY
+        friend detail::yes 
+        boost_units_is_registered(const units::base_dimension_pair<Derived, N>&) 
+        { detail::yes result; return(result); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_unit.hpp b/deal.II/contrib/boost/include/boost/units/base_unit.hpp
new file mode 100644 (file)
index 0000000..975da57
--- /dev/null
@@ -0,0 +1,114 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNIT_HPP
+#define BOOST_UNITS_BASE_UNIT_HPP
+
+#include <boost/units/config.hpp>
+#include <boost/units/heterogeneous_system.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/unit.hpp>
+#include <boost/units/detail/dimension_list.hpp>
+#include <boost/units/detail/ordinal.hpp>
+#include <boost/units/detail/prevent_redefinition.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// This must be in namespace boost::units so that ADL
+/// will work with friend functions defined inline.
+/// Base dimensions and base units are independent.
+/// INTERNAL ONLY
+template<long N> struct base_unit_ordinal { };
+
+/// INTERNAL ONLY
+template<class T, long N> struct base_unit_pair { };
+
+/// INTERNAL ONLY
+template<class T, long N>
+struct check_base_unit {
+    enum {
+        value =
+            sizeof(boost_units_unit_is_registered(units::base_unit_ordinal<N>())) == sizeof(detail::yes) &&
+            sizeof(boost_units_unit_is_registered(units::base_unit_pair<T, N>())) != sizeof(detail::yes)
+    };
+};
+
+/// Defines a base unit.  To define a unit you need to provide
+/// the derived class (CRTP), a dimension list and a unique integer.
+/// @code
+/// struct my_unit : boost::units::base_unit<my_unit, length_dimension, 1> {};
+/// @endcode
+/// It is designed so that you will get an error message if you try
+/// to use the same value in multiple definitions.
+template<class Derived,
+         class Dim,
+         long N
+#if !defined(BOOST_UNITS_DOXYGEN) && !defined(__BORLANDC__)
+         ,
+         class = typename detail::ordinal_has_already_been_defined<
+             check_base_unit<Derived, N>::value
+         >::type
+#endif
+>
+class base_unit : 
+    public ordinal<N> 
+{
+    public:
+        /// INTERNAL ONLY
+        typedef void boost_units_is_base_unit_type;
+        /// INTERNAL ONLY
+        typedef base_unit           this_type;
+        /// The dimensions of this base unit.
+        typedef Dim                 dimension_type;
+
+        /// Provided for mpl compatability.
+        typedef Derived type;
+
+        /// The unit corresponding to this base unit.
+#ifndef BOOST_UNITS_DOXYGEN
+        typedef unit<
+            Dim,
+            heterogeneous_system<
+                heterogeneous_system_impl<
+                    list<
+                        heterogeneous_system_dim<Derived,static_rational<1> >,
+                        dimensionless_type
+                    >,
+                    Dim,
+                    no_scale
+                >
+            >
+        > unit_type;
+#else
+        typedef detail::unspecified unit_type;
+#endif
+
+    private:
+        /// Register this ordinal
+        /// INTERNAL ONLY
+        friend detail::yes 
+        boost_units_unit_is_registered(const units::base_unit_ordinal<N>&) 
+        { detail::yes result; return(result); }
+        
+        /// But make sure we can identify the current instantiation!
+        /// INTERNAL ONLY
+        friend detail::yes 
+        boost_units_unit_is_registered(const units::base_unit_pair<Derived, N>&) 
+        { detail::yes result; return(result); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/angle/arcminute.hpp b/deal.II/contrib/boost/include/boost/units/base_units/angle/arcminute.hpp
new file mode 100644 (file)
index 0000000..86bf5e0
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_BASE_UNITS_ANGLE_ARCMINUTE_HPP_INCLUDED
+#define BOOST_UNIT_BASE_UNITS_ANGLE_ARCMINUTE_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/angle/degree.hpp>
+
+namespace boost {
+namespace units {
+namespace angle {
+
+typedef scaled_base_unit<degree_base_unit, scale<60, static_rational<-1> > >  arcminute_base_unit;
+
+}
+
+template<>
+struct base_unit_info<angle::arcminute_base_unit> {
+    static const char* name()   { return("arcminute"); }
+    static const char* symbol() { return("'"); }
+};
+
+}
+}
+
+#endif // BOOST_UNIT_BASE_UNITS_ANGLE_ARCMINUTE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/angle/arcsecond.hpp b/deal.II/contrib/boost/include/boost/units/base_units/angle/arcsecond.hpp
new file mode 100644 (file)
index 0000000..8baabfa
--- /dev/null
@@ -0,0 +1,37 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_ANGLE_ARCSECOND_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_ANGLE_ARCSECOND_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/angle/degree.hpp>
+
+namespace boost {
+namespace units {
+namespace angle {
+
+//typedef scaled_base_unit<degree_base_unit, scale<60, static_rational<-2> > >  arcsecond_base_unit;
+typedef scaled_base_unit<degree_base_unit, scale<3600, static_rational<-1> > >  arcsecond_base_unit;
+
+}
+
+template<>
+struct base_unit_info<angle::arcsecond_base_unit> {
+    static const char* name()   { return("arcsecond"); }
+    static const char* symbol() { return("\""); }
+};
+
+}
+}
+
+#endif // BOOST_UNIT_SYSTEMS_ANGLE_ARCSECOND_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/angle/degree.hpp b/deal.II/contrib/boost/include/boost/units/base_units/angle/degree.hpp
new file mode 100644 (file)
index 0000000..63edb70
--- /dev/null
@@ -0,0 +1,27 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ANGLE_DEGREE_BASE_UNIT_HPP
+#define BOOST_UNITS_ANGLE_DEGREE_BASE_UNIT_HPP
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/base_units/angle/radian.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(angle,degree,"degree","deg",6.28318530718/360.,boost::units::angle::radian_base_unit,-101);
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle::degree_base_unit)
+
+#endif
+
+#endif // BOOST_UNITS_ANGLE_DEGREE_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/angle/gradian.hpp b/deal.II/contrib/boost/include/boost/units/base_units/angle/gradian.hpp
new file mode 100644 (file)
index 0000000..7b291b4
--- /dev/null
@@ -0,0 +1,27 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ANGLE_GRADIAN_BASE_UNIT_HPP
+#define BOOST_UNITS_ANGLE_GRADIAN_BASE_UNIT_HPP
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/base_units/angle/radian.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(angle,gradian,"gradian","grad",6.28318530718/400.,boost::units::angle::radian_base_unit,-102);
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle::gradian_base_unit)
+
+#endif
+
+#endif // BOOST_UNITS_ANGLE_GRADIAN_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/angle/radian.hpp b/deal.II/contrib/boost/include/boost/units/base_units/angle/radian.hpp
new file mode 100644 (file)
index 0000000..f2b5667
--- /dev/null
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ANGLE_RADIAN_BASE_UNIT_HPP
+#define BOOST_UNITS_ANGLE_RADIAN_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/plane_angle.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace angle {
+
+struct radian_base_unit : public base_unit<radian_base_unit, plane_angle_dimension, -2>
+{
+    static std::string name()   { return("radian"); }
+    static std::string symbol() { return("rad"); }
+};
+
+} // namespace angle
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle::radian_base_unit)
+
+#endif
+
+//#include <boost/units/base_units/angle/conversions.hpp>
+
+#endif // BOOST_UNITS_ANGLE_RADIAN_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/angle/revolution.hpp b/deal.II/contrib/boost/include/boost/units/base_units/angle/revolution.hpp
new file mode 100644 (file)
index 0000000..2dd0d5b
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_REVOLUTION_HPP
+#define BOOST_UNITS_BASE_UNITS_REVOLUTION_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/angle/degree.hpp>
+
+namespace boost {
+namespace units {
+namespace angle {
+
+typedef scaled_base_unit<degree_base_unit, scale<360, static_rational<1> > >  revolution_base_unit;
+
+}
+
+template<>
+struct base_unit_info<angle::revolution_base_unit> {
+    static const char* name()   { return("revolution"); }
+    static const char* symbol() { return("rev"); }
+};
+
+}
+}
+
+#endif // BOOST_UNITS_BASE_UNITS_REVOLUTION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/angle/steradian.hpp b/deal.II/contrib/boost/include/boost/units/base_units/angle/steradian.hpp
new file mode 100644 (file)
index 0000000..5e8c5bd
--- /dev/null
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ANGLE_STERADIAN_BASE_UNIT_HPP
+#define BOOST_UNITS_ANGLE_STERADIAN_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/solid_angle.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace angle {
+
+struct steradian_base_unit : public base_unit<steradian_base_unit, solid_angle_dimension, -1>
+{
+    static std::string name()   { return("steradian"); }
+    static std::string symbol() { return("sr"); }
+};
+
+} // namespace angle
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle::steradian_base_unit)
+
+#endif
+
+//#include <boost/units/base_units/angle/conversions.hpp>
+
+#endif // BOOST_UNITS_ANGLE_STERADIAN_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/astronomical/astronomical_unit.hpp b/deal.II/contrib/boost/include/boost/units/base_units/astronomical/astronomical_unit.hpp
new file mode 100644 (file)
index 0000000..4b1640d
--- /dev/null
@@ -0,0 +1,27 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_ASTRONOMICAL_UNIT_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_ASTRONOMICAL_UNIT_HPP_INCLUDED
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/base_units/si/meter.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(astronomical, astronomical_unit, "astronomical unit", "a.u.", 149597870691.0, boost::units::si::meter_base_unit, -207);
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::astronomical::astronomical_unit_base_unit)
+
+#endif
+
+#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_ASTRONOMICAL_UNIT_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_day.hpp b/deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_day.hpp
new file mode 100644 (file)
index 0000000..2d045ff
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_DAY_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_DAY_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/astronomical/light_second.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace astronomical {
+
+typedef scaled_base_unit<boost::units::astronomical::light_second_base_unit, scale<86400, static_rational<1> > > light_day_base_unit;
+
+} // namespace astronomical
+
+template<>
+struct base_unit_info<astronomical::light_day_base_unit> {
+    static const char* name()   { return("light day"); }
+    static const char* symbol() { return("ldy"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_DAY_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_hour.hpp b/deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_hour.hpp
new file mode 100644 (file)
index 0000000..207d951
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_HOUR_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_HOUR_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/astronomical/light_second.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace astronomical {
+
+typedef scaled_base_unit<boost::units::astronomical::light_second_base_unit, scale<3600, static_rational<1> > > light_hour_base_unit;
+
+} // namespace astronomical
+
+template<>
+struct base_unit_info<astronomical::light_hour_base_unit> {
+    static const char* name()   { return("light hour"); }
+    static const char* symbol() { return("lhr"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_HOUR_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_minute.hpp b/deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_minute.hpp
new file mode 100644 (file)
index 0000000..f0bd095
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_MINUTE_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_MINUTE_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/astronomical/light_second.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace astronomical {
+
+typedef scaled_base_unit<boost::units::astronomical::light_second_base_unit, scale<60, static_rational<1> > > light_minute_base_unit;
+
+} // namespace astronomical
+
+template<>
+struct base_unit_info<astronomical::light_minute_base_unit> {
+    static const char* name()   { return("light minute"); }
+    static const char* symbol() { return("lmn"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_MINUTE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_second.hpp b/deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_second.hpp
new file mode 100644 (file)
index 0000000..555a315
--- /dev/null
@@ -0,0 +1,27 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_SECOND_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_SECOND_HPP_INCLUDED
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/base_units/si/meter.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(astronomical, light_second, "light second", "lsc", 2.99792458e8, boost::units::si::meter_base_unit, -201);
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::astronomical::light_second_base_unit)
+
+#endif
+
+#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_SECOND_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_year.hpp b/deal.II/contrib/boost/include/boost/units/base_units/astronomical/light_year.hpp
new file mode 100644 (file)
index 0000000..e9e83a3
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_YEAR_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_YEAR_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/astronomical/light_second.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace astronomical {
+
+typedef scaled_base_unit<boost::units::astronomical::light_second_base_unit, scale<31557600, static_rational<1> > > light_year_base_unit;
+
+} // namespace astronomical
+
+template<>
+struct base_unit_info<astronomical::light_year_base_unit> {
+    static const char* name()   { return("light year"); }
+    static const char* symbol() { return("ly"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_LIGHT_YEAR_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/astronomical/parsec.hpp b/deal.II/contrib/boost/include/boost/units/base_units/astronomical/parsec.hpp
new file mode 100644 (file)
index 0000000..dd116e5
--- /dev/null
@@ -0,0 +1,27 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_ASTRONOMICAL_PARSEC_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_ASTRONOMICAL_PARSEC_HPP_INCLUDED
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/base_units/si/meter.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(astronomical, parsec, "parsec", "psc", 3.0856775813e16, boost::units::si::meter_base_unit, -206);
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::astronomical::parsec_base_unit)
+
+#endif
+
+#endif // BOOST_UNIT_SYSTEMS_ASTRONOMICAL_PARSEC_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/cgs/biot.hpp b/deal.II/contrib/boost/include/boost/units/base_units/cgs/biot.hpp
new file mode 100644 (file)
index 0000000..51eb5fc
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_BIOT_BASE_UNIT_HPP
+#define BOOST_UNITS_CGS_BIOT_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/base_units/si/ampere.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace cgs {
+
+typedef scaled_base_unit<boost::units::si::ampere_base_unit, scale<10, static_rational<-1> > > biot_base_unit;
+
+} // namespace cgs 
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_BIOT_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/cgs/centimeter.hpp b/deal.II/contrib/boost/include/boost/units/base_units/cgs/centimeter.hpp
new file mode 100644 (file)
index 0000000..1ff712e
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CENTIMETER_BASE_UNIT_HPP
+#define BOOST_UNITS_CENTIMETER_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/base_units/si/meter.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace cgs {
+
+typedef scaled_base_unit<boost::units::si::meter_base_unit, scale<10, static_rational<-2> > > centimeter_base_unit;
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CENTIMETER_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/cgs/gram.hpp b/deal.II/contrib/boost/include/boost/units/base_units/cgs/gram.hpp
new file mode 100644 (file)
index 0000000..1c2cc18
--- /dev/null
@@ -0,0 +1,49 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_GRAM_BASE_UNIT_HPP
+#define BOOST_UNITS_CGS_GRAM_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace cgs {
+
+struct gram_base_unit : public base_unit<gram_base_unit, mass_dimension, -8>
+{
+    static std::string name()    { return("gram"); }
+    static std::string symbol() { return("g"); }
+};
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::cgs::gram_base_unit)
+
+#endif
+
+//#include <boost/units/base_units/detail/conversions.hpp>
+
+#endif // BOOST_UNITS_CGS_GRAM_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/conversions.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/conversions.hpp
new file mode 100644 (file)
index 0000000..54cf638
--- /dev/null
@@ -0,0 +1,46 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+// No include guards.  This header is intended to be included
+// multiple times.
+
+// imperial units
+
+#if 0
+
+#if defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED) && defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_GALLON_HPP_INCLUDED) &&\
+    !defined(BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_GALLON_CONVERSION_DEFINED)
+    #define BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_GALLON_CONVERSION_DEFINED
+    #include <boost/units/conversion.hpp>
+    BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::pint_base_unit,boost::units::imperial::gallon_base_unit, double, 1./8.);
+#endif
+
+#if defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED) && defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_QUART_HPP_INCLUDED) &&\
+    !defined(BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_QUART_CONVERSION_DEFINED)
+    #define BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_QUART_CONVERSION_DEFINED
+    #include <boost/units/conversion.hpp>
+    BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::pint_base_unit,boost::units::imperial::quart_base_unit, double, 1./2.);
+#endif
+
+#if defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED) && defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_GILL_HPP_INCLUDED) &&\
+    !defined(BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_GILL_CONVERSION_DEFINED)
+    #define BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_GILL_CONVERSION_DEFINED
+    #include <boost/units/conversion.hpp>
+    BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::pint_base_unit,boost::units::imperial::gill_base_unit, double, 4.);
+#endif
+
+#if defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED) && defined(BOOST_UNITS_BASE_UNITS_IMPERIAL_FLUID_OUNCE_HPP_INCLUDED) &&\
+    !defined(BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_FLUID_OUNCE_CONVERSION_DEFINED)
+    #define BOOST_BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_TO_FLUID_OUNCE_CONVERSION_DEFINED
+    #include <boost/units/conversion.hpp>
+    BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::imperial::pint_base_unit,boost::units::imperial::fluid_ounce_base_unit, double, 20.);
+#endif
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/drachm.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/drachm.hpp
new file mode 100644 (file)
index 0000000..3dcc024
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_DRACHM_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_IMPERIAL_DRACHM_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/pound.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<pound_base_unit, scale<16, static_rational<-2> > > drachm_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::drachm_base_unit> {
+    static const char* name()   { return("drachm"); }
+    static const char* symbol() { return("drachm"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_DRACHM_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/fluid_ounce.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/fluid_ounce.hpp
new file mode 100644 (file)
index 0000000..8bab33e
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_FLUID_OUNCE_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_IMPERIAL_FLUID_OUNCE_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<pint_base_unit, scale<20, static_rational<-1> > > fluid_ounce_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::fluid_ounce_base_unit> {
+    static const char* name()   { return("fluid ounce (imp.)"); }
+    static const char* symbol() { return("fl oz"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_FLUID_OUNCE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/foot.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/foot.hpp
new file mode 100644 (file)
index 0000000..149985e
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IMPERIAL_FOOT_BASE_UNIT_HPP
+#define BOOST_UNITS_IMPERIAL_FOOT_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/yard.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<yard_base_unit, scale<3, static_rational<-1> > > foot_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::foot_base_unit> {
+    static const char* name()   { return("foot"); }
+    static const char* symbol() { return("ft"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IMPERIAL_FOOT_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/furlong.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/furlong.hpp
new file mode 100644 (file)
index 0000000..1d98821
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IMPERIAL_FURLONG_BASE_UNIT_HPP
+#define BOOST_UNITS_IMPERIAL_FURLONG_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/yard.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<yard_base_unit, scale<220, static_rational<1> > > furlong_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::furlong_base_unit> {
+    static const char* name()   { return("furlong"); }
+    static const char* symbol() { return("furlong"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IMPERIAL_FURLONG_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/gallon.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/gallon.hpp
new file mode 100644 (file)
index 0000000..6fd4653
--- /dev/null
@@ -0,0 +1,40 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_GALLON_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_IMPERIAL_GALLON_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+//typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<3> > > gallon_base_unit;
+typedef scaled_base_unit<pint_base_unit, scale<8, static_rational<1> > > gallon_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::gallon_base_unit> {
+    static const char* name()   { return("gallon (imp.)"); }
+    static const char* symbol() { return("gal"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_GALLON_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/gill.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/gill.hpp
new file mode 100644 (file)
index 0000000..3e5b83a
--- /dev/null
@@ -0,0 +1,40 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_GILL_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_IMPERIAL_GILL_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+//typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<-2> > > gill_base_unit;
+typedef scaled_base_unit<pint_base_unit, scale<4, static_rational<-1> > > gill_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::gill_base_unit> {
+    static const char* name()   { return("gill (imp.)"); }
+    static const char* symbol() { return("gill"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_GILL_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/grain.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/grain.hpp
new file mode 100644 (file)
index 0000000..a36b4a4
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_GRAIN_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_IMPERIAL_GRAIN_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/pound.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<pound_base_unit, scale<7000, static_rational<-1> > > grain_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::grain_base_unit> {
+    static const char* name()   { return("grain"); }
+    static const char* symbol() { return("grain"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_GRAIN_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/hundredweight.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/hundredweight.hpp
new file mode 100644 (file)
index 0000000..6709a78
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_HUNDREDWEIGHT_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_IMPERIAL_HUNDREDWEIGHT_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/pound.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<pound_base_unit, scale<112, static_rational<1> > > hundredweight_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::hundredweight_base_unit> {
+    static const char* name()   { return("hundredweight"); }
+    static const char* symbol() { return("cwt"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_HUNDREDWEIGHT_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/inch.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/inch.hpp
new file mode 100644 (file)
index 0000000..048d8c6
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IMPERIAL_INCH_BASE_UNIT_HPP
+#define BOOST_UNITS_IMPERIAL_INCH_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/yard.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<yard_base_unit, scale<36, static_rational<-1> > > inch_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::inch_base_unit> {
+    static const char* name()   { return("inch"); }
+    static const char* symbol() { return("in"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IMPERIAL_INCH_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/league.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/league.hpp
new file mode 100644 (file)
index 0000000..991e4b6
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IMPERIAL_LEAGUE_BASE_UNIT_HPP
+#define BOOST_UNITS_IMPERIAL_LEAGUE_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/yard.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<yard_base_unit, scale<5280, static_rational<1> > > league_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::league_base_unit> {
+    static const char* name()   { return("league"); }
+    static const char* symbol() { return("league"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IMPERIAL_LEAGUE_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/mile.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/mile.hpp
new file mode 100644 (file)
index 0000000..d0d0fb5
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IMPERIAL_MILE_BASE_UNIT_HPP
+#define BOOST_UNITS_IMPERIAL_MILE_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/yard.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<yard_base_unit, scale<1760, static_rational<1> > > mile_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::mile_base_unit> {
+    static const char* name()   { return("mile"); }
+    static const char* symbol() { return("mi"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IMPERIAL_MILE_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/ounce.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/ounce.hpp
new file mode 100644 (file)
index 0000000..8b9e33a
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_OUNCE_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_IMPERIAL_OUNCE_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/pound.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<pound_base_unit, scale<2, static_rational<-4> > > ounce_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::ounce_base_unit> {
+    static const char* name()   { return("ounce"); }
+    static const char* symbol() { return("oz"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_OUNCE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/pint.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/pint.hpp
new file mode 100644 (file)
index 0000000..1a1440f
--- /dev/null
@@ -0,0 +1,29 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED
+
+#include <string>
+
+#include <boost/units/systems/si/volume.hpp>
+#include <boost/units/conversion.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(imperial, pint, "pint (imp.)", "pt", 4.54609e-3/8., si::volume, -303);    // exact conversion
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::imperial::pint_base_unit)
+
+#endif
+
+#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_PINT_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/pound.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/pound.hpp
new file mode 100644 (file)
index 0000000..c586e6d
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_POUND_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_IMPERIAL_POUND_HPP_INCLUDED
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/base_units/cgs/gram.hpp>
+#include <boost/units/conversion.hpp>
+
+// can't define in terms of kilogram because it is a scaled_base_unit
+//BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(imperial, pound, "pound", "lb", 0.45359237, si::kilogram_base_unit, -302);    // exact conversion
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(imperial, pound, "pound", "lb", 453.59237, cgs::gram_base_unit, -302);    // exact conversion
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::imperial::pound_base_unit)
+
+#endif
+
+#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_POUND_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/quart.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/quart.hpp
new file mode 100644 (file)
index 0000000..723ce0b
--- /dev/null
@@ -0,0 +1,40 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_IMPERIAL_QUART_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_IMPERIAL_QUART_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+//typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<1> > > quart_base_unit;
+typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<1> > > quart_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::quart_base_unit> {
+    static const char* name()   { return("quart (imp.)"); }
+    static const char* symbol() { return("qt"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_IMPERIAL_QUART_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/quarter.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/quarter.hpp
new file mode 100644 (file)
index 0000000..30f0594
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_QUARTER_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_IMPERIAL_QUARTER_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/pound.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<pound_base_unit, scale<28, static_rational<1> > > quarter_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::quarter_base_unit> {
+    static const char* name()   { return("quarter"); }
+    static const char* symbol() { return("quarter"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_QUARTER_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/stone.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/stone.hpp
new file mode 100644 (file)
index 0000000..b4ce433
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_STONE_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_IMPERIAL_STONE_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/pound.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<pound_base_unit, scale<14, static_rational<1> > > stone_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::stone_base_unit> {
+    static const char* name()   { return("stone"); }
+    static const char* symbol() { return("st"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_STONE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/thou.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/thou.hpp
new file mode 100644 (file)
index 0000000..eab2ac9
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IMPERIAL_THOU_BASE_UNIT_HPP
+#define BOOST_UNITS_IMPERIAL_THOU_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/yard.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<yard_base_unit, scale<36000, static_rational<-1> > > thou_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::thou_base_unit> {
+    static const char* name()   { return("thou"); }
+    static const char* symbol() { return("thou"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IMPERIAL_THOU_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/ton.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/ton.hpp
new file mode 100644 (file)
index 0000000..867f147
--- /dev/null
@@ -0,0 +1,40 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_IMPERIAL_TON_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_IMPERIAL_TON_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/imperial/pound.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace imperial {
+
+typedef scaled_base_unit<pound_base_unit, scale<2240, static_rational<1> > > ton_base_unit;
+
+} // namespace imperial
+
+template<>
+struct base_unit_info<imperial::ton_base_unit> {
+    static const char* name()   { return("long ton"); }
+    static const char* symbol() { return("t"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_SYSTEMS_IMPERIAL_TON_HPP_INCLUDED
+
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/imperial/yard.hpp b/deal.II/contrib/boost/include/boost/units/base_units/imperial/yard.hpp
new file mode 100644 (file)
index 0000000..d15b99d
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SYSTEMS_IMPERIAL_YARD_BASE_UNIT_HPP
+#define BOOST_UNITS_SYSTEMS_IMPERIAL_YARD_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/base_units/si/meter.hpp>
+#include <boost/units/conversion.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(imperial, yard, "yard", "yd", 0.9144, si::meter_base_unit, -301);    // exact conversion
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::imperial::yard_base_unit)
+
+#endif
+
+#endif // BOOST_UNITS_SYSTEMS_IMPERIAL_YARD_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/angstrom.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/angstrom.hpp
new file mode 100644 (file)
index 0000000..d2954e3
--- /dev/null
@@ -0,0 +1,37 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_ANGSTROM_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_ANGSTROM_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/base_units/si/meter.hpp>
+
+namespace boost {
+namespace units {
+namespace metric {
+
+typedef scaled_base_unit<boost::units::si::meter_base_unit, scale<10, static_rational<-10> > > angstrom_base_unit;
+
+}
+
+template<>
+struct base_unit_info<metric::angstrom_base_unit> {
+    static const char* name()   { return("angstrom"); }
+    static const char* symbol() { return("A"); }
+};
+
+}
+}
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_ANGSTROM_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/are.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/are.hpp
new file mode 100644 (file)
index 0000000..bd697f4
--- /dev/null
@@ -0,0 +1,19 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_ARE_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_ARE_HPP_INCLUDED
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/systems/si/area.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, are, "are", "a", 1.0e2, si::area, 10);
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_ARE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/atmosphere.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/atmosphere.hpp
new file mode 100644 (file)
index 0000000..b714e90
--- /dev/null
@@ -0,0 +1,19 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_ATMOSPHERE_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_ATMOSPHERE_HPP_INCLUDED
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/systems/si/pressure.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, atmosphere, "atmosphere", "atm", 1.01325e5, si::pressure, 33);
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_ATMOSPHERE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/bar.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/bar.hpp
new file mode 100644 (file)
index 0000000..682d54f
--- /dev/null
@@ -0,0 +1,19 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_BAR_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_BAR_HPP_INCLUDED
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/systems/si/pressure.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, bar, "bar", "bar", 1.0e5, si::pressure, 14);
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_BAR_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/barn.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/barn.hpp
new file mode 100644 (file)
index 0000000..ae2b28c
--- /dev/null
@@ -0,0 +1,19 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_BARN_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_BARN_HPP_INCLUDED
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/systems/si/area.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, barn, "barn", "b", 1.0e-28, si::area, 11);
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_BARN_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/day.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/day.hpp
new file mode 100644 (file)
index 0000000..f8d83c8
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_OTHER_DAY_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_OTHER_DAY_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/si/second.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace metric {
+
+typedef scaled_base_unit<boost::units::si::second_base_unit, scale<86400, static_rational<1> > > day_base_unit;
+
+} // namespace metric
+
+template<>
+struct base_unit_info<metric::day_base_unit> {
+    static const char* name()   { return("day"); }
+    static const char* symbol() { return("d"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/fermi.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/fermi.hpp
new file mode 100644 (file)
index 0000000..8732c4e
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_FERMI_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_FERMI_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/si/meter.hpp>
+
+namespace boost {
+namespace units {
+namespace metric {
+
+typedef scaled_base_unit<boost::units::si::meter_base_unit, scale<10, static_rational<-15> > > fermi_base_unit;
+
+}
+
+template<>
+struct base_unit_info<metric::fermi_base_unit> {
+    static const char* name()   { return("fermi"); }
+    static const char* symbol() { return("fm"); }
+};
+
+}
+}
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_FERMI_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/hectare.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/hectare.hpp
new file mode 100644 (file)
index 0000000..476b0fc
--- /dev/null
@@ -0,0 +1,19 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_HECTARE_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_HECTARE_HPP_INCLUDED
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/systems/si/area.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, hectare, "hectare", "ha", 1.0e4, si::area, 12);
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_HECTARE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/hour.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/hour.hpp
new file mode 100644 (file)
index 0000000..443e250
--- /dev/null
@@ -0,0 +1,37 @@
+  // Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_HOUR_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_HOUR_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/base_units/si/second.hpp>
+
+namespace boost {
+namespace units {
+namespace metric {
+
+typedef scaled_base_unit<boost::units::si::second_base_unit, scale<60, static_rational<2> > > hour_base_unit;
+
+}
+
+template<>
+struct base_unit_info<metric::hour_base_unit> {
+    static const char* name()   { return("hour"); }
+    static const char* symbol() { return("h"); }
+};
+
+}
+}
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_HOUR_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/knot.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/knot.hpp
new file mode 100644 (file)
index 0000000..6b85e6e
--- /dev/null
@@ -0,0 +1,19 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_KNOT_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_KNOT_HPP_INCLUDED
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/systems/si/velocity.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, knot, "knot", "kt", 1852./3600., boost::units::si::velocity, -403);
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_KNOT_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/liter.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/liter.hpp
new file mode 100644 (file)
index 0000000..da90175
--- /dev/null
@@ -0,0 +1,19 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_LITER_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_LITER_HPP_INCLUDED
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/systems/si/volume.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, liter, "liter", "L", 1.0e-3, si::volume, 13);
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_LITER_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/micron.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/micron.hpp
new file mode 100644 (file)
index 0000000..0965836
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_MICRON_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_MICRON_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/si/meter.hpp>
+
+namespace boost {
+namespace units {
+namespace metric {
+
+typedef scaled_base_unit<boost::units::si::meter_base_unit, scale<10, static_rational<-6> > >  micron_base_unit;
+
+}
+
+template<>
+struct base_unit_info<metric::micron_base_unit> {
+    static const char* name()   { return("micron"); }
+    static const char* symbol() { return("u"); }
+};
+
+}
+}
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_MICRON_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/minute.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/minute.hpp
new file mode 100644 (file)
index 0000000..c2f9e6b
--- /dev/null
@@ -0,0 +1,37 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_MINUTE_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_MINUTE_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/base_units/si/second.hpp>
+
+namespace boost {
+namespace units {
+namespace metric {
+
+typedef scaled_base_unit<boost::units::si::second_base_unit, scale<60, static_rational<1> > > minute_base_unit;
+
+}
+
+template<>
+struct base_unit_info<metric::minute_base_unit> {
+    static const char* name()   { return("minute"); }
+    static const char* symbol() { return("min"); }
+};
+
+}
+}
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_MINUTE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/mmHg.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/mmHg.hpp
new file mode 100644 (file)
index 0000000..93e3869
--- /dev/null
@@ -0,0 +1,19 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_MMHG_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_MMHG_HPP_INCLUDED
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/systems/si/pressure.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, mmHg, "millimeters mercury", "mmHg", 133.322, si::pressure, -404);
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_MMHG_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/nautical_mile.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/nautical_mile.hpp
new file mode 100644 (file)
index 0000000..d42dd77
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_NAUTICAL_MILE_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_NAUTICAL_MILE_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/si/meter.hpp>
+
+namespace boost {
+namespace units {
+namespace metric {
+
+typedef scaled_base_unit<boost::units::si::meter_base_unit, scale<1852, static_rational<1> > > nautical_mile_base_unit;
+
+}
+
+template<>
+struct base_unit_info<metric::nautical_mile_base_unit> {
+    static const char* name()   { return("nautical mile"); }
+    static const char* symbol() { return("nmi"); }
+};
+
+}
+}
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_NAUTICAL_MILE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/ton.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/ton.hpp
new file mode 100644 (file)
index 0000000..a842aaa
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_TON_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_TON_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/base_units/si/kilogram.hpp>
+//#include <boost/units/base_units/cgs/gram.hpp>
+
+namespace boost {
+namespace units {
+namespace metric {
+
+//typedef scaled_base_unit<boost::units::cgs::gram_base_unit, scale<10, static_rational<6> > > ton_base_unit;
+typedef scaled_base_unit<boost::units::si::kilogram_base_unit, scale<1000, static_rational<1> > > ton_base_unit;
+
+}
+
+template<>
+struct base_unit_info<metric::ton_base_unit> {
+    static const char* name()   { return("metric ton"); }
+    static const char* symbol() { return("t"); }
+};
+
+}
+}
+
+#endif // BOOST_UNIT_SYSTEMS_METRIC_TON_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/torr.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/torr.hpp
new file mode 100644 (file)
index 0000000..08fd29a
--- /dev/null
@@ -0,0 +1,19 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_METRIC_TORR_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_METRIC_TORR_HPP_INCLUDED
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/systems/si/pressure.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(metric, torr, "torr", "Torr", 1.01325e5/760.0, si::pressure, -401);
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/metric/year.hpp b/deal.II/contrib/boost/include/boost/units/base_units/metric/year.hpp
new file mode 100644 (file)
index 0000000..e43acd6
--- /dev/null
@@ -0,0 +1,38 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_OTHER_YEAR_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_OTHER_YEAR_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/si/second.hpp>
+
+// Julian year = 365.25 days exactly = 8766 hours exactly
+
+namespace boost {
+namespace units {
+namespace metric {
+
+typedef scaled_base_unit<boost::units::si::second_base_unit, scale<31557600, static_rational<1> > > year_base_unit;
+
+}
+
+template<>
+struct base_unit_info<metric::year_base_unit> {
+    static const char* name()   { return("Julian year"); }
+    static const char* symbol() { return("yr"); }
+};
+
+}
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/si/ampere.hpp b/deal.II/contrib/boost/include/boost/units/base_units/si/ampere.hpp
new file mode 100644 (file)
index 0000000..0c21d67
--- /dev/null
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_AMPERE_BASE_UNIT_HPP
+#define BOOST_UNITS_SI_AMPERE_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace si {
+
+struct ampere_base_unit : public base_unit<ampere_base_unit, current_dimension, -6>
+{
+    static std::string name()   { return("ampere"); }
+    static std::string symbol() { return("A"); }
+};
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::ampere_base_unit)
+
+#endif
+
+//#include <boost/units/base_units/detail/conversions.hpp>
+
+#endif // BOOST_UNITS_SI_AMPERE_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/si/candela.hpp b/deal.II/contrib/boost/include/boost/units/base_units/si/candela.hpp
new file mode 100644 (file)
index 0000000..ab7a795
--- /dev/null
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_CANDELA_BASE_UNIT_HPP
+#define BOOST_UNITS_SI_CANDELA_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/luminous_intensity.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace si {
+
+struct candela_base_unit : public base_unit<candela_base_unit, luminous_intensity_dimension, -3>
+{
+    static std::string name()   { return("candela"); }
+    static std::string symbol() { return("cd"); }
+};
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::candela_base_unit)
+
+#endif
+
+//#include <boost/units/base_units/detail/conversions.hpp>
+
+#endif // BOOST_UNITS_SI_CANDELA_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/si/kelvin.hpp b/deal.II/contrib/boost/include/boost/units/base_units/si/kelvin.hpp
new file mode 100644 (file)
index 0000000..78fe1dd
--- /dev/null
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_KELVIN_BASE_UNIT_HPP
+#define BOOST_UNITS_SI_KELVIN_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/temperature.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace si {
+
+struct kelvin_base_unit : public base_unit<kelvin_base_unit, temperature_dimension, -5>
+{
+    static std::string name()   { return("kelvin"); }
+    static std::string symbol() { return("K"); }
+};
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::kelvin_base_unit)
+
+#endif
+
+//#include <boost/units/base_units/detail/conversions.hpp>
+
+#endif // BOOST_UNITS_SI_KELVIN_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/si/kilogram.hpp b/deal.II/contrib/boost/include/boost/units/base_units/si/kilogram.hpp
new file mode 100644 (file)
index 0000000..0f8b0a6
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_KILOGRAM_BASE_UNIT_HPP
+#define BOOST_UNITS_SI_KILOGRAM_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/base_units/cgs/gram.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace si {
+
+typedef scaled_base_unit<boost::units::cgs::gram_base_unit, scale<10, static_rational<3> > > kilogram_base_unit;
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_KILOGRAM_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/si/meter.hpp b/deal.II/contrib/boost/include/boost/units/base_units/si/meter.hpp
new file mode 100644 (file)
index 0000000..3a5fed2
--- /dev/null
@@ -0,0 +1,50 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_METER_BASE_UNIT_HPP
+#define BOOST_UNITS_SI_METER_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace si {
+
+struct meter_base_unit : public base_unit<meter_base_unit, length_dimension, -9>
+{
+    static std::string name()   { return("meter"); }
+    static std::string symbol() { return("m"); }
+};
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::meter_base_unit)
+
+#endif
+
+//#include <boost/units/base_units/detail/conversions.hpp>
+
+#endif // BOOST_UNITS_SI_METER_BASE_UNIT_HPP
+
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/si/mole.hpp b/deal.II/contrib/boost/include/boost/units/base_units/si/mole.hpp
new file mode 100644 (file)
index 0000000..5b73313
--- /dev/null
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_MOLE_BASE_UNIT_HPP
+#define BOOST_UNITS_SI_MOLE_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/amount.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace si {
+
+struct mole_base_unit : public base_unit<mole_base_unit, amount_dimension, -4>
+{
+    static std::string name()   { return("mole"); }
+    static std::string symbol() { return("mol"); }
+};
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::mole_base_unit)
+
+#endif
+
+//#include <boost/units/base_units/detail/conversions.hpp>
+
+#endif // BOOST_UNITS_SI_MOLE_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/si/second.hpp b/deal.II/contrib/boost/include/boost/units/base_units/si/second.hpp
new file mode 100644 (file)
index 0000000..946c671
--- /dev/null
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_SECOND_BASE_UNIT_HPP
+#define BOOST_UNITS_SI_SECOND_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace si {
+
+struct second_base_unit : public base_unit<second_base_unit, time_dimension, -7>
+{
+    static std::string name()   { return("second"); }
+    static std::string symbol() { return("s"); }
+};
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::second_base_unit)
+
+#endif
+
+//#include <boost/units/base_units/detail/conversions.hpp>
+
+#endif // BOOST_UNITS_SI_SECOND_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/temperature/celsius.hpp b/deal.II/contrib/boost/include/boost/units/base_units/temperature/celsius.hpp
new file mode 100644 (file)
index 0000000..dff70a1
--- /dev/null
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_TEMPERATURE_CELSIUS_BASE_UNIT_HPP
+#define BOOST_UNITS_TEMPERATURE_CELSIUS_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/temperature.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace temperature {
+
+struct celsius_base_unit : public base_unit<celsius_base_unit, temperature_dimension, -1008>
+{
+    static std::string name()   { return("celsius"); }
+    static std::string symbol() { return("C"); }
+};
+
+} // namespace temperature
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::temperature::celsius_base_unit)
+
+#endif
+
+#include <boost/units/base_units/temperature/conversions.hpp>
+
+#endif // BOOST_UNITS_TEMPERATURE_CELSIUS_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/temperature/conversions.hpp b/deal.II/contrib/boost/include/boost/units/base_units/temperature/conversions.hpp
new file mode 100644 (file)
index 0000000..e4e45de
--- /dev/null
@@ -0,0 +1,42 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+// No include guards.  This header is intended to be included
+// multiple times.
+
+// units of temperature
+
+#if defined(BOOST_UNITS_SI_KELVIN_BASE_UNIT_HPP) && defined(BOOST_UNITS_TEMPERATURE_CELSIUS_BASE_UNIT_HPP) &&\
+    !defined(BOOST_UNITS_SYSTEMS_KELVIN_TO_CELSIUS_CONVERSION_DEFINED)
+    #define BOOST_UNITS_SYSTEMS_KELVIN_TO_CELSIUS_CONVERSION_DEFINED
+    #include <boost/units/conversion.hpp>
+    #include <boost/units/absolute.hpp>
+    BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::si::kelvin_base_unit, boost::units::temperature::celsius_base_unit, one, make_one());
+    BOOST_UNITS_DEFINE_CONVERSION_OFFSET(boost::units::si::kelvin_base_unit, boost::units::temperature::celsius_base_unit, double, -273.15);
+#endif
+
+#if defined(BOOST_UNITS_SI_KELVIN_BASE_UNIT_HPP) && defined(BOOST_UNITS_TEMPERATURE_FAHRENHEIT_BASE_UNIT_HPP) &&\
+    !defined(BOOST_UNITS_SYSTEMS_KELVIN_TO_FAHRENHEIT_CONVERSION_DEFINED)
+    #define BOOST_UNITS_SYSTEMS_KELVIN_TO_FAHRENHEIT_CONVERSION_DEFINED
+    #include <boost/units/conversion.hpp>
+    #include <boost/units/absolute.hpp>
+    BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::si::kelvin_base_unit, boost::units::temperature::fahrenheit_base_unit, double, 9.0/5.0);
+    BOOST_UNITS_DEFINE_CONVERSION_OFFSET(boost::units::si::kelvin_base_unit, boost::units::temperature::fahrenheit_base_unit, double, -273.15 * 9.0 / 5.0 + 32.0);
+#endif
+
+#if defined(BOOST_UNITS_TEMPERATURE_CELSIUS_BASE_UNIT_HPP) && defined(BOOST_UNITS_TEMPERATURE_FAHRENHEIT_BASE_UNIT_HPP) &&\
+    !defined(BOOST_UNITS_SYSTEMS_CELSUIS_TO_FAHRENHEIT_CONVERSION_DEFINED)
+    #define BOOST_UNITS_SYSTEMS_CELSUIS_TO_FAHRENHEIT_CONVERSION_DEFINED
+    #include <boost/units/conversion.hpp>
+    #include <boost/units/absolute.hpp>
+    BOOST_UNITS_DEFINE_CONVERSION_FACTOR(boost::units::temperature::celsius_base_unit, boost::units::temperature::fahrenheit_base_unit, double, 9.0/5.0);
+    BOOST_UNITS_DEFINE_CONVERSION_OFFSET(boost::units::temperature::celsius_base_unit, boost::units::temperature::fahrenheit_base_unit, double, 32.0);
+#endif
+
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/temperature/fahrenheit.hpp b/deal.II/contrib/boost/include/boost/units/base_units/temperature/fahrenheit.hpp
new file mode 100644 (file)
index 0000000..ff0149f
--- /dev/null
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_TEMPERATURE_FAHRENHEIT_BASE_UNIT_HPP
+#define BOOST_UNITS_TEMPERATURE_FAHRENHEIT_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/temperature.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace temperature {
+
+struct fahrenheit_base_unit : public base_unit<fahrenheit_base_unit, temperature_dimension, -1007>
+{
+    static std::string name()   { return("fahrenheit"); }
+    static std::string symbol() { return("F"); }
+};
+
+} // namespace temperature
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::temperature::fahrenheit_base_unit)
+
+#endif
+
+#include <boost/units/base_units/temperature/conversions.hpp>
+
+#endif // BOOST_UNITS_TEMPERATURE_FAHRENHEIT_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/cup.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/cup.hpp
new file mode 100644 (file)
index 0000000..f811373
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_US_CUP_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_US_CUP_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<-1> > > cup_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::cup_base_unit> {
+    static const char* name()   { return("cup"); }
+    static const char* symbol() { return("c"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_US_CUP_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/dram.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/dram.hpp
new file mode 100644 (file)
index 0000000..73fc44f
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_BASE_UNITS_US_DRAM_HPP_INCLUDED
+#define BOOST_UNIT_BASE_UNITS_US_DRAM_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pound.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pound_base_unit, scale<16, static_rational<-2> > > dram_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::dram_base_unit> {
+    static const char* name()   { return("dram (U.S.)"); }
+    static const char* symbol() { return("dr"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_BASE_UNITS_US_DRAM_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/fluid_dram.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/fluid_dram.hpp
new file mode 100644 (file)
index 0000000..cf0c85d
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_US_FLUID_DRAM_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_US_FLUID_DRAM_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<-7> > > fluid_dram_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::fluid_dram_base_unit> {
+    static const char* name()   { return("fluid dram (U.S.)"); }
+    static const char* symbol() { return("fl dr"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_US_FLUID_DRAM_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/fluid_ounce.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/fluid_ounce.hpp
new file mode 100644 (file)
index 0000000..0c9d7e9
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_US_FLUID_OUNCE_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_US_FLUID_OUNCE_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pint_base_unit, scale<16, static_rational<-1> > > fluid_ounce_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::fluid_ounce_base_unit> {
+    static const char* name()   { return("fluid ounce (U.S.)"); }
+    static const char* symbol() { return("fl oz"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_US_FLUID_OUNCE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/foot.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/foot.hpp
new file mode 100644 (file)
index 0000000..4b529bb
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_US_FOOT_BASE_UNIT_HPP
+#define BOOST_UNITS_US_FOOT_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/yard.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<yard_base_unit, scale<3, static_rational<-1> > > foot_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::foot_base_unit> {
+    static const char* name()   { return("foot"); }
+    static const char* symbol() { return("ft"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_US_FOOT_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/gallon.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/gallon.hpp
new file mode 100644 (file)
index 0000000..a7314c5
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_US_GALLON_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_US_GALLON_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<3> > > gallon_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::gallon_base_unit> {
+    static const char* name()   { return("gallon (U.S.)"); }
+    static const char* symbol() { return("gal"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_US_GALLON_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/gill.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/gill.hpp
new file mode 100644 (file)
index 0000000..e937343
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_US_GILL_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_US_GILL_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<-2> > > gill_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::gill_base_unit> {
+    static const char* name()   { return("gill (U.S.)"); }
+    static const char* symbol() { return("gi"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_US_GILL_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/grain.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/grain.hpp
new file mode 100644 (file)
index 0000000..e21baf6
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_BASE_UNITS_US_GRAIN_HPP_INCLUDED
+#define BOOST_UNIT_BASE_UNITS_US_GRAIN_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pound.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pound_base_unit, scale<7000, static_rational<-1> > > grain_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::grain_base_unit> {
+    static const char* name()   { return("grain"); }
+    static const char* symbol() { return("gr"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_BASE_UNITS_US_GRAIN_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/hundredweight.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/hundredweight.hpp
new file mode 100644 (file)
index 0000000..0bccd49
--- /dev/null
@@ -0,0 +1,40 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_BASE_UNITS_US_HUNDREDWEIGHT_HPP_INCLUDED
+#define BOOST_UNIT_BASE_UNITS_US_HUNDREDWEIGHT_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pound.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+//typedef scaled_base_unit<pound_base_unit, scale<10, static_rational<2> > > hundredweight_base_unit;
+typedef scaled_base_unit<pound_base_unit, scale<100, static_rational<1> > > hundredweight_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::hundredweight_base_unit> {
+    static const char* name()   { return("hundredweight (U.S.)"); }
+    static const char* symbol() { return("cwt"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_BASE_UNITS_US_HUNDREDWEIGHT_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/inch.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/inch.hpp
new file mode 100644 (file)
index 0000000..05bd59a
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_US_INCH_BASE_UNIT_HPP
+#define BOOST_UNITS_US_INCH_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/yard.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<yard_base_unit, scale<36, static_rational<-1> > > inch_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::inch_base_unit> {
+    static const char* name()   { return("inch"); }
+    static const char* symbol() { return("in"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_US_INCH_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/mil.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/mil.hpp
new file mode 100644 (file)
index 0000000..ee75b79
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_US_MIL_BASE_UNIT_HPP
+#define BOOST_UNITS_US_MIL_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/yard.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<yard_base_unit, scale<36000, static_rational<-1> > > mil_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::mil_base_unit> {
+    static const char* name()   { return("mil"); }
+    static const char* symbol() { return("mil"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_US_MIL_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/mile.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/mile.hpp
new file mode 100644 (file)
index 0000000..d3513f1
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_US_MILE_BASE_UNIT_HPP
+#define BOOST_UNITS_US_MILE_BASE_UNIT_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/yard.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<yard_base_unit, scale<1760, static_rational<1> > > mile_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::mile_base_unit> {
+    static const char* name()   { return("mile"); }
+    static const char* symbol() { return("mi"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_US_MILE_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/minim.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/minim.hpp
new file mode 100644 (file)
index 0000000..bf266cd
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_US_MINIM_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_US_MINIM_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pint_base_unit, scale<7680, static_rational<-1> > > minim_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::minim_base_unit> {
+    static const char* name()   { return("minim (U.S.)"); }
+    static const char* symbol() { return("minim"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_US_MINIM_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/ounce.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/ounce.hpp
new file mode 100644 (file)
index 0000000..5f88f83
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_US_OUNCE_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_US_OUNCE_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pound.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pound_base_unit, scale<2, static_rational<-4> > > ounce_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::ounce_base_unit> {
+    static const char* name()   { return("ounce"); }
+    static const char* symbol() { return("oz"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_SYSTEMS_US_OUNCE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/pint.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/pint.hpp
new file mode 100644 (file)
index 0000000..3a923b8
--- /dev/null
@@ -0,0 +1,28 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_US_PINT_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_US_PINT_HPP_INCLUDED
+
+#include <boost/units/config.hpp>
+#include <boost/units/systems/si/volume.hpp>
+#include <boost/units/conversion.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(us, pint, "pint (U.S.)", "pt", 0.4731765e-3, si::volume, -503);    
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::us::pint_base_unit)
+
+#endif
+
+#endif // BOOST_UNITS_BASE_UNITS_US_PINT_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/pound.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/pound.hpp
new file mode 100644 (file)
index 0000000..bef6cde
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_US_POUND_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_US_POUND_HPP_INCLUDED
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/base_units/cgs/gram.hpp>
+#include <boost/units/conversion.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(us, pound, "pound", "lb", 453.59237, cgs::gram_base_unit, -502);    // exact conversion
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::us::pound_base_unit)
+
+#endif
+
+#endif // BOOST_UNIT_SYSTEMS_US_POUND_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/pound_force.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/pound_force.hpp
new file mode 100644 (file)
index 0000000..9749d5e
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2009 Matthias Christian Schabel
+// Copyright (C) 2007-2009 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_SYSTEMS_US_POUND_FORCE_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_US_POUND_FORCE_HPP_INCLUDED
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+//#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/systems/si/force.hpp>
+#include <boost/units/conversion.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(us, pound_force, "pound-force", "lbf", 4.4482216152605, si::force, -600);    // exact conversion
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::us::pound_force_base_unit)
+
+#endif
+
+#endif // BOOST_UNIT_SYSTEMS_US_POUND_FORCE_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/quart.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/quart.hpp
new file mode 100644 (file)
index 0000000..45cf6a9
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_US_QUART_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_US_QUART_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<1> > > quart_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::quart_base_unit> {
+    static const char* name()   { return("quart (U.S.)"); }
+    static const char* symbol() { return("qt"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_US_QUART_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/tablespoon.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/tablespoon.hpp
new file mode 100644 (file)
index 0000000..f95f0a2
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_US_TABLESPOON_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_US_TABLESPOON_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pint_base_unit, scale<2, static_rational<-5> > > tablespoon_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::tablespoon_base_unit> {
+    static const char* name()   { return("tablespoon"); }
+    static const char* symbol() { return("tbsp"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_US_TABLESPOON_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/teaspoon.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/teaspoon.hpp
new file mode 100644 (file)
index 0000000..8f8dd73
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_BASE_UNITS_US_TEASPOON_HPP_INCLUDED
+#define BOOST_UNITS_BASE_UNITS_US_TEASPOON_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pint.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pint_base_unit, scale<96, static_rational<-1> > > teaspoon_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::teaspoon_base_unit> {
+    static const char* name()   { return("teaspoon"); }
+    static const char* symbol() { return("tsp"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_BASE_UNITS_US_TEASPOON_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/ton.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/ton.hpp
new file mode 100644 (file)
index 0000000..84daa85
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNIT_BASE_UNITS_US_TON_HPP_INCLUDED
+#define BOOST_UNIT_BASE_UNITS_US_TON_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/us/pound.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace us {
+
+typedef scaled_base_unit<pound_base_unit, scale<2000, static_rational<1> > > ton_base_unit;
+
+} // namespace us
+
+template<>
+struct base_unit_info<us::ton_base_unit> {
+    static const char* name()   { return("short ton"); }
+    static const char* symbol() { return("t"); }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNIT_BASE_UNITS_US_TON_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/units/base_units/us/yard.hpp b/deal.II/contrib/boost/include/boost/units/base_units/us/yard.hpp
new file mode 100644 (file)
index 0000000..b609eae
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SYSTEMS_US_YARD_BASE_UNIT_HPP
+#define BOOST_UNITS_SYSTEMS_US_YARD_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/base_units/si/meter.hpp>
+#include <boost/units/conversion.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(us, yard, "yard", "yd", 0.9144, si::meter_base_unit, -501);    // exact conversion
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::us::yard_base_unit)
+
+#endif
+
+#endif // BOOST_UNITS_SYSTEMS_US_YARD_BASE_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/cmath.hpp b/deal.II/contrib/boost/include/boost/units/cmath.hpp
new file mode 100644 (file)
index 0000000..393aa5d
--- /dev/null
@@ -0,0 +1,639 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CMATH_HPP 
+#define BOOST_UNITS_CMATH_HPP
+
+#include <boost/config/no_tr1/cmath.hpp>
+#include <cstdlib>
+
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/math/special_functions/hypot.hpp>
+#include <boost/math/special_functions/next.hpp>
+#include <boost/math/special_functions/round.hpp>
+#include <boost/math/special_functions/sign.hpp>
+
+#include <boost/units/dimensionless_quantity.hpp>
+#include <boost/units/pow.hpp>
+#include <boost/units/quantity.hpp>
+#include <boost/units/detail/cmath_impl.hpp>
+
+#include <boost/units/systems/si/plane_angle.hpp>
+
+/// \file 
+/// \brief Overloads of functions in \<cmath\> for quantities
+///
+/// \detailed Only functions for which a dimensionally-correct result type  
+/// can be determined are overloaded. All functions work with dimensionless
+/// quantities.
+
+// BOOST_PREVENT_MACRO_SUBSTITUTION is needed on certain compilers that define 
+// some <cmath> functions as macros; it is used for all functions even though it
+// isn't necessary -- I didn't want to think :)
+//
+// the form using namespace detail; return(f(x)); is used
+// to enable ADL for UDTs
+
+namespace boost {
+
+namespace units { 
+
+template<class Unit,class Y>
+inline 
+bool 
+isfinite BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{ 
+    using boost::math::isfinite;
+    return isfinite BOOST_PREVENT_MACRO_SUBSTITUTION (q.value());
+}
+
+template<class Unit,class Y>
+inline 
+bool 
+isinf BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{ 
+    using boost::math::isinf;
+    return isinf BOOST_PREVENT_MACRO_SUBSTITUTION (q.value());
+}
+
+template<class Unit,class Y>
+inline
+bool 
+isnan BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{ 
+    using boost::math::isnan;
+    return isnan BOOST_PREVENT_MACRO_SUBSTITUTION (q.value());
+}
+
+template<class Unit,class Y>
+inline 
+bool 
+isnormal BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{ 
+    using boost::math::isnormal;
+    return isnormal BOOST_PREVENT_MACRO_SUBSTITUTION (q.value());
+}
+
+template<class Unit,class Y>
+inline 
+bool 
+isgreater BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,
+                                            const quantity<Unit,Y>& q2)
+{ 
+    using namespace detail;
+    return isgreater BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value());
+}
+
+template<class Unit,class Y>
+inline 
+bool 
+isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,
+                                                 const quantity<Unit,Y>& q2)
+{ 
+    using namespace detail;
+    return isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value());
+}
+
+template<class Unit,class Y>
+inline 
+bool 
+isless BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,
+                                         const quantity<Unit,Y>& q2)
+{ 
+    using namespace detail;
+    return isless BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value());
+}
+
+template<class Unit,class Y>
+inline 
+bool 
+islessequal BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,
+                                              const quantity<Unit,Y>& q2)
+{ 
+    using namespace detail;
+    return islessequal BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value());
+}
+
+template<class Unit,class Y>
+inline 
+bool 
+islessgreater BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,
+                                                const quantity<Unit,Y>& q2)
+{ 
+    using namespace detail;
+    return islessgreater BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value());
+}
+
+template<class Unit,class Y>
+inline 
+bool 
+isunordered BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,
+                                              const quantity<Unit,Y>& q2)
+{ 
+    using namespace detail;
+    return isunordered BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value());
+}
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> 
+abs BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{
+    using std::abs;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(abs BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()));
+}
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> 
+ceil BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{
+    using std::ceil;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(ceil BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()));
+}
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> 
+copysign BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,
+         const quantity<Unit,Y>& q2)
+{
+    using boost::math::copysign;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(copysign BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()));
+}
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> 
+fabs BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{
+    using std::fabs;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(fabs BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()));
+}
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> 
+floor BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{
+    using std::floor;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(floor BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()));
+}
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> 
+fdim BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,
+                                       const quantity<Unit,Y>& q2)
+{
+    using namespace detail;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(fdim BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()));
+}
+
+#if 0
+
+template<class Unit1,class Unit2,class Unit3,class Y>
+inline 
+typename add_typeof_helper<
+    typename multiply_typeof_helper<quantity<Unit1,Y>,
+                                    quantity<Unit2,Y> >::type,
+    quantity<Unit3,Y> >::type 
+fma BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit1,Y>& q1,
+                                      const quantity<Unit2,Y>& q2,
+                                      const quantity<Unit3,Y>& q3)
+{
+    using namespace detail;
+
+    typedef quantity<Unit1,Y>   type1;
+    typedef quantity<Unit2,Y>   type2;
+    typedef quantity<Unit3,Y>   type3;
+    
+    typedef typename multiply_typeof_helper<type1,type2>::type  prod_type;
+    typedef typename add_typeof_helper<prod_type,type3>::type   quantity_type;
+    
+    return quantity_type::from_value(fma BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value(),q3.value()));
+}
+
+#endif
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> 
+fmax BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,
+                                       const quantity<Unit,Y>& q2)
+{
+    using namespace detail;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(fmax BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()));
+}
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> 
+fmin BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,
+                                       const quantity<Unit,Y>& q2)
+{
+    using namespace detail;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(fmin BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()));
+}
+
+template<class Unit,class Y>
+inline 
+int 
+fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{ 
+    using boost::math::fpclassify;
+
+    return fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION (q.value());
+}
+
+template<class Unit,class Y>
+inline 
+typename root_typeof_helper<
+    typename add_typeof_helper<
+        typename power_typeof_helper<quantity<Unit,Y>,
+                                     static_rational<2> >::type,
+        typename power_typeof_helper<quantity<Unit,Y>,
+                                     static_rational<2> >::type>::type,
+        static_rational<2> >::type
+hypot BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,const quantity<Unit,Y>& q2)
+{
+    using boost::math::hypot;
+
+    typedef quantity<Unit,Y>    type1;
+    
+    typedef typename power_typeof_helper<type1,static_rational<2> >::type   pow_type;
+    typedef typename add_typeof_helper<pow_type,pow_type>::type             add_type;
+    typedef typename root_typeof_helper<add_type,static_rational<2> >::type quantity_type;
+        
+    return quantity_type::from_value(hypot BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()));
+}
+
+// does ISO C++ support long long? g++ claims not
+//template<class Unit,class Y>
+//inline 
+//quantity<Unit,long long> 
+//llrint BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+//{
+//    using namespace detail;
+//
+//    typedef quantity<Unit,long long>    quantity_type;
+//    
+//    return quantity_type::from_value(llrint BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()));
+//}
+
+// does ISO C++ support long long? g++ claims not
+//template<class Unit,class Y>
+//inline 
+//quantity<Unit,long long> 
+//llround BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+//{
+//    using namespace detail;
+//
+//    typedef quantity<Unit,long long>    quantity_type;
+//    
+//    return quantity_type::from_value(llround BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()));
+//}
+
+#if 0
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> 
+nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{
+    using namespace detail;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(nearbyint BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()));
+}
+
+#endif
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> nextafter BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,
+                                                             const quantity<Unit,Y>& q2)
+{
+    using boost::math::nextafter;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(nextafter BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()));
+}
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q1,
+                                                              const quantity<Unit,Y>& q2)
+{
+    // the only difference between nextafter and nexttowards is
+    // in the argument types.  Since we are requiring identical
+    // argument types, there is no difference.
+    using boost::math::nextafter;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(nextafter BOOST_PREVENT_MACRO_SUBSTITUTION (q1.value(),q2.value()));
+}
+
+#if 0
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> 
+rint BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{
+    using namespace detail;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(rint BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()));
+}
+
+#endif
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> 
+round BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{
+    using boost::math::round;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(round BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()));
+}
+
+template<class Unit,class Y>
+inline 
+int 
+signbit BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{ 
+    using boost::math::signbit;
+
+    return signbit BOOST_PREVENT_MACRO_SUBSTITUTION (q.value());
+}
+
+template<class Unit,class Y>
+inline 
+quantity<Unit,Y> 
+trunc BOOST_PREVENT_MACRO_SUBSTITUTION (const quantity<Unit,Y>& q)
+{
+    using namespace detail;
+
+    typedef quantity<Unit,Y>    quantity_type;
+    
+    return quantity_type::from_value(trunc BOOST_PREVENT_MACRO_SUBSTITUTION (q.value()));
+}
+
+template<class Unit,class Y>
+inline
+quantity<Unit, Y>
+fmod(const quantity<Unit,Y>& q1, const quantity<Unit,Y>& q2)
+{
+    using std::fmod;
+    
+    typedef quantity<Unit,Y> quantity_type;
+
+    return quantity_type::from_value(fmod(q1.value(), q2.value()));
+}
+
+template<class Unit, class Y>
+inline
+quantity<Unit, Y>
+modf(const quantity<Unit, Y>& q1, quantity<Unit, Y>* q2)
+{
+    using std::modf;
+
+    typedef quantity<Unit,Y> quantity_type;
+
+    return quantity_type::from_value(modf(q1.value(), &quantity_cast<Y&>(*q2)));
+}
+
+template<class Unit, class Y, class Int>
+inline
+quantity<Unit, Y>
+frexp(const quantity<Unit, Y>& q,Int* ex)
+{
+    using std::frexp;
+
+    typedef quantity<Unit,Y> quantity_type;
+
+    return quantity_type::from_value(frexp(q.value(),ex));
+}
+
+/// For non-dimensionless quantities, integral and rational powers 
+/// and roots can be computed by @c pow<Ex> and @c root<Rt> respectively.
+template<class S, class Y>
+inline
+quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>
+pow(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q1,
+    const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q2)
+{
+    using std::pow;
+
+    typedef quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S),Y> quantity_type;
+
+    return quantity_type::from_value(pow(q1.value(), q2.value()));
+}
+
+template<class S, class Y>
+inline
+quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>
+exp(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q)
+{
+    using std::exp;
+
+    typedef quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y> quantity_type;
+
+    return quantity_type::from_value(exp(q.value()));
+}
+
+template<class Unit, class Y, class Int>
+inline
+quantity<Unit, Y>
+ldexp(const quantity<Unit, Y>& q,const Int& ex)
+{
+    using std::ldexp;
+
+    typedef quantity<Unit,Y> quantity_type;
+
+    return quantity_type::from_value(ldexp(q.value(), ex));
+}
+
+template<class S, class Y>
+inline
+quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>
+log(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q)
+{
+    using std::log;
+
+    typedef quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y> quantity_type;
+
+    return quantity_type::from_value(log(q.value()));
+}
+
+template<class S, class Y>
+inline
+quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>
+log10(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y>& q)
+{
+    using std::log10;
+
+    typedef quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(S), Y> quantity_type;
+
+    return quantity_type::from_value(log10(q.value()));
+}
+
+template<class Unit,class Y>
+inline 
+typename root_typeof_helper<
+                            quantity<Unit,Y>,
+                            static_rational<2>
+                           >::type
+sqrt(const quantity<Unit,Y>& q)
+{
+    using std::sqrt;
+
+    typedef typename root_typeof_helper<
+                                        quantity<Unit,Y>,
+                                        static_rational<2>
+                                       >::type quantity_type;
+
+    return quantity_type::from_value(sqrt(q.value()));
+}
+
+} // namespace units
+
+} // namespace boost
+
+namespace boost {
+
+namespace units {
+
+// trig functions with si argument/return types
+
+/// cos of theta in radians
+template<class Y>
+typename dimensionless_quantity<si::system,Y>::type 
+cos(const quantity<si::plane_angle,Y>& theta)
+{
+    using std::cos;
+    return cos(theta.value());
+}
+
+/// sin of theta in radians
+template<class Y>
+typename dimensionless_quantity<si::system,Y>::type 
+sin(const quantity<si::plane_angle,Y>& theta)
+{
+    using std::sin;
+    return sin(theta.value());
+}
+
+/// tan of theta in radians
+template<class Y>
+typename dimensionless_quantity<si::system,Y>::type 
+tan(const quantity<si::plane_angle,Y>& theta)
+{
+    using std::tan;
+    return tan(theta.value());
+}
+
+/// cos of theta in other angular units 
+template<class System,class Y>
+typename dimensionless_quantity<System,Y>::type 
+cos(const quantity<unit<plane_angle_dimension,System>,Y>& theta)
+{
+    return cos(quantity<si::plane_angle,Y>(theta));
+}
+
+/// sin of theta in other angular units 
+template<class System,class Y>
+typename dimensionless_quantity<System,Y>::type 
+sin(const quantity<unit<plane_angle_dimension,System>,Y>& theta)
+{
+    return sin(quantity<si::plane_angle,Y>(theta));
+}
+
+/// tan of theta in other angular units 
+template<class System,class Y>
+typename dimensionless_quantity<System,Y>::type 
+tan(const quantity<unit<plane_angle_dimension,System>,Y>& theta)
+{
+    return tan(quantity<si::plane_angle,Y>(theta));
+}
+
+/// acos of dimensionless quantity returning angle in same system
+template<class Y,class System>
+quantity<unit<plane_angle_dimension, homogeneous_system<System> >,Y>
+acos(const quantity<unit<dimensionless_type, homogeneous_system<System> >,Y>& val)
+{
+    using std::acos;
+    return quantity<unit<plane_angle_dimension, homogeneous_system<System> >,Y>(acos(val.value())*si::radians);
+}
+
+/// asin of dimensionless quantity returning angle in same system
+template<class Y,class System>
+quantity<unit<plane_angle_dimension, homogeneous_system<System> >,Y>
+asin(const quantity<unit<dimensionless_type, homogeneous_system<System> >,Y>& val)
+{
+    using std::asin;
+    return quantity<unit<plane_angle_dimension, homogeneous_system<System> >,Y>(asin(val.value())*si::radians);
+}
+
+/// atan of dimensionless quantity returning angle in same system
+template<class Y,class System>
+quantity<unit<plane_angle_dimension, homogeneous_system<System> >,Y>
+atan(const quantity<unit<dimensionless_type, homogeneous_system<System> >, Y>& val)
+{
+    using std::atan;
+    return quantity<unit<plane_angle_dimension, homogeneous_system<System> >,Y>(atan(val.value())*si::radians);
+}
+
+/// atan2 of @c value_type returning angle in radians
+template<class Y, class Dimension, class System>
+quantity<unit<plane_angle_dimension, homogeneous_system<System> >, Y>
+atan2(const quantity<unit<Dimension, homogeneous_system<System> >, Y>& y,
+      const quantity<unit<Dimension, homogeneous_system<System> >, Y>& x)
+{
+    using std::atan2;
+    return quantity<unit<plane_angle_dimension, homogeneous_system<System> >, Y>(atan2(y.value(),x.value())*si::radians);
+}
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CMATH_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/config.hpp b/deal.II/contrib/boost/include/boost/units/config.hpp
new file mode 100644 (file)
index 0000000..e381213
--- /dev/null
@@ -0,0 +1,105 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CONFIG_HPP
+#define BOOST_UNITS_CONFIG_HPP
+
+#include <boost/config.hpp>
+#include <boost/version.hpp>
+
+#ifndef BOOST_UNITS_HAS_BOOST_TYPEOF
+    #if (BOOST_VERSION >= 103400)
+        ///INTERNAL ONLY
+        #define BOOST_UNITS_HAS_BOOST_TYPEOF    1
+    #else
+        ///INTERNAL ONLY
+        #define BOOST_UNITS_HAS_BOOST_TYPEOF    0
+    #endif
+#endif 
+
+#if (BOOST_UNITS_HAS_BOOST_TYPEOF)
+    #include <boost/typeof/typeof.hpp> 
+    ///INTERNAL ONLY
+    #define BOOST_UNITS_HAS_TYPEOF          1
+#else    
+    #if (__GNUC__ && __cplusplus && __GNUC__ >= 3)
+        ///INTERNAL ONLY
+        #define BOOST_UNITS_HAS_TYPEOF          1
+        ///INTERNAL ONLY
+        #define BOOST_UNITS_HAS_GNU_TYPEOF      1
+    #elif defined(__MWERKS__)
+        ///INTERNAL ONLY
+        #define BOOST_UNITS_HAS_TYPEOF          1
+        ///INTERNAL ONLY
+        #define BOOST_UNITS_HAS_MWERKS_TYPEOF   1
+    #else
+        ///INTERNAL ONLY
+        #define BOOST_UNITS_HAS_TYPEOF          0
+    #endif
+#endif
+
+// uncomment this to test without typeof support at all
+//#undef BOOST_UNITS_HAS_TYPEOF
+//#define BOOST_UNITS_HAS_TYPEOF          0
+
+#ifndef BOOST_UNITS_NO_COMPILER_CHECK
+
+    #ifdef BOOST_NO_MEMBER_TEMPLATES
+        #error Boost.Units requires member template
+    #endif
+
+    #ifdef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
+        #error Boost.Units requires member template keyword
+    #endif
+
+    #ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+        #error Boost.Units requires in class member initialization
+    #endif
+
+    #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+        #error Boost.Units requires function template partial ordering
+    #endif
+
+    #ifdef BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
+        #error Boost.Units requires explicit function template arguments
+    #endif
+
+    #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+        #error Boost.Units requires partial specialization
+    #endif
+
+#endif
+
+#ifdef BOOST_UNITS_REQUIRE_LAYOUT_COMPATIBILITY
+    ///INTERNAL ONLY
+    #define BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(a, b) BOOST_STATIC_ASSERT((sizeof(a) == sizeof(b)))
+#else
+    ///INTERNAL ONLY
+    #define BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(a, b) ((void)0)
+#endif
+
+#ifdef BOOST_UNITS_DOXYGEN
+
+/// If defined will trigger a static assertion if quantity<Unit, T>
+/// is not layout compatible with T
+#define BOOST_UNITS_REQUIRE_LAYOUT_COMPATIBILITY
+
+/// If defined will diasable a preprocessor check that the
+/// compiler is able to handle the library.
+#define BOOST_UNITS_NO_COMPILER_CHECK
+
+/// Enable checking to verify that a homogeneous system
+/// is actually capable of representing all the dimensions
+/// that it is used with.  Off by default.
+#define BOOST_UNITS_CHECK_HOMOGENEOUS_UNITS
+
+#endif
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/conversion.hpp b/deal.II/contrib/boost/include/boost/units/conversion.hpp
new file mode 100644 (file)
index 0000000..a486895
--- /dev/null
@@ -0,0 +1,180 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CONVERSION_HPP
+#define BOOST_UNITS_CONVERSION_HPP
+
+#include <boost/units/detail/conversion_impl.hpp>
+
+namespace boost {
+
+namespace units {
+
+template<class From, class To>
+struct conversion_helper;
+
+#ifdef BOOST_UNITS_DOXYGEN
+
+/// Template for defining conversions between
+/// quantities.  This template should be specialized
+/// for every quantity that allows conversions.
+/// For example, if you have a two units
+/// called pair and dozen you would write
+/// @code
+/// namespace boost {
+/// namespace units {
+/// template<class T0, class T1>
+/// struct conversion_helper<quantity<dozen, T0>, quantity<pair, T1> >
+/// {
+///     static quantity<pair, T1> convert(const quantity<dozen, T0>& source)
+///     {
+///         return(quantity<pair, T1>::from_value(6 * source.value()));
+///     }
+/// };
+/// }
+/// }
+/// @endcode
+///
+/// In most cases, the predefined specializations for @c unit
+/// and @c absolute should be sufficient, so users should rarely
+/// need to use this.
+template<class From, class To>
+struct conversion_helper
+{
+    static To convert(const From&);
+};
+
+#endif
+
+/// Defines the conversion factor from a base unit to any unit
+/// or to another base unit with the correct dimensions.  Uses
+/// of this macro must appear at global scope.
+/// If the destination unit is a base unit or a unit that contains
+/// only one base unit which is raised to the first power (e.g. feet->meters)
+/// the reverse (meters->feet in this example) need not be defined explicitly.
+#define BOOST_UNITS_DEFINE_CONVERSION_FACTOR(Source, Destination, type_, value_)    \
+    namespace boost {                                                       \
+    namespace units {                                                       \
+    template<>                                                              \
+    struct select_base_unit_converter<                                      \
+        unscale<Source>::type,                                              \
+        unscale<reduce_unit<Destination::unit_type>::type>::type            \
+    >                                                                       \
+    {                                                                       \
+        typedef Source source_type;                                         \
+        typedef reduce_unit<Destination::unit_type>::type destination_type; \
+    };                                                                      \
+    template<>                                                              \
+    struct base_unit_converter<Source, reduce_unit<Destination::unit_type>::type>   \
+    {                                                                       \
+        static const bool is_defined = true;                                \
+        typedef type_ type;                                                 \
+        static type value() { return(value_); }                             \
+    };                                                                      \
+    }                                                                       \
+    }                                                                       \
+    void boost_units_require_semicolon()
+
+/// Defines the conversion factor from a base unit to any other base
+/// unit with the same dimensions.  Params should be a Boost.Preprocessor
+/// Seq of template parameters, such as (class T1)(class T2)
+/// All uses of must appear at global scope. The reverse conversion will
+/// be defined automatically.  This macro is a little dangerous, because,
+/// unlike the non-template form, it will silently fail if either base
+/// unit is scaled.  This is probably not an issue if both the source
+/// and destination types depend on the template parameters, but be aware
+/// that a generic conversion to kilograms is not going to work.
+#define BOOST_UNITS_DEFINE_CONVERSION_FACTOR_TEMPLATE(Params, Source, Destination, type_, value_)   \
+    namespace boost {                                                       \
+    namespace units {                                                       \
+    template<BOOST_PP_SEQ_ENUM(Params)>                                     \
+    struct base_unit_converter<                                             \
+        Source,                                                             \
+        BOOST_UNITS_MAKE_HETEROGENEOUS_UNIT(Destination, typename Source::dimension_type)\
+    >                                                                       \
+    {                                                                       \
+        static const bool is_defined = true;                                \
+        typedef type_ type;                                                 \
+        static type value() { return(value_); }                             \
+    };                                                                      \
+    }                                                                       \
+    }                                                                       \
+    void boost_units_require_semicolon()
+
+/// Specifies the default conversion to be applied when
+/// no direct conversion is available.
+/// Source is a base unit.  Dest is any unit with the
+/// same dimensions.
+#define BOOST_UNITS_DEFAULT_CONVERSION(Source, Dest)                \
+    namespace boost {                                               \
+    namespace units {                                               \
+    template<>                                                      \
+    struct unscaled_get_default_conversion<unscale<Source>::type>   \
+    {                                                               \
+        static const bool is_defined = true;                        \
+        typedef Dest::unit_type type;                               \
+    };                                                              \
+    }                                                               \
+    }                                                               \
+    void boost_units_require_semicolon()
+
+/// Specifies the default conversion to be applied when
+/// no direct conversion is available.
+/// Params is a PP Sequence of template arguments.
+/// Source is a base unit.  Dest is any unit with the
+/// same dimensions.  The source must not be a scaled
+/// base unit.
+#define BOOST_UNITS_DEFAULT_CONVERSION_TEMPLATE(Params, Source, Dest)   \
+    namespace boost {                                                   \
+    namespace units {                                                   \
+    template<BOOST_PP_SEQ_ENUM(Params)>                                 \
+    struct unscaled_get_default_conversion<Source>                      \
+    {                                                                   \
+        static const bool is_defined = true;                            \
+        typedef typename Dest::unit_type type;                          \
+    };                                                                  \
+    }                                                                   \
+    }                                                                   \
+    void boost_units_require_semicolon()
+
+/// INTERNAL ONLY
+/// Users should not create their units in namespace boost::units.
+/// If we want to make this public it needs to allow better control over
+/// the namespaces. --SJW.
+/// template that defines a base_unit and conversion to another dimensionally-consistent unit
+#define BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(namespace_, name_, name_string_, symbol_string_, factor, unit, id)\
+namespace boost {                                                           \
+namespace units {                                                           \
+namespace namespace_ {                                                      \
+struct name_ ## _base_unit                                                  \
+  : base_unit<name_ ## _base_unit, unit::dimension_type, id> {              \
+    static const char* name() { return(name_string_); }                     \
+    static const char* symbol() { return(symbol_string_); };                \
+};                                                                          \
+}                                                                           \
+}                                                                           \
+}                                                                           \
+BOOST_UNITS_DEFINE_CONVERSION_FACTOR(namespace_::name_ ## _base_unit, unit, double, factor); \
+BOOST_UNITS_DEFAULT_CONVERSION(namespace_::name_ ## _base_unit, unit)
+
+/// Find the conversion factor between two units.
+template<class FromUnit,class ToUnit>
+inline
+typename detail::conversion_factor_helper<FromUnit, ToUnit>::type
+conversion_factor(const FromUnit&,const ToUnit&)
+{
+    return(detail::conversion_factor_helper<FromUnit, ToUnit>::value());
+}
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CONVERSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/derived_dimension.hpp b/deal.II/contrib/boost/include/boost/units/derived_dimension.hpp
new file mode 100644 (file)
index 0000000..54cc46a
--- /dev/null
@@ -0,0 +1,208 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_DERIVED_DIMENSION_HPP
+
+#include <boost/units/dim.hpp>
+#include <boost/units/dimension.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/detail/dimension_list.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// A utility class for defining composite dimensions with integer powers.
+template<class DT1 = dimensionless_type,long E1 = 0,
+         class DT2 = dimensionless_type,long E2 = 0,
+         class DT3 = dimensionless_type,long E3 = 0,
+         class DT4 = dimensionless_type,long E4 = 0,
+         class DT5 = dimensionless_type,long E5 = 0,
+         class DT6 = dimensionless_type,long E6 = 0,
+         class DT7 = dimensionless_type,long E7 = 0,
+         class DT8 = dimensionless_type,long E8 = 0>
+struct derived_dimension
+{
+#ifdef BOOST_UNITS_DOXYGEN
+    typedef detail::unspecified type;
+#else
+    typedef typename 
+    make_dimension_list< list< dim< DT1,static_rational<E1> >,
+                         list< dim< DT2,static_rational<E2> >,
+                         list< dim< DT3,static_rational<E3> >,
+                         list< dim< DT4,static_rational<E4> >,
+                         list< dim< DT5,static_rational<E5> >,
+                         list< dim< DT6,static_rational<E6> >,
+                         list< dim< DT7,static_rational<E7> >,
+                         list< dim< DT8,static_rational<E8> >, dimensionless_type > > > > > > > > >::type type;
+#endif
+};
+
+/// INTERNAL ONLY
+template<class DT1,long E1>
+struct derived_dimension<
+    DT1, E1,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0>
+{
+    typedef typename 
+    make_dimension_list< list< dim< DT1,static_rational<E1> >, dimensionless_type > >::type type;
+};
+
+/// INTERNAL ONLY
+template<class DT1,long E1,
+         class DT2,long E2>
+struct derived_dimension<
+    DT1, E1,
+    DT2, E2,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0>
+{
+    typedef typename 
+    make_dimension_list< list< dim< DT1,static_rational<E1> >,
+                         list< dim< DT2,static_rational<E2> >, dimensionless_type > > >::type type;
+};
+
+/// INTERNAL ONLY
+template<class DT1,long E1,
+         class DT2,long E2,
+         class DT3,long E3>
+struct derived_dimension<
+    DT1, E1,
+    DT2, E2,
+    DT3, E3,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0>
+{
+    typedef typename 
+    make_dimension_list< list< dim< DT1,static_rational<E1> >,
+                         list< dim< DT2,static_rational<E2> >,
+                         list< dim< DT3,static_rational<E3> >, dimensionless_type > > > >::type type;
+};
+
+/// INTERNAL ONLY
+template<class DT1,long E1,
+         class DT2,long E2,
+         class DT3,long E3,
+         class DT4,long E4>
+struct derived_dimension<
+    DT1, E1,
+    DT2, E2,
+    DT3, E3,
+    DT4, E4,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0>
+{
+    typedef typename 
+    make_dimension_list< list< dim< DT1,static_rational<E1> >,
+                         list< dim< DT2,static_rational<E2> >,
+                         list< dim< DT3,static_rational<E3> >,
+                         list< dim< DT4,static_rational<E4> >, dimensionless_type > > > > >::type type;
+};
+
+/// INTERNAL ONLY
+template<class DT1,long E1,
+         class DT2,long E2,
+         class DT3,long E3,
+         class DT4,long E4,
+         class DT5,long E5>
+struct derived_dimension<
+    DT1, E1,
+    DT2, E2,
+    DT3, E3,
+    DT4, E4,
+    DT5, E5,
+    dimensionless_type,0,
+    dimensionless_type,0,
+    dimensionless_type,0>
+{
+    typedef typename 
+    make_dimension_list< list< dim< DT1,static_rational<E1> >,
+                         list< dim< DT2,static_rational<E2> >,
+                         list< dim< DT3,static_rational<E3> >,
+                         list< dim< DT4,static_rational<E4> >,
+                         list< dim< DT5,static_rational<E5> >, dimensionless_type > > > > > >::type type;
+};
+
+/// INTERNAL ONLY
+template<class DT1,long E1,
+         class DT2,long E2,
+         class DT3,long E3,
+         class DT4,long E4,
+         class DT5,long E5,
+         class DT6,long E6>
+struct derived_dimension<
+    DT1, E1,
+    DT2, E2,
+    DT3, E3,
+    DT4, E4,
+    DT5, E5,
+    DT6, E6,
+    dimensionless_type,0,
+    dimensionless_type,0>
+{
+    typedef typename 
+    make_dimension_list< list< dim< DT1,static_rational<E1> >,
+                         list< dim< DT2,static_rational<E2> >,
+                         list< dim< DT3,static_rational<E3> >,
+                         list< dim< DT4,static_rational<E4> >,
+                         list< dim< DT5,static_rational<E5> >,
+                         list< dim< DT6,static_rational<E6> >, dimensionless_type > > > > > > >::type type;
+};
+
+/// INTERNAL ONLY
+template<class DT1,long E1,
+         class DT2,long E2,
+         class DT3,long E3,
+         class DT4,long E4,
+         class DT5,long E5,
+         class DT6,long E6,
+         class DT7,long E7>
+struct derived_dimension<
+    DT1, E1,
+    DT2, E2,
+    DT3, E3,
+    DT4, E4,
+    DT5, E5,
+    DT6, E6,
+    DT7, E7,
+    dimensionless_type,0>
+{
+    typedef typename 
+    make_dimension_list< list< dim< DT1,static_rational<E1> >,
+                         list< dim< DT2,static_rational<E2> >,
+                         list< dim< DT3,static_rational<E3> >,
+                         list< dim< DT4,static_rational<E4> >,
+                         list< dim< DT5,static_rational<E5> >,
+                         list< dim< DT6,static_rational<E6> >,
+                         list< dim< DT7,static_rational<E7> >, dimensionless_type > > > > > > > >::type type;
+};
+
+} // namespace units
+
+} // namespace boost                                                                   
+
+#endif // BOOST_UNITS_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/detail/absolute_impl.hpp b/deal.II/contrib/boost/include/boost/units/detail/absolute_impl.hpp
new file mode 100644 (file)
index 0000000..127b33a
--- /dev/null
@@ -0,0 +1,104 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ABSOLUTE_IMPL_HPP
+#define BOOST_UNITS_ABSOLUTE_IMPL_HPP
+
+#include <iosfwd>
+
+#include <boost/units/config.hpp>
+#include <boost/units/conversion.hpp>
+#include <boost/units/heterogeneous_system.hpp>
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// INTERNAL ONLY
+template<class D, class S>
+struct reduce_unit<absolute<unit<D, S> > >
+{
+    typedef absolute<typename reduce_unit<unit<D, S> >::type> type;
+};
+
+namespace detail {
+
+struct undefined_affine_conversion_base {
+    static const bool is_defined = false;
+};
+
+} // namespace detail
+
+/// INTERNAL ONLY
+template<class From, class To>
+struct affine_conversion_helper : detail::undefined_affine_conversion_base { };
+
+namespace detail {
+
+template<bool IsDefined, bool ReverseIsDefined>
+struct affine_conversion_impl;
+
+template<bool ReverseIsDefined>
+struct affine_conversion_impl<true, ReverseIsDefined>
+{
+    template<class Unit1, class Unit2, class T0, class T1>
+    struct apply {
+        static T1 value(const T0& t0)
+        {
+            return(
+                t0 * 
+                conversion_factor(Unit1(), Unit2()) +
+                affine_conversion_helper<typename reduce_unit<Unit1>::type, typename reduce_unit<Unit2>::type>::value());
+        }
+    };
+};
+
+template<>
+struct affine_conversion_impl<false, true>
+{
+    template<class Unit1, class Unit2, class T0, class T1>
+    struct apply
+    {
+        static T1 value(const T0& t0)
+        {
+            return(
+                (t0 - affine_conversion_helper<typename reduce_unit<Unit2>::type, typename reduce_unit<Unit1>::type>::value()) * 
+                conversion_factor(Unit1(), Unit2()));
+        }
+    };
+};
+
+} // namespace detail
+
+/// INTERNAL ONLY
+template<class Unit1, class T1, class Unit2, class T2>
+struct conversion_helper<quantity<absolute<Unit1>, T1>, quantity<absolute<Unit2>, T2> >
+{
+    typedef quantity<absolute<Unit1>, T1> from_quantity_type;
+    typedef quantity<absolute<Unit2>, T2> to_quantity_type;
+    static to_quantity_type convert(const from_quantity_type& source)
+    {
+        return(
+            to_quantity_type::from_value(
+                detail::affine_conversion_impl<
+                    affine_conversion_helper<typename reduce_unit<Unit1>::type, typename reduce_unit<Unit2>::type>::is_defined,
+                    affine_conversion_helper<typename reduce_unit<Unit2>::type, typename reduce_unit<Unit1>::type>::is_defined
+                >::template apply<Unit1, Unit2, T1, T2>::value(source.value())
+            )
+        );
+    }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ABSOLUTE_IMPL_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/detail/cmath_impl.hpp b/deal.II/contrib/boost/include/boost/units/detail/cmath_impl.hpp
new file mode 100644 (file)
index 0000000..d5bec14
--- /dev/null
@@ -0,0 +1,154 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CMATH_IMPL_HPP 
+#define BOOST_UNITS_CMATH_IMPL_HPP
+
+#include <boost/config.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+
+namespace boost {
+namespace units {
+namespace detail {
+
+template<class Y> 
+inline bool isgreater BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2)
+{
+    if((boost::math::isnan)(v1) || (boost::math::isnan)(v2)) return false;
+    else return v1 > v2;
+}
+
+template<class Y> 
+inline bool isgreaterequal BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2)
+{
+    if((boost::math::isnan)(v1) || (boost::math::isnan)(v2)) return false;
+    else return v1 >= v2;
+}
+
+template<class Y> 
+inline bool isless BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2)
+{
+    if((boost::math::isnan)(v1) || (boost::math::isnan)(v2)) return false;
+    else return v1 < v2;
+}
+
+template<class Y> 
+inline bool islessequal BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2)
+{
+    if((boost::math::isnan)(v1) || (boost::math::isnan)(v2)) return false;
+    else return v1 <= v2;
+}
+
+template<class Y> 
+inline bool islessgreater BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2)
+{
+    if((boost::math::isnan)(v1) || (boost::math::isnan)(v2)) return false;
+    else return v1 < v2 || v1 > v2;
+}
+
+template<class Y> 
+inline bool isunordered BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2)
+{
+    return (boost::math::isnan)(v1) || (boost::math::isnan)(v2);
+}
+
+template<class Y>
+inline Y fdim BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2)
+{
+    if((boost::math::isnan)(v1)) return v1;
+    else if((boost::math::isnan)(v2)) return v2;
+    else if(v1 > v2) return(v1 - v2);
+    else return(Y(0));
+}
+
+#if 0
+
+template<class T>
+struct fma_issue_warning {
+    enum { value = false };
+};
+
+template<class Y>
+inline Y fma(const Y& v1,const Y& v2,const Y& v3)
+{
+    //this implementation does *not* meet the
+    //requirement of infinite intermediate precision
+    BOOST_STATIC_WARNING((fma_issue_warning<Y>::value));
+
+    return v1 * v2 + v3;
+}
+
+#endif
+
+template<class Y>
+inline Y fmax BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2)
+{
+    if((boost::math::isnan)(v1)) return(v2);
+    else if((boost::math::isnan)(v2)) return(v1);
+    else if(v1 > v2) return(v1);
+    else return(v2);
+}
+
+template<class Y>
+inline Y fmin BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& v1,const Y& v2)
+{
+    if((boost::math::isnan)(v1)) return(v2);
+    else if((boost::math::isnan)(v2)) return(v1);
+    else if(v1 < v2) return(v1);
+    else return(v2);
+}
+
+//template<class Y>
+//inline long long llrint(const Y& val)
+//{
+//    return static_cast<long long>(rint(val));
+//}
+//
+//template<class Y>
+//inline long long llround(const Y& val)
+//{
+//    return static_cast<long long>(round(val));
+//}
+
+#if 0
+
+template<class Y>
+inline Y nearbyint(const Y& val)
+{
+    //this is not really correct.
+    //the result should be according to the
+    //current rounding mode.
+    using boost::math::round;
+    return round(val);
+}
+
+template<class Y>
+inline Y rint(const Y& val)
+{
+    //I don't feel like trying to figure out
+    //how to raise a floating pointer exception
+    return nearbyint(val);
+}
+
+#endif
+
+template<class Y>
+inline Y trunc BOOST_PREVENT_MACRO_SUBSTITUTION(const Y& val)
+{
+    if(val > 0) return std::floor(val);
+    else if(val < 0) return std::ceil(val);
+    else return val;
+}
+
+}
+}
+}
+
+#endif // BOOST_UNITS_CMATH_IMPL_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/detail/conversion_impl.hpp b/deal.II/contrib/boost/include/boost/units/detail/conversion_impl.hpp
new file mode 100644 (file)
index 0000000..8946faf
--- /dev/null
@@ -0,0 +1,458 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DETAIL_CONVERSION_IMPL_HPP
+#define BOOST_UNITS_DETAIL_CONVERSION_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/divides.hpp>
+#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/units/heterogeneous_system.hpp>
+#include <boost/units/homogeneous_system.hpp>
+#include <boost/units/reduce_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/detail/dimension_list.hpp>
+#include <boost/units/detail/heterogeneous_conversion.hpp>
+#include <boost/units/detail/one.hpp>
+#include <boost/units/detail/static_rational_power.hpp>
+#include <boost/units/detail/unscale.hpp>
+
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+template<class Source, class Dest>
+struct conversion_factor_helper;
+
+template<class Source, class Dest>
+struct call_base_unit_converter;
+
+}
+
+/// INTERNAL ONLY
+struct undefined_base_unit_converter_base {
+    static const bool is_defined = false;
+};
+
+/// INTERNAL ONLY
+struct no_default_conversion {
+    static const bool is_defined = false;
+};
+
+/// INTERNAL ONLY
+template<class BaseUnit>
+struct unscaled_get_default_conversion : no_default_conversion { };
+
+/// INTERNAL ONLY
+template<bool is_defined>
+struct unscaled_get_default_conversion_impl;
+
+/// INTERNAL ONLY
+template<>
+struct unscaled_get_default_conversion_impl<true>
+{
+    template<class T>
+    struct apply
+    {
+        typedef typename unscaled_get_default_conversion<typename unscale<T>::type>::type type;
+    };
+};
+
+/// INTERNAL ONLY
+template<>
+struct unscaled_get_default_conversion_impl<false>
+{
+    template<class T>
+    struct apply
+    {
+        typedef typename T::unit_type type;
+    };
+};
+
+/// INTERNAL ONLY
+template<class BaseUnit>
+struct get_default_conversion
+{
+    typedef typename unscaled_get_default_conversion_impl<
+        unscaled_get_default_conversion<typename unscale<BaseUnit>::type>::is_defined
+    >::template apply<BaseUnit>::type type;
+};
+
+/// INTERNAL ONLY
+template<class Source, class Destination>
+struct select_base_unit_converter
+{
+    typedef Source source_type;
+    typedef Destination destination_type;
+};
+
+/// INTERNAL ONLY
+template<class Source, class Dest>
+struct base_unit_converter_base : undefined_base_unit_converter_base {
+};
+
+/// INTERNAL ONLY
+template<class Source>
+struct base_unit_converter_base<Source, BOOST_UNITS_MAKE_HETEROGENEOUS_UNIT(Source, typename Source::dimension_type)>
+{
+    static const bool is_defined = true;
+    typedef one type;
+    static type value() {
+        one result;
+        return(result);
+    }
+};
+
+/// INTERNAL ONLY
+template<class Source, class Dest>
+struct base_unit_converter : base_unit_converter_base<Source, Dest> { };
+
+namespace detail {
+
+template<class Source, class Dest>
+struct do_call_base_unit_converter {
+    typedef select_base_unit_converter<typename unscale<Source>::type, typename unscale<Dest>::type> selector;
+    typedef typename selector::source_type source_type;
+    typedef typename selector::destination_type destination_type;
+    typedef base_unit_converter<source_type, destination_type> converter;
+    typedef typename mpl::divides<typename get_scale_list<Source>::type, typename get_scale_list<source_type>::type>::type source_factor;
+    typedef typename mpl::divides<typename get_scale_list<Dest>::type, typename get_scale_list<destination_type>::type>::type destination_factor;
+    typedef typename mpl::divides<source_factor, destination_factor>::type factor;
+    typedef eval_scale_list<factor> eval_factor;
+    typedef typename multiply_typeof_helper<typename converter::type, typename eval_factor::type>::type type;
+    static type value()
+    {
+        return(converter::value() * eval_factor::value());
+    }
+};
+
+template<bool forward_is_defined, bool reverse_is_defined>
+struct call_base_unit_converter_base_unit_impl;
+
+template<>
+struct call_base_unit_converter_base_unit_impl<true, true>
+{
+    template<class Source, class Dest>
+    struct apply
+        : do_call_base_unit_converter<Source, typename Dest::unit_type> 
+    {
+    };
+};
+
+template<>
+struct call_base_unit_converter_base_unit_impl<true, false>
+{
+    template<class Source, class Dest>
+    struct apply
+        : do_call_base_unit_converter<Source, typename Dest::unit_type> 
+    {
+    };
+};
+
+template<>
+struct call_base_unit_converter_base_unit_impl<false, true>
+{
+    template<class Source, class Dest>
+    struct apply
+    {
+        typedef do_call_base_unit_converter<Dest, typename Source::unit_type> converter;
+        typedef typename divide_typeof_helper<one, typename converter::type>::type type;
+        static type value() {
+            one numerator;
+            return(numerator / converter::value());
+        }
+    };
+};
+
+template<>
+struct call_base_unit_converter_base_unit_impl<false, false>
+{
+    template<class Source, class Dest>
+    struct apply
+    {
+        typedef typename reduce_unit<typename get_default_conversion<Source>::type>::type new_source;
+        typedef typename reduce_unit<typename get_default_conversion<Dest>::type>::type new_dest;
+        typedef call_base_unit_converter<Source, new_source> start;
+        typedef detail::conversion_factor_helper<
+            new_source,
+            new_dest
+        > conversion;
+        typedef call_base_unit_converter<Dest, new_dest> end;
+        typedef typename divide_typeof_helper<
+            typename multiply_typeof_helper<
+                typename start::type,
+                typename conversion::type
+            >::type,
+            typename end::type
+        >::type type;
+        static type value() {
+            return(start::value() * conversion::value() / end::value());
+        }
+    };
+};
+
+template<int N>
+struct get_default_conversion_impl
+{
+    template<class Begin>
+    struct apply
+    {
+        typedef typename Begin::item source_pair;
+        typedef typename source_pair::value_type exponent;
+        typedef typename source_pair::tag_type source;
+        typedef typename reduce_unit<typename get_default_conversion<source>::type>::type new_source;
+        typedef typename get_default_conversion_impl<N-1>::template apply<typename Begin::next> next_iteration;
+        typedef typename multiply_typeof_helper<typename power_typeof_helper<new_source, exponent>::type, typename next_iteration::unit_type>::type unit_type;
+        typedef call_base_unit_converter<source, new_source> conversion;
+        typedef typename multiply_typeof_helper<typename conversion::type, typename next_iteration::type>::type type;
+        static type value() {
+            return(static_rational_power<exponent>(conversion::value()) * next_iteration::value());
+        }
+    };
+};
+
+template<>
+struct get_default_conversion_impl<0>
+{
+    template<class Begin>
+    struct apply
+    {
+        typedef unit<dimensionless_type, heterogeneous_system<heterogeneous_system_impl<dimensionless_type, dimensionless_type, no_scale> > > unit_type;
+        typedef one type;
+        static one value() {
+            one result;
+            return(result);
+        }
+    };
+};
+
+template<bool is_defined>
+struct call_base_unit_converter_impl;
+
+template<>
+struct call_base_unit_converter_impl<true>
+{
+    template<class Source, class Dest>
+    struct apply
+        : do_call_base_unit_converter<Source, Dest> 
+    {
+    };
+};
+
+template<>
+struct call_base_unit_converter_impl<false>
+{
+    template<class Source, class Dest>
+    struct apply {
+        typedef typename reduce_unit<typename get_default_conversion<Source>::type>::type new_source;
+        typedef typename Dest::system_type::type system_list;
+        typedef typename get_default_conversion_impl<system_list::size::value>::template apply<system_list> impl;
+        typedef typename impl::unit_type new_dest;
+        typedef call_base_unit_converter<Source, new_source> start;
+        typedef conversion_factor_helper<new_source, new_dest> conversion;
+        typedef typename divide_typeof_helper<
+            typename multiply_typeof_helper<
+                typename start::type,
+                typename conversion::type
+            >::type,
+            typename impl::type
+        >::type type;
+        static type value() {
+            return(start::value() * conversion::value() / impl::value());
+        }
+    };
+};
+
+#define BOOST_UNITS_DETAIL_BASE_UNIT_CONVERTER_IS_DEFINED(Source, Dest)\
+    base_unit_converter<\
+        typename select_base_unit_converter<typename unscale<Source>::type, typename unscale<Dest>::type>::source_type,\
+        typename select_base_unit_converter<typename unscale<Source>::type, typename unscale<Dest>::type>::destination_type\
+    >::is_defined
+
+template<class Source, class Dest>
+struct call_base_unit_converter : call_base_unit_converter_impl<BOOST_UNITS_DETAIL_BASE_UNIT_CONVERTER_IS_DEFINED(Source, Dest)>::template apply<Source, Dest>
+{
+};
+
+template<class Source, class Dest>
+struct call_base_unit_converter<Source, BOOST_UNITS_MAKE_HETEROGENEOUS_UNIT(Dest, typename Source::dimension_type)> :
+    call_base_unit_converter_base_unit_impl<
+        BOOST_UNITS_DETAIL_BASE_UNIT_CONVERTER_IS_DEFINED(Source, typename Dest::unit_type),
+        BOOST_UNITS_DETAIL_BASE_UNIT_CONVERTER_IS_DEFINED(Dest, typename Source::unit_type)
+    >::template apply<Source, Dest>
+{
+};
+
+template<int N>
+struct conversion_impl
+{
+    template<class Begin, class DestinationSystem>
+    struct apply
+    {
+        typedef typename conversion_impl<N-1>::template apply<
+            typename Begin::next,
+            DestinationSystem
+        > next_iteration;
+        typedef typename Begin::item unit_pair;
+        typedef typename unit_pair::tag_type unit;
+        typedef typename unit::dimension_type dimensions;
+        typedef typename reduce_unit<units::unit<dimensions, DestinationSystem> >::type reduced_unit;
+        typedef detail::call_base_unit_converter<unit, reduced_unit> converter;
+        typedef typename multiply_typeof_helper<typename converter::type, typename next_iteration::type>::type type;
+        static type value() { return(static_rational_power<typename unit_pair::value_type>(converter::value()) * next_iteration::value()); }
+    };
+};
+
+template<>
+struct conversion_impl<0>
+{
+    template<class Begin, class DestinationSystem>
+    struct apply
+    {
+        typedef one type;
+        static type value() { one result; return(result); }
+    };
+};
+
+} // namespace detail
+
+/// forward to conversion_factor (intentionally allowing ADL)
+/// INTERNAL ONLY
+template<class Unit1, class T1, class Unit2, class T2>
+struct conversion_helper<quantity<Unit1, T1>, quantity<Unit2, T2> >
+{
+    /// INTERNAL ONLY
+    typedef quantity<Unit2, T2> destination_type;
+    static destination_type convert(const quantity<Unit1, T1>& source)
+    {
+        Unit1 u1;
+        Unit2 u2;
+        return(destination_type::from_value(static_cast<T2>(source.value() * conversion_factor(u1, u2))));
+    }
+};
+
+namespace detail {
+
+template<class Source, class Dest>
+struct conversion_factor_helper;
+
+template<class D, class L1, class L2>
+struct conversion_factor_helper<unit<D, homogeneous_system<L1> >, unit<D, homogeneous_system<L2> > >
+  : conversion_factor_helper<
+        typename reduce_unit<unit<D, homogeneous_system<L1> > >::type,
+        typename reduce_unit<unit<D, homogeneous_system<L2> > >::type
+    >
+{
+    //typedef typename reduce_unit<unit<D, homogeneous_system<L1> > >::type source_unit;
+    //typedef typename source_unit::system_type::type unit_list;
+    //typedef typename detail::conversion_impl<unit_list::size::value>::template apply<
+    //    unit_list,
+    //    homogeneous_system<L2>
+    //> impl;
+    //typedef typename impl::type type;
+    //static type value()
+    //{
+    //    return(impl::value());
+    //}
+};
+
+template<class D, class L1, class L2>
+struct conversion_factor_helper<unit<D, heterogeneous_system<L1> >, unit<D, homogeneous_system<L2> > >
+  : conversion_factor_helper<
+        typename reduce_unit<unit<D, heterogeneous_system<L1> > >::type,
+        typename reduce_unit<unit<D, homogeneous_system<L2> > >::type
+    >
+{
+    //typedef typename detail::conversion_impl<L1::type::size::value>::template apply<
+    //    typename L1::type,
+    //    homogeneous_system<L2>
+    //> impl;
+    //typedef eval_scale_list<typename L1::scale> scale;
+    //typedef typename multiply_typeof_helper<typename impl::type, typename scale::type>::type type;
+    //static type value()
+    //{
+    //    return(impl::value() * scale::value());
+    //}
+};
+
+// There is no simple algorithm for doing this conversion
+// other than just defining it as the reverse of the
+// heterogeneous->homogeneous case
+template<class D, class L1, class L2>
+struct conversion_factor_helper<unit<D, homogeneous_system<L1> >, unit<D, heterogeneous_system<L2> > >
+  : conversion_factor_helper<
+        typename reduce_unit<unit<D, homogeneous_system<L1> > >::type,
+        typename reduce_unit<unit<D, heterogeneous_system<L2> > >::type
+    >
+{
+    //typedef typename detail::conversion_impl<L2::type::size::value>::template apply<
+    //    typename L2::type,
+    //    homogeneous_system<L1>
+    //> impl;
+    //typedef eval_scale_list<typename L2::scale> scale;
+    //typedef typename multiply_typeof_helper<typename impl::type, typename scale::type>::type type;
+    //static type value()
+    //{
+    //    one numerator;
+    //    return(numerator / (impl::value() * scale::value()));
+    //}
+};
+
+/// Requires that all possible conversions
+/// between base units are defined.
+template<class D, class S1, class S2>
+struct conversion_factor_helper<unit<D, heterogeneous_system<S1> >, unit<D, heterogeneous_system<S2> > >
+{
+    /// INTERNAL ONLY
+    typedef typename detail::extract_base_units<S1::type::size::value>::template apply<
+        typename S1::type,
+        dimensionless_type
+    >::type from_base_units;
+    /// INTERNAL ONLY
+    typedef typename detail::extract_base_units<S2::type::size::value>::template apply<
+        typename S2::type,
+        from_base_units
+    >::type all_base_units;
+    /// INTERNAL ONLY
+    typedef typename detail::make_homogeneous_system<all_base_units>::type system;
+    typedef typename detail::conversion_impl<S1::type::size::value>::template apply<
+        typename S1::type,
+        system
+    > conversion1;
+    typedef typename detail::conversion_impl<S2::type::size::value>::template apply<
+        typename S2::type,
+        system
+    > conversion2;
+    typedef eval_scale_list<typename mpl::divides<typename S1::scale, typename S2::scale>::type> scale;
+    typedef typename multiply_typeof_helper<
+        typename conversion1::type,
+        typename divide_typeof_helper<typename scale::type, typename conversion2::type>::type
+    >::type type;
+    static type value()
+    {
+        return(conversion1::value() * (scale::value() / conversion2::value()));
+    }
+};
+
+} // namespace detail
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CONVERSION_IMPL_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/detail/dim_impl.hpp b/deal.II/contrib/boost/include/boost/units/detail/dim_impl.hpp
new file mode 100644 (file)
index 0000000..85792b8
--- /dev/null
@@ -0,0 +1,90 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DIM_IMPL_HPP
+#define BOOST_UNITS_DIM_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/less.hpp>
+
+#include <boost/units/units_fwd.hpp>
+
+/// \file 
+/// \brief Class encapsulating a dimension tag/value pair
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+struct dim_tag;
+
+}
+
+}
+
+namespace mpl {
+
+/// Less than comparison for sorting @c dim.
+template<>
+struct less_impl<boost::units::detail::dim_tag, boost::units::detail::dim_tag>
+{
+    template<class T0, class T1>
+    struct apply : mpl::less<typename T0::tag_type, typename T1::tag_type> {};
+};
+
+}
+
+namespace units {
+
+template<class Tag, class Exponent>
+struct dim;
+
+template<long N, long D>
+class static_rational;
+
+namespace detail {
+
+/// Extract @c tag_type from a @c dim.
+template<typename T>
+struct get_tag
+{
+    typedef typename T::tag_type    type;
+};
+
+/// Extract @c value_type from a @c dim.
+template<typename T>
+struct get_value
+{
+    typedef typename T::value_type    type;
+};
+
+/// Determine if a @c dim is empty (has a zero exponent).
+template<class T>
+struct is_empty_dim;
+
+template<typename T>
+struct is_empty_dim< dim<T, static_rational<0, 1> > > :
+    mpl::true_ 
+{ };
+
+template<typename T, typename V>
+struct is_empty_dim< dim<T, V> > :
+    mpl::false_ 
+{ };
+
+} // namespace detail
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_DIM_IMPL_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/detail/dimension_impl.hpp b/deal.II/contrib/boost/include/boost/units/detail/dimension_impl.hpp
new file mode 100644 (file)
index 0000000..dbe77af
--- /dev/null
@@ -0,0 +1,347 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DIMENSION_IMPL_HPP
+#define BOOST_UNITS_DIMENSION_IMPL_HPP
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/list.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/less.hpp>
+
+#include <boost/units/config.hpp>
+#include <boost/units/dimensionless_type.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/detail/dimension_list.hpp>
+#include <boost/units/detail/push_front_if.hpp>
+#include <boost/units/detail/push_front_or_add.hpp>
+
+/// \file 
+/// \brief Core class and metaprogramming utilities for compile-time dimensional analysis.
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+template<int N>
+struct insertion_sort_dims_insert;
+
+template<bool is_greater>
+struct insertion_sort_dims_comparison_impl;
+
+// have to recursively add the element to the next sequence.
+template<>
+struct insertion_sort_dims_comparison_impl<true> {
+    template<class Begin, int N, class T>
+    struct apply {
+        typedef list<
+            typename Begin::item,
+            typename insertion_sort_dims_insert<N - 1>::template apply<
+                typename Begin::next,
+                T
+            >::type
+        > type;
+    };
+};
+
+// either prepend the current element or join it to
+// the first remaining element of the sequence.
+template<>
+struct insertion_sort_dims_comparison_impl<false> {
+    template<class Begin, int N, class T>
+    struct apply {
+        typedef typename push_front_or_add<Begin, T>::type type;
+    };
+};
+
+template<int N>
+struct insertion_sort_dims_insert {
+    template<class Begin, class T>
+    struct apply {
+        typedef typename insertion_sort_dims_comparison_impl<mpl::less<typename Begin::item, T>::value>::template apply<
+            Begin,
+            N,
+            T
+        >::type type;
+    };
+};
+
+template<>
+struct insertion_sort_dims_insert<0> {
+    template<class Begin, class T>
+    struct apply {
+        typedef list<T, dimensionless_type> type;
+    };
+};
+
+template<int N>
+struct insertion_sort_dims_mpl_sequence {
+    template<class Begin>
+    struct apply {
+        typedef typename insertion_sort_dims_mpl_sequence<N - 1>::template apply<typename mpl::next<Begin>::type>::type next;
+        typedef typename insertion_sort_dims_insert<(next::size::value)>::template apply<next, typename mpl::deref<Begin>::type>::type type;
+    };
+};
+
+template<>
+struct insertion_sort_dims_mpl_sequence<0> {
+    template<class Begin>
+    struct apply {
+        typedef dimensionless_type type;
+    };
+};
+
+template<int N>
+struct insertion_sort_dims_impl {
+    template<class Begin>
+    struct apply {
+        typedef typename insertion_sort_dims_impl<N - 1>::template apply<typename Begin::next>::type next;
+        typedef typename insertion_sort_dims_insert<(next::size::value)>::template apply<next, typename Begin::item>::type type;
+    };
+};
+
+template<>
+struct insertion_sort_dims_impl<0> {
+    template<class Begin>
+    struct apply {
+        typedef dimensionless_type type;
+    };
+};
+
+template<class T>
+struct sort_dims
+{
+    typedef typename insertion_sort_dims_mpl_sequence<mpl::size<T>::value>::template apply<typename mpl::begin<T>::type>::type type;
+};
+
+
+template<class T, class Next>
+struct sort_dims<list<T, Next> >
+{
+    typedef typename insertion_sort_dims_impl<list<T, Next>::size::value>::template apply<list<T, Next> >::type type;
+};
+
+/// sorted sequences can be merged in linear time
+template<bool less, bool greater>
+struct merge_dimensions_func;
+
+template<int N1, int N2>
+struct merge_dimensions_impl;
+
+template<>
+struct merge_dimensions_func<true, false>
+{
+    template<typename Begin1, typename Begin2, int N1, int N2>
+    struct apply
+    {
+        typedef list<
+            typename Begin1::item,
+            typename merge_dimensions_impl<N1 - 1, N2>::template apply<
+                typename Begin1::next,
+                Begin2
+            >::type
+        > type;
+    };
+};
+
+template<>
+struct merge_dimensions_func<false, true> {
+    template<typename Begin1, typename Begin2, int N1, int N2>
+    struct apply
+    {
+        typedef list<
+            typename Begin2::item,
+            typename merge_dimensions_impl<N2 - 1, N1>::template apply<
+                typename Begin2::next,
+                Begin1
+            >::type
+        > type;
+    };
+};
+
+template<>
+struct merge_dimensions_func<false, false> {
+    template<typename Begin1, typename Begin2, int N1, int N2>
+    struct apply
+    {
+        typedef typename mpl::plus<typename Begin1::item, typename Begin2::item>::type combined;
+        typedef typename push_front_if<!is_empty_dim<combined>::value>::template apply<
+            typename merge_dimensions_impl<N1 - 1, N2 - 1>::template apply<
+                typename Begin1::next,
+                typename Begin2::next
+            >::type,
+            combined
+        >::type type;
+    };
+};
+
+template<int N1, int N2>
+struct merge_dimensions_impl {
+    template<typename Begin1, typename Begin2>
+    struct apply
+    {
+        typedef typename Begin1::item dim1;
+        typedef typename Begin2::item dim2;
+
+        typedef typename merge_dimensions_func<(mpl::less<dim1,dim2>::value == true),
+                (mpl::less<dim2,dim1>::value == true)>::template apply<
+            Begin1,
+            Begin2,
+            N1,
+            N2
+        >::type type;
+    };
+};
+
+template<typename Sequence1, typename Sequence2>
+struct merge_dimensions
+{
+    typedef typename detail::merge_dimensions_impl<Sequence1::size::value, 
+                                                   Sequence2::size::value>::template 
+        apply<
+            Sequence1,
+            Sequence2
+        >::type type;
+};
+
+template<int N>
+struct iterator_to_list
+{
+    template<typename Begin>
+    struct apply
+    {
+        typedef list<
+            typename Begin::item,
+            typename iterator_to_list<N - 1>::template apply<
+                typename Begin::next
+            >::type
+        > type;
+    };
+};
+
+template<>
+struct iterator_to_list<0>
+{
+    template<typename Begin>
+    struct apply {
+        typedef dimensionless_type type;
+    };
+};
+
+template<int N>
+struct merge_dimensions_impl<N, 0>
+{
+    template<typename Begin1, typename Begin2>
+    struct apply
+    {
+        typedef typename iterator_to_list<N>::template apply<Begin1>::type type;
+    };
+};
+
+template<int N>
+struct merge_dimensions_impl<0, N>
+{
+    template<typename Begin1, typename Begin2>
+    struct apply
+    {
+        typedef typename iterator_to_list<N>::template apply<Begin2>::type type;
+    };
+};
+
+template<>
+struct merge_dimensions_impl<0, 0>
+{
+    template<typename Begin1, typename Begin2>
+    struct apply
+    {
+        typedef dimensionless_type type;
+    };
+};
+
+template<int N>
+struct static_inverse_impl
+{
+    template<typename Begin>
+    struct apply {
+        typedef list<
+            typename mpl::negate<typename Begin::item>::type,
+            typename static_inverse_impl<N - 1>::template apply<
+                typename Begin::next
+            >::type
+        > type;
+    };
+};
+
+template<>
+struct static_inverse_impl<0>
+{
+    template<typename Begin>
+    struct apply
+    {
+        typedef dimensionless_type type;
+    };
+};
+
+template<int N>
+struct static_power_impl
+{
+    template<typename Begin, typename Ex>
+    struct apply
+    {
+        typedef list<
+            typename mpl::times<typename Begin::item, Ex>::type,
+            typename detail::static_power_impl<N - 1>::template apply<typename Begin::next, Ex>::type
+        > type;
+    };
+};
+
+template<>
+struct static_power_impl<0>
+{
+    template<typename Begin, typename Ex>
+    struct apply
+    {
+        typedef dimensionless_type type;
+    };
+};
+
+template<int N>
+struct static_root_impl {
+    template<class Begin, class Ex>
+    struct apply {
+        typedef list<
+            typename mpl::divides<typename Begin::item, Ex>::type,
+            typename detail::static_root_impl<N - 1>::template apply<typename Begin::next, Ex>::type
+        > type;
+    };
+};
+
+template<>
+struct static_root_impl<0> {
+    template<class Begin, class Ex>
+    struct apply 
+    {
+        typedef dimensionless_type type;
+    };
+};
+
+} // namespace detail
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_DIMENSION_IMPL_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/detail/dimension_list.hpp b/deal.II/contrib/boost/include/boost/units/detail/dimension_list.hpp
new file mode 100644 (file)
index 0000000..fc05547
--- /dev/null
@@ -0,0 +1,133 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DIMENSION_LIST_HPP
+#define BOOST_UNITS_DIMENSION_LIST_HPP
+
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/push_front_fwd.hpp>
+#include <boost/mpl/pop_front_fwd.hpp>
+#include <boost/mpl/size_fwd.hpp>
+#include <boost/mpl/begin_end_fwd.hpp>
+#include <boost/mpl/front_fwd.hpp>
+
+#include <boost/units/config.hpp>
+
+namespace boost {
+
+namespace units {
+
+struct dimensionless_type;
+
+namespace detail {
+
+struct dimension_list_tag { };
+
+} // namespace detail
+
+template<class Item, class Next>
+struct list
+{
+    typedef detail::dimension_list_tag  tag;
+    typedef list              type;
+    typedef Item                        item;
+    typedef Next                        next;
+    typedef typename mpl::next<typename Next::size>::type size;
+};
+
+} // namespace units
+
+namespace mpl {
+
+// INTERNAL ONLY
+template<>
+struct size_impl<units::detail::dimension_list_tag>
+{
+    template<class L> struct apply : public L::size { };
+};
+
+// INTERNAL ONLY
+template<>
+struct begin_impl<units::detail::dimension_list_tag>
+{
+    template<class L>
+    struct apply 
+    {
+        typedef L type;
+    };
+};
+
+// INTERNAL ONLY
+template<>
+struct end_impl<units::detail::dimension_list_tag>
+{
+    template<class L>
+    struct apply 
+    {
+        typedef units::dimensionless_type type;
+    };
+};
+
+// INTERNAL ONLY
+template<>
+struct push_front_impl<units::detail::dimension_list_tag>
+{
+    template<class L, class T>
+    struct apply 
+    {
+        typedef units::list<T, L> type;
+    };
+};
+
+// INTERNAL ONLY
+template<>
+struct pop_front_impl<units::detail::dimension_list_tag>
+{
+    template<class L>
+    struct apply 
+    {
+        typedef typename L::next type;
+    };
+};
+
+// INTERNAL ONLY
+template<>
+struct front_impl<units::detail::dimension_list_tag>
+{
+    template<class L>
+    struct apply 
+    {
+        typedef typename L::item type;
+    };
+};
+
+// INTERNAL ONLY
+template<class Item, class Next>
+struct deref<units::list<Item, Next> >
+{
+    typedef Item type;
+};
+
+} // namespace mpl
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::list, 2)
+
+#endif
+
+#include <boost/units/dimensionless_type.hpp>
+
+#endif // BOOST_UNITS_DIMENSION_LIST_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/detail/dimensionless_unit.hpp b/deal.II/contrib/boost/include/boost/units/detail/dimensionless_unit.hpp
new file mode 100644 (file)
index 0000000..bc3223b
--- /dev/null
@@ -0,0 +1,88 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DETAIL_DIMENSIONLESS_UNIT_HPP
+#define BOOST_UNITS_DETAIL_DIMENSIONLESS_UNIT_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+namespace units {
+
+template<class T>
+struct heterogeneous_system;
+
+template<class T>
+struct homogeneous_system;
+
+template<class T1, class T2, class Scale>
+struct heterogeneous_system_impl;
+
+namespace detail {
+
+template<class System>
+struct void_if_dimensionless {
+    typedef int type;
+};
+
+template<class T>
+struct void_if_dimensionless<boost::units::homogeneous_system<T> > {
+    typedef void type;
+};
+
+template<>
+struct void_if_dimensionless<
+   boost::units::heterogeneous_system<
+       boost::units::heterogeneous_system_impl<
+           boost::units::dimensionless_type,
+           boost::units::dimensionless_type,
+           boost::units::dimensionless_type
+       >
+   >
+> {
+    typedef void type;
+};
+
+template<class System, class Test = void>
+struct void_if_heterogeneous {
+    typedef void type;
+};
+
+template<class System>
+struct void_if_heterogeneous<System, typename void_if_dimensionless<System>::type> {
+    typedef int type;
+};
+
+template<class System, class Enable=void>
+struct is_dimensionless_system : mpl::false_ {};
+
+template<class System>
+struct is_dimensionless_system<System, typename void_if_dimensionless<System>::type> : mpl::true_ {};
+
+#define BOOST_UNITS_DIMENSIONLESS_UNIT(T)\
+    boost::units::unit<\
+        boost::units::dimensionless_type,\
+        T,\
+        typename ::boost::units::detail::void_if_dimensionless<T>::type\
+    >
+
+#define BOOST_UNITS_HETEROGENEOUS_DIMENSIONLESS_UNIT(T)\
+    boost::units::unit<\
+        boost::units::dimensionless_type,\
+        T,\
+        typename ::boost::units::detail::void_if_heterogeneous<T>::type\
+    >
+
+}
+}
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/detail/heterogeneous_conversion.hpp b/deal.II/contrib/boost/include/boost/units/detail/heterogeneous_conversion.hpp
new file mode 100644 (file)
index 0000000..bfdf987
--- /dev/null
@@ -0,0 +1,309 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DETAIL_HETEROGENEOUS_CONVERSION_HPP
+#define BOOST_UNITS_DETAIL_HETEROGENEOUS_CONVERSION_HPP
+
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/times.hpp>
+
+#include <boost/units/static_rational.hpp>
+#include <boost/units/homogeneous_system.hpp>
+#include <boost/units/detail/linear_algebra.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+struct solve_end {
+    template<class Begin, class Y>
+    struct apply {
+        typedef dimensionless_type type;
+    };
+};
+
+struct no_solution {};
+
+template<class X1, class X2, class Next>
+struct solve_normal {
+    template<class Begin, class Y>
+    struct apply {
+        typedef typename Begin::next next;
+        typedef list<
+            typename mpl::minus<
+                typename mpl::times<X1, Y>::type,
+                typename mpl::times<X2, typename Begin::item>::type
+            >::type,
+            typename Next::template apply<next, Y>::type
+        > type;
+    };
+};
+
+template<class Next>
+struct solve_leading_zeroes {
+    template<class Begin>
+    struct apply {
+        typedef list<
+            typename Begin::item,
+            typename Next::template apply<typename Begin::next>::type
+        > type;
+    };
+    typedef solve_leading_zeroes type;
+};
+
+template<>
+struct solve_leading_zeroes<no_solution> {
+    typedef no_solution type;
+};
+
+template<class Next>
+struct solve_first_non_zero {
+    template<class Begin>
+    struct apply {
+        typedef typename Next::template apply<
+            typename Begin::next,
+            typename Begin::item
+        >::type type;
+    };
+};
+
+template<class Next>
+struct solve_internal_zero {
+    template<class Begin, class Y>
+    struct apply {
+        typedef list<
+            typename Begin::item,
+            typename Next::template apply<typename Begin::next, Y>::type
+        > type;
+    };
+};
+
+template<class T>
+struct make_solve_list_internal_zero {
+    template<class Next, class X>
+    struct apply {
+        typedef solve_normal<T, X, Next> type;
+    };
+};
+
+template<>
+struct make_solve_list_internal_zero<static_rational<0> > {
+    template<class Next, class X>
+    struct apply {
+        typedef solve_internal_zero<Next> type;
+    };
+};
+
+template<int N>
+struct make_solve_list_normal {
+    template<class Begin, class X>
+    struct apply {
+        typedef typename make_solve_list_internal_zero<
+            typename Begin::item
+        >::template apply<
+            typename make_solve_list_normal<N-1>::template apply<typename Begin::next, X>::type,
+            X
+        >::type type;
+    };
+};
+
+template<>
+struct make_solve_list_normal<0> {
+    template<class Begin, class X>
+    struct apply {
+        typedef solve_end type;
+    };
+};
+
+template<int N>
+struct make_solve_list_leading_zeroes;
+
+template<class T>
+struct make_solve_list_first_non_zero {
+    template<class Begin, int N>
+    struct apply {
+        typedef solve_first_non_zero<
+            typename make_solve_list_normal<N-1>::template apply<
+                typename Begin::next,
+                typename Begin::item
+            >::type
+        > type;
+    };
+};
+
+template<>
+struct make_solve_list_first_non_zero<static_rational<0> > {
+    template<class Begin, int N>
+    struct apply {
+        typedef typename solve_leading_zeroes<
+            typename make_solve_list_leading_zeroes<N-1>::template apply<
+                typename Begin::next
+            >::type
+        >::type type;
+    };
+};
+
+template<int N>
+struct make_solve_list_leading_zeroes {
+    template<class Begin>
+    struct apply {
+        typedef typename make_solve_list_first_non_zero<typename Begin::item>::template apply<Begin, N>::type type;
+    };
+};
+
+template<>
+struct make_solve_list_leading_zeroes<0> {
+    template<class Begin>
+    struct apply {
+        typedef no_solution type;
+    };
+};
+
+template<int N>
+struct try_add_unit_impl {
+    template<class Begin, class L>
+    struct apply {
+        typedef typename try_add_unit_impl<N-1>::template apply<typename Begin::next, L>::type next;
+        typedef typename Begin::item::template apply<next>::type type;
+        BOOST_STATIC_ASSERT((next::size::value - 1 == type::size::value));
+    };
+};
+
+template<>
+struct try_add_unit_impl<0> {
+    template<class Begin, class L>
+    struct apply {
+        typedef L type;
+    };
+};
+
+template<int N>
+struct make_homogeneous_system_impl;
+
+template<class T, bool is_done>
+struct make_homogeneous_system_func;
+
+template<class T>
+struct make_homogeneous_system_func<T, false> {
+    template<class Begin, class Current, class Units, class Dimensions, int N>
+    struct apply {
+        typedef typename make_homogeneous_system_impl<N-1>::template apply<
+            typename Begin::next,
+            list<T, Current>,
+            list<typename Begin::item, Units>,
+            Dimensions
+        >::type type;
+    };
+};
+
+template<class T>
+struct make_homogeneous_system_func<T, true> {
+    template<class Begin, class Current, class Units, class Dimensions, int N>
+    struct apply {
+        typedef list<typename Begin::item, Units> type;
+    };
+};
+
+template<>
+struct make_homogeneous_system_func<no_solution, false> {
+    template<class Begin, class Current, class Units, class Dimensions, int N>
+    struct apply {
+        typedef typename make_homogeneous_system_impl<N-1>::template apply<
+            typename Begin::next,
+            Current,
+            Units,
+            Dimensions
+        >::type type;
+    };
+};
+
+template<>
+struct make_homogeneous_system_func<no_solution, true> {
+    template<class Begin, class Current, class Units, class Dimensions, int N>
+    struct apply {
+        typedef typename make_homogeneous_system_impl<N-1>::template apply<
+            typename Begin::next,
+            Current,
+            Units,
+            Dimensions
+        >::type type;
+    };
+};
+
+template<int N>
+struct make_homogeneous_system_impl {
+    template<class Begin, class Current, class Units, class Dimensions>
+    struct apply {
+        typedef typename expand_dimensions<Dimensions::size::value>::template apply<
+            Dimensions,
+            typename Begin::item::dimension_type
+        >::type dimensions;
+        typedef typename try_add_unit_impl<Current::size::value>::template apply<Current, dimensions>::type new_element;
+        typedef typename make_solve_list_leading_zeroes<new_element::size::value>::template apply<new_element>::type new_func;
+        typedef typename make_homogeneous_system_func<
+            new_func,
+            ((Current::size::value)+1) == (Dimensions::size::value)
+        >::template apply<Begin, Current, Units, Dimensions, N>::type type;
+    };
+};
+
+template<>
+struct make_homogeneous_system_impl<0> {
+    template<class Begin, class Current, class Units, class Dimensions>
+    struct apply {
+        typedef Units type;
+    };
+};
+
+template<class Units>
+struct make_homogeneous_system {
+    typedef typename find_base_dimensions<Units>::type base_dimensions;
+    typedef homogeneous_system<
+        typename insertion_sort<
+            typename make_homogeneous_system_impl<
+                Units::size::value
+            >::template apply<
+                Units,
+                dimensionless_type,
+                dimensionless_type,
+                base_dimensions
+            >::type
+        >::type
+    > type;
+};
+
+template<int N>
+struct extract_base_units {
+    template<class Begin, class T>
+    struct apply {
+        typedef list<
+            typename Begin::item::tag_type,
+            typename extract_base_units<N-1>::template apply<typename Begin::next, T>::type
+        > type;
+    };
+};
+
+template<>
+struct extract_base_units<0> {
+    template<class Begin, class T>
+    struct apply {
+        typedef T type;
+    };
+};
+
+}
+
+}
+
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/detail/linear_algebra.hpp b/deal.II/contrib/boost/include/boost/units/detail/linear_algebra.hpp
new file mode 100644 (file)
index 0000000..20964a9
--- /dev/null
@@ -0,0 +1,1060 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DETAIL_LINEAR_ALGEBRA_HPP
+#define BOOST_UNITS_DETAIL_LINEAR_ALGEBRA_HPP
+
+#include <boost/units/static_rational.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/arithmetic.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/assert.hpp>
+
+#include <boost/units/dim.hpp>
+#include <boost/units/dimensionless_type.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/detail/dimension_list.hpp>
+#include <boost/units/detail/sort.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+// typedef list<rational> equation;
+
+template<int N>
+struct eliminate_from_pair_of_equations_impl;
+
+template<class E1, class E2>
+struct eliminate_from_pair_of_equations;
+
+template<int N>
+struct elimination_impl;
+
+template<bool is_zero, bool element_is_last>
+struct elimination_skip_leading_zeros_impl;
+
+template<class Equation, class Vars>
+struct substitute;
+
+template<int N>
+struct substitute_impl;
+
+template<bool is_end>
+struct solve_impl;
+
+template<class T>
+struct solve;
+
+template<int N>
+struct check_extra_equations_impl;
+
+template<int N>
+struct normalize_units_impl;
+
+struct inconsistent {};
+
+// generally useful utilies.
+
+template<int N>
+struct divide_equation {
+    template<class Begin, class Divisor>
+    struct apply {
+        typedef list<typename mpl::divides<typename Begin::item, Divisor>::type, typename divide_equation<N - 1>::template apply<typename Begin::next, Divisor>::type> type;
+    };
+};
+
+template<>
+struct divide_equation<0> {
+    template<class Begin, class Divisor>
+    struct apply {
+        typedef dimensionless_type type;
+    };
+};
+
+// eliminate_from_pair_of_equations takes a pair of
+// equations and eliminates the first variable.
+//
+// equation eliminate_from_pair_of_equations(equation l1, equation l2) {
+//     rational x1 = l1.front();
+//     rational x2 = l2.front();
+//     return(transform(pop_front(l1), pop_front(l2), _1 * x2 - _2 * x1));
+// }
+
+template<int N>
+struct eliminate_from_pair_of_equations_impl {
+    template<class Begin1, class Begin2, class X1, class X2>
+    struct apply {
+        typedef list<
+            typename mpl::minus<
+                typename mpl::times<typename Begin1::item, X2>::type,
+                typename mpl::times<typename Begin2::item, X1>::type
+            >::type,
+            typename eliminate_from_pair_of_equations_impl<N - 1>::template apply<
+                typename Begin1::next,
+                typename Begin2::next,
+                X1,
+                X2
+            >::type
+        > type;
+    };
+};
+
+template<>
+struct eliminate_from_pair_of_equations_impl<0> {
+    template<class Begin1, class Begin2, class X1, class X2>
+    struct apply {
+        typedef dimensionless_type type;
+    };
+};
+
+template<class E1, class E2>
+struct eliminate_from_pair_of_equations {
+    typedef E1 begin1;
+    typedef E2 begin2;
+    typedef typename eliminate_from_pair_of_equations_impl<(E1::size::value - 1)>::template apply<
+        typename begin1::next,
+        typename begin2::next,
+        typename begin1::item,
+        typename begin2::item
+    >::type type;
+};
+
+
+
+// Stage 1.  Determine which dimensions should
+// have dummy base units.  For this purpose
+// row reduce the matrix.
+
+template<int N>
+struct make_zero_vector {
+    typedef list<static_rational<0>, typename make_zero_vector<N - 1>::type> type;
+};
+template<>
+struct make_zero_vector<0> {
+    typedef dimensionless_type type;
+};
+
+template<int Column, int TotalColumns>
+struct create_row_of_identity {
+    typedef list<static_rational<0>, typename create_row_of_identity<Column - 1, TotalColumns - 1>::type> type;
+};
+template<int TotalColumns>
+struct create_row_of_identity<0, TotalColumns> {
+    typedef list<static_rational<1>, typename make_zero_vector<TotalColumns - 1>::type> type;
+};
+template<int Column>
+struct create_row_of_identity<Column, 0> {
+    // error
+};
+
+template<int RemainingRows>
+struct determine_extra_equations_impl;
+
+template<bool first_is_zero, bool is_last>
+struct determine_extra_equations_skip_zeros_impl;
+
+// not the last row and not zero.
+template<>
+struct determine_extra_equations_skip_zeros_impl<false, false> {
+    template<class RowsBegin, int RemainingRows, int CurrentColumn, int TotalColumns, class Result>
+    struct apply {
+        // remove the equation being eliminated against from the set of equations.
+        typedef typename determine_extra_equations_impl<RemainingRows - 1>::template apply<typename RowsBegin::next, typename RowsBegin::item>::type next_equations;
+        // since this column was present, strip it out.
+        typedef Result type;
+    };
+};
+
+// the last row but not zero.
+template<>
+struct determine_extra_equations_skip_zeros_impl<false, true> {
+    template<class RowsBegin, int RemainingRows, int CurrentColumn, int TotalColumns, class Result>
+    struct apply {
+        // remove this equation.
+        typedef dimensionless_type next_equations;
+        // since this column was present, strip it out.
+        typedef Result type;
+    };
+};
+
+
+// the first columns is zero but it is not the last column.
+// continue with the same loop.
+template<>
+struct determine_extra_equations_skip_zeros_impl<true, false> {
+    template<class RowsBegin, int RemainingRows, int CurrentColumn, int TotalColumns, class Result>
+    struct apply {
+        typedef typename RowsBegin::next::item next_row;
+        typedef typename determine_extra_equations_skip_zeros_impl<
+            next_row::item::Numerator == 0,
+            RemainingRows == 2  // the next one will be the last.
+        >::template apply<
+            typename RowsBegin::next,
+            RemainingRows - 1,
+            CurrentColumn,
+            TotalColumns,
+            Result
+        > next;
+        typedef list<typename RowsBegin::item::next, typename next::next_equations> next_equations;
+        typedef typename next::type type;
+    };
+};
+
+// all the elements in this column are zero.
+template<>
+struct determine_extra_equations_skip_zeros_impl<true, true> {
+    template<class RowsBegin, int RemainingRows, int CurrentColumn, int TotalColumns, class Result>
+    struct apply {
+        typedef list<typename RowsBegin::item::next, dimensionless_type> next_equations;
+        typedef list<typename create_row_of_identity<CurrentColumn, TotalColumns>::type, Result> type;
+    };
+};
+
+template<int RemainingRows>
+struct determine_extra_equations_impl {
+    template<class RowsBegin, class EliminateAgainst>
+    struct apply {
+        typedef list<
+            typename eliminate_from_pair_of_equations<typename RowsBegin::item, EliminateAgainst>::type,
+            typename determine_extra_equations_impl<RemainingRows-1>::template apply<typename RowsBegin::next, EliminateAgainst>::type
+        > type;
+    };
+};
+
+template<>
+struct determine_extra_equations_impl<0> {
+    template<class RowsBegin, class EliminateAgainst>
+    struct apply {
+        typedef dimensionless_type type;
+    };
+};
+
+template<int RemainingColumns, bool is_done>
+struct determine_extra_equations {
+    template<class RowsBegin, int TotalColumns, class Result>
+    struct apply {
+        typedef typename RowsBegin::item top_row;
+        typedef typename determine_extra_equations_skip_zeros_impl<
+            top_row::item::Numerator == 0,
+            RowsBegin::item::size::value == 1
+        >::template apply<
+            RowsBegin,
+            RowsBegin::size::value,
+            TotalColumns - RemainingColumns,
+            TotalColumns,
+            Result
+        > column_info;
+        typedef typename determine_extra_equations<
+            RemainingColumns - 1,
+            column_info::next_equations::size::value == 0
+        >::template apply<
+            typename column_info::next_equations,
+            TotalColumns,
+            typename column_info::type
+        >::type type;
+    };
+};
+
+template<int RemainingColumns>
+struct determine_extra_equations<RemainingColumns, true> {
+    template<class RowsBegin, int TotalColumns, class Result>
+    struct apply {
+        typedef typename determine_extra_equations<RemainingColumns - 1, true>::template apply<
+            RowsBegin,
+            TotalColumns,
+            list<typename create_row_of_identity<TotalColumns - RemainingColumns, TotalColumns>::type, Result>
+        >::type type;
+    };
+};
+
+template<>
+struct determine_extra_equations<0, true> {
+    template<class RowsBegin, int TotalColumns, class Result>
+    struct apply {
+        typedef Result type;
+    };
+};
+
+// Stage 2
+// invert the matrix using Gauss-Jordan elimination
+
+
+template<bool is_zero, bool is_last>
+struct invert_strip_leading_zeroes;
+
+template<int N>
+struct invert_handle_after_pivot_row;
+
+// When processing column N, none of the first N rows 
+// can be the pivot column.
+template<int N>
+struct invert_handle_inital_rows {
+    template<class RowsBegin, class IdentityBegin>
+    struct apply {
+        typedef typename invert_handle_inital_rows<N - 1>::template apply<
+            typename RowsBegin::next,
+            typename IdentityBegin::next
+        > next;
+        typedef typename RowsBegin::item current_row;
+        typedef typename IdentityBegin::item current_identity_row;
+        typedef typename next::pivot_row pivot_row;
+        typedef typename next::identity_pivot_row identity_pivot_row;
+        typedef list<
+            typename eliminate_from_pair_of_equations_impl<(current_row::size::value) - 1>::template apply<
+                typename current_row::next,
+                pivot_row,
+                typename current_row::item,
+                static_rational<1>
+            >::type,
+            typename next::new_matrix
+        > new_matrix;
+        typedef list<
+            typename eliminate_from_pair_of_equations_impl<(current_identity_row::size::value)>::template apply<
+                current_identity_row,
+                identity_pivot_row,
+                typename current_row::item,
+                static_rational<1>
+            >::type,
+            typename next::identity_result
+        > identity_result;
+    };
+};
+
+// This handles the switch to searching for a pivot column.
+// The pivot row will be propagated up in the typedefs
+// pivot_row and identity_pivot_row.  It is inserted here.
+template<>
+struct invert_handle_inital_rows<0> {
+    template<class RowsBegin, class IdentityBegin>
+    struct apply {
+        typedef typename RowsBegin::item current_row;
+        typedef typename invert_strip_leading_zeroes<
+            (current_row::item::Numerator == 0),
+            (RowsBegin::size::value == 1)
+        >::template apply<
+            RowsBegin,
+            IdentityBegin
+        > next;
+        // results
+        typedef list<typename next::pivot_row, typename next::new_matrix> new_matrix;
+        typedef list<typename next::identity_pivot_row, typename next::identity_result> identity_result;
+        typedef typename next::pivot_row pivot_row;
+        typedef typename next::identity_pivot_row identity_pivot_row;
+    };
+};
+
+// The first internal element which is not zero.
+template<>
+struct invert_strip_leading_zeroes<false, false> {
+    template<class RowsBegin, class IdentityBegin>
+    struct apply {
+        typedef typename RowsBegin::item current_row;
+        typedef typename current_row::item current_value;
+        typedef typename divide_equation<(current_row::size::value - 1)>::template apply<typename current_row::next, current_value>::type new_equation;
+        typedef typename divide_equation<(IdentityBegin::item::size::value)>::template apply<typename IdentityBegin::item, current_value>::type transformed_identity_equation;
+        typedef typename invert_handle_after_pivot_row<(RowsBegin::size::value - 1)>::template apply<
+            typename RowsBegin::next,
+            typename IdentityBegin::next,
+            new_equation,
+            transformed_identity_equation
+        > next;
+
+        // results
+        // Note that we don't add the pivot row to the
+        // results here, because it needs to propagated up
+        // to the diagonal.
+        typedef typename next::new_matrix new_matrix;
+        typedef typename next::identity_result identity_result;
+        typedef new_equation pivot_row;
+        typedef transformed_identity_equation identity_pivot_row;
+    };
+};
+
+// The one and only non-zero element--at the end
+template<>
+struct invert_strip_leading_zeroes<false, true> {
+    template<class RowsBegin, class IdentityBegin>
+    struct apply {
+        typedef typename RowsBegin::item current_row;
+        typedef typename current_row::item current_value;
+        typedef typename divide_equation<(current_row::size::value - 1)>::template apply<typename current_row::next, current_value>::type new_equation;
+        typedef typename divide_equation<(IdentityBegin::item::size::value)>::template apply<typename IdentityBegin::item, current_value>::type transformed_identity_equation;
+
+        // results
+        // Note that we don't add the pivot row to the
+        // results here, because it needs to propagated up
+        // to the diagonal.
+        typedef dimensionless_type identity_result;
+        typedef dimensionless_type new_matrix;
+        typedef new_equation pivot_row;
+        typedef transformed_identity_equation identity_pivot_row;
+    };
+};
+
+// One of the initial zeroes
+template<>
+struct invert_strip_leading_zeroes<true, false> {
+    template<class RowsBegin, class IdentityBegin>
+    struct apply {
+        typedef typename RowsBegin::item current_row;
+        typedef typename RowsBegin::next::item next_row;
+        typedef typename invert_strip_leading_zeroes<
+            next_row::item::Numerator == 0,
+            RowsBegin::size::value == 2
+        >::template apply<
+            typename RowsBegin::next,
+            typename IdentityBegin::next
+        > next;
+        typedef typename IdentityBegin::item current_identity_row;
+        // these are propagated up.
+        typedef typename next::pivot_row pivot_row;
+        typedef typename next::identity_pivot_row identity_pivot_row;
+        typedef list<
+            typename eliminate_from_pair_of_equations_impl<(current_row::size::value - 1)>::template apply<
+                typename current_row::next,
+                pivot_row,
+                typename current_row::item,
+                static_rational<1>
+            >::type,
+            typename next::new_matrix
+        > new_matrix;
+        typedef list<
+            typename eliminate_from_pair_of_equations_impl<(current_identity_row::size::value)>::template apply<
+                current_identity_row,
+                identity_pivot_row,
+                typename current_row::item,
+                static_rational<1>
+            >::type,
+            typename next::identity_result
+        > identity_result;
+    };
+};
+
+// the last element, and is zero.
+// Should never happen.
+template<>
+struct invert_strip_leading_zeroes<true, true> {
+};
+
+template<int N>
+struct invert_handle_after_pivot_row {
+    template<class RowsBegin, class IdentityBegin, class MatrixPivot, class IdentityPivot>
+    struct apply {
+        typedef typename invert_handle_after_pivot_row<N - 1>::template apply<
+            typename RowsBegin::next,
+            typename IdentityBegin::next,
+            MatrixPivot,
+            IdentityPivot
+        > next;
+        typedef typename RowsBegin::item current_row;
+        typedef typename IdentityBegin::item current_identity_row;
+        typedef MatrixPivot pivot_row;
+        typedef IdentityPivot identity_pivot_row;
+
+        // results
+        typedef list<
+            typename eliminate_from_pair_of_equations_impl<(current_row::size::value - 1)>::template apply<
+                typename current_row::next,
+                pivot_row,
+                typename current_row::item,
+                static_rational<1>
+            >::type,
+            typename next::new_matrix
+        > new_matrix;
+        typedef list<
+            typename eliminate_from_pair_of_equations_impl<(current_identity_row::size::value)>::template apply<
+                current_identity_row,
+                identity_pivot_row,
+                typename current_row::item,
+                static_rational<1>
+            >::type,
+            typename next::identity_result
+        > identity_result;
+    };
+};
+
+template<>
+struct invert_handle_after_pivot_row<0> {
+    template<class RowsBegin, class IdentityBegin, class MatrixPivot, class IdentityPivot>
+    struct apply {
+        typedef dimensionless_type new_matrix;
+        typedef dimensionless_type identity_result;
+    };
+};
+
+template<int N>
+struct invert_impl {
+    template<class RowsBegin, class IdentityBegin>
+    struct apply {
+        typedef typename invert_handle_inital_rows<RowsBegin::size::value - N>::template apply<RowsBegin, IdentityBegin> process_column;
+        typedef typename invert_impl<N - 1>::template apply<
+            typename process_column::new_matrix,
+            typename process_column::identity_result
+        >::type type;
+    };
+};
+
+template<>
+struct invert_impl<0> {
+    template<class RowsBegin, class IdentityBegin>
+    struct apply {
+        typedef IdentityBegin type;
+    };
+};
+
+template<int N>
+struct make_identity {
+    template<int Size>
+    struct apply {
+        typedef list<typename create_row_of_identity<Size - N, Size>::type, typename make_identity<N - 1>::template apply<Size>::type> type;
+    };
+};
+
+template<>
+struct make_identity<0> {
+    template<int Size>
+    struct apply {
+        typedef dimensionless_type type;
+    };
+};
+
+template<class Matrix>
+struct make_square_and_invert {
+    typedef typename Matrix::item top_row;
+    typedef typename determine_extra_equations<(top_row::size::value), false>::template apply<
+        Matrix,                 // RowsBegin
+        top_row::size::value,   // TotalColumns
+        Matrix                  // Result
+    >::type invertible;
+    typedef typename invert_impl<invertible::size::value>::template apply<
+        invertible,
+        typename make_identity<invertible::size::value>::template apply<invertible::size::value>::type
+    >::type type;
+};
+
+
+// find_base_dimensions takes a list of
+// base_units and returns a sorted list
+// of all the base_dimensions they use.
+//
+// list<base_dimension> find_base_dimensions(list<base_unit> l) {
+//     set<base_dimension> dimensions;
+//     for_each(base_unit unit : l) {
+//         for_each(dim d : unit.dimension_type) {
+//             dimensions = insert(dimensions, d.tag_type);
+//         }
+//     }
+//     return(sort(dimensions, _1 > _2, front_inserter(list<base_dimension>())));
+// }
+
+typedef char set_no;
+struct set_yes { set_no dummy[2]; };
+
+template<class T>
+struct wrap {};
+
+struct set_end {
+    static set_no lookup(...);
+    typedef mpl::long_<0> size;
+};
+
+template<class T, class Next>
+struct set : Next {
+    using Next::lookup;
+    static set_yes lookup(wrap<T>*);
+    typedef T item;
+    typedef Next next;
+    typedef typename mpl::next<typename Next::size>::type size;
+};
+
+template<bool has_key>
+struct set_insert;
+
+template<>
+struct set_insert<true> {
+    template<class Set, class T>
+    struct apply {
+        typedef Set type;
+    };
+};
+
+template<>
+struct set_insert<false> {
+    template<class Set, class T>
+    struct apply {
+        typedef set<T, Set> type;
+    };
+};
+
+template<class Set, class T>
+struct has_key {
+    static const long size = sizeof(Set::lookup((wrap<T>*)0));
+    static const bool value = (size == sizeof(set_yes));
+};
+
+template<int N>
+struct find_base_dimensions_impl_impl {
+    template<class Begin, class S>
+    struct apply {
+        typedef typename find_base_dimensions_impl_impl<N-1>::template apply<
+            typename Begin::next,
+            S
+        >::type next;
+
+        typedef typename set_insert<
+            (has_key<next, typename Begin::item::tag_type>::value)
+        >::template apply<
+            next,
+            typename Begin::item::tag_type
+        >::type type;
+    };
+};
+
+template<>
+struct find_base_dimensions_impl_impl<0> {
+    template<class Begin, class S>
+    struct apply {
+        typedef S type;
+    };
+};
+
+template<int N>
+struct find_base_dimensions_impl {
+    template<class Begin>
+    struct apply {
+        typedef typename find_base_dimensions_impl_impl<(Begin::item::dimension_type::size::value)>::template apply<
+            typename Begin::item::dimension_type,
+            typename find_base_dimensions_impl<N-1>::template apply<typename Begin::next>::type
+        >::type type;
+    };
+};
+
+template<>
+struct find_base_dimensions_impl<0> {
+    template<class Begin>
+    struct apply {
+        typedef set_end type;
+    };
+};
+
+template<class T>
+struct find_base_dimensions {
+    typedef typename insertion_sort<
+        typename find_base_dimensions_impl<
+            (T::size::value)
+        >::template apply<T>::type
+    >::type type;
+};
+
+// calculate_base_dimension_coefficients finds
+// the coefficients corresponding to the first
+// base_dimension in each of the dimension_lists.
+// It returns two values.  The first result
+// is a list of the coefficients.  The second
+// is a list with all the incremented iterators.
+// When we encounter a base_dimension that is
+// missing from a dimension_list, we do not
+// increment the iterator and we set the
+// coefficient to zero.
+
+template<bool has_dimension>
+struct calculate_base_dimension_coefficients_func;
+
+template<>
+struct calculate_base_dimension_coefficients_func<true> {
+    template<class T>
+    struct apply {
+        typedef typename T::item::value_type type;
+        typedef typename T::next next;
+    };
+};
+
+template<>
+struct calculate_base_dimension_coefficients_func<false> {
+    template<class T>
+    struct apply {
+        typedef static_rational<0> type;
+        typedef T next;
+    };
+};
+
+// begins_with_dimension returns true iff its first
+// parameter is a valid iterator which yields its
+// second parameter when dereferenced.
+
+template<class Iterator>
+struct begins_with_dimension {
+    template<class Dim>
+    struct apply : 
+        boost::is_same<
+            Dim,
+            typename Iterator::item::tag_type
+        > {};
+};
+
+template<>
+struct begins_with_dimension<dimensionless_type> {
+    template<class Dim>
+    struct apply : mpl::false_ {};
+};
+
+template<int N>
+struct calculate_base_dimension_coefficients_impl {
+    template<class BaseUnitDimensions,class Dim,class T>
+    struct apply {
+        typedef typename calculate_base_dimension_coefficients_func<
+            begins_with_dimension<typename BaseUnitDimensions::item>::template apply<
+                Dim
+            >::value
+        >::template apply<
+            typename BaseUnitDimensions::item
+        > result;
+        typedef typename calculate_base_dimension_coefficients_impl<N-1>::template apply<
+            typename BaseUnitDimensions::next,
+            Dim,
+            list<typename result::type, T>
+        > next_;
+        typedef typename next_::type type;
+        typedef list<typename result::next, typename next_::next> next;
+    };
+};
+
+template<>
+struct calculate_base_dimension_coefficients_impl<0> {
+    template<class Begin, class BaseUnitDimensions, class T>
+    struct apply {
+        typedef T type;
+        typedef dimensionless_type next;
+    };
+};
+
+// add_zeroes pushs N zeroes onto the
+// front of a list.
+//
+// list<rational> add_zeroes(list<rational> l, int N) {
+//     if(N == 0) {
+//         return(l);
+//     } else {
+//         return(push_front(add_zeroes(l, N-1), 0));
+//     }
+// }
+
+template<int N>
+struct add_zeroes_impl {
+    // If you get an error here and your base units are
+    // in fact linearly independent, please report it.
+    BOOST_MPL_ASSERT_MSG((N > 0), base_units_are_probably_not_linearly_independent, (void));
+    template<class T>
+    struct apply {
+        typedef list<
+            static_rational<0>,
+            typename add_zeroes_impl<N-1>::template apply<T>::type
+        > type;
+    };
+};
+
+template<>
+struct add_zeroes_impl<0> {
+    template<class T>
+    struct apply {
+        typedef T type;
+    };
+};
+
+// expand_dimensions finds the exponents of
+// a set of dimensions in a dimension_list.
+// the second parameter is assumed to be
+// a superset of the base_dimensions of
+// the first parameter.
+//
+// list<rational> expand_dimensions(dimension_list, list<base_dimension>);
+
+template<int N>
+struct expand_dimensions {
+    template<class Begin, class DimensionIterator>
+    struct apply {
+        typedef typename calculate_base_dimension_coefficients_func<
+            begins_with_dimension<DimensionIterator>::template apply<typename Begin::item>::value
+        >::template apply<DimensionIterator> result;
+        typedef list<
+            typename result::type,
+            typename expand_dimensions<N-1>::template apply<typename Begin::next, typename result::next>::type
+        > type;
+    };
+};
+
+template<>
+struct expand_dimensions<0> {
+    template<class Begin, class DimensionIterator>
+    struct apply {
+        typedef dimensionless_type type;
+    };
+};
+
+template<int N>
+struct create_unit_matrix {
+    template<class Begin, class Dimensions>
+    struct apply {
+        typedef typename create_unit_matrix<N - 1>::template apply<typename Begin::next, Dimensions>::type next;
+        typedef list<typename expand_dimensions<Dimensions::size::value>::template apply<Dimensions, typename Begin::item::dimension_type>::type, next> type;
+    };
+};
+
+template<>
+struct create_unit_matrix<0> {
+    template<class Begin, class Dimensions>
+    struct apply {
+        typedef dimensionless_type type;
+    };
+};
+
+template<class T>
+struct normalize_units {
+    typedef typename find_base_dimensions<T>::type dimensions;
+    typedef typename create_unit_matrix<(T::size::value)>::template apply<
+        T,
+        dimensions
+    >::type matrix;
+    typedef typename make_square_and_invert<matrix>::type type;
+    static const long extra = (type::size::value) - (T::size::value);
+};
+
+// multiply_add_units computes M x V
+// where M is a matrix and V is a horizontal
+// vector
+//
+// list<rational> multiply_add_units(list<list<rational> >, list<rational>);
+
+template<int N>
+struct multiply_add_units_impl {
+    template<class Begin1, class Begin2 ,class X>
+    struct apply {
+        typedef list<
+            typename mpl::plus<
+                typename mpl::times<
+                    typename Begin2::item,
+                    X
+                >::type,
+                typename Begin1::item
+            >::type,
+            typename multiply_add_units_impl<N-1>::template apply<
+                typename Begin1::next,
+                typename Begin2::next,
+                X
+            >::type
+        > type;
+    };
+};
+
+template<>
+struct multiply_add_units_impl<0> {
+    template<class Begin1, class Begin2 ,class X>
+    struct apply {
+        typedef dimensionless_type type;
+    };
+};
+
+template<int N>
+struct multiply_add_units {
+    template<class Begin1, class Begin2>
+    struct apply {
+        typedef typename multiply_add_units_impl<
+            (Begin2::item::size::value)
+        >::template apply<
+            typename multiply_add_units<N-1>::template apply<
+                typename Begin1::next,
+                typename Begin2::next
+            >::type,
+            typename Begin2::item,
+            typename Begin1::item
+        >::type type;
+    };
+};
+
+template<>
+struct multiply_add_units<1> {
+    template<class Begin1, class Begin2>
+    struct apply {
+        typedef typename add_zeroes_impl<
+            (Begin2::item::size::value)
+        >::template apply<dimensionless_type>::type type1;
+        typedef typename multiply_add_units_impl<
+            (Begin2::item::size::value)
+        >::template apply<
+            type1,
+            typename Begin2::item,
+            typename Begin1::item
+        >::type type;
+    };
+};
+
+
+// strip_zeroes erases the first N elements of a list if
+// they are all zero, otherwise returns inconsistent
+//
+// list strip_zeroes(list l, int N) {
+//     if(N == 0) {
+//         return(l);
+//     } else if(l.front == 0) {
+//         return(strip_zeroes(pop_front(l), N-1));
+//     } else {
+//         return(inconsistent);
+//     }
+// }
+
+template<int N>
+struct strip_zeroes_impl;
+
+template<class T>
+struct strip_zeroes_func {
+    template<class L, int N>
+    struct apply {
+        typedef inconsistent type;
+    };
+};
+
+template<>
+struct strip_zeroes_func<static_rational<0> > {
+    template<class L, int N>
+    struct apply {
+        typedef typename strip_zeroes_impl<N-1>::template apply<typename L::next>::type type;
+    };
+};
+
+template<int N>
+struct strip_zeroes_impl {
+    template<class T>
+    struct apply {
+        typedef typename strip_zeroes_func<typename T::item>::template apply<T, N>::type type;
+    };
+};
+
+template<>
+struct strip_zeroes_impl<0> {
+    template<class T>
+    struct apply {
+        typedef T type;
+    };
+};
+
+// Given a list of base_units, computes the
+// exponents of each base unit for a given
+// dimension.
+//
+// list<rational> calculate_base_unit_exponents(list<base_unit> units, dimension_list dimensions);
+
+template<class T>
+struct is_base_dimension_unit {
+    typedef mpl::false_ type;
+    typedef void base_dimension_type;
+};
+template<class T>
+struct is_base_dimension_unit<list<dim<T, static_rational<1> >, dimensionless_type> > {
+    typedef mpl::true_ type;
+    typedef T base_dimension_type;
+};
+
+template<int N>
+struct is_simple_system_impl {
+    template<class Begin, class Prev>
+    struct apply {
+        typedef is_base_dimension_unit<typename Begin::item::dimension_type> test;
+        typedef mpl::and_<
+            typename test::type,
+            mpl::less<Prev, typename test::base_dimension_type>,
+            typename is_simple_system_impl<N-1>::template apply<
+                typename Begin::next,
+                typename test::base_dimension_type
+            >
+        > type;
+        static const bool value = (type::value);
+    };
+};
+
+template<>
+struct is_simple_system_impl<0> {
+    template<class Begin, class Prev>
+    struct apply : mpl::true_ {
+    };
+};
+
+template<class T>
+struct is_simple_system {
+    typedef T Begin;
+    typedef is_base_dimension_unit<typename Begin::item::dimension_type> test;
+    typedef typename mpl::and_<
+        typename test::type,
+        typename is_simple_system_impl<
+            T::size::value - 1
+        >::template apply<
+            typename Begin::next::type,
+            typename test::base_dimension_type
+        >
+    >::type type;
+    static const bool value = type::value;
+};
+
+template<bool>
+struct calculate_base_unit_exponents_impl;
+
+template<>
+struct calculate_base_unit_exponents_impl<true> {
+    template<class T, class Dimensions>
+    struct apply {
+        typedef typename expand_dimensions<(T::size::value)>::template apply<
+            typename find_base_dimensions<T>::type,
+            Dimensions
+        >::type type;
+    };
+};
+
+template<>
+struct calculate_base_unit_exponents_impl<false> {
+    template<class T, class Dimensions>
+    struct apply {
+        // find the units that correspond to each base dimension
+        typedef normalize_units<T> base_solutions;
+        // pad the dimension with zeroes so it can just be a
+        // list of numbers, making the multiplication easy
+        // e.g. if the arguments are list<pound, foot> and
+        // list<mass,time^-2> then this step will
+        // yield list<0,1,-2>
+        typedef typename expand_dimensions<(base_solutions::dimensions::size::value)>::template apply<
+            typename base_solutions::dimensions,
+            Dimensions
+        >::type dimensions;
+        // take the unit corresponding to each base unit
+        // multiply each of its exponents by the exponent
+        // of the base_dimension in the result and sum.
+        typedef typename multiply_add_units<dimensions::size::value>::template apply<
+            dimensions,
+            typename base_solutions::type
+        >::type units;
+        // Now, verify that the dummy units really
+        // cancel out and remove them.
+        typedef typename strip_zeroes_impl<base_solutions::extra>::template apply<units>::type type;
+    };
+};
+
+template<class T, class Dimensions>
+struct calculate_base_unit_exponents {
+    typedef typename calculate_base_unit_exponents_impl<is_simple_system<T>::value>::template apply<T, Dimensions>::type type;
+};
+
+} // namespace detail
+
+} // namespace units
+
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/detail/one.hpp b/deal.II/contrib/boost/include/boost/units/detail/one.hpp
new file mode 100644 (file)
index 0000000..15bc7a4
--- /dev/null
@@ -0,0 +1,104 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DETAIL_ONE_HPP
+#define BOOST_UNITS_DETAIL_ONE_HPP
+
+#include <boost/units/operators.hpp>
+
+namespace boost {
+
+namespace units {
+
+struct one { one() {} };
+
+// workaround for pathscale.
+inline one make_one() {
+    one result;
+    return(result);
+}
+
+template<class T>
+struct multiply_typeof_helper<one, T>
+{
+    typedef T type;
+};
+
+template<class T>
+struct multiply_typeof_helper<T, one>
+{
+    typedef T type;
+};
+
+template<>
+struct multiply_typeof_helper<one, one>
+{
+    typedef one type;
+};
+
+template<class T>
+inline T operator*(const one&, const T& t)
+{
+    return(t);
+}
+
+template<class T>
+inline T operator*(const T& t, const one&)
+{
+    return(t);
+}
+
+inline one operator*(const one&, const one&)
+{
+    one result;
+    return(result);
+}
+
+template<class T>
+struct divide_typeof_helper<T, one>
+{
+    typedef T type;
+};
+
+template<class T>
+struct divide_typeof_helper<one, T>
+{
+    typedef T type;
+};
+
+template<>
+struct divide_typeof_helper<one, one>
+{
+    typedef one type;
+};
+
+template<class T>
+inline T operator/(const T& t, const one&)
+{
+    return(t);
+}
+
+template<class T>
+inline T operator/(const one&, const T& t)
+{
+    return(1/t);
+}
+
+inline one operator/(const one&, const one&)
+{
+    one result;
+    return(result);
+}
+
+} // namespace units
+
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/detail/ordinal.hpp b/deal.II/contrib/boost/include/boost/units/detail/ordinal.hpp
new file mode 100644 (file)
index 0000000..b47ef67
--- /dev/null
@@ -0,0 +1,49 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DETAIL_ORDINAL_HPP_INCLUDED
+#define BOOST_UNITS_DETAIL_ORDINAL_HPP_INCLUDED
+
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost {
+namespace units {
+
+namespace detail {
+
+struct ordinal_tag {};
+
+}
+
+template<int N>
+struct ordinal {
+    typedef detail::ordinal_tag tag;
+    static const long value = N;
+};
+
+template<int N>
+const long ordinal<N>::value;
+
+}
+
+namespace mpl {
+
+template<>
+struct less_impl<units::detail::ordinal_tag, units::detail::ordinal_tag> {
+    template<class T1, class T2>
+    struct apply : bool_<(T1::value) < (T2::value)> {};
+};
+
+}
+
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/detail/prevent_redefinition.hpp b/deal.II/contrib/boost/include/boost/units/detail/prevent_redefinition.hpp
new file mode 100644 (file)
index 0000000..fba969a
--- /dev/null
@@ -0,0 +1,54 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DETAIL_PREVENT_REDEFINITION_HPP
+#define BOOST_UNITS_DETAIL_PREVENT_REDEFINITION_HPP
+
+#include <boost/mpl/long.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+struct no { no() {} char dummy; };
+struct yes { no dummy[2]; };
+
+template<bool> struct ordinal_has_already_been_defined;
+
+template<>
+struct ordinal_has_already_been_defined<true>   { };
+
+template<>
+struct ordinal_has_already_been_defined<false>  { typedef void type; };
+
+}
+
+/// This must be in namespace boost::units so that ADL
+/// will work.  we need a mangled name because it must
+/// be found by ADL
+/// INTERNAL ONLY
+template<class T>
+detail::no 
+boost_units_is_registered(const T&) 
+{ detail::no result; return(result); }
+
+/// INTERNAL ONLY
+template<class T>
+detail::no 
+boost_units_unit_is_registered(const T&) 
+{ detail::no result; return(result); }
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_PREVENT_ORDINAL_REDEFINITION_IMPL_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/detail/push_front_if.hpp b/deal.II/contrib/boost/include/boost/units/detail/push_front_if.hpp
new file mode 100644 (file)
index 0000000..b924a24
--- /dev/null
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DETAIL_PUSH_FRONT_IF_HPP
+#define BOOST_UNITS_DETAIL_PUSH_FRONT_IF_HPP
+
+namespace boost {
+
+namespace units {
+
+template<class T, class Next>
+struct list;
+
+namespace detail {
+
+template<bool>
+struct push_front_if;
+
+template<>
+struct push_front_if<true> {
+    template<class L, class T>
+    struct apply {
+        typedef list<T, L> type;
+    };
+};
+
+template<>
+struct push_front_if<false> {
+    template<class L, class T>
+    struct apply {
+        typedef L type;
+    };
+};
+
+}
+
+}
+
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/detail/push_front_or_add.hpp b/deal.II/contrib/boost/include/boost/units/detail/push_front_or_add.hpp
new file mode 100644 (file)
index 0000000..a3092da
--- /dev/null
@@ -0,0 +1,84 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DETAIL_PUSH_FRONT_OR_ADD_HPP
+#define BOOST_UNITS_DETAIL_PUSH_FRONT_OR_ADD_HPP
+
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/pop_front.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/detail/push_front_if.hpp>
+
+namespace boost {
+
+namespace units {
+
+template<class Item, class Next>
+struct list;
+
+namespace detail {
+
+template<class T>
+struct is_empty_dim;
+
+/// add an instantiation of dim to Sequence.
+template<bool>
+struct push_front_or_add_impl;
+
+template<>
+struct push_front_or_add_impl<true>
+{
+    template<typename Sequence, typename T>
+    struct apply
+    {
+        typedef typename mpl::plus<T, typename Sequence::item>::type item;
+        typedef typename push_front_if<!is_empty_dim<item>::value>::template apply<
+            typename Sequence::next,
+            item
+        > type;
+    };
+};
+
+template<>
+struct push_front_or_add_impl<false>
+{
+    template<typename Sequence, typename T>
+    struct apply
+    {
+        typedef list<T, Sequence> type;
+    };
+};
+
+template<typename Sequence, typename T>
+struct push_front_or_add
+{
+    typedef typename push_front_or_add_impl<boost::is_same<typename T::tag_type, typename Sequence::item::tag_type>::value>::template apply<
+        Sequence,
+        T
+    >::type type;
+};
+
+template<typename T>
+struct push_front_or_add<dimensionless_type, T>
+{
+    typedef list<T, dimensionless_type> type;
+};
+
+} // namespace detail
+
+} // namespace units
+
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/detail/sort.hpp b/deal.II/contrib/boost/include/boost/units/detail/sort.hpp
new file mode 100644 (file)
index 0000000..389adfe
--- /dev/null
@@ -0,0 +1,109 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DETAIL_SORT_HPP
+#define BOOST_UNITS_DETAIL_SORT_HPP
+
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/begin.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/less.hpp>
+
+#include <boost/units/dimensionless_type.hpp>
+#include <boost/units/detail/dimension_list.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+template<int N>
+struct insertion_sort_insert;
+
+template<bool is_greater>
+struct insertion_sort_comparison_impl;
+
+// have to recursively add the element to the next sequence.
+template<>
+struct insertion_sort_comparison_impl<true> {
+    template<class Begin, int N, class T>
+    struct apply {
+        typedef list<
+            typename Begin::item,
+            typename insertion_sort_insert<N - 1>::template apply<
+                typename Begin::next,
+                T
+            >::type
+        > type;
+    };
+};
+
+// prepend the current element
+template<>
+struct insertion_sort_comparison_impl<false> {
+    template<class Begin, int N, class T>
+    struct apply {
+        typedef list<T, Begin> type;
+    };
+};
+
+template<int N>
+struct insertion_sort_insert {
+    template<class Begin, class T>
+    struct apply {
+        typedef typename insertion_sort_comparison_impl<mpl::less<typename Begin::item, T>::value>::template apply<
+            Begin,
+            N,
+            T
+        >::type type;
+    };
+};
+
+template<>
+struct insertion_sort_insert<0> {
+    template<class Begin, class T>
+    struct apply {
+        typedef list<T, dimensionless_type> type;
+    };
+};
+
+template<int N>
+struct insertion_sort_impl {
+    template<class Begin>
+    struct apply {
+        typedef typename insertion_sort_impl<N - 1>::template apply<typename Begin::next>::type next;
+        typedef typename insertion_sort_insert<(next::size::value)>::template apply<next, typename Begin::item>::type type;
+    };
+};
+
+template<>
+struct insertion_sort_impl<0> {
+    template<class Begin>
+    struct apply {
+        typedef dimensionless_type type;
+    };
+};
+
+template<class T>
+struct insertion_sort
+{
+    typedef typename insertion_sort_impl<T::size::value>::template apply<T>::type type;
+};
+
+} // namespace detail
+
+} // namespace units
+
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/detail/static_rational_power.hpp b/deal.II/contrib/boost/include/boost/units/detail/static_rational_power.hpp
new file mode 100644 (file)
index 0000000..9c71f55
--- /dev/null
@@ -0,0 +1,206 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DETAIL_STATIC_RATIONAL_POWER_HPP
+#define BOOST_UNITS_DETAIL_STATIC_RATIONAL_POWER_HPP
+
+#include <boost/config/no_tr1/cmath.hpp>
+
+#include <boost/units/detail/one.hpp>
+#include <boost/units/operators.hpp>
+
+namespace boost {
+
+namespace units {
+
+template<long N,long D>
+class static_rational;
+
+namespace detail {
+
+namespace typeof_pow_adl_barrier {
+
+using std::pow;
+
+template<class Y>
+struct typeof_pow
+{
+#if defined(BOOST_UNITS_HAS_BOOST_TYPEOF)
+    BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, pow(typeof_::make<Y>(), 0.0))
+    typedef typename nested::type type;
+#elif defined(BOOST_UNITS_HAS_MWERKS_TYPEOF)
+    typedef __typeof__(pow(typeof_::make<Y>(), 0.0)) type;
+#elif defined(BOOST_UNITS_HAS_GNU_TYPEOF)
+    typedef typeof(pow(typeof_::make<Y>(), 0.0)) type;
+#else
+    typedef Y type;
+#endif
+};
+
+}
+
+template<class R, class Y>
+struct static_rational_power_impl
+{
+    typedef typename typeof_pow_adl_barrier::typeof_pow<Y>::type type;
+    static type call(const Y& y)
+    {
+        using std::pow;
+        return(pow(y, static_cast<double>(R::Numerator) / static_cast<double>(R::Denominator)));
+    }
+};
+
+template<class R>
+struct static_rational_power_impl<R, one>
+{
+    typedef one type;
+    static one call(const one&)
+    {
+        one result;
+        return(result);
+    }
+};
+
+template<long N>
+struct static_rational_power_impl<static_rational<N, 1>, one>
+{
+    typedef one type;
+    static one call(const one&)
+    {
+        one result;
+        return(result);
+    }
+};
+
+template<long N, bool = (N % 2 == 0)>
+struct static_int_power_impl;
+
+template<long N>
+struct static_int_power_impl<N, true>
+{
+    template<class Y, class R>
+    struct apply
+    {
+        typedef typename multiply_typeof_helper<Y, Y>::type square_type;
+        typedef typename static_int_power_impl<(N >> 1)>::template apply<square_type, R> next;
+        typedef typename next::type type;
+        static type call(const Y& y, const R& r)
+        {
+            const Y square = y * y;
+            return(next::call(square, r));
+        }
+    };
+};
+
+template<long N>
+struct static_int_power_impl<N, false>
+{
+    template<class Y, class R>
+    struct apply
+    {
+        typedef typename multiply_typeof_helper<Y, Y>::type square_type;
+        typedef typename multiply_typeof_helper<Y, R>::type new_r;
+        typedef typename static_int_power_impl<(N >> 1)>::template apply<square_type, new_r> next;
+        typedef typename next::type type;
+        static type call(const Y& y, const R& r)
+        {
+            const Y square = y * y;
+            return(next::call(square, y * r));
+        }
+    };
+};
+
+template<>
+struct static_int_power_impl<1, false>
+{
+    template<class Y, class R>
+    struct apply
+    {
+        typedef typename multiply_typeof_helper<Y, R>::type type;
+        static type call(const Y& y, const R& r)
+        {
+            return(y * r);
+        }
+    };
+};
+
+template<>
+struct static_int_power_impl<0, true>
+{
+    template<class Y, class R>
+    struct apply
+    {
+        typedef R type;
+        static R call(const Y&, const R& r)
+        {
+            return(r);
+        }
+    };
+};
+
+template<int N, bool = (N < 0)>
+struct static_int_power_sign_impl;
+
+template<int N>
+struct static_int_power_sign_impl<N, false>
+{
+    template<class Y>
+    struct apply
+    {
+        typedef typename static_int_power_impl<N>::template apply<Y, one> impl;
+        typedef typename impl::type type;
+        static type call(const Y& y)
+        {
+            one result;
+            return(impl::call(y, result));
+        }
+    };
+};
+
+template<int N>
+struct static_int_power_sign_impl<N, true>
+{
+    template<class Y>
+    struct apply
+    {
+        typedef typename static_int_power_impl<-N>::template apply<Y, one> impl;
+        typedef typename divide_typeof_helper<one, typename impl::type>::type type;
+        static type call(const Y& y)
+        {
+            one result;
+            return(result/impl::call(y, result));
+        }
+    };
+};
+
+template<long N, class Y>
+struct static_rational_power_impl<static_rational<N, 1>, Y>
+{
+    typedef typename static_int_power_sign_impl<N>::template apply<Y> impl;
+    typedef typename impl::type type;
+    static Y call(const Y& y)
+    {
+        return(impl::call(y));
+    }
+};
+
+template<class R, class Y>
+typename detail::static_rational_power_impl<R, Y>::type static_rational_power(const Y& y)
+{
+    return(detail::static_rational_power_impl<R, Y>::call(y));
+}
+
+} // namespace detail
+
+} // namespace units
+
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/detail/unscale.hpp b/deal.II/contrib/boost/include/boost/units/detail/unscale.hpp
new file mode 100644 (file)
index 0000000..08e51e9
--- /dev/null
@@ -0,0 +1,234 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DETAIL_UNSCALE_HPP_INCLUDED
+#define BOOST_UNITS_DETAIL_UNSCALE_HPP_INCLUDED
+
+#include <string>
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/begin.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/times.hpp>
+#include <boost/mpl/negate.hpp>
+#include <boost/mpl/less.hpp>
+
+#include <boost/units/config.hpp>
+#include <boost/units/dimension.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/detail/one.hpp>
+
+namespace boost {
+
+namespace units {
+
+template<class T>
+struct heterogeneous_system;
+
+template<class T, class D, class Scale>
+struct heterogeneous_system_impl;
+
+template<class T, class E>
+struct heterogeneous_system_dim;
+
+template<class S, class Scale>
+struct scaled_base_unit;
+
+/// removes all scaling from a unit or a base unit.
+template<class T>
+struct unscale
+{
+#ifndef BOOST_UNITS_DOXYGEN
+    typedef T type;
+#else
+    typedef detail::unspecified type;
+#endif
+};
+
+/// INTERNAL ONLY
+template<class S, class Scale>
+struct unscale<scaled_base_unit<S, Scale> >
+{
+    typedef typename unscale<S>::type type;
+};
+
+/// INTERNAL ONLY
+template<class D, class S>
+struct unscale<unit<D, S> >
+{
+    typedef unit<D, typename unscale<S>::type> type;
+};
+
+/// INTERNAL ONLY
+template<class Scale>
+struct scale_list_dim;
+
+/// INTERNAL ONLY
+template<class T>
+struct get_scale_list
+{
+    typedef dimensionless_type type;
+};
+
+/// INTERNAL ONLY
+template<class S, class Scale>
+struct get_scale_list<scaled_base_unit<S, Scale> >
+{
+    typedef typename mpl::times<list<scale_list_dim<Scale>, dimensionless_type>, typename get_scale_list<S>::type>::type type;
+};
+
+/// INTERNAL ONLY
+template<class D, class S>
+struct get_scale_list<unit<D, S> >
+{
+    typedef typename get_scale_list<S>::type type;
+};
+
+/// INTERNAL ONLY
+struct scale_dim_tag {};
+
+/// INTERNAL ONLY
+template<class Scale>
+struct scale_list_dim : Scale
+{
+    typedef scale_dim_tag tag;
+    typedef scale_list_dim type;
+};
+
+} // namespace units
+
+#ifndef BOOST_UNITS_DOXYGEN
+
+namespace mpl {
+
+/// INTERNAL ONLY
+template<>
+struct less_impl<boost::units::scale_dim_tag, boost::units::scale_dim_tag>
+{
+    template<class T0, class T1>
+    struct apply : mpl::bool_<((T0::base) < (T1::base))> {};
+};
+
+}
+
+#endif
+
+namespace units {
+
+namespace detail {
+
+template<class Scale>
+struct is_empty_dim<scale_list_dim<Scale> > : mpl::false_ {};
+
+template<long N>
+struct is_empty_dim<scale_list_dim<scale<N, static_rational<0, 1> > > > : mpl::true_ {};
+
+template<int N>
+struct eval_scale_list_impl
+{
+    template<class Begin>
+    struct apply
+    {
+        typedef typename eval_scale_list_impl<N-1>::template apply<typename Begin::next> next_iteration;
+        typedef typename multiply_typeof_helper<typename next_iteration::type, typename Begin::item::value_type>::type type;
+        static type value()
+        {
+            return(next_iteration::value() * Begin::item::value());
+        }
+    };
+};
+
+template<>
+struct eval_scale_list_impl<0>
+{
+    template<class Begin>
+    struct apply
+    {
+        typedef one type;
+        static one value()
+        {
+            one result;
+            return(result);
+        }
+    };
+};
+
+}
+
+/// INTERNAL ONLY
+template<class T>
+struct eval_scale_list : detail::eval_scale_list_impl<T::size::value>::template apply<T> {};
+
+} // namespace units
+
+#ifndef BOOST_UNITS_DOXYGEN
+
+namespace mpl {
+
+/// INTERNAL ONLY
+template<>
+struct plus_impl<boost::units::scale_dim_tag, boost::units::scale_dim_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef boost::units::scale_list_dim<
+            boost::units::scale<
+                (T0::base),
+                typename mpl::plus<typename T0::exponent, typename T1::exponent>::type
+            >
+        > type;
+    };
+};
+
+/// INTERNAL ONLY
+template<>
+struct negate_impl<boost::units::scale_dim_tag>
+{
+    template<class T0>
+    struct apply
+    {
+        typedef boost::units::scale_list_dim<
+            boost::units::scale<
+                (T0::base),
+                typename mpl::negate<typename T0::exponent>::type
+            >
+        > type;
+    };
+};
+
+/// INTERNAL ONLY
+template<>
+struct times_impl<boost::units::scale_dim_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef boost::units::scale_list_dim<
+            boost::units::scale<
+                (T0::base),
+                typename mpl::times<typename T0::exponent, T1>::type
+            >
+        > type;
+    };
+};
+
+} // namespace mpl
+
+#endif
+
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/detail/utility.hpp b/deal.II/contrib/boost/include/boost/units/detail/utility.hpp
new file mode 100644 (file)
index 0000000..da46b45
--- /dev/null
@@ -0,0 +1,104 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_UTILITY_HPP
+#define BOOST_UNITS_UTILITY_HPP
+
+#include <cstdlib>
+#include <typeinfo>
+#include <string>
+
+#if defined(__GLIBCXX__) || defined(__GLIBCPP__)
+#define BOOST_UNITS_USE_DEMANGLING
+#include <cxxabi.h>
+#endif // __GNUC__
+
+#ifdef BOOST_UNITS_USE_DEMANGLING
+
+#include <boost/algorithm/string/replace.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+inline
+std::string
+demangle(const char* name)
+{
+    // need to demangle C++ symbols
+    char*       realname;
+    std::size_t len; 
+    int         stat;
+     
+    realname = abi::__cxa_demangle(name,NULL,&len,&stat);
+    
+    if (realname != NULL)
+    {
+        std::string   out(realname);
+        
+        std::free(realname);
+        
+        boost::replace_all(out,"boost::units::","");
+        
+        return out;
+    }
+    
+    return std::string("demangle :: error - unable to demangle specified symbol");
+}
+
+} // namespace detail
+
+template<class L>
+std::string simplify_typename(const L& /*source*/)
+{
+    const std::string   demangled = detail::demangle(typeid(L).name());
+
+    return demangled;
+}
+
+} // namespace units
+
+} // namespace boost
+
+#else // BOOST_UNITS_USE_DEMANGLING
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+inline
+std::string
+demangle(const char* name)
+{
+    return name;
+}
+
+} // namespace detail
+
+template<class L>
+std::string simplify_typename(const L& /*source*/)
+{
+    return std::string(typeid(L).name());
+}
+
+} // namespace units
+
+} // namespace boost
+
+// To get system-specific predefined macros:
+// gcc -arch ppc -dM -E - < /dev/null | sort 
+
+#endif // BOOST_UNITS_USE_DEMANGLING
+
+#endif // BOOST_UNITS_UTILITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/dim.hpp b/deal.II/contrib/boost/include/boost/units/dim.hpp
new file mode 100644 (file)
index 0000000..53372cf
--- /dev/null
@@ -0,0 +1,167 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DIM_HPP
+#define BOOST_UNITS_DIM_HPP
+
+#include <boost/static_assert.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/mpl/arithmetic.hpp>
+
+#include <boost/units/config.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/detail/dim_impl.hpp>
+
+/// \file 
+/// \brief Handling of fundamental dimension/exponent pairs.
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+struct dim_tag { };
+
+}
+
+/// \brief Dimension tag/exponent pair for a single fundamental dimension.
+///
+/// \detailed 
+/// The dim class represents a single dimension tag/dimension exponent pair.
+/// That is, @c dim<tag_type,value_type> is a pair where @c tag_type represents the
+/// fundamental dimension being represented and @c value_type represents the 
+/// exponent of that fundamental dimension as a @c static_rational. @c tag_type must 
+/// be a derived from a specialization of @c base_dimension.
+/// Specialization of the following Boost.MPL metafunctions are provided
+///
+///     - @c mpl::plus for two @c dims
+///     - @c mpl::minus for two @c dims
+///     - @c mpl::negate for a @c dim
+///
+/// These metafunctions all operate on the exponent, and require
+/// that the @c dim operands have the same base dimension tag.
+/// In addition, multiplication and division by @c static_rational
+/// is supported.
+///
+///     - @c mpl::times for a @c static_rational and a @c dim in either order
+///     - @c mpl::divides for a @c static_rational and a @c dim in either order
+///
+/// These metafunctions likewise operate on the exponent only.
+template<typename T,typename V> 
+struct dim
+{
+    typedef dim             type;
+    typedef detail::dim_tag tag;
+    typedef T               tag_type;
+    typedef V               value_type;
+};
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::dim, 2)
+
+#endif
+
+#ifndef BOOST_UNITS_DOXYGEN
+
+namespace boost {
+
+namespace mpl {
+
+// define MPL operators acting on dim<T,V>
+
+template<>
+struct plus_impl<boost::units::detail::dim_tag,boost::units::detail::dim_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        BOOST_STATIC_ASSERT((boost::is_same<typename T0::tag_type,typename T1::tag_type>::value == true));
+        typedef boost::units::dim<typename T0::tag_type, typename mpl::plus<typename T0::value_type, typename T1::value_type>::type> type;
+    };
+};
+
+template<>
+struct minus_impl<boost::units::detail::dim_tag,boost::units::detail::dim_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        BOOST_STATIC_ASSERT((boost::is_same<typename T0::tag_type,typename T1::tag_type>::value == true));
+        typedef boost::units::dim<typename T0::tag_type, typename mpl::minus<typename T0::value_type, typename T1::value_type>::type> type;
+    };
+};
+
+template<>
+struct times_impl<boost::units::detail::dim_tag,boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef boost::units::dim<typename T0::tag_type, typename mpl::times<typename T0::value_type, T1>::type> type;
+    };
+};
+
+template<>
+struct times_impl<boost::units::detail::static_rational_tag,boost::units::detail::dim_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef boost::units::dim<typename T1::tag_type, typename mpl::times<T0, typename T1::value_type>::type> type;
+    };
+};
+
+template<>
+struct divides_impl<boost::units::detail::dim_tag,boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef boost::units::dim<typename T0::tag_type, typename mpl::divides<typename T0::value_type, T1>::type> type;
+    };
+};
+
+template<>
+struct divides_impl<boost::units::detail::static_rational_tag,boost::units::detail::dim_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef boost::units::dim<typename T1::tag_type, typename mpl::divides<T0, typename T1::value_type>::type> type;
+    };
+};
+
+template<>
+struct negate_impl<boost::units::detail::dim_tag>
+{
+    template<class T0>
+    struct apply
+    {
+        typedef boost::units::dim<typename T0::tag_type,typename mpl::negate<typename T0::value_type>::type> type;
+    };
+};
+
+} // namespace mpl
+
+} // namespace boost
+
+#endif
+
+#endif // BOOST_UNITS_DIM_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/dimension.hpp b/deal.II/contrib/boost/include/boost/units/dimension.hpp
new file mode 100644 (file)
index 0000000..90334a1
--- /dev/null
@@ -0,0 +1,150 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DIMENSION_HPP
+#define BOOST_UNITS_DIMENSION_HPP
+
+#include <boost/static_assert.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/mpl/arithmetic.hpp>
+
+#include <boost/units/static_rational.hpp>
+#include <boost/units/detail/dimension_list.hpp>
+#include <boost/units/detail/dimension_impl.hpp>
+
+/// \file 
+/// \brief Core metaprogramming utilities for compile-time dimensional analysis.
+
+namespace boost {
+
+namespace units {
+
+/// Reduce dimension list to cardinal form. This algorithm collapses duplicate
+/// base dimension tags and sorts the resulting list by the tag ordinal value.
+/// Dimension lists that resolve to the same dimension are guaranteed to be  
+/// represented by an identical type.
+///
+/// The argument should be an MPL forward sequence containing instances
+/// of the @c dim template.
+///
+/// The result is also an MPL forward sequence.  It also supports the
+/// following metafunctions to allow use as a dimension.
+///
+///    - @c mpl::plus is defined only on two equal dimensions and returns the argument unchanged.
+///    - @c mpl::minus is defined only for two equal dimensions and returns the argument unchanged.
+///    - @c mpl::negate will return its argument unchanged.
+///    - @c mpl::times is defined for any dimensions and adds corresponding exponents.
+///    - @c mpl::divides is defined for any dimensions and subtracts the exponents of the
+///         right had argument from the corresponding exponents of the left had argument.
+///         Missing base dimension tags are assumed to have an exponent of zero.
+///    - @c static_power takes a dimension and a static_rational and multiplies all
+///         the exponents of the dimension by the static_rational.
+///    - @c static_root takes a dimension and a static_rational and divides all
+///         the exponents of the dimension by the static_rational.
+template<typename Seq>
+struct make_dimension_list
+{
+    typedef typename detail::sort_dims<Seq>::type type;
+};
+
+/// Raise a dimension list to a scalar power.
+template<typename DL,typename Ex> 
+struct static_power
+{
+    typedef typename detail::static_power_impl<DL::size::value>::template apply<
+        DL,
+        Ex
+    >::type type;    
+};
+
+/// Take a scalar root of a dimension list.
+template<typename DL,typename Rt> 
+struct static_root
+{
+    typedef typename detail::static_root_impl<DL::size::value>::template apply<
+        DL,
+        Rt
+    >::type type;    
+};
+
+} // namespace units
+
+#ifndef BOOST_UNITS_DOXYGEN
+
+namespace mpl {
+
+template<>
+struct plus_impl<boost::units::detail::dimension_list_tag,boost::units::detail::dimension_list_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        BOOST_STATIC_ASSERT((boost::is_same<T0,T1>::value == true));
+        typedef T0 type;
+    };
+};
+
+template<>
+struct minus_impl<boost::units::detail::dimension_list_tag,boost::units::detail::dimension_list_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        BOOST_STATIC_ASSERT((boost::is_same<T0,T1>::value == true));
+        typedef T0 type;
+    };
+};
+
+template<>
+struct times_impl<boost::units::detail::dimension_list_tag,boost::units::detail::dimension_list_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef typename boost::units::detail::merge_dimensions<T0,T1>::type type;
+    };
+};
+
+template<>
+struct divides_impl<boost::units::detail::dimension_list_tag,boost::units::detail::dimension_list_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef typename boost::units::detail::merge_dimensions<
+            T0,
+            typename boost::units::detail::static_inverse_impl<
+                T1::size::value
+            >::template apply<
+                T1
+            >::type
+        >::type type;
+    };
+};
+
+template<>
+struct negate_impl<boost::units::detail::dimension_list_tag>
+{
+    template<class T0>
+    struct apply
+    {
+        typedef T0 type;
+    };
+};
+
+} // namespace mpl
+
+#endif
+
+} // namespace boost
+
+#endif // BOOST_UNITS_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/dimensionless_quantity.hpp b/deal.II/contrib/boost/include/boost/units/dimensionless_quantity.hpp
new file mode 100644 (file)
index 0000000..1d39296
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DIMENSIONLESS_QUANTITY_HPP
+#define BOOST_UNITS_DIMENSIONLESS_QUANTITY_HPP
+
+#include <boost/units/dimensionless_unit.hpp>
+#include <boost/units/quantity.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// utility class to simplify construction of dimensionless quantities
+template<class System,class Y>
+struct dimensionless_quantity
+{
+    typedef quantity<typename dimensionless_unit<System>::type,Y>   type;
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_DIMENSIONLESS_QUANTITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/dimensionless_type.hpp b/deal.II/contrib/boost/include/boost/units/dimensionless_type.hpp
new file mode 100644 (file)
index 0000000..ba8230a
--- /dev/null
@@ -0,0 +1,50 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DIMENSIONLESS_TYPE_HPP
+#define BOOST_UNITS_DIMENSIONLESS_TYPE_HPP
+
+#include <boost/mpl/long.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/arithmetic.hpp>
+
+#include <boost/units/config.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+struct dimension_list_tag;
+
+}
+
+/// Dimension lists in which all exponents resolve to zero reduce to @c dimensionless_type.
+struct dimensionless_type
+{
+    typedef dimensionless_type          type;
+    typedef detail::dimension_list_tag  tag;
+    typedef mpl::long_<0>               size;
+};
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::dimensionless_type)
+
+#endif
+
+#endif // BOOST_UNITS_DIMENSIONLESS_TYPE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/dimensionless_unit.hpp b/deal.II/contrib/boost/include/boost/units/dimensionless_unit.hpp
new file mode 100644 (file)
index 0000000..448e9d3
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DIMENSIONLESS_UNIT_HPP
+#define BOOST_UNITS_DIMENSIONLESS_UNIT_HPP
+
+#include <boost/units/dimensionless_type.hpp>
+#include <boost/units/unit.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// utility class to simplify construction of dimensionless units in a system
+template<class System>
+struct dimensionless_unit
+{
+    typedef unit<dimensionless_type,System> type;
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_DIMENSIONLESS_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/get_dimension.hpp b/deal.II/contrib/boost/include/boost/units/get_dimension.hpp
new file mode 100644 (file)
index 0000000..e057f79
--- /dev/null
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_GET_DIMENSION_HPP
+#define BOOST_UNITS_GET_DIMENSION_HPP
+
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+template<class T>
+struct get_dimension {};
+
+/// get the dimension of a unit
+template<class Dim,class System>
+struct get_dimension< unit<Dim,System> >
+{
+    typedef Dim type;
+};
+
+/// get the dimension of an absolute unit
+template<class Unit>
+struct get_dimension< absolute<Unit> >
+{
+    typedef typename get_dimension<Unit>::type  type;
+};
+
+/// get the dimension of a quantity
+template<class Unit,class Y>
+struct get_dimension< quantity<Unit,Y> >
+{
+    typedef typename get_dimension<Unit>::type  type;
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_GET_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/get_system.hpp b/deal.II/contrib/boost/include/boost/units/get_system.hpp
new file mode 100644 (file)
index 0000000..9e5bd5e
--- /dev/null
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_GET_SYSTEM_HPP
+#define BOOST_UNITS_GET_SYSTEM_HPP
+
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+template<class T>
+struct get_system {};
+
+/// get the system of a unit
+template<class Dim,class System>
+struct get_system< unit<Dim,System> >
+{
+    typedef System type;
+};
+
+/// get the system of an absolute unit
+template<class Unit>
+struct get_system< absolute<Unit> >
+{
+    typedef typename get_system<Unit>::type type;
+};
+
+/// get the system of a quantity
+template<class Unit,class Y>
+struct get_system< quantity<Unit,Y> >
+{
+    typedef typename get_system<Unit>::type     type;
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_GET_SYSTEM_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/heterogeneous_system.hpp b/deal.II/contrib/boost/include/boost/units/heterogeneous_system.hpp
new file mode 100644 (file)
index 0000000..57ed820
--- /dev/null
@@ -0,0 +1,425 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_HETEROGENEOUS_SYSTEM_HPP
+#define BOOST_UNITS_HETEROGENEOUS_SYSTEM_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/times.hpp>
+#include <boost/mpl/divides.hpp>
+#include <boost/mpl/negate.hpp>
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/begin.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/pop_front.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/units/config.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/dimension.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/detail/push_front_if.hpp>
+#include <boost/units/detail/push_front_or_add.hpp>
+#include <boost/units/detail/linear_algebra.hpp>
+#include <boost/units/detail/unscale.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+// A normal system is a sorted list of base units.
+// A heterogeneous system is a sorted list of base unit/exponent pairs.
+// As long as we don't need to convert heterogeneous systems
+// directly everything is cool
+
+template<class T>
+struct is_zero : mpl::false_ {};
+
+template<>
+struct is_zero<static_rational<0> > : mpl::true_ {};
+
+} // namespace detail
+
+/// INTERNAL ONLY
+template<class L, class Dimensions, class Scale>
+struct heterogeneous_system_impl
+{
+    typedef L type;
+    typedef Dimensions dimensions;
+    typedef Scale scale;
+};
+
+/// INTERNAL ONLY
+typedef dimensionless_type no_scale;
+
+/// A system that can represent any possible combination
+/// of units at the expense of not preserving information
+/// about how it was created.  Do not create specializations
+/// of this template directly. Instead use @c reduce_unit and
+/// @c base_unit<...>::unit_type.
+template<class T>
+struct heterogeneous_system : T {};
+
+/// INTERNAL ONLY
+struct heterogeneous_system_dim_tag {};
+
+/// INTERNAL ONLY
+template<class Unit, class Exponent>
+struct heterogeneous_system_dim
+{
+    typedef heterogeneous_system_dim_tag tag;
+    typedef heterogeneous_system_dim type;
+    typedef Unit tag_type;
+    typedef Exponent value_type;
+};
+
+/// INTERNAL ONLY
+#define BOOST_UNITS_MAKE_HETEROGENEOUS_UNIT(BaseUnit, Dimensions)   \
+    boost::units::unit<                                             \
+        Dimensions,                                                 \
+        boost::units::heterogeneous_system<                         \
+            boost::units::heterogeneous_system_impl<                \
+                boost::units::list<                       \
+                    boost::units::heterogeneous_system_dim<         \
+                        BaseUnit,                                   \
+                        boost::units::static_rational<1>            \
+                    >,                                              \
+                    boost::units::dimensionless_type                \
+                >,                                                  \
+                Dimensions,                                         \
+                boost::units::no_scale                              \
+            >                                                       \
+        >                                                           \
+    >
+
+} // namespace units
+
+} // namespace boost
+
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::heterogeneous_system_impl, (class)(class)(class))
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::heterogeneous_system, (class))
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::heterogeneous_system_dim, (class)(class))
+
+#endif
+
+namespace boost {
+
+namespace mpl {
+
+/// INTERNAL ONLY
+template<>
+struct less_impl<boost::units::heterogeneous_system_dim_tag, boost::units::heterogeneous_system_dim_tag>
+{
+    template<class T0, class T1>
+    struct apply : mpl::less<typename T0::tag_type, typename T1::tag_type> {};
+};
+
+}
+
+namespace units {
+
+namespace detail {
+
+template<class Unit1, class Exponent1>
+struct is_empty_dim<heterogeneous_system_dim<Unit1,Exponent1> > : detail::is_zero<Exponent1> {};
+
+} // namespace detail
+
+} // namespace units
+
+namespace mpl {
+
+/// INTERNAL ONLY
+template<>
+struct plus_impl<boost::units::heterogeneous_system_dim_tag, boost::units::heterogeneous_system_dim_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef boost::units::heterogeneous_system_dim<
+            typename T0::tag_type,
+            typename mpl::plus<typename T0::value_type,typename T1::value_type>::type
+        > type;
+    };
+};
+
+/// INTERNAL ONLY
+template<>
+struct times_impl<boost::units::heterogeneous_system_dim_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef boost::units::heterogeneous_system_dim<
+            typename T0::tag_type,
+            typename mpl::times<typename T0::value_type,T1>::type
+        > type;
+    };
+};
+
+/// INTERNAL ONLY
+template<>
+struct divides_impl<boost::units::heterogeneous_system_dim_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef boost::units::heterogeneous_system_dim<
+            typename T0::tag_type,
+            typename mpl::divides<typename T0::value_type,T1>::type
+        > type;
+    };
+};
+
+/// INTERNAL ONLY
+template<>
+struct negate_impl<boost::units::heterogeneous_system_dim_tag>
+{
+    template<class T>
+    struct apply
+    {
+        typedef boost::units::heterogeneous_system_dim<typename T::tag_type, typename mpl::negate<typename T::value_type>::type> type;
+    };
+};
+
+} // namespace mpl
+
+namespace units {
+
+namespace detail {
+
+template<int N>
+struct make_heterogeneous_system_impl
+{
+    template<class UnitsBegin, class ExponentsBegin>
+    struct apply
+    {
+        typedef typename push_front_if<!(is_zero<typename ExponentsBegin::item>::value)>::template apply<
+            typename make_heterogeneous_system_impl<N-1>::template apply<
+                typename UnitsBegin::next,
+                typename ExponentsBegin::next
+            >::type,
+            heterogeneous_system_dim<typename UnitsBegin::item, typename ExponentsBegin::item>
+        >::type type;
+    };
+};
+
+template<>
+struct make_heterogeneous_system_impl<0>
+{
+    template<class UnitsBegin, class ExponentsBegin>
+    struct apply
+    {
+        typedef dimensionless_type type;
+    };
+};
+
+template<class Dimensions, class System>
+struct make_heterogeneous_system
+{
+    typedef typename calculate_base_unit_exponents<typename System::type, Dimensions>::type exponents;
+    BOOST_MPL_ASSERT_MSG((!boost::is_same<exponents, inconsistent>::value), the_specified_dimension_is_not_representible_in_the_given_system, (types<Dimensions, System>));
+    typedef typename make_heterogeneous_system_impl<System::type::size::value>::template apply<
+        typename System::type,
+        exponents
+    >::type unit_list;
+    typedef heterogeneous_system<heterogeneous_system_impl<unit_list, Dimensions, no_scale> > type;
+};
+
+template<class Dimensions, class T>
+struct make_heterogeneous_system<Dimensions, heterogeneous_system<T> >
+{
+    typedef heterogeneous_system<T> type;
+};
+
+template<class T0, class T1>
+struct multiply_systems
+{
+    typedef heterogeneous_system<
+        heterogeneous_system_impl<
+            typename mpl::times<typename T0::type, typename T1::type>::type,
+            typename mpl::times<typename T0::dimensions, typename T1::dimensions>::type,
+            typename mpl::times<typename T0::scale, typename T1::scale>::type
+        >
+    > type;
+};
+
+template<class T0, class T1>
+struct divide_systems
+{
+    typedef heterogeneous_system<
+        heterogeneous_system_impl<
+            typename mpl::divides<typename T0::type, typename T1::type>::type,
+            typename mpl::divides<typename T0::dimensions, typename T1::dimensions>::type,
+            typename mpl::divides<typename T0::scale, typename T1::scale>::type
+        >
+    > type;
+};
+
+} // namespace detail
+
+/// INTERNAL ONLY
+template<class S, long N, long D>
+struct static_power<heterogeneous_system<S>, static_rational<N,D> >
+{
+    typedef heterogeneous_system<
+        heterogeneous_system_impl<
+            typename static_power<typename S::type, static_rational<N,D> >::type,
+            typename static_power<typename S::dimensions, static_rational<N,D> >::type,
+            typename static_power<typename S::scale, static_rational<N,D> >::type
+        >
+    > type;
+};
+
+/// INTERNAL ONLY
+template<class S, long N, long D>
+struct static_root<heterogeneous_system<S>, static_rational<N,D> >
+{
+    typedef heterogeneous_system<
+        heterogeneous_system_impl<
+            typename static_root<typename S::type, static_rational<N,D> >::type,
+            typename static_root<typename S::dimensions, static_rational<N,D> >::type,
+            typename static_root<typename S::scale, static_rational<N,D> >::type
+        >
+    > type;
+};
+
+namespace detail {
+
+template<int N>
+struct unscale_heterogeneous_system_impl
+{
+    template<class Begin>
+    struct apply
+    {
+        typedef typename push_front_or_add<
+            typename unscale_heterogeneous_system_impl<N-1>::template apply<
+                typename Begin::next
+            >::type,
+            typename unscale<typename Begin::item>::type
+        >::type type;
+    };
+};
+
+template<>
+struct unscale_heterogeneous_system_impl<0>
+{
+    template<class Begin>
+    struct apply
+    {
+        typedef dimensionless_type type;
+    };
+};
+
+} // namespace detail
+
+/// Unscale all the base units. e.g
+/// km s -> m s
+/// cm km -> m^2
+/// INTERNAL ONLY
+template<class T>
+struct unscale<heterogeneous_system<T> >
+{
+    typedef heterogeneous_system<
+        heterogeneous_system_impl<
+            typename detail::unscale_heterogeneous_system_impl<
+                T::type::size::value
+            >::template apply<
+                typename T::type
+            >::type,
+            typename T::dimensions,
+            no_scale
+        >
+    > type;
+};
+
+/// INTERNAL ONLY
+template<class Unit, class Exponent>
+struct unscale<heterogeneous_system_dim<Unit, Exponent> >
+{
+    typedef heterogeneous_system_dim<typename unscale<Unit>::type, Exponent> type;
+};
+
+namespace detail {
+
+template<int N>
+struct get_scale_list_of_heterogeneous_system_impl
+{
+    template<class Begin>
+    struct apply
+    {
+        typedef typename mpl::times<
+            typename get_scale_list_of_heterogeneous_system_impl<N-1>::template apply<
+                typename Begin::next
+            >::type,
+            typename get_scale_list<typename Begin::item>::type
+        >::type type;
+    };
+};
+
+template<>
+struct get_scale_list_of_heterogeneous_system_impl<0>
+{
+    template<class Begin>
+    struct apply
+    {
+        typedef dimensionless_type type;
+    };
+};
+
+} // namespace detail
+
+/// INTERNAL ONLY
+template<class T>
+struct get_scale_list<heterogeneous_system<T> >
+{
+    typedef typename mpl::times<
+        typename detail::get_scale_list_of_heterogeneous_system_impl<
+            T::type::size::value
+        >::template apply<typename T::type>::type,
+        typename T::scale
+    >::type type;
+};
+
+/// INTERNAL ONLY
+template<class Unit, class Exponent>
+struct get_scale_list<heterogeneous_system_dim<Unit, Exponent> >
+{
+    typedef typename static_power<typename get_scale_list<Unit>::type, Exponent>::type type;
+};
+
+namespace detail {
+
+template<class System, class Dimension>
+struct check_system : mpl::false_ {};
+
+template<class System, class Dimension, class Scale>
+struct check_system<heterogeneous_system<heterogeneous_system_impl<System, Dimension, Scale> >, Dimension> : mpl::true_ {};
+
+} // namespace detail
+
+} // namespace units
+
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/homogeneous_system.hpp b/deal.II/contrib/boost/include/boost/units/homogeneous_system.hpp
new file mode 100644 (file)
index 0000000..aa3b056
--- /dev/null
@@ -0,0 +1,105 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_HOMOGENEOUS_SYSTEM_HPP_INCLUDED
+#define BOOST_UNITS_HOMOGENEOUS_SYSTEM_HPP_INCLUDED
+
+#include <boost/mpl/bool.hpp>
+
+#include <boost/units/config.hpp>
+#include <boost/units/static_rational.hpp>
+
+#ifdef BOOST_UNITS_CHECK_HOMOGENEOUS_UNITS
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/not.hpp>
+
+#include <boost/units/detail/linear_algebra.hpp>
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+/// A system that can uniquely represent any unit
+/// which can be composed from a linearly independent set
+/// of base units.  It is safe to rebind a unit with
+/// such a system to different dimensions.
+///
+/// Do not construct this template directly.  Use
+/// make_system instead.
+template<class L>
+struct homogeneous_system {
+    /// INTERNAL ONLY
+    typedef L type;
+};
+
+template<class T, class E>
+struct static_power;
+
+template<class T, class R>
+struct static_root;
+
+/// INTERNAL ONLY
+template<class L, long N, long D>
+struct static_power<homogeneous_system<L>, static_rational<N,D> >
+{
+    typedef homogeneous_system<L> type;
+};
+
+/// INTERNAL ONLY
+template<class L, long N, long D>
+struct static_root<homogeneous_system<L>, static_rational<N,D> >
+{
+    typedef homogeneous_system<L> type;
+};
+
+namespace detail {
+
+template<class System, class Dimensions>
+struct check_system;
+
+#ifdef BOOST_UNITS_CHECK_HOMOGENEOUS_UNITS
+
+template<class L, class Dimensions>
+struct check_system<homogeneous_system<L>, Dimensions> :
+    boost::mpl::not_<
+        boost::is_same<
+            typename calculate_base_unit_exponents<
+                L,
+                Dimensions
+            >::type,
+            inconsistent
+        >
+    > {};
+
+#else
+
+template<class L, class Dimensions>
+struct check_system<homogeneous_system<L>, Dimensions> : mpl::true_ {};
+
+#endif
+
+} // namespace detail
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::homogeneous_system, (class))
+
+#endif
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/io.hpp b/deal.II/contrib/boost/include/boost/units/io.hpp
new file mode 100644 (file)
index 0000000..8ce1212
--- /dev/null
@@ -0,0 +1,619 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IO_HPP
+#define BOOST_UNITS_IO_HPP
+
+#include <cassert>
+#include <string>
+#include <iosfwd>
+#include <ios>
+#include <sstream>
+
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/begin.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/serialization/nvp.hpp>
+
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/heterogeneous_system.hpp>
+#include <boost/units/quantity.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/unit.hpp>
+#include <boost/units/detail/utility.hpp>
+
+namespace boost {
+
+namespace serialization {
+
+/// Boost Serialization library support for units.
+template<class Archive,class System,class Dim>
+inline void serialize(Archive& ar,boost::units::unit<Dim,System>&,const unsigned int /*version*/)
+{ }
+
+/// Boost Serialization library support for quantities.
+template<class Archive,class Unit,class Y>
+inline void serialize(Archive& ar,boost::units::quantity<Unit,Y>& q,const unsigned int /*version*/)
+{
+    ar & boost::serialization::make_nvp("value", units::quantity_cast<Y&>(q));
+}
+        
+} // namespace serialization
+
+namespace units {
+
+// get string representation of arbitrary type
+template<class T> std::string to_string(const T& t)
+{
+    std::stringstream sstr;
+    
+    sstr << t;
+    
+    return sstr.str();
+}
+
+// get string representation of integral-valued @c static_rational
+template<integer_type N> std::string to_string(const static_rational<N>&)
+{
+    return to_string(N);
+}
+
+// get string representation of @c static_rational
+template<integer_type N, integer_type D> std::string to_string(const static_rational<N,D>&)
+{
+    return '(' + to_string(N) + '/' + to_string(D) + ')';
+}
+
+/// Write @c static_rational to @c std::basic_ostream.
+template<class Char, class Traits, integer_type N, integer_type D>
+inline std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os,const static_rational<N,D>& r)
+{
+    os << to_string(r);
+    return os;
+}
+
+/// traits template for unit names
+template<class BaseUnit>
+struct base_unit_info
+{
+    /// The full name of the unit (returns BaseUnit::name() by default)
+    static std::string name()
+    {
+        return(BaseUnit::name());
+    }
+    
+    /// The symbol for the base unit (Returns BaseUnit::symbol() by default)
+    static std::string symbol()
+    {
+        return(BaseUnit::symbol());
+    }
+};
+
+enum format_mode 
+{
+    symbol_fmt = 0,     // default - reduces unit names to known symbols for both base and derived units
+    name_fmt,           // output full unit names for base and derived units
+    raw_fmt,            // output only symbols for base units 
+    typename_fmt        // output demangled typenames
+};
+
+namespace detail {
+
+template<bool>
+struct xalloc_key_holder 
+{
+    static int value;
+    static bool initialized;
+};
+
+template<bool b>
+int xalloc_key_holder<b>::value = 0;
+
+template<bool b>
+bool xalloc_key_holder<b>::initialized = 0;
+
+struct xalloc_key_initializer_t 
+{
+    xalloc_key_initializer_t() 
+    {
+        if (!xalloc_key_holder<true>::initialized) 
+        {
+            xalloc_key_holder<true>::value = std::ios_base::xalloc();
+            xalloc_key_holder<true>::initialized = true;
+        }
+    }
+};
+
+namespace /**/ {
+    
+xalloc_key_initializer_t xalloc_key_initializer;
+
+} // namespace
+
+} // namespace detail
+
+inline format_mode get_format(std::ios_base& ios) 
+{
+    return(static_cast<format_mode>(ios.iword(detail::xalloc_key_holder<true>::value)));
+}
+
+inline void set_format(std::ios_base& ios, format_mode new_mode) 
+{
+    ios.iword(detail::xalloc_key_holder<true>::value) = static_cast<long>(new_mode);
+}
+
+inline std::ios_base& typename_format(std::ios_base& ios) 
+{
+    (set_format)(ios, typename_fmt);
+    return(ios);
+}
+
+inline std::ios_base& raw_format(std::ios_base& ios) 
+{
+    (set_format)(ios, raw_fmt);
+    return(ios);
+}
+
+inline std::ios_base& symbol_format(std::ios_base& ios) 
+{
+    (set_format)(ios, symbol_fmt);
+    return(ios);
+}
+
+inline std::ios_base& name_format(std::ios_base& ios) 
+{
+    (set_format)(ios, name_fmt);
+    return(ios);
+}
+
+namespace detail {
+
+template<integer_type N, integer_type D>
+inline std::string exponent_string(const static_rational<N,D>& r)
+{
+    return '^' + to_string(r);
+}
+
+template<>
+inline std::string exponent_string(const static_rational<1>&)
+{
+    return "";
+}
+
+template<class T>
+inline std::string base_unit_symbol_string(const T&)
+{
+    return base_unit_info<typename T::tag_type>::symbol() + exponent_string(typename T::value_type());
+}
+
+template<class T>    
+inline std::string base_unit_name_string(const T&)
+{
+    return base_unit_info<typename T::tag_type>::name() + exponent_string(typename T::value_type());
+}
+
+// stringify with symbols
+template<int N>
+struct symbol_string_impl
+{
+    template<class Begin>
+    struct apply
+    {
+        typedef typename symbol_string_impl<N-1>::template apply<typename Begin::next> next;
+        static void value(std::string& str)
+        {
+            str += base_unit_symbol_string(typename Begin::item()) + ' ';
+            next::value(str);
+        }
+    };
+};
+
+template<>
+struct symbol_string_impl<1>
+{
+    template<class Begin>
+    struct apply
+    {
+        static void value(std::string& str)
+        {
+            str += base_unit_symbol_string(typename Begin::item());
+        };
+    };
+};
+
+template<>
+struct symbol_string_impl<0>
+{
+    template<class Begin>
+    struct apply
+    {
+        static void value(std::string& str)
+        {
+            // better shorthand for dimensionless?
+            str += "dimensionless";
+        }
+    };
+};
+
+template<int N>
+struct scale_symbol_string_impl 
+{
+    template<class Begin>
+    struct apply 
+    {
+        static void value(std::string& str) 
+        {
+            str += Begin::item::symbol();
+            scale_symbol_string_impl<N - 1>::template apply<typename Begin::next>::value(str);
+        }
+    };
+};
+
+template<>
+struct scale_symbol_string_impl<0>
+{
+    template<class Begin>
+    struct apply 
+    {
+        static void value(std::string&) { }
+    };
+};
+
+// stringify with names
+template<int N>
+struct name_string_impl
+{
+    template<class Begin>
+    struct apply
+    {
+        typedef typename name_string_impl<N-1>::template apply<typename Begin::next> next;
+        static void value(std::string& str)
+        {
+            str += base_unit_name_string(typename Begin::item()) + ' ';
+            next::value(str);
+        }
+    };
+};
+
+template<>
+struct name_string_impl<1>
+{
+    template<class Begin>
+    struct apply
+    {
+        static void value(std::string& str)
+        {
+            str += base_unit_name_string(typename Begin::item());
+        };
+    };
+};
+
+template<>
+struct name_string_impl<0>
+{
+    template<class Begin>
+    struct apply
+    {
+        static void value(std::string& str)
+        {
+            str += "dimensionless";
+        }
+    };
+};
+
+template<int N>
+struct scale_name_string_impl 
+{
+    template<class Begin>
+    struct apply 
+    {
+        static void value(std::string& str) 
+        {
+            str += Begin::item::name();
+            scale_name_string_impl<N - 1>::template apply<typename Begin::next>::value(str);
+        }
+    };
+};
+
+template<>
+struct scale_name_string_impl<0>
+{
+    template<class Begin>
+    struct apply 
+    {
+        static void value(std::string&) { }
+    };
+};
+
+} // namespace detail
+
+namespace detail {
+
+// These two overloads of symbol_string and name_string will
+// will pick up homogeneous_systems.  They simply call the
+// appropriate function with a heterogeneous_system.
+template<class Dimension,class System, class SubFormatter>
+inline std::string
+to_string_impl(const unit<Dimension,System>&, SubFormatter f)
+{
+    return f(typename reduce_unit<unit<Dimension, System> >::type());
+}
+
+/// INTERNAL ONLY
+// this overload picks up heterogeneous units that are not scaled.
+template<class Dimension,class Units, class Subformatter>
+inline std::string
+to_string_impl(const unit<Dimension, heterogeneous_system<heterogeneous_system_impl<Units, Dimension, dimensionless_type> > >&, Subformatter f)
+{
+    std::string str;
+    f.template append_units_to<Units>(str);
+    return(str);
+}
+
+// This overload is a special case for heterogeneous_system which
+// is really unitless
+/// INTERNAL ONLY
+template<class Subformatter>
+inline std::string
+to_string_impl(const unit<dimensionless_type, heterogeneous_system<heterogeneous_system_impl<dimensionless_type, dimensionless_type, dimensionless_type> > >&, Subformatter)
+{
+    return("dimensionless");
+}
+
+// this overload deals with heterogeneous_systems which are unitless
+// but scaled.
+/// INTERNAL ONLY
+template<class Scale, class Subformatter>
+inline std::string
+to_string_impl(const unit<dimensionless_type, heterogeneous_system<heterogeneous_system_impl<dimensionless_type, dimensionless_type, Scale> > >&, Subformatter f)
+{
+    std::string str;
+    f.template append_scale_to<Scale>(str);
+    return(str);
+}
+
+// this overload deals with scaled units.
+/// INTERNAL ONLY
+template<class Dimension,class Units,class Scale, class Subformatter>
+inline std::string
+to_string_impl(const unit<Dimension, heterogeneous_system<heterogeneous_system_impl<Units, Dimension, Scale> > >&, Subformatter f)
+{
+    std::string str;
+
+    f.template append_scale_to<Scale>(str);
+
+    std::string without_scale = f(unit<Dimension, heterogeneous_system<heterogeneous_system_impl<Units, Dimension, dimensionless_type> > >());
+    
+    if (f.is_default_string(without_scale, unit<Dimension, heterogeneous_system<heterogeneous_system_impl<Units, Dimension, dimensionless_type> > >()))
+    {
+        str += "(";
+        str += without_scale;
+        str += ")";
+    } 
+    else 
+    {
+        str += without_scale;
+    }
+
+    return(str);
+}
+
+// this overload catches scaled units that have a single base unit
+// raised to the first power.  It causes si::nano * si::meters to not
+// put parentheses around the meters.  i.e. nm rather than n(m)
+/// INTERNAL ONLY
+template<class Dimension,class Unit,class Scale, class Subformatter>
+inline std::string
+to_string_impl(const unit<Dimension, heterogeneous_system<heterogeneous_system_impl<list<heterogeneous_system_dim<Unit, static_rational<1> >,dimensionless_type>, Dimension, Scale> > >&, Subformatter f)
+{
+    std::string str;
+
+    f.template append_scale_to<Scale>(str);
+    str += f(unit<Dimension, heterogeneous_system<heterogeneous_system_impl<list<heterogeneous_system_dim<Unit, static_rational<1> >, dimensionless_type>, Dimension, dimensionless_type> > >());
+
+    return(str);
+}
+
+// this overload is necessary to disambiguate.
+// it catches units that are unscaled and have a single
+// base unit raised to the first power.  It is treated the
+// same as any other unscaled unit.
+/// INTERNAL ONLY
+template<class Dimension,class Unit,class Subformatter>
+inline std::string
+to_string_impl(const unit<Dimension, heterogeneous_system<heterogeneous_system_impl<list<heterogeneous_system_dim<Unit, static_rational<1> >,dimensionless_type>, Dimension, dimensionless_type> > >&, Subformatter f)
+{
+    std::string str;
+    f.template append_units_to<list<heterogeneous_system_dim<Unit, static_rational<1> >,dimensionless_type> >(str);
+    return(str);
+}
+
+
+// this overload catches scaled units that have a single scaled base unit
+// raised to the first power.  It moves that scaling on the base unit
+// to the unit level scaling and recurses.  By doing this we make sure that
+// si::milli * si::kilograms will print g rather than mkg
+//
+/// INTERNAL ONLY
+template<class Dimension,class Unit,class UnitScale, class Scale, class Subformatter>
+inline std::string
+to_string_impl(const unit<Dimension, heterogeneous_system<heterogeneous_system_impl<list<heterogeneous_system_dim<scaled_base_unit<Unit, UnitScale>, static_rational<1> >, dimensionless_type>, Dimension, Scale> > >&, Subformatter f)
+{
+    return(f(
+        unit<
+            Dimension,
+            heterogeneous_system<
+                heterogeneous_system_impl<
+                    list<heterogeneous_system_dim<Unit, static_rational<1> >, dimensionless_type>,
+                    Dimension,
+                    typename mpl::times<Scale, list<UnitScale, dimensionless_type> >::type
+                >
+            >
+        >()));
+}
+
+// this overload disambuguates between the overload for an unscaled unit
+// and the overload for a scaled base unit raised to the first power.
+/// INTERNAL ONLY
+template<class Dimension,class Unit,class UnitScale,class Subformatter>
+inline std::string
+to_string_impl(const unit<Dimension, heterogeneous_system<heterogeneous_system_impl<list<heterogeneous_system_dim<scaled_base_unit<Unit, UnitScale>, static_rational<1> >, dimensionless_type>, Dimension, dimensionless_type> > >&, Subformatter f)
+{
+    std::string str;
+    f.template append_units_to<list<heterogeneous_system_dim<scaled_base_unit<Unit, UnitScale>, static_rational<1> >, dimensionless_type> >(str);
+    return(str);
+}
+
+struct format_raw_symbol_impl {
+    template<class Units>
+    void append_units_to(std::string& str) {
+        detail::symbol_string_impl<Units::size::value>::template apply<Units>::value(str);
+    }
+    template<class Scale>
+    void append_scale_to(std::string& str) {
+        detail::scale_symbol_string_impl<Scale::size::value>::template apply<Scale>::value(str);
+    }
+    template<class Unit>
+    std::string operator()(const Unit& unit) {
+        return(to_string_impl(unit, *this));
+    }
+    template<class Unit>
+    bool is_default_string(const std::string&, const Unit&) {
+        return(true);
+    }
+};
+
+struct format_symbol_impl : format_raw_symbol_impl {
+    template<class Unit>
+    std::string operator()(const Unit& unit) {
+        return(symbol_string(unit));
+    }
+    template<class Unit>
+    bool is_default_string(const std::string& str, const Unit& unit) {
+        return(str == to_string_impl(unit, format_raw_symbol_impl()));
+    }
+};
+
+struct format_raw_name_impl {
+    template<class Units>
+    void append_units_to(std::string& str) {
+        detail::name_string_impl<(Units::size::value)>::template apply<Units>::value(str);
+    }
+    template<class Scale>
+    void append_scale_to(std::string& str) {
+        detail::scale_name_string_impl<Scale::size::value>::template apply<Scale>::value(str);
+    }
+    template<class Unit>
+    std::string operator()(const Unit& unit) {
+        return(to_string_impl(unit, *this));
+    }
+    template<class Unit>
+    bool is_default_string(const std::string&, const Unit&) {
+        return(true);
+    }
+};
+
+struct format_name_impl : format_raw_name_impl {
+    template<class Unit>
+    std::string operator()(const Unit& unit) {
+        return(name_string(unit));
+    }
+    template<class Unit>
+    bool is_default_string(const std::string& str, const Unit& unit) {
+        return(str == to_string_impl(unit, format_raw_name_impl()));
+    }
+};
+
+template<class Char, class Traits>
+inline void do_print(std::basic_ostream<Char, Traits>& os, const std::string& s) {
+    os << s.c_str();
+}
+
+inline void do_print(std::ostream& os, const std::string& s) {
+    os << s;
+}
+
+template<class Char, class Traits>
+inline void do_print(std::basic_ostream<Char, Traits>& os, const char* s) {
+    os << s;
+}
+
+} // namespace detail
+
+template<class Dimension,class System>
+inline std::string
+typename_string(const unit<Dimension, System>&)
+{
+    return simplify_typename(typename reduce_unit< unit<Dimension,System> >::type());
+}
+
+template<class Dimension,class System>
+inline std::string
+symbol_string(const unit<Dimension, System>&)
+{
+    return detail::to_string_impl(unit<Dimension,System>(), detail::format_symbol_impl());
+}
+
+template<class Dimension,class System>
+inline std::string
+name_string(const unit<Dimension, System>&)
+{
+    return detail::to_string_impl(unit<Dimension,System>(), detail::format_name_impl());
+}
+
+/// Print an @c unit as a list of base units and exponents
+///
+///     for @c symbol_format this gives e.g. "m s^-1" or "J"
+///     for @c name_format this gives e.g. "meter second^-1" or "joule"
+///     for @c raw_format this gives e.g. "m s^-1" or "meter kilogram^2 second^-2"
+///     for @c typename_format this gives the typename itself (currently demangled only on GCC)
+template<class Char, class Traits, class Dimension, class System>
+inline std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os, const unit<Dimension, System>& u)
+{
+    if (units::get_format(os) == typename_fmt) 
+    {
+        detail::do_print(os , typename_string(u));
+    }
+    else if (units::get_format(os) == raw_fmt) 
+    {
+        detail::do_print(os, detail::to_string_impl(u, detail::format_raw_symbol_impl()));
+    }
+    else if (units::get_format(os) == symbol_fmt) 
+    {
+        detail::do_print(os, symbol_string(u));
+    }
+    else if (units::get_format(os) == name_fmt) 
+    {
+        detail::do_print(os, name_string(u));
+    }
+    else 
+    {
+        assert(!"The format mode must be one of: typename_format, raw_format, name_format, symbol_format");
+    }
+    
+    return(os);
+}
+
+/// INTERNAL ONLY
+/// Print a @c quantity. Prints the value followed by the unit
+template<class Char, class Traits, class Unit, class T>
+inline std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os, const quantity<Unit, T>& q)
+{
+    os << q.value() << ' ' << Unit();
+    return(os);
+}
+
+} // namespace units
+
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/is_dim.hpp b/deal.II/contrib/boost/include/boost/units/is_dim.hpp
new file mode 100644 (file)
index 0000000..42297c5
--- /dev/null
@@ -0,0 +1,37 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IS_DIM_HPP
+#define BOOST_UNITS_IS_DIM_HPP
+
+#include <boost/mpl/bool.hpp>
+
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// Check that a type is a valid @c dim.
+template<typename T> 
+struct is_dim :
+    public mpl::false_
+{ };
+
+template<typename T,typename V>
+struct is_dim< dim<T,V> > :
+    public mpl::true_
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IS_DIM_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/is_dimension_list.hpp b/deal.II/contrib/boost/include/boost/units/is_dimension_list.hpp
new file mode 100644 (file)
index 0000000..47caaa0
--- /dev/null
@@ -0,0 +1,42 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IS_DIMENSION_LIST_HPP
+#define BOOST_UNITS_IS_DIMENSION_LIST_HPP
+
+#include <boost/mpl/bool.hpp>
+
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// Check that a type is a valid dimension list.
+template<typename Seq>
+struct is_dimension_list :
+    public mpl::false_
+{ };
+
+template<typename Item, typename Next>
+struct is_dimension_list<list<Item, Next> > :
+    public mpl::true_
+{ };
+
+template<>
+struct is_dimension_list<dimensionless_type> :
+    public mpl::true_
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IS_DIMENSION_LIST_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/is_dimensionless.hpp b/deal.II/contrib/boost/include/boost/units/is_dimensionless.hpp
new file mode 100644 (file)
index 0000000..60d1292
--- /dev/null
@@ -0,0 +1,42 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IS_DIMENSIONLESS_HPP
+#define BOOST_UNITS_IS_DIMENSIONLESS_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+template<class T>
+struct is_dimensionless :
+    public mpl::false_
+{ };
+
+/// check if a unit is dimensionless
+template<class System>
+struct is_dimensionless< unit<dimensionless_type,System> > :
+    public mpl::true_
+{ };
+
+/// check if a quantity is dimensionless
+template<class Unit,class Y>
+struct is_dimensionless< quantity<Unit,Y> > :
+    public is_dimensionless<Unit>
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IS_DIMENSIONLESS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/is_dimensionless_quantity.hpp b/deal.II/contrib/boost/include/boost/units/is_dimensionless_quantity.hpp
new file mode 100644 (file)
index 0000000..c946b0a
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IS_DIMENSIONLESS_QUANTITY_HPP
+#define BOOST_UNITS_IS_DIMENSIONLESS_QUANTITY_HPP
+
+#include <boost/units/is_quantity_of_dimension.hpp>
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// check that a type is a dimensionless quantity
+template<class T>
+struct is_dimensionless_quantity :
+    public is_quantity_of_dimension<T,dimensionless_type>
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IS_DIMENSIONLESS_QUANTITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/is_dimensionless_unit.hpp b/deal.II/contrib/boost/include/boost/units/is_dimensionless_unit.hpp
new file mode 100644 (file)
index 0000000..ce69a03
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP
+#define BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP
+
+#include <boost/units/is_unit_of_dimension.hpp>
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// check that a type is a dimensionless unit
+template<class T>
+struct is_dimensionless_unit :
+    public is_unit_of_dimension<T,dimensionless_type>
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IS_DIMENSIONLESS_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/is_quantity.hpp b/deal.II/contrib/boost/include/boost/units/is_quantity.hpp
new file mode 100644 (file)
index 0000000..6e09080
--- /dev/null
@@ -0,0 +1,37 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IS_QUANTITY_HPP
+#define BOOST_UNITS_IS_QUANTITY_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// check that a type is a quantity
+template<typename T>
+struct is_quantity :
+    public mpl::false_
+{ };
+
+template<class Unit,
+         class Y>
+struct is_quantity< quantity<Unit,Y> > : 
+    public mpl::true_
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IS_QUANTITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/is_quantity_of_dimension.hpp b/deal.II/contrib/boost/include/boost/units/is_quantity_of_dimension.hpp
new file mode 100644 (file)
index 0000000..3c8c002
--- /dev/null
@@ -0,0 +1,37 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP
+#define BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/is_unit_of_dimension.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// check that a type is a quantity of the specified dimension
+template<class T,class Dim>
+struct is_quantity_of_dimension :
+    public mpl::false_
+{ };
+
+template<class Unit,class Y,class Dim>
+struct is_quantity_of_dimension< quantity< Unit,Y>,Dim > :
+    public is_unit_of_dimension<Unit, Dim>
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IS_QUANTITY_OF_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/is_quantity_of_system.hpp b/deal.II/contrib/boost/include/boost/units/is_quantity_of_system.hpp
new file mode 100644 (file)
index 0000000..3f10255
--- /dev/null
@@ -0,0 +1,37 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IS_QUANTITY_OF_SYSTEM_HPP
+#define BOOST_UNITS_IS_QUANTITY_OF_SYSTEM_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/is_unit_of_system.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// check that a type is a quantity in a specified system
+template<class T,class System>
+struct is_quantity_of_system :
+    public mpl::false_
+{ };
+
+template<class Unit,class Y,class System>
+struct is_quantity_of_system< quantity< Unit,Y>,System > :
+    public is_unit_of_system<Unit, System>
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IS_QUANTITY_OF_SYSTEM_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/is_unit.hpp b/deal.II/contrib/boost/include/boost/units/is_unit.hpp
new file mode 100644 (file)
index 0000000..59fb99e
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IS_UNIT_HPP
+#define BOOST_UNITS_IS_UNIT_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// check that a type is a unit
+template<class T>
+struct is_unit : 
+    public mpl::false_
+{ };
+
+template<class Dim,class System>
+struct is_unit< unit<Dim,System> > :
+    public mpl::true_
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IS_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/is_unit_of_dimension.hpp b/deal.II/contrib/boost/include/boost/units/is_unit_of_dimension.hpp
new file mode 100644 (file)
index 0000000..0bc2147
--- /dev/null
@@ -0,0 +1,41 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IS_UNIT_OF_DIMENSION_HPP
+#define BOOST_UNITS_IS_UNIT_OF_DIMENSION_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// check that a type is a unit of the specified dimension
+template<class T,class Dim>
+struct is_unit_of_dimension :
+    public mpl::false_
+{ };
+
+template<class Dim,class System>
+struct is_unit_of_dimension< unit<Dim,System>,Dim > :
+    public mpl::true_
+{ };
+
+template<class Dim,class System>
+struct is_unit_of_dimension< absolute<unit<Dim,System> >,Dim > :
+    public mpl::true_
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IS_UNIT_OF_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/is_unit_of_system.hpp b/deal.II/contrib/boost/include/boost/units/is_unit_of_system.hpp
new file mode 100644 (file)
index 0000000..8bd7d64
--- /dev/null
@@ -0,0 +1,41 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IS_UNIT_OF_SYSTEM_HPP
+#define BOOST_UNITS_IS_UNIT_OF_SYSTEM_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// check that a type is a unit in a specified system
+template<class T,class System>
+struct is_unit_of_system :
+    public mpl::false_
+{ };
+    
+template<class Dim,class System>
+struct is_unit_of_system< unit<Dim,System>,System > :
+    public mpl::true_
+{ };
+    
+template<class Dim,class System>
+struct is_unit_of_system< absolute<unit<Dim,System> >,System > :
+    public mpl::true_
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IS_UNIT_OF_SYSTEM_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/lambda.hpp b/deal.II/contrib/boost/include/boost/units/lambda.hpp
new file mode 100644 (file)
index 0000000..9014cca
--- /dev/null
@@ -0,0 +1,593 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+// $Id: lambda.hpp 27 2008-06-16 14:50:58Z maehne $
+
+#ifndef BOOST_UNITS_LAMBDA_HPP
+#define BOOST_UNITS_LAMBDA_HPP
+
+
+////////////////////////////////////////////////////////////////////////
+///
+/// \file lambda.hpp
+///
+/// \brief Definitions to ease the usage of Boost.Units' quantity,
+///        unit, and absolute types in functors created with the
+///        Boost.Lambda library.
+///
+/// \author Torsten Maehne
+/// \date   2008-06-16
+///
+/// Boost.Lambda's return type deduction system is extented to make
+/// use of Boost.Units' typeof_helper trait classes for Boost.Units'
+/// quantity, absolute, and unit template classes.
+///
+////////////////////////////////////////////////////////////////////////
+
+
+#include <boost/lambda/lambda.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/detail/dimensionless_unit.hpp>
+#include <boost/units/operators.hpp>
+
+namespace boost {
+
+namespace lambda {
+
+    /// Partial specialization of return type trait for action
+    /// unit<Dim, System> * Y.
+    template<typename System, typename Dim, typename Y>
+    struct plain_return_type_2<arithmetic_action<multiply_action>,
+                               boost::units::unit<Dim, System>,
+                               Y > {
+        typedef typename boost::units::multiply_typeof_helper<
+            boost::units::unit<Dim, System>, Y >::type type;
+    };
+
+} // namespace lambda
+
+namespace units {
+
+    template<typename System, typename Dim, typename Arg>
+    struct multiply_typeof_helper<boost::units::unit<Dim, System>, boost::lambda::lambda_functor<Arg> > {
+        typedef boost::lambda::lambda_functor<
+          boost::lambda::lambda_functor_base<
+              boost::lambda::arithmetic_action<boost::lambda::multiply_action>,
+              tuple<typename boost::lambda::const_copy_argument<const boost::units::unit<Dim, System> >::type, boost::lambda::lambda_functor<Arg> >
+          >
+        > type;
+    };
+
+    /// Disambiguating overload for action
+    /// unit<Dim, System> * lambda_functor<Arg>
+    /// based on \<boost/lambda/detail/operators.hpp\>.
+    template<typename System, typename Dim, typename Arg>
+    inline const typename multiply_typeof_helper<boost::units::unit<Dim, System>, boost::lambda::lambda_functor<Arg> >::type
+    operator*(const boost::units::unit<Dim, System>& a,
+              const boost::lambda::lambda_functor<Arg>& b) {
+        return typename multiply_typeof_helper<boost::units::unit<Dim, System>, boost::lambda::lambda_functor<Arg> >::type::inherited
+               (tuple<typename boost::lambda::const_copy_argument<const boost::units::unit<Dim, System> >::type,
+                      boost::lambda::lambda_functor<Arg> >
+                     (a, b));
+    }
+
+} // namespace units
+
+namespace lambda {
+
+    /// Partial specialization of return type trait for action
+    /// unit<Dim, System> / Y.
+    template<typename System, typename Dim, typename Y>
+    struct plain_return_type_2<arithmetic_action<divide_action>,
+                               boost::units::unit<Dim, System>,
+                               Y > {
+        typedef typename boost::units::divide_typeof_helper<
+            boost::units::unit<Dim, System>, Y >::type type;
+    };
+
+} // namespace lambda
+
+namespace units {
+
+    template<typename System, typename Dim, typename Arg>
+    struct divide_typeof_helper<boost::units::unit<Dim, System>, boost::lambda::lambda_functor<Arg> > {
+        typedef boost::lambda::lambda_functor<
+          boost::lambda::lambda_functor_base<
+            boost::lambda::arithmetic_action<boost::lambda::divide_action>,
+              tuple<typename boost::lambda::const_copy_argument<const boost::units::unit<Dim, System> >::type, boost::lambda::lambda_functor<Arg> >
+          >
+        > type;
+    };
+
+    /// Disambiguating overload for action
+    /// unit<Dim, System> / lambda_functor<Arg>
+    /// based on \<boost/lambda/detail/operators.hpp\>.
+    template<typename System, typename Dim, typename Arg>
+    inline const typename divide_typeof_helper<boost::units::unit<Dim, System>, boost::lambda::lambda_functor<Arg> >::type
+    operator/(const boost::units::unit<Dim, System>& a,
+              const boost::lambda::lambda_functor<Arg>& b) {
+        return typename divide_typeof_helper<boost::units::unit<Dim, System>, boost::lambda::lambda_functor<Arg> >::type::inherited
+               (tuple<typename boost::lambda::const_copy_argument<const boost::units::unit<Dim, System> >::type,
+                      boost::lambda::lambda_functor<Arg> >
+                     (a, b));
+    }
+
+} // namespace units
+
+namespace lambda {
+
+    /// Partial specialization of return type trait for action
+    /// Y * unit<Dim, System>.
+    template<typename System, typename Dim, typename Y>
+    struct plain_return_type_2<arithmetic_action<multiply_action>,
+                               Y,
+                               boost::units::unit<Dim, System> > {
+        typedef typename boost::units::multiply_typeof_helper<
+            Y, boost::units::unit<Dim, System> >::type type;
+    };
+
+} // namespace lambda
+
+namespace units {
+
+    template<typename System, typename Dim, typename Arg>
+    struct multiply_typeof_helper<boost::lambda::lambda_functor<Arg>, boost::units::unit<Dim, System> > {
+        typedef boost::lambda::lambda_functor<
+          boost::lambda::lambda_functor_base<
+            boost::lambda::arithmetic_action<boost::lambda::multiply_action>,
+              tuple<boost::lambda::lambda_functor<Arg>, typename boost::lambda::const_copy_argument<const boost::units::unit<Dim, System> >::type>
+          >
+        > type;
+    };
+
+    /// Disambiguating overload for action
+    /// lambda_functor<Arg> * unit<Dim, System>
+    /// based on \<boost/lambda/detail/operators.hpp\>.
+    template<typename System, typename Dim, typename Arg>
+    inline const typename multiply_typeof_helper<boost::lambda::lambda_functor<Arg>, boost::units::unit<Dim, System> >::type
+    operator*(const boost::lambda::lambda_functor<Arg>& a,
+              const boost::units::unit<Dim, System>& b) {
+        return typename multiply_typeof_helper<boost::lambda::lambda_functor<Arg>, boost::units::unit<Dim, System> >::type::inherited
+               (tuple<boost::lambda::lambda_functor<Arg>,
+                      typename boost::lambda::const_copy_argument<const boost::units::unit<Dim, System> >::type>
+                     (a, b));
+    }
+
+} // namespace units
+
+namespace lambda {
+
+    /// Partial specialization of return type trait for action
+    /// Y / unit<Dim, System>.
+    template<typename System, typename Dim, typename Y>
+    struct plain_return_type_2<arithmetic_action<divide_action>,
+                               Y,
+                               boost::units::unit<Dim, System> > {
+        typedef typename boost::units::divide_typeof_helper<
+            Y, boost::units::unit<Dim, System> >::type type;
+    };
+
+} // namespace lambda
+
+namespace units {
+
+    template<typename System, typename Dim, typename Arg>
+    struct divide_typeof_helper<boost::lambda::lambda_functor<Arg>, boost::units::unit<Dim, System> > {
+        typedef boost::lambda::lambda_functor<
+          boost::lambda::lambda_functor_base<
+            boost::lambda::arithmetic_action<boost::lambda::divide_action>,
+              tuple<boost::lambda::lambda_functor<Arg>, typename boost::lambda::const_copy_argument<const boost::units::unit<Dim, System> >::type>
+          >
+        > type;
+    };
+
+    /// Disambiguating overload for action
+    /// lambda_functor<Arg> / unit<Dim, System>
+    /// based on \<boost/lambda/detail/operators.hpp\>.
+    template<typename System, typename Dim, typename Arg>
+    inline const typename divide_typeof_helper<boost::lambda::lambda_functor<Arg>, boost::units::unit<Dim, System> >::type
+    operator/(const boost::lambda::lambda_functor<Arg>& a,
+              const boost::units::unit<Dim, System>& b) {
+        return typename divide_typeof_helper<boost::lambda::lambda_functor<Arg>, boost::units::unit<Dim, System> >::type::inherited
+               (tuple<boost::lambda::lambda_functor<Arg>,
+                      typename boost::lambda::const_copy_argument<const boost::units::unit<Dim, System> >::type>
+                     (a, b));
+    }
+
+} // namespace units
+
+namespace lambda {
+
+    /// Partial specialization of return type trait for action
+    /// quantity<Unit, X> * X.
+    template<typename Unit, typename X>
+    struct plain_return_type_2<arithmetic_action<multiply_action>,
+                               boost::units::quantity<Unit, X>,
+                               X> {
+        typedef typename boost::units::multiply_typeof_helper<
+            boost::units::quantity<Unit, X>, X>::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// X * quantity<Unit, X>.
+    template<typename Unit, typename X>
+    struct plain_return_type_2<arithmetic_action<multiply_action>,
+                               X,
+                               boost::units::quantity<Unit, X> > {
+        typedef typename boost::units::multiply_typeof_helper<
+            X, boost::units::quantity<Unit, X> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// quantity<Unit, X> / X.
+    template<typename Unit, typename X>
+    struct plain_return_type_2<arithmetic_action<divide_action>,
+                               boost::units::quantity<Unit, X>,
+                               X> {
+        typedef typename boost::units::divide_typeof_helper<
+            boost::units::quantity<Unit, X>, X>::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// X / quantity<Unit, X>.
+    template<typename Unit, typename X>
+    struct plain_return_type_2<arithmetic_action<divide_action>,
+                               X,
+                               boost::units::quantity<Unit, X> > {
+        typedef typename boost::units::divide_typeof_helper<
+            X, boost::units::quantity<Unit, X> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// unit<Dim1, System1> * quantity<Unit2, Y>.
+    template<typename System1, typename Dim1, typename Unit2, typename Y>
+    struct plain_return_type_2<arithmetic_action<multiply_action>,
+                               boost::units::unit<Dim1, System1>,
+                               boost::units::quantity<Unit2, Y> > {
+        typedef typename boost::units::multiply_typeof_helper<
+            boost::units::unit<Dim1, System1>,
+            boost::units::quantity<Unit2, Y> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// unit<Dim1, System1> / quantity<Unit2, Y>.
+    template<typename System1, typename Dim1, typename Unit2, typename Y>
+    struct plain_return_type_2<arithmetic_action<divide_action>,
+                               boost::units::unit<Dim1, System1>,
+                               boost::units::quantity<Unit2, Y> > {
+        typedef typename boost::units::divide_typeof_helper<
+            boost::units::unit<Dim1, System1>,
+            boost::units::quantity<Unit2, Y> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// quantity<Unit1, Y> * unit<Dim2, System2>.
+    template<typename Unit1, typename Y, typename System2, typename Dim2>
+    struct plain_return_type_2<arithmetic_action<multiply_action>,
+                               boost::units::quantity<Unit1, Y>,
+                               boost::units::unit<Dim2, System2> > {
+        typedef typename boost::units::multiply_typeof_helper<
+            boost::units::quantity<Unit1, Y>,
+            boost::units::unit<Dim2, System2> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// quantity<Unit1, Y> / unit<Dim2, System2>.
+    template<typename Unit1, typename Y, typename System2, typename Dim2>
+    struct plain_return_type_2<arithmetic_action<divide_action>,
+                               boost::units::quantity<Unit1, Y>,
+                               boost::units::unit<Dim2, System2> > {
+        typedef typename boost::units::divide_typeof_helper<
+            boost::units::quantity<Unit1, Y>,
+            boost::units::unit<Dim2, System2> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// +quantity<Unit, Y>.
+    template<typename Unit, typename Y>
+    struct plain_return_type_1<unary_arithmetic_action<plus_action>,
+                               boost::units::quantity<Unit, Y> > {
+        typedef typename boost::units::unary_plus_typeof_helper<
+            boost::units::quantity<Unit, Y> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// -quantity<Unit, Y>.
+    template<typename Unit, typename Y>
+    struct plain_return_type_1<unary_arithmetic_action<minus_action>,
+                               boost::units::quantity<Unit, Y> > {
+        typedef typename boost::units::unary_minus_typeof_helper<
+            boost::units::quantity<Unit, Y> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// quantity<Unit1, X> + quantity<Unit2, Y>.
+    template<typename Unit1, typename X, typename Unit2, typename Y>
+    struct plain_return_type_2<arithmetic_action<plus_action>,
+                               boost::units::quantity<Unit1, X>,
+                               boost::units::quantity<Unit2, Y> > {
+        typedef typename boost::units::add_typeof_helper<
+            boost::units::quantity<Unit1, X>,
+            boost::units::quantity<Unit2, Y> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// quantity<dimensionless, X> + Y.
+    template<typename System, typename X, typename Y>
+    struct plain_return_type_2<arithmetic_action<plus_action>,
+                               boost::units::quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(System), X>,
+                               Y> {
+        typedef typename boost::units::add_typeof_helper<
+            boost::units::quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(System), X>,
+            Y>::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// X + quantity<dimensionless, Y>.
+    template<typename System, typename X, typename Y>
+    struct plain_return_type_2<arithmetic_action<plus_action>,
+                               X,
+                               boost::units::quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(System), Y> > {
+        typedef typename boost::units::add_typeof_helper<
+            X,
+            boost::units::quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(System), Y> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// quantity<Unit1, X> - quantity<Unit2, Y>.
+    template<typename Unit1, typename X, typename Unit2, typename Y>
+    struct plain_return_type_2<arithmetic_action<minus_action>,
+                               boost::units::quantity<Unit1, X>,
+                               boost::units::quantity<Unit2, Y> > {
+        typedef typename boost::units::subtract_typeof_helper<
+            boost::units::quantity<Unit1, X>,
+            boost::units::quantity<Unit2, Y> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// quantity<dimensionless, X> - Y.
+    template<typename System, typename X, typename Y>
+    struct plain_return_type_2<arithmetic_action<minus_action>,
+                               boost::units::quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(System), X>,
+                               Y> {
+        typedef typename boost::units::subtract_typeof_helper<
+            boost::units::quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(System), X>,
+            Y>::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// X - quantity<dimensionless, Y>.
+    template<typename System, typename X, typename Y>
+    struct plain_return_type_2<arithmetic_action<minus_action>,
+                               X,
+                               boost::units::quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(System), Y> > {
+        typedef typename boost::units::subtract_typeof_helper<
+            X,
+            boost::units::quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(System), Y> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// quantity<Unit1, X> * quantity<Unit2, Y>.
+    template<typename Unit1, typename X, typename Unit2, typename Y>
+    struct plain_return_type_2<arithmetic_action<multiply_action>,
+                               boost::units::quantity<Unit1, X>,
+                               boost::units::quantity<Unit2, Y> > {
+        typedef typename boost::units::multiply_typeof_helper<
+            boost::units::quantity<Unit1, X>,
+            boost::units::quantity<Unit2, Y> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// quantity<Unit1, X> / quantity<Unit2, Y>.
+    template<typename Unit1, typename X, typename Unit2, typename Y>
+    struct plain_return_type_2<arithmetic_action<divide_action>,
+                               boost::units::quantity<Unit1, X>,
+                               boost::units::quantity<Unit2, Y> > {
+        typedef typename boost::units::divide_typeof_helper<
+            boost::units::quantity<Unit1, X>,
+            boost::units::quantity<Unit2, Y> >::type type;
+    };
+
+
+    ////////////////////////////////////////////////////////////////////////
+    // Partial specialization of Boost.Lambda's trait classes for all
+    // operators overloaded in <boost/units/unit.hpp>
+    ////////////////////////////////////////////////////////////////////////
+
+    /// Partial specialization of return type trait for action
+    /// +unit<Dim, System>.
+    template<typename Dim, typename System>
+    struct plain_return_type_1<unary_arithmetic_action<plus_action>,
+                               boost::units::unit<Dim, System> > {
+        typedef typename boost::units::unary_plus_typeof_helper<
+            boost::units::unit<Dim, System> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// -unit<Dim, System>.
+    template<typename Dim, typename System>
+    struct plain_return_type_1<unary_arithmetic_action<minus_action>,
+                               boost::units::unit<Dim, System> > {
+        typedef typename boost::units::unary_minus_typeof_helper<
+            boost::units::unit<Dim, System> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// unit<Dim1, System1> + unit<Dim2, System2>.
+    template<typename Dim1, typename Dim2, typename System1, typename System2>
+    struct plain_return_type_2<arithmetic_action<plus_action>,
+                               boost::units::unit<Dim1, System1>,
+                               boost::units::unit<Dim2, System2> > {
+        typedef typename boost::units::add_typeof_helper<
+            boost::units::unit<Dim1, System1>,
+            boost::units::unit<Dim2, System2> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// unit<Dim1, System1> - unit<Dim2, System2>.
+    template<typename Dim1, typename Dim2, typename System1, typename System2>
+    struct plain_return_type_2<arithmetic_action<minus_action>,
+                               boost::units::unit<Dim1, System1>,
+                               boost::units::unit<Dim2, System2> > {
+        typedef typename boost::units::subtract_typeof_helper<
+            boost::units::unit<Dim1, System1>,
+            boost::units::unit<Dim2, System2> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// unit<Dim1, System1> * unit<Dim2, System2>.
+    template<typename Dim1, typename Dim2, typename System1, typename System2>
+    struct plain_return_type_2<arithmetic_action<multiply_action>,
+                               boost::units::unit<Dim1, System1>,
+                               boost::units::unit<Dim2, System2> > {
+        typedef typename boost::units::multiply_typeof_helper<
+            boost::units::unit<Dim1, System1>,
+            boost::units::unit<Dim2, System2> >::type type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// unit<Dim1, System1> / unit<Dim2, System2>.
+    template<typename Dim1, typename Dim2, typename System1, typename System2>
+    struct plain_return_type_2<arithmetic_action<divide_action>,
+                               boost::units::unit<Dim1, System1>,
+                               boost::units::unit<Dim2, System2> > {
+        typedef typename boost::units::divide_typeof_helper<
+            boost::units::unit<Dim1, System1>,
+            boost::units::unit<Dim2, System2> >::type type;
+    };
+
+
+    ////////////////////////////////////////////////////////////////////////
+    // Partial specialization of Boost.Lambda's trait classes for all
+    // operators overloaded in <boost/units/absolute.hpp>
+    ////////////////////////////////////////////////////////////////////////
+
+
+    /// Partial specialization of return type trait for action
+    /// absolute<Y> + Y.
+    template<typename Y>
+    struct plain_return_type_2<arithmetic_action<plus_action>,
+                               boost::units::absolute<Y>,
+                               Y> {
+        typedef typename boost::units::absolute<Y> type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// Y + absolute<Y>.
+    template<typename Y>
+    struct plain_return_type_2<arithmetic_action<plus_action>,
+                               Y,
+                               boost::units::absolute<Y> > {
+        typedef typename boost::units::absolute<Y> type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// absolute<Y> - Y.
+    template<typename Y>
+    struct plain_return_type_2<arithmetic_action<minus_action>,
+                               boost::units::absolute<Y>,
+                               Y> {
+        typedef typename boost::units::absolute<Y> type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// absolute<Y> - absolute<Y>.
+    template<typename Y>
+    struct plain_return_type_2<arithmetic_action<minus_action>,
+                               boost::units::absolute<Y>,
+                               boost::units::absolute<Y> > {
+        typedef Y type;
+    };
+
+    /// Partial specialization of return type trait for action
+    /// T * absolute<unit<D, S> >.
+    template<typename D, typename S, typename T>
+    struct plain_return_type_2<arithmetic_action<multiply_action>,
+                               T,
+                               boost::units::absolute<boost::units::unit<D, S> > > {
+        typedef typename boost::units::quantity<
+            boost::units::absolute<boost::units::unit<D, S> >, T> type;
+    };
+
+} // namespace lambda
+
+namespace units {
+    
+    template<typename System, typename Dim, typename Arg>
+    struct multiply_typeof_helper<boost::lambda::lambda_functor<Arg>, boost::units::absolute<boost::units::unit<Dim, System> > > {
+        typedef boost::lambda::lambda_functor<
+          boost::lambda::lambda_functor_base<
+            boost::lambda::arithmetic_action<boost::lambda::multiply_action>,
+              tuple<boost::lambda::lambda_functor<Arg>,
+                    typename boost::lambda::const_copy_argument<const boost::units::absolute<boost::units::unit<Dim, System> > >::type>
+          >
+        > type;
+    };
+
+    /// Disambiguating overload for action
+    /// lambda_functor<Arg> * absolute<unit<Dim, System> >
+    /// based on \<boost/lambda/detail/operators.hpp\>.
+    template<typename System, typename Dim, typename Arg>
+    inline const typename multiply_typeof_helper<boost::lambda::lambda_functor<Arg>, boost::units::absolute<boost::units::unit<Dim, System> > >::type
+    operator*(const boost::lambda::lambda_functor<Arg>& a,
+              const boost::units::absolute<boost::units::unit<Dim, System> >& b) {
+        return typename multiply_typeof_helper<boost::lambda::lambda_functor<Arg>, boost::units::absolute<boost::units::unit<Dim, System> > >::type::inherited
+               (tuple<boost::lambda::lambda_functor<Arg>,
+                      typename boost::lambda::const_copy_argument<const boost::units::absolute<boost::units::unit<Dim, System> > >::type>
+                     (a, b));
+    }
+
+} // namespace units
+
+namespace lambda {
+
+    /// Partial specialization of return type trait for action
+    /// absolute<unit<D, S> > * T.
+    template<typename D, typename S, typename T>
+    struct plain_return_type_2<arithmetic_action<multiply_action>,
+                               boost::units::absolute<boost::units::unit<D, S> >,
+                               T> {
+        typedef typename boost::units::quantity<
+            boost::units::absolute<boost::units::unit<D, S> >, T> type;
+    };
+
+} // namespace lambda
+
+namespace units {
+    
+    template<typename System, typename Dim, typename Arg>
+    struct multiply_typeof_helper<boost::units::absolute<boost::units::unit<Dim, System> >, boost::lambda::lambda_functor<Arg> > {
+        typedef boost::lambda::lambda_functor<
+          boost::lambda::lambda_functor_base<
+            boost::lambda::arithmetic_action<boost::lambda::multiply_action>,
+              tuple<typename boost::lambda::const_copy_argument<const boost::units::absolute<boost::units::unit<Dim, System> > >::type,
+                    boost::lambda::lambda_functor<Arg> >
+          >
+        > type;
+    };
+
+    /// Disambiguating overload for action
+    /// absolute<unit<Dim, System> > * lambda_functor<Arg>
+    /// based on \<boost/lambda/detail/operators.hpp\>.
+    template<typename System, typename Dim, typename Arg>
+    inline const typename multiply_typeof_helper<boost::units::absolute<boost::units::unit<Dim, System> >, boost::lambda::lambda_functor<Arg> >::type
+    operator*(const boost::units::absolute<boost::units::unit<Dim, System> >& a,
+              const boost::lambda::lambda_functor<Arg>& b) {
+        return typename multiply_typeof_helper<boost::units::absolute<boost::units::unit<Dim, System> >, boost::lambda::lambda_functor<Arg> >::type::inherited
+               (tuple<typename boost::lambda::const_copy_argument<const boost::units::absolute<boost::units::unit<Dim, System> > >::type,
+                      boost::lambda::lambda_functor<Arg> >
+                     (a, b));
+    }
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_LAMBDA_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/limits.hpp b/deal.II/contrib/boost/include/boost/units/limits.hpp
new file mode 100644 (file)
index 0000000..d248774
--- /dev/null
@@ -0,0 +1,63 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+#ifndef BOOST_UNITS_LIMITS_HPP
+#define BOOST_UNITS_LIMITS_HPP
+
+#include <limits>
+
+#include <boost/units/units_fwd.hpp>
+
+namespace std {
+
+template<class Unit, class T>
+class numeric_limits< ::boost::units::quantity<Unit, T> >
+{
+    public:
+        typedef ::boost::units::quantity<Unit, T> quantity_type;
+        static const bool is_specialized = std::numeric_limits<T>::is_specialized;
+        static quantity_type (min)() { return(quantity_type::from_value((std::numeric_limits<T>::min)())); }
+        static quantity_type (max)() { return(quantity_type::from_value((std::numeric_limits<T>::max)())); }
+        static const int digits = std::numeric_limits<T>::digits;
+        static const int digits10 = std::numeric_limits<T>::digits10;
+        static const bool is_signed = std::numeric_limits<T>::is_signed;
+        static const bool is_integer = std::numeric_limits<T>::is_integer;
+        static const bool is_exact = std::numeric_limits<T>::is_exact;
+        static const int radix = std::numeric_limits<T>::radix;
+        static quantity_type epsilon()  { return(quantity_type::from_value(std::numeric_limits<T>::epsilon())); }
+        static quantity_type round_error()  { return(quantity_type::from_value(std::numeric_limits<T>::round_error())); }
+        static const int min_exponent = std::numeric_limits<T>::min_exponent;
+        static const int min_exponent10 = std::numeric_limits<T>::min_exponent10;
+        static const int max_exponent = std::numeric_limits<T>::max_exponent;
+        static const int max_exponent10 = std::numeric_limits<T>::max_exponent10;
+        static const bool has_infinity = std::numeric_limits<T>::has_infinity;
+        static const bool has_quiet_NaN = std::numeric_limits<T>::has_quiet_NaN;
+        static const bool has_signaling_NaN = std::numeric_limits<T>::has_signaling_NaN;
+        static const bool has_denorm_loss = std::numeric_limits<T>::has_denorm_loss;
+        static quantity_type infinity()  { return(quantity_type::from_value(std::numeric_limits<T>::infinity())); }
+        static quantity_type quiet_NaN()  { return(quantity_type::from_value(std::numeric_limits<T>::quiet_NaN())); }
+        static quantity_type signaling_NaN()  { return(quantity_type::from_value(std::numeric_limits<T>::signaling_NaN())); }
+        static quantity_type denorm_min()  { return(quantity_type::from_value(std::numeric_limits<T>::denorm_min())); }
+        static const bool is_iec559 = std::numeric_limits<T>::is_iec559;
+        static const bool is_bounded = std::numeric_limits<T>::is_bounded;
+        static const bool is_modulo = std::numeric_limits<T>::is_modulo;
+        static const bool traps = std::numeric_limits<T>::traps;
+        static const bool tinyness_before = std::numeric_limits<T>::tinyness_before;
+#if defined(_STLP_STATIC_CONST_INIT_BUG)
+        static const int has_denorm = std::numeric_limits<T>::has_denorm;
+        static const int round_style = std::numeric_limits<T>::round_style;
+#else
+        static const float_denorm_style has_denorm = std::numeric_limits<T>::has_denorm;
+        static const float_round_style round_style = std::numeric_limits<T>::round_style;
+#endif
+};
+
+}
+
+#endif // BOOST_UNITS_LIMITS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/make_scaled_unit.hpp b/deal.II/contrib/boost/include/boost/units/make_scaled_unit.hpp
new file mode 100644 (file)
index 0000000..084b362
--- /dev/null
@@ -0,0 +1,45 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_MAKE_SCALED_UNIT_HPP_INCLUDED
+#define BOOST_UNITS_MAKE_SCALED_UNIT_HPP_INCLUDED
+
+#include <boost/units/heterogeneous_system.hpp>
+#include <boost/units/unit.hpp>
+
+namespace boost {
+namespace units {
+
+template<class Unit, class Scale>
+struct make_scaled_unit {
+    typedef typename make_scaled_unit<typename reduce_unit<Unit>::type, Scale>::type type;
+};
+
+template<class Dimension, class UnitList, class OldScale, class Scale>
+struct make_scaled_unit<unit<Dimension, heterogeneous_system<heterogeneous_system_impl<UnitList, Dimension, OldScale> > >, Scale> {
+    typedef unit<
+        Dimension,
+        heterogeneous_system<
+            heterogeneous_system_impl<
+                UnitList,
+                Dimension,
+                typename mpl::times<
+                    OldScale,
+                    list<scale_list_dim<Scale>, dimensionless_type>
+                >::type
+            >
+        >
+    > type;
+};
+
+}
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/make_system.hpp b/deal.II/contrib/boost/include/boost/units/make_system.hpp
new file mode 100644 (file)
index 0000000..444ae22
--- /dev/null
@@ -0,0 +1,135 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_MAKE_SYSTEM_HPP
+#define BOOST_UNITS_MAKE_SYSTEM_HPP
+
+#include <boost/units/config.hpp>
+#include <boost/units/dimensionless_type.hpp>
+#include <boost/units/homogeneous_system.hpp>
+#include <boost/units/detail/dimension_list.hpp>
+#include <boost/units/detail/sort.hpp>
+
+namespace boost {
+
+namespace units {
+
+#ifdef BOOST_UNITS_DOXYGEN
+
+namespace detail {
+
+struct unspecified {};
+
+}
+
+/// Metafunction returning a homogeneous system that can
+/// represent any combination of the base units.  There must
+/// be no way to represent any of the base units in terms
+/// of the others.  make_system<foot_base_unit, meter_base_unit>::type
+/// is not allowed, for example.
+template<class BaseUnit0, class BaseUnit1, class BaseUnit2, ..., class BaseUnitN>
+struct make_system
+{
+    typedef homogeneous_system<detail::unspecified> type;
+};
+
+#else
+
+struct na {};
+
+template<
+    class U0 = na,
+    class U1 = na,
+    class U2 = na,
+    class U3 = na,
+    class U4 = na,
+    class U5 = na,
+    class U6 = na,
+    class U7 = na,
+    class U8 = na,
+    class U9 = na
+>
+struct make_system;
+
+template<>
+struct make_system<>
+{
+    typedef homogeneous_system<dimensionless_type> type;
+};
+
+// Codewarrior 9.2 doesn't like using the defaults.  Need
+// to specify na explicitly.
+template<class T0>
+struct make_system<T0, na, na, na, na, na, na, na, na, na>
+{
+    typedef homogeneous_system<list<T0, dimensionless_type> > type;
+};
+
+template<class T0, class T1>
+struct make_system<T0, T1, na, na, na, na, na, na, na, na>
+{
+    typedef homogeneous_system<typename detail::insertion_sort<list<T0, list<T1, dimensionless_type> > >::type> type;
+};
+
+template<class T0, class T1, class T2>
+struct make_system<T0, T1, T2, na, na, na, na, na, na, na>
+{
+    typedef homogeneous_system<typename detail::insertion_sort<list<T0, list<T1, list<T2, dimensionless_type> > > >::type> type;
+};
+
+template<class T0, class T1, class T2, class T3>
+struct make_system<T0, T1, T2, T3, na, na, na, na, na, na>
+{
+    typedef homogeneous_system<typename detail::insertion_sort<list<T0, list<T1, list<T2, list<T3, dimensionless_type> > > > >::type> type;
+};
+
+template<class T0, class T1, class T2, class T3, class T4>
+struct make_system<T0, T1, T2, T3, T4, na, na, na, na, na>
+{
+    typedef homogeneous_system<typename detail::insertion_sort<list<T0, list<T1, list<T2, list<T3, list<T4, dimensionless_type> > > > > >::type> type;
+};
+
+template<class T0, class T1, class T2, class T3, class T4, class T5>
+struct make_system<T0, T1, T2, T3, T4, T5, na, na, na, na>
+{
+    typedef homogeneous_system<typename detail::insertion_sort<list<T0, list<T1, list<T2, list<T3, list<T4, list<T5, dimensionless_type> > > > > > >::type> type;
+};
+
+template<class T0, class T1, class T2, class T3, class T4, class T5, class T6>
+struct make_system<T0, T1, T2, T3, T4, T5, T6, na, na, na>
+{
+    typedef homogeneous_system<typename detail::insertion_sort<list<T0, list<T1, list<T2, list<T3, list<T4, list<T5, list<T6, dimensionless_type> > > > > > > >::type> type;
+};
+
+template<class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7>
+struct make_system<T0, T1, T2, T3, T4, T5, T6, T7, na, na>
+{
+    typedef homogeneous_system<typename detail::insertion_sort<list<T0, list<T1, list<T2, list<T3, list<T4, list<T5, list<T6, list<T7, dimensionless_type> > > > > > > > >::type> type;
+};
+
+template<class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8>
+struct make_system<T0, T1, T2, T3, T4, T5, T6, T7, T8, na>
+{
+    typedef homogeneous_system<typename detail::insertion_sort<list<T0, list<T1, list<T2, list<T3, list<T4, list<T5, list<T6, list<T7, list<T8, dimensionless_type> > > > > > > > > >::type> type;
+};
+
+template<class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7, class T8, class T9>
+struct make_system
+{
+    typedef homogeneous_system<typename detail::insertion_sort<list<T0, list<T1, list<T2, list<T3, list<T4, list<T5, list<T6, list<T7, list<T8, list<T9, dimensionless_type> > > > > > > > > > >::type> type;
+};
+
+#endif
+
+} // namespace units
+
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/operators.hpp b/deal.II/contrib/boost/include/boost/units/operators.hpp
new file mode 100644 (file)
index 0000000..c162610
--- /dev/null
@@ -0,0 +1,163 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_OPERATORS_HPP 
+#define BOOST_UNITS_OPERATORS_HPP
+
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/units/config.hpp>
+
+/// \file 
+/// \brief Compile time operators and typeof helper classes.
+///
+/// \detailed 
+/// These operators declare the compile-time operators needed to support dimensional
+/// analysis algebra.  They require the use of Boost.Typeof.
+/// Typeof helper classes define result type for heterogeneous operators on value types. 
+/// These must be defined through specialization for powers and roots.
+
+namespace boost {
+
+namespace units {
+
+#if BOOST_UNITS_HAS_TYPEOF
+
+#ifndef BOOST_UNITS_DOXYGEN
+
+// to avoid need for default constructor and eliminate divide by zero errors
+namespace typeof_ {
+
+/// INTERNAL ONLY
+template<class T> T make();
+
+} // namespace typeof_
+
+#endif
+
+#if (BOOST_UNITS_HAS_BOOST_TYPEOF)
+
+template<typename X> struct unary_plus_typeof_helper            
+{
+    BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (+typeof_::make<X>()))
+    typedef typename nested::type type;
+};
+
+template<typename X> struct unary_minus_typeof_helper           
+{
+    BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (-typeof_::make<X>()))
+    typedef typename nested::type type;
+};
+
+template<typename X,typename Y> struct add_typeof_helper        
+{
+    BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (typeof_::make<X>()+typeof_::make<Y>()))
+    typedef typename nested::type type;
+};
+
+template<typename X,typename Y> struct subtract_typeof_helper   
+{
+    BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (typeof_::make<X>()-typeof_::make<Y>()))
+    typedef typename nested::type type;
+};
+
+template<typename X,typename Y> struct multiply_typeof_helper   
+{
+    BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (typeof_::make<X>()*typeof_::make<Y>()))
+    typedef typename nested::type type;
+};
+
+template<typename X,typename Y> struct divide_typeof_helper     
+{
+    BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, (typeof_::make<X>()/typeof_::make<Y>()))
+    typedef typename nested::type type;
+};
+
+#elif (BOOST_UNITS_HAS_MWERKS_TYPEOF)
+
+template<typename X> struct unary_plus_typeof_helper            { typedef __typeof__((+typeof_::make<X>())) type; };
+template<typename X> struct unary_minus_typeof_helper           { typedef __typeof__((-typeof_::make<X>())) type; };
+
+template<typename X,typename Y> struct add_typeof_helper        { typedef __typeof__((typeof_::make<X>()+typeof_::make<Y>())) type; };
+template<typename X,typename Y> struct subtract_typeof_helper   { typedef __typeof__((typeof_::make<X>()-typeof_::make<Y>())) type; };
+template<typename X,typename Y> struct multiply_typeof_helper   { typedef __typeof__((typeof_::make<X>()*typeof_::make<Y>())) type; };
+template<typename X,typename Y> struct divide_typeof_helper     { typedef __typeof__((typeof_::make<X>()/typeof_::make<Y>())) type; };
+
+#elif (BOOST_UNITS_HAS_GNU_TYPEOF) || defined(BOOST_UNITS_DOXYGEN)
+
+template<typename X> struct unary_plus_typeof_helper            { typedef typeof((+typeof_::make<X>())) type; };
+template<typename X> struct unary_minus_typeof_helper           { typedef typeof((-typeof_::make<X>())) type; };
+
+template<typename X,typename Y> struct add_typeof_helper        { typedef typeof((typeof_::make<X>()+typeof_::make<Y>())) type; };
+template<typename X,typename Y> struct subtract_typeof_helper   { typedef typeof((typeof_::make<X>()-typeof_::make<Y>())) type; };
+template<typename X,typename Y> struct multiply_typeof_helper   { typedef typeof((typeof_::make<X>()*typeof_::make<Y>())) type; };
+template<typename X,typename Y> struct divide_typeof_helper     { typedef typeof((typeof_::make<X>()/typeof_::make<Y>())) type; };
+
+#endif
+
+#else // BOOST_UNITS_HAS_TYPEOF
+
+template<typename X> struct unary_plus_typeof_helper            { typedef X type; };
+template<typename X> struct unary_minus_typeof_helper           { typedef X type; };
+
+template<typename X,typename Y> struct add_typeof_helper        { BOOST_STATIC_ASSERT((is_same<X,Y>::value == true)); typedef X type; };
+template<typename X,typename Y> struct subtract_typeof_helper   { BOOST_STATIC_ASSERT((is_same<X,Y>::value == true)); typedef X type; };
+template<typename X,typename Y> struct multiply_typeof_helper   { BOOST_STATIC_ASSERT((is_same<X,Y>::value == true)); typedef X type; };
+template<typename X,typename Y> struct divide_typeof_helper     { BOOST_STATIC_ASSERT((is_same<X,Y>::value == true)); typedef X type; };
+
+#endif // BOOST_UNITS_HAS_TYPEOF
+
+template<typename X,typename Y> struct power_typeof_helper;
+template<typename X,typename Y> struct root_typeof_helper;
+
+#ifdef BOOST_UNITS_DOXYGEN
+
+/// A helper used by @c pow to raise
+/// a runtime object to a compile time
+/// known exponent.  This template is intended to
+/// be specialized.  All specializations must
+/// conform to the interface shown here.
+/// @c Exponent will be either the exponent
+/// passed to @c pow or @c static_rational<N>
+/// for and integer argument, N.
+template<typename BaseType, typename Exponent>
+struct power_typeof_helper
+{
+    /// specifies the result type
+    typedef detail::unspecified type;
+    /// Carries out the runtime calculation.
+    static type value(const BaseType& base);
+};
+
+/// A helper used by @c root to take a root
+/// of a runtime object using a compile time
+/// known index.  This template is intended to
+/// be specialized.  All specializations must
+/// conform to the interface shown here.
+/// @c Index will be either the type
+/// passed to @c pow or @c static_rational<N>
+/// for and integer argument, N.
+template<typename Radicand, typename Index>
+struct root_typeof_helper
+{
+    /// specifies the result type
+    typedef detail::unspecified type;
+    /// Carries out the runtime calculation.
+    static type value(const Radicand& base);
+};
+
+#endif
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_OPERATORS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions.hpp
new file mode 100644 (file)
index 0000000..e115898
--- /dev/null
@@ -0,0 +1,86 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_PHYSICAL_UNITS_HPP
+#define BOOST_UNITS_PHYSICAL_UNITS_HPP
+
+/// \file Includes all of the physical_dimension headers.
+///
+/// \brief Physical dimensions according to the SI system
+///
+/// \detail This header includes all physical dimension headers for both base
+/// derived dimensions. Base dimensions are extended to include plane and
+/// solid angle for convenience. 
+///
+
+#include <boost/units/physical_dimensions/amount.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/luminous_intensity.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/plane_angle.hpp>
+#include <boost/units/physical_dimensions/solid_angle.hpp>
+#include <boost/units/physical_dimensions/temperature.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+#include <boost/units/physical_dimensions/absorbed_dose.hpp>
+#include <boost/units/physical_dimensions/acceleration.hpp>
+#include <boost/units/physical_dimensions/action.hpp>
+#include <boost/units/physical_dimensions/activity.hpp>
+#include <boost/units/physical_dimensions/angular_acceleration.hpp>
+#include <boost/units/physical_dimensions/angular_momentum.hpp>
+#include <boost/units/physical_dimensions/angular_velocity.hpp>
+#include <boost/units/physical_dimensions/area.hpp>
+#include <boost/units/physical_dimensions/capacitance.hpp>
+#include <boost/units/physical_dimensions/conductance.hpp>
+#include <boost/units/physical_dimensions/conductivity.hpp>
+#include <boost/units/physical_dimensions/dose_equivalent.hpp>
+#include <boost/units/physical_dimensions/dynamic_viscosity.hpp>
+#include <boost/units/physical_dimensions/electric_charge.hpp>
+#include <boost/units/physical_dimensions/electric_potential.hpp>
+#include <boost/units/physical_dimensions/energy.hpp>
+#include <boost/units/physical_dimensions/energy_density.hpp>
+#include <boost/units/physical_dimensions/force.hpp>
+#include <boost/units/physical_dimensions/frequency.hpp>
+#include <boost/units/physical_dimensions/heat_capacity.hpp>
+#include <boost/units/physical_dimensions/illuminance.hpp>
+#include <boost/units/physical_dimensions/impedance.hpp>
+#include <boost/units/physical_dimensions/inductance.hpp>
+#include <boost/units/physical_dimensions/kinematic_viscosity.hpp>
+#include <boost/units/physical_dimensions/luminance.hpp>
+#include <boost/units/physical_dimensions/luminous_flux.hpp>
+#include <boost/units/physical_dimensions/magnetic_field_intensity.hpp>
+#include <boost/units/physical_dimensions/magnetic_flux.hpp>
+#include <boost/units/physical_dimensions/magnetic_flux_density.hpp>
+#include <boost/units/physical_dimensions/mass_density.hpp>
+#include <boost/units/physical_dimensions/molar_energy.hpp>
+#include <boost/units/physical_dimensions/molar_heat_capacity.hpp>
+#include <boost/units/physical_dimensions/moment_of_inertia.hpp>
+#include <boost/units/physical_dimensions/momentum.hpp>
+#include <boost/units/physical_dimensions/permeability.hpp>
+#include <boost/units/physical_dimensions/permittivity.hpp>
+#include <boost/units/physical_dimensions/power.hpp>
+#include <boost/units/physical_dimensions/pressure.hpp>
+#include <boost/units/physical_dimensions/reluctance.hpp>
+#include <boost/units/physical_dimensions/resistance.hpp>
+#include <boost/units/physical_dimensions/resistivity.hpp>
+#include <boost/units/physical_dimensions/specific_energy.hpp>
+#include <boost/units/physical_dimensions/specific_heat_capacity.hpp>
+#include <boost/units/physical_dimensions/specific_volume.hpp>
+#include <boost/units/physical_dimensions/stress.hpp>
+#include <boost/units/physical_dimensions/surface_density.hpp>
+#include <boost/units/physical_dimensions/surface_tension.hpp>
+#include <boost/units/physical_dimensions/thermal_conductivity.hpp>
+#include <boost/units/physical_dimensions/torque.hpp>
+#include <boost/units/physical_dimensions/velocity.hpp>
+#include <boost/units/physical_dimensions/volume.hpp>
+#include <boost/units/physical_dimensions/wavenumber.hpp>
+
+#endif // BOOST_UNITS_PHYSICAL_UNITS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/absorbed_dose.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/absorbed_dose.hpp
new file mode 100644 (file)
index 0000000..c62ed09
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ABSORBED_DOSE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ABSORBED_DOSE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for absorbed dose : L^2 T^-2
+typedef derived_dimension<length_base_dimension,2,
+                          time_base_dimension,-2>::type absorbed_dose_dimension;  
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ABSORBED_DOSE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/acceleration.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/acceleration.hpp
new file mode 100644 (file)
index 0000000..8f25c86
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ACCELERATION_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ACCELERATION_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for acceleration : L T^-2
+typedef derived_dimension<length_base_dimension,1,
+                          time_base_dimension,-2>::type acceleration_dimension;  
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ACCELERATION_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/action.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/action.hpp
new file mode 100644 (file)
index 0000000..cf38d32
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ACTION_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ACTION_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for action : L^2 M T^-1
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-1>::type action_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ACTION_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/activity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/activity.hpp
new file mode 100644 (file)
index 0000000..035cd44
--- /dev/null
@@ -0,0 +1,28 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ACTIVITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ACTIVITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for activity : T^-1
+typedef derived_dimension<time_base_dimension,-1>::type activity_dimension; 
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ACTIVITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/amount.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/amount.hpp
new file mode 100644 (file)
index 0000000..6d9d4b3
--- /dev/null
@@ -0,0 +1,49 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_AMOUNT_BASE_DIMENSION_HPP
+#define BOOST_UNITS_AMOUNT_BASE_DIMENSION_HPP
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_dimension.hpp>
+
+namespace boost {
+
+namespace units { 
+
+/// base dimension of amount
+struct amount_base_dimension : 
+    boost::units::base_dimension<amount_base_dimension,-4> 
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::amount_base_dimension)
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+/// dimension of amount of substance (N)
+typedef amount_base_dimension::dimension_type     amount_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_AMOUNT_BASE_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/angular_acceleration.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/angular_acceleration.hpp
new file mode 100644 (file)
index 0000000..79a3a14
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ANGULAR_ACCELERATION_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ANGULAR_ACCELERATION_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/plane_angle.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for angular acceleration : T^-2 QP
+typedef derived_dimension<time_base_dimension,-2,
+                          plane_angle_base_dimension,1>::type angular_acceleration_dimension; 
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ANGULAR_ACCELERATION_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/angular_momentum.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/angular_momentum.hpp
new file mode 100644 (file)
index 0000000..0a86f88
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ANGULAR_MOMENTUM_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ANGULAR_MOMENTUM_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/plane_angle.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for angular momentum : L^2 M T^-1 QP^-1
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-1,
+                          plane_angle_base_dimension,-1>::type angular_momentum_dimension;                
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ANGULAR_MOMENTUM_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/angular_velocity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/angular_velocity.hpp
new file mode 100644 (file)
index 0000000..5d7ea87
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ANGULAR_VELOCITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ANGULAR_VELOCITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/plane_angle.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for angular velocity : T^-1 QP
+typedef derived_dimension<time_base_dimension,-1,
+                          plane_angle_base_dimension,1>::type angular_velocity_dimension; 
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ANGULAR_VELOCITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/area.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/area.hpp
new file mode 100644 (file)
index 0000000..0d8cb09
--- /dev/null
@@ -0,0 +1,28 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_AREA_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_AREA_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for area : L^2
+typedef derived_dimension<length_base_dimension,2>::type area_dimension; 
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_AREA_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/capacitance.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/capacitance.hpp
new file mode 100644 (file)
index 0000000..e7019a7
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CAPACITANCE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_CAPACITANCE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for capacitance : L^-2 M^-1 T^4 I^2
+typedef derived_dimension<length_base_dimension,-2,
+                          mass_base_dimension,-1,
+                          time_base_dimension,4,
+                          current_base_dimension,2>::type capacitance_dimension;            
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CAPACITANCE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/conductance.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/conductance.hpp
new file mode 100644 (file)
index 0000000..8405f92
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CONDUCTANCE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_CONDUCTANCE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for conductance : L^-2 M^-1 T^3 I^2
+typedef derived_dimension<length_base_dimension,-2,
+                          mass_base_dimension,-1,
+                          time_base_dimension,3,
+                          current_base_dimension,2>::type conductance_dimension;   
+                          
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CONDUCTANCE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/conductivity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/conductivity.hpp
new file mode 100644 (file)
index 0000000..d255915
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CONDUCTIVITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_CONDUCTIVITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for conductivity : L^-3 M^-1 T^3 I^2
+typedef derived_dimension<length_base_dimension,-3,
+                          mass_base_dimension,-1,
+                          time_base_dimension,3,
+                          current_base_dimension,2>::type conductivity_dimension;          
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CONDUCTIVITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/current.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/current.hpp
new file mode 100644 (file)
index 0000000..6fa0e89
--- /dev/null
@@ -0,0 +1,49 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CURRENT_BASE_DIMENSION_HPP
+#define BOOST_UNITS_CURRENT_BASE_DIMENSION_HPP
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_dimension.hpp>
+
+namespace boost {
+
+namespace units { 
+
+/// base dimension of current
+struct current_base_dimension : 
+    boost::units::base_dimension<current_base_dimension,-6> 
+{ };                       
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::current_base_dimension)
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+/// dimension of electric current (I)
+typedef current_base_dimension::dimension_type    current_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CURRENT_BASE_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/dose_equivalent.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/dose_equivalent.hpp
new file mode 100644 (file)
index 0000000..ae13d2f
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DOSE_EQUIVALENT_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_DOSE_EQUIVALENT_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for dose equivalent : L^2 T^-2
+typedef derived_dimension<length_base_dimension,2,
+                          time_base_dimension,-2>::type dose_equivalent_dimension;  
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_DOSE_EQUIVALENT_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/dynamic_viscosity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/dynamic_viscosity.hpp
new file mode 100644 (file)
index 0000000..029f1fa
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_DYNAMIC_VISCOSITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_DYNAMIC_VISCOSITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for dynamic viscosity : M L^-1 T^-1
+typedef derived_dimension<mass_base_dimension,1,
+                          length_base_dimension,-1,
+                          time_base_dimension,-1>::type dynamic_viscosity_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_DYNAMIC_VISCOSITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/electric_charge.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/electric_charge.hpp
new file mode 100644 (file)
index 0000000..3683646
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ELECTRIC_CHARGE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ELECTRIC_CHARGE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for electric charge : T^1 I^1
+typedef derived_dimension<time_base_dimension,1,
+                          current_base_dimension,1>::type electric_charge_dimension;          
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ELECTRIC_CHARGE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/electric_potential.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/electric_potential.hpp
new file mode 100644 (file)
index 0000000..1ef028c
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ELECTRIC_POTENTIAL_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ELECTRIC_POTENTIAL_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for electric potential : L^2 M T^-3 I^-1
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-3,
+                          current_base_dimension,-1>::type electric_potential_dimension;        
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ELECTRIC_POTENTIAL_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/energy.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/energy.hpp
new file mode 100644 (file)
index 0000000..bf0dbe3
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ENERGY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ENERGY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for energy : L^2 M T^-2
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-2>::type energy_dimension;                
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ENERGY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/energy_density.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/energy_density.hpp
new file mode 100644 (file)
index 0000000..d30e1e1
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ENERGY_DENSITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ENERGY_DENSITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for energy density : L^-1 M^1 T^-2
+typedef derived_dimension<length_base_dimension,-1,
+                          mass_base_dimension,1,
+                          time_base_dimension,-2>::type energy_density_dimension;                
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ENERGY_DENSITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/force.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/force.hpp
new file mode 100644 (file)
index 0000000..a1ed955
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_FORCE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_FORCE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for force : L M T^-2
+typedef derived_dimension<length_base_dimension,1,
+                          mass_base_dimension,1,
+                          time_base_dimension,-2>::type force_dimension;                    
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_FORCE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/frequency.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/frequency.hpp
new file mode 100644 (file)
index 0000000..e2af7ee
--- /dev/null
@@ -0,0 +1,28 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_FREQUENCY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_FREQUENCY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for frequency : T^-1
+typedef derived_dimension<time_base_dimension,-1>::type frequency_dimension;                
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_FREQUENCY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/heat_capacity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/heat_capacity.hpp
new file mode 100644 (file)
index 0000000..3cbfa57
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_HEAT_CAPACITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_HEAT_CAPACITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/temperature.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for heat capacity : L^2 M T^-2 Theta^-1
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-2,
+                          temperature_base_dimension,-1>::type heat_capacity_dimension;                    
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_HEAT_CAPACITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/illuminance.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/illuminance.hpp
new file mode 100644 (file)
index 0000000..a24daf4
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ILLUMINANCE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_ILLUMINANCE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/luminous_intensity.hpp>
+#include <boost/units/physical_dimensions/solid_angle.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for illuminance : L^-2 I QS
+typedef derived_dimension<length_base_dimension,-2,
+                          luminous_intensity_base_dimension,1,
+                          solid_angle_base_dimension,1>::type illuminance_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ILLUMINANCE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/impedance.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/impedance.hpp
new file mode 100644 (file)
index 0000000..177fc60
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_IMPEDANCE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_IMPEDANCE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for impedance : L^2 M T^-3 I^-2  
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-3,
+                          current_base_dimension,-2>::type impedance_dimension;          
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_IMPEDANCE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/inductance.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/inductance.hpp
new file mode 100644 (file)
index 0000000..1506364
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_INDUCTANCE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_INDUCTANCE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for inductance : L^2 M T^-2 I^-2
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-2,
+                          current_base_dimension,-2>::type inductance_dimension;       
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_INDUCTANCE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/kinematic_viscosity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/kinematic_viscosity.hpp
new file mode 100644 (file)
index 0000000..e5c5261
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_KINEMATIC_VISCOSITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_KINEMATIC_VISCOSITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for kinematic viscosity : L^2 T^-1
+typedef derived_dimension<length_base_dimension,2,
+                          time_base_dimension,-1>::type kinematic_viscosity_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_KINEMATIC_VISCOSITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/length.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/length.hpp
new file mode 100644 (file)
index 0000000..22bbec4
--- /dev/null
@@ -0,0 +1,49 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_LENGTH_BASE_DIMENSION_HPP
+#define BOOST_UNITS_LENGTH_BASE_DIMENSION_HPP
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_dimension.hpp>
+
+namespace boost {
+
+namespace units { 
+
+/// base dimension of length
+struct length_base_dimension : 
+    boost::units::base_dimension<length_base_dimension, -9> 
+{ }; 
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::length_base_dimension)
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+/// dimension of length (L)
+typedef length_base_dimension::dimension_type length_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_LENGTH_BASE_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/luminance.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/luminance.hpp
new file mode 100644 (file)
index 0000000..f2e6f24
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_LUMINANCE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_LUMINANCE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/luminous_intensity.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for luminance : L^-2 I
+typedef derived_dimension<length_base_dimension,-2,
+                          luminous_intensity_base_dimension,1>::type luminance_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_LUMINANCE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/luminous_flux.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/luminous_flux.hpp
new file mode 100644 (file)
index 0000000..4c725ef
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_LUMINOUS_FLUX_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_LUMINOUS_FLUX_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/luminous_intensity.hpp>
+#include <boost/units/physical_dimensions/solid_angle.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for luminous flux : I QS
+typedef derived_dimension<luminous_intensity_base_dimension,1,
+                          solid_angle_base_dimension,1>::type luminous_flux_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_LUMINOUS_FLUX_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/luminous_intensity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/luminous_intensity.hpp
new file mode 100644 (file)
index 0000000..1da041d
--- /dev/null
@@ -0,0 +1,49 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_LUMINOUS_INTENSITY_BASE_DIMENSION_HPP
+#define BOOST_UNITS_LUMINOUS_INTENSITY_BASE_DIMENSION_HPP
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_dimension.hpp>
+
+namespace boost {
+
+namespace units { 
+
+/// base dimension of luminous intensity
+struct luminous_intensity_base_dimension : 
+    boost::units::base_dimension<luminous_intensity_base_dimension,-3> 
+{ }; 
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::luminous_intensity_base_dimension)
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+/// dimension of luminous intensity (J)
+typedef luminous_intensity_base_dimension::dimension_type luminous_intensity_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_LUMINOUS_INTENSITY_BASE_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/magnetic_field_intensity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/magnetic_field_intensity.hpp
new file mode 100644 (file)
index 0000000..665e5bc
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_MAGNETIC_FIELD_INTENSITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_MAGNETIC_FIELD_INTENSITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for magnetic field intensity : L^-1 I
+typedef derived_dimension<length_base_dimension,-1,
+                          current_base_dimension,1>::type magnetic_field_intensity_dimension;      
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_MAGNETIC_FIELD_INTENSITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/magnetic_flux.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/magnetic_flux.hpp
new file mode 100644 (file)
index 0000000..c247e56
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_MAGNETIC_FLUX_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_MAGNETIC_FLUX_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for magnetic flux : L^2 M T^-2 I^-1
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-2,
+                          current_base_dimension,-1>::type magnetic_flux_dimension;           
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_MAGNETIC_FLUX_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/magnetic_flux_density.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/magnetic_flux_density.hpp
new file mode 100644 (file)
index 0000000..d7fb7bb
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_MAGNETIC_FLUX_DENSITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_MAGNETIC_FLUX_DENSITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for magnetic flux density : M T^-2 I^-1
+typedef derived_dimension<mass_base_dimension,1,
+                          time_base_dimension,-2,
+                          current_base_dimension,-1>::type magnetic_flux_density_dimension;        
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_MAGNETIC_FLUX_DENSITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/mass.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/mass.hpp
new file mode 100644 (file)
index 0000000..7aaa75c
--- /dev/null
@@ -0,0 +1,49 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_MASS_BASE_DIMENSION_HPP
+#define BOOST_UNITS_MASS_BASE_DIMENSION_HPP
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_dimension.hpp>
+
+namespace boost {
+
+namespace units { 
+
+/// base dimension of mass
+struct mass_base_dimension : 
+    boost::units::base_dimension<mass_base_dimension,-8> 
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::mass_base_dimension)
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+/// dimension of mass (M)
+typedef mass_base_dimension::dimension_type   mass_dimension;           
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_MASS_BASE_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/mass_density.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/mass_density.hpp
new file mode 100644 (file)
index 0000000..e632f24
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_MASS_DENSITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_MASS_DENSITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for mass density : L^-3 M
+typedef derived_dimension<length_base_dimension,-3,
+                          mass_base_dimension,1>::type mass_density_dimension;            
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_MASS_DENSITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/molar_energy.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/molar_energy.hpp
new file mode 100644 (file)
index 0000000..2f83bbf
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_MOLAR_ENERGY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_MOLAR_ENERGY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/amount.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for molar energy : L^2 M T^-2 N^-1
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-2,
+                          amount_base_dimension,-1>::type molar_energy_dimension;                    
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_MOLAR_ENERGY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/molar_heat_capacity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/molar_heat_capacity.hpp
new file mode 100644 (file)
index 0000000..48e147b
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_MOLAR_HEAT_CAPACITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_MOLAR_HEAT_CAPACITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/temperature.hpp>
+#include <boost/units/physical_dimensions/amount.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for molar heat capacity : L^2 M T^-2 Theta^-1 N^-1
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-2,
+                          temperature_base_dimension,-1,
+                          amount_base_dimension,-1>::type molar_heat_capacity_dimension;                    
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_MOLAR_HEAT_CAPACITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/moment_of_inertia.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/moment_of_inertia.hpp
new file mode 100644 (file)
index 0000000..58c85c8
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_MOMENT_OF_INERTIA_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_MOMENT_OF_INERTIA_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/plane_angle.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for moment of inertia : L^2 M QP^-2
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          plane_angle_base_dimension,-2>::type moment_of_inertia_dimension;                
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_MOMENT_OF_INERTIA_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/momentum.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/momentum.hpp
new file mode 100644 (file)
index 0000000..13e8b8c
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_MOMENTUM_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_MOMENTUM_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for linear momentum : L M T^-1
+typedef derived_dimension<length_base_dimension,1,
+                          mass_base_dimension,1,
+                          time_base_dimension,-1>::type momentum_dimension;                
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_MOMENTUM_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/permeability.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/permeability.hpp
new file mode 100644 (file)
index 0000000..a0ea30c
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_PERMEABILITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_PERMEABILITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for permeability : L M T^-2 I^-2
+typedef derived_dimension<length_base_dimension,1,
+                          mass_base_dimension,1,
+                          time_base_dimension,-2,
+                          current_base_dimension,-2>::type permeability_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_PERMEABILITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/permittivity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/permittivity.hpp
new file mode 100644 (file)
index 0000000..01994c5
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_PERMITTIVITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_PERMITTIVITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for permittivity : L^-3 M^-1 T^4 I^2
+typedef derived_dimension<length_base_dimension,-3,
+                          mass_base_dimension,-1,
+                          time_base_dimension,4,
+                          current_base_dimension,2>::type permittivity_dimension;                
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_PERMITTIVITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/plane_angle.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/plane_angle.hpp
new file mode 100644 (file)
index 0000000..ae70032
--- /dev/null
@@ -0,0 +1,49 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_PLANE_ANGLE_BASE_DIMENSION_HPP
+#define BOOST_UNITS_PLANE_ANGLE_BASE_DIMENSION_HPP
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_dimension.hpp>
+
+namespace boost {
+
+namespace units { 
+
+/// base dimension of plane angle
+struct plane_angle_base_dimension : 
+    boost::units::base_dimension<plane_angle_base_dimension,-2> 
+{ };               
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::plane_angle_base_dimension)
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+/// base dimension of plane angle (QP)
+typedef plane_angle_base_dimension::dimension_type    plane_angle_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_PLANE_ANGLE_BASE_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/power.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/power.hpp
new file mode 100644 (file)
index 0000000..77e04cf
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_POWER_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_POWER_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for power : L^2 M T^-3
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-3>::type power_dimension;                    
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_POWER_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/pressure.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/pressure.hpp
new file mode 100644 (file)
index 0000000..666b4c7
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_PRESSURE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_PRESSURE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for pressure : L^-1 M T^-2
+typedef derived_dimension<length_base_dimension,-1,
+                          mass_base_dimension,1,
+                          time_base_dimension,-2>::type pressure_dimension;                
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_PRESSURE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/reluctance.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/reluctance.hpp
new file mode 100644 (file)
index 0000000..56be33b
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_RELUCTANCE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_RELUCTANCE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for reluctance : L^-2 M^-1 T^2 I^2
+typedef derived_dimension<length_base_dimension,-2,
+                          mass_base_dimension,-1,
+                          time_base_dimension,2,
+                          current_base_dimension,2>::type reluctance_dimension;            
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_RELUCTANCE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/resistance.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/resistance.hpp
new file mode 100644 (file)
index 0000000..3b1491d
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_RESISTANCE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_RESISTANCE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for resistance : L^2 M T^-3 I^-2  
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-3,
+                          current_base_dimension,-2>::type resistance_dimension;              
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_RESISTANCE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/resistivity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/resistivity.hpp
new file mode 100644 (file)
index 0000000..a82b900
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_RESISTIVITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_RESISTIVITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for resistivity : L^3 M T^-3 I^-2
+typedef derived_dimension<length_base_dimension,3,
+                          mass_base_dimension,1,
+                          time_base_dimension,-3,
+                          current_base_dimension,-2>::type resistivity_dimension;              
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_RESISTIVITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/solid_angle.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/solid_angle.hpp
new file mode 100644 (file)
index 0000000..1d035c0
--- /dev/null
@@ -0,0 +1,49 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SOLID_ANGLE_BASE_DIMENSION_HPP
+#define BOOST_UNITS_SOLID_ANGLE_BASE_DIMENSION_HPP
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_dimension.hpp>
+
+namespace boost {
+
+namespace units { 
+
+/// base dimension of solid angle
+struct solid_angle_base_dimension : 
+    boost::units::base_dimension<solid_angle_base_dimension,-1> 
+{ };               
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::solid_angle_base_dimension)
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+/// base dimension of solid angle (QS)
+typedef solid_angle_base_dimension::dimension_type    solid_angle_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SOLID_ANGLE_BASE_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/specific_energy.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/specific_energy.hpp
new file mode 100644 (file)
index 0000000..e74a293
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SPECIFIC_ENERGY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_SPECIFIC_ENERGY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for specific energy : L^2 T^-2 
+typedef derived_dimension<length_base_dimension,2,
+                          time_base_dimension,-2>::type specific_energy_dimension;                    
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SPECIFIC_ENERGY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/specific_heat_capacity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/specific_heat_capacity.hpp
new file mode 100644 (file)
index 0000000..9e48fae
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SPECIFIC_HEAT_CAPACITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_SPECIFIC_HEAT_CAPACITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/temperature.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for specific heat capacity : L^2 T^-2 Theta^-1
+typedef derived_dimension<length_base_dimension,2,
+                          time_base_dimension,-2,
+                          temperature_base_dimension,-1>::type specific_heat_capacity_dimension;                    
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SPECIFIC_HEAT_CAPACITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/specific_volume.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/specific_volume.hpp
new file mode 100644 (file)
index 0000000..85ed889
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SPECIFIC_VOLUME_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_SPECIFIC_VOLUME_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for specific volume : L^3 M^-1
+typedef derived_dimension<length_base_dimension,3,
+                          mass_base_dimension,-1>::type specific_volume_dimension;            
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SPECIFIC_VOLUME_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/stress.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/stress.hpp
new file mode 100644 (file)
index 0000000..d989c8c
--- /dev/null
@@ -0,0 +1,32 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_STRESS_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_STRESS_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for stress : L^-1 M T^-2
+typedef derived_dimension<length_base_dimension,-1,
+                          mass_base_dimension,1,
+                          time_base_dimension,-2>::type stress_dimension;     
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_STRESS_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/surface_density.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/surface_density.hpp
new file mode 100644 (file)
index 0000000..898e8f4
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SURFACE_DENSITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_SURFACE_DENSITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for surface density : L^-2 M
+typedef derived_dimension<length_base_dimension,-2,
+                          mass_base_dimension,1>::type surface_density_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SURFACE_DENSITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/surface_tension.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/surface_tension.hpp
new file mode 100644 (file)
index 0000000..630509f
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SURFACE_TENSION_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_SURFACE_TENSION_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for surface tension : M T^-2
+typedef derived_dimension<mass_base_dimension,1,
+                          time_base_dimension,-2>::type surface_tension_dimension;                    
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SURFACE_TENSION_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/temperature.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/temperature.hpp
new file mode 100644 (file)
index 0000000..f6bc788
--- /dev/null
@@ -0,0 +1,49 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_TEMPERATURE_BASE_DIMENSION_HPP
+#define BOOST_UNITS_TEMPERATURE_BASE_DIMENSION_HPP
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_dimension.hpp>
+
+namespace boost {
+
+namespace units { 
+
+/// base dimension of temperature
+struct temperature_base_dimension : 
+    boost::units::base_dimension<temperature_base_dimension,-5> 
+{ };               
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::temperature_base_dimension)
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+/// dimension of temperature (Theta)
+typedef temperature_base_dimension::dimension_type temperature_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_TEMPERATURE_BASE_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/thermal_conductivity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/thermal_conductivity.hpp
new file mode 100644 (file)
index 0000000..abc82c7
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_THERMAL_CONDUCTIVITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_THERMAL_CONDUCTIVITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+#include <boost/units/physical_dimensions/temperature.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for thermal_conductivity : L^1 M^1 T^-3 Theta^-1
+typedef derived_dimension<length_base_dimension,1,
+                          mass_base_dimension,1,
+                          time_base_dimension,-3,
+                          temperature_base_dimension,-1>::type thermal_conductivity_dimension;                    
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_THERMAL_CONDUCTIVITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/time.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/time.hpp
new file mode 100644 (file)
index 0000000..0b9a3e1
--- /dev/null
@@ -0,0 +1,49 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_TIME_BASE_DIMENSION_HPP
+#define BOOST_UNITS_TIME_BASE_DIMENSION_HPP
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_dimension.hpp>
+
+namespace boost {
+
+namespace units { 
+
+/// base dimension of time
+struct time_base_dimension : 
+    boost::units::base_dimension<time_base_dimension,-7> 
+{ };
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::time_base_dimension)
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+/// dimension of time (T)
+typedef time_base_dimension::dimension_type time_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_TIME_BASE_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/torque.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/torque.hpp
new file mode 100644 (file)
index 0000000..61c41a1
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_TORQUE_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_TORQUE_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/plane_angle.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for torque : L^2 M T^-2 QP^-1
+typedef derived_dimension<length_base_dimension,2,
+                          mass_base_dimension,1,
+                          time_base_dimension,-2,
+                          plane_angle_base_dimension,-1>::type torque_dimension;                    
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_TORQUE_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/velocity.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/velocity.hpp
new file mode 100644 (file)
index 0000000..eb3d412
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_VELOCITY_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_VELOCITY_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for velocity : L T^-1
+typedef derived_dimension<length_base_dimension,1,
+                          time_base_dimension,-1>::type velocity_dimension;                
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_VELOCITY_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/volume.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/volume.hpp
new file mode 100644 (file)
index 0000000..a2cdd88
--- /dev/null
@@ -0,0 +1,28 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_VOLUME_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_VOLUME_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for volume : l^3
+typedef derived_dimension<length_base_dimension,3>::type volume_dimension;
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_VOLUME_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/physical_dimensions/wavenumber.hpp b/deal.II/contrib/boost/include/boost/units/physical_dimensions/wavenumber.hpp
new file mode 100644 (file)
index 0000000..abaf0ac
--- /dev/null
@@ -0,0 +1,28 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_WAVENUMBER_DERIVED_DIMENSION_HPP
+#define BOOST_UNITS_WAVENUMBER_DERIVED_DIMENSION_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+
+namespace boost {
+
+namespace units {
+
+/// derived dimension for wavenumber : L^-1
+typedef derived_dimension<length_base_dimension,-1>::type wavenumber_dimension;                 
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_WAVENUMBER_DERIVED_DIMENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/pow.hpp b/deal.II/contrib/boost/include/boost/units/pow.hpp
new file mode 100644 (file)
index 0000000..ed0b3e4
--- /dev/null
@@ -0,0 +1,112 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_POW_HPP 
+#define BOOST_UNITS_POW_HPP
+
+#include <boost/math_fwd.hpp>
+#include <boost/type_traits/is_integral.hpp>
+
+#include <boost/units/operators.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/detail/static_rational_power.hpp>
+
+/// \file 
+/// \brief Raise values to exponents known at compile-time
+
+namespace boost {
+
+namespace units {
+
+/// raise a value to a @c static_rational power
+template<class Rat,class Y>
+inline typename power_typeof_helper<Y,Rat>::type
+pow(const Y& x)
+{
+    return power_typeof_helper<Y,Rat>::value(x);
+}
+
+/// raise a value to an integer power
+template<long N,class Y>
+inline typename power_typeof_helper<Y,static_rational<N> >::type
+pow(const Y& x)
+{
+    return power_typeof_helper<Y,static_rational<N> >::value(x);
+}
+
+#ifndef BOOST_UNITS_DOXYGEN
+
+/// raise @c T to a @c static_rational power
+template<class T, long N,long D> 
+struct power_typeof_helper<T, static_rational<N,D> >                
+{ 
+    typedef typename mpl::if_<boost::is_integral<T>, double, T>::type internal_type;
+    typedef detail::static_rational_power_impl<static_rational<N, D>, internal_type> impl;
+    typedef typename impl::type type; 
+    
+    static type value(const T& x)  
+    {
+        return impl::call(x);
+    }
+};
+
+/// raise @c float to a @c static_rational power
+template<long N,long D> 
+struct power_typeof_helper<float, static_rational<N,D> >
+{
+    // N.B.  pathscale doesn't accept inheritence for some reason.
+    typedef power_typeof_helper<double, static_rational<N,D> > base;
+    typedef typename base::type type;
+    static type value(const double& x)
+    {
+        return base::value(x);
+    }
+};
+
+#endif
+
+/// take the @c static_rational root of a value
+template<class Rat,class Y>
+typename root_typeof_helper<Y,Rat>::type
+root(const Y& x)
+{
+    return root_typeof_helper<Y,Rat>::value(x);
+}
+
+/// take the integer root of a value
+template<long N,class Y>
+typename root_typeof_helper<Y,static_rational<N> >::type
+root(const Y& x)
+{
+    return root_typeof_helper<Y,static_rational<N> >::value(x);
+}
+
+#ifndef BOOST_UNITS_DOXYGEN
+
+/// take @c static_rational root of an @c T
+template<class T, long N,long D> 
+struct root_typeof_helper<T,static_rational<N,D> >
+{
+    // N.B.  pathscale doesn't accept inheritence for some reason.
+    typedef power_typeof_helper<T, static_rational<D,N> > base;
+    typedef typename base::type type;
+    static type value(const T& x)
+    {
+        return(base::value(x));
+    }
+};
+
+#endif
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_STATIC_RATIONAL_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/quantity.hpp b/deal.II/contrib/boost/include/boost/units/quantity.hpp
new file mode 100644 (file)
index 0000000..4fe916d
--- /dev/null
@@ -0,0 +1,1218 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_QUANTITY_HPP
+#define BOOST_UNITS_QUANTITY_HPP
+
+#include <algorithm>
+
+#include <boost/config.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/dimensionless_type.hpp>
+#include <boost/units/homogeneous_system.hpp>
+#include <boost/units/operators.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/detail/dimensionless_unit.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+template<class T, class Enable = void>
+struct is_base_unit : mpl::false_ {};
+
+template<class T>
+struct is_base_unit<T, typename T::boost_units_is_base_unit_type> : mpl::true_ {};
+
+template<class Source, class Destination>
+struct is_narrowing_conversion_impl : mpl::bool_<(sizeof(Source) > sizeof(Destination))> {};
+
+template<class Source, class Destination>
+struct is_non_narrowing_conversion :
+    mpl::and_<
+        boost::is_convertible<Source, Destination>,
+        mpl::not_<
+            mpl::and_<
+                boost::is_arithmetic<Source>,
+                boost::is_arithmetic<Destination>,
+                mpl::or_<
+                    mpl::and_<
+                        is_integral<Destination>,
+                        mpl::not_<is_integral<Source> >
+                    >,
+                    is_narrowing_conversion_impl<Source, Destination>
+                >
+            >
+        >
+    >
+{};
+
+template<>
+struct is_non_narrowing_conversion<long double, double> : mpl::false_ {};
+
+// msvc 7.1 needs extra disambiguation
+template<class T, class U>
+struct disable_if_is_same
+{
+    typedef void type;
+};
+
+template<class T>
+struct disable_if_is_same<T, T> {};
+
+}
+/// class declaration
+template<class Unit,class Y = double>
+class quantity
+{
+        // base units are not the same as units.
+        BOOST_MPL_ASSERT_NOT((detail::is_base_unit<Unit>));
+        enum { force_instantiation_of_unit = sizeof(Unit) };
+        typedef void (quantity::*unspecified_null_pointer_constant_type)(int*******);
+    public:
+        typedef quantity<Unit,Y>                        this_type;
+        
+        typedef Y                                       value_type;
+        typedef Unit        unit_type;
+        quantity() : val_() 
+        { 
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        }
+
+        quantity(unspecified_null_pointer_constant_type) : val_() 
+        { 
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        }
+        
+        quantity(const this_type& source) : val_(source.val_) 
+        {
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        }
+        
+        // Need to make sure that the destructor of
+        // Unit which contains the checking is instantiated,
+        // on sun.
+        #ifdef __SUNPRO_CC
+        ~quantity() {
+            unit_type force_unit_instantiation;
+        }
+        #endif
+        
+        //~quantity() { }
+        
+        this_type& operator=(const this_type& source) 
+        { 
+             val_ = source.val_; 
+             
+             return *this; 
+        }
+
+        #ifndef BOOST_NO_SFINAE
+
+        /// implicit conversion between value types is allowed if allowed for value types themselves
+        template<class YY>
+        quantity(const quantity<Unit,YY>& source,
+            typename boost::enable_if<detail::is_non_narrowing_conversion<YY, Y> >::type* = 0) :
+            val_(source.value())
+        { 
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        }
+
+        /// implicit conversion between value types is not allowed if not allowed for value types themselves
+        template<class YY>
+        explicit quantity(const quantity<Unit,YY>& source,
+            typename boost::disable_if<detail::is_non_narrowing_conversion<YY, Y> >::type* = 0) :
+            val_(static_cast<Y>(source.value()))
+        { 
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        }
+
+        #else
+
+        /// implicit conversion between value types is allowed if allowed for value types themselves
+        template<class YY>
+        quantity(const quantity<Unit,YY>& source) :
+            val_(source.value())
+        { 
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+            BOOST_STATIC_ASSERT((boost::is_convertible<YY, Y>::value == true));
+        }
+
+        #endif
+        
+        /// implicit assignment between value types is allowed if allowed for value types themselves
+        template<class YY>
+        this_type& operator=(const quantity<Unit,YY>& source)
+        {
+            BOOST_STATIC_ASSERT((boost::is_convertible<YY, Y>::value == true));
+
+            *this = this_type(source);
+            
+            return *this;
+        }
+
+        #ifndef BOOST_NO_SFINAE
+
+        /// explicit conversion between different unit systems is allowed if implicit conversion is disallowed
+        template<class Unit2,class YY> 
+        explicit
+        quantity(const quantity<Unit2,YY>& source, 
+                 typename boost::disable_if<
+                    mpl::and_<
+                        //is_implicitly_convertible should be undefined when the
+                        //units are not convertible at all
+                        typename is_implicitly_convertible<Unit2,Unit>::type,
+                        detail::is_non_narrowing_conversion<YY, Y>
+                    >,
+                    typename detail::disable_if_is_same<Unit, Unit2>::type
+                 >::type* = 0)
+             : val_(conversion_helper<quantity<Unit2,YY>,this_type>::convert(source).value())
+        {
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+            BOOST_STATIC_ASSERT((boost::is_convertible<YY,Y>::value == true));
+        }
+
+        /// implicit conversion between different unit systems is allowed if each fundamental dimension is implicitly convertible
+        template<class Unit2,class YY> 
+        quantity(const quantity<Unit2,YY>& source, 
+                 typename boost::enable_if<
+                     mpl::and_<
+                         typename is_implicitly_convertible<Unit2,Unit>::type,
+                         detail::is_non_narrowing_conversion<YY, Y>
+                     >,
+                     typename detail::disable_if_is_same<Unit, Unit2>::type
+                 >::type* = 0)
+             : val_(conversion_helper<quantity<Unit2,YY>,this_type>::convert(source).value())
+        {
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+            BOOST_STATIC_ASSERT((boost::is_convertible<YY,Y>::value == true));
+        }
+
+        #else
+
+        /// without SFINAE we can't distinguish between explicit and implicit conversions so 
+        /// the conversion is always explicit
+        template<class Unit2,class YY> 
+        explicit quantity(const quantity<Unit2,YY>& source)
+             : val_(conversion_helper<quantity<Unit2,YY>,this_type>::convert(source).value())
+        {
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+            BOOST_STATIC_ASSERT((boost::is_convertible<YY,Y>::value == true));
+        }
+
+        #endif
+        
+        /// implicit assignment between different unit systems is allowed if each fundamental dimension is implicitly convertible 
+        template<class Unit2,class YY>
+        this_type& operator=(const quantity<Unit2,YY>& source)
+        {
+            
+            BOOST_STATIC_ASSERT((is_implicitly_convertible<Unit2,unit_type>::value == true));
+            BOOST_STATIC_ASSERT((boost::is_convertible<YY,Y>::value == true));
+            
+            *this = this_type(source);
+            
+            return *this;
+        }
+
+        const value_type& value() const                     { return val_; }                        ///< constant accessor to value
+        
+        ///< can add a quantity of the same type if add_typeof_helper<value_type,value_type>::type is convertible to value_type
+        template<class Unit2, class YY>
+        this_type& operator+=(const quantity<Unit2, YY>& source)
+        {
+            BOOST_STATIC_ASSERT((boost::is_same<typename add_typeof_helper<Unit, Unit2>::type, Unit>::value));
+            val_ += source.value();
+            return *this;
+        }  
+
+        ///< can subtract a quantity of the same type if subtract_typeof_helper<value_type,value_type>::type is convertible to value_type
+        template<class Unit2, class YY>
+        this_type& operator-=(const quantity<Unit2, YY>& source)
+        {
+            BOOST_STATIC_ASSERT((boost::is_same<typename subtract_typeof_helper<Unit, Unit2>::type, Unit>::value));
+            val_ -= source.value();
+            return *this;
+        }  
+
+        template<class Unit2, class YY>
+        this_type& operator*=(const quantity<Unit2, YY>& source)
+        {
+            BOOST_STATIC_ASSERT((boost::is_same<typename multiply_typeof_helper<Unit, Unit2>::type, Unit>::value));
+            val_ *= source.value();
+            return *this;
+        }  
+        
+        template<class Unit2, class YY>
+        this_type& operator/=(const quantity<Unit2, YY>& source)
+        {
+            BOOST_STATIC_ASSERT((boost::is_same<typename divide_typeof_helper<Unit, Unit2>::type, Unit>::value));
+            val_ /= source.value();
+            return *this;
+        }
+
+        ///< can multiply a quantity by a scalar value_type if multiply_typeof_helper<value_type,value_type>::type is convertible to value_type
+        this_type& operator*=(const value_type& source) { val_ *= source; return *this; }
+        ///< can divide a quantity by a scalar value_type if divide_typeof_helper<value_type,value_type>::type is convertible to value_type
+        this_type& operator/=(const value_type& source) { val_ /= source; return *this; }
+    
+        /// Construct quantity directly from @c value_type (potentially dangerous).
+        static this_type from_value(const value_type& val)  { return this_type(val, 0); }
+
+    protected:
+        explicit quantity(const value_type& val, int) : val_(val) { }
+        
+    private:
+        value_type    val_;
+};
+
+/// Specialization for dimensionless quantities. Implicit conversions between 
+/// unit systems are allowed because all dimensionless quantities are equivalent.
+/// Implicit construction and assignment from and conversion to @c value_type is
+/// also allowed.
+template<class System,class Y>
+class quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(System),Y>
+{
+    public:
+        typedef quantity<unit<dimensionless_type,System>,Y>     this_type;
+                                   
+        typedef Y                                               value_type;
+        typedef System                                          system_type;
+        typedef dimensionless_type                              dimension_type;
+        typedef unit<dimension_type,system_type>                unit_type;
+         
+        quantity() : val_() 
+        {
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        }
+        
+        /// construction from raw @c value_type is allowed
+        quantity(value_type val) : val_(val) 
+        {
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        } 
+                           
+        quantity(const this_type& source) : val_(source.val_) 
+        {
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        }
+        
+        //~quantity() { }
+        
+        this_type& operator=(const this_type& source) 
+        { 
+            val_ = source.val_; 
+                
+            return *this; 
+        }
+        
+        #ifndef BOOST_NO_SFINAE
+
+        /// implicit conversion between value types is allowed if allowed for value types themselves
+        template<class YY>
+        quantity(const quantity<unit<dimension_type,system_type>,YY>& source,
+            typename boost::enable_if<detail::is_non_narrowing_conversion<YY, Y> >::type* = 0) :
+            val_(source.value())
+        { 
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        }
+
+        /// implicit conversion between value types is not allowed if not allowed for value types themselves
+        template<class YY>
+        explicit quantity(const quantity<unit<dimension_type,system_type>,YY>& source,
+            typename boost::disable_if<detail::is_non_narrowing_conversion<YY, Y> >::type* = 0) :
+            val_(static_cast<Y>(source.value()))
+        { 
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        }
+
+        #else
+
+        /// implicit conversion between value types is allowed if allowed for value types themselves
+        template<class YY>
+        quantity(const quantity<unit<dimension_type,system_type>,YY>& source) :
+            val_(source.value())
+        { 
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+            BOOST_STATIC_ASSERT((boost::is_convertible<YY, Y>::value == true));
+        }
+
+        #endif
+        
+        /// implicit assignment between value types is allowed if allowed for value types themselves
+        template<class YY>
+        this_type& operator=(const quantity<unit<dimension_type,system_type>,YY>& source)
+        {
+            BOOST_STATIC_ASSERT((boost::is_convertible<YY,Y>::value == true));
+
+            *this = this_type(source);
+            
+            return *this;
+        }
+
+        #if 1
+
+        /// implicit conversion between different unit systems is allowed
+        template<class System2, class Y2> 
+        quantity(const quantity<unit<dimensionless_type, System2>,Y2>& source,
+        #ifdef __SUNPRO_CC
+            typename boost::enable_if<
+                boost::mpl::and_<
+                    detail::is_non_narrowing_conversion<Y2, Y>,
+                    detail::is_dimensionless_system<System2>
+                > 
+            >::type* = 0
+        #else
+            typename boost::enable_if<detail::is_non_narrowing_conversion<Y2, Y> >::type* = 0,
+            typename detail::disable_if_is_same<System, System2>::type* = 0,
+            typename boost::enable_if<detail::is_dimensionless_system<System2> >::type* = 0
+        #endif
+            ) :
+            val_(source.value()) 
+        {
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        }
+
+        /// implicit conversion between different unit systems is allowed
+        template<class System2, class Y2> 
+        explicit quantity(const quantity<unit<dimensionless_type, System2>,Y2>& source,
+        #ifdef __SUNPRO_CC
+            typename boost::enable_if<
+                boost::mpl::and_<
+                    boost::mpl::not_<detail::is_non_narrowing_conversion<Y2, Y> >,
+                    detail::is_dimensionless_system<System2>
+                > 
+            >::type* = 0
+        #else
+            typename boost::disable_if<detail::is_non_narrowing_conversion<Y2, Y> >::type* = 0,
+            typename detail::disable_if_is_same<System, System2>::type* = 0,
+            typename boost::enable_if<detail::is_dimensionless_system<System2> >::type* = 0
+        #endif
+            ) :
+            val_(static_cast<Y>(source.value())) 
+        {
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        }
+
+        #else
+
+        /// implicit conversion between different unit systems is allowed
+        template<class System2, class Y2> 
+        quantity(const quantity<unit<dimensionless_type,homogeneous_system<System2> >,Y2>& source) :
+            val_(source.value()) 
+        {
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+            BOOST_STATIC_ASSERT((boost::is_convertible<Y2, Y>::value == true));
+        }
+
+        #endif
+
+        /// conversion between different unit systems is explicit when
+        /// the units are not equivalent.
+        template<class System2, class Y2> 
+        explicit quantity(const quantity<unit<dimensionless_type, System2>,Y2>& source,
+            typename boost::disable_if<detail::is_dimensionless_system<System2> >::type* = 0) :
+            val_(conversion_helper<quantity<unit<dimensionless_type, System2>,Y2>, this_type>::convert(source).value()) 
+        {
+            BOOST_UNITS_CHECK_LAYOUT_COMPATIBILITY(this_type, Y);
+        }
+        
+        #ifndef __SUNPRO_CC
+
+        /// implicit assignment between different unit systems is allowed
+        template<class System2>
+        this_type& operator=(const quantity<BOOST_UNITS_DIMENSIONLESS_UNIT(System2),Y>& source)
+        {
+            *this = this_type(source);
+            
+            return *this;
+        }
+        
+        #endif
+        
+        /// implicit conversion to @c value_type is allowed
+        operator value_type() const                         { return val_; }
+        
+        const value_type& value() const                     { return val_; }                        ///< constant accessor to value
+        
+        ///< can add a quantity of the same type if add_typeof_helper<value_type,value_type>::type is convertible to value_type
+        this_type& operator+=(const this_type& source)      { val_ += source.val_; return *this; }  
+        
+        ///< can subtract a quantity of the same type if subtract_typeof_helper<value_type,value_type>::type is convertible to value_type
+        this_type& operator-=(const this_type& source)      { val_ -= source.val_; return *this; }  
+        
+        ///< can multiply a quantity by a scalar value_type if multiply_typeof_helper<value_type,value_type>::type is convertible to value_type
+        this_type& operator*=(const value_type& val)        { val_ *= val; return *this; }          
+
+        ///< can divide a quantity by a scalar value_type if divide_typeof_helper<value_type,value_type>::type is convertible to value_type
+        this_type& operator/=(const value_type& val)        { val_ /= val; return *this; }          
+
+        /// Construct quantity directly from @c value_type.
+        static this_type from_value(const value_type& val)  { return this_type(val); }
+
+   private:
+        value_type    val_;
+};
+
+#ifdef BOOST_MSVC
+// HACK: For some obscure reason msvc 8.0 needs these specializations
+template<class System, class T>
+class quantity<unit<int, System>, T> {};
+template<class T>
+class quantity<int, T> {};
+#endif
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::quantity, 2)
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+namespace detail {
+
+/// helper class for quantity_cast
+template<class X,class Y> struct quantity_cast_helper;
+
+/// specialization for casting to the value type
+template<class Y,class X,class Unit>
+struct quantity_cast_helper<Y,quantity<Unit,X> >
+{
+    typedef Y type;
+    
+    type operator()(quantity<Unit,X>& source)           { return const_cast<X&>(source.value()); }
+};
+
+/// specialization for casting to the value type
+template<class Y,class X,class Unit>
+struct quantity_cast_helper<Y,const quantity<Unit,X> >
+{
+    typedef Y type;
+    
+    type operator()(const quantity<Unit,X>& source)     { return source.value(); }
+};
+
+} // namespace detail
+
+/// quantity_cast provides mutating access to underlying quantity value_type
+template<class X,class Y>
+inline 
+X
+quantity_cast(Y& source)
+{
+    detail::quantity_cast_helper<X,Y>   qch;
+    
+    return qch(source);
+}
+
+template<class X,class Y>
+inline 
+X
+quantity_cast(const Y& source)
+{
+    detail::quantity_cast_helper<X,const Y>   qch;
+    
+    return qch(source);
+}
+
+/// swap quantities
+template<class Unit,class Y>
+inline void swap(quantity<Unit,Y>& lhs, quantity<Unit,Y>& rhs)
+{
+    using std::swap;
+    swap(quantity_cast<Y&>(lhs),quantity_cast<Y&>(rhs));
+}
+
+/// specialize unary plus typeof helper
+/// INTERNAL ONLY
+template<class Unit,class Y>
+struct unary_plus_typeof_helper< quantity<Unit,Y> >
+{
+    typedef typename unary_plus_typeof_helper<Y>::type      value_type;
+    typedef typename unary_plus_typeof_helper<Unit>::type   unit_type;
+    typedef quantity<unit_type,value_type>                  type;
+};
+
+/// specialize unary minus typeof helper
+/// INTERNAL ONLY
+template<class Unit,class Y>
+struct unary_minus_typeof_helper< quantity<Unit,Y> >
+{
+    typedef typename unary_minus_typeof_helper<Y>::type     value_type;
+    typedef typename unary_minus_typeof_helper<Unit>::type  unit_type;
+    typedef quantity<unit_type,value_type>                  type;
+};
+
+/// specialize add typeof helper
+/// INTERNAL ONLY
+template<class Unit1,
+         class Unit2,
+         class X,
+         class Y>
+struct add_typeof_helper< quantity<Unit1,X>,quantity<Unit2,Y> >
+{
+    typedef typename add_typeof_helper<X,Y>::type           value_type;
+    typedef typename add_typeof_helper<Unit1,Unit2>::type   unit_type;
+    typedef quantity<unit_type,value_type>                  type;
+};
+
+/// for sun CC we need to invoke SFINAE at
+/// the top level, otherwise it will silently
+/// return int.
+template<class Dim1, class System1,
+         class Dim2, class System2,
+         class X,
+         class Y>
+struct add_typeof_helper< quantity<unit<Dim1, System1>,X>,quantity<unit<Dim2, System2>,Y> >
+{
+};
+
+template<class Dim,
+         class System,
+         class X,
+         class Y>
+struct add_typeof_helper< quantity<unit<Dim, System>,X>,quantity<unit<Dim, System>,Y> >
+{
+    typedef typename add_typeof_helper<X,Y>::type  value_type;
+    typedef unit<Dim, System>                      unit_type;
+    typedef quantity<unit_type,value_type>         type;
+};
+
+/// specialize subtract typeof helper
+/// INTERNAL ONLY
+template<class Unit1,
+         class Unit2,
+         class X,
+         class Y>
+struct subtract_typeof_helper< quantity<Unit1,X>,quantity<Unit2,Y> >
+{
+    typedef typename subtract_typeof_helper<X,Y>::type          value_type;
+    typedef typename subtract_typeof_helper<Unit1,Unit2>::type  unit_type;
+    typedef quantity<unit_type,value_type>                      type;
+};
+
+// Force adding different units to fail on sun.
+template<class Dim1, class System1,
+         class Dim2, class System2,
+         class X,
+         class Y>
+struct subtract_typeof_helper< quantity<unit<Dim1, System1>,X>,quantity<unit<Dim2, System2>,Y> >
+{
+};
+
+template<class Dim,
+         class System,
+         class X,
+         class Y>
+struct subtract_typeof_helper< quantity<unit<Dim, System>,X>,quantity<unit<Dim, System>,Y> >
+{
+    typedef typename subtract_typeof_helper<X,Y>::type  value_type;
+    typedef unit<Dim, System>                           unit_type;
+    typedef quantity<unit_type,value_type>              type;
+};
+
+/// scalar times unit typeof helper
+/// INTERNAL ONLY
+template<class System,
+         class Dim,
+         class X>
+struct multiply_typeof_helper< X,unit<Dim,System> >
+{
+    typedef X                               value_type;
+    typedef unit<Dim,System>                unit_type;
+    typedef quantity<unit_type,value_type>  type;
+};
+
+/// unit times scalar typeof helper
+/// INTERNAL ONLY
+template<class System,
+         class Dim,
+         class X>
+struct multiply_typeof_helper< unit<Dim,System>,X >
+{
+    typedef X                               value_type;
+    typedef unit<Dim,System>                unit_type;
+    typedef quantity<unit_type,value_type>  type;
+};
+
+/// scalar times quantity typeof helper
+/// INTERNAL ONLY
+template<class Unit,
+         class X,
+         class Y>
+struct multiply_typeof_helper< X,quantity<Unit,Y> >
+{
+    typedef typename multiply_typeof_helper<X,Y>::type  value_type;
+    typedef Unit                                        unit_type;
+    typedef quantity<unit_type,value_type>              type;
+};
+
+/// quantity times scalar typeof helper
+/// INTERNAL ONLY
+template<class Unit,
+         class X,
+         class Y>
+struct multiply_typeof_helper< quantity<Unit,X>,Y >
+{
+    typedef typename multiply_typeof_helper<X,Y>::type  value_type;
+    typedef Unit                                        unit_type;
+    typedef quantity<unit_type,value_type>              type;
+};
+
+/// unit times quantity typeof helper
+/// INTERNAL ONLY
+template<class Unit,
+         class System,
+         class Dim,
+         class X>
+struct multiply_typeof_helper< unit<Dim,System>,quantity<Unit,X> >
+{
+    typedef X                                                               value_type;
+    typedef typename multiply_typeof_helper< unit<Dim,System>,Unit >::type  unit_type;
+    typedef quantity<unit_type,value_type>                                  type;
+};
+
+/// quantity times unit typeof helper
+/// INTERNAL ONLY
+template<class Unit,
+         class System,
+         class Dim,
+         class X>
+struct multiply_typeof_helper< quantity<Unit,X>,unit<Dim,System> >
+{
+    typedef X                                                               value_type;
+    typedef typename multiply_typeof_helper< Unit,unit<Dim,System> >::type  unit_type;
+    typedef quantity<unit_type,value_type>                                  type;
+};
+
+/// quantity times quantity typeof helper
+/// INTERNAL ONLY
+template<class Unit1,
+         class Unit2,
+         class X,
+         class Y>
+struct multiply_typeof_helper< quantity<Unit1,X>,quantity<Unit2,Y> >
+{
+    typedef typename multiply_typeof_helper<X,Y>::type          value_type;
+    typedef typename multiply_typeof_helper<Unit1,Unit2>::type  unit_type;
+    typedef quantity<unit_type,value_type>                      type;
+};
+
+/// scalar divided by unit typeof helper
+/// INTERNAL ONLY
+template<class System,
+         class Dim,
+         class X>
+struct divide_typeof_helper< X,unit<Dim,System> >
+{
+    typedef X                                                                           value_type;
+    typedef typename power_typeof_helper< unit<Dim,System>,static_rational<-1> >::type  unit_type;
+    typedef quantity<unit_type,value_type>                                              type;
+};
+
+/// unit divided by scalar typeof helper
+/// INTERNAL ONLY
+template<class System,
+         class Dim,
+         class X>
+struct divide_typeof_helper< unit<Dim,System>,X >
+{
+    typedef typename divide_typeof_helper<X,X>::type    value_type;
+    typedef unit<Dim,System>                            unit_type;
+    typedef quantity<unit_type,value_type>              type;
+};
+
+/// scalar divided by quantity typeof helper
+/// INTERNAL ONLY
+template<class Unit,
+         class X,
+         class Y>
+struct divide_typeof_helper< X,quantity<Unit,Y> >
+{
+    typedef typename divide_typeof_helper<X,Y>::type                        value_type;
+    typedef typename power_typeof_helper< Unit,static_rational<-1> >::type  unit_type;
+    typedef quantity<unit_type,value_type>                                  type;
+};
+
+/// quantity divided by scalar typeof helper
+/// INTERNAL ONLY
+template<class Unit,
+         class X,
+         class Y>
+struct divide_typeof_helper< quantity<Unit,X>,Y >
+{
+    typedef typename divide_typeof_helper<X,Y>::type    value_type;
+    typedef Unit                                        unit_type;
+    typedef quantity<unit_type,value_type>              type;
+};
+
+/// unit divided by quantity typeof helper
+/// INTERNAL ONLY
+template<class Unit,
+         class System,
+         class Dim,
+         class X>
+struct divide_typeof_helper< unit<Dim,System>,quantity<Unit,X> >
+{
+    typedef typename divide_typeof_helper<X,X>::type                        value_type;
+    typedef typename divide_typeof_helper< unit<Dim,System>,Unit >::type    unit_type;
+    typedef quantity<unit_type,value_type>                                  type;
+};
+
+/// quantity divided by unit typeof helper
+/// INTERNAL ONLY
+template<class Unit,
+         class System,
+         class Dim,
+         class X>
+struct divide_typeof_helper< quantity<Unit,X>,unit<Dim,System> >
+{
+    typedef X                                                               value_type;
+    typedef typename divide_typeof_helper< Unit,unit<Dim,System> >::type    unit_type;
+    typedef quantity<unit_type,value_type>                                  type;
+};
+
+/// quantity divided by quantity typeof helper
+/// INTERNAL ONLY
+template<class Unit1,
+         class Unit2,
+         class X,
+         class Y>
+struct divide_typeof_helper< quantity<Unit1,X>,quantity<Unit2,Y> >
+{
+    typedef typename divide_typeof_helper<X,Y>::type            value_type;
+    typedef typename divide_typeof_helper<Unit1,Unit2>::type    unit_type;
+    typedef quantity<unit_type,value_type>                      type;
+};
+
+/// specialize power typeof helper
+/// INTERNAL ONLY
+template<class Unit,long N,long D,class Y> 
+struct power_typeof_helper< quantity<Unit,Y>,static_rational<N,D> >                
+{ 
+    typedef typename power_typeof_helper<Y,static_rational<N,D> >::type     value_type;
+    typedef typename power_typeof_helper<Unit,static_rational<N,D> >::type  unit_type;
+    typedef quantity<unit_type,value_type>                                  type; 
+    
+    static type value(const quantity<Unit,Y>& x)  
+    { 
+        return type::from_value(power_typeof_helper<Y,static_rational<N,D> >::value(x.value()));
+    }
+};
+
+/// specialize root typeof helper
+/// INTERNAL ONLY
+template<class Unit,long N,long D,class Y> 
+struct root_typeof_helper< quantity<Unit,Y>,static_rational<N,D> >                
+{ 
+    typedef typename root_typeof_helper<Y,static_rational<N,D> >::type      value_type;
+    typedef typename root_typeof_helper<Unit,static_rational<N,D> >::type   unit_type;
+    typedef quantity<unit_type,value_type>                                  type;
+    
+    static type value(const quantity<Unit,Y>& x)  
+    { 
+        return type::from_value(root_typeof_helper<Y,static_rational<N,D> >::value(x.value()));
+    }
+};
+
+/// runtime unit times scalar
+/// INTERNAL ONLY
+template<class System,
+         class Dim,
+         class Y>
+inline
+typename multiply_typeof_helper< unit<Dim,System>,Y >::type
+operator*(const unit<Dim,System>&,const Y& rhs)
+{
+    typedef typename multiply_typeof_helper< unit<Dim,System>,Y >::type type;
+    
+    return type::from_value(rhs);
+}
+
+/// runtime unit divided by scalar
+template<class System,
+         class Dim,
+         class Y>
+inline
+typename divide_typeof_helper< unit<Dim,System>,Y >::type
+operator/(const unit<Dim,System>&,const Y& rhs)
+{
+    typedef typename divide_typeof_helper<unit<Dim,System>,Y>::type type;
+    
+    return type::from_value(Y(1)/rhs);
+}
+
+/// runtime scalar times unit
+template<class System,
+         class Dim,
+         class Y>
+inline
+typename multiply_typeof_helper< Y,unit<Dim,System> >::type
+operator*(const Y& lhs,const unit<Dim,System>&)
+{
+    typedef typename multiply_typeof_helper< Y,unit<Dim,System> >::type type;
+    
+    return type::from_value(lhs);
+}
+
+/// runtime scalar divided by unit
+template<class System,
+         class Dim,
+         class Y>
+inline
+typename divide_typeof_helper< Y,unit<Dim,System> >::type
+operator/(const Y& lhs,const unit<Dim,System>&)
+{
+    typedef typename divide_typeof_helper< Y,unit<Dim,System> >::type   type;
+    
+    return type::from_value(lhs);
+}
+
+///// runtime quantity times scalar
+//template<class Unit,
+//         class X,
+//         class Y>
+//inline
+//typename multiply_typeof_helper< quantity<Unit,X>,Y >::type
+//operator*(const quantity<Unit,X>& lhs,const Y& rhs)
+//{
+//    typedef typename multiply_typeof_helper< quantity<Unit,X>,Y >::type type;
+//    
+//    return type::from_value(lhs.value()*rhs);
+//}
+//
+///// runtime scalar times quantity
+//template<class Unit,
+//         class X,
+//         class Y>
+//inline
+//typename multiply_typeof_helper< X,quantity<Unit,Y> >::type
+//operator*(const X& lhs,const quantity<Unit,Y>& rhs)
+//{
+//    typedef typename multiply_typeof_helper< X,quantity<Unit,Y> >::type type;
+//    
+//    return type::from_value(lhs*rhs.value());
+//}
+
+/// runtime quantity times scalar
+template<class Unit,
+         class X>
+inline
+typename multiply_typeof_helper< quantity<Unit,X>,X >::type
+operator*(const quantity<Unit,X>& lhs,const X& rhs)
+{
+    typedef typename multiply_typeof_helper< quantity<Unit,X>,X >::type type;
+    
+    return type::from_value(lhs.value()*rhs);
+}
+
+/// runtime scalar times quantity
+template<class Unit,
+         class X>
+inline
+typename multiply_typeof_helper< X,quantity<Unit,X> >::type
+operator*(const X& lhs,const quantity<Unit,X>& rhs)
+{
+    typedef typename multiply_typeof_helper< X,quantity<Unit,X> >::type type;
+    
+    return type::from_value(lhs*rhs.value());
+}
+
+///// runtime quantity divided by scalar
+//template<class Unit,
+//         class X,
+//         class Y>
+//inline
+//typename divide_typeof_helper< quantity<Unit,X>,Y >::type
+//operator/(const quantity<Unit,X>& lhs,const Y& rhs)
+//{
+//    typedef typename divide_typeof_helper< quantity<Unit,X>,Y >::type   type;
+//    
+//    return type::from_value(lhs.value()/rhs);
+//}
+//
+///// runtime scalar divided by quantity
+//template<class Unit,
+//         class X,
+//         class Y>
+//inline
+//typename divide_typeof_helper< X,quantity<Unit,Y> >::type
+//operator/(const X& lhs,const quantity<Unit,Y>& rhs)
+//{
+//    typedef typename divide_typeof_helper< X,quantity<Unit,Y> >::type   type;
+//    
+//    return type::from_value(lhs/rhs.value());
+//}
+
+/// runtime quantity divided by scalar
+template<class Unit,
+         class X>
+inline
+typename divide_typeof_helper< quantity<Unit,X>,X >::type
+operator/(const quantity<Unit,X>& lhs,const X& rhs)
+{
+    typedef typename divide_typeof_helper< quantity<Unit,X>,X >::type   type;
+    
+    return type::from_value(lhs.value()/rhs);
+}
+
+/// runtime scalar divided by quantity
+template<class Unit,
+         class X>
+inline
+typename divide_typeof_helper< X,quantity<Unit,X> >::type
+operator/(const X& lhs,const quantity<Unit,X>& rhs)
+{
+    typedef typename divide_typeof_helper< X,quantity<Unit,X> >::type   type;
+    
+    return type::from_value(lhs/rhs.value());
+}
+
+/// runtime unit times quantity
+template<class System1,
+         class Dim1,
+         class Unit2,
+         class Y>
+inline
+typename multiply_typeof_helper< unit<Dim1,System1>,quantity<Unit2,Y> >::type
+operator*(const unit<Dim1,System1>&,const quantity<Unit2,Y>& rhs)
+{
+    typedef typename multiply_typeof_helper< unit<Dim1,System1>,quantity<Unit2,Y> >::type  type;
+    
+    return type::from_value(rhs.value());
+}
+
+/// runtime unit divided by quantity
+template<class System1,
+         class Dim1,
+         class Unit2,
+         class Y>
+inline
+typename divide_typeof_helper< unit<Dim1,System1>,quantity<Unit2,Y> >::type
+operator/(const unit<Dim1,System1>&,const quantity<Unit2,Y>& rhs)
+{
+    typedef typename divide_typeof_helper< unit<Dim1,System1>,quantity<Unit2,Y> >::type    type;
+    
+    return type::from_value(Y(1)/rhs.value());
+}
+
+/// runtime quantity times unit
+template<class Unit1,
+         class System2,
+         class Dim2,
+         class Y>
+inline
+typename multiply_typeof_helper< quantity<Unit1,Y>,unit<Dim2,System2> >::type
+operator*(const quantity<Unit1,Y>& lhs,const unit<Dim2,System2>&)
+{
+    typedef typename multiply_typeof_helper< quantity<Unit1,Y>,unit<Dim2,System2> >::type  type;
+    
+    return type::from_value(lhs.value());
+}
+
+/// runtime quantity divided by unit
+template<class Unit1,
+         class System2,
+         class Dim2,
+         class Y>
+inline
+typename divide_typeof_helper< quantity<Unit1,Y>,unit<Dim2,System2> >::type
+operator/(const quantity<Unit1,Y>& lhs,const unit<Dim2,System2>&)
+{
+    typedef typename divide_typeof_helper< quantity<Unit1,Y>,unit<Dim2,System2> >::type    type;
+    
+    return type::from_value(lhs.value());
+}
+
+/// runtime unary plus quantity
+template<class Unit,class Y>
+typename unary_plus_typeof_helper< quantity<Unit,Y> >::type
+operator+(const quantity<Unit,Y>& val)
+{ 
+    typedef typename unary_plus_typeof_helper< quantity<Unit,Y> >::type     type;
+    
+    return type::from_value(+val.value());
+}
+
+/// runtime unary minus quantity
+template<class Unit,class Y>
+typename unary_minus_typeof_helper< quantity<Unit,Y> >::type
+operator-(const quantity<Unit,Y>& val)
+{ 
+    typedef typename unary_minus_typeof_helper< quantity<Unit,Y> >::type    type;
+    
+    return type::from_value(-val.value());
+}
+
+/// runtime quantity plus quantity
+template<class Unit1,
+         class Unit2,
+         class X,
+         class Y>
+inline
+typename add_typeof_helper< quantity<Unit1,X>,quantity<Unit2,Y> >::type
+operator+(const quantity<Unit1,X>& lhs,
+          const quantity<Unit2,Y>& rhs)
+{
+    typedef typename add_typeof_helper< quantity<Unit1,X>,quantity<Unit2,Y> >::type     type;
+    
+    return type::from_value(lhs.value()+rhs.value());
+}
+
+/// runtime quantity minus quantity
+template<class Unit1,
+         class Unit2,
+         class X,
+         class Y>
+inline
+typename subtract_typeof_helper< quantity<Unit1,X>,quantity<Unit2,Y> >::type
+operator-(const quantity<Unit1,X>& lhs,
+          const quantity<Unit2,Y>& rhs)
+{
+    typedef typename subtract_typeof_helper< quantity<Unit1,X>,quantity<Unit2,Y> >::type    type;
+    
+    return type::from_value(lhs.value()-rhs.value());
+}
+
+/// runtime quantity times quantity
+template<class Unit1,
+         class Unit2,
+         class X,
+         class Y>
+inline
+typename multiply_typeof_helper< quantity<Unit1,X>,quantity<Unit2,Y> >::type
+operator*(const quantity<Unit1,X>& lhs,
+          const quantity<Unit2,Y>& rhs)
+{
+    typedef typename multiply_typeof_helper< quantity<Unit1,X>,
+                                             quantity<Unit2,Y> >::type type;
+    
+    return type::from_value(lhs.value()*rhs.value());
+}
+
+/// runtime quantity divided by quantity
+template<class Unit1,
+         class Unit2,
+         class X,
+         class Y>
+inline
+typename divide_typeof_helper< quantity<Unit1,X>,quantity<Unit2,Y> >::type
+operator/(const quantity<Unit1,X>& lhs,
+          const quantity<Unit2,Y>& rhs)
+{
+    typedef typename divide_typeof_helper< quantity<Unit1,X>,
+                                           quantity<Unit2,Y> >::type   type;
+    
+    return type::from_value(lhs.value()/rhs.value());
+}
+
+/// runtime operator==
+template<class Unit,
+         class X,
+         class Y>
+inline
+bool 
+operator==(const quantity<Unit,X>& val1,
+           const quantity<Unit,Y>& val2)
+{
+    return val1.value() == val2.value();
+}
+
+/// runtime operator!=
+template<class Unit,
+         class X,
+         class Y>
+inline
+bool 
+operator!=(const quantity<Unit,X>& val1,
+           const quantity<Unit,Y>& val2)
+{
+    return val1.value() != val2.value();
+}
+
+/// runtime operator<
+template<class Unit,
+         class X,
+         class Y>
+inline
+bool 
+operator<(const quantity<Unit,X>& val1,
+          const quantity<Unit,Y>& val2)
+{
+    return val1.value() < val2.value();
+}
+
+/// runtime operator<=
+template<class Unit,
+         class X,
+         class Y>
+inline
+bool 
+operator<=(const quantity<Unit,X>& val1,
+           const quantity<Unit,Y>& val2)
+{
+    return val1.value() <= val2.value();
+}
+
+/// runtime operator>
+template<class Unit,
+         class X,
+         class Y>
+inline
+bool 
+operator>(const quantity<Unit,X>& val1,
+          const quantity<Unit,Y>& val2)
+{
+    return val1.value() > val2.value();
+}
+
+/// runtime operator>=
+template<class Unit,
+         class X,
+         class Y>
+inline
+bool 
+operator>=(const quantity<Unit,X>& val1,
+           const quantity<Unit,Y>& val2)
+{
+    return val1.value() >= val2.value();
+}
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_QUANTITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/reduce_unit.hpp b/deal.II/contrib/boost/include/boost/units/reduce_unit.hpp
new file mode 100644 (file)
index 0000000..5c6742b
--- /dev/null
@@ -0,0 +1,38 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_REDUCE_UNIT_HPP_INCLUDED
+#define BOOST_UNITS_REDUCE_UNIT_HPP_INCLUDED
+
+namespace boost {
+namespace units {
+
+#ifdef BOOST_UNITS_DOXYGEN
+
+/// Returns a unique type for every unit.
+template<class Unit>
+struct reduce_unit {
+    typedef detail::unspecified type;
+};
+
+#else
+
+// default implementation: return Unit unchanged.
+template<class Unit>
+struct reduce_unit {
+    typedef Unit type;
+};
+
+#endif
+
+}
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/scale.hpp b/deal.II/contrib/boost/include/boost/units/scale.hpp
new file mode 100644 (file)
index 0000000..05a389f
--- /dev/null
@@ -0,0 +1,137 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SCALE_HPP_INCLUDED
+#define BOOST_UNITS_SCALE_HPP_INCLUDED
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/detail/one.hpp>
+#include <boost/units/detail/static_rational_power.hpp>
+
+namespace boost {
+
+namespace units {
+
+template<class S, class Scale>
+struct scaled_base_unit;
+
+/// class representing a scaling factor such as 10^3
+/// The exponent should be a static rational.
+template<long Base, class Exponent>
+struct scale
+{
+    static const long base = Base;
+    typedef Exponent exponent;
+    typedef double value_type;
+    static value_type value() { return(detail::static_rational_power<Exponent>(static_cast<double>(base))); }
+    // These need to be defined in specializations for
+    // printing to work.
+    // static std::string name();
+    // static std::string symbol();
+};
+
+template<long Base, class Exponent>
+const long scale<Base, Exponent>::base;
+
+/// INTERNAL ONLY
+template<long Base>
+struct scale<Base, static_rational<0> >
+{
+    static const long base = Base;
+    typedef static_rational<0> exponent;
+    typedef one value_type;
+    static one value() { one result; return(result); }
+    static std::string name() { return(""); }
+    static std::string symbol() { return(""); }
+};
+
+template<long Base>
+const long scale<Base, static_rational<0> >::base;
+
+template<long Base,class Exponent>
+std::string symbol_string(const scale<Base,Exponent>&)
+{
+    return scale<Base,Exponent>::symbol();
+}
+
+template<long Base,class Exponent>
+std::string name_string(const scale<Base,Exponent>&)
+{
+    return scale<Base,Exponent>::name();
+}
+
+#ifndef BOOST_UNITS_DOXYGEN
+
+#define BOOST_UNITS_SCALE_SPECIALIZATION(base_,exponent_,val_,name_,symbol_) \
+template<>                                                                   \
+struct scale<base_, exponent_ >                                              \
+{                                                                            \
+    static const long base = base_;                                          \
+    typedef exponent_ exponent;                                              \
+    typedef double value_type;                                               \
+    static value_type value()   { return(val_); }                            \
+    static std::string name()   { return(#name_); }                          \
+    static std::string symbol() { return(#symbol_); }                        \
+}
+
+#define BOOST_UNITS_SCALE_DEF(exponent_,value_,name_,symbol_)                 \
+BOOST_UNITS_SCALE_SPECIALIZATION(10,static_rational<exponent_>,value_, name_, symbol_)
+
+BOOST_UNITS_SCALE_DEF(-24, 1e-24 ,yocto, y);
+BOOST_UNITS_SCALE_DEF(-21, 1e-21, zepto, z);
+BOOST_UNITS_SCALE_DEF(-18, 1e-18, atto, a);
+BOOST_UNITS_SCALE_DEF(-15, 1e-15, femto, f);
+BOOST_UNITS_SCALE_DEF(-12, 1e-12, pico, p);
+BOOST_UNITS_SCALE_DEF(-9, 1e-9, nano, n);
+BOOST_UNITS_SCALE_DEF(-6, 1e-6, micro, u);
+BOOST_UNITS_SCALE_DEF(-3, 1e-3, milli, m);
+BOOST_UNITS_SCALE_DEF(-2, 1e-2, centi, c);
+BOOST_UNITS_SCALE_DEF(-1, 1e-1, deci, d);
+
+BOOST_UNITS_SCALE_DEF(1, 1e1, deka, da);
+BOOST_UNITS_SCALE_DEF(2, 1e2, hecto, h);
+BOOST_UNITS_SCALE_DEF(3, 1e3, kilo, k);
+BOOST_UNITS_SCALE_DEF(6, 1e6, mega, M);
+BOOST_UNITS_SCALE_DEF(9, 1e9, giga, G);
+BOOST_UNITS_SCALE_DEF(12, 1e12, tera, T);
+BOOST_UNITS_SCALE_DEF(15, 1e15, peta, P);
+BOOST_UNITS_SCALE_DEF(18, 1e18, exa, E);
+BOOST_UNITS_SCALE_DEF(21, 1e21, zetta, Z);
+BOOST_UNITS_SCALE_DEF(24, 1e24, yotta, Y);
+
+BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<10>, 1024.0, kibi, Ki);
+BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<20>, 1048576.0, mebi, Mi);
+BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<30>, 1073741824.0, gibi, Gi);
+BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<40>, 1099511627776.0, tebi, Ti);
+BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<50>, 1125899906842624.0, pebi, Pi);
+BOOST_UNITS_SCALE_SPECIALIZATION(2, static_rational<60>, 1152921504606846976.0, exbi, Ei);
+
+#undef BOOST_UNITS_SCALE_DEF
+#undef BOOST_UNITS_SCALE_SPECIALIZATION
+
+#endif
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::scale, (long)(class))
+
+#endif
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/scaled_base_unit.hpp b/deal.II/contrib/boost/include/boost/units/scaled_base_unit.hpp
new file mode 100644 (file)
index 0000000..201de5e
--- /dev/null
@@ -0,0 +1,146 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SCALED_BASE_UNIT_HPP_INCLUDED
+#define BOOST_UNITS_SCALED_BASE_UNIT_HPP_INCLUDED
+
+#include <string>
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/less.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/detail/ice_and.hpp>
+#include <boost/type_traits/detail/ice_or.hpp>
+
+#include <boost/units/config.hpp>
+#include <boost/units/dimension.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/units_fwd.hpp>
+
+namespace boost {
+
+namespace units {
+
+template<class T>
+struct heterogeneous_system;
+
+template<class T, class D, class Scale>
+struct heterogeneous_system_impl;
+
+template<class T, class E>
+struct heterogeneous_system_dim;
+
+template<class T>
+struct base_unit_info;
+
+/// INTERNAL ONLY
+struct scaled_base_unit_tag {};
+
+template<class S, class Scale>
+struct scaled_base_unit
+{
+    /// INTERNAL ONLY
+    typedef void boost_units_is_base_unit_type;
+    typedef scaled_base_unit type;
+    typedef scaled_base_unit_tag tag;
+    typedef S system_type;
+    typedef Scale scale_type;
+    typedef typename S::dimension_type dimension_type;
+
+#ifdef BOOST_UNITS_DOXYGEN
+
+    typedef detail::unspecified unit_type;
+
+#else
+
+    typedef unit<
+        dimension_type,
+        heterogeneous_system<
+            heterogeneous_system_impl<
+                list<
+                    heterogeneous_system_dim<scaled_base_unit,static_rational<1> >,
+                    dimensionless_type
+                >,
+                dimension_type,
+                dimensionless_type
+            >
+        >
+    > unit_type;
+
+#endif
+
+    static std::string symbol()
+    {
+        return(Scale::symbol() + base_unit_info<S>::symbol());
+    }
+    static std::string name()
+    {
+        return(Scale::name() + base_unit_info<S>::name());
+    }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::scaled_base_unit, (class)(class))
+
+#endif
+
+namespace boost {
+
+#ifndef BOOST_UNITS_DOXYGEN
+
+namespace mpl {
+
+/// INTERNAL ONLY
+template<class Tag>
+struct less_impl<boost::units::scaled_base_unit_tag, Tag>
+{
+    template<class T0, class T1>
+    struct apply : mpl::bool_<
+        boost::type_traits::ice_or<(mpl::less<typename T0::system_type, T1>::value),
+        (boost::type_traits::ice_and<boost::is_same<typename T0::system_type, T1>::value, (T0::scale_type::exponent::Numerator) < 0>::value)>::value> {};
+};
+
+/// INTERNAL ONLY
+template<class Tag>
+struct less_impl<Tag, boost::units::scaled_base_unit_tag>
+{
+    template<class T0, class T1>
+    struct apply : mpl::bool_<
+        boost::type_traits::ice_or<(mpl::less<T0, typename T1::system_type>::value),
+        boost::type_traits::ice_and<(boost::is_same<T0, typename T1::system_type>::value), ((T1::scale_type::exponent::Numerator) > 0)>::value>::value> {};
+};
+
+/// INTERNAL ONLY
+template<>
+struct less_impl<boost::units::scaled_base_unit_tag, boost::units::scaled_base_unit_tag>
+{
+    template<class T0, class T1>
+    struct apply : mpl::bool_<
+        boost::type_traits::ice_or<(mpl::less<typename T0::system_type, typename T1::system_type>::value),
+        boost::type_traits::ice_and<(boost::is_same<typename T0::system_type, typename T1::system_type>::value),
+        boost::type_traits::ice_or<((T0::scale_type::base) < (T1::scale_type::base)),
+        boost::type_traits::ice_and<((T0::scale_type::base) == (T1::scale_type::base)),
+        (mpl::less<typename T0::scale_type::exponent,typename T1::scale_type::exponent>::value)>::value>::value>::value>::value> {};
+};
+
+} // namespace mpl
+
+#endif
+
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/static_constant.hpp b/deal.II/contrib/boost/include/boost/units/static_constant.hpp
new file mode 100644 (file)
index 0000000..9026b3f
--- /dev/null
@@ -0,0 +1,57 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_STATIC_CONSTANT_HPP
+#define BOOST_UNITS_STATIC_CONSTANT_HPP
+
+#include <boost/units/config.hpp>
+
+/// A convenience macro that allows definition of static
+/// constants in headers in an ODR-safe way.
+#define BOOST_UNITS_STATIC_CONSTANT(name, type)             \
+template<bool b>                                            \
+struct name##_instance_t                                    \
+{                                                           \
+    static const type instance;                             \
+};                                                          \
+                                                            \
+namespace                                                   \
+{                                                           \
+    static const type& name = name##_instance_t<true>::instance;   \
+}                                                           \
+                                                            \
+template<bool b>                                            \
+const type name##_instance_t<b>::instance
+
+/// A convenience macro for static constants with auto 
+/// type deduction. 
+#if BOOST_UNITS_HAS_TYPEOF
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#define BOOST_UNITS_AUTO_STATIC_CONSTANT(name, value)               \
+BOOST_TYPEOF_NESTED_TYPEDEF(name##_nested_t, value)                 \
+BOOST_UNITS_STATIC_CONSTANT(name, name##_nested_t::type) = (value)
+
+#elif BOOST_UNITS_HAS_MWERKS_TYPEOF
+
+#define BOOST_UNITS_AUTO_STATIC_CONSTANT(name, value)               \
+BOOST_UNITS_STATIC_CONSTANT(name, __typeof__(value)) = (value)
+
+#elif BOOST_UNITS_HAS_GNU_TYPEOF
+
+#define BOOST_UNITS_AUTO_STATIC_CONSTANT(name, value)               \
+BOOST_UNITS_STATIC_CONSTANT(name, typeof(value)) = (value)
+
+#endif // BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#endif // BOOST_UNITS_HAS_TYPEOF
+
+#endif // BOOST_UNITS_STATIC_CONSTANT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/static_rational.hpp b/deal.II/contrib/boost/include/boost/units/static_rational.hpp
new file mode 100644 (file)
index 0000000..2a630ec
--- /dev/null
@@ -0,0 +1,349 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_STATIC_RATIONAL_HPP 
+#define BOOST_UNITS_STATIC_RATIONAL_HPP
+
+#include <boost/math/common_factor_ct.hpp>
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/arithmetic.hpp>
+
+#ifdef __BORLANDC__
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/integral_c.hpp>
+#include <boost/mpl/identity.hpp>
+#endif
+
+#include <boost/units/config.hpp>
+#include <boost/units/operators.hpp>
+
+/// \file 
+/// \brief Compile-time rational numbers and operators.
+
+namespace boost {
+
+namespace units { 
+
+namespace detail {
+
+struct static_rational_tag {};
+
+}
+
+typedef long   integer_type;
+
+/// Compile time absolute value.
+template<integer_type Value>
+struct static_abs
+{
+    BOOST_STATIC_CONSTANT(integer_type,value = Value < 0 ? -Value : Value);
+};
+
+/// Compile time rational number.
+/** 
+This is an implementation of a compile time rational number, where @c static_rational<N,D> represents
+a rational number with numerator @c N and denominator @c D. Because of the potential for ambiguity arising 
+from multiple equivalent values of @c static_rational (e.g. @c static_rational<6,2>==static_rational<3>), 
+static rationals should always be accessed through @c static_rational<N,D>::type. Template specialization 
+prevents instantiation of zero denominators (i.e. @c static_rational<N,0>). The following compile-time 
+arithmetic operators are provided for static_rational variables only (no operators are defined between 
+long and static_rational):
+    - @c mpl::negate
+    - @c mpl::plus
+    - @c mpl::minus
+    - @c mpl::times
+    - @c mpl::divides
+
+Neither @c static_power nor @c static_root are defined for @c static_rational. This is because template types 
+may not be floating point values, while powers and roots of rational numbers can produce floating point 
+values. 
+*/
+#ifdef __BORLANDC__
+
+template<integer_type X>
+struct make_integral_c {
+    typedef boost::mpl::integral_c<integer_type, X> type;
+};
+
+template<integer_type N,integer_type D = 1>
+class static_rational
+{
+    public:
+
+        typedef static_rational this_type;
+
+        typedef boost::mpl::integral_c<integer_type, N> N_type;
+        typedef boost::mpl::integral_c<integer_type, D> D_type;
+
+        typedef typename make_integral_c<
+            (::boost::math::static_gcd<
+                ::boost::units::static_abs<N>::value,
+                ::boost::units::static_abs<D>::value
+            >::value)>::type gcd_type;
+        typedef typename boost::mpl::eval_if<
+            boost::mpl::less<
+                D_type,
+                boost::mpl::integral_c<integer_type, 0>
+            >,
+            boost::mpl::negate<gcd_type>,
+            gcd_type
+        >::type den_type;
+        
+    public: 
+        // for mpl arithmetic support
+        typedef detail::static_rational_tag tag;
+        
+        BOOST_STATIC_CONSTANT(integer_type, Numerator =
+            (::boost::mpl::divides<N_type, den_type>::value));
+        BOOST_STATIC_CONSTANT(integer_type, Denominator =
+            (::boost::mpl::divides<D_type, den_type>::value));
+        
+        /// INTERNAL ONLY
+        typedef static_rational<N,D>    this_type;
+        
+        /// static_rational<N,D> reduced by GCD
+        typedef static_rational<
+            (::boost::mpl::divides<N_type, den_type>::value),
+            (::boost::mpl::divides<D_type, den_type>::value)
+        >  type;
+                                 
+        static integer_type numerator()      { return Numerator; }
+        static integer_type denominator()    { return Denominator; }
+        
+        // INTERNAL ONLY
+        static_rational() { }
+        //~static_rational() { }
+};
+#else
+template<integer_type N,integer_type D = 1>
+class static_rational
+{
+    private:
+
+        static const integer_type   nabs = static_abs<N>::value,
+                                    dabs = static_abs<D>::value;
+        
+        /// greatest common divisor of N and D
+        // need cast to signed because static_gcd returns unsigned long
+        static const integer_type   den = 
+            static_cast<integer_type>(boost::math::static_gcd<nabs,dabs>::value) * ((D < 0) ? -1 : 1);
+        
+    public: 
+        // for mpl arithmetic support
+        typedef detail::static_rational_tag tag;
+        
+        static const integer_type   Numerator = N/den,
+            Denominator = D/den;
+        
+        /// INTERNAL ONLY
+        typedef static_rational<N,D>    this_type;
+        
+        /// static_rational<N,D> reduced by GCD
+        typedef static_rational<Numerator,Denominator>  type;
+                                 
+        static integer_type numerator()      { return Numerator; }
+        static integer_type denominator()    { return Denominator; }
+        
+        // INTERNAL ONLY
+        static_rational() { }
+        //~static_rational() { }   
+};
+#endif
+
+}
+
+}
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::static_rational, (long)(long))
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+// prohibit zero denominator
+template<integer_type N> class static_rational<N,0>;
+
+/// get decimal value of @c static_rational
+template<class T,integer_type N,integer_type D>
+inline typename divide_typeof_helper<T,T>::type 
+value(const static_rational<N,D>&)
+{
+    return T(N)/T(D);
+}
+
+} // namespace units
+
+#ifndef BOOST_UNITS_DOXYGEN
+
+namespace mpl {
+
+#ifdef __BORLANDC__
+
+template<>
+struct plus_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply {
+        typedef typename boost::units::static_rational<
+            ::boost::mpl::plus<
+                boost::mpl::times<typename T0::N_type, typename T1::D_type>,
+                boost::mpl::times<typename T1::N_type, typename T0::D_type>
+            >::value,
+            ::boost::mpl::times<typename T0::D_type, typename T1::D_type>::value
+        >::type type;
+    };
+};
+
+template<>
+struct minus_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply {
+        typedef typename boost::units::static_rational<
+            ::boost::mpl::minus<
+                boost::mpl::times<typename T0::N_type, typename T1::D_type>,
+                boost::mpl::times<typename T1::N_type, typename T0::D_type>
+            >::value,
+            ::boost::mpl::times<typename T0::D_type, typename T1::D_type>::value
+        >::type type;
+    };
+};
+
+template<>
+struct times_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply {
+        typedef typename boost::units::static_rational<
+            ::boost::mpl::times<typename T0::N_type, typename T1::N_type>::value,
+            ::boost::mpl::times<typename T0::D_type, typename T1::D_type>::value
+        >::type type;
+    };
+};
+
+template<>
+struct divides_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply {
+        typedef typename boost::units::static_rational<
+            ::boost::mpl::times<typename T0::N_type, typename T1::D_type>::value,
+            ::boost::mpl::times<typename T0::D_type, typename T1::N_type>::value
+        >::type type;
+    };
+};
+
+template<>
+struct negate_impl<boost::units::detail::static_rational_tag>
+{
+    template<class T0>
+    struct apply {
+        typedef typename boost::units::static_rational<
+            ::boost::mpl::negate<typename T0::N_type>::value,
+            ::boost::mpl::identity<T0>::type::Denominator
+        >::type type;
+    };
+};
+
+template<>
+struct less_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef mpl::bool_<((mpl::minus<T0, T1>::type::Numerator) < 0)> type;
+    };
+};
+
+#else
+
+template<>
+struct plus_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply {
+        typedef typename boost::units::static_rational<
+            T0::Numerator*T1::Denominator+T1::Numerator*T0::Denominator,
+            T0::Denominator*T1::Denominator
+        >::type type;
+    };
+};
+
+template<>
+struct minus_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply {
+        typedef typename boost::units::static_rational<
+            T0::Numerator*T1::Denominator-T1::Numerator*T0::Denominator,
+            T0::Denominator*T1::Denominator
+        >::type type;
+    };
+};
+
+template<>
+struct times_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply {
+        typedef typename boost::units::static_rational<
+            T0::Numerator*T1::Numerator,
+            T0::Denominator*T1::Denominator
+        >::type type;
+    };
+};
+
+template<>
+struct divides_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply {
+        typedef typename boost::units::static_rational<
+            T0::Numerator*T1::Denominator,
+            T0::Denominator*T1::Numerator
+        >::type type;
+    };
+};
+
+template<>
+struct negate_impl<boost::units::detail::static_rational_tag>
+{
+    template<class T0>
+    struct apply {
+        typedef typename boost::units::static_rational<-T0::Numerator,T0::Denominator>::type type;
+    };
+};
+
+template<>
+struct less_impl<boost::units::detail::static_rational_tag, boost::units::detail::static_rational_tag>
+{
+    template<class T0, class T1>
+    struct apply
+    {
+        typedef mpl::bool_<((mpl::minus<T0, T1>::type::Numerator) < 0)> type;
+    };
+};
+
+#endif
+
+
+}
+
+#endif
+
+} // namespace boost
+
+#endif // BOOST_UNITS_STATIC_RATIONAL_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/abstract.hpp b/deal.II/contrib/boost/include/boost/units/systems/abstract.hpp
new file mode 100644 (file)
index 0000000..9b449d6
--- /dev/null
@@ -0,0 +1,139 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ABSTRACT_HPP
+#define BOOST_UNITS_ABSTRACT_HPP
+
+#include <string>
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/unit.hpp>
+
+#include <boost/units/make_system.hpp>
+#include <boost/units/base_unit.hpp>
+
+#include <boost/units/physical_dimensions/amount.hpp>
+#include <boost/units/physical_dimensions/current.hpp>
+#include <boost/units/physical_dimensions/length.hpp>
+#include <boost/units/physical_dimensions/luminous_intensity.hpp>
+#include <boost/units/physical_dimensions/mass.hpp>
+#include <boost/units/physical_dimensions/plane_angle.hpp>
+#include <boost/units/physical_dimensions/solid_angle.hpp>
+#include <boost/units/physical_dimensions/temperature.hpp>
+#include <boost/units/physical_dimensions/time.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace abstract {
+
+struct length_unit_tag : base_unit<length_unit_tag, length_dimension, -30> { };
+struct mass_unit_tag : base_unit<mass_unit_tag, mass_dimension, -29> { };
+struct time_unit_tag : base_unit<time_unit_tag, time_dimension, -28> { };
+struct current_unit_tag : base_unit<current_unit_tag, current_dimension, -27> { };
+struct temperature_unit_tag : base_unit<temperature_unit_tag, temperature_dimension, -26> { };
+struct amount_unit_tag : base_unit<amount_unit_tag, amount_dimension, -25> { };
+struct luminous_intensity_unit_tag : base_unit<luminous_intensity_unit_tag, luminous_intensity_dimension, -24> { };
+struct plane_angle_unit_tag : base_unit<plane_angle_unit_tag, plane_angle_dimension, -23> { };
+struct solid_angle_unit_tag : base_unit<solid_angle_unit_tag, solid_angle_dimension, -22> { };
+
+typedef make_system<
+    length_unit_tag,
+    mass_unit_tag,
+    time_unit_tag,
+    current_unit_tag,
+    temperature_unit_tag,
+    amount_unit_tag,
+    luminous_intensity_unit_tag,
+    plane_angle_unit_tag,
+    solid_angle_unit_tag
+>::type system;
+
+typedef unit<length_dimension,system>                length;                 ///< abstract unit of length
+typedef unit<mass_dimension,system>                  mass;                   ///< abstract unit of mass
+typedef unit<time_dimension,system>                  time;                   ///< abstract unit of time
+typedef unit<current_dimension,system>               current;                ///< abstract unit of current
+typedef unit<temperature_dimension,system>           temperature;            ///< abstract unit of temperature
+typedef unit<amount_dimension,system>                amount;                 ///< abstract unit of amount
+typedef unit<luminous_intensity_dimension,system>    luminous_intensity;     ///< abstract unit of luminous intensity
+typedef unit<plane_angle_dimension,system>           plane_angle;            ///< abstract unit of plane angle
+typedef unit<solid_angle_dimension,system>           solid_angle;            ///< abstract unit of solid angle
+
+} // namespace abstract
+
+template<> 
+struct base_unit_info<abstract::length_unit_tag> 
+{ 
+    static std::string name()       { return "[Length]"; }
+    static std::string symbol()     { return "[L]"; }
+};
+
+template<> 
+struct base_unit_info<abstract::mass_unit_tag> 
+{ 
+    static std::string name()       { return "[Mass]"; }
+    static std::string symbol()     { return "[M]"; }
+};
+
+template<> 
+struct base_unit_info<abstract::time_unit_tag> 
+{ 
+    static std::string name()       { return "[Time]"; }
+    static std::string symbol()     { return "[T]"; }
+};
+
+template<> 
+struct base_unit_info<abstract::current_unit_tag> 
+{ 
+    static std::string name()       { return "[Electric Current]"; }
+    static std::string symbol()     { return "[I]"; }
+};
+
+template<> 
+struct base_unit_info<abstract::temperature_unit_tag> 
+{ 
+    static std::string name()       { return "[Temperature]"; }
+    static std::string symbol()     { return "[Theta]"; }
+};
+
+template<> 
+struct base_unit_info<abstract::amount_unit_tag> 
+{ 
+    static std::string name()       { return "[Amount]"; }
+    static std::string symbol()     { return "[N]"; }
+};
+
+template<> 
+struct base_unit_info<abstract::luminous_intensity_unit_tag> 
+{ 
+    static std::string name()       { return "[Luminous Intensity]"; }
+    static std::string symbol()     { return "[J]"; }
+};
+
+template<> 
+struct base_unit_info<abstract::plane_angle_unit_tag> 
+{ 
+    static std::string name()       { return "[Plane Angle]"; }
+    static std::string symbol()     { return "[QP]"; }
+};
+
+template<> 
+struct base_unit_info<abstract::solid_angle_unit_tag> 
+{ 
+    static std::string name()       { return "[Solid Angle]"; }
+    static std::string symbol()     { return "[QS]"; }
+};
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ABSTRACT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/angle/degrees.hpp b/deal.II/contrib/boost/include/boost/units/systems/angle/degrees.hpp
new file mode 100644 (file)
index 0000000..5aa8250
--- /dev/null
@@ -0,0 +1,43 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ANGLE_DEGREE_HPP
+#define BOOST_UNITS_ANGLE_DEGREE_HPP
+
+#include <boost/config/no_tr1/cmath.hpp>
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/io.hpp>
+#include <boost/units/static_constant.hpp>
+#include <boost/units/unit.hpp>
+#include <boost/units/make_system.hpp>
+#include <boost/units/base_units/angle/degree.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace degree {
+
+typedef make_system<boost::units::angle::degree_base_unit>::type system;
+
+typedef unit<dimensionless_type,system>         dimensionless;
+typedef unit<plane_angle_dimension,system>      plane_angle;           ///< angle degree unit constant
+
+BOOST_UNITS_STATIC_CONSTANT(degree,plane_angle);
+BOOST_UNITS_STATIC_CONSTANT(degrees,plane_angle);
+
+} // namespace degree
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ANGLE_DEGREE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/angle/gradians.hpp b/deal.II/contrib/boost/include/boost/units/systems/angle/gradians.hpp
new file mode 100644 (file)
index 0000000..3fc23f7
--- /dev/null
@@ -0,0 +1,43 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ANGLE_GRADIANS_HPP
+#define BOOST_UNITS_ANGLE_GRADIANS_HPP
+
+#include <boost/config/no_tr1/cmath.hpp>
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/io.hpp>
+#include <boost/units/quantity.hpp>
+#include <boost/units/static_constant.hpp>
+#include <boost/units/make_system.hpp>
+#include <boost/units/base_units/angle/gradian.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace gradian {
+
+typedef make_system<boost::units::angle::gradian_base_unit>::type system;
+
+typedef unit<dimensionless_type,system>         dimensionless;
+typedef unit<plane_angle_dimension,system>      plane_angle;          ///< angle gradian unit constant
+
+BOOST_UNITS_STATIC_CONSTANT(gradian,plane_angle);
+BOOST_UNITS_STATIC_CONSTANT(gradians,plane_angle);
+
+} // namespace gradian
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ANGLE_GRADIANS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/angle/revolutions.hpp b/deal.II/contrib/boost/include/boost/units/systems/angle/revolutions.hpp
new file mode 100644 (file)
index 0000000..835a34e
--- /dev/null
@@ -0,0 +1,43 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_ANGLE_REVOLUTIONS_HPP
+#define BOOST_UNITS_ANGLE_REVOLUTIONS_HPP
+
+#include <boost/config/no_tr1/cmath.hpp>
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/io.hpp>
+#include <boost/units/quantity.hpp>
+#include <boost/units/static_constant.hpp>
+#include <boost/units/make_system.hpp>
+#include <boost/units/base_units/angle/revolution.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace revolution {
+
+typedef make_system<boost::units::angle::revolution_base_unit>::type system;
+
+typedef unit<dimensionless_type,system>         dimensionless;
+typedef unit<plane_angle_dimension,system>      plane_angle;          ///< angle revolution unit constant
+
+BOOST_UNITS_STATIC_CONSTANT(revolution,plane_angle);
+BOOST_UNITS_STATIC_CONSTANT(revolutions,plane_angle);
+
+} // namespace revolution
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_ANGLE_REVOLUTIONS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs.hpp
new file mode 100644 (file)
index 0000000..0d61bfc
--- /dev/null
@@ -0,0 +1,44 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_HPP
+#define BOOST_UNITS_CGS_HPP
+
+/// \file
+/// Includes all the cgs unit headers
+
+#include <string>
+
+#include <boost/units/quantity.hpp>
+
+#include <boost/units/systems/cgs/base.hpp>
+
+#include <boost/units/systems/cgs/dimensionless.hpp>
+#include <boost/units/systems/cgs/length.hpp>
+#include <boost/units/systems/cgs/mass.hpp>
+#include <boost/units/systems/cgs/time.hpp>
+
+#include <boost/units/systems/cgs/acceleration.hpp>
+#include <boost/units/systems/cgs/area.hpp>
+#include <boost/units/systems/cgs/current.hpp>
+#include <boost/units/systems/cgs/dynamic_viscosity.hpp>
+#include <boost/units/systems/cgs/energy.hpp>
+#include <boost/units/systems/cgs/force.hpp>
+#include <boost/units/systems/cgs/frequency.hpp>
+#include <boost/units/systems/cgs/kinematic_viscosity.hpp>
+#include <boost/units/systems/cgs/mass_density.hpp>
+#include <boost/units/systems/cgs/momentum.hpp>
+#include <boost/units/systems/cgs/power.hpp>
+#include <boost/units/systems/cgs/pressure.hpp>
+#include <boost/units/systems/cgs/velocity.hpp>
+#include <boost/units/systems/cgs/volume.hpp>
+#include <boost/units/systems/cgs/wavenumber.hpp>
+
+#endif // BOOST_UNITS_CGS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/acceleration.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/acceleration.hpp
new file mode 100644 (file)
index 0000000..f84c715
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_ACCELERATION_HPP
+#define BOOST_UNITS_CGS_ACCELERATION_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/acceleration.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<acceleration_dimension,cgs::system>     acceleration;
+
+BOOST_UNITS_STATIC_CONSTANT(gal,acceleration);  
+BOOST_UNITS_STATIC_CONSTANT(gals,acceleration); 
+                                                    
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_ACCELERATION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/area.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/area.hpp
new file mode 100644 (file)
index 0000000..1069251
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_AREA_HPP
+#define BOOST_UNITS_CGS_AREA_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/area.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<area_dimension,cgs::system>     area;
+    
+BOOST_UNITS_STATIC_CONSTANT(square_centimeter,area);
+BOOST_UNITS_STATIC_CONSTANT(square_centimeters,area);
+BOOST_UNITS_STATIC_CONSTANT(square_centimetre,area);
+BOOST_UNITS_STATIC_CONSTANT(square_centimetres,area);
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_AREA_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/base.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/base.hpp
new file mode 100644 (file)
index 0000000..bc53606
--- /dev/null
@@ -0,0 +1,46 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_BASE_HPP
+#define BOOST_UNITS_CGS_BASE_HPP
+
+#include <string>
+
+#include <boost/units/static_constant.hpp>
+#include <boost/units/unit.hpp>
+#include <boost/units/make_system.hpp>
+
+#include <boost/units/base_units/cgs/centimeter.hpp>
+#include <boost/units/base_units/cgs/gram.hpp>
+#include <boost/units/base_units/si/second.hpp>
+#include <boost/units/base_units/cgs/biot.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+/// placeholder class defining cgs unit system
+typedef make_system<centimeter_base_unit, 
+                    gram_base_unit, 
+                    boost::units::si::second_base_unit,
+                    biot_base_unit>::type system;
+
+/// various unit typedefs for convenience
+typedef unit<dimensionless_type,system>         dimensionless;
+
+} // namespace cgs
+                                                    
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_BASE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/current.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/current.hpp
new file mode 100644 (file)
index 0000000..f80821e
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_CURRENT_HPP
+#define BOOST_UNITS_CGS_CURRENT_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<current_dimension,cgs::system>   current;
+    
+BOOST_UNITS_STATIC_CONSTANT(biot,current);
+BOOST_UNITS_STATIC_CONSTANT(biots,current);
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_CURRENT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/dimensionless.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/dimensionless.hpp
new file mode 100644 (file)
index 0000000..7f2b3c2
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_DIMENSIONLESS_HPP
+#define BOOST_UNITS_CGS_DIMENSIONLESS_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+BOOST_UNITS_STATIC_CONSTANT(cgs_dimensionless,dimensionless);
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_DIMENSIONLESS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/dynamic_viscosity.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/dynamic_viscosity.hpp
new file mode 100644 (file)
index 0000000..af1a170
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_DYNAMIC_VISCOSITY_HPP
+#define BOOST_UNITS_CGS_DYNAMIC_VISCOSITY_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/dynamic_viscosity.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<dynamic_viscosity_dimension,cgs::system>     dynamic_viscosity;
+    
+BOOST_UNITS_STATIC_CONSTANT(poise,dynamic_viscosity);    
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_DYNAMIC_VISCOSITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/energy.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/energy.hpp
new file mode 100644 (file)
index 0000000..f710996
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_ENERGY_HPP
+#define BOOST_UNITS_CGS_ENERGY_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/energy.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<energy_dimension,cgs::system>   energy;
+    
+BOOST_UNITS_STATIC_CONSTANT(erg,energy);
+BOOST_UNITS_STATIC_CONSTANT(ergs,energy);
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_ENERGY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/force.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/force.hpp
new file mode 100644 (file)
index 0000000..3328b5d
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_FORCE_HPP
+#define BOOST_UNITS_CGS_FORCE_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/force.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<force_dimension,cgs::system>        force;
+    
+BOOST_UNITS_STATIC_CONSTANT(dyne,force);
+BOOST_UNITS_STATIC_CONSTANT(dynes,force);
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_FORCE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/frequency.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/frequency.hpp
new file mode 100644 (file)
index 0000000..ef90aea
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_FREQUENCY_HPP
+#define BOOST_UNITS_CGS_FREQUENCY_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/frequency.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<frequency_dimension,cgs::system>        frequency;
+    
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_FREQUENCY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/io.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/io.hpp
new file mode 100644 (file)
index 0000000..6f57b1e
--- /dev/null
@@ -0,0 +1,50 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_IO_HPP
+#define BOOST_UNITS_CGS_IO_HPP
+
+#include <boost/units/io.hpp>
+#include <boost/units/reduce_unit.hpp>
+#include <boost/units/systems/cgs.hpp>
+
+namespace boost {
+
+namespace units { 
+
+inline std::string name_string(const reduce_unit<cgs::acceleration>::type&) { return "galileo"; }
+inline std::string symbol_string(const reduce_unit<cgs::acceleration>::type&) { return "Gal"; }
+
+inline std::string name_string(const reduce_unit<cgs::current>::type&)   { return "biot"; }
+inline std::string symbol_string(const reduce_unit<cgs::current>::type&) { return "Bi"; }
+
+inline std::string name_string(const reduce_unit<cgs::dynamic_viscosity>::type&) { return "poise"; }
+inline std::string symbol_string(const reduce_unit<cgs::dynamic_viscosity>::type&) { return "P"; }
+
+inline std::string name_string(const reduce_unit<cgs::energy>::type&) { return "erg"; }
+inline std::string symbol_string(const reduce_unit<cgs::energy>::type&) { return "erg"; }
+
+inline std::string name_string(const reduce_unit<cgs::force>::type&) { return "dyne"; }
+inline std::string symbol_string(const reduce_unit<cgs::force>::type&) { return "dyn"; }
+
+inline std::string name_string(const reduce_unit<cgs::kinematic_viscosity>::type&) { return "stoke"; }
+inline std::string symbol_string(const reduce_unit<cgs::kinematic_viscosity>::type&) { return "St"; }
+
+inline std::string name_string(const reduce_unit<cgs::pressure>::type&) { return "barye"; }
+inline std::string symbol_string(const reduce_unit<cgs::pressure>::type&) { return "Ba"; }
+
+inline std::string name_string(const reduce_unit<cgs::wavenumber>::type&) { return "kayser"; }
+inline std::string symbol_string(const reduce_unit<cgs::wavenumber>::type&) { return "K"; }
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_IO_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/kinematic_viscosity.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/kinematic_viscosity.hpp
new file mode 100644 (file)
index 0000000..185582b
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_KINEMATIC_VISCOSITY_HPP
+#define BOOST_UNITS_CGS_KINEMATIC_VISCOSITY_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/kinematic_viscosity.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<kinematic_viscosity_dimension,cgs::system>     kinematic_viscosity;
+BOOST_UNITS_STATIC_CONSTANT(stoke,kinematic_viscosity);           
+BOOST_UNITS_STATIC_CONSTANT(stokes,kinematic_viscosity);    
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_KINEMATIC_VISCOSITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/length.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/length.hpp
new file mode 100644 (file)
index 0000000..6d04cfe
--- /dev/null
@@ -0,0 +1,35 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_LENGTH_HPP
+#define BOOST_UNITS_CGS_LENGTH_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<length_dimension,cgs::system>   length;
+    
+BOOST_UNITS_STATIC_CONSTANT(centimeter,length); 
+BOOST_UNITS_STATIC_CONSTANT(centimeters,length);    
+BOOST_UNITS_STATIC_CONSTANT(centimetre,length); 
+BOOST_UNITS_STATIC_CONSTANT(centimetres,length);    
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_LENGTH_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/mass.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/mass.hpp
new file mode 100644 (file)
index 0000000..70bf7c4
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_MASS_HPP
+#define BOOST_UNITS_CGS_MASS_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<mass_dimension,cgs::system>     mass;
+    
+BOOST_UNITS_STATIC_CONSTANT(gram,mass); 
+BOOST_UNITS_STATIC_CONSTANT(grams,mass);    
+BOOST_UNITS_STATIC_CONSTANT(gramme,mass);   
+BOOST_UNITS_STATIC_CONSTANT(grammes,mass);  
+
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_MASS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/mass_density.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/mass_density.hpp
new file mode 100644 (file)
index 0000000..5b2ce9e
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_MASS_DENSITY_HPP
+#define BOOST_UNITS_CGS_MASS_DENSITY_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/mass_density.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<mass_density_dimension,cgs::system>     mass_density;
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_MASS_DENSITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/momentum.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/momentum.hpp
new file mode 100644 (file)
index 0000000..6325a95
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_MOMENTUM_HPP
+#define BOOST_UNITS_CGS_MOMENTUM_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/momentum.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<momentum_dimension,cgs::system>     momentum;
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_MOMENTUM_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/power.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/power.hpp
new file mode 100644 (file)
index 0000000..3ecb353
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_POWER_HPP
+#define BOOST_UNITS_CGS_POWER_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/power.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<power_dimension,cgs::system>    power;
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_POWER_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/pressure.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/pressure.hpp
new file mode 100644 (file)
index 0000000..faef178
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_PRESSURE_HPP
+#define BOOST_UNITS_CGS_PRESSURE_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/pressure.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<pressure_dimension,cgs::system>     pressure;
+    
+BOOST_UNITS_STATIC_CONSTANT(barye,pressure);    
+BOOST_UNITS_STATIC_CONSTANT(baryes,pressure);   
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_PRESSURE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/time.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/time.hpp
new file mode 100644 (file)
index 0000000..2ac3b04
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_TIME_HPP
+#define BOOST_UNITS_CGS_TIME_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<time_dimension,cgs::system>     time;
+
+BOOST_UNITS_STATIC_CONSTANT(second,time);   
+BOOST_UNITS_STATIC_CONSTANT(seconds,time);  
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_TIME_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/velocity.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/velocity.hpp
new file mode 100644 (file)
index 0000000..152240a
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_VELOCITY_HPP
+#define BOOST_UNITS_CGS_VELOCITY_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/velocity.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<velocity_dimension,cgs::system>     velocity;
+    
+BOOST_UNITS_STATIC_CONSTANT(centimeter_per_second,velocity);    
+BOOST_UNITS_STATIC_CONSTANT(centimeters_per_second,velocity);   
+BOOST_UNITS_STATIC_CONSTANT(centimetre_per_second,velocity);    
+BOOST_UNITS_STATIC_CONSTANT(centimetres_per_second,velocity);   
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_VELOCITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/volume.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/volume.hpp
new file mode 100644 (file)
index 0000000..5e40cba
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_VOLUME_HPP
+#define BOOST_UNITS_CGS_VOLUME_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/volume.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<volume_dimension,cgs::system>   volume;
+    
+BOOST_UNITS_STATIC_CONSTANT(cubic_centimeter,volume);   
+BOOST_UNITS_STATIC_CONSTANT(cubic_centimeters,volume);  
+BOOST_UNITS_STATIC_CONSTANT(cubic_centimetre,volume);   
+BOOST_UNITS_STATIC_CONSTANT(cubic_centimetres,volume);  
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_VOLUME_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/cgs/wavenumber.hpp b/deal.II/contrib/boost/include/boost/units/systems/cgs/wavenumber.hpp
new file mode 100644 (file)
index 0000000..69c99ca
--- /dev/null
@@ -0,0 +1,38 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CGS_WAVENUMBER_HPP
+#define BOOST_UNITS_CGS_WAVENUMBER_HPP
+
+#include <boost/units/systems/cgs/base.hpp>
+#include <boost/units/physical_dimensions/wavenumber.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace cgs {
+
+typedef unit<wavenumber_dimension,cgs::system>   wavenumber;
+    
+BOOST_UNITS_STATIC_CONSTANT(kayser,wavenumber); 
+BOOST_UNITS_STATIC_CONSTANT(kaysers,wavenumber);    
+BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimeter,wavenumber);  
+BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimeters,wavenumber); 
+BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimetre,wavenumber);  
+BOOST_UNITS_STATIC_CONSTANT(reciprocal_centimetres,wavenumber); 
+
+} // namespace cgs
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_WAVENUMBER_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/detail/constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/detail/constants.hpp
new file mode 100644 (file)
index 0000000..fac9b61
--- /dev/null
@@ -0,0 +1,201 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CONSTANTS_HPP
+#define BOOST_UNITS_CONSTANTS_HPP
+
+#include <boost/config/no_tr1/cmath.hpp>
+#include <iosfwd>
+#include <iomanip>
+
+#include <boost/io/ios_state.hpp>
+
+#include <boost/units/static_constant.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/operators.hpp>
+
+namespace boost {
+
+namespace units {
+
+template<class Base>
+struct constant 
+{ 
+    typedef typename Base::value_type value_type; 
+    operator value_type() const    { return Base().value(); } 
+    value_type value() const       { return Base().value(); } 
+    value_type uncertainty() const { return Base().uncertainty(); } 
+    value_type lower_bound() const { return Base().lower_bound(); } 
+    value_type upper_bound() const { return Base().upper_bound(); } 
+}; 
+
+template<class Base>
+struct physical_constant 
+{ 
+    typedef typename Base::value_type value_type; 
+    operator value_type() const    { return Base().value(); } 
+    value_type value() const       { return Base().value(); } 
+    value_type uncertainty() const { return Base().uncertainty(); } 
+    value_type lower_bound() const { return Base().lower_bound(); } 
+    value_type upper_bound() const { return Base().upper_bound(); } 
+}; 
+
+#define BOOST_UNITS_DEFINE_HELPER(name, symbol, template_name)  \
+                                                                \
+template<class T, class Arg1, class Arg2>                       \
+struct name ## _typeof_helper<constant<T>, template_name<Arg1, Arg2> >\
+{                                                               \
+    typedef typename name ## _typeof_helper<typename T::value_type, template_name<Arg1, Arg2> >::type type;\
+};                                                              \
+                                                                \
+template<class T, class Arg1, class Arg2>                       \
+struct name ## _typeof_helper<template_name<Arg1, Arg2>, constant<T> >\
+{                                                               \
+    typedef typename name ## _typeof_helper<template_name<Arg1, Arg2>, typename T::value_type>::type type;\
+};                                                              \
+                                                                \
+template<class T, class Arg1, class Arg2>                       \
+typename name ## _typeof_helper<typename T::value_type, template_name<Arg1, Arg2> >::type \
+operator symbol(const constant<T>& t, const template_name<Arg1, Arg2>& u)\
+{                                                               \
+    return(t.value() symbol u);                                 \
+}                                                               \
+                                                                \
+template<class T, class Arg1, class Arg2>                       \
+typename name ## _typeof_helper<template_name<Arg1, Arg2>, typename T::value_type>::type \
+operator symbol(const template_name<Arg1, Arg2>& u, const constant<T>& t)\
+{                                                               \
+    return(u symbol t.value());                                 \
+}
+
+BOOST_UNITS_DEFINE_HELPER(add, +, unit)
+BOOST_UNITS_DEFINE_HELPER(add, +, quantity)
+BOOST_UNITS_DEFINE_HELPER(subtract, -, unit)
+BOOST_UNITS_DEFINE_HELPER(subtract, -, quantity)
+BOOST_UNITS_DEFINE_HELPER(multiply, *, unit)
+BOOST_UNITS_DEFINE_HELPER(multiply, *, quantity)
+BOOST_UNITS_DEFINE_HELPER(divide, /, unit)
+BOOST_UNITS_DEFINE_HELPER(divide, /, quantity)
+
+#undef BOOST_UNITS_DEFINE_HELPER
+
+#define BOOST_UNITS_DEFINE_HELPER(name, symbol)                     \
+                                                                    \
+template<class T1, class T2>                                        \
+struct name ## _typeof_helper<constant<T1>, constant<T2> >          \
+{                                                                   \
+    typedef typename name ## _typeof_helper<typename T1::value_type, typename T2::value_type>::type type;\
+};                                                                  \
+                                                                    \
+template<class T1, class T2>                                        \
+typename name ## _typeof_helper<typename T1::value_type, typename T2::value_type>::type \
+operator symbol(const constant<T1>& t, const constant<T2>& u)       \
+{                                                                   \
+    return(t.value() symbol u.value());                             \
+}                                                                   \
+                                                                    \
+template<class T1, class T2>                                        \
+struct name ## _typeof_helper<constant<T1>, T2>                     \
+{                                                                   \
+    typedef typename name ## _typeof_helper<typename T1::value_type, T2>::type type;\
+};                                                                  \
+                                                                    \
+template<class T1, class T2>                                        \
+struct name ## _typeof_helper<T1, constant<T2> >                    \
+{                                                                   \
+    typedef typename name ## _typeof_helper<T1, typename T2::value_type>::type type;\
+};                                                                  \
+                                                                    \
+template<class T1, class T2>                                        \
+typename name ## _typeof_helper<typename T1::value_type, T2>::type  \
+operator symbol(const constant<T1>& t, const T2& u)                 \
+{                                                                   \
+    return(t.value() symbol u);                                     \
+}                                                                   \
+                                                                    \
+template<class T1, class T2>                                        \
+typename name ## _typeof_helper<T1, typename T2::value_type>::type  \
+operator symbol(const T1& t, const constant<T2>& u)                 \
+{                                                                   \
+    return(t symbol u.value());                                     \
+}
+
+BOOST_UNITS_DEFINE_HELPER(add, +)
+BOOST_UNITS_DEFINE_HELPER(subtract, -)
+BOOST_UNITS_DEFINE_HELPER(multiply, *)
+BOOST_UNITS_DEFINE_HELPER(divide, /)
+
+#undef BOOST_UNITS_DEFINE_HELPER
+
+#define BOOST_UNITS_PHYSICAL_CONSTANT(name, type, value_, uncertainty_) \
+struct name ## _t {                                                     \
+    typedef type value_type;                                            \
+    operator value_type() const    { return value_; }                   \
+    value_type value() const       { return value_; }                   \
+    value_type uncertainty() const { return uncertainty_; }             \
+    value_type lower_bound() const { return value_-uncertainty_; }      \
+    value_type upper_bound() const { return value_+uncertainty_; }      \
+};                                                                      \
+BOOST_UNITS_STATIC_CONSTANT(name, boost::units::constant<boost::units::physical_constant<name ## _t> >) = { }
+
+// stream output
+template<class Char, class Traits, class Y>
+inline
+std::basic_ostream<Char,Traits>& operator<<(std::basic_ostream<Char,Traits>& os,const physical_constant<Y>& val)
+{
+    boost::io::ios_precision_saver precision_saver(os);
+    //boost::io::ios_width_saver width_saver(os);
+    boost::io::ios_flags_saver flags_saver(os);
+
+    //os << std::setw(21);
+    typedef typename Y::value_type value_type;
+    
+    if (val.uncertainty() > value_type())
+    {
+        const double relative_uncertainty = std::abs(val.uncertainty()/val.value());
+    
+        const double  exponent = std::log10(relative_uncertainty);
+        const long digits_of_precision = static_cast<long>(std::ceil(std::abs(exponent)))+3;
+        
+        // should try to replicate NIST CODATA syntax 
+        os << std::setprecision(digits_of_precision) 
+           //<< std::setw(digits_of_precision+8) 
+           //<< std::scientific
+           << val.value();
+//           << long(10*(relative_uncertainty/std::pow(Y(10),Y(exponent))));
+
+        os << " (rel. unc. = " 
+           << std::setprecision(1) 
+           //<< std::setw(7) 
+           << std::scientific
+           << relative_uncertainty << ")";
+    }
+    else
+    {
+        os << val.value() << " (exact)";
+    }
+    
+    return os;
+}
+
+// stream output
+template<class Char, class Traits, class Y>
+inline
+std::basic_ostream<Char,Traits>& operator<<(std::basic_ostream<Char,Traits>& os,const constant<Y>&)
+{
+    os << Y();
+    return os;
+}
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si.hpp b/deal.II/contrib/boost/include/boost/units/systems/si.hpp
new file mode 100644 (file)
index 0000000..727982b
--- /dev/null
@@ -0,0 +1,77 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_HPP
+#define BOOST_UNITS_SI_HPP
+
+/// \file
+/// Includes all the si unit headers
+
+#include <string>
+
+#include <boost/units/quantity.hpp>
+
+#include <boost/units/systems/si/base.hpp>
+
+#include <boost/units/systems/si/absorbed_dose.hpp>
+#include <boost/units/systems/si/acceleration.hpp>
+#include <boost/units/systems/si/action.hpp>
+#include <boost/units/systems/si/activity.hpp>
+#include <boost/units/systems/si/amount.hpp>
+#include <boost/units/systems/si/angular_acceleration.hpp>
+#include <boost/units/systems/si/angular_momentum.hpp>
+#include <boost/units/systems/si/angular_velocity.hpp>
+#include <boost/units/systems/si/area.hpp>
+#include <boost/units/systems/si/capacitance.hpp>
+#include <boost/units/systems/si/catalytic_activity.hpp>
+#include <boost/units/systems/si/conductance.hpp>
+#include <boost/units/systems/si/conductivity.hpp>
+#include <boost/units/systems/si/current.hpp>
+#include <boost/units/systems/si/dimensionless.hpp>
+#include <boost/units/systems/si/dose_equivalent.hpp>
+#include <boost/units/systems/si/dynamic_viscosity.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/electric_potential.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/force.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/illuminance.hpp>
+#include <boost/units/systems/si/impedance.hpp>
+#include <boost/units/systems/si/inductance.hpp>
+#include <boost/units/systems/si/kinematic_viscosity.hpp>
+#include <boost/units/systems/si/length.hpp>
+#include <boost/units/systems/si/luminous_flux.hpp>
+#include <boost/units/systems/si/luminous_intensity.hpp>
+#include <boost/units/systems/si/magnetic_field_intensity.hpp>
+#include <boost/units/systems/si/magnetic_flux.hpp>
+#include <boost/units/systems/si/magnetic_flux_density.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/mass_density.hpp>
+#include <boost/units/systems/si/moment_of_inertia.hpp>
+#include <boost/units/systems/si/momentum.hpp>
+#include <boost/units/systems/si/permeability.hpp>
+#include <boost/units/systems/si/permittivity.hpp>
+#include <boost/units/systems/si/plane_angle.hpp>
+#include <boost/units/systems/si/power.hpp>
+#include <boost/units/systems/si/pressure.hpp>
+#include <boost/units/systems/si/reluctance.hpp>
+#include <boost/units/systems/si/resistance.hpp>
+#include <boost/units/systems/si/resistivity.hpp>
+#include <boost/units/systems/si/solid_angle.hpp>
+#include <boost/units/systems/si/surface_density.hpp>
+#include <boost/units/systems/si/surface_tension.hpp>
+#include <boost/units/systems/si/temperature.hpp>
+#include <boost/units/systems/si/time.hpp>
+#include <boost/units/systems/si/torque.hpp>
+#include <boost/units/systems/si/velocity.hpp>
+#include <boost/units/systems/si/volume.hpp>
+#include <boost/units/systems/si/wavenumber.hpp>
+
+#endif // BOOST_UNITS_SI_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/absorbed_dose.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/absorbed_dose.hpp
new file mode 100644 (file)
index 0000000..f59ec51
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_ABSORBED_DOSE_HPP
+#define BOOST_UNITS_SI_ABSORBED_DOSE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/absorbed_dose.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<absorbed_dose_dimension,si::system>     absorbed_dose;
+    
+BOOST_UNITS_STATIC_CONSTANT(gray,absorbed_dose);  
+BOOST_UNITS_STATIC_CONSTANT(grays,absorbed_dose); 
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_ABSORBED_DOSE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/acceleration.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/acceleration.hpp
new file mode 100644 (file)
index 0000000..54ac29f
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_ACCELERATION_HPP
+#define BOOST_UNITS_SI_ACCELERATION_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/acceleration.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<acceleration_dimension,si::system>  acceleration;
+
+BOOST_UNITS_STATIC_CONSTANT(meter_per_second_squared,acceleration);
+BOOST_UNITS_STATIC_CONSTANT(meters_per_second_squared,acceleration);
+BOOST_UNITS_STATIC_CONSTANT(metre_per_second_squared,acceleration);
+BOOST_UNITS_STATIC_CONSTANT(metres_per_second_squared,acceleration);
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_ACCELERATION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/action.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/action.hpp
new file mode 100644 (file)
index 0000000..43b6629
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_ACTION_HPP
+#define BOOST_UNITS_SI_ACTION_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/action.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<action_dimension,si::system>    action;
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_ACTION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/activity.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/activity.hpp
new file mode 100644 (file)
index 0000000..d31f002
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_ACTIVITY_HPP
+#define BOOST_UNITS_SI_ACTIVITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/activity.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<activity_dimension,si::system>  activity;
+
+BOOST_UNITS_STATIC_CONSTANT(becquerel,activity);
+BOOST_UNITS_STATIC_CONSTANT(becquerels,activity);
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_ACTIVITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/amount.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/amount.hpp
new file mode 100644 (file)
index 0000000..7fe8f41
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_AMOUNT_HPP
+#define BOOST_UNITS_SI_AMOUNT_HPP
+
+#include <boost/units/systems/si/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<amount_dimension,si::system>    amount;
+
+BOOST_UNITS_STATIC_CONSTANT(mole,amount);
+BOOST_UNITS_STATIC_CONSTANT(moles,amount);
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_AMOUNT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/angular_acceleration.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/angular_acceleration.hpp
new file mode 100644 (file)
index 0000000..ff20102
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_ANGULAR_ACCELERATION_HPP
+#define BOOST_UNITS_SI_ANGULAR_ACCELERATION_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/angular_acceleration.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<angular_acceleration_dimension,si::system>      angular_acceleration;
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_ANGULAR_ACCELERATION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/angular_momentum.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/angular_momentum.hpp
new file mode 100644 (file)
index 0000000..7c20f5b
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP
+#define BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/angular_momentum.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<angular_momentum_dimension,si::system>      angular_momentum;
+    
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_ANGULAR_MOMENTUM_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/angular_velocity.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/angular_velocity.hpp
new file mode 100644 (file)
index 0000000..3149dc6
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP
+#define BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/angular_velocity.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<angular_velocity_dimension,si::system>      angular_velocity;
+    
+BOOST_UNITS_STATIC_CONSTANT(radian_per_second,angular_velocity); 
+BOOST_UNITS_STATIC_CONSTANT(radians_per_second,angular_velocity);    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_ANGULAR_VELOCITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/area.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/area.hpp
new file mode 100644 (file)
index 0000000..90a3230
--- /dev/null
@@ -0,0 +1,39 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_AREA_HPP
+#define BOOST_UNITS_SI_AREA_HPP
+
+#include <iostream>
+#include <boost/units/io.hpp>
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/area.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<area_dimension,si::system>      area;
+    
+BOOST_UNITS_STATIC_CONSTANT(square_meter,area);
+BOOST_UNITS_STATIC_CONSTANT(square_meters,area);
+BOOST_UNITS_STATIC_CONSTANT(square_metre,area);
+BOOST_UNITS_STATIC_CONSTANT(square_metres,area);
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_AREA_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/base.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/base.hpp
new file mode 100644 (file)
index 0000000..469b294
--- /dev/null
@@ -0,0 +1,56 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_BASE_HPP
+#define BOOST_UNITS_SI_BASE_HPP
+
+#include <string>
+
+#include <boost/units/static_constant.hpp>
+#include <boost/units/unit.hpp>
+#include <boost/units/make_system.hpp>
+
+#include <boost/units/base_units/si/meter.hpp>
+#include <boost/units/base_units/si/kilogram.hpp>
+#include <boost/units/base_units/si/second.hpp>
+#include <boost/units/base_units/si/ampere.hpp>
+#include <boost/units/base_units/si/kelvin.hpp>
+#include <boost/units/base_units/si/mole.hpp>
+#include <boost/units/base_units/si/candela.hpp>
+#include <boost/units/base_units/angle/radian.hpp>
+#include <boost/units/base_units/angle/steradian.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+/// placeholder class defining si unit system
+typedef make_system<meter_base_unit, 
+                    kilogram_base_unit, 
+                    second_base_unit, 
+                    ampere_base_unit,
+                    kelvin_base_unit,
+                    mole_base_unit,
+                    candela_base_unit,
+                    angle::radian_base_unit,
+                    angle::steradian_base_unit>::type system;
+
+/// dimensionless si unit
+typedef unit<dimensionless_type,system>         dimensionless;
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_BASE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/capacitance.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/capacitance.hpp
new file mode 100644 (file)
index 0000000..076de71
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_CAPACITANCE_HPP
+#define BOOST_UNITS_SI_CAPACITANCE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/capacitance.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<capacitance_dimension,si::system>    capacitance;
+    
+BOOST_UNITS_STATIC_CONSTANT(farad,capacitance);
+BOOST_UNITS_STATIC_CONSTANT(farads,capacitance);
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_CAPACITANCE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/catalytic_activity.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/catalytic_activity.hpp
new file mode 100644 (file)
index 0000000..2a2e538
--- /dev/null
@@ -0,0 +1,37 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_CATALYTIC_ACTIVITY_HPP
+#define BOOST_UNITS_SI_CATALYTIC_ACTIVITY_HPP
+
+#include <boost/units/derived_dimension.hpp>
+#include <boost/units/systems/si/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+/// catalytic activity : T^-1 A^1
+typedef derived_dimension<time_base_dimension,-1,amount_base_dimension,1>::type                             catalytic_activity_dim;    
+
+typedef unit<si::catalytic_activity_dim,si::system>                                    catalytic_activity;
+
+BOOST_UNITS_STATIC_CONSTANT(katal,catalytic_activity);
+BOOST_UNITS_STATIC_CONSTANT(katals,catalytic_activity);
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_CATALYTIC_ACTIVITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/alpha_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/alpha_constants.hpp
new file mode 100644 (file)
index 0000000..1b1846f
--- /dev/null
@@ -0,0 +1,65 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_ALPHA_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_ALPHA_CONSTANTS_HPP
+
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/systems/detail/constants.hpp>
+#include <boost/units/systems/si/amount.hpp>
+#include <boost/units/systems/si/area.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/length.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/magnetic_flux_density.hpp>
+#include <boost/units/systems/si/time.hpp>
+#include <boost/units/systems/si/wavenumber.hpp>
+
+#include <boost/units/systems/si/codata/typedefs.hpp>
+
+/// \file
+/// CODATA recommended values of fundamental atomic and nuclear constants
+/// CODATA 2006 values as of 2007/03/30
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+/// CODATA recommended values of the fundamental physical constants: NIST SP 961
+
+/// alpha particle mass
+BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha,quantity<mass>,6.64465620e-27*kilograms,3.3e-34*kilograms);
+/// alpha-electron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha_over_m_e,quantity<dimensionless>,7294.2995365*dimensionless(),3.1e-6*dimensionless());
+/// alpha-proton mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_alpha_over_m_p,quantity<dimensionless>,3.97259968951*dimensionless(),4.1e-10*dimensionless());
+/// alpha molar mass
+BOOST_UNITS_PHYSICAL_CONSTANT(M_alpha,quantity<mass_over_amount>,4.001506179127e-3*kilograms/mole,6.2e-14*kilograms/mole);
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_ALPHA_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/atomic-nuclear_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/atomic-nuclear_constants.hpp
new file mode 100644 (file)
index 0000000..80b4c27
--- /dev/null
@@ -0,0 +1,56 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_ATOMIC_AND_NUCLEAR_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_ATOMIC_AND_NUCLEAR_CONSTANTS_HPP
+
+#include <boost/units/systems/si/codata/alpha_constants.hpp>
+#include <boost/units/systems/si/codata/deuteron_constants.hpp>
+#include <boost/units/systems/si/codata/electron_constants.hpp>
+#include <boost/units/systems/si/codata/helion_constants.hpp>
+#include <boost/units/systems/si/codata/muon_constants.hpp>
+#include <boost/units/systems/si/codata/neutron_constants.hpp>
+#include <boost/units/systems/si/codata/proton_constants.hpp>
+#include <boost/units/systems/si/codata/tau_constants.hpp>
+#include <boost/units/systems/si/codata/triton_constants.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+/// CODATA recommended values of the fundamental physical constants: NIST SP 961
+
+// ATOMIC AND NUCLEAR
+/// fine structure constant
+BOOST_UNITS_PHYSICAL_CONSTANT(alpha,quantity<dimensionless>,7.2973525376e-3*dimensionless(),5.0e-12*dimensionless());
+/// Rydberg constant
+BOOST_UNITS_PHYSICAL_CONSTANT(R_infinity,quantity<wavenumber>,10973731.568527/meter,7.3e-5/meter);
+/// Bohr radius
+BOOST_UNITS_PHYSICAL_CONSTANT(a_0,quantity<length>,0.52917720859e-10*meters,3.6e-20*meters);
+/// Hartree energy
+BOOST_UNITS_PHYSICAL_CONSTANT(E_h,quantity<energy>,4.35974394e-18*joules,2.2e-25*joules);
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_ATOMIC_AND_NUCLEAR_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/deuteron_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/deuteron_constants.hpp
new file mode 100644 (file)
index 0000000..a92b666
--- /dev/null
@@ -0,0 +1,81 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_DEUTERON_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_DEUTERON_CONSTANTS_HPP
+
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/systems/detail/constants.hpp>
+#include <boost/units/systems/si/amount.hpp>
+#include <boost/units/systems/si/area.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/length.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/magnetic_flux_density.hpp>
+#include <boost/units/systems/si/time.hpp>
+#include <boost/units/systems/si/wavenumber.hpp>
+
+#include <boost/units/systems/si/codata/typedefs.hpp>
+
+/// \file
+/// CODATA recommended values of fundamental atomic and nuclear constants
+/// CODATA 2006 values as of 2007/03/30
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+/// CODATA recommended values of the fundamental physical constants: NIST SP 961
+
+/// deuteron mass
+BOOST_UNITS_PHYSICAL_CONSTANT(m_d,quantity<mass>,3.34358320e-27*kilograms,1.7e-34*kilograms);
+/// deuteron-electron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_d_over_m_e,quantity<dimensionless>,3670.4829654*dimensionless(),1.6e-6*dimensionless());
+/// deuteron-proton mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_d_over_m_p,quantity<dimensionless>,1.99900750108*dimensionless(),2.2e-10*dimensionless());
+/// deuteron molar mass
+BOOST_UNITS_PHYSICAL_CONSTANT(M_d,quantity<mass_over_amount>,2.013553212724e-3*kilograms/mole,7.8e-14*kilograms/mole);
+/// deuteron rms charge radius
+BOOST_UNITS_PHYSICAL_CONSTANT(R_d,quantity<length>,2.1402e-15*meters,2.8e-18*meters);
+/// deuteron magnetic moment
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_d,quantity<energy_over_magnetic_flux_density>,0.433073465e-26*joules/tesla,1.1e-34*joules/tesla);
+/// deuteron-Bohr magneton ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_B,quantity<dimensionless>,0.4669754556e-3*dimensionless(),3.9e-12*dimensionless());
+/// deuteron-nuclear magneton ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_N,quantity<dimensionless>,0.8574382308*dimensionless(),7.2e-9*dimensionless());
+/// deuteron g-factor
+BOOST_UNITS_PHYSICAL_CONSTANT(g_d,quantity<dimensionless>,0.8574382308*dimensionless(),7.2e-9*dimensionless());
+/// deuteron-electron magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_e,quantity<dimensionless>,-4.664345537e-4*dimensionless(),3.9e-12*dimensionless());
+/// deuteron-proton magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_p,quantity<dimensionless>,0.3070122070*dimensionless(),2.4e-9*dimensionless());
+/// deuteron-neutron magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_d_over_mu_n,quantity<dimensionless>,-0.44820652*dimensionless(),1.1e-7*dimensionless());
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_DEUTERON_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/electromagnetic_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/electromagnetic_constants.hpp
new file mode 100644 (file)
index 0000000..9cc6f49
--- /dev/null
@@ -0,0 +1,73 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_ELECTROMAGNETIC_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_ELECTROMAGNETIC_CONSTANTS_HPP
+
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/systems/detail/constants.hpp>
+#include <boost/units/systems/si/conductance.hpp>
+#include <boost/units/systems/si/current.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/electric_potential.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/magnetic_flux.hpp>
+#include <boost/units/systems/si/magnetic_flux_density.hpp>
+#include <boost/units/systems/si/resistance.hpp>
+
+#include <boost/units/systems/si/codata/typedefs.hpp>
+
+/// \file
+/// CODATA recommended values of fundamental electromagnetic constants
+/// CODATA 2006 values as of 2007/03/30
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+/// CODATA recommended values of the fundamental physical constants: NIST SP 961
+
+// ELECTROMAGNETIC
+/// elementary charge
+BOOST_UNITS_PHYSICAL_CONSTANT(e,quantity<electric_charge>,1.602176487e-19*coulombs,4.0e-27*coulombs);
+/// elementary charge to Planck constant ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(e_over_h,quantity<current_over_energy>,2.417989454e14*amperes/joule,6.0e6*amperes/joule);
+/// magnetic flux quantum
+BOOST_UNITS_PHYSICAL_CONSTANT(Phi_0,quantity<magnetic_flux>,2.067833667e-15*webers,5.2e-23*webers);
+/// conductance quantum
+BOOST_UNITS_PHYSICAL_CONSTANT(G_0,quantity<conductance>,7.7480917004e-5*siemens,5.3e-14*siemens);
+/// Josephson constant
+BOOST_UNITS_PHYSICAL_CONSTANT(K_J,quantity<frequency_over_electric_potential>,483597.891e9*hertz/volt,1.2e7*hertz/volt);
+/// von Klitzing constant
+BOOST_UNITS_PHYSICAL_CONSTANT(R_K,quantity<resistance>,25812.807557*ohms,1.77e-5*ohms);
+/// Bohr magneton
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_B,quantity<energy_over_magnetic_flux_density>,927.400915e-26*joules/tesla,2.3e-31*joules/tesla);
+/// nuclear magneton
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_N,quantity<energy_over_magnetic_flux_density>,5.05078324e-27*joules/tesla,1.3e-34*joules/tesla);
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_ELECTROMAGNETIC_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/electron_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/electron_constants.hpp
new file mode 100644 (file)
index 0000000..131ba92
--- /dev/null
@@ -0,0 +1,105 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_ELECTRON_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_ELECTRON_CONSTANTS_HPP
+
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/systems/detail/constants.hpp>
+#include <boost/units/systems/si/amount.hpp>
+#include <boost/units/systems/si/area.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/length.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/magnetic_flux_density.hpp>
+#include <boost/units/systems/si/time.hpp>
+#include <boost/units/systems/si/wavenumber.hpp>
+
+#include <boost/units/systems/si/codata/typedefs.hpp>
+
+/// \file
+/// CODATA recommended values of fundamental atomic and nuclear constants
+/// CODATA 2006 values as of 2007/03/30
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+/// CODATA recommended values of the fundamental physical constants: NIST SP 961
+
+/// electron mass
+BOOST_UNITS_PHYSICAL_CONSTANT(m_e,quantity<mass>,9.10938215e-31*kilograms,4.5e-38*kilograms);
+/// electron-muon mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_mu,quantity<dimensionless>,4.83633171e-3*dimensionless(),1.2e-10*dimensionless());
+/// electron-tau mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_tau,quantity<dimensionless>,2.87564e-4*dimensionless(),4.7e-8*dimensionless());
+/// electron-proton mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_p,quantity<dimensionless>,5.4461702177e-4*dimensionless(),2.4e-13*dimensionless());
+/// electron-neutron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_n,quantity<dimensionless>,5.4386734459e-4*dimensionless(),3.3e-13*dimensionless());
+/// electron-deuteron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_d,quantity<dimensionless>,2.7244371093e-4*dimensionless(),1.2e-13*dimensionless());
+/// electron-alpha particle mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_e_over_m_alpha,quantity<dimensionless>,1.37093355570e-4*dimensionless(),5.8e-14*dimensionless());
+/// electron charge to mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(e_over_m_e,quantity<electric_charge_over_mass>,1.758820150e11*coulombs/kilogram,4.4e3*coulombs/kilogram);
+/// electron molar mass
+BOOST_UNITS_PHYSICAL_CONSTANT(M_e,quantity<mass_over_amount>,5.4857990943e-7*kilograms/mole,2.3e-16*kilograms/mole);
+/// Compton wavelength
+BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C,quantity<length>,2.4263102175e-12*meters,3.3e-21*meters);
+/// classical electron radius
+BOOST_UNITS_PHYSICAL_CONSTANT(r_e,quantity<length>,2.8179402894e-15*meters,5.8e-24*meters);
+/// Thompson cross section
+BOOST_UNITS_PHYSICAL_CONSTANT(sigma_e,quantity<area>,0.6652458558e-28*square_meters,2.7e-37*square_meters);
+/// electron magnetic moment
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_e,quantity<energy_over_magnetic_flux_density>,-928.476377e-26*joules/tesla,2.3e-31*joules/tesla);
+/// electron-Bohr magenton moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_B,quantity<dimensionless>,-1.00115965218111*dimensionless(),7.4e-13*dimensionless());
+/// electron-nuclear magneton moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_N,quantity<dimensionless>,-183.28197092*dimensionless(),8.0e-7*dimensionless());
+/// electron magnetic moment anomaly
+BOOST_UNITS_PHYSICAL_CONSTANT(a_e,quantity<dimensionless>,1.15965218111e-3*dimensionless(),7.4e-13*dimensionless());
+/// electron g-factor
+BOOST_UNITS_PHYSICAL_CONSTANT(g_e,quantity<dimensionless>,-2.0023193043622*dimensionless(),1.5e-12*dimensionless());
+/// electron-muon magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_mu,quantity<dimensionless>,206.7669877*dimensionless(),5.2e-6*dimensionless());
+/// electron-proton magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_p,quantity<dimensionless>,-658.2106848*dimensionless(),5.4e-6*dimensionless());
+/// electron-shielded proton magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_p_prime,quantity<dimensionless>,-658.2275971*dimensionless(),7.2e-6*dimensionless());
+/// electron-neutron magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_n,quantity<dimensionless>,960.92050*dimensionless(),2.3e-4*dimensionless());
+/// electron-deuteron magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_d,quantity<dimensionless>,-2143.923498*dimensionless(),1.8e-5*dimensionless());
+/// electron-shielded helion magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_e_over_mu_h_prime,quantity<dimensionless>,864.058257*dimensionless(),1.0e-5*dimensionless());
+/// electron gyromagnetic ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(gamma_e,quantity<frequency_over_magnetic_flux_density>,1.760859770e11/second/tesla,4.4e3/second/tesla);
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_ELECTRON_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/helion_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/helion_constants.hpp
new file mode 100644 (file)
index 0000000..56665f3
--- /dev/null
@@ -0,0 +1,77 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_HELION_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_HELION_CONSTANTS_HPP
+
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/systems/detail/constants.hpp>
+#include <boost/units/systems/si/amount.hpp>
+#include <boost/units/systems/si/area.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/length.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/magnetic_flux_density.hpp>
+#include <boost/units/systems/si/time.hpp>
+#include <boost/units/systems/si/wavenumber.hpp>
+
+#include <boost/units/systems/si/codata/typedefs.hpp>
+
+/// \file
+/// CODATA recommended values of fundamental atomic and nuclear constants
+/// CODATA 2006 values as of 2007/03/30
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+/// CODATA recommended values of the fundamental physical constants: NIST SP 961
+
+/// helion mass
+BOOST_UNITS_PHYSICAL_CONSTANT(m_h,quantity<mass>,5.00641192e-27*kilograms,2.5e-34*kilograms);
+/// helion-electron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_h_over_m_e,quantity<dimensionless>,5495.8852765*dimensionless(),5.2e-6*dimensionless());
+/// helion-proton mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_h_over_m_p,quantity<dimensionless>,2.9931526713*dimensionless(),2.6e-9*dimensionless());
+/// helion molar mass
+BOOST_UNITS_PHYSICAL_CONSTANT(M_h,quantity<mass_over_amount>,3.0149322473e-3*kilograms/mole,2.6e-12*kilograms/mole);
+/// helion shielded magnetic moment
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime,quantity<energy_over_magnetic_flux_density>,-1.074552982e-26*joules/tesla,3.0e-34*joules/tesla);
+/// shielded helion-Bohr magneton ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_B,quantity<dimensionless>,-1.158671471e-3*dimensionless(),1.4e-11*dimensionless());
+/// shielded helion-nuclear magneton ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_N,quantity<dimensionless>,-2.127497718*dimensionless(),2.5e-8*dimensionless());
+/// shielded helion-proton magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_p,quantity<dimensionless>,-0.761766558*dimensionless(),1.1e-8*dimensionless());
+/// shielded helion-shielded proton magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_h_prime_over_mu_p_prime,quantity<dimensionless>,-0.7617861313*dimensionless(),3.3e-8*dimensionless());
+/// shielded helion gyromagnetic ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(gamma_h_prime,quantity<frequency_over_magnetic_flux_density>,2.037894730e8/second/tesla,5.6e-0/second/tesla);
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_HELION_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/muon_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/muon_constants.hpp
new file mode 100644 (file)
index 0000000..12afdf1
--- /dev/null
@@ -0,0 +1,83 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_MUON_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_MUON_CONSTANTS_HPP
+
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/systems/detail/constants.hpp>
+#include <boost/units/systems/si/amount.hpp>
+#include <boost/units/systems/si/area.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/length.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/magnetic_flux_density.hpp>
+#include <boost/units/systems/si/time.hpp>
+#include <boost/units/systems/si/wavenumber.hpp>
+
+#include <boost/units/systems/si/codata/typedefs.hpp>
+
+/// \file
+/// CODATA recommended values of fundamental atomic and nuclear constants
+/// CODATA 2006 values as of 2007/03/30
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+/// CODATA recommended values of the fundamental physical constants: NIST SP 961
+
+/// muon mass
+BOOST_UNITS_PHYSICAL_CONSTANT(m_mu,quantity<mass>,1.88353130e-28*kilograms,1.1e-35*kilograms);
+/// muon-electron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_e,quantity<dimensionless>,206.7682823*dimensionless(),5.2e-6*dimensionless());
+/// muon-tau mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_tau,quantity<dimensionless>,5.94592e-2*dimensionless(),9.7e-6*dimensionless());
+/// muon-proton mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_p,quantity<dimensionless>,0.1126095261*dimensionless(),2.9e-9*dimensionless());
+/// muon-neutron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_mu_over_m_n,quantity<dimensionless>,0.1124545167*dimensionless(),2.9e-9*dimensionless());
+/// muon molar mass
+BOOST_UNITS_PHYSICAL_CONSTANT(M_mu,quantity<mass_over_amount>,0.1134289256e-3*kilograms/mole,2.9e-12*kilograms/mole);
+/// muon Compton wavelength
+BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_mu,quantity<length>,11.73444104e-15*meters,3.0e-22*meters);
+/// muon magnetic moment
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu,quantity<energy_over_magnetic_flux_density>,-4.49044786e-26*joules/tesla,1.6e-33*joules/tesla);
+/// muon-Bohr magneton ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_B,quantity<dimensionless>,-4.84197049e-3*dimensionless(),1.2e-10*dimensionless());
+/// muon-nuclear magneton ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_N,quantity<dimensionless>,-8.89059705*dimensionless(),2.3e-7*dimensionless());
+/// muon magnetic moment anomaly
+BOOST_UNITS_PHYSICAL_CONSTANT(a_mu,quantity<dimensionless>,1.16592069e-3*dimensionless(),6.0e-10*dimensionless());
+/// muon g-factor
+BOOST_UNITS_PHYSICAL_CONSTANT(g_mu,quantity<dimensionless>,-2.0023318414*dimensionless(),1.2e-9*dimensionless());
+/// muon-proton magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_mu_over_mu_p,quantity<dimensionless>,-3.183345137*dimensionless(),8.5e-8*dimensionless());
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_MUON_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/neutron_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/neutron_constants.hpp
new file mode 100644 (file)
index 0000000..44d89bc
--- /dev/null
@@ -0,0 +1,83 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_NEUTRON_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_NEUTRON_CONSTANTS_HPP
+
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/systems/detail/constants.hpp>
+#include <boost/units/systems/si/amount.hpp>
+#include <boost/units/systems/si/area.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/length.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/magnetic_flux_density.hpp>
+#include <boost/units/systems/si/time.hpp>
+#include <boost/units/systems/si/wavenumber.hpp>
+
+#include <boost/units/systems/si/codata/typedefs.hpp>
+
+/// \file
+/// CODATA recommended values of fundamental atomic and nuclear constants
+/// CODATA 2006 values as of 2007/03/30
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+/// CODATA recommended values of the fundamental physical constants: NIST SP 961
+
+/// neutron mass
+BOOST_UNITS_PHYSICAL_CONSTANT(m_n,quantity<mass>,1.674927211e-27*kilograms,8.4e-35*kilograms);
+/// neutron-electron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_e,quantity<dimensionless>,1838.6836605*dimensionless(),1.1e-6*dimensionless());
+/// neutron-muon mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_mu,quantity<dimensionless>,8.89248409*dimensionless(),2.3e-7*dimensionless());
+/// neutron-tau mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_tau,quantity<dimensionless>,0.528740*dimensionless(),8.6e-5*dimensionless());
+/// neutron-proton mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_n_over_m_p,quantity<dimensionless>,1.00137841918*dimensionless(),4.6e-10*dimensionless());
+/// neutron molar mass
+BOOST_UNITS_PHYSICAL_CONSTANT(M_n,quantity<mass_over_amount>,1.00866491597e-3*kilograms/mole,4.3e-13*kilograms/mole);
+/// neutron Compton wavelength
+BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_n,quantity<length>,1.3195908951e-15*meters,2.0e-24*meters);
+/// neutron magnetic moment
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_n,quantity<energy_over_magnetic_flux_density>,-0.96623641e-26*joules/tesla,2.3e-33*joules/tesla);
+/// neutron g-factor
+BOOST_UNITS_PHYSICAL_CONSTANT(g_n,quantity<dimensionless>,-3.82608545*dimensionless(),9.0e-7*dimensionless());
+/// neutron-electron magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_e,quantity<dimensionless>,1.04066882e-3*dimensionless(),2.5e-10*dimensionless());
+/// neutron-proton magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_p,quantity<dimensionless>,-0.68497934*dimensionless(),1.6e-7*dimensionless());
+/// neutron-shielded proton magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_n_over_mu_p_prime,quantity<dimensionless>,-0.68499694*dimensionless(),1.6e-7*dimensionless());
+/// neutron gyromagnetic ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(gamma_n,quantity<frequency_over_magnetic_flux_density>,1.83247185e8/second/tesla,4.3e1/second/tesla);
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_NEUTRON_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/physico-chemical_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/physico-chemical_constants.hpp
new file mode 100644 (file)
index 0000000..0cde3ac
--- /dev/null
@@ -0,0 +1,78 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_PHYSICO_CHEMICAL_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_PHYSICO_CHEMICAL_CONSTANTS_HPP
+
+#include <boost/units/pow.hpp>
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/systems/detail/constants.hpp>
+#include <boost/units/systems/si/amount.hpp>
+#include <boost/units/systems/si/area.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/power.hpp>
+#include <boost/units/systems/si/solid_angle.hpp>
+#include <boost/units/systems/si/temperature.hpp>
+
+#include <boost/units/systems/si/codata/typedefs.hpp>
+
+/// \file
+/// CODATA recommended values of fundamental physico-chemical constants
+/// CODATA 2006 values as of 2007/03/30
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+// PHYSICO-CHEMICAL
+/// Avogadro constant
+BOOST_UNITS_PHYSICAL_CONSTANT(N_A,quantity<inverse_amount>,6.02214179e23/mole,3.0e16/mole);
+/// atomic mass constant
+BOOST_UNITS_PHYSICAL_CONSTANT(m_u,quantity<mass>,1.660538782e-27*kilograms,8.3e-35*kilograms);
+/// Faraday constant
+BOOST_UNITS_PHYSICAL_CONSTANT(F,quantity<electric_charge_over_amount>,96485.3399*coulombs/mole,2.4e-3*coulombs/mole);
+/// molar gas constant
+BOOST_UNITS_PHYSICAL_CONSTANT(R,quantity<energy_over_temperature_amount>,8.314472*joules/kelvin/mole,1.5e-5*joules/kelvin/mole);
+/// Boltzmann constant
+BOOST_UNITS_PHYSICAL_CONSTANT(k_B,quantity<energy_over_temperature>,1.3806504e-23*joules/kelvin,2.4e-29*joules/kelvin);
+/// Stefan-Boltzmann constant
+BOOST_UNITS_PHYSICAL_CONSTANT(sigma_SB,quantity<power_over_area_temperature_4>,5.670400e-8*watts/square_meter/pow<4>(kelvin),4.0e-13*watts/square_meter/pow<4>(kelvin));
+/// first radiation constant
+BOOST_UNITS_PHYSICAL_CONSTANT(c_1,quantity<power_area>,3.74177118e-16*watt*square_meters,1.9e-23*watt*square_meters);
+/// first radiation constant for spectral radiance
+BOOST_UNITS_PHYSICAL_CONSTANT(c_1L,quantity<power_area_over_solid_angle>,1.191042759e-16*watt*square_meters/steradian,5.9e-24*watt*square_meters/steradian);
+/// second radiation constant
+BOOST_UNITS_PHYSICAL_CONSTANT(c_2,quantity<length_temperature>,1.4387752e-2*meter*kelvin,2.5e-8*meter*kelvin);
+/// Wien displacement law constant : lambda_max T
+BOOST_UNITS_PHYSICAL_CONSTANT(b,quantity<length_temperature>,2.8977685e-3*meter*kelvin,5.1e-9*meter*kelvin);
+/// Wien displacement law constant : nu_max/T
+BOOST_UNITS_PHYSICAL_CONSTANT(b_prime,quantity<frequency_over_temperature>,5.878933e10*hertz/kelvin,1.0e15*hertz/kelvin);
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_PHYSICO_CHEMICAL_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/proton_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/proton_constants.hpp
new file mode 100644 (file)
index 0000000..14c1ee0
--- /dev/null
@@ -0,0 +1,97 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_PROTON_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_PROTON_CONSTANTS_HPP
+
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/systems/detail/constants.hpp>
+#include <boost/units/systems/si/amount.hpp>
+#include <boost/units/systems/si/area.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/length.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/magnetic_flux_density.hpp>
+#include <boost/units/systems/si/time.hpp>
+#include <boost/units/systems/si/wavenumber.hpp>
+
+#include <boost/units/systems/si/codata/typedefs.hpp>
+
+/// \file
+/// CODATA recommended values of fundamental atomic and nuclear constants
+/// CODATA 2006 values as of 2007/03/30
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+/// CODATA recommended values of the fundamental physical constants: NIST SP 961
+
+/// proton mass
+BOOST_UNITS_PHYSICAL_CONSTANT(m_p,quantity<mass>,1.672621637e-27*kilograms,8.3e-35*kilograms);
+/// proton-electron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_e,quantity<dimensionless>,1836.15267247*dimensionless(),8.0e-7*dimensionless());
+/// proton-muon mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_mu,quantity<dimensionless>,8.88024339*dimensionless(),2.3e-7*dimensionless());
+/// proton-tau mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_tau,quantity<dimensionless>,0.528012*dimensionless(),8.6e-5*dimensionless());
+/// proton-neutron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_p_over_m_n,quantity<dimensionless>,0.99862347824*dimensionless(),4.6e-10*dimensionless());
+/// proton charge to mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(e_over_m_p,quantity<electric_charge_over_mass>,9.57883392e7*coulombs/kilogram,2.4e0*coulombs/kilogram);
+/// proton molar mass
+BOOST_UNITS_PHYSICAL_CONSTANT(M_p,quantity<mass_over_amount>,1.00727646677e-3*kilograms/mole,1.0e-13*kilograms/mole);
+/// proton Compton wavelength
+BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_p,quantity<length>,1.3214098446e-15*meters,1.9e-24*meters);
+/// proton rms charge radius
+BOOST_UNITS_PHYSICAL_CONSTANT(R_p,quantity<length>,0.8768e-15*meters,6.9e-18*meters);
+/// proton magnetic moment
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_p,quantity<energy_over_magnetic_flux_density>,1.410606662e-26*joules/tesla,3.7e-34*joules/tesla);
+/// proton-Bohr magneton ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_B,quantity<dimensionless>,1.521032209e-3*dimensionless(),1.2e-11*dimensionless());
+/// proton-nuclear magneton ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_N,quantity<dimensionless>,2.792847356*dimensionless(),2.3e-8*dimensionless());
+/// proton g-factor
+BOOST_UNITS_PHYSICAL_CONSTANT(g_p,quantity<dimensionless>,5.585694713*dimensionless(),4.6e-8*dimensionless());
+/// proton-neutron magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_over_mu_n,quantity<dimensionless>,-1.45989806*dimensionless(),3.4e-7*dimensionless());
+/// shielded proton magnetic moment
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime,quantity<energy_over_magnetic_flux_density>,1.410570419e-26*joules/tesla,3.8e-34*joules/tesla);
+/// shielded proton-Bohr magneton ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime_over_mu_B,quantity<dimensionless>,1.520993128e-3*dimensionless(),1.7e-11*dimensionless());
+/// shielded proton-nuclear magneton ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_p_prime_over_mu_N,quantity<dimensionless>,2.792775598*dimensionless(),3.0e-8*dimensionless());
+/// proton magnetic shielding correction
+BOOST_UNITS_PHYSICAL_CONSTANT(sigma_p_prime,quantity<dimensionless>,25.694e-6*dimensionless(),1.4e-8*dimensionless());
+/// proton gyromagnetic ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(gamma_p,quantity<frequency_over_magnetic_flux_density>,2.675222099e8/second/tesla,7.0e0/second/tesla);
+/// shielded proton gyromagnetic ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(gamma_p_prime,quantity<frequency_over_magnetic_flux_density>,2.675153362e8/second/tesla,7.3e0/second/tesla);
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_PROTON_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/tau_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/tau_constants.hpp
new file mode 100644 (file)
index 0000000..653019e
--- /dev/null
@@ -0,0 +1,71 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_TAU_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_TAU_CONSTANTS_HPP
+
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/systems/detail/constants.hpp>
+#include <boost/units/systems/si/amount.hpp>
+#include <boost/units/systems/si/area.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/length.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/magnetic_flux_density.hpp>
+#include <boost/units/systems/si/time.hpp>
+#include <boost/units/systems/si/wavenumber.hpp>
+
+#include <boost/units/systems/si/codata/typedefs.hpp>
+
+/// \file
+/// CODATA recommended values of fundamental atomic and nuclear constants
+/// CODATA 2006 values as of 2007/03/30
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+/// CODATA recommended values of the fundamental physical constants: NIST SP 961
+
+/// tau mass
+BOOST_UNITS_PHYSICAL_CONSTANT(m_tau,quantity<mass>,3.16777e-27*kilograms,5.2e-31*kilograms);
+/// tau-electron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_e,quantity<dimensionless>,3477.48*dimensionless(),5.7e-1*dimensionless());
+/// tau-muon mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_mu,quantity<dimensionless>,16.8183*dimensionless(),2.7e-3*dimensionless());
+/// tau-proton mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_p,quantity<dimensionless>,1.89390*dimensionless(),3.1e-4*dimensionless());
+/// tau-neutron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_tau_over_m_n,quantity<dimensionless>,1.89129*dimensionless(),3.1e-4*dimensionless());
+/// tau molar mass
+BOOST_UNITS_PHYSICAL_CONSTANT(M_tau,quantity<mass_over_amount>,1.90768e-3*kilograms/mole,3.1e-7*kilograms/mole);
+/// tau Compton wavelength
+BOOST_UNITS_PHYSICAL_CONSTANT(lambda_C_tau,quantity<length>,0.69772e-15*meters,1.1e-19*meters);
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_TAU_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/triton_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/triton_constants.hpp
new file mode 100644 (file)
index 0000000..24448ab
--- /dev/null
@@ -0,0 +1,79 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_TRITON_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_TRITON_CONSTANTS_HPP
+
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/systems/detail/constants.hpp>
+#include <boost/units/systems/si/amount.hpp>
+#include <boost/units/systems/si/area.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/length.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/magnetic_flux_density.hpp>
+#include <boost/units/systems/si/time.hpp>
+#include <boost/units/systems/si/wavenumber.hpp>
+
+#include <boost/units/systems/si/codata/typedefs.hpp>
+
+/// \file
+/// CODATA recommended values of fundamental atomic and nuclear constants
+/// CODATA 2006 values as of 2007/03/30
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+/// CODATA recommended values of the fundamental physical constants: NIST SP 961
+
+/// triton mass
+BOOST_UNITS_PHYSICAL_CONSTANT(m_t,quantity<mass>,5.00735588e-27*kilograms,2.5e-34*kilograms);
+/// triton-electron mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_t_over_m_e,quantity<dimensionless>,5496.9215269*dimensionless(),5.1e-6*dimensionless());
+/// triton-proton mass ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(m_t_over_m_p,quantity<dimensionless>,2.9937170309*dimensionless(),2.5e-9*dimensionless());
+/// triton molar mass
+BOOST_UNITS_PHYSICAL_CONSTANT(M_t,quantity<mass_over_amount>,3.0155007134e-3*kilograms/mole,2.5e-12*kilograms/mole);
+/// triton magnetic moment
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_t,quantity<energy_over_magnetic_flux_density>,1.504609361e-26*joules/tesla,4.2e-34*joules/tesla);
+/// triton-Bohr magneton ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_B,quantity<dimensionless>,1.622393657e-3*dimensionless(),2.1e-11*dimensionless());
+/// triton-nuclear magneton ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_N,quantity<dimensionless>,2.978962448*dimensionless(),3.8e-8*dimensionless());
+/// triton g-factor
+BOOST_UNITS_PHYSICAL_CONSTANT(g_t,quantity<dimensionless>,5.957924896*dimensionless(),7.6e-8*dimensionless());
+/// triton-electron magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_e,quantity<dimensionless>,-1.620514423e-3*dimensionless(),2.1e-11*dimensionless());
+/// triton-proton magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_p,quantity<dimensionless>,1.066639908*dimensionless(),1.0e-8*dimensionless());
+/// triton-neutron magnetic moment ratio
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_t_over_mu_n,quantity<dimensionless>,-1.55718553*dimensionless(),3.7e-7*dimensionless());
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_TRITON_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/typedefs.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/typedefs.hpp
new file mode 100644 (file)
index 0000000..27330ce
--- /dev/null
@@ -0,0 +1,79 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_TYPEDEFS_HPP
+#define BOOST_UNITS_CODATA_TYPEDEFS_HPP
+
+#include <boost/units/operators.hpp>
+#include <boost/units/systems/si/amount.hpp>
+#include <boost/units/systems/si/area.hpp>
+#include <boost/units/systems/si/capacitance.hpp>
+#include <boost/units/systems/si/electric_charge.hpp>
+#include <boost/units/systems/si/current.hpp>
+#include <boost/units/systems/si/electric_potential.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/force.hpp>
+#include <boost/units/systems/si/frequency.hpp>
+#include <boost/units/systems/si/magnetic_flux_density.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/length.hpp>
+#include <boost/units/systems/si/power.hpp>
+#include <boost/units/systems/si/solid_angle.hpp>
+#include <boost/units/systems/si/temperature.hpp>
+#include <boost/units/systems/si/time.hpp>
+#include <boost/units/systems/si/volume.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+typedef divide_typeof_helper<frequency,electric_potential>::type frequency_over_electric_potential;
+typedef divide_typeof_helper<electric_charge,mass>::type electric_charge_over_mass;
+typedef divide_typeof_helper<mass,amount>::type mass_over_amount;
+typedef divide_typeof_helper<energy,magnetic_flux_density>::type energy_over_magnetic_flux_density;
+typedef divide_typeof_helper<frequency,magnetic_flux_density>::type frequency_over_magnetic_flux_density;
+typedef divide_typeof_helper<current,energy>::type current_over_energy;
+typedef divide_typeof_helper<dimensionless,amount>::type inverse_amount;
+typedef divide_typeof_helper<energy,temperature>::type energy_over_temperature;
+typedef divide_typeof_helper<energy_over_temperature,amount>::type energy_over_temperature_amount;
+typedef divide_typeof_helper<
+            divide_typeof_helper<power,area>::type,
+            power_typeof_helper<temperature,static_rational<4> >::type
+        >::type power_over_area_temperature_4;
+typedef multiply_typeof_helper<power,area>::type power_area;
+typedef divide_typeof_helper<power_area,solid_angle>::type power_area_over_solid_angle;
+typedef multiply_typeof_helper<length,temperature>::type length_temperature;
+typedef divide_typeof_helper<frequency,temperature>::type frequency_over_temperature;
+typedef divide_typeof_helper<divide_typeof_helper<force,current>::type,current>::type force_over_current_squared;
+typedef divide_typeof_helper<capacitance,length>::type capacitance_over_length;
+typedef divide_typeof_helper<
+            divide_typeof_helper<divide_typeof_helper<volume,mass>::type,time>::type,
+            time
+        >::type volume_over_mass_time_squared;
+typedef multiply_typeof_helper<energy,time>::type energy_time;
+typedef divide_typeof_helper<electric_charge,amount>::type electric_charge_over_amount;
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata/universal_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata/universal_constants.hpp
new file mode 100644 (file)
index 0000000..21f076b
--- /dev/null
@@ -0,0 +1,80 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_UNIVERSAL_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_UNIVERSAL_CONSTANTS_HPP
+
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/systems/detail/constants.hpp>
+#include <boost/units/systems/si/capacitance.hpp>
+#include <boost/units/systems/si/current.hpp>
+#include <boost/units/systems/si/energy.hpp>
+#include <boost/units/systems/si/force.hpp>
+#include <boost/units/systems/si/length.hpp>
+#include <boost/units/systems/si/mass.hpp>
+#include <boost/units/systems/si/resistance.hpp>
+#include <boost/units/systems/si/temperature.hpp>
+#include <boost/units/systems/si/time.hpp>
+#include <boost/units/systems/si/velocity.hpp>
+#include <boost/units/systems/si/volume.hpp>
+#include <boost/units/systems/si/codata/typedefs.hpp>
+
+/// \file
+/// CODATA recommended values of fundamental universal constants
+/// using CODATA 2006 values as of 2007/03/30
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+                            
+namespace constants {
+
+namespace codata {
+
+/// CODATA recommended values of the fundamental physical constants: NIST SP 961
+
+// UNIVERSAL
+/// speed of light
+BOOST_UNITS_PHYSICAL_CONSTANT(c,quantity<velocity>,299792458.0*meters/second,0.0*meters/second);
+/// magnetic constant (exactly 4 pi x 10^(-7) - error is due to finite precision of pi)
+BOOST_UNITS_PHYSICAL_CONSTANT(mu_0,quantity<force_over_current_squared>,12.56637061435917295385057353311801153679e-7*newtons/ampere/ampere,0.0*newtons/ampere/ampere);
+/// electric constant
+BOOST_UNITS_PHYSICAL_CONSTANT(epsilon_0,quantity<capacitance_over_length>,8.854187817620389850536563031710750260608e-12*farad/meter,0.0*farad/meter);
+/// characteristic impedance of vacuum
+BOOST_UNITS_PHYSICAL_CONSTANT(Z_0,quantity<resistance>,376.7303134617706554681984004203193082686*ohm,0.0*ohm);
+/// Newtonian constant of gravitation
+BOOST_UNITS_PHYSICAL_CONSTANT(G,quantity<volume_over_mass_time_squared>,6.67428e-11*cubic_meters/kilogram/second/second,6.7e-15*cubic_meters/kilogram/second/second);
+/// Planck constant
+BOOST_UNITS_PHYSICAL_CONSTANT(h,quantity<energy_time>,6.62606896e-34*joule*seconds,3.3e-41*joule*seconds);
+/// Dirac constant
+BOOST_UNITS_PHYSICAL_CONSTANT(hbar,quantity<energy_time>,1.054571628e-34*joule*seconds,5.3e-42*joule*seconds);
+/// Planck mass
+BOOST_UNITS_PHYSICAL_CONSTANT(m_P,quantity<mass>,2.17644e-8*kilograms,1.1e-12*kilograms);
+/// Planck temperature
+BOOST_UNITS_PHYSICAL_CONSTANT(T_P,quantity<temperature>,1.416785e32*kelvin,7.1e27*kelvin);
+/// Planck length
+BOOST_UNITS_PHYSICAL_CONSTANT(l_P,quantity<length>,1.616252e-35*meters,8.1e-40*meters);
+/// Planck time
+BOOST_UNITS_PHYSICAL_CONSTANT(t_P,quantity<time>,5.39124e-44*seconds,2.7e-48*seconds);
+
+} // namespace codata
+
+} // namespace constants    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CODATA_UNIVERSAL_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/codata_constants.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/codata_constants.hpp
new file mode 100644 (file)
index 0000000..69bb858
--- /dev/null
@@ -0,0 +1,19 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_CODATA_CONSTANTS_HPP
+#define BOOST_UNITS_CODATA_CONSTANTS_HPP
+
+#include <boost/units/systems/si/codata/atomic-nuclear_constants.hpp>
+#include <boost/units/systems/si/codata/electromagnetic_constants.hpp>
+#include <boost/units/systems/si/codata/physico-chemical_constants.hpp>
+#include <boost/units/systems/si/codata/universal_constants.hpp>
+
+#endif // BOOST_UNITS_CODATA_CONSTANTS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/conductance.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/conductance.hpp
new file mode 100644 (file)
index 0000000..68c82c9
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_CONDUCTANCE_HPP
+#define BOOST_UNITS_SI_CONDUCTANCE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/conductance.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<conductance_dimension,si::system>    conductance;
+
+BOOST_UNITS_STATIC_CONSTANT(siemen,conductance);    
+BOOST_UNITS_STATIC_CONSTANT(siemens,conductance);   
+BOOST_UNITS_STATIC_CONSTANT(mho,conductance);   
+BOOST_UNITS_STATIC_CONSTANT(mhos,conductance);  
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_CONDUCTANCE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/conductivity.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/conductivity.hpp
new file mode 100644 (file)
index 0000000..0f48b64
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_CONDUCTIVITY_HPP
+#define BOOST_UNITS_SI_CONDUCTIVITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/conductivity.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<conductivity_dimension,si::system>    conductivity;
+                                        
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_CONDUCTIVITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/current.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/current.hpp
new file mode 100644 (file)
index 0000000..e2ba345
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_CURRENT_HPP
+#define BOOST_UNITS_SI_CURRENT_HPP
+
+#include <boost/units/systems/si/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<current_dimension,si::system>   current;
+    
+BOOST_UNITS_STATIC_CONSTANT(ampere,current);
+BOOST_UNITS_STATIC_CONSTANT(amperes,current);
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_CURRENT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/dimensionless.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/dimensionless.hpp
new file mode 100644 (file)
index 0000000..aa7b2c3
--- /dev/null
@@ -0,0 +1,30 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_DIMENSIONLESS_HPP
+#define BOOST_UNITS_SI_DIMENSIONLESS_HPP
+
+#include <boost/units/systems/si/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+BOOST_UNITS_STATIC_CONSTANT(si_dimensionless,dimensionless);
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_DIMENSIONLESS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/dose_equivalent.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/dose_equivalent.hpp
new file mode 100644 (file)
index 0000000..0be0d3b
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP
+#define BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/dose_equivalent.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<dose_equivalent_dimension,si::system>     dose_equivalent;
+    
+BOOST_UNITS_STATIC_CONSTANT(sievert,dose_equivalent);  
+BOOST_UNITS_STATIC_CONSTANT(sieverts,dose_equivalent); 
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_DOSE_EQUIVALENT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/dynamic_viscosity.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/dynamic_viscosity.hpp
new file mode 100644 (file)
index 0000000..f72523f
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_DYNAMIC_VISCOSITY_HPP
+#define BOOST_UNITS_SI_DYNAMIC_VISCOSITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/dynamic_viscosity.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<dynamic_viscosity_dimension,si::system>     dynamic_viscosity;
+    
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_DYNAMIC_VISCOSITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/electric_charge.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/electric_charge.hpp
new file mode 100644 (file)
index 0000000..fa1ccff
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_ELECTRIC_CHARGE_HPP
+#define BOOST_UNITS_SI_ELECTRIC_CHARGE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/electric_charge.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<electric_charge_dimension,si::system>    electric_charge;
+   
+BOOST_UNITS_STATIC_CONSTANT(coulomb,electric_charge);   
+BOOST_UNITS_STATIC_CONSTANT(coulombs,electric_charge);  
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_ELECTRIC_CHARGE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/electric_potential.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/electric_potential.hpp
new file mode 100644 (file)
index 0000000..e737985
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_ELECTRIC_POTENTIAL_HPP
+#define BOOST_UNITS_SI_ELECTRIC_POTENTIAL_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/electric_potential.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<electric_potential_dimension,si::system>    electric_potential;
+    
+BOOST_UNITS_STATIC_CONSTANT(volt,electric_potential);   
+BOOST_UNITS_STATIC_CONSTANT(volts,electric_potential);  
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_ELECTRIC_POTENTIAL_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/energy.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/energy.hpp
new file mode 100644 (file)
index 0000000..4fb1aa8
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_ENERGY_HPP
+#define BOOST_UNITS_SI_ENERGY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/energy.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<energy_dimension,si::system>    energy;
+    
+BOOST_UNITS_STATIC_CONSTANT(joule,energy);  
+BOOST_UNITS_STATIC_CONSTANT(joules,energy); 
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_ENERGY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/force.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/force.hpp
new file mode 100644 (file)
index 0000000..cd2689f
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_FORCE_HPP
+#define BOOST_UNITS_SI_FORCE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/force.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<force_dimension,si::system>     force;
+    
+BOOST_UNITS_STATIC_CONSTANT(newton,force);  
+BOOST_UNITS_STATIC_CONSTANT(newtons,force); 
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_FORCE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/frequency.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/frequency.hpp
new file mode 100644 (file)
index 0000000..83fbb5c
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_FREQUENCY_HPP
+#define BOOST_UNITS_SI_FREQUENCY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/frequency.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<frequency_dimension,si::system>     frequency;
+    
+BOOST_UNITS_STATIC_CONSTANT(hertz,frequency);   
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_FREQUENCY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/illuminance.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/illuminance.hpp
new file mode 100644 (file)
index 0000000..96f28c7
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_ILLUMINANCE_HPP
+#define BOOST_UNITS_SI_ILLUMINANCE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/illuminance.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<illuminance_dimension,si::system>      illuminance;
+    
+BOOST_UNITS_STATIC_CONSTANT(lux,illuminance); 
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_ILLUMINANCE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/impedance.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/impedance.hpp
new file mode 100644 (file)
index 0000000..d2d7195
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_IMPEDANCE_HPP
+#define BOOST_UNITS_SI_IMPEDANCE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/impedance.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<impedance_dimension,si::system>    impedance;
+                                            
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_IMPEDANCE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/inductance.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/inductance.hpp
new file mode 100644 (file)
index 0000000..a3f8f3a
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_INDUCTANCE_HPP
+#define BOOST_UNITS_SI_INDUCTANCE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/inductance.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<inductance_dimension,si::system>    inductance;
+    
+BOOST_UNITS_STATIC_CONSTANT(henry,inductance);  
+BOOST_UNITS_STATIC_CONSTANT(henrys,inductance); 
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_INDUCTANCE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/io.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/io.hpp
new file mode 100644 (file)
index 0000000..3f096ca
--- /dev/null
@@ -0,0 +1,88 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_IO_HPP
+#define BOOST_UNITS_SI_IO_HPP
+
+#include <boost/units/io.hpp>
+#include <boost/units/reduce_unit.hpp>
+
+#include <boost/units/systems/si.hpp>
+
+namespace boost {
+
+namespace units { 
+
+// gray and sievert are indistinguishable
+inline std::string name_string(const reduce_unit<si::absorbed_dose>::type&) { return "gray"; }
+inline std::string symbol_string(const reduce_unit<si::absorbed_dose>::type&) { return "Gy"; }
+
+// activity and frequency are indistinguishable - would need a "decays" base unit
+//inline std::string name_string(const si::activity&) { return "becquerel"; }
+//inline std::string symbol_string(const si::activity&) { return "Bq"; }
+
+inline std::string name_string(const reduce_unit<si::capacitance>::type&)   { return "farad"; }
+inline std::string symbol_string(const reduce_unit<si::capacitance>::type&) { return "F"; }
+
+inline std::string name_string(const reduce_unit<si::catalytic_activity>::type&) { return "katal"; }
+inline std::string symbol_string(const reduce_unit<si::catalytic_activity>::type&) { return "kat"; }
+
+inline std::string name_string(const reduce_unit<si::conductance>::type&) { return "siemen"; }
+inline std::string symbol_string(const reduce_unit<si::conductance>::type&) { return "S"; }
+
+// gray and sievert are indistinguishable
+//inline std::string name_string(const si::dose_equivalent&) { return "sievert"; }
+//inline std::string symbol_string(const si::dose_equivalent&) { return "Sv"; }
+
+inline std::string name_string(const reduce_unit<si::electric_charge>::type&) { return "coulomb"; }
+inline std::string symbol_string(const reduce_unit<si::electric_charge>::type&) { return "C"; }
+
+inline std::string name_string(const reduce_unit<si::electric_potential>::type&) { return "volt"; }
+inline std::string symbol_string(const reduce_unit<si::electric_potential>::type&) { return "V"; }
+
+inline std::string name_string(const reduce_unit<si::energy>::type&) { return "joule"; }
+inline std::string symbol_string(const reduce_unit<si::energy>::type&) { return "J"; }
+
+inline std::string name_string(const reduce_unit<si::force>::type&) { return "newton"; }
+inline std::string symbol_string(const reduce_unit<si::force>::type&) { return "N"; }
+
+inline std::string name_string(const reduce_unit<si::frequency>::type&) { return "hertz"; }
+inline std::string symbol_string(const reduce_unit<si::frequency>::type&) { return "Hz"; }
+
+inline std::string name_string(const reduce_unit<si::illuminance>::type&) { return "lux"; }
+inline std::string symbol_string(const reduce_unit<si::illuminance>::type&) { return "lx"; }
+
+inline std::string name_string(const reduce_unit<si::inductance>::type&) { return "henry"; }
+inline std::string symbol_string(const reduce_unit<si::inductance>::type&) { return "H"; }
+
+inline std::string name_string(const reduce_unit<si::luminous_flux>::type&) { return "lumen"; }
+inline std::string symbol_string(const reduce_unit<si::luminous_flux>::type&) { return "lm"; }
+
+inline std::string name_string(const reduce_unit<si::magnetic_flux>::type&) { return "weber"; }
+inline std::string symbol_string(const reduce_unit<si::magnetic_flux>::type&) { return "Wb"; }
+
+inline std::string name_string(const reduce_unit<si::magnetic_flux_density>::type&) { return "tesla"; }
+inline std::string symbol_string(const reduce_unit<si::magnetic_flux_density>::type&) { return "T"; }
+
+inline std::string name_string(const reduce_unit<si::power>::type&) { return "watt"; }
+inline std::string symbol_string(const reduce_unit<si::power>::type&) { return "W"; }
+
+inline std::string name_string(const reduce_unit<si::pressure>::type&) { return "pascal"; }
+inline std::string symbol_string(const reduce_unit<si::pressure>::type&) { return "Pa"; }
+
+inline std::string name_string(const reduce_unit<si::resistance>::type&) { return "ohm"; }
+inline std::string symbol_string(const reduce_unit<si::resistance>::type&) { return "Ohm"; }
+
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_IO_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/kinematic_viscosity.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/kinematic_viscosity.hpp
new file mode 100644 (file)
index 0000000..0224644
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_KINEMATIC_VISCOSITY_HPP
+#define BOOST_UNITS_SI_KINEMATIC_VISCOSITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/kinematic_viscosity.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<kinematic_viscosity_dimension,si::system>     kinematic_viscosity;
+    
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_KINEMATIC_VISCOSITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/length.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/length.hpp
new file mode 100644 (file)
index 0000000..40eab13
--- /dev/null
@@ -0,0 +1,35 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_LENGTH_HPP
+#define BOOST_UNITS_SI_LENGTH_HPP
+
+#include <boost/units/systems/si/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<length_dimension,si::system>    length;
+    
+BOOST_UNITS_STATIC_CONSTANT(meter,length);  
+BOOST_UNITS_STATIC_CONSTANT(meters,length); 
+BOOST_UNITS_STATIC_CONSTANT(metre,length);  
+BOOST_UNITS_STATIC_CONSTANT(metres,length); 
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_LENGTH_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/luminous_flux.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/luminous_flux.hpp
new file mode 100644 (file)
index 0000000..99a1acf
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_LUMINOUS_FLUX_HPP
+#define BOOST_UNITS_SI_LUMINOUS_FLUX_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/luminous_flux.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<luminous_flux_dimension,si::system>      luminous_flux;
+    
+BOOST_UNITS_STATIC_CONSTANT(lumen,luminous_flux); 
+BOOST_UNITS_STATIC_CONSTANT(lumens,luminous_flux);    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_LUMINOUS_FLUX_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/luminous_intensity.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/luminous_intensity.hpp
new file mode 100644 (file)
index 0000000..2558c9e
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_LUMINOUS_INTENSITY_HPP
+#define BOOST_UNITS_SI_LUMINOUS_INTENSITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<luminous_intensity_dimension,si::system>      luminous_intensity;
+    
+BOOST_UNITS_STATIC_CONSTANT(candela,luminous_intensity); 
+BOOST_UNITS_STATIC_CONSTANT(candelas,luminous_intensity);    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_LUMINOUS_INTENSITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/magnetic_field_intensity.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/magnetic_field_intensity.hpp
new file mode 100644 (file)
index 0000000..2f36d90
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_MAGNETIC_FIELD_INTENSITY_HPP
+#define BOOST_UNITS_SI_MAGNETIC_FIELD_INTENSITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/magnetic_field_intensity.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<magnetic_field_intensity_dimension,si::system>    magnetic_field_intensity;
+                                                                                       
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_MAGNETIC_FIELD_INTENSITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/magnetic_flux.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/magnetic_flux.hpp
new file mode 100644 (file)
index 0000000..602a380
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_MAGNETIC_FLUX_HPP
+#define BOOST_UNITS_SI_MAGNETIC_FLUX_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/magnetic_flux.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<magnetic_flux_dimension,si::system>    magnetic_flux;
+    
+BOOST_UNITS_STATIC_CONSTANT(weber,magnetic_flux);   
+BOOST_UNITS_STATIC_CONSTANT(webers,magnetic_flux);  
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_MAGNETIC_FLUX_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/magnetic_flux_density.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/magnetic_flux_density.hpp
new file mode 100644 (file)
index 0000000..fc89069
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_MAGNETIC_FLUX_DENSITY_HPP
+#define BOOST_UNITS_SI_MAGNETIC_FLUX_DENSITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/magnetic_flux_density.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<magnetic_flux_density_dimension,si::system>    magnetic_flux_density;
+    
+BOOST_UNITS_STATIC_CONSTANT(tesla,magnetic_flux_density);   
+BOOST_UNITS_STATIC_CONSTANT(teslas,magnetic_flux_density);  
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_MAGNETIC_FLUX_DENSITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/mass.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/mass.hpp
new file mode 100644 (file)
index 0000000..5f35225
--- /dev/null
@@ -0,0 +1,35 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_MASS_HPP
+#define BOOST_UNITS_SI_MASS_HPP
+
+#include <boost/units/systems/si/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<mass_dimension,si::system>      mass;
+    
+BOOST_UNITS_STATIC_CONSTANT(kilogram,mass); 
+BOOST_UNITS_STATIC_CONSTANT(kilograms,mass);    
+BOOST_UNITS_STATIC_CONSTANT(kilogramme,mass);   
+BOOST_UNITS_STATIC_CONSTANT(kilogrammes,mass);  
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_MASS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/mass_density.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/mass_density.hpp
new file mode 100644 (file)
index 0000000..a321e08
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_MASS_DENSITY_HPP
+#define BOOST_UNITS_SI_MASS_DENSITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/mass_density.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<mass_density_dimension,si::system>  mass_density;
+
+BOOST_UNITS_STATIC_CONSTANT(kilogram_per_cubic_meter,mass_density);
+BOOST_UNITS_STATIC_CONSTANT(kilograms_per_cubic_meter,mass_density);
+BOOST_UNITS_STATIC_CONSTANT(kilogramme_per_cubic_metre,mass_density);
+BOOST_UNITS_STATIC_CONSTANT(kilogrammes_per_cubic_metre,mass_density);
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_MASS_DENSITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/moment_of_inertia.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/moment_of_inertia.hpp
new file mode 100644 (file)
index 0000000..b86c0e6
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_MOMENT_OF_INERTIA_HPP
+#define BOOST_UNITS_SI_MOMENT_OF_INERTIA_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/moment_of_inertia.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<moment_of_inertia_dimension,si::system>      moment_of_inertia;
+    
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_MOMENT_OF_INERTIA_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/momentum.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/momentum.hpp
new file mode 100644 (file)
index 0000000..fb6f2d3
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_MOMENTUM_HPP
+#define BOOST_UNITS_SI_MOMENTUM_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/momentum.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<momentum_dimension,si::system>  momentum;
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_MOMENTUM_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/permeability.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/permeability.hpp
new file mode 100644 (file)
index 0000000..72ee333
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_PERMEABILITY_HPP
+#define BOOST_UNITS_SI_PERMEABILITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/permeability.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<permeability_dimension,si::system>    permeability;
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_PERMEABILITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/permittivity.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/permittivity.hpp
new file mode 100644 (file)
index 0000000..b46c7ae
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_PERMITTIVITY_HPP
+#define BOOST_UNITS_SI_PERMITTIVITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/permittivity.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<permittivity_dimension,si::system>    permittivity;
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_PERMITTIVITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/plane_angle.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/plane_angle.hpp
new file mode 100644 (file)
index 0000000..918900c
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_PLANE_ANGLE_HPP
+#define BOOST_UNITS_SI_PLANE_ANGLE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<plane_angle_dimension,si::system>      plane_angle;
+    
+BOOST_UNITS_STATIC_CONSTANT(radian,plane_angle); 
+BOOST_UNITS_STATIC_CONSTANT(radians,plane_angle);    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_PLANE_ANGLE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/power.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/power.hpp
new file mode 100644 (file)
index 0000000..9d1b979
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_POWER_HPP
+#define BOOST_UNITS_SI_POWER_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/power.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<power_dimension,si::system>     power;
+    
+BOOST_UNITS_STATIC_CONSTANT(watt,power);    
+BOOST_UNITS_STATIC_CONSTANT(watts,power);   
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_POWER_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/prefixes.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/prefixes.hpp
new file mode 100644 (file)
index 0000000..ec36fd0
--- /dev/null
@@ -0,0 +1,77 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_PREFIXES_HPP
+#define BOOST_UNITS_SI_PREFIXES_HPP
+
+#include <boost/units/static_constant.hpp>
+
+#include <boost/units/make_scaled_unit.hpp>
+#include <boost/units/systems/si/dimensionless.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+#define BOOST_UNITS_METRIC_PREFIX(exponent, name)                                                       \
+    typedef make_scaled_unit<dimensionless, scale<10, static_rational<exponent> > >::type name ## _type;\
+    BOOST_UNITS_STATIC_CONSTANT(name, name ## _type)
+
+BOOST_UNITS_METRIC_PREFIX(-24, yocto);
+BOOST_UNITS_METRIC_PREFIX(-21, zepto);
+BOOST_UNITS_METRIC_PREFIX(-18, atto);
+BOOST_UNITS_METRIC_PREFIX(-15, femto);
+BOOST_UNITS_METRIC_PREFIX(-12, pico);
+BOOST_UNITS_METRIC_PREFIX(-9, nano);
+BOOST_UNITS_METRIC_PREFIX(-6, micro);
+BOOST_UNITS_METRIC_PREFIX(-3, milli);
+BOOST_UNITS_METRIC_PREFIX(-2, centi);
+BOOST_UNITS_METRIC_PREFIX(-1, deci);
+BOOST_UNITS_METRIC_PREFIX(1, deka);
+BOOST_UNITS_METRIC_PREFIX(2, hecto);
+BOOST_UNITS_METRIC_PREFIX(3, kilo);
+BOOST_UNITS_METRIC_PREFIX(6, mega);
+BOOST_UNITS_METRIC_PREFIX(9, giga);
+BOOST_UNITS_METRIC_PREFIX(12, tera);
+BOOST_UNITS_METRIC_PREFIX(15, peta);
+BOOST_UNITS_METRIC_PREFIX(18, exa);
+BOOST_UNITS_METRIC_PREFIX(21, zetta);
+BOOST_UNITS_METRIC_PREFIX(24, yotta);
+
+/*BOOST_UNITS_STATIC_CONSTANT(yocto,long double) = (1e-24);       ///< metric prefix for 1.0e-24
+BOOST_UNITS_STATIC_CONSTANT(zepto,long double) = (1e-21);       ///< metric prefix for 1.0e-21
+BOOST_UNITS_STATIC_CONSTANT(atto,long double) = (1e-18);        ///< metric prefix for 1.0e-18
+BOOST_UNITS_STATIC_CONSTANT(femto,long double) = (1e-15);       ///< metric prefix for 1.0e-15
+BOOST_UNITS_STATIC_CONSTANT(pico,long double) = (1e-12);        ///< metric prefix for 1.0e-12
+BOOST_UNITS_STATIC_CONSTANT(nano,long double) = (1e-9);         ///< metric prefix for 1.0e-9
+BOOST_UNITS_STATIC_CONSTANT(micro,long double) = (1e-6);        ///< metric prefix for 1.0e-6
+BOOST_UNITS_STATIC_CONSTANT(milli,long double) = (1e-3);        ///< metric prefix for 1.0e-3
+BOOST_UNITS_STATIC_CONSTANT(centi,long double) = (1e-2);        ///< metric prefix for 1.0e-2
+BOOST_UNITS_STATIC_CONSTANT(deci,long double) = (1e-1);         ///< metric prefix for 1.0e-1
+BOOST_UNITS_STATIC_CONSTANT(deka,long double) = (1e1);          ///< metric prefix for 1.0e+1
+BOOST_UNITS_STATIC_CONSTANT(hecto,long double) = (1e2);         ///< metric prefix for 1.0e+2
+BOOST_UNITS_STATIC_CONSTANT(kilo,long double) = (1e3);          ///< metric prefix for 1.0e+3
+BOOST_UNITS_STATIC_CONSTANT(mega,long double) = (1e6);          ///< metric prefix for 1.0e+6
+BOOST_UNITS_STATIC_CONSTANT(giga,long double) = (1e9);          ///< metric prefix for 1.0e+9
+BOOST_UNITS_STATIC_CONSTANT(tera,long double) = (1e12);         ///< metric prefix for 1.0e+12
+BOOST_UNITS_STATIC_CONSTANT(peta,long double) = (1e15);         ///< metric prefix for 1.0e+15
+BOOST_UNITS_STATIC_CONSTANT(exa,long double) = (1e18);          ///< metric prefix for 1.0e+18
+BOOST_UNITS_STATIC_CONSTANT(zetta,long double) = (1e21);        ///< metric prefix for 1.0e+21
+BOOST_UNITS_STATIC_CONSTANT(yotta,long double) = (1e24);        ///< metric prefix for 1.0e+24 */ 
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_PREFIXES_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/pressure.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/pressure.hpp
new file mode 100644 (file)
index 0000000..b9105e4
--- /dev/null
@@ -0,0 +1,49 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_PRESSURE_HPP
+#define BOOST_UNITS_SI_PRESSURE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/pressure.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<pressure_dimension,si::system>      pressure;
+
+// windef.h #defines pascal on Metrowerks compilers
+#if defined(__MWERKS__)
+   #if !__option(only_std_keywords)
+       #define BOOST_UNITS_NO_PASCAL 1
+   #elif defined(pascal)
+       #define BOOST_UNITS_NO_PASCAL 1
+   #endif
+#elif defined(pascal)
+   #define BOOST_UNITS_NO_PASCAL 1
+#elif BOOST_MSVC
+   #define BOOST_UNITS_NO_PASCAL 1
+#endif
+
+#ifndef BOOST_UNITS_NO_PASCAL
+BOOST_UNITS_STATIC_CONSTANT(pascal,pressure);   
+#endif
+BOOST_UNITS_STATIC_CONSTANT(pascals,pressure);  
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_PRESSURE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/reluctance.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/reluctance.hpp
new file mode 100644 (file)
index 0000000..30014cc
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_RELUCTANCE_HPP
+#define BOOST_UNITS_SI_RELUCTANCE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/reluctance.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<reluctance_dimension,si::system>    reluctance;
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_RELUCTANCE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/resistance.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/resistance.hpp
new file mode 100644 (file)
index 0000000..4bcb13f
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_RESISTANCE_HPP
+#define BOOST_UNITS_SI_RESISTANCE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/resistance.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<resistance_dimension,si::system>    resistance;
+
+BOOST_UNITS_STATIC_CONSTANT(ohm,resistance);    
+BOOST_UNITS_STATIC_CONSTANT(ohms,resistance);   
+                                            
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_RESISTANCE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/resistivity.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/resistivity.hpp
new file mode 100644 (file)
index 0000000..bebfc4a
--- /dev/null
@@ -0,0 +1,31 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_RESISTIVITY_HPP
+#define BOOST_UNITS_SI_RESISTIVITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/resistivity.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<resistivity_dimension,si::system>    resistivity;
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_RESISTIVITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/solid_angle.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/solid_angle.hpp
new file mode 100644 (file)
index 0000000..a5036c7
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_SOLID_ANGLE_HPP
+#define BOOST_UNITS_SI_SOLID_ANGLE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<solid_angle_dimension,si::system>      solid_angle;
+    
+BOOST_UNITS_STATIC_CONSTANT(steradian,solid_angle); 
+BOOST_UNITS_STATIC_CONSTANT(steradians,solid_angle);    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_SOLID_ANGLE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/surface_density.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/surface_density.hpp
new file mode 100644 (file)
index 0000000..f686c3d
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_SURFACE_DENSITY_HPP
+#define BOOST_UNITS_SI_SURFACE_DENSITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/surface_density.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<surface_density_dimension,si::system>  surface_density;
+
+BOOST_UNITS_STATIC_CONSTANT(kilogram_per_square_meter,surface_density);
+BOOST_UNITS_STATIC_CONSTANT(kilograms_per_square_meter,surface_density);
+BOOST_UNITS_STATIC_CONSTANT(kilogramme_per_square_metre,surface_density);
+BOOST_UNITS_STATIC_CONSTANT(kilogrammes_per_square_metre,surface_density);
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_SURFACE_DENSITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/surface_tension.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/surface_tension.hpp
new file mode 100644 (file)
index 0000000..b4b181f
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_SURFACE_TENSION_HPP
+#define BOOST_UNITS_SI_SURFACE_TENSION_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/surface_tension.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<surface_tension_dimension,si::system>     surface_tension;
+    
+BOOST_UNITS_STATIC_CONSTANT(newton_per_meter,surface_tension);  
+BOOST_UNITS_STATIC_CONSTANT(newtons_per_meter,surface_tension); 
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_SURFACE_TENSION_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/temperature.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/temperature.hpp
new file mode 100644 (file)
index 0000000..2bb70dd
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_TEMPERATURE_HPP
+#define BOOST_UNITS_SI_TEMPERATURE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<temperature_dimension,si::system>   temperature;
+    
+BOOST_UNITS_STATIC_CONSTANT(kelvin,temperature);    
+BOOST_UNITS_STATIC_CONSTANT(kelvins,temperature);   
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_TEMPERATURE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/time.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/time.hpp
new file mode 100644 (file)
index 0000000..1b22de5
--- /dev/null
@@ -0,0 +1,33 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_TIME_HPP
+#define BOOST_UNITS_SI_TIME_HPP
+
+#include <boost/units/systems/si/base.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<time_dimension,si::system>      time;
+
+BOOST_UNITS_STATIC_CONSTANT(second,time);   
+BOOST_UNITS_STATIC_CONSTANT(seconds,time);  
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_TIME_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/torque.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/torque.hpp
new file mode 100644 (file)
index 0000000..de9e685
--- /dev/null
@@ -0,0 +1,34 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_TORQUE_HPP
+#define BOOST_UNITS_SI_TORQUE_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/torque.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<torque_dimension,si::system>     torque;
+    
+BOOST_UNITS_STATIC_CONSTANT(newton_meter,torque);  
+BOOST_UNITS_STATIC_CONSTANT(newton_meters,torque); 
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_TORQUE_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/velocity.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/velocity.hpp
new file mode 100644 (file)
index 0000000..44a5911
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_VELOCITY_HPP
+#define BOOST_UNITS_SI_VELOCITY_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/velocity.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<velocity_dimension,si::system>      velocity;
+    
+BOOST_UNITS_STATIC_CONSTANT(meter_per_second,velocity); 
+BOOST_UNITS_STATIC_CONSTANT(meters_per_second,velocity);    
+BOOST_UNITS_STATIC_CONSTANT(metre_per_second,velocity); 
+BOOST_UNITS_STATIC_CONSTANT(metres_per_second,velocity);    
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_VELOCITY_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/volume.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/volume.hpp
new file mode 100644 (file)
index 0000000..2bc9dc2
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_VOLUME_HPP
+#define BOOST_UNITS_SI_VOLUME_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/volume.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<volume_dimension,si::system>    volume;
+    
+BOOST_UNITS_STATIC_CONSTANT(cubic_meter,volume);    
+BOOST_UNITS_STATIC_CONSTANT(cubic_meters,volume);   
+BOOST_UNITS_STATIC_CONSTANT(cubic_metre,volume);    
+BOOST_UNITS_STATIC_CONSTANT(cubic_metres,volume);   
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_VOLUME_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/si/wavenumber.hpp b/deal.II/contrib/boost/include/boost/units/systems/si/wavenumber.hpp
new file mode 100644 (file)
index 0000000..a593d01
--- /dev/null
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_SI_WAVENUMBER_HPP
+#define BOOST_UNITS_SI_WAVENUMBER_HPP
+
+#include <boost/units/systems/si/base.hpp>
+#include <boost/units/physical_dimensions/wavenumber.hpp>
+
+namespace boost {
+
+namespace units { 
+
+namespace si {
+
+typedef unit<wavenumber_dimension,si::system>    wavenumber;
+    
+BOOST_UNITS_STATIC_CONSTANT(reciprocal_meter,wavenumber);   
+BOOST_UNITS_STATIC_CONSTANT(reciprocal_meters,wavenumber);  
+BOOST_UNITS_STATIC_CONSTANT(reciprocal_metre,wavenumber);   
+BOOST_UNITS_STATIC_CONSTANT(reciprocal_metres,wavenumber);  
+
+} // namespace si
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_SI_WAVENUMBER_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/temperature/celsius.hpp b/deal.II/contrib/boost/include/boost/units/systems/temperature/celsius.hpp
new file mode 100644 (file)
index 0000000..5b8a41b
--- /dev/null
@@ -0,0 +1,40 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_TEMPERATURE_CELSIUS_HPP
+#define BOOST_UNITS_TEMPERATURE_CELSIUS_HPP
+
+#include <string>
+
+#include <boost/units/absolute.hpp>
+#include <boost/units/static_constant.hpp>
+#include <boost/units/make_system.hpp>
+#include <boost/units/base_units/temperature/celsius.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace celsius {
+
+typedef make_system<boost::units::temperature::celsius_base_unit>::type system;
+
+typedef unit<temperature_dimension,system>   temperature;
+
+BOOST_UNITS_STATIC_CONSTANT(degree,temperature);
+BOOST_UNITS_STATIC_CONSTANT(degrees,temperature);
+
+} // namespace celsius
+        
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_TEMPERATURE_CELSIUS_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/systems/temperature/fahrenheit.hpp b/deal.II/contrib/boost/include/boost/units/systems/temperature/fahrenheit.hpp
new file mode 100644 (file)
index 0000000..0271724
--- /dev/null
@@ -0,0 +1,41 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_TEMPERATURE_FAHRENHEIT_HPP
+#define BOOST_UNITS_TEMPERATURE_FAHRENHEIT_HPP
+
+#include <string>
+
+#include <boost/units/absolute.hpp>
+#include <boost/units/io.hpp>
+#include <boost/units/make_system.hpp>
+#include <boost/units/static_constant.hpp>
+#include <boost/units/base_units/temperature/fahrenheit.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace fahrenheit {
+
+typedef make_system<boost::units::temperature::fahrenheit_base_unit>::type system;
+
+typedef unit<temperature_dimension,system>   temperature;
+
+BOOST_UNITS_STATIC_CONSTANT(degree,temperature);
+BOOST_UNITS_STATIC_CONSTANT(degrees,temperature);
+
+} // namespace fahrenheit
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_TEMPERATURE_FAHRENHEIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/unit.hpp b/deal.II/contrib/boost/include/boost/units/unit.hpp
new file mode 100644 (file)
index 0000000..57a3670
--- /dev/null
@@ -0,0 +1,440 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_UNIT_HPP
+#define BOOST_UNITS_UNIT_HPP
+
+#include <boost/static_assert.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/units/config.hpp>
+#include <boost/units/dimension.hpp>
+#include <boost/units/operators.hpp>
+#include <boost/units/units_fwd.hpp>
+#include <boost/units/homogeneous_system.hpp>
+#include <boost/units/heterogeneous_system.hpp>
+#include <boost/units/is_dimension_list.hpp>
+#include <boost/units/reduce_unit.hpp>
+#include <boost/units/static_rational.hpp>
+
+namespace boost {
+
+namespace units { 
+
+/// class representing a model-dependent unit with no associated value
+
+/// (e.g. meters, Kelvin, feet, etc...)
+template<class Dim,class System, class Enable>
+class unit
+{
+    public:
+        typedef unit<Dim, System>   unit_type;
+        typedef unit<Dim,System>    this_type;
+        typedef Dim                 dimension_type; 
+        typedef System              system_type;
+        
+        unit() { }
+        unit(const this_type&) { }
+        //~unit() { }  
+       
+        this_type& operator=(const this_type&) { }
+        
+        // sun will ignore errors resulting from templates
+        // instantiated in the return type of a function.
+        // Make sure that we get an error anyway by putting.
+        // the check in the destructor.
+        #ifdef __SUNPRO_CC
+        ~unit() {
+            BOOST_MPL_ASSERT((detail::check_system<System, Dim>));
+            BOOST_MPL_ASSERT((is_dimension_list<Dim>));
+        }
+        #else
+    private:
+        BOOST_MPL_ASSERT((detail::check_system<System, Dim>));
+        BOOST_MPL_ASSERT((is_dimension_list<Dim>));
+        #endif
+};
+
+}
+
+}
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TEMPLATE(boost::units::unit, 2)
+
+#endif
+
+namespace boost {
+
+namespace units {
+
+/// Returns a unique type for every unit.
+template<class Dim, class System>
+struct reduce_unit<unit<Dim, System> >
+{
+    typedef unit<
+        Dim,
+        typename detail::make_heterogeneous_system<
+            Dim,
+            System
+        >::type
+    > type;
+};
+
+/// INTERNAL ONLY
+template<class S1,class S2> 
+struct is_implicitly_convertible :
+    boost::is_same<typename reduce_unit<S1>::type, typename reduce_unit<S2>::type>
+{ };
+
+/// unit unary plus typeof helper
+/// INTERNAL ONLY
+template<class Dim,class System>
+struct unary_plus_typeof_helper< unit<Dim,System> >
+{
+    typedef unit<Dim,System>    type;
+};
+
+/// unit unary minus typeof helper
+/// INTERNAL ONLY
+template<class Dim,class System>
+struct unary_minus_typeof_helper< unit<Dim,System> >
+{
+    typedef unit<Dim,System>    type;
+};
+
+/// unit add typeof helper
+/// INTERNAL ONLY
+template<class Dim,
+         class System>
+struct add_typeof_helper< unit<Dim,System>,unit<Dim,System> >
+{
+    typedef unit<Dim,System> type;
+};
+
+/// unit subtract typeof helper
+/// INTERNAL ONLY
+template<class Dim,
+         class System>
+struct subtract_typeof_helper< unit<Dim,System>,unit<Dim,System> >
+{
+    typedef unit<Dim,System>   type;
+};
+
+/// unit multiply typeof helper for two identical homogeneous systems
+/// INTERNAL ONLY
+template<class Dim1,
+         class Dim2,
+         class System>
+struct multiply_typeof_helper< unit<Dim1,homogeneous_system<System> >,
+                               unit<Dim2,homogeneous_system<System> > >
+{
+    typedef unit<typename mpl::times<Dim1,Dim2>::type,homogeneous_system<System> >    type;
+};
+
+/// unit multiply typeof helper for two different homogeneous systems
+/// INTERNAL ONLY
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+struct multiply_typeof_helper< unit<Dim1,homogeneous_system<System1> >,
+                               unit<Dim2,homogeneous_system<System2> > >
+{
+    typedef unit<
+        typename mpl::times<Dim1,Dim2>::type,
+        typename detail::multiply_systems<
+            typename detail::make_heterogeneous_system<Dim1, System1>::type,
+            typename detail::make_heterogeneous_system<Dim2, System2>::type
+        >::type
+    > type;
+};
+
+/// unit multiply typeof helper for a heterogeneous and a homogeneous system
+/// INTERNAL ONLY
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+struct multiply_typeof_helper< unit<Dim1,heterogeneous_system<System1> >,
+                               unit<Dim2,homogeneous_system<System2> > >
+{
+    typedef unit<
+        typename mpl::times<Dim1,Dim2>::type,
+        typename detail::multiply_systems<
+            heterogeneous_system<System1>,
+            typename detail::make_heterogeneous_system<Dim2, System2>::type
+        >::type
+    > type;
+};
+
+/// unit multiply typeof helper for a homogeneous and a heterogeneous system
+/// INTERNAL ONLY
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+struct multiply_typeof_helper< unit<Dim1,homogeneous_system<System1> >,
+                               unit<Dim2,heterogeneous_system<System2> > >
+{
+    typedef unit<
+        typename mpl::times<Dim1,Dim2>::type,
+        typename detail::multiply_systems<
+            typename detail::make_heterogeneous_system<Dim1, System1>::type,
+            heterogeneous_system<System2>
+        >::type
+    > type;
+};
+
+/// unit multiply typeof helper for two heterogeneous systems
+/// INTERNAL ONLY
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+struct multiply_typeof_helper< unit<Dim1,heterogeneous_system<System1> >,
+                               unit<Dim2,heterogeneous_system<System2> > >
+{
+    typedef unit<
+        typename mpl::times<Dim1,Dim2>::type,
+        typename detail::multiply_systems<
+            heterogeneous_system<System1>,
+            heterogeneous_system<System2>
+        >::type
+    > type;
+};
+
+/// unit divide typeof helper for two identical homogeneous systems
+/// INTERNAL ONLY
+template<class Dim1,
+         class Dim2,
+         class System>
+struct divide_typeof_helper< unit<Dim1,homogeneous_system<System> >,
+                             unit<Dim2,homogeneous_system<System> > >
+{
+    typedef unit<typename mpl::divides<Dim1,Dim2>::type,homogeneous_system<System> >    type;
+};
+
+/// unit divide typeof helper for two different homogeneous systems
+/// INTERNAL ONLY
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+struct divide_typeof_helper< unit<Dim1,homogeneous_system<System1> >,
+                             unit<Dim2,homogeneous_system<System2> > >
+{
+    typedef unit<
+        typename mpl::divides<Dim1,Dim2>::type,
+        typename detail::divide_systems<
+            typename detail::make_heterogeneous_system<Dim1, System1>::type,
+            typename detail::make_heterogeneous_system<Dim2, System2>::type
+        >::type
+    > type;
+};
+
+/// unit divide typeof helper for a heterogeneous and a homogeneous system
+/// INTERNAL ONLY
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+struct divide_typeof_helper< unit<Dim1,heterogeneous_system<System1> >,
+                             unit<Dim2,homogeneous_system<System2> > >
+{
+    typedef unit<
+        typename mpl::divides<Dim1,Dim2>::type,
+        typename detail::divide_systems<
+            heterogeneous_system<System1>,
+            typename detail::make_heterogeneous_system<Dim2, System2>::type
+        >::type
+    > type;
+};
+
+/// unit divide typeof helper for a homogeneous and a heterogeneous system
+/// INTERNAL ONLY
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+struct divide_typeof_helper< unit<Dim1,homogeneous_system<System1> >,
+                             unit<Dim2,heterogeneous_system<System2> > >
+{
+    typedef unit<
+        typename mpl::divides<Dim1,Dim2>::type,
+        typename detail::divide_systems<
+            typename detail::make_heterogeneous_system<Dim1, System1>::type,
+            heterogeneous_system<System2>
+        >::type
+    > type;
+};
+
+/// unit divide typeof helper for two heterogeneous systems
+/// INTERNAL ONLY
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+struct divide_typeof_helper< unit<Dim1,heterogeneous_system<System1> >,
+                             unit<Dim2,heterogeneous_system<System2> > >
+{
+    typedef unit<
+        typename mpl::divides<Dim1,Dim2>::type,
+        typename detail::divide_systems<
+            heterogeneous_system<System1>,
+            heterogeneous_system<System2>
+        >::type
+    > type;
+};
+
+/// raise unit to a @c static_rational power
+template<class Dim,class System,long N,long D> 
+struct power_typeof_helper<unit<Dim,System>,static_rational<N,D> >                
+{ 
+    typedef unit<typename static_power<Dim,static_rational<N,D> >::type,typename static_power<System, static_rational<N,D> >::type>     type; 
+    
+    static type value(const unit<Dim,System>&)  
+    { 
+        return type();
+    }
+};
+
+/// take the @c static_rational root of a unit
+template<class Dim,class System,long N,long D> 
+struct root_typeof_helper<unit<Dim,System>,static_rational<N,D> >                
+{ 
+    typedef unit<typename static_root<Dim,static_rational<N,D> >::type,typename static_root<System, static_rational<N,D> >::type>      type; 
+    
+    static type value(const unit<Dim,System>&)  
+    { 
+        return type();
+    }
+};
+
+/// unit runtime unary plus
+template<class Dim,class System>
+typename unary_plus_typeof_helper< unit<Dim,System> >::type
+operator+(const unit<Dim,System>&)
+{ 
+    typedef typename unary_plus_typeof_helper< unit<Dim,System> >::type type;
+    
+    return type();
+}
+
+/// unit runtime unary minus
+template<class Dim,class System>
+typename unary_minus_typeof_helper< unit<Dim,System> >::type
+operator-(const unit<Dim,System>&)
+{ 
+    typedef typename unary_minus_typeof_helper< unit<Dim,System> >::type    type;
+    
+    return type();
+}
+
+/// runtime add two units
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+typename add_typeof_helper< unit<Dim1,System1>,
+                            unit<Dim2,System2> >::type
+operator+(const unit<Dim1,System1>&,const unit<Dim2,System2>&)
+{
+    BOOST_STATIC_ASSERT((boost::is_same<System1,System2>::value == true));
+    
+    typedef System1                                                     system_type;
+    typedef typename add_typeof_helper< unit<Dim1,system_type>,
+                                        unit<Dim2,system_type> >::type  type;
+    
+    return type();
+}
+
+/// runtime subtract two units
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+typename subtract_typeof_helper< unit<Dim1,System1>,
+                                 unit<Dim2,System2> >::type
+operator-(const unit<Dim1,System1>&,const unit<Dim2,System2>&)
+{
+    BOOST_STATIC_ASSERT((boost::is_same<System1,System2>::value == true));
+    
+    typedef System1                                                         system_type;
+    typedef typename subtract_typeof_helper< unit<Dim1,system_type>,
+                                             unit<Dim2,system_type> >::type type;
+    
+    return type();
+}
+
+/// runtime multiply two units
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+typename multiply_typeof_helper< unit<Dim1,System1>,
+                                 unit<Dim2,System2> >::type
+operator*(const unit<Dim1,System1>&,const unit<Dim2,System2>&)
+{
+    typedef typename multiply_typeof_helper< unit<Dim1,System1>,
+                                             unit<Dim2,System2> >::type type;
+    
+    return type();
+}
+
+/// runtime divide two units
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+typename divide_typeof_helper< unit<Dim1,System1>,
+                               unit<Dim2,System2> >::type
+operator/(const unit<Dim1,System1>&,const unit<Dim2,System2>&)
+{
+    typedef typename divide_typeof_helper< unit<Dim1,System1>,
+                                           unit<Dim2,System2> >::type   type;
+    
+    return type();
+}
+
+/// unit runtime @c operator==
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+inline
+bool 
+operator==(const unit<Dim1,System1>&,const unit<Dim2,System2>&)
+{
+    return boost::is_same<typename reduce_unit<unit<Dim1,System1> >::type, typename reduce_unit<unit<Dim2,System2> >::type>::value;
+}
+
+/// unit runtime @c operator!=
+template<class Dim1,
+         class Dim2,
+         class System1,
+         class System2>
+inline
+bool 
+operator!=(const unit<Dim1,System1>&,const unit<Dim2,System2>&)
+{
+    return !boost::is_same<typename reduce_unit<unit<Dim1,System1> >::type, typename reduce_unit<unit<Dim2,System2> >::type>::value;
+}
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_UNIT_HPP
diff --git a/deal.II/contrib/boost/include/boost/units/units_fwd.hpp b/deal.II/contrib/boost/include/boost/units/units_fwd.hpp
new file mode 100644 (file)
index 0000000..886e9ae
--- /dev/null
@@ -0,0 +1,68 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and 
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// 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)
+
+#ifndef BOOST_UNITS_UNITS_FWD_HPP
+#define BOOST_UNITS_UNITS_FWD_HPP
+
+/// \file
+/// Forward declarations of library components.
+
+#ifndef BOOST_UNITS_DOXYGEN
+
+#include <string>
+
+namespace boost {
+
+namespace units {
+
+template<typename T,typename V> struct dim;
+template<typename T> struct is_dim;
+
+struct dimensionless_type;
+template<class Item,class Next> struct list;
+template<typename Seq> struct make_dimension_list;
+
+template<class T> struct is_dimensionless;
+template<class S1,class S2> struct is_implicitly_convertible;
+template<class T> struct get_dimension;
+template<class T> struct get_system;
+
+template<class Y> class absolute;
+
+template<class Dim,class System, class Enable=void> class unit;
+
+template<class BaseUnitTag> struct base_unit_info;
+template<class System> struct dimensionless_unit;
+template<class T> struct is_unit;
+template<class T,class Dim> struct is_unit_of_dimension;
+template<class T,class System> struct is_unit_of_system;
+
+template<class Unit,class Y> class quantity;
+
+template<class System,class Y> struct dimensionless_quantity;
+template<class T> struct is_quantity;
+template<class T,class Dim> struct is_quantity_of_dimension;
+template<class T,class System> struct is_quantity_of_system;
+
+template<class From,class To> struct conversion_helper;
+
+template<class T> std::string to_string(const T&);
+template<class T> std::string name_string(const T&);
+template<class T> std::string symbol_string(const T&);
+template<class T> std::string raw_string(const T&);
+template<class T> std::string typename_string(const T&);
+
+} // namespace units
+
+} // namespace boost
+
+#endif
+
+#endif // BOOST_UNITS_UNITS_FWD_HPP
diff --git a/deal.II/contrib/boost/include/boost/unordered/detail/allocator_helpers.hpp b/deal.II/contrib/boost/include/boost/unordered/detail/allocator_helpers.hpp
new file mode 100644 (file)
index 0000000..2c64223
--- /dev/null
@@ -0,0 +1,111 @@
+
+// Copyright 2005-2009 Daniel James.
+// 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)
+
+// A couple of templates to make using allocators easier.
+
+#ifndef BOOST_UNORDERED_DETAIL_ALLOCATOR_UTILITIES_HPP_INCLUDED
+#define BOOST_UNORDERED_DETAIL_ALLOCATOR_UTILITIES_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+
+#if (defined(BOOST_NO_STD_ALLOCATOR) || defined(BOOST_DINKUMWARE_STDLIB)) \
+    && !defined(__BORLANDC__)
+#  define BOOST_UNORDERED_USE_ALLOCATOR_UTILITIES
+#endif
+
+#if defined(BOOST_UNORDERED_USE_ALLOCATOR_UTILITIES)
+#  include <boost/detail/allocator_utilities.hpp>
+#endif
+
+namespace boost { namespace unordered_detail {
+
+    // rebind_wrap
+    //
+    // Rebind allocators. For some problematic libraries, use rebind_to
+    // from <boost/detail/allocator_utilities.hpp>.
+
+#if defined(BOOST_UNORDERED_USE_ALLOCATOR_UTILITIES)
+    template <class Alloc, class T>
+    struct rebind_wrap : ::boost::detail::allocator::rebind_to<Alloc, T> {};
+#else
+    template <class Alloc, class T>
+    struct rebind_wrap
+    {
+        typedef BOOST_DEDUCED_TYPENAME
+            Alloc::BOOST_NESTED_TEMPLATE rebind<T>::other
+            type;
+    };
+#endif
+
+    // allocator_array_constructor
+    //
+    // Allocate and construct an array in an exception safe manner, and
+    // clean up if an exception is thrown before the container takes charge
+    // of it.
+
+    template <class Allocator>
+    struct allocator_array_constructor
+    {
+        typedef BOOST_DEDUCED_TYPENAME Allocator::pointer pointer;
+
+        Allocator& alloc_;
+        pointer ptr_;
+        pointer constructed_;
+        std::size_t length_;
+
+        allocator_array_constructor(Allocator& a)
+            : alloc_(a), ptr_(), constructed_(), length_(0)
+        {
+            constructed_ = pointer();
+            ptr_ = pointer();
+        }
+
+        ~allocator_array_constructor() {
+            if (ptr_) {
+                for(pointer p = ptr_; p != constructed_; ++p)
+                    alloc_.destroy(p);
+
+                alloc_.deallocate(ptr_, length_);
+            }
+        }
+
+        template <class V>
+        void construct(V const& v, std::size_t l)
+        {
+            BOOST_ASSERT(!ptr_);
+            length_ = l;
+            ptr_ = alloc_.allocate(length_);
+            pointer end = ptr_ + static_cast<std::ptrdiff_t>(length_);
+            for(constructed_ = ptr_; constructed_ != end; ++constructed_)
+                alloc_.construct(constructed_, v);
+        }
+
+        pointer get() const
+        {
+            return ptr_;
+        }
+
+        pointer release()
+        {
+            pointer p(ptr_);
+            ptr_ = pointer();
+            return p;
+        }
+    private:
+        allocator_array_constructor(allocator_array_constructor const&);
+        allocator_array_constructor& operator=(
+            allocator_array_constructor const&);
+    };
+}}
+
+#if defined(BOOST_UNORDERED_USE_ALLOCATOR_UTILITIES)
+#  undef BOOST_UNORDERED_USE_ALLOCATOR_UTILITIES
+#endif
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/unordered/detail/buckets.hpp b/deal.II/contrib/boost/include/boost/unordered/detail/buckets.hpp
new file mode 100644 (file)
index 0000000..b1dee5c
--- /dev/null
@@ -0,0 +1,183 @@
+
+// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
+// Copyright (C) 2005-2009 Daniel James
+// 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)
+
+#ifndef BOOST_UNORDERED_DETAIL_MANAGER_HPP_INCLUDED
+#define BOOST_UNORDERED_DETAIL_MANAGER_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
+#include <boost/unordered/detail/node.hpp>
+#include <boost/unordered/detail/util.hpp>
+
+namespace boost { namespace unordered_detail {
+    
+    ////////////////////////////////////////////////////////////////////////////
+    // Buckets
+    
+    template <class A, class G>
+    inline std::size_t hash_buckets<A, G>::max_bucket_count() const {
+        // -1 to account for the sentinel.
+        return prev_prime(this->bucket_alloc().max_size() - 1);
+    }
+
+    template <class A, class G>
+    inline BOOST_DEDUCED_TYPENAME hash_buckets<A, G>::bucket_ptr
+        hash_buckets<A, G>::get_bucket(std::size_t num) const
+    {
+        return buckets_ + static_cast<std::ptrdiff_t>(num);
+    }
+
+    template <class A, class G>
+    inline BOOST_DEDUCED_TYPENAME hash_buckets<A, G>::bucket_ptr
+        hash_buckets<A, G>::bucket_ptr_from_hash(std::size_t hashed) const
+    {
+        return get_bucket(hashed % bucket_count_);
+    }
+    
+    template <class A, class G>
+    std::size_t hash_buckets<A, G>::bucket_size(std::size_t index) const
+    {
+        if(!buckets_) return 0;
+        bucket_ptr ptr = get_bucket(index)->next_;
+        std::size_t count = 0;
+        while(ptr) {
+            ++count;
+            ptr = ptr->next_;
+        }
+        return count;
+    }
+
+    template <class A, class G>
+    inline BOOST_DEDUCED_TYPENAME hash_buckets<A, G>::node_ptr
+        hash_buckets<A, G>::bucket_begin(std::size_t num) const
+    {
+        return buckets_ ? get_bucket(num)->next_ : node_ptr();
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Delete
+
+    template <class A, class G>
+    inline void hash_buckets<A, G>::delete_node(node_ptr b)
+    {
+        node* raw_ptr = static_cast<node*>(&*b);
+        boost::unordered_detail::destroy(&raw_ptr->value());
+        real_node_ptr n(node_alloc().address(*raw_ptr));
+        node_alloc().destroy(n);
+        node_alloc().deallocate(n, 1);
+    }
+
+    template <class A, class G>
+    inline void hash_buckets<A, G>::clear_bucket(bucket_ptr b)
+    {
+        node_ptr node_it = b->next_;
+        b->next_ = node_ptr();
+
+        while(node_it) {
+            node_ptr node_to_delete = node_it;
+            node_it = node_it->next_;
+            delete_node(node_to_delete);
+        }
+    }
+
+    template <class A, class G>
+    inline void hash_buckets<A, G>::delete_buckets()
+    {      
+        bucket_ptr end = this->get_bucket(this->bucket_count_);
+
+        for(bucket_ptr begin = this->buckets_; begin != end; ++begin) {
+            clear_bucket(begin);
+        }
+
+        // Destroy the buckets (including the sentinel bucket).
+        ++end;
+        for(bucket_ptr begin = this->buckets_; begin != end; ++begin) {
+            bucket_alloc().destroy(begin);
+        }
+
+        bucket_alloc().deallocate(this->buckets_, this->bucket_count_ + 1);
+
+        this->buckets_ = bucket_ptr();
+    }
+
+    template <class A, class G>
+    inline std::size_t hash_buckets<A, G>::delete_nodes(
+        node_ptr begin, node_ptr end)
+    {
+        std::size_t count = 0;
+        while(begin != end) {
+            node_ptr n = begin;
+            begin = begin->next_;
+            delete_node(n);
+            ++count;
+        }
+        return count;
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Constructors and Destructors
+
+    template <class A, class G>
+    inline hash_buckets<A, G>::hash_buckets(
+        node_allocator const& a, std::size_t bucket_count)
+      : buckets_(),
+        bucket_count_(bucket_count),
+        allocators_(a,a)
+    {
+    }
+
+    template <class A, class G>
+    inline hash_buckets<A, G>::~hash_buckets()
+    {
+        if(this->buckets_) { this->delete_buckets(); }
+    }
+    
+    template <class A, class G>
+    inline void hash_buckets<A, G>::create_buckets()
+    {
+        // The array constructor will clean up in the event of an
+        // exception.
+        allocator_array_constructor<bucket_allocator>
+            constructor(bucket_alloc());
+
+        // Creates an extra bucket to act as a sentinel.
+        constructor.construct(bucket(), this->bucket_count_ + 1);
+
+        // Set up the sentinel (node_ptr cast)
+        bucket_ptr sentinel = constructor.get() +
+            static_cast<std::ptrdiff_t>(this->bucket_count_);
+        sentinel->next_ = sentinel;
+
+        // Only release the buckets once everything is successfully
+        // done.
+        this->buckets_ = constructor.release();
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Constructors and Destructors
+
+    // no throw
+    template <class A, class G>
+    inline void hash_buckets<A, G>::move(hash_buckets& other)
+    {
+        BOOST_ASSERT(node_alloc() == other.node_alloc());
+        if(this->buckets_) { this->delete_buckets(); }
+        this->buckets_ = other.buckets_;
+        this->bucket_count_ = other.bucket_count_;
+        other.buckets_ = bucket_ptr();
+        other.bucket_count_ = 0;
+    }
+
+    template <class A, class G>
+    inline void hash_buckets<A, G>::swap(hash_buckets<A, G>& other)
+    {
+        BOOST_ASSERT(node_alloc() == other.node_alloc());
+        std::swap(buckets_, other.buckets_);
+        std::swap(bucket_count_, other.bucket_count_);
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/unordered/detail/equivalent.hpp b/deal.II/contrib/boost/include/boost/unordered/detail/equivalent.hpp
new file mode 100644 (file)
index 0000000..639dd5e
--- /dev/null
@@ -0,0 +1,209 @@
+
+// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
+// Copyright (C) 2005-2009 Daniel James
+// 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)
+
+#ifndef BOOST_UNORDERED_DETAIL_EQUIVALENT_HPP_INCLUDED
+#define BOOST_UNORDERED_DETAIL_EQUIVALENT_HPP_INCLUDED
+
+#include <boost/unordered/detail/table.hpp>
+#include <boost/unordered/detail/extract_key.hpp>
+
+namespace boost { namespace unordered_detail {
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Equality
+
+    template <class T>
+    bool hash_equivalent_table<T>
+        ::equals(hash_equivalent_table<T> const& other) const
+    {
+        if(this->size_ != other.size_) return false;
+        if(!this->size_) return true;
+
+        bucket_ptr end = this->get_bucket(this->bucket_count_);
+        for(bucket_ptr i = this->cached_begin_bucket_; i != end; ++i)
+        {
+            node_ptr it1 = i->next_;
+            while(BOOST_UNORDERED_BORLAND_BOOL(it1))
+            {
+                node_ptr it2 = other.find_iterator(this->get_key_from_ptr(it1));
+                if(!BOOST_UNORDERED_BORLAND_BOOL(it2)) return false;
+                
+                node_ptr end1 = node::next_group(it1);
+                node_ptr end2 = node::next_group(it2);
+
+                do {
+                    if(!extractor::compare_mapped(
+                        node::get_value(it1), node::get_value(it2)))
+                        return false;
+                    it1 = it1->next_;
+                    it2 = it2->next_;
+                } while(it1 != end1 && it2 != end2);
+                if(it1 != end1 || it2 != end2) return false;
+            }
+        }
+
+        return true;
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // A convenience method for adding nodes.
+
+    template <class T>
+    inline BOOST_DEDUCED_TYPENAME hash_equivalent_table<T>::node_ptr
+        hash_equivalent_table<T>
+            ::add_node(node_constructor& a, bucket_ptr bucket, node_ptr pos)
+    {
+        node_ptr n = a.release();
+        if(BOOST_UNORDERED_BORLAND_BOOL(pos)) {
+            node::add_after_node(n, pos);                
+        }
+        else {
+            node::add_to_bucket(n, *bucket);
+            if(bucket < this->cached_begin_bucket_)
+                this->cached_begin_bucket_ = bucket;
+        }
+        ++this->size_;
+        return n;
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Insert methods
+
+    template <class T>
+    inline BOOST_DEDUCED_TYPENAME
+        hash_equivalent_table<T>::iterator_base
+        hash_equivalent_table<T>::emplace_impl(node_constructor& a)
+    {
+        key_type const& k = this->get_key(a.value());
+        std::size_t hash_value = this->hash_function()(k);
+        
+        if(!this->size_) {
+            return this->emplace_empty_impl_with_node(a, 1);
+        }
+        else {
+            bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
+            node_ptr position = this->find_iterator(bucket, k);
+
+            // reserve has basic exception safety if the hash function
+            // throws, strong otherwise.
+            if(this->reserve_for_insert(this->size_ + 1))
+                bucket = this->bucket_ptr_from_hash(hash_value);
+
+            return iterator_base(bucket, add_node(a, bucket, position));
+        }
+    }
+    
+    template <class T>
+    inline void hash_equivalent_table<T>
+            ::emplace_impl_no_rehash(node_constructor& a)
+    {
+        key_type const& k = this->get_key(a.value());
+        bucket_ptr bucket = this->get_bucket(this->bucket_index(k));
+        add_node(a, bucket, this->find_iterator(bucket, k));
+    }
+
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+
+    // Emplace (equivalent key containers)
+    // (I'm using an overloaded emplace for both 'insert' and 'emplace')
+
+    // if hash function throws, basic exception safety
+    // strong otherwise
+    template <class T>
+    template <class... Args>
+    BOOST_DEDUCED_TYPENAME hash_equivalent_table<T>::iterator_base
+        hash_equivalent_table<T>
+            ::emplace(Args&&... args)
+    {
+        // Create the node before rehashing in case it throws an
+        // exception (need strong safety in such a case).
+        node_constructor a(*this);
+        a.construct(std::forward<Args>(args)...);
+
+        return emplace_impl(a);
+    }
+
+#else
+
+#define BOOST_UNORDERED_INSERT_IMPL(z, num_params, _)                       \
+    template <class T>                                                      \
+    template <BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)>                 \
+    BOOST_DEDUCED_TYPENAME hash_equivalent_table<T>::iterator_base          \
+        hash_equivalent_table<T>                                            \
+            ::emplace(BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params))       \
+    {                                                                       \
+        node_constructor a(*this);                                          \
+        a.construct(BOOST_UNORDERED_CALL_PARAMS(z, num_params));            \
+        return emplace_impl(a);                                             \
+    }
+
+    BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT,
+        BOOST_UNORDERED_INSERT_IMPL, _)
+
+#undef BOOST_UNORDERED_INSERT_IMPL
+#endif
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Insert range methods
+
+    // if hash function throws, or inserting > 1 element, basic exception safety
+    // strong otherwise
+    template <class T>
+    template <class I>
+    inline void hash_equivalent_table<T>
+        ::insert_for_range(I i, I j, forward_traversal_tag)
+    {
+        if(i == j) return;
+        std::size_t distance = unordered_detail::distance(i, j);
+        if(distance == 1) {
+            emplace(*i);
+        }
+        else {
+            node_constructor a(*this);
+
+            // Only require basic exception safety here
+            if(this->size_) {
+                this->reserve_for_insert(this->size_ + distance);
+            }
+            else {
+                a.construct(*i++);
+                this->emplace_empty_impl_with_node(a, distance);
+            }
+
+            for (; i != j; ++i) {
+                a.construct(*i);
+                emplace_impl_no_rehash(a);
+            }
+        }
+    }
+
+    // if hash function throws, or inserting > 1 element, basic exception safety
+    // strong otherwise
+    template <class T>
+    template <class I>
+    inline void hash_equivalent_table<T>
+        ::insert_for_range(I i, I j, boost::incrementable_traversal_tag)
+    {
+        node_constructor a(*this);
+        for (; i != j; ++i) {
+            a.construct(*i);
+            emplace_impl(a);
+        }
+    }
+
+    // if hash function throws, or inserting > 1 element, basic exception safety
+    // strong otherwise
+    template <class T>
+    template <class I>
+    void hash_equivalent_table<T>::insert_range(I i, I j)
+    {
+        BOOST_DEDUCED_TYPENAME boost::iterator_traversal<I>::type
+            iterator_traversal_tag;
+        insert_for_range(i, j, iterator_traversal_tag);
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/unordered/detail/extract_key.hpp b/deal.II/contrib/boost/include/boost/unordered/detail/extract_key.hpp
new file mode 100644 (file)
index 0000000..bedb175
--- /dev/null
@@ -0,0 +1,148 @@
+
+// Copyright (C) 2005-2009 Daniel James
+// 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)
+
+#ifndef BOOST_UNORDERED_DETAIL_EXTRACT_KEY_HPP_INCLUDED
+#define BOOST_UNORDERED_DETAIL_EXTRACT_KEY_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/unordered/detail/fwd.hpp>
+
+namespace boost {
+namespace unordered_detail {
+
+    // key extractors
+    //
+    // no throw
+    //
+    // 'extract_key' is called with the emplace parameters to return a
+    // key if available or 'no_key' is one isn't and will need to be
+    // constructed. This could be done by overloading the emplace implementation
+    // for the different cases, but that's a bit tricky on compilers without
+    // variadic templates.
+
+    struct no_key {
+        no_key() {}
+        template <class T> no_key(T const&) {}
+    };
+
+    template <class ValueType>
+    struct set_extractor
+    {
+        typedef ValueType value_type;
+        typedef ValueType key_type;
+
+        static key_type const& extract(key_type const& v)
+        {
+            return v;
+        }
+
+        static no_key extract()
+        {
+            return no_key();
+        }
+        
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+        template <class... Args>
+        static no_key extract(Args const&...)
+        {
+            return no_key();
+        }
+
+#else
+        template <class Arg>
+        static no_key extract(Arg const&)
+        {
+            return no_key();
+        }
+
+        template <class Arg>
+        static no_key extract(Arg const&, Arg const&)
+        {
+            return no_key();
+        }
+#endif
+
+        static bool compare_mapped(value_type const&, value_type const&)
+        {
+            return true;
+        }
+    };
+
+    template <class Key, class ValueType>
+    struct map_extractor
+    {
+        typedef ValueType value_type;
+        typedef BOOST_DEDUCED_TYPENAME boost::remove_const<Key>::type key_type;
+
+        static key_type const& extract(value_type const& v)
+        {
+            return v.first;
+        }
+            
+        static key_type const& extract(key_type const& v)
+        {
+            return v;
+        }
+
+        template <class Second>
+        static key_type const& extract(std::pair<key_type, Second> const& v)
+        {
+            return v.first;
+        }
+
+        template <class Second>
+        static key_type const& extract(
+            std::pair<key_type const, Second> const& v)
+        {
+            return v.first;
+        }
+
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+        template <class Arg1, class... Args>
+        static key_type const& extract(key_type const& k,
+            Arg1 const&, Args const&...)
+        {
+            return k;
+        }
+
+        template <class... Args>
+        static no_key extract(Args const&...)
+        {
+            return no_key();
+        }
+#else
+        template <class Arg1>
+        static key_type const& extract(key_type const& k, Arg1 const&)
+        {
+            return k;
+        }
+
+        static no_key extract()
+        {
+            return no_key();
+        }
+
+        template <class Arg>
+        static no_key extract(Arg const&)
+        {
+            return no_key();
+        }
+
+        template <class Arg, class Arg1>
+        static no_key extract(Arg const&, Arg1 const&)
+        {
+            return no_key();
+        }
+#endif
+
+        static bool compare_mapped(value_type const& x, value_type const& y)
+        {
+            return x.second == y.second;
+        }
+    };
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/unordered/detail/fwd.hpp b/deal.II/contrib/boost/include/boost/unordered/detail/fwd.hpp
new file mode 100644 (file)
index 0000000..a290ded
--- /dev/null
@@ -0,0 +1,1062 @@
+
+// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
+// Copyright (C) 2005-2009 Daniel James
+// 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)
+
+// This contains the basic data structure, apart from the actual values. There's
+// no construction or deconstruction here. So this only depends on the pointer
+// type.
+
+#ifndef BOOST_UNORDERED_DETAIL_FWD_HPP_INCLUDED
+#define BOOST_UNORDERED_DETAIL_FWD_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/iterator.hpp>
+#include <boost/compressed_pair.hpp>
+#include <boost/type_traits/aligned_storage.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <boost/unordered/detail/allocator_helpers.hpp>
+#include <algorithm>
+
+// This header defines most of the classes used to implement the unordered
+// containers. It doesn't include the insert methods as they require a lot
+// of preprocessor metaprogramming - they are in insert.hpp
+
+// Template parameters:
+//
+// H = Hash Function
+// P = Predicate
+// A = Value Allocator
+// G = Grouped/Ungrouped
+// E = Key Extractor
+
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+#   if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
+        // STLport doesn't have std::forward.
+#   else
+#       define BOOST_UNORDERED_STD_FORWARD
+#   endif
+#endif
+
+#if !defined(BOOST_UNORDERED_EMPLACE_LIMIT)
+#define BOOST_UNORDERED_EMPLACE_LIMIT 10
+#endif
+
+#if !defined(BOOST_UNORDERED_STD_FORWARD)
+
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+#define BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params) \
+    BOOST_PP_ENUM_PARAMS_Z(z, num_params, class Arg)
+#define BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params) \
+    BOOST_PP_ENUM_BINARY_PARAMS_Z(z, num_params, Arg, const& arg)
+#define BOOST_UNORDERED_CALL_PARAMS(z, num_params) \
+    BOOST_PP_ENUM_PARAMS_Z(z, num_params, arg)
+
+#endif
+
+namespace boost { namespace unordered_detail {
+
+    static const float minimum_max_load_factor = 1e-3f;
+    static const std::size_t default_bucket_count = 11;
+    struct move_tag {};
+
+    template <class Alloc, class Grouped>
+    class hash_node_constructor;
+    template <class ValueType>
+    struct set_extractor;
+    template <class Key, class ValueType>
+    struct map_extractor;
+    struct no_key;
+
+    // Explicitly call a destructor
+
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#pragma warning(disable:4100) // unreferenced formal parameter
+#endif
+
+    template <class T>
+    inline void destroy(T* x) {
+        x->~T();
+    }
+
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
+    // hash_bucket
+    
+    template <class A>
+    class hash_bucket
+    {
+        hash_bucket& operator=(hash_bucket const&);
+    public:
+        typedef hash_bucket<A> bucket;
+        typedef BOOST_DEDUCED_TYPENAME
+            boost::unordered_detail::rebind_wrap<A, bucket>::type
+            bucket_allocator;
+        typedef BOOST_DEDUCED_TYPENAME bucket_allocator::pointer bucket_ptr;
+        typedef bucket_ptr node_ptr;
+    
+        node_ptr next_;
+
+        hash_bucket() : next_() {}
+    };
+
+    template <class A>
+    struct ungrouped_node_base : hash_bucket<A> {
+        typedef hash_bucket<A> bucket;
+        typedef BOOST_DEDUCED_TYPENAME bucket::bucket_ptr bucket_ptr;
+        typedef BOOST_DEDUCED_TYPENAME bucket::node_ptr node_ptr;
+
+        ungrouped_node_base() : bucket() {}
+        static inline node_ptr& next_group(node_ptr ptr);
+        static inline std::size_t group_count(node_ptr ptr);
+        static inline void add_to_bucket(node_ptr n, bucket& b);
+        static inline void add_after_node(node_ptr n, node_ptr position);
+        static void unlink_node(bucket& b, node_ptr n);
+        static void unlink_nodes(bucket& b, node_ptr begin, node_ptr end);
+        static void unlink_nodes(bucket& b, node_ptr end);
+    };
+
+    template <class A>
+    struct grouped_node_base : hash_bucket<A>
+    {
+        typedef hash_bucket<A> bucket;
+        typedef BOOST_DEDUCED_TYPENAME bucket::bucket_ptr bucket_ptr;
+        typedef BOOST_DEDUCED_TYPENAME bucket::node_ptr node_ptr;
+
+        node_ptr group_prev_;
+
+        grouped_node_base() : bucket(), group_prev_() {}
+        static inline node_ptr& next_group(node_ptr ptr);
+        static inline node_ptr first_in_group(node_ptr n);
+        static inline std::size_t group_count(node_ptr ptr);
+        static inline void add_to_bucket(node_ptr n, bucket& b);
+        static inline void add_after_node(node_ptr n, node_ptr position);
+        static void unlink_node(bucket& b, node_ptr n);
+        static void unlink_nodes(bucket& b, node_ptr begin, node_ptr end);
+        static void unlink_nodes(bucket& b, node_ptr end);
+
+    private:
+        static inline node_ptr split_group(node_ptr split);
+        static inline grouped_node_base& get(node_ptr ptr) {
+            return static_cast<grouped_node_base&>(*ptr);
+        }
+    };
+
+    struct ungrouped
+    {
+        template <class A>
+        struct base {
+            typedef ungrouped_node_base<A> type;
+        };
+    };
+
+    struct grouped
+    {
+        template <class A>
+        struct base {
+            typedef grouped_node_base<A> type;
+        };
+    };
+
+    template <class ValueType>
+    struct value_base
+    {
+        typedef ValueType value_type;
+        BOOST_DEDUCED_TYPENAME boost::aligned_storage<
+            sizeof(value_type),
+            ::boost::alignment_of<value_type>::value>::type data_;
+
+        void* address() {
+            return this;
+        }
+        value_type& value() {
+            return *(ValueType*) this;
+        }
+    private:
+        value_base& operator=(value_base const&);
+    };
+
+    // Node
+    
+    template <class A, class G>
+    class hash_node :
+        public G::BOOST_NESTED_TEMPLATE base<A>::type,
+        public value_base<BOOST_DEDUCED_TYPENAME A::value_type>
+    {
+    public:
+        typedef BOOST_DEDUCED_TYPENAME A::value_type value_type;
+        typedef BOOST_DEDUCED_TYPENAME hash_bucket<A>::node_ptr node_ptr;
+
+        static value_type& get_value(node_ptr p) {
+            return static_cast<hash_node&>(*p).value();
+        }
+    private:
+        hash_node& operator=(hash_node const&);
+    };
+
+    // Iterator Base
+
+    template <class A, class G>
+    class hash_iterator_base
+    {
+    public:
+        typedef A value_allocator;
+        typedef hash_bucket<A> bucket;
+        typedef hash_node<A, G> node;
+        typedef BOOST_DEDUCED_TYPENAME A::value_type value_type;
+        typedef BOOST_DEDUCED_TYPENAME bucket::bucket_ptr bucket_ptr;
+        typedef BOOST_DEDUCED_TYPENAME bucket::node_ptr node_ptr;
+
+        bucket_ptr bucket_;
+        node_ptr node_;
+
+        hash_iterator_base() : bucket_(), node_() {}
+        explicit hash_iterator_base(bucket_ptr b)
+          : bucket_(b),
+            node_(b ? b->next_ : node_ptr()) {}
+        hash_iterator_base(bucket_ptr b, node_ptr n)
+          : bucket_(b),
+            node_(n) {}
+        
+        bool operator==(hash_iterator_base const& x) const {
+            return node_ == x.node_; }
+        bool operator!=(hash_iterator_base const& x) const {
+            return node_ != x.node_; }
+        value_type& operator*() const {
+            return node::get_value(node_);
+        }
+    
+        void increment_bucket(node_ptr n) {
+            while(!n) {
+                ++bucket_;
+                n = bucket_->next_;
+            }
+            node_ = bucket_ == n ? node_ptr() : n;
+        }
+
+        void increment() {
+            increment_bucket(node_->next_);
+        }
+    };
+
+    // hash_buckets
+    //
+    // This is responsible for allocating and deallocating buckets and nodes.
+    //
+    // Notes:
+    // 1. For the sake exception safety the allocators themselves don't allocate
+    //    anything.
+    // 2. It's the callers responsibility to allocate the buckets before calling
+    //    any of the methods (other than getters and setters).
+
+    template <class A, class G>
+    class hash_buckets
+    {
+        hash_buckets(hash_buckets const&);
+        hash_buckets& operator=(hash_buckets const&);
+    public:
+        // Types
+
+        typedef A value_allocator;
+        typedef hash_bucket<A> bucket;
+        typedef hash_iterator_base<A, G> iterator_base;
+        typedef BOOST_DEDUCED_TYPENAME A::value_type value_type;
+        typedef BOOST_DEDUCED_TYPENAME iterator_base::node node;
+
+        typedef BOOST_DEDUCED_TYPENAME bucket::bucket_allocator
+            bucket_allocator;
+        typedef BOOST_DEDUCED_TYPENAME bucket::bucket_ptr bucket_ptr;
+        typedef BOOST_DEDUCED_TYPENAME bucket::node_ptr node_ptr;
+
+        typedef BOOST_DEDUCED_TYPENAME rebind_wrap<value_allocator, node>::type
+            node_allocator;
+        typedef BOOST_DEDUCED_TYPENAME node_allocator::pointer real_node_ptr;
+
+        // Members
+
+        bucket_ptr buckets_;
+        std::size_t bucket_count_;
+        boost::compressed_pair<bucket_allocator, node_allocator> allocators_;
+        
+        // Data access
+
+        bucket_allocator const& bucket_alloc() const {
+            return allocators_.first(); }
+        node_allocator const& node_alloc() const {
+            return allocators_.second(); }
+        bucket_allocator& bucket_alloc() {
+            return allocators_.first(); }
+        node_allocator& node_alloc() {
+            return allocators_.second(); }
+        std::size_t max_bucket_count() const;
+
+        // Constructors
+
+        hash_buckets(node_allocator const& a, std::size_t n);
+        void create_buckets();
+        ~hash_buckets();
+        
+        // no throw
+        void swap(hash_buckets& other);
+        void move(hash_buckets& other);
+
+        // For the remaining functions, buckets_ must not be null.
+        
+        bucket_ptr get_bucket(std::size_t n) const;
+        bucket_ptr bucket_ptr_from_hash(std::size_t hashed) const;
+        std::size_t bucket_size(std::size_t index) const;
+        node_ptr bucket_begin(std::size_t n) const;
+
+        // Alloc/Dealloc
+        
+        void delete_node(node_ptr);
+
+        // 
+        void delete_buckets();
+        void clear_bucket(bucket_ptr);
+        std::size_t delete_nodes(node_ptr begin, node_ptr end);
+        std::size_t delete_to_bucket_end(node_ptr begin);
+    };
+
+    template <class H, class P> class set_hash_functions;
+
+    template <class H, class P>
+    class hash_buffered_functions
+    {
+        friend class set_hash_functions<H, P>;
+        hash_buffered_functions& operator=(hash_buffered_functions const&);
+
+        typedef boost::compressed_pair<H, P> function_pair;
+        typedef BOOST_DEDUCED_TYPENAME boost::aligned_storage<
+            sizeof(function_pair),
+            ::boost::alignment_of<function_pair>::value>::type aligned_function;
+
+        bool current_; // The currently active functions.
+        aligned_function funcs_[2];
+
+        function_pair const& current() const {
+            return *static_cast<function_pair const*>(
+                static_cast<void const*>(&funcs_[current_]));
+        }
+
+        void construct(bool which, H const& hf, P const& eq)
+        {
+            new((void*) &funcs_[which]) function_pair(hf, eq);
+        }
+
+        void construct(bool which, function_pair const& f)
+        {
+            new((void*) &funcs_[which]) function_pair(f);
+        }
+        
+        void destroy(bool which)
+        {
+            boost::unordered_detail::destroy((function_pair*)(&funcs_[which]));
+        }
+        
+    public:
+
+        hash_buffered_functions(H const& hf, P const& eq)
+            : current_(false)
+        {
+            construct(current_, hf, eq);
+        }
+
+        hash_buffered_functions(hash_buffered_functions const& bf)
+            : current_(false)
+        {
+            construct(current_, bf.current());
+        }
+
+        ~hash_buffered_functions() {
+            destroy(current_);
+        }
+
+        H const& hash_function() const {
+            return current().first();
+        }
+
+        P const& key_eq() const {
+            return current().second();
+        }
+    };
+    
+    template <class H, class P>
+    class set_hash_functions
+    {
+        set_hash_functions(set_hash_functions const&);
+        set_hash_functions& operator=(set_hash_functions const&);
+    
+        typedef hash_buffered_functions<H, P> buffered_functions;
+        buffered_functions& buffered_functions_;
+        bool tmp_functions_;
+
+    public:
+
+        set_hash_functions(buffered_functions& f, H const& h, P const& p)
+          : buffered_functions_(f),
+            tmp_functions_(!f.current_)
+        {
+            f.construct(tmp_functions_, h, p);
+        }
+
+        set_hash_functions(buffered_functions& f,
+            buffered_functions const& other)
+          : buffered_functions_(f),
+            tmp_functions_(!f.current_)
+        {
+            f.construct(tmp_functions_, other.current());
+        }
+
+        ~set_hash_functions()
+        {
+            buffered_functions_.destroy(tmp_functions_);
+        }
+
+        void commit()
+        {
+            buffered_functions_.current_ = tmp_functions_;
+            tmp_functions_ = !tmp_functions_;
+        }
+    };
+
+    template <class T>
+    class hash_table : public T::buckets, public T::buffered_functions
+    {
+        hash_table(hash_table const&);
+    public:
+        typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
+        typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal;
+        typedef BOOST_DEDUCED_TYPENAME T::value_allocator value_allocator;
+        typedef BOOST_DEDUCED_TYPENAME T::key_type key_type;
+        typedef BOOST_DEDUCED_TYPENAME T::value_type value_type;
+        typedef BOOST_DEDUCED_TYPENAME T::buffered_functions base;
+        typedef BOOST_DEDUCED_TYPENAME T::buckets buckets;
+        typedef BOOST_DEDUCED_TYPENAME T::extractor extractor;
+        typedef BOOST_DEDUCED_TYPENAME T::node_constructor node_constructor;
+
+        typedef BOOST_DEDUCED_TYPENAME T::node node;
+        typedef BOOST_DEDUCED_TYPENAME T::bucket bucket;
+        typedef BOOST_DEDUCED_TYPENAME T::node_ptr node_ptr;
+        typedef BOOST_DEDUCED_TYPENAME T::bucket_ptr bucket_ptr;
+        typedef BOOST_DEDUCED_TYPENAME T::iterator_base iterator_base;
+        typedef BOOST_DEDUCED_TYPENAME T::node_allocator node_allocator;
+        typedef BOOST_DEDUCED_TYPENAME T::iterator_pair iterator_pair;
+
+        // Members
+        
+        std::size_t size_;
+        float mlf_;
+        // Cached data - invalid if !this->buckets_
+        bucket_ptr cached_begin_bucket_;
+        std::size_t max_load_;
+
+        // Helper methods
+
+        key_type const& get_key(value_type const& v) const {
+            return extractor::extract(v);
+        }
+        key_type const& get_key_from_ptr(node_ptr n) const {
+            return extractor::extract(node::get_value(n));
+        }
+        bool equal(key_type const& k, value_type const& v) const;
+        template <class Key, class Pred>
+        node_ptr find_iterator(bucket_ptr bucket, Key const& k,
+            Pred const&) const;
+        node_ptr find_iterator(bucket_ptr bucket, key_type const& k) const;
+        node_ptr find_iterator(key_type const& k) const;
+        node_ptr* find_for_erase(bucket_ptr bucket, key_type const& k) const;
+        
+        // Load methods
+
+        std::size_t max_size() const;
+        std::size_t bucket_index(key_type const& k) const;
+        void max_load_factor(float z);
+        std::size_t min_buckets_for_size(std::size_t n) const;
+        std::size_t calculate_max_load();
+
+        // Constructors
+
+        hash_table(std::size_t n, hasher const& hf, key_equal const& eq,
+            node_allocator const& a);
+        hash_table(hash_table const& x, node_allocator const& a);
+        hash_table(hash_table& x, move_tag m);
+        hash_table(hash_table& x, node_allocator const& a, move_tag m);
+        ~hash_table() {}
+        hash_table& operator=(hash_table const&);
+
+        // Iterators
+
+        iterator_base begin() const {
+            return this->size_ ?
+                iterator_base(this->cached_begin_bucket_) :
+                iterator_base();
+        }
+        iterator_base end() const {
+            return iterator_base();
+        }
+
+        // Swap & Move
+
+        void swap(hash_table& x);
+        void fast_swap(hash_table& other);
+        void slow_swap(hash_table& other);
+        void partial_swap(hash_table& other);
+        void move(hash_table& x);
+
+        // Reserve and rehash
+
+        void create_for_insert(std::size_t n);
+        bool reserve_for_insert(std::size_t n);
+        void rehash(std::size_t n);
+        void rehash_impl(std::size_t n);
+
+        // Move/copy buckets
+
+        void move_buckets_to(buckets& dst);
+        void copy_buckets_to(buckets& dst) const;
+
+        // Misc. key methods
+
+        std::size_t count(key_type const& k) const;
+        iterator_base find(key_type const& k) const;
+        template <class Key, class Hash, class Pred>
+        iterator_base find(Key const& k, Hash const& h, Pred const& eq) const;
+        value_type& at(key_type const& k) const;
+        iterator_pair equal_range(key_type const& k) const;
+
+        // Erase
+        //
+        // no throw
+
+        void clear();
+        std::size_t erase_key(key_type const& k);
+        iterator_base erase_return_iterator(iterator_base r);
+        void erase(iterator_base r);
+        std::size_t erase_group(node_ptr* it, bucket_ptr bucket);
+        iterator_base erase_range(iterator_base r1, iterator_base r2);
+
+        // recompute_begin_bucket
+
+        void init_buckets();
+
+        // After an erase cached_begin_bucket_ might be left pointing to
+        // an empty bucket, so this is called to update it
+        //
+        // no throw
+
+        void recompute_begin_bucket(bucket_ptr b);
+
+        // This is called when a range has been erased
+        //
+        // no throw
+
+        void recompute_begin_bucket(bucket_ptr b1, bucket_ptr b2);
+        
+        // no throw
+        float load_factor() const;
+        
+        iterator_base emplace_empty_impl_with_node(
+            node_constructor&, std::size_t);
+    };
+
+    template <class T>
+    class hash_unique_table : public T::table
+    {
+    public:
+        typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
+        typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal;
+        typedef BOOST_DEDUCED_TYPENAME T::value_allocator value_allocator;
+        typedef BOOST_DEDUCED_TYPENAME T::key_type key_type;
+        typedef BOOST_DEDUCED_TYPENAME T::value_type value_type;
+        typedef BOOST_DEDUCED_TYPENAME T::table table;
+        typedef BOOST_DEDUCED_TYPENAME T::node_constructor node_constructor;
+
+        typedef BOOST_DEDUCED_TYPENAME T::node node;
+        typedef BOOST_DEDUCED_TYPENAME T::node_ptr node_ptr;
+        typedef BOOST_DEDUCED_TYPENAME T::bucket_ptr bucket_ptr;
+        typedef BOOST_DEDUCED_TYPENAME T::iterator_base iterator_base;
+        typedef BOOST_DEDUCED_TYPENAME T::extractor extractor;
+        
+        typedef std::pair<iterator_base, bool> emplace_return;
+
+        // Constructors
+
+        hash_unique_table(std::size_t n, hasher const& hf, key_equal const& eq,
+            value_allocator const& a)
+          : table(n, hf, eq, a) {}
+        hash_unique_table(hash_unique_table const& x)
+          : table(x, x.node_alloc()) {}
+        hash_unique_table(hash_unique_table const& x, value_allocator const& a)
+          : table(x, a) {}
+        hash_unique_table(hash_unique_table& x, move_tag m)
+          : table(x, m) {}
+        hash_unique_table(hash_unique_table& x, value_allocator const& a,
+            move_tag m)
+          : table(x, a, m) {}
+        ~hash_unique_table() {}
+
+        // Insert methods
+
+        emplace_return emplace_impl_with_node(node_constructor& a);
+        value_type& operator[](key_type const& k);
+
+        // equals
+
+        bool equals(hash_unique_table const&) const;
+
+        node_ptr add_node(node_constructor& a, bucket_ptr bucket);
+        
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+
+        template<class... Args>
+        emplace_return emplace(Args&&... args);
+        template<class... Args>
+        emplace_return emplace_impl(key_type const& k, Args&&... args);
+        template<class... Args>
+        emplace_return emplace_impl(no_key, Args&&... args);
+        template<class... Args>
+        emplace_return emplace_empty_impl(Args&&... args);
+#else
+
+#define BOOST_UNORDERED_INSERT_IMPL(z, n, _)                                   \
+        template <BOOST_UNORDERED_TEMPLATE_ARGS(z, n)>                         \
+        emplace_return emplace(                                                \
+            BOOST_UNORDERED_FUNCTION_PARAMS(z, n));                            \
+        template <BOOST_UNORDERED_TEMPLATE_ARGS(z, n)>                         \
+        emplace_return emplace_impl(key_type const& k,                         \
+           BOOST_UNORDERED_FUNCTION_PARAMS(z, n));                             \
+        template <BOOST_UNORDERED_TEMPLATE_ARGS(z, n)>                         \
+        emplace_return emplace_impl(no_key,                                    \
+           BOOST_UNORDERED_FUNCTION_PARAMS(z, n));                             \
+        template <BOOST_UNORDERED_TEMPLATE_ARGS(z, n)>                         \
+        emplace_return emplace_empty_impl(                                     \
+           BOOST_UNORDERED_FUNCTION_PARAMS(z, n));
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT,
+            BOOST_UNORDERED_INSERT_IMPL, _)
+
+#undef BOOST_UNORDERED_INSERT_IMPL
+
+#endif
+
+        // if hash function throws, or inserting > 1 element, basic exception
+        // safety strong otherwise
+        template <class InputIt>
+        void insert_range(InputIt i, InputIt j);
+        template <class InputIt>
+        void insert_range_impl(key_type const&, InputIt i, InputIt j);
+        template <class InputIt>
+        void insert_range_impl(no_key, InputIt i, InputIt j);
+    };
+
+    template <class T>
+    class hash_equivalent_table : public T::table
+    {
+    public:
+        typedef BOOST_DEDUCED_TYPENAME T::hasher hasher;
+        typedef BOOST_DEDUCED_TYPENAME T::key_equal key_equal;
+        typedef BOOST_DEDUCED_TYPENAME T::value_allocator value_allocator;
+        typedef BOOST_DEDUCED_TYPENAME T::key_type key_type;
+        typedef BOOST_DEDUCED_TYPENAME T::value_type value_type;
+        typedef BOOST_DEDUCED_TYPENAME T::table table;
+        typedef BOOST_DEDUCED_TYPENAME T::node_constructor node_constructor;
+
+        typedef BOOST_DEDUCED_TYPENAME T::node node;
+        typedef BOOST_DEDUCED_TYPENAME T::node_ptr node_ptr;
+        typedef BOOST_DEDUCED_TYPENAME T::bucket_ptr bucket_ptr;
+        typedef BOOST_DEDUCED_TYPENAME T::iterator_base iterator_base;
+        typedef BOOST_DEDUCED_TYPENAME T::extractor extractor;
+
+        // Constructors
+
+        hash_equivalent_table(std::size_t n,
+            hasher const& hf, key_equal const& eq, value_allocator const& a)
+          : table(n, hf, eq, a) {}
+        hash_equivalent_table(hash_equivalent_table const& x)
+          : table(x, x.node_alloc()) {}
+        hash_equivalent_table(hash_equivalent_table const& x,
+            value_allocator const& a)
+          : table(x, a) {}
+        hash_equivalent_table(hash_equivalent_table& x, move_tag m)
+          : table(x, m) {}
+        hash_equivalent_table(hash_equivalent_table& x,
+            value_allocator const& a, move_tag m)
+          : table(x, a, m) {}
+        ~hash_equivalent_table() {}
+
+        // Insert methods
+
+        iterator_base emplace_impl(node_constructor& a);
+        void emplace_impl_no_rehash(node_constructor& a);
+
+        // equals
+
+        bool equals(hash_equivalent_table const&) const;
+
+        inline node_ptr add_node(node_constructor& a,
+            bucket_ptr bucket, node_ptr pos);
+
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+
+        template <class... Args>
+        iterator_base emplace(Args&&... args);
+
+#else
+
+#define BOOST_UNORDERED_INSERT_IMPL(z, n, _)                                   \
+        template <BOOST_UNORDERED_TEMPLATE_ARGS(z, n)>                         \
+        iterator_base emplace(BOOST_UNORDERED_FUNCTION_PARAMS(z, n));
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT,
+            BOOST_UNORDERED_INSERT_IMPL, _)
+
+#undef BOOST_UNORDERED_INSERT_IMPL
+#endif
+
+        template <class I>
+        void insert_for_range(I i, I j, forward_traversal_tag);
+        template <class I>
+        void insert_for_range(I i, I j, boost::incrementable_traversal_tag);
+        template <class I>
+        void insert_range(I i, I j);
+    };
+
+    // Iterator Access
+
+#if !defined(__clang__)
+    class iterator_access
+    {
+    public:
+        template <class Iterator>
+        static BOOST_DEDUCED_TYPENAME Iterator::base const&
+            get(Iterator const& it)
+        {
+            return it.base_;
+        }
+    };
+#else
+    class iterator_access
+    {
+    public:
+        // Note: we access Iterator::base here, rather than in the function
+        // signature to work around a bug in the friend support of an
+        // early version of clang.
+
+        template <class Iterator>
+        struct base
+        {
+            typedef BOOST_DEDUCED_TYPENAME Iterator::base type;
+        };
+    
+        template <class Iterator>
+        static BOOST_DEDUCED_TYPENAME base<Iterator>::type const&
+            get(Iterator const& it)
+        {
+            return it.base_;
+        }
+    };
+#endif
+
+    // Iterators
+
+    template <class A, class G> class hash_iterator;
+    template <class A, class G> class hash_const_iterator;
+    template <class A, class G> class hash_local_iterator;
+    template <class A, class G> class hash_const_local_iterator;
+
+    // Local Iterators
+    //
+    // all no throw
+
+    template <class A, class G>
+    class hash_local_iterator
+        : public boost::iterator <
+            std::forward_iterator_tag,
+            BOOST_DEDUCED_TYPENAME A::value_type,
+            std::ptrdiff_t,
+            BOOST_DEDUCED_TYPENAME A::pointer,
+            BOOST_DEDUCED_TYPENAME A::reference>
+    {
+    public:
+        typedef BOOST_DEDUCED_TYPENAME A::value_type value_type;
+
+    private:
+        typedef hash_buckets<A, G> buckets;
+        typedef BOOST_DEDUCED_TYPENAME buckets::node_ptr node_ptr;
+        typedef BOOST_DEDUCED_TYPENAME buckets::node node;
+        typedef hash_const_local_iterator<A, G> const_local_iterator;
+
+        friend class hash_const_local_iterator<A, G>;
+        node_ptr ptr_;
+
+    public:
+        hash_local_iterator() : ptr_() {}
+        explicit hash_local_iterator(node_ptr x) : ptr_(x) {}
+        BOOST_DEDUCED_TYPENAME A::reference operator*() const {
+            return node::get_value(ptr_);
+        }
+        value_type* operator->() const {
+            return &node::get_value(ptr_);
+        }
+        hash_local_iterator& operator++() {
+            ptr_ = ptr_->next_; return *this;
+        }
+        hash_local_iterator operator++(int) {
+            hash_local_iterator tmp(ptr_); ptr_ = ptr_->next_; return tmp; }
+        bool operator==(hash_local_iterator x) const {
+            return ptr_ == x.ptr_;
+        }
+        bool operator==(const_local_iterator x) const {
+            return ptr_ == x.ptr_;
+        }
+        bool operator!=(hash_local_iterator x) const {
+            return ptr_ != x.ptr_;
+        }
+        bool operator!=(const_local_iterator x) const {
+            return ptr_ != x.ptr_;
+        }
+    };
+
+    template <class A, class G>
+    class hash_const_local_iterator
+        : public boost::iterator <
+            std::forward_iterator_tag,
+            BOOST_DEDUCED_TYPENAME A::value_type,
+            std::ptrdiff_t,
+            BOOST_DEDUCED_TYPENAME A::const_pointer,
+            BOOST_DEDUCED_TYPENAME A::const_reference >
+    {
+    public:
+        typedef BOOST_DEDUCED_TYPENAME A::value_type value_type;
+
+    private:
+        typedef hash_buckets<A, G> buckets;
+        typedef BOOST_DEDUCED_TYPENAME buckets::node_ptr ptr;
+        typedef BOOST_DEDUCED_TYPENAME buckets::node node;
+        typedef hash_local_iterator<A, G> local_iterator;
+        friend class hash_local_iterator<A, G>;
+        ptr ptr_;
+
+    public:
+        hash_const_local_iterator() : ptr_() {}
+        explicit hash_const_local_iterator(ptr x) : ptr_(x) {}
+        hash_const_local_iterator(local_iterator x) : ptr_(x.ptr_) {}
+        BOOST_DEDUCED_TYPENAME A::const_reference
+            operator*() const {
+            return node::get_value(ptr_);
+        }
+        value_type const* operator->() const {
+            return &node::get_value(ptr_);
+        }
+        hash_const_local_iterator& operator++() {
+            ptr_ = ptr_->next_; return *this;
+        }
+        hash_const_local_iterator operator++(int) {
+            hash_const_local_iterator tmp(ptr_); ptr_ = ptr_->next_; return tmp;
+        }
+        bool operator==(local_iterator x) const {
+            return ptr_ == x.ptr_;
+        }
+        bool operator==(hash_const_local_iterator x) const {
+            return ptr_ == x.ptr_;
+        }
+        bool operator!=(local_iterator x) const {
+            return ptr_ != x.ptr_;
+        }
+        bool operator!=(hash_const_local_iterator x) const {
+            return ptr_ != x.ptr_;
+        }
+    };
+
+    // iterators
+    //
+    // all no throw
+
+
+    template <class A, class G>
+    class hash_iterator
+        : public boost::iterator <
+            std::forward_iterator_tag,
+            BOOST_DEDUCED_TYPENAME A::value_type,
+            std::ptrdiff_t,
+            BOOST_DEDUCED_TYPENAME A::pointer,
+            BOOST_DEDUCED_TYPENAME A::reference >
+    {
+    public:
+        typedef BOOST_DEDUCED_TYPENAME A::value_type value_type;
+
+    private:
+        typedef hash_buckets<A, G> buckets;
+        typedef BOOST_DEDUCED_TYPENAME buckets::node node;
+        typedef BOOST_DEDUCED_TYPENAME buckets::iterator_base base;
+        typedef hash_const_iterator<A, G> const_iterator;
+        friend class hash_const_iterator<A, G>;
+        base base_;
+
+    public:
+
+        hash_iterator() : base_() {}
+        explicit hash_iterator(base const& x) : base_(x) {}
+        BOOST_DEDUCED_TYPENAME A::reference operator*() const {
+            return *base_;
+        }
+        value_type* operator->() const {
+            return &*base_;
+        }
+        hash_iterator& operator++() {
+            base_.increment(); return *this;
+        }
+        hash_iterator operator++(int) {
+            hash_iterator tmp(base_); base_.increment(); return tmp;
+        }
+        bool operator==(hash_iterator const& x) const {
+            return base_ == x.base_;
+        }
+        bool operator==(const_iterator const& x) const {
+            return base_ == x.base_;
+        }
+        bool operator!=(hash_iterator const& x) const {
+            return base_ != x.base_;
+        }
+        bool operator!=(const_iterator const& x) const {
+            return base_ != x.base_;
+        }
+    };
+
+    template <class A, class G>
+    class hash_const_iterator
+        : public boost::iterator <
+            std::forward_iterator_tag,
+            BOOST_DEDUCED_TYPENAME A::value_type,
+            std::ptrdiff_t,
+            BOOST_DEDUCED_TYPENAME A::const_pointer,
+            BOOST_DEDUCED_TYPENAME A::const_reference >
+    {
+    public:
+        typedef BOOST_DEDUCED_TYPENAME A::value_type value_type;
+
+    private:
+        typedef hash_buckets<A, G> buckets;
+        typedef BOOST_DEDUCED_TYPENAME buckets::node node;
+        typedef BOOST_DEDUCED_TYPENAME buckets::iterator_base base;
+        typedef hash_iterator<A, G> iterator;
+        friend class hash_iterator<A, G>;
+        friend class iterator_access;
+        base base_;
+
+    public:
+
+        hash_const_iterator() : base_() {}
+        explicit hash_const_iterator(base const& x) : base_(x) {}
+        hash_const_iterator(iterator const& x) : base_(x.base_) {}
+        BOOST_DEDUCED_TYPENAME A::const_reference operator*() const {
+            return *base_;
+        }
+        value_type const* operator->() const {
+            return &*base_;
+        }
+        hash_const_iterator& operator++() {
+            base_.increment(); return *this;
+        }
+        hash_const_iterator operator++(int) {
+            hash_const_iterator tmp(base_); base_.increment(); return tmp;
+        }
+        bool operator==(iterator const& x) const {
+            return base_ == x.base_;
+        }
+        bool operator==(hash_const_iterator const& x) const {
+            return base_ == x.base_;
+        }
+        bool operator!=(iterator const& x) const {
+            return base_ != x.base_;
+        }
+        bool operator!=(hash_const_iterator const& x) const {
+            return base_ != x.base_;
+        }
+    };
+
+    // types
+
+    template <class K, class V, class H, class P, class A, class E, class G>
+    struct types
+    {
+    public:
+        typedef K key_type;
+        typedef V value_type;
+        typedef H hasher;
+        typedef P key_equal;
+        typedef A value_allocator;
+        typedef E extractor;
+        typedef G group_type;
+        
+        typedef hash_node_constructor<value_allocator, group_type>
+            node_constructor;
+        typedef hash_buckets<value_allocator, group_type> buckets;
+        typedef hash_buffered_functions<hasher, key_equal> buffered_functions;
+
+        typedef BOOST_DEDUCED_TYPENAME buckets::node node;
+        typedef BOOST_DEDUCED_TYPENAME buckets::bucket bucket;
+        typedef BOOST_DEDUCED_TYPENAME buckets::node_ptr node_ptr;
+        typedef BOOST_DEDUCED_TYPENAME buckets::bucket_ptr bucket_ptr;
+        typedef BOOST_DEDUCED_TYPENAME buckets::iterator_base iterator_base;
+        typedef BOOST_DEDUCED_TYPENAME buckets::node_allocator node_allocator;
+
+        typedef std::pair<iterator_base, iterator_base> iterator_pair;
+    };
+
+    template <class H, class P, class A>
+    struct set : public types<
+        BOOST_DEDUCED_TYPENAME A::value_type,
+        BOOST_DEDUCED_TYPENAME A::value_type,
+        H, P, A,
+        set_extractor<BOOST_DEDUCED_TYPENAME A::value_type>,
+        ungrouped>
+    {        
+        typedef hash_unique_table<set<H, P, A> > impl;
+        typedef hash_table<set<H, P, A> > table;
+    };
+
+    template <class H, class P, class A>
+    struct multiset : public types<
+        BOOST_DEDUCED_TYPENAME A::value_type,
+        BOOST_DEDUCED_TYPENAME A::value_type,
+        H, P, A,
+        set_extractor<BOOST_DEDUCED_TYPENAME A::value_type>,
+        grouped>
+    {
+        typedef hash_equivalent_table<multiset<H, P, A> > impl;
+        typedef hash_table<multiset<H, P, A> > table;
+    };
+
+    template <class K, class H, class P, class A>
+    struct map : public types<
+        K, BOOST_DEDUCED_TYPENAME A::value_type,
+        H, P, A,
+        map_extractor<K, BOOST_DEDUCED_TYPENAME A::value_type>,
+        ungrouped>
+    {
+        typedef hash_unique_table<map<K, H, P, A> > impl;
+        typedef hash_table<map<K, H, P, A> > table;
+    };
+
+    template <class K, class H, class P, class A>
+    struct multimap : public types<
+        K, BOOST_DEDUCED_TYPENAME A::value_type,
+        H, P, A,
+        map_extractor<K, BOOST_DEDUCED_TYPENAME A::value_type>,
+        grouped>
+    {
+        typedef hash_equivalent_table<multimap<K, H, P, A> > impl;
+        typedef hash_table<multimap<K, H, P, A> > table;
+    };
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/unordered/detail/move.hpp b/deal.II/contrib/boost/include/boost/unordered/detail/move.hpp
new file mode 100644 (file)
index 0000000..16fd921
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+    Copyright 2005-2007 Adobe Systems Incorporated
+   
+    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).
+*/
+
+/*************************************************************************************************/
+
+#ifndef BOOST_UNORDERED_DETAIL_MOVE_HEADER
+#define BOOST_UNORDERED_DETAIL_MOVE_HEADER
+
+#include <boost/config.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_class.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/detail/workaround.hpp>
+
+/*************************************************************************************************/
+
+#if defined(BOOST_NO_SFINAE)
+#  define BOOST_UNORDERED_NO_HAS_MOVE_ASSIGN
+#elif defined(__GNUC__) && \
+    (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
+#  define BOOST_UNORDERED_NO_HAS_MOVE_ASSIGN
+#elif BOOST_WORKAROUND(BOOST_INTEL, < 900) || \
+    BOOST_WORKAROUND(__EDG_VERSION__, < 304) || \
+    BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0593))
+#  define BOOST_UNORDERED_NO_HAS_MOVE_ASSIGN
+#endif
+
+/*************************************************************************************************/
+
+namespace boost {
+namespace unordered_detail {
+
+/*************************************************************************************************/
+
+namespace move_detail {
+
+/*************************************************************************************************/
+
+#if !defined(BOOST_UNORDERED_NO_HAS_MOVE_ASSIGN)
+
+/*************************************************************************************************/
+
+template <typename T>  
+struct class_has_move_assign {  
+    class type {
+        typedef T& (T::*E)(T t);  
+        typedef char (&no_type)[1];  
+        typedef char (&yes_type)[2];  
+        template <E e> struct sfinae { typedef yes_type type; };  
+        template <class U>  
+        static typename sfinae<&U::operator=>::type test(int);  
+        template <class U>  
+        static no_type test(...);  
+    public:  
+        enum {value = sizeof(test<T>(1)) == sizeof(yes_type)};  
+    };
+ };  
+
+/*************************************************************************************************/
+
+template<typename T>
+struct has_move_assign : boost::mpl::and_<boost::is_class<T>, class_has_move_assign<T> > {};
+
+/*************************************************************************************************/
+
+class test_can_convert_anything { };
+
+/*************************************************************************************************/
+
+#endif // BOOST_UNORDERED_NO_HAS_MOVE_ASSIGN
+
+/*************************************************************************************************/
+
+/*
+    REVISIT (sparent@adobe.com): This is a work around for Boost 1.34.1 and VC++ 2008 where
+    boost::is_convertible<T, T> fails to compile.
+*/
+
+template <typename T, typename U>
+struct is_convertible : boost::mpl::or_<
+    boost::is_same<T, U>,
+    boost::is_convertible<T, U>
+> { };
+
+/*************************************************************************************************/
+
+} //namespace move_detail
+
+
+/*************************************************************************************************/
+
+/*!
+\ingroup move_related
+\brief move_from is used for move_ctors.
+*/
+
+template <typename T>
+struct move_from
+{
+    explicit move_from(T& x) : source(x) { }
+    T& source;
+private:
+    move_from& operator=(move_from const&);
+};
+
+/*************************************************************************************************/
+
+#if !defined(BOOST_UNORDERED_NO_HAS_MOVE_ASSIGN)
+
+/*************************************************************************************************/
+
+/*!
+\ingroup move_related
+\brief The is_movable trait can be used to identify movable types.
+*/
+template <typename T>
+struct is_movable : boost::mpl::and_<
+                        boost::is_convertible<move_from<T>, T>,
+                        move_detail::has_move_assign<T>,
+                        boost::mpl::not_<boost::is_convertible<move_detail::test_can_convert_anything, T> >
+                    > { };
+
+/*************************************************************************************************/
+
+#else // BOOST_UNORDERED_NO_HAS_MOVE_ASSIGN
+
+// On compilers which don't have adequate SFINAE support, treat most types as unmovable,
+// unless the trait is specialized.
+
+template <typename T>
+struct is_movable : boost::mpl::false_ { };
+
+#endif
+
+/*************************************************************************************************/
+
+#if !defined(BOOST_NO_SFINAE)
+
+/*************************************************************************************************/
+
+/*!
+\ingroup move_related
+\brief copy_sink and move_sink are used to select between overloaded operations according to
+ whether type T is movable and convertible to type U.
+\sa move
+*/
+
+template <typename T,
+          typename U = T,
+          typename R = void*>
+struct copy_sink : boost::enable_if<
+                        boost::mpl::and_<
+                            boost::unordered_detail::move_detail::is_convertible<T, U>,                           
+                            boost::mpl::not_<is_movable<T> >
+                        >,
+                        R
+                    >
+{ };
+
+/*************************************************************************************************/
+
+/*!
+\ingroup move_related
+\brief move_sink and copy_sink are used to select between overloaded operations according to
+ whether type T is movable and convertible to type U.
+ \sa move
+*/
+
+template <typename T,
+          typename U = T,
+          typename R = void*>
+struct move_sink : boost::enable_if<
+                        boost::mpl::and_<
+                            boost::unordered_detail::move_detail::is_convertible<T, U>,                            
+                            is_movable<T>
+                        >,
+                        R
+                    >
+{ };
+
+/*************************************************************************************************/
+
+/*!
+\ingroup move_related
+\brief This version of move is selected when T is_movable . It in turn calls the move
+constructor. This call, with the help of the return value optimization, will cause x to be moved
+instead of copied to its destination. See adobe/test/move/main.cpp for examples.
+
+*/
+template <typename T>
+T move(T& x, typename move_sink<T>::type = 0) { return T(move_from<T>(x)); }
+
+/*************************************************************************************************/
+
+/*!
+\ingroup move_related
+\brief This version of move is selected when T is not movable . The net result will be that
+x gets copied.
+*/
+template <typename T>
+T& move(T& x, typename copy_sink<T>::type = 0) { return x; }
+
+/*************************************************************************************************/
+
+#else // BOOST_NO_SFINAE
+
+// On compilers without SFINAE, define copy_sink to always use the copy function.
+
+template <typename T,
+          typename U = T,
+          typename R = void*>
+struct copy_sink
+{
+    typedef R type;
+};
+
+// Always copy the element unless this is overloaded.
+
+template <typename T>
+T& move(T& x) {
+    return x;
+}
+
+#endif // BOOST_NO_SFINAE
+
+} // namespace unordered_detail
+} // namespace boost
+
+/*************************************************************************************************/
+
+#endif
+
+/*************************************************************************************************/
diff --git a/deal.II/contrib/boost/include/boost/unordered/detail/node.hpp b/deal.II/contrib/boost/include/boost/unordered/detail/node.hpp
new file mode 100644 (file)
index 0000000..85a3141
--- /dev/null
@@ -0,0 +1,226 @@
+
+// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
+// Copyright (C) 2005-2009 Daniel James
+// 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)
+
+// This contains the basic data structure, apart from the actual values. There's
+// no construction or deconstruction here. So this only depends on the pointer
+// type.
+
+#ifndef BOOST_UNORDERED_DETAIL_NODE_HPP_INCLUDED
+#define BOOST_UNORDERED_DETAIL_NODE_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/unordered/detail/fwd.hpp>
+
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0X0582)
+#define BOOST_UNORDERED_BORLAND_BOOL(x) (bool)(x)
+#else
+#define BOOST_UNORDERED_BORLAND_BOOL(x) x
+#endif
+
+namespace boost { namespace unordered_detail {
+
+    ////////////////////////////////////////////////////////////////////////////
+    // ungrouped node implementation
+    
+    template <class A>
+    inline BOOST_DEDUCED_TYPENAME ungrouped_node_base<A>::node_ptr&
+        ungrouped_node_base<A>::next_group(node_ptr ptr)
+    {
+        return ptr->next_;
+    }
+
+    template <class A>
+    inline std::size_t ungrouped_node_base<A>::group_count(node_ptr)
+    {
+        return 1;
+    }
+
+    template <class A>
+    inline void ungrouped_node_base<A>::add_to_bucket(node_ptr n, bucket& b)
+    {
+        n->next_ = b.next_;
+        b.next_ = n;
+    }
+
+    template <class A>
+    inline void ungrouped_node_base<A>::add_after_node(node_ptr n,
+        node_ptr position)
+    {
+        n->next_ = position->next_;
+        position->next_ = position;
+    }
+    
+    template <class A>
+    inline void ungrouped_node_base<A>::unlink_nodes(bucket& b,
+        node_ptr begin, node_ptr end)
+    {
+        node_ptr* pos = &b.next_;
+        while(*pos != begin) pos = &(*pos)->next_;
+        *pos = end;
+    }
+
+    template <class A>
+    inline void ungrouped_node_base<A>::unlink_nodes(bucket& b, node_ptr end)
+    {
+        b.next_ = end;
+    }
+
+    template <class A>
+    inline void ungrouped_node_base<A>::unlink_node(bucket& b, node_ptr n)
+    {
+        unlink_nodes(b, n, n->next_);
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // grouped node implementation
+    
+    // If ptr is the first element in a group, return pointer to next group.
+    // Otherwise returns a pointer to ptr.
+    template <class A>
+    inline BOOST_DEDUCED_TYPENAME grouped_node_base<A>::node_ptr&
+        grouped_node_base<A>::next_group(node_ptr ptr)
+    {
+        return get(ptr).group_prev_->next_;
+    }
+
+    template <class A>
+    inline BOOST_DEDUCED_TYPENAME grouped_node_base<A>::node_ptr
+        grouped_node_base<A>::first_in_group(node_ptr ptr)
+    {
+        while(next_group(ptr) == ptr)
+            ptr = get(ptr).group_prev_;
+        return ptr;
+    }
+
+    template <class A>
+    inline std::size_t grouped_node_base<A>::group_count(node_ptr ptr)
+    {
+        node_ptr start = ptr;
+        std::size_t size = 0;
+        do {
+            ++size;
+            ptr = get(ptr).group_prev_;
+        } while(ptr != start);
+        return size;
+    }
+
+    template <class A>
+    inline void grouped_node_base<A>::add_to_bucket(node_ptr n, bucket& b)
+    {
+        n->next_ = b.next_;
+        get(n).group_prev_ = n;
+        b.next_ = n;
+    }
+
+    template <class A>
+    inline void grouped_node_base<A>::add_after_node(node_ptr n, node_ptr pos)
+    {
+        n->next_ = next_group(pos);
+        get(n).group_prev_ = get(pos).group_prev_;
+        next_group(pos) = n;
+        get(pos).group_prev_ = n;
+    }
+
+    // Break a ciruclar list into two, with split as the beginning
+    // of the second group (if split is at the beginning then don't
+    // split).
+    template <class A>
+    inline BOOST_DEDUCED_TYPENAME grouped_node_base<A>::node_ptr
+        grouped_node_base<A>::split_group(node_ptr split)
+    {
+        node_ptr first = first_in_group(split);
+        if(first == split) return split;
+
+        node_ptr last = get(first).group_prev_;
+        get(first).group_prev_ = get(split).group_prev_;
+        get(split).group_prev_ = last;
+
+        return first;
+    }
+
+    template <class A>
+    void grouped_node_base<A>::unlink_node(bucket& b, node_ptr n)
+    {
+        node_ptr next = n->next_;
+        node_ptr* pos = &next_group(n);
+
+        if(*pos != n) {
+            // The node is at the beginning of a group.
+
+            // Find the previous node pointer:
+            pos = &b.next_;
+            while(*pos != n) pos = &next_group(*pos);
+
+            // Remove from group
+            if(BOOST_UNORDERED_BORLAND_BOOL(next) &&
+                get(next).group_prev_ == n)
+            {
+                get(next).group_prev_ = get(n).group_prev_;
+            }
+        }
+        else if(BOOST_UNORDERED_BORLAND_BOOL(next) &&
+            get(next).group_prev_ == n)
+        {
+            // The deleted node is not at the end of the group, so
+            // change the link from the next node.
+            get(next).group_prev_ = get(n).group_prev_;
+        }
+        else {
+            // The deleted node is at the end of the group, so the
+            // first node in the group is pointing to it.
+            // Find that to change its pointer.
+            node_ptr x = get(n).group_prev_;
+            while(get(x).group_prev_ != n) {
+                x = get(x).group_prev_;
+            }
+            get(x).group_prev_ = get(n).group_prev_;
+        }
+        *pos = next;
+    }
+
+    template <class A>
+    void grouped_node_base<A>::unlink_nodes(bucket& b,
+        node_ptr begin, node_ptr end)
+    {
+        node_ptr* pos = &next_group(begin);
+
+        if(*pos != begin) {
+            // The node is at the beginning of a group.
+
+            // Find the previous node pointer:
+            pos = &b.next_;
+            while(*pos != begin) pos = &next_group(*pos);
+
+            // Remove from group
+            if(BOOST_UNORDERED_BORLAND_BOOL(end)) split_group(end);
+        }
+        else {
+            node_ptr group1 = split_group(begin);
+            if(BOOST_UNORDERED_BORLAND_BOOL(end)) {
+                node_ptr group2 = split_group(end);
+
+                if(begin == group2) {
+                    node_ptr end1 = get(group1).group_prev_;
+                    node_ptr end2 = get(group2).group_prev_;
+                    get(group1).group_prev_ = end2;
+                    get(group2).group_prev_ = end1;
+                }
+            }
+        }
+        *pos = end;
+    }
+
+    template <class A>
+    void grouped_node_base<A>::unlink_nodes(bucket& b, node_ptr end)
+    {
+        split_group(end);
+        b.next_ = end;
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/unordered/detail/table.hpp b/deal.II/contrib/boost/include/boost/unordered/detail/table.hpp
new file mode 100644 (file)
index 0000000..d37c015
--- /dev/null
@@ -0,0 +1,778 @@
+
+// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
+// Copyright (C) 2005-2009 Daniel James
+// 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)
+
+#ifndef BOOST_UNORDERED_DETAIL_ALL_HPP_INCLUDED
+#define BOOST_UNORDERED_DETAIL_ALL_HPP_INCLUDED
+
+#include <cstddef>
+#include <stdexcept>
+#include <algorithm>
+#include <boost/config/no_tr1/cmath.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+#include <boost/throw_exception.hpp>
+
+#include <boost/unordered/detail/buckets.hpp>
+
+namespace boost { namespace unordered_detail {
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Helper methods
+
+    // strong exception safety, no side effects
+    template <class T>
+    inline bool hash_table<T>::equal(
+        key_type const& k, value_type const& v) const
+    {
+        return this->key_eq()(k, get_key(v));
+    }
+
+    // strong exception safety, no side effects
+    template <class T>
+    template <class Key, class Pred>
+    inline BOOST_DEDUCED_TYPENAME T::node_ptr
+        hash_table<T>::find_iterator(bucket_ptr bucket, Key const& k,
+            Pred const& eq) const
+    {
+        node_ptr it = bucket->next_;
+        while (BOOST_UNORDERED_BORLAND_BOOL(it) &&
+            !eq(k, get_key(node::get_value(it))))
+        {
+            it = node::next_group(it);
+        }
+
+        return it;
+    }
+
+    // strong exception safety, no side effects
+    template <class T>
+    inline BOOST_DEDUCED_TYPENAME T::node_ptr
+        hash_table<T>::find_iterator(
+            bucket_ptr bucket, key_type const& k) const
+    {
+        node_ptr it = bucket->next_;
+        while (BOOST_UNORDERED_BORLAND_BOOL(it) &&
+            !equal(k, node::get_value(it)))
+        {
+            it = node::next_group(it);
+        }
+
+        return it;
+    }
+
+    // strong exception safety, no side effects
+    // pre: this->buckets_
+    template <class T>
+    inline BOOST_DEDUCED_TYPENAME T::node_ptr
+        hash_table<T>::find_iterator(key_type const& k) const
+    {
+        return find_iterator(this->get_bucket(this->bucket_index(k)), k);
+    }
+
+    // strong exception safety, no side effects
+    template <class T>
+    inline BOOST_DEDUCED_TYPENAME T::node_ptr*
+        hash_table<T>::find_for_erase(
+            bucket_ptr bucket, key_type const& k) const
+    {
+        node_ptr* it = &bucket->next_;
+        while(BOOST_UNORDERED_BORLAND_BOOL(*it) &&
+            !equal(k, node::get_value(*it)))
+        {
+            it = &node::next_group(*it);
+        }
+
+        return it;
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Load methods
+
+    // no throw
+    template <class T>
+    std::size_t hash_table<T>::max_size() const
+    {
+        using namespace std;
+
+        // size < mlf_ * count
+        return double_to_size_t(ceil(
+                (double) this->mlf_ * this->max_bucket_count())) - 1;
+    }
+
+    // strong safety
+    template <class T>
+    inline std::size_t hash_table<T>::bucket_index(
+        key_type const& k) const
+    {
+        // hash_function can throw:
+        return this->hash_function()(k) % this->bucket_count_;
+    }
+
+
+    // no throw
+    template <class T>
+    inline std::size_t hash_table<T>::calculate_max_load()
+    {
+        using namespace std;
+
+        // From 6.3.1/13:
+        // Only resize when size >= mlf_ * count
+        return double_to_size_t(ceil((double) mlf_ * this->bucket_count_));
+    }
+
+    template <class T>
+    void hash_table<T>::max_load_factor(float z)
+    {
+        BOOST_ASSERT(z > 0);
+        mlf_ = (std::max)(z, minimum_max_load_factor);
+        this->max_load_ = this->calculate_max_load();
+    }
+
+    // no throw
+    template <class T>
+    inline std::size_t hash_table<T>::min_buckets_for_size(
+        std::size_t size) const
+    {
+        BOOST_ASSERT(this->mlf_ != 0);
+
+        using namespace std;
+
+        // From 6.3.1/13:
+        // size < mlf_ * count
+        // => count > size / mlf_
+        //
+        // Or from rehash post-condition:
+        // count > size / mlf_
+        return next_prime(double_to_size_t(floor(size / (double) mlf_)) + 1);
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // recompute_begin_bucket
+
+    // init_buckets
+
+    template <class T>
+    inline void hash_table<T>::init_buckets()
+    {
+        if (this->size_) {
+            this->cached_begin_bucket_ = this->buckets_;
+            while (!this->cached_begin_bucket_->next_)
+                ++this->cached_begin_bucket_;
+        } else {
+            this->cached_begin_bucket_ = this->get_bucket(this->bucket_count_);
+        }
+        this->max_load_ = calculate_max_load();
+    }
+
+    // After an erase cached_begin_bucket_ might be left pointing to
+    // an empty bucket, so this is called to update it
+    //
+    // no throw
+
+    template <class T>
+    inline void hash_table<T>::recompute_begin_bucket(bucket_ptr b)
+    {
+        BOOST_ASSERT(!(b < this->cached_begin_bucket_));
+
+        if(b == this->cached_begin_bucket_)
+        {
+            if (this->size_ != 0) {
+                while (!this->cached_begin_bucket_->next_)
+                    ++this->cached_begin_bucket_;
+            } else {
+                this->cached_begin_bucket_ =
+                    this->get_bucket(this->bucket_count_);
+            }
+        }
+    }
+
+    // This is called when a range has been erased
+    //
+    // no throw
+
+    template <class T>
+    inline void hash_table<T>::recompute_begin_bucket(
+        bucket_ptr b1, bucket_ptr b2)
+    {
+        BOOST_ASSERT(!(b1 < this->cached_begin_bucket_) && !(b2 < b1));
+        BOOST_ASSERT(BOOST_UNORDERED_BORLAND_BOOL(b2->next_));
+
+        if(b1 == this->cached_begin_bucket_ && !b1->next_)
+            this->cached_begin_bucket_ = b2;
+    }
+
+    // no throw
+    template <class T>
+    inline float hash_table<T>::load_factor() const
+    {
+        BOOST_ASSERT(this->bucket_count_ != 0);
+        return static_cast<float>(this->size_)
+            / static_cast<float>(this->bucket_count_);
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Constructors
+
+    template <class T>
+    hash_table<T>::hash_table(std::size_t num_buckets,
+        hasher const& hf, key_equal const& eq, node_allocator const& a)
+      : buckets(a, next_prime(num_buckets)),
+        base(hf, eq),
+        size_(),
+        mlf_(1.0f),
+        cached_begin_bucket_(),
+        max_load_(0)
+    {
+    }
+
+    // Copy Construct with allocator
+
+    template <class T>
+    hash_table<T>::hash_table(hash_table const& x,
+        node_allocator const& a)
+      : buckets(a, x.min_buckets_for_size(x.size_)),
+        base(x),
+        size_(x.size_),
+        mlf_(x.mlf_),
+        cached_begin_bucket_(),
+        max_load_(0)
+    {
+        if(x.size_) {
+            x.copy_buckets_to(*this);
+            this->init_buckets();
+        }
+    }
+
+    // Move Construct
+
+    template <class T>
+    hash_table<T>::hash_table(hash_table& x, move_tag)
+      : buckets(x.node_alloc(), x.bucket_count_),
+        base(x),
+        size_(0),
+        mlf_(1.0f),
+        cached_begin_bucket_(),
+        max_load_(0)
+    {
+        this->partial_swap(x);
+    }
+
+    template <class T>
+    hash_table<T>::hash_table(hash_table& x,
+        node_allocator const& a, move_tag)
+      : buckets(a, x.bucket_count_),
+        base(x),
+        size_(0),
+        mlf_(x.mlf_),
+        cached_begin_bucket_(),
+        max_load_(0)
+    {
+        if(a == x.node_alloc()) {
+            this->partial_swap(x);
+        }
+        else if(x.size_) {
+            x.copy_buckets_to(*this);
+            this->size_ = x.size_;
+            this->init_buckets();
+        }
+    }
+
+    template <class T>
+    hash_table<T>& hash_table<T>::operator=(
+        hash_table const& x)
+    {
+        hash_table tmp(x, this->node_alloc());
+        this->fast_swap(tmp);
+        return *this;
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Swap & Move
+    
+    // Swap
+    //
+    // Strong exception safety
+    //
+    // Can throw if hash or predicate object's copy constructor throws
+    // or if allocators are unequal.
+
+    template <class T>
+    inline void hash_table<T>::partial_swap(hash_table& x)
+    {
+        this->buckets::swap(x); // No throw
+        std::swap(this->size_, x.size_);
+        std::swap(this->mlf_, x.mlf_);
+        std::swap(this->cached_begin_bucket_, x.cached_begin_bucket_);
+        std::swap(this->max_load_, x.max_load_);
+    }
+
+    template <class T>
+    inline void hash_table<T>::fast_swap(hash_table& x)
+    {
+        // These can throw, but they only affect the function objects
+        // that aren't in use so it is strongly exception safe, via.
+        // double buffering.
+        {
+            set_hash_functions<hasher, key_equal> op1(*this, x);
+            set_hash_functions<hasher, key_equal> op2(x, *this);
+            op1.commit();
+            op2.commit();
+        }
+        this->buckets::swap(x); // No throw
+        std::swap(this->size_, x.size_);
+        std::swap(this->mlf_, x.mlf_);
+        std::swap(this->cached_begin_bucket_, x.cached_begin_bucket_);
+        std::swap(this->max_load_, x.max_load_);
+    }
+
+    template <class T>
+    inline void hash_table<T>::slow_swap(hash_table& x)
+    {
+        if(this == &x) return;
+
+        {
+            // These can throw, but they only affect the function objects
+            // that aren't in use so it is strongly exception safe, via.
+            // double buffering.
+            set_hash_functions<hasher, key_equal> op1(*this, x);
+            set_hash_functions<hasher, key_equal> op2(x, *this);
+        
+            // Create new buckets in separate hash_buckets objects
+            // which will clean up if anything throws an exception.
+            // (all can throw, but with no effect as these are new objects).
+        
+            buckets b1(this->node_alloc(), x.min_buckets_for_size(x.size_));
+            if(x.size_) x.copy_buckets_to(b1);
+        
+            buckets b2(x.node_alloc(), this->min_buckets_for_size(this->size_));
+            if(this->size_) copy_buckets_to(b2);
+        
+            // Modifying the data, so no throw from now on.
+        
+            b1.swap(*this);
+            b2.swap(x);
+            op1.commit();
+            op2.commit();
+        }
+        
+        std::swap(this->size_, x.size_);
+
+        if(this->buckets_) this->init_buckets();
+        if(x.buckets_) x.init_buckets();
+    }
+
+    template <class T>
+    void hash_table<T>::swap(hash_table& x)
+    {
+        if(this->node_alloc() == x.node_alloc()) {
+            if(this != &x) this->fast_swap(x);
+        }
+        else {
+            this->slow_swap(x);
+        }
+    }
+
+    
+    // Move
+    //
+    // Strong exception safety (might change unused function objects)
+    //
+    // Can throw if hash or predicate object's copy constructor throws
+    // or if allocators are unequal.
+
+    template <class T>
+    void hash_table<T>::move(hash_table& x)
+    {
+        // This can throw, but it only affects the function objects
+        // that aren't in use so it is strongly exception safe, via.
+        // double buffering.
+        set_hash_functions<hasher, key_equal> new_func_this(*this, x);
+
+        if(this->node_alloc() == x.node_alloc()) {
+            this->buckets::move(x); // no throw
+            this->size_ = x.size_;
+            this->cached_begin_bucket_ = x.cached_begin_bucket_;
+            this->max_load_ = x.max_load_;
+            x.size_ = 0;
+        }
+        else {
+            // Create new buckets in separate HASH_TABLE_DATA objects
+            // which will clean up if anything throws an exception.
+            // (all can throw, but with no effect as these are new objects).
+            
+            buckets b(this->node_alloc(), x.min_buckets_for_size(x.size_));
+            if(x.size_) x.copy_buckets_to(b);
+
+            // Start updating the data here, no throw from now on.
+            this->size_ = x.size_;
+            b.swap(*this);
+            this->init_buckets();
+        }
+
+        // We've made it, the rest is no throw.
+        this->mlf_ = x.mlf_;
+        new_func_this.commit();
+    }
+    
+    ////////////////////////////////////////////////////////////////////////////
+    // Reserve & Rehash
+
+    // basic exception safety
+    template <class T>
+    inline void hash_table<T>::create_for_insert(std::size_t size)
+    {
+        this->bucket_count_ = (std::max)(this->bucket_count_,
+            this->min_buckets_for_size(size));
+        this->create_buckets();
+        this->init_buckets();
+    }
+
+    // basic exception safety
+    template <class T>
+    inline bool hash_table<T>::reserve_for_insert(std::size_t size)
+    {
+        if(size >= max_load_) {
+            std::size_t num_buckets
+                = this->min_buckets_for_size((std::max)(size,
+                    this->size_ + (this->size_ >> 1)));
+            if(num_buckets != this->bucket_count_) {
+                rehash_impl(num_buckets);
+                return true;
+            }
+        }
+        
+        return false;
+    }
+
+    // if hash function throws, basic exception safety
+    // strong otherwise.
+
+    template <class T>
+    inline void hash_table<T>::rehash(std::size_t min_buckets)
+    {
+        using namespace std;
+
+        if(!this->size_) {
+            if(this->buckets_) this->delete_buckets();
+            this->bucket_count_ = next_prime(min_buckets);
+        }
+        else {
+            // no throw:
+            min_buckets = next_prime((std::max)(min_buckets,
+                    double_to_size_t(floor(this->size_ / (double) mlf_)) + 1));
+            if(min_buckets != this->bucket_count_) rehash_impl(min_buckets);
+        }
+    }
+
+    // if hash function throws, basic exception safety
+    // strong otherwise
+
+    template <class T>
+    void hash_table<T>
+        ::rehash_impl(std::size_t num_buckets)
+    {    
+        hasher const& hf = this->hash_function();
+        std::size_t size = this->size_;
+        bucket_ptr end = this->get_bucket(this->bucket_count_);
+
+        buckets dst(this->node_alloc(), num_buckets);
+        dst.create_buckets();
+
+        buckets src(this->node_alloc(), this->bucket_count_);
+        src.swap(*this);
+        this->size_ = 0;
+
+        for(bucket_ptr bucket = this->cached_begin_bucket_;
+            bucket != end; ++bucket)
+        {
+            node_ptr group = bucket->next_;
+            while(group) {
+                // Move the first group of equivalent nodes in bucket to dst.
+
+                // This next line throws iff the hash function throws.
+                bucket_ptr dst_bucket = dst.bucket_ptr_from_hash(
+                    hf(get_key_from_ptr(group)));
+
+                node_ptr& next_group = node::next_group(group);
+                bucket->next_ = next_group;
+                next_group = dst_bucket->next_;
+                dst_bucket->next_ = group;
+                group = bucket->next_;
+            }
+        }
+
+        // Swap the new nodes back into the container and setup the local
+        // variables.
+        this->size_ = size;
+        dst.swap(*this);                        // no throw
+        this->init_buckets();
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // copy_buckets_to
+
+    // copy_buckets_to
+    //
+    // basic excpetion safety. If an exception is thrown this will
+    // leave dst partially filled.
+
+    template <class T>
+    void hash_table<T>
+        ::copy_buckets_to(buckets& dst) const
+    {
+        BOOST_ASSERT(this->buckets_ && !dst.buckets_);
+
+        hasher const& hf = this->hash_function();
+        bucket_ptr end = this->get_bucket(this->bucket_count_);
+
+        node_constructor a(dst);
+        dst.create_buckets();
+
+        // no throw:
+        for(bucket_ptr i = this->cached_begin_bucket_; i != end; ++i) {
+            // no throw:
+            for(node_ptr it = i->next_; it;) {
+                // hash function can throw.
+                bucket_ptr dst_bucket = dst.bucket_ptr_from_hash(
+                    hf(get_key_from_ptr(it)));
+                // throws, strong
+
+                node_ptr group_end = node::next_group(it);
+
+                a.construct(node::get_value(it));
+                node_ptr n = a.release();
+                node::add_to_bucket(n, *dst_bucket);
+        
+                for(it = it->next_; it != group_end; it = it->next_) {
+                    a.construct(node::get_value(it));
+                    node::add_after_node(a.release(), n);
+                }
+            }
+        }
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Misc. key methods
+
+    // strong exception safety
+
+    // count
+    //
+    // strong exception safety, no side effects
+
+    template <class T>
+    std::size_t hash_table<T>::count(key_type const& k) const
+    {
+        if(!this->size_) return 0;
+        node_ptr it = find_iterator(k); // throws, strong
+        return BOOST_UNORDERED_BORLAND_BOOL(it) ? node::group_count(it) : 0;
+    }
+
+    // find
+    //
+    // strong exception safety, no side effects
+    template <class T>
+    BOOST_DEDUCED_TYPENAME T::iterator_base
+        hash_table<T>::find(key_type const& k) const
+    {
+        if(!this->size_) return this->end();
+
+        bucket_ptr bucket = this->get_bucket(this->bucket_index(k));
+        node_ptr it = find_iterator(bucket, k);
+
+        if (BOOST_UNORDERED_BORLAND_BOOL(it))
+            return iterator_base(bucket, it);
+        else
+            return this->end();
+    }
+
+    template <class T>
+    template <class Key, class Hash, class Pred>
+    BOOST_DEDUCED_TYPENAME T::iterator_base hash_table<T>::find(Key const& k,
+        Hash const& h, Pred const& eq) const
+    {
+        if(!this->size_) return this->end();
+
+        bucket_ptr bucket = this->get_bucket(h(k) % this->bucket_count_);
+        node_ptr it = find_iterator(bucket, k, eq);
+
+        if (BOOST_UNORDERED_BORLAND_BOOL(it))
+            return iterator_base(bucket, it);
+        else
+            return this->end();
+    }
+
+    template <class T>
+    BOOST_DEDUCED_TYPENAME T::value_type&
+        hash_table<T>::at(key_type const& k) const
+    {
+        if(!this->size_)
+            boost::throw_exception(std::out_of_range("Unable to find key in unordered_map."));
+
+        bucket_ptr bucket = this->get_bucket(this->bucket_index(k));
+        node_ptr it = find_iterator(bucket, k);
+
+        if (!it)
+            boost::throw_exception(std::out_of_range("Unable to find key in unordered_map."));
+
+        return node::get_value(it);
+    }
+
+    // equal_range
+    //
+    // strong exception safety, no side effects
+    template <class T>
+    BOOST_DEDUCED_TYPENAME T::iterator_pair
+        hash_table<T>::equal_range(key_type const& k) const
+    {
+        if(!this->size_)
+            return iterator_pair(this->end(), this->end());
+
+        bucket_ptr bucket = this->get_bucket(this->bucket_index(k));
+        node_ptr it = find_iterator(bucket, k);
+        if (BOOST_UNORDERED_BORLAND_BOOL(it)) {
+            iterator_base first(iterator_base(bucket, it));
+            iterator_base second(first);
+            second.increment_bucket(node::next_group(second.node_));
+            return iterator_pair(first, second);
+        }
+        else {
+            return iterator_pair(this->end(), this->end());
+        }
+    }
+    
+    ////////////////////////////////////////////////////////////////////////////
+    // Erase methods    
+    
+    template <class T>
+    void hash_table<T>::clear()
+    {
+        if(!this->size_) return;
+
+        bucket_ptr end = this->get_bucket(this->bucket_count_);
+        for(bucket_ptr begin = this->buckets_; begin != end; ++begin) {
+            this->clear_bucket(begin);
+        }
+
+        this->size_ = 0;
+        this->cached_begin_bucket_ = end;
+    }
+
+    template <class T>
+    inline std::size_t hash_table<T>::erase_group(
+        node_ptr* it, bucket_ptr bucket)
+    {
+        node_ptr pos = *it;
+        node_ptr end = node::next_group(pos);
+        *it = end;
+        std::size_t count = this->delete_nodes(pos, end);
+        this->size_ -= count;
+        this->recompute_begin_bucket(bucket);
+        return count;
+    }
+    
+    template <class T>
+    std::size_t hash_table<T>::erase_key(key_type const& k)
+    {
+        if(!this->size_) return 0;
+    
+        // No side effects in initial section
+        bucket_ptr bucket = this->get_bucket(this->bucket_index(k));
+        node_ptr* it = this->find_for_erase(bucket, k);
+
+        // No throw.
+        return *it ? this->erase_group(it, bucket) : 0;
+    }
+
+    template <class T>
+    void hash_table<T>::erase(iterator_base r)
+    {
+        BOOST_ASSERT(r.node_);
+        --this->size_;
+        node::unlink_node(*r.bucket_, r.node_);
+        this->delete_node(r.node_);
+        // r has been invalidated but its bucket is still valid
+        this->recompute_begin_bucket(r.bucket_);
+    }
+
+    template <class T>
+    BOOST_DEDUCED_TYPENAME T::iterator_base
+        hash_table<T>::erase_return_iterator(iterator_base r)
+    {
+        BOOST_ASSERT(r.node_);
+        iterator_base next = r;
+        next.increment();
+        --this->size_;
+        node::unlink_node(*r.bucket_, r.node_);
+        this->delete_node(r.node_);
+        // r has been invalidated but its bucket is still valid
+        this->recompute_begin_bucket(r.bucket_, next.bucket_);
+        return next;
+    }
+
+    template <class T>
+    BOOST_DEDUCED_TYPENAME T::iterator_base
+        hash_table<T>::erase_range(
+            iterator_base r1, iterator_base r2)
+    {
+        if(r1 != r2)
+        {
+            BOOST_ASSERT(r1.node_);
+            if (r1.bucket_ == r2.bucket_) {
+                node::unlink_nodes(*r1.bucket_, r1.node_, r2.node_);
+                this->size_ -= this->delete_nodes(r1.node_, r2.node_);
+
+                // No need to call recompute_begin_bucket because
+                // the nodes are only deleted from one bucket, which
+                // still contains r2 after the erase.
+                 BOOST_ASSERT(r1.bucket_->next_);
+            }
+            else {
+                bucket_ptr end_bucket = r2.node_ ?
+                    r2.bucket_ : this->get_bucket(this->bucket_count_);
+                BOOST_ASSERT(r1.bucket_ < end_bucket);
+                node::unlink_nodes(*r1.bucket_, r1.node_, node_ptr());
+                this->size_ -= this->delete_nodes(r1.node_, node_ptr());
+
+                bucket_ptr i = r1.bucket_;
+                for(++i; i != end_bucket; ++i) {
+                    this->size_ -= this->delete_nodes(i->next_, node_ptr());
+                    i->next_ = node_ptr();
+                }
+
+                if(r2.node_) {
+                    node_ptr first = r2.bucket_->next_;
+                    node::unlink_nodes(*r2.bucket_, r2.node_);
+                    this->size_ -= this->delete_nodes(first, r2.node_);
+                }
+
+                // r1 has been invalidated but its bucket is still
+                // valid.
+                this->recompute_begin_bucket(r1.bucket_, end_bucket);
+            }
+        }
+
+        return r2;
+    }
+
+    template <class T>
+    BOOST_DEDUCED_TYPENAME hash_table<T>::iterator_base
+        hash_table<T>::emplace_empty_impl_with_node(
+            node_constructor& a, std::size_t size)
+    {
+        key_type const& k = get_key(a.value());
+        std::size_t hash_value = this->hash_function()(k);
+        if(this->buckets_) this->reserve_for_insert(size);
+        else this->create_for_insert(size);
+        bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
+        node_ptr n = a.release();
+        node::add_to_bucket(n, *bucket);
+        ++this->size_;
+        this->cached_begin_bucket_ = bucket;
+        return iterator_base(bucket, n);
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/unordered/detail/unique.hpp b/deal.II/contrib/boost/include/boost/unordered/detail/unique.hpp
new file mode 100644 (file)
index 0000000..59920d0
--- /dev/null
@@ -0,0 +1,387 @@
+
+// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
+// Copyright (C) 2005-2009 Daniel James
+// 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)
+
+#ifndef BOOST_UNORDERED_DETAIL_UNIQUE_HPP_INCLUDED
+#define BOOST_UNORDERED_DETAIL_UNIQUE_HPP_INCLUDED
+
+#include <boost/unordered/detail/table.hpp>
+#include <boost/unordered/detail/extract_key.hpp>
+
+namespace boost { namespace unordered_detail {
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Equality
+
+    template <class T>
+    bool hash_unique_table<T>
+        ::equals(hash_unique_table<T> const& other) const
+    {
+        if(this->size_ != other.size_) return false;
+        if(!this->size_) return true;
+
+        bucket_ptr end = this->get_bucket(this->bucket_count_);
+        for(bucket_ptr i = this->cached_begin_bucket_; i != end; ++i)
+        {
+            node_ptr it1 = i->next_;
+            while(BOOST_UNORDERED_BORLAND_BOOL(it1))
+            {
+                node_ptr it2 = other.find_iterator(this->get_key_from_ptr(it1));
+                if(!BOOST_UNORDERED_BORLAND_BOOL(it2)) return false;
+                if(!extractor::compare_mapped(
+                    node::get_value(it1), node::get_value(it2)))
+                    return false;
+                it1 = it1->next_;
+            }
+        }
+
+        return true;
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // A convenience method for adding nodes.
+
+    template <class T>
+    inline BOOST_DEDUCED_TYPENAME hash_unique_table<T>::node_ptr
+        hash_unique_table<T>::add_node(node_constructor& a,
+            bucket_ptr bucket)
+    {
+        node_ptr n = a.release();
+        node::add_to_bucket(n, *bucket);
+        ++this->size_;
+        if(bucket < this->cached_begin_bucket_)
+            this->cached_begin_bucket_ = bucket;
+        return n;
+    }
+        
+    ////////////////////////////////////////////////////////////////////////////
+    // Insert methods
+
+    // if hash function throws, basic exception safety
+    // strong otherwise
+    template <class T>
+    BOOST_DEDUCED_TYPENAME hash_unique_table<T>::value_type&
+        hash_unique_table<T>::operator[](key_type const& k)
+    {
+        typedef BOOST_DEDUCED_TYPENAME value_type::second_type mapped_type;
+
+        std::size_t hash_value = this->hash_function()(k);
+        bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
+        
+        if(!this->buckets_) {
+            node_constructor a(*this);
+            a.construct_pair(k, (mapped_type*) 0);
+            return *this->emplace_empty_impl_with_node(a, 1);
+        }
+
+        node_ptr pos = this->find_iterator(bucket, k);
+
+        if (BOOST_UNORDERED_BORLAND_BOOL(pos)) {
+            return node::get_value(pos);
+        }
+        else {
+            // Side effects only in this block.
+
+            // Create the node before rehashing in case it throws an
+            // exception (need strong safety in such a case).
+            node_constructor a(*this);
+            a.construct_pair(k, (mapped_type*) 0);
+
+            // reserve has basic exception safety if the hash function
+            // throws, strong otherwise.
+            if(this->reserve_for_insert(this->size_ + 1))
+                bucket = this->bucket_ptr_from_hash(hash_value);
+
+            // Nothing after this point can throw.
+
+            return node::get_value(add_node(a, bucket));
+        }
+    }
+
+    template <class T>
+    inline BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return
+    hash_unique_table<T>::emplace_impl_with_node(node_constructor& a)
+    {
+        // No side effects in this initial code
+        key_type const& k = this->get_key(a.value());
+        std::size_t hash_value = this->hash_function()(k);
+        bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
+        node_ptr pos = this->find_iterator(bucket, k);
+        
+        if (BOOST_UNORDERED_BORLAND_BOOL(pos)) {
+            // Found an existing key, return it (no throw).
+            return emplace_return(iterator_base(bucket, pos), false);
+        } else {
+            // reserve has basic exception safety if the hash function
+            // throws, strong otherwise.
+            if(this->reserve_for_insert(this->size_ + 1))
+                bucket = this->bucket_ptr_from_hash(hash_value);
+
+            // Nothing after this point can throw.
+
+            return emplace_return(
+                iterator_base(bucket, add_node(a, bucket)),
+                true);
+        }
+    }
+
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+
+    template <class T>
+    template<class... Args>
+    inline BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return
+        hash_unique_table<T>::emplace_impl(key_type const& k,
+            Args&&... args)
+    {
+        // No side effects in this initial code
+        std::size_t hash_value = this->hash_function()(k);
+        bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
+        node_ptr pos = this->find_iterator(bucket, k);
+
+        if (BOOST_UNORDERED_BORLAND_BOOL(pos)) {
+            // Found an existing key, return it (no throw).
+            return emplace_return(iterator_base(bucket, pos), false);
+
+        } else {
+            // Doesn't already exist, add to bucket.
+            // Side effects only in this block.
+
+            // Create the node before rehashing in case it throws an
+            // exception (need strong safety in such a case).
+            node_constructor a(*this);
+            a.construct(std::forward<Args>(args)...);
+
+            // reserve has basic exception safety if the hash function
+            // throws, strong otherwise.
+            if(this->reserve_for_insert(this->size_ + 1))
+                bucket = this->bucket_ptr_from_hash(hash_value);
+
+            // Nothing after this point can throw.
+
+            return emplace_return(
+                iterator_base(bucket, add_node(a, bucket)),
+                true);
+        }
+    }
+
+    template <class T>
+    template<class... Args>
+    inline BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return
+        hash_unique_table<T>::emplace_impl(no_key, Args&&... args)
+    {
+        // Construct the node regardless - in order to get the key.
+        // It will be discarded if it isn't used
+        node_constructor a(*this);
+        a.construct(std::forward<Args>(args)...);
+        return emplace_impl_with_node(a);
+    }
+
+    template <class T>
+    template<class... Args>
+    inline BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return
+        hash_unique_table<T>::emplace_empty_impl(Args&&... args)
+    {
+        node_constructor a(*this);
+        a.construct(std::forward<Args>(args)...);
+        return emplace_return(this->emplace_empty_impl_with_node(a, 1), true);
+    }
+
+#else
+
+#define BOOST_UNORDERED_INSERT_IMPL(z, num_params, _)                          \
+    template <class T>                                                         \
+    template <BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)>                    \
+    inline BOOST_DEDUCED_TYPENAME                                              \
+        hash_unique_table<T>::emplace_return                                   \
+            hash_unique_table<T>::emplace_impl(                                \
+                key_type const& k,                                             \
+                BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params))                \
+    {                                                                          \
+        std::size_t hash_value = this->hash_function()(k);                     \
+        bucket_ptr bucket                                                      \
+            = this->bucket_ptr_from_hash(hash_value);                          \
+        node_ptr pos = this->find_iterator(bucket, k);                         \
+                                                                               \
+        if (BOOST_UNORDERED_BORLAND_BOOL(pos)) {                               \
+            return emplace_return(iterator_base(bucket, pos), false);          \
+        } else {                                                               \
+            node_constructor a(*this);                                         \
+            a.construct(BOOST_UNORDERED_CALL_PARAMS(z, num_params));           \
+                                                                               \
+            if(this->reserve_for_insert(this->size_ + 1))                      \
+                bucket = this->bucket_ptr_from_hash(hash_value);               \
+                                                                               \
+            return emplace_return(iterator_base(bucket,                        \
+                add_node(a, bucket)), true);                                   \
+        }                                                                      \
+    }                                                                          \
+                                                                               \
+    template <class T>                                                         \
+    template <BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)>                    \
+    inline BOOST_DEDUCED_TYPENAME                                              \
+        hash_unique_table<T>::emplace_return                                   \
+            hash_unique_table<T>::                                             \
+                emplace_impl(no_key,                                           \
+                    BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params))            \
+    {                                                                          \
+        node_constructor a(*this);                                             \
+        a.construct(BOOST_UNORDERED_CALL_PARAMS(z, num_params));               \
+        return emplace_impl_with_node(a);                                      \
+    }                                                                          \
+                                                                               \
+    template <class T>                                                         \
+    template <BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)>                    \
+    inline BOOST_DEDUCED_TYPENAME                                              \
+        hash_unique_table<T>::emplace_return                                   \
+            hash_unique_table<T>::                                             \
+                emplace_empty_impl(                                            \
+                    BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params))            \
+    {                                                                          \
+        node_constructor a(*this);                                             \
+        a.construct(BOOST_UNORDERED_CALL_PARAMS(z, num_params));               \
+        return emplace_return(this->emplace_empty_impl_with_node(a, 1), true); \
+    }
+
+    BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT,
+        BOOST_UNORDERED_INSERT_IMPL, _)
+
+#undef BOOST_UNORDERED_INSERT_IMPL
+
+#endif
+
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+
+    // Emplace (unique keys)
+    // (I'm using an overloaded emplace for both 'insert' and 'emplace')
+
+    // if hash function throws, basic exception safety
+    // strong otherwise
+
+    template <class T>
+    template<class... Args>
+    BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return
+        hash_unique_table<T>::emplace(Args&&... args)
+    {
+        return this->size_ ?
+            emplace_impl(
+                extractor::extract(std::forward<Args>(args)...),
+                std::forward<Args>(args)...) :
+            emplace_empty_impl(std::forward<Args>(args)...);
+    }
+
+#else
+
+    template <class T>
+    template <class Arg0>
+    BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return
+        hash_unique_table<T>::emplace(Arg0 const& arg0)
+    {
+        return this->size_ ?
+            emplace_impl(extractor::extract(arg0), arg0) :
+            emplace_empty_impl(arg0);
+    }
+
+#define BOOST_UNORDERED_INSERT_IMPL(z, num_params, _)                          \
+    template <class T>                                                         \
+    template <BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)>                    \
+    BOOST_DEDUCED_TYPENAME hash_unique_table<T>::emplace_return                \
+        hash_unique_table<T>::emplace(                                         \
+            BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params))                    \
+    {                                                                          \
+        return this->size_ ?                                                   \
+            emplace_impl(extractor::extract(arg0, arg1),                       \
+                BOOST_UNORDERED_CALL_PARAMS(z, num_params)) :                  \
+            emplace_empty_impl(                                                \
+                BOOST_UNORDERED_CALL_PARAMS(z, num_params));                   \
+    }
+
+    BOOST_PP_REPEAT_FROM_TO(2, BOOST_UNORDERED_EMPLACE_LIMIT,
+        BOOST_UNORDERED_INSERT_IMPL, _)
+
+#undef BOOST_UNORDERED_INSERT_IMPL
+
+#endif
+    
+    ////////////////////////////////////////////////////////////////////////////
+    // Insert range methods
+
+    template <class T>
+    template <class InputIt>
+    inline void hash_unique_table<T>::insert_range_impl(
+        key_type const&, InputIt i, InputIt j)
+    {
+        node_constructor a(*this);
+
+        if(!this->size_) {
+            a.construct(*i);
+            this->emplace_empty_impl_with_node(a, 1);
+            ++i;
+            if(i == j) return;
+        }
+
+        do {
+            // No side effects in this initial code
+            // Note: can't use get_key as '*i' might not be value_type - it
+            // could be a pair with first_types as key_type without const or a
+            // different second_type.
+            key_type const& k = extractor::extract(*i);
+            std::size_t hash_value = this->hash_function()(k);
+            bucket_ptr bucket = this->bucket_ptr_from_hash(hash_value);
+            node_ptr pos = this->find_iterator(bucket, k);
+
+            if (!BOOST_UNORDERED_BORLAND_BOOL(pos)) {
+                // Doesn't already exist, add to bucket.
+                // Side effects only in this block.
+
+                // Create the node before rehashing in case it throws an
+                // exception (need strong safety in such a case).
+                a.construct(*i);
+
+                // reserve has basic exception safety if the hash function
+                // throws, strong otherwise.
+                if(this->size_ + 1 >= this->max_load_) {
+                    this->reserve_for_insert(this->size_ + insert_size(i, j));
+                    bucket = this->bucket_ptr_from_hash(hash_value);
+                }
+
+                // Nothing after this point can throw.
+                add_node(a, bucket);
+            }
+        } while(++i != j);
+    }
+
+    template <class T>
+    template <class InputIt>
+    inline void hash_unique_table<T>::insert_range_impl(
+        no_key, InputIt i, InputIt j)
+    {
+        node_constructor a(*this);
+
+        if(!this->size_) {
+            a.construct(*i);
+            this->emplace_empty_impl_with_node(a, 1);
+            ++i;
+            if(i == j) return;
+        }
+
+        do {
+            // No side effects in this initial code
+            a.construct(*i);
+            emplace_impl_with_node(a);
+        } while(++i != j);
+    }
+
+    // if hash function throws, or inserting > 1 element, basic exception safety
+    // strong otherwise
+    template <class T>
+    template <class InputIt>
+    void hash_unique_table<T>::insert_range(InputIt i, InputIt j)
+    {
+        if(i != j)
+            return insert_range_impl(extractor::extract(*i), i, j);
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/unordered/detail/util.hpp b/deal.II/contrib/boost/include/boost/unordered/detail/util.hpp
new file mode 100644 (file)
index 0000000..5540965
--- /dev/null
@@ -0,0 +1,331 @@
+
+// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
+// Copyright (C) 2005-2009 Daniel James
+// 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)
+
+#ifndef BOOST_UNORDERED_DETAIL_UTIL_HPP_INCLUDED
+#define BOOST_UNORDERED_DETAIL_UTIL_HPP_INCLUDED
+
+#include <cstddef>
+#include <utility>
+#include <algorithm>
+#include <boost/limits.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/unordered/detail/fwd.hpp>
+
+namespace boost { namespace unordered_detail {
+
+    ////////////////////////////////////////////////////////////////////////////
+    // convert double to std::size_t
+
+    inline std::size_t double_to_size_t(double f)
+    {
+        return f >= static_cast<double>(
+            (std::numeric_limits<std::size_t>::max)()) ?
+            (std::numeric_limits<std::size_t>::max)() :
+            static_cast<std::size_t>(f);
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // primes
+
+#define BOOST_UNORDERED_PRIMES \
+    (5ul)(11ul)(17ul)(29ul)(37ul)(53ul)(67ul)(79ul) \
+    (97ul)(131ul)(193ul)(257ul)(389ul)(521ul)(769ul) \
+    (1031ul)(1543ul)(2053ul)(3079ul)(6151ul)(12289ul)(24593ul) \
+    (49157ul)(98317ul)(196613ul)(393241ul)(786433ul) \
+    (1572869ul)(3145739ul)(6291469ul)(12582917ul)(25165843ul) \
+    (50331653ul)(100663319ul)(201326611ul)(402653189ul)(805306457ul) \
+    (1610612741ul)(3221225473ul)(4294967291ul)
+
+    template<class T> struct prime_list_template
+    {
+        static std::size_t const value[];
+
+#if !defined(SUNPRO_CC)
+        static std::ptrdiff_t const length;
+#else
+        static std::ptrdiff_t const length
+            = BOOST_PP_SEQ_SIZE(BOOST_UNORDERED_PRIMES);
+#endif
+    };
+
+    template<class T>
+    std::size_t const prime_list_template<T>::value[] = {
+        BOOST_PP_SEQ_ENUM(BOOST_UNORDERED_PRIMES)
+    };
+
+#if !defined(SUNPRO_CC)
+    template<class T>
+    std::ptrdiff_t const prime_list_template<T>::length
+        = BOOST_PP_SEQ_SIZE(BOOST_UNORDERED_PRIMES);
+#endif
+
+#undef BOOST_UNORDERED_PRIMES
+
+    typedef prime_list_template<std::size_t> prime_list;
+
+    // no throw
+    inline std::size_t next_prime(std::size_t num) {
+        std::size_t const* const prime_list_begin = prime_list::value;
+        std::size_t const* const prime_list_end = prime_list_begin +
+            prime_list::length;
+        std::size_t const* bound =
+            std::lower_bound(prime_list_begin, prime_list_end, num);
+        if(bound == prime_list_end)
+            bound--;
+        return *bound;
+    }
+
+    // no throw
+    inline std::size_t prev_prime(std::size_t num) {
+        std::size_t const* const prime_list_begin = prime_list::value;
+        std::size_t const* const prime_list_end = prime_list_begin +
+            prime_list::length;
+        std::size_t const* bound =
+            std::upper_bound(prime_list_begin,prime_list_end, num);
+        if(bound != prime_list_begin)
+            bound--;
+        return *bound;
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // pair_cast - because some libraries don't have the full pair constructors.
+
+    template <class Dst1, class Dst2, class Src1, class Src2>
+    inline std::pair<Dst1, Dst2> pair_cast(std::pair<Src1, Src2> const& x)
+    {
+        return std::pair<Dst1, Dst2>(Dst1(x.first), Dst2(x.second));
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // insert_size/initial_size
+
+#if !defined(BOOST_NO_STD_DISTANCE)
+    using ::std::distance;
+#else
+    template <class ForwardIterator>
+    inline std::size_t distance(ForwardIterator i, ForwardIterator j) {
+        std::size_t x;
+        std::distance(i, j, x);
+        return x;
+    }
+#endif
+
+    template <class I>
+    inline std::size_t insert_size(I i, I j, boost::forward_traversal_tag)
+    {
+        return std::distance(i, j);
+    }
+
+    template <class I>
+    inline std::size_t insert_size(I, I, boost::incrementable_traversal_tag)
+    {
+        return 1;
+    }
+
+    template <class I>
+    inline std::size_t insert_size(I i, I j)
+    {
+        BOOST_DEDUCED_TYPENAME boost::iterator_traversal<I>::type
+            iterator_traversal_tag;
+        return insert_size(i, j, iterator_traversal_tag);
+    }
+    
+    template <class I>
+    inline std::size_t initial_size(I i, I j,
+        std::size_t num_buckets = boost::unordered_detail::default_bucket_count)
+    {
+        return (std::max)(static_cast<std::size_t>(insert_size(i, j)) + 1,
+            num_buckets);
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    // Node Constructors
+
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+
+    template <class T, class... Args>
+    inline void construct_impl(T*, void* address, Args&&... args)
+    {
+        new(address) T(std::forward<Args>(args)...);
+    }
+
+#if defined(BOOST_UNORDERED_CPP0X_PAIR)
+    template <class First, class Second, class Key, class Arg0, class... Args>
+    inline void construct_impl(std::pair<First, Second>*, void* address,
+        Key&& k, Arg0&& arg0, Args&&... args)
+    )
+    {
+        new(address) std::pair<First, Second>(k,
+            Second(arg0, std::forward<Args>(args)...);
+    }
+#endif
+
+#else
+
+#define BOOST_UNORDERED_CONSTRUCT_IMPL(z, num_params, _)                       \
+    template <                                                                 \
+        class T,                                                               \
+        BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)                           \
+    >                                                                          \
+    inline void construct_impl(                                                \
+        T*, void* address,                                                     \
+        BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params)                         \
+    )                                                                          \
+    {                                                                          \
+        new(address) T(                                                        \
+            BOOST_UNORDERED_CALL_PARAMS(z, num_params));                       \
+    }                                                                          \
+                                                                               \
+    template <class First, class Second, class Key,                            \
+        BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)                           \
+    >                                                                          \
+    inline void construct_impl(                                                \
+        std::pair<First, Second>*, void* address,                              \
+        Key const& k, BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params))          \
+    {                                                                          \
+        new(address) std::pair<First, Second>(k,                               \
+            Second(BOOST_UNORDERED_CALL_PARAMS(z, num_params)));               \
+    }
+
+    BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT,
+        BOOST_UNORDERED_CONSTRUCT_IMPL, _)
+
+#undef BOOST_UNORDERED_CONSTRUCT_IMPL
+#endif
+
+    // hash_node_constructor
+    //
+    // Used to construct nodes in an exception safe manner.
+
+    template <class Alloc, class Grouped>
+    class hash_node_constructor
+    {
+        typedef hash_buckets<Alloc, Grouped> buckets;
+        typedef BOOST_DEDUCED_TYPENAME buckets::node node;
+        typedef BOOST_DEDUCED_TYPENAME buckets::real_node_ptr real_node_ptr;
+        typedef BOOST_DEDUCED_TYPENAME buckets::value_type value_type;
+
+        buckets& buckets_;
+        real_node_ptr node_;
+        bool node_constructed_;
+        bool value_constructed_;
+
+    public:
+
+        hash_node_constructor(buckets& m) :
+            buckets_(m),
+            node_(),
+            node_constructed_(false),
+            value_constructed_(false)
+        {
+        }
+
+        ~hash_node_constructor();
+        void construct_preamble();
+
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+        template <class... Args>
+        void construct(Args&&... args)
+        {
+            construct_preamble();
+            construct_impl((value_type*) 0, node_->address(),
+                std::forward<Args>(args)...);
+            value_constructed_ = true;
+        }
+#else
+
+#define BOOST_UNORDERED_CONSTRUCT(z, num_params, _)                            \
+        template <                                                             \
+            BOOST_UNORDERED_TEMPLATE_ARGS(z, num_params)                       \
+        >                                                                      \
+        void construct(                                                        \
+            BOOST_UNORDERED_FUNCTION_PARAMS(z, num_params)                     \
+        )                                                                      \
+        {                                                                      \
+            construct_preamble();                                              \
+            construct_impl(                                                    \
+                (value_type*) 0, node_->address(),                             \
+                BOOST_UNORDERED_CALL_PARAMS(z, num_params)                     \
+            );                                                                 \
+            value_constructed_ = true;                                         \
+        }
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT,
+            BOOST_UNORDERED_CONSTRUCT, _)
+
+#undef BOOST_UNORDERED_CONSTRUCT
+
+#endif
+        template <class K, class M>
+        void construct_pair(K const& k, M*)
+        {
+            construct_preamble();
+            new(node_->address()) value_type(k, M());                    
+            value_constructed_ = true;
+        }
+
+        value_type& value() const
+        {
+            BOOST_ASSERT(node_);
+            return node_->value();
+        }
+
+        // no throw
+        BOOST_DEDUCED_TYPENAME buckets::node_ptr release()
+        {
+            real_node_ptr p = node_;
+            node_ = real_node_ptr();
+            // node_ptr cast
+            return buckets_.bucket_alloc().address(*p);
+        }
+
+    private:
+        hash_node_constructor(hash_node_constructor const&);
+        hash_node_constructor& operator=(hash_node_constructor const&);
+    };
+    
+    // hash_node_constructor
+
+    template <class Alloc, class Grouped>
+    inline hash_node_constructor<Alloc, Grouped>::~hash_node_constructor()
+    {
+        if (node_) {
+            if (value_constructed_) {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+                struct dummy { hash_node<Alloc, Grouped> x; };
+#endif
+                boost::unordered_detail::destroy(&node_->value());
+            }
+
+            if (node_constructed_)
+                buckets_.node_alloc().destroy(node_);
+
+            buckets_.node_alloc().deallocate(node_, 1);
+        }
+    }
+
+    template <class Alloc, class Grouped>
+    inline void hash_node_constructor<Alloc, Grouped>::construct_preamble()
+    {
+        if(!node_) {
+            node_constructed_ = false;
+            value_constructed_ = false;
+
+            node_ = buckets_.node_alloc().allocate(1);
+            buckets_.node_alloc().construct(node_, node());
+            node_constructed_ = true;
+        }
+        else {
+            BOOST_ASSERT(node_constructed_ && value_constructed_);
+            boost::unordered_detail::destroy(&node_->value());
+            value_constructed_ = false;
+        }
+    }
+}}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/unordered/unordered_map.hpp b/deal.II/contrib/boost/include/boost/unordered/unordered_map.hpp
new file mode 100644 (file)
index 0000000..5bad0eb
--- /dev/null
@@ -0,0 +1,1118 @@
+
+// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
+// Copyright (C) 2005-2009 Daniel James.
+// 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 http://www.boost.org/libs/unordered for documentation
+
+#ifndef BOOST_UNORDERED_UNORDERED_MAP_HPP_INCLUDED
+#define BOOST_UNORDERED_UNORDERED_MAP_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/unordered/unordered_map_fwd.hpp>
+#include <boost/functional/hash.hpp>
+#include <boost/unordered/detail/allocator_helpers.hpp>
+#include <boost/unordered/detail/equivalent.hpp>
+#include <boost/unordered/detail/unique.hpp>
+
+#if defined(BOOST_NO_RVALUE_REFERENCES)
+#include <boost/unordered/detail/move.hpp>
+#endif
+
+#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#if BOOST_MSVC >= 1400
+#pragma warning(disable:4396) //the inline specifier cannot be used when a
+                              // friend declaration refers to a specialization
+                              // of a function template
+#endif
+#endif
+
+namespace boost
+{
+    template <class K, class T, class H, class P, class A>
+    class unordered_map
+    {
+    public:
+        typedef K key_type;
+        typedef std::pair<const K, T> value_type;
+        typedef T mapped_type;
+        typedef H hasher;
+        typedef P key_equal;
+        typedef A allocator_type;
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+    private:
+#endif
+
+        typedef BOOST_DEDUCED_TYPENAME
+            boost::unordered_detail::rebind_wrap<
+                allocator_type, value_type>::type
+            value_allocator;
+
+        typedef boost::unordered_detail::map<K, H, P,
+            value_allocator> types;
+        typedef BOOST_DEDUCED_TYPENAME types::impl table;
+
+        typedef BOOST_DEDUCED_TYPENAME types::iterator_base iterator_base;
+
+    public:
+
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::pointer pointer;
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::const_pointer const_pointer;
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::reference reference;
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::const_reference const_reference;
+
+        typedef std::size_t size_type;
+        typedef std::ptrdiff_t difference_type;
+
+        typedef boost::unordered_detail::hash_const_local_iterator<
+            value_allocator, boost::unordered_detail::ungrouped>
+                const_local_iterator;
+        typedef boost::unordered_detail::hash_local_iterator<
+            value_allocator, boost::unordered_detail::ungrouped>
+                local_iterator;
+        typedef boost::unordered_detail::hash_const_iterator<
+            value_allocator, boost::unordered_detail::ungrouped>
+                const_iterator;
+        typedef boost::unordered_detail::hash_iterator<
+            value_allocator, boost::unordered_detail::ungrouped>
+                iterator;
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+    private:
+#endif
+
+        table table_;
+        
+        BOOST_DEDUCED_TYPENAME types::iterator_base const&
+            get(const_iterator const& it)
+        {
+            return boost::unordered_detail::iterator_access::get(it);
+        }
+
+    public:
+
+        // construct/destroy/copy
+
+        explicit unordered_map(
+                size_type n = boost::unordered_detail::default_bucket_count,
+                const hasher &hf = hasher(),
+                const key_equal &eql = key_equal(),
+                const allocator_type &a = allocator_type())
+          : table_(n, hf, eql, a)
+        {
+        }
+
+        explicit unordered_map(allocator_type const& a)
+          : table_(boost::unordered_detail::default_bucket_count,
+                hasher(), key_equal(), a)
+        {
+        }
+
+        unordered_map(unordered_map const& other, allocator_type const& a)
+          : table_(other.table_, a)
+        {
+        }
+
+        template <class InputIt>
+        unordered_map(InputIt f, InputIt l)
+          : table_(boost::unordered_detail::initial_size(f, l),
+                hasher(), key_equal(), allocator_type())
+        {
+            table_.insert_range(f, l);
+        }
+
+        template <class InputIt>
+        unordered_map(InputIt f, InputIt l,
+                size_type n,
+                const hasher &hf = hasher(),
+                const key_equal &eql = key_equal())
+          : table_(boost::unordered_detail::initial_size(f, l, n),
+                hf, eql, allocator_type())
+        {
+            table_.insert_range(f, l);
+        }
+
+        template <class InputIt>
+        unordered_map(InputIt f, InputIt l,
+                size_type n,
+                const hasher &hf,
+                const key_equal &eql,
+                const allocator_type &a)
+          : table_(boost::unordered_detail::initial_size(f, l, n), hf, eql, a)
+        {
+            table_.insert_range(f, l);
+        }
+
+        ~unordered_map() {}
+
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
+        unordered_map(unordered_map&& other)
+          : table_(other.table_, boost::unordered_detail::move_tag())
+        {
+        }
+
+        unordered_map(unordered_map&& other, allocator_type const& a)
+          : table_(other.table_, a, boost::unordered_detail::move_tag())
+        {
+        }
+
+        unordered_map& operator=(unordered_map&& x)
+        {
+            table_.move(x.table_);
+            return *this;
+        }
+#else
+        unordered_map(boost::unordered_detail::move_from<
+                unordered_map<K, T, H, P, A>
+            > other)
+          : table_(other.source.table_, boost::unordered_detail::move_tag())
+        {
+        }
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0593)
+        unordered_map& operator=(unordered_map x)
+        {
+            table_.move(x.table_);
+            return *this;
+        }
+#endif
+#endif
+
+#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
+        unordered_map(std::initializer_list<value_type> list,
+                size_type n = boost::unordered_detail::default_bucket_count,
+                const hasher &hf = hasher(),
+                const key_equal &eql = key_equal(),
+                const allocator_type &a = allocator_type())
+          : table_(boost::unordered_detail::initial_size(
+                    list.begin(), list.end(), n),
+                hf, eql, a)
+        {
+            table_.insert_range(list.begin(), list.end());
+        }
+
+        unordered_map& operator=(std::initializer_list<value_type> list)
+        {
+            table_.clear();
+            table_.insert_range(list.begin(), list.end());
+            return *this;
+        }
+#endif
+
+        allocator_type get_allocator() const
+        {
+            return table_.node_alloc();
+        }
+
+        // size and capacity
+
+        bool empty() const
+        {
+            return table_.size_ == 0;
+        }
+
+        size_type size() const
+        {
+            return table_.size_;
+        }
+
+        size_type max_size() const
+        {
+            return table_.max_size();
+        }
+
+        // iterators
+
+        iterator begin()
+        {
+            return iterator(table_.begin());
+        }
+
+        const_iterator begin() const
+        {
+            return const_iterator(table_.begin());
+        }
+
+        iterator end()
+        {
+            return iterator(table_.end());
+        }
+
+        const_iterator end() const
+        {
+            return const_iterator(table_.end());
+        }
+
+        const_iterator cbegin() const
+        {
+            return const_iterator(table_.begin());
+        }
+
+        const_iterator cend() const
+        {
+            return const_iterator(table_.end());
+        }
+
+        // modifiers
+
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+        template <class... Args>
+        std::pair<iterator, bool> emplace(Args&&... args)
+        {
+            return boost::unordered_detail::pair_cast<iterator, bool>(
+                table_.emplace(std::forward<Args>(args)...));
+        }
+
+        template <class... Args>
+        iterator emplace_hint(const_iterator, Args&&... args)
+        {
+            return iterator(table_.emplace(std::forward<Args>(args)...).first);
+        }
+#else
+
+        #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
+        std::pair<iterator, bool> emplace(value_type const& v = value_type())
+        {
+            return boost::unordered_detail::pair_cast<iterator, bool>(
+                table_.emplace(v));
+        }
+
+        iterator emplace_hint(const_iterator,
+            value_type const& v = value_type())
+        {
+            return iterator(table_.emplace(v).first);
+        }
+        #endif
+
+#define BOOST_UNORDERED_EMPLACE(z, n, _)                                       \
+            template <                                                         \
+                BOOST_UNORDERED_TEMPLATE_ARGS(z, n)                            \
+            >                                                                  \
+            std::pair<iterator, bool> emplace(                                 \
+                BOOST_UNORDERED_FUNCTION_PARAMS(z, n)                          \
+            )                                                                  \
+            {                                                                  \
+                return boost::unordered_detail::pair_cast<iterator, bool>(     \
+                    table_.emplace(                                            \
+                        BOOST_UNORDERED_CALL_PARAMS(z, n)                      \
+                    ));                                                        \
+            }                                                                  \
+                                                                               \
+            template <                                                         \
+                BOOST_UNORDERED_TEMPLATE_ARGS(z, n)                            \
+            >                                                                  \
+            iterator emplace_hint(const_iterator,                              \
+                BOOST_UNORDERED_FUNCTION_PARAMS(z, n)                          \
+            )                                                                  \
+            {                                                                  \
+                return iterator(table_.emplace(                                \
+                    BOOST_UNORDERED_CALL_PARAMS(z, n)).first);                 \
+            }
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT,
+            BOOST_UNORDERED_EMPLACE, _)
+
+#undef BOOST_UNORDERED_EMPLACE
+
+#endif
+
+        std::pair<iterator, bool> insert(const value_type& obj)
+        {
+            return boost::unordered_detail::pair_cast<iterator, bool>(
+                    table_.emplace(obj));
+        }
+
+        iterator insert(const_iterator, const value_type& obj)
+        {
+            return iterator(table_.emplace(obj).first);
+        }
+
+        template <class InputIt>
+            void insert(InputIt first, InputIt last)
+        {
+            table_.insert_range(first, last);
+        }
+
+#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
+        void insert(std::initializer_list<value_type> list)
+        {
+            table_.insert_range(list.begin(), list.end());
+        }
+#endif
+
+        iterator erase(const_iterator position)
+        {
+            return iterator(table_.erase_return_iterator(get(position)));
+        }
+
+        size_type erase(const key_type& k)
+        {
+            return table_.erase_key(k);
+        }
+
+        iterator erase(const_iterator first, const_iterator last)
+        {
+            return iterator(table_.erase_range(get(first), get(last)));
+        }
+
+        void quick_erase(const_iterator position)
+        {
+            table_.erase(get(position));
+        }
+
+        void erase_return_void(const_iterator position)
+        {
+            table_.erase(get(position));
+        }
+
+        void clear()
+        {
+            table_.clear();
+        }
+
+        void swap(unordered_map& other)
+        {
+            table_.swap(other.table_);
+        }
+
+        // observers
+
+        hasher hash_function() const
+        {
+            return table_.hash_function();
+        }
+
+        key_equal key_eq() const
+        {
+            return table_.key_eq();
+        }
+
+        mapped_type& operator[](const key_type &k)
+        {
+            return table_[k].second;
+        }
+
+        mapped_type& at(const key_type& k)
+        {
+            return table_.at(k).second;
+        }
+
+        mapped_type const& at(const key_type& k) const
+        {
+            return table_.at(k).second;
+        }
+
+        // lookup
+
+        iterator find(const key_type& k)
+        {
+            return iterator(table_.find(k));
+        }
+
+        const_iterator find(const key_type& k) const
+        {
+            return const_iterator(table_.find(k));
+        }
+
+        template <class CompatibleKey, class CompatibleHash,
+            class CompatiblePredicate>
+        iterator find(
+            CompatibleKey const& k,
+            CompatibleHash const& hash,
+            CompatiblePredicate const& eq)
+        {
+            return iterator(table_.find(k, hash, eq));
+        }
+
+        template <class CompatibleKey, class CompatibleHash,
+            class CompatiblePredicate>
+        const_iterator find(
+            CompatibleKey const& k,
+            CompatibleHash const& hash,
+            CompatiblePredicate const& eq) const
+        {
+            return iterator(table_.find(k, hash, eq));
+        }
+
+        size_type count(const key_type& k) const
+        {
+            return table_.count(k);
+        }
+
+        std::pair<iterator, iterator>
+            equal_range(const key_type& k)
+        {
+            return boost::unordered_detail::pair_cast<
+                iterator, iterator>(
+                    table_.equal_range(k));
+        }
+
+        std::pair<const_iterator, const_iterator>
+            equal_range(const key_type& k) const
+        {
+            return boost::unordered_detail::pair_cast<
+                const_iterator, const_iterator>(
+                    table_.equal_range(k));
+        }
+
+        // bucket interface
+
+        size_type bucket_count() const
+        {
+            return table_.bucket_count_;
+        }
+
+        size_type max_bucket_count() const
+        {
+            return table_.max_bucket_count();
+        }
+
+        size_type bucket_size(size_type n) const
+        {
+            return table_.bucket_size(n);
+        }
+
+        size_type bucket(const key_type& k) const
+        {
+            return table_.bucket_index(k);
+        }
+
+        local_iterator begin(size_type n)
+        {
+            return local_iterator(table_.bucket_begin(n));
+        }
+
+        const_local_iterator begin(size_type n) const
+        {
+            return const_local_iterator(table_.bucket_begin(n));
+        }
+
+        local_iterator end(size_type)
+        {
+            return local_iterator();
+        }
+
+        const_local_iterator end(size_type) const
+        {
+            return const_local_iterator();
+        }
+
+        const_local_iterator cbegin(size_type n) const
+        {
+            return const_local_iterator(table_.bucket_begin(n));
+        }
+
+        const_local_iterator cend(size_type) const
+        {
+            return const_local_iterator();
+        }
+
+        // hash policy
+
+        float load_factor() const
+        {
+            return table_.load_factor();
+        }
+
+        float max_load_factor() const
+        {
+            return table_.mlf_;
+        }
+
+        void max_load_factor(float m)
+        {
+            table_.max_load_factor(m);
+        }
+
+        void rehash(size_type n)
+        {
+            table_.rehash(n);
+        }
+        
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+        friend bool operator==<K, T, H, P, A>(
+            unordered_map const&, unordered_map const&);
+        friend bool operator!=<K, T, H, P, A>(
+            unordered_map const&, unordered_map const&);
+#endif
+    }; // class template unordered_map
+
+    template <class K, class T, class H, class P, class A>
+    inline bool operator==(unordered_map<K, T, H, P, A> const& m1,
+        unordered_map<K, T, H, P, A> const& m2)
+    {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+        struct dummy { unordered_map<K,T,H,P,A> x; };
+#endif
+        return m1.table_.equals(m2.table_);
+    }
+
+    template <class K, class T, class H, class P, class A>
+    inline bool operator!=(unordered_map<K, T, H, P, A> const& m1,
+        unordered_map<K, T, H, P, A> const& m2)
+    {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+        struct dummy { unordered_map<K,T,H,P,A> x; };
+#endif
+        return !m1.table_.equals(m2.table_);
+    }
+
+    template <class K, class T, class H, class P, class A>
+    inline void swap(unordered_map<K, T, H, P, A> &m1,
+            unordered_map<K, T, H, P, A> &m2)
+    {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+        struct dummy { unordered_map<K,T,H,P,A> x; };
+#endif
+        m1.swap(m2);
+    }
+
+    template <class K, class T, class H, class P, class A>
+    class unordered_multimap
+    {
+    public:
+
+        typedef K key_type;
+        typedef std::pair<const K, T> value_type;
+        typedef T mapped_type;
+        typedef H hasher;
+        typedef P key_equal;
+        typedef A allocator_type;
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+    private:
+#endif
+
+        typedef BOOST_DEDUCED_TYPENAME
+            boost::unordered_detail::rebind_wrap<
+                allocator_type, value_type>::type
+            value_allocator;
+
+        typedef boost::unordered_detail::multimap<K, H, P,
+            value_allocator> types;
+        typedef BOOST_DEDUCED_TYPENAME types::impl table;
+
+        typedef BOOST_DEDUCED_TYPENAME types::iterator_base iterator_base;
+
+    public:
+
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::pointer pointer;
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::const_pointer const_pointer;
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::reference reference;
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::const_reference const_reference;
+
+        typedef std::size_t size_type;
+        typedef std::ptrdiff_t difference_type;
+
+        typedef boost::unordered_detail::hash_const_local_iterator<
+            value_allocator, boost::unordered_detail::grouped>
+                const_local_iterator;
+        typedef boost::unordered_detail::hash_local_iterator<
+            value_allocator, boost::unordered_detail::grouped>
+                local_iterator;
+        typedef boost::unordered_detail::hash_const_iterator<
+            value_allocator, boost::unordered_detail::grouped>
+                const_iterator;
+        typedef boost::unordered_detail::hash_iterator<
+            value_allocator, boost::unordered_detail::grouped>
+                iterator;
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+    private:
+#endif
+
+        table table_;
+        
+        BOOST_DEDUCED_TYPENAME types::iterator_base const&
+            get(const_iterator const& it)
+        {
+            return boost::unordered_detail::iterator_access::get(it);
+        }
+
+    public:
+
+        // construct/destroy/copy
+
+        explicit unordered_multimap(
+                size_type n = boost::unordered_detail::default_bucket_count,
+                const hasher &hf = hasher(),
+                const key_equal &eql = key_equal(),
+                const allocator_type &a = allocator_type())
+          : table_(n, hf, eql, a)
+        {
+        }
+
+        explicit unordered_multimap(allocator_type const& a)
+          : table_(boost::unordered_detail::default_bucket_count,
+                hasher(), key_equal(), a)
+        {
+        }
+
+        unordered_multimap(unordered_multimap const& other,
+            allocator_type const& a)
+          : table_(other.table_, a)
+        {
+        }
+
+        template <class InputIt>
+        unordered_multimap(InputIt f, InputIt l)
+          : table_(boost::unordered_detail::initial_size(f, l),
+                hasher(), key_equal(), allocator_type())
+        {
+            table_.insert_range(f, l);
+        }
+
+        template <class InputIt>
+        unordered_multimap(InputIt f, InputIt l,
+                size_type n,
+                const hasher &hf = hasher(),
+                const key_equal &eql = key_equal())
+          : table_(boost::unordered_detail::initial_size(f, l, n),
+                hf, eql, allocator_type())
+        {
+            table_.insert_range(f, l);
+        }
+
+        template <class InputIt>
+        unordered_multimap(InputIt f, InputIt l,
+                size_type n,
+                const hasher &hf,
+                const key_equal &eql,
+                const allocator_type &a)
+          : table_(boost::unordered_detail::initial_size(f, l, n), hf, eql, a)
+        {
+            table_.insert_range(f, l);
+        }
+
+        ~unordered_multimap() {}
+
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
+        unordered_multimap(unordered_multimap&& other)
+          : table_(other.table_, boost::unordered_detail::move_tag())
+        {
+        }
+
+        unordered_multimap(unordered_multimap&& other, allocator_type const& a)
+          : table_(other.table_, a, boost::unordered_detail::move_tag())
+        {
+        }
+
+        unordered_multimap& operator=(unordered_multimap&& x)
+        {
+            table_.move(x.table_);
+            return *this;
+        }
+#else
+        unordered_multimap(boost::unordered_detail::move_from<
+                unordered_multimap<K, T, H, P, A>
+            > other)
+          : table_(other.source.table_, boost::unordered_detail::move_tag())
+        {
+        }
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0593)
+        unordered_multimap& operator=(unordered_multimap x)
+        {
+            table_.move(x.table_);
+            return *this;
+        }
+#endif
+#endif
+
+#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
+        unordered_multimap(std::initializer_list<value_type> list,
+                size_type n = boost::unordered_detail::default_bucket_count,
+                const hasher &hf = hasher(),
+                const key_equal &eql = key_equal(),
+                const allocator_type &a = allocator_type())
+          : table_(boost::unordered_detail::initial_size(
+                    list.begin(), list.end(), n),
+                hf, eql, a)
+        {
+            table_.insert_range(list.begin(), list.end());
+        }
+
+        unordered_multimap& operator=(std::initializer_list<value_type> list)
+        {
+            table_.clear();
+            table_.insert_range(list.begin(), list.end());
+            return *this;
+        }
+#endif
+
+        allocator_type get_allocator() const
+        {
+            return table_.node_alloc();
+        }
+
+        // size and capacity
+
+        bool empty() const
+        {
+            return table_.size_ == 0;
+        }
+
+        size_type size() const
+        {
+            return table_.size_;
+        }
+
+        size_type max_size() const
+        {
+            return table_.max_size();
+        }
+
+        // iterators
+
+        iterator begin()
+        {
+            return iterator(table_.begin());
+        }
+
+        const_iterator begin() const
+        {
+            return const_iterator(table_.begin());
+        }
+
+        iterator end()
+        {
+            return iterator(table_.end());
+        }
+
+        const_iterator end() const
+        {
+            return const_iterator(table_.end());
+        }
+
+        const_iterator cbegin() const
+        {
+            return const_iterator(table_.begin());
+        }
+
+        const_iterator cend() const
+        {
+            return const_iterator(table_.end());
+        }
+
+        // modifiers
+
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+        template <class... Args>
+        iterator emplace(Args&&... args)
+        {
+            return iterator(table_.emplace(std::forward<Args>(args)...));
+        }
+
+        template <class... Args>
+        iterator emplace_hint(const_iterator, Args&&... args)
+        {
+            return iterator(table_.emplace(std::forward<Args>(args)...));
+        }
+#else
+
+        #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
+        iterator emplace(value_type const& v = value_type())
+        {
+            return iterator(table_.emplace(v));
+        }
+        
+        iterator emplace_hint(const_iterator,
+            value_type const& v = value_type())
+        {
+            return iterator(table_.emplace(v));
+        }
+        #endif
+
+#define BOOST_UNORDERED_EMPLACE(z, n, _)                                       \
+            template <                                                         \
+                BOOST_UNORDERED_TEMPLATE_ARGS(z, n)                            \
+            >                                                                  \
+            iterator emplace(                                                  \
+                BOOST_UNORDERED_FUNCTION_PARAMS(z, n)                          \
+            )                                                                  \
+            {                                                                  \
+                return iterator(                                               \
+                    table_.emplace(                                            \
+                        BOOST_UNORDERED_CALL_PARAMS(z, n)                      \
+                    ));                                                        \
+            }                                                                  \
+                                                                               \
+            template <                                                         \
+                BOOST_UNORDERED_TEMPLATE_ARGS(z, n)                            \
+            >                                                                  \
+            iterator emplace_hint(const_iterator,                              \
+                BOOST_UNORDERED_FUNCTION_PARAMS(z, n)                          \
+            )                                                                  \
+            {                                                                  \
+                return iterator(table_.emplace(                                \
+                        BOOST_UNORDERED_CALL_PARAMS(z, n)                      \
+                ));                                                            \
+            }
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT,
+            BOOST_UNORDERED_EMPLACE, _)
+
+#undef BOOST_UNORDERED_EMPLACE
+
+#endif
+
+        iterator insert(const value_type& obj)
+        {
+            return iterator(table_.emplace(obj));
+        }
+
+        iterator insert(const_iterator, const value_type& obj)
+        {
+            return iterator(table_.emplace(obj));
+        }
+
+        template <class InputIt>
+            void insert(InputIt first, InputIt last)
+        {
+            table_.insert_range(first, last);
+        }
+
+#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
+        void insert(std::initializer_list<value_type> list)
+        {
+            table_.insert_range(list.begin(), list.end());
+        }
+#endif
+
+        iterator erase(const_iterator position)
+        {
+            return iterator(table_.erase_return_iterator(get(position)));
+        }
+
+        size_type erase(const key_type& k)
+        {
+            return table_.erase_key(k);
+        }
+
+        iterator erase(const_iterator first, const_iterator last)
+        {
+            return iterator(table_.erase_range(get(first), get(last)));
+        }
+
+        void quick_erase(const_iterator position)
+        {
+            table_.erase(get(position));
+        }
+
+        void erase_return_void(const_iterator position)
+        {
+            table_.erase(get(position));
+        }
+
+        void clear()
+        {
+            table_.clear();
+        }
+
+        void swap(unordered_multimap& other)
+        {
+            table_.swap(other.table_);
+        }
+
+        // observers
+
+        hasher hash_function() const
+        {
+            return table_.hash_function();
+        }
+
+        key_equal key_eq() const
+        {
+            return table_.key_eq();
+        }
+
+        // lookup
+
+        iterator find(const key_type& k)
+        {
+            return iterator(table_.find(k));
+        }
+
+        const_iterator find(const key_type& k) const
+        {
+            return const_iterator(table_.find(k));
+        }
+
+        template <class CompatibleKey, class CompatibleHash,
+            class CompatiblePredicate>
+        iterator find(
+            CompatibleKey const& k,
+            CompatibleHash const& hash,
+            CompatiblePredicate const& eq)
+        {
+            return iterator(table_.find(k, hash, eq));
+        }
+
+        template <class CompatibleKey, class CompatibleHash,
+            class CompatiblePredicate>
+        const_iterator find(
+            CompatibleKey const& k,
+            CompatibleHash const& hash,
+            CompatiblePredicate const& eq) const
+        {
+            return iterator(table_.find(k, hash, eq));
+        }
+
+        size_type count(const key_type& k) const
+        {
+            return table_.count(k);
+        }
+
+        std::pair<iterator, iterator>
+            equal_range(const key_type& k)
+        {
+            return boost::unordered_detail::pair_cast<
+                iterator, iterator>(
+                    table_.equal_range(k));
+        }
+
+        std::pair<const_iterator, const_iterator>
+            equal_range(const key_type& k) const
+        {
+            return boost::unordered_detail::pair_cast<
+                const_iterator, const_iterator>(
+                    table_.equal_range(k));
+        }
+
+        // bucket interface
+
+        size_type bucket_count() const
+        {
+            return table_.bucket_count_;
+        }
+
+        size_type max_bucket_count() const
+        {
+            return table_.max_bucket_count();
+        }
+
+        size_type bucket_size(size_type n) const
+        {
+            return table_.bucket_size(n);
+        }
+
+        size_type bucket(const key_type& k) const
+        {
+            return table_.bucket_index(k);
+        }
+
+        local_iterator begin(size_type n)
+        {
+            return local_iterator(table_.bucket_begin(n));
+        }
+
+        const_local_iterator begin(size_type n) const
+        {
+            return const_local_iterator(table_.bucket_begin(n));
+        }
+
+        local_iterator end(size_type)
+        {
+            return local_iterator();
+        }
+
+        const_local_iterator end(size_type) const
+        {
+            return const_local_iterator();
+        }
+
+        const_local_iterator cbegin(size_type n) const
+        {
+            return const_local_iterator(table_.bucket_begin(n));
+        }
+
+        const_local_iterator cend(size_type) const
+        {
+            return const_local_iterator();
+        }
+
+        // hash policy
+
+        float load_factor() const
+        {
+            return table_.load_factor();
+        }
+
+        float max_load_factor() const
+        {
+            return table_.mlf_;
+        }
+
+        void max_load_factor(float m)
+        {
+            table_.max_load_factor(m);
+        }
+
+        void rehash(size_type n)
+        {
+            table_.rehash(n);
+        }
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+        friend bool operator==<K, T, H, P, A>(
+            unordered_multimap const&, unordered_multimap const&);
+        friend bool operator!=<K, T, H, P, A>(
+            unordered_multimap const&, unordered_multimap const&);
+#endif
+    }; // class template unordered_multimap
+
+    template <class K, class T, class H, class P, class A>
+    inline bool operator==(unordered_multimap<K, T, H, P, A> const& m1,
+        unordered_multimap<K, T, H, P, A> const& m2)
+    {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+        struct dummy { unordered_multimap<K,T,H,P,A> x; };
+#endif
+        return m1.table_.equals(m2.table_);
+    }
+
+    template <class K, class T, class H, class P, class A>
+    inline bool operator!=(unordered_multimap<K, T, H, P, A> const& m1,
+        unordered_multimap<K, T, H, P, A> const& m2)
+    {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+        struct dummy { unordered_multimap<K,T,H,P,A> x; };
+#endif
+        return !m1.table_.equals(m2.table_);
+    }
+
+    template <class K, class T, class H, class P, class A>
+    inline void swap(unordered_multimap<K, T, H, P, A> &m1,
+            unordered_multimap<K, T, H, P, A> &m2)
+    {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+        struct dummy { unordered_multimap<K,T,H,P,A> x; };
+#endif
+        m1.swap(m2);
+    }
+
+} // namespace boost
+
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_UNORDERED_UNORDERED_MAP_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/unordered/unordered_map_fwd.hpp b/deal.II/contrib/boost/include/boost/unordered/unordered_map_fwd.hpp
new file mode 100644 (file)
index 0000000..5e9bb07
--- /dev/null
@@ -0,0 +1,53 @@
+
+// Copyright (C) 2008-2009 Daniel James.
+// 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)
+
+#ifndef BOOST_UNORDERED_MAP_FWD_HPP_INCLUDED
+#define BOOST_UNORDERED_MAP_FWD_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+#include <memory>
+#include <functional>
+#include <boost/functional/hash_fwd.hpp>
+
+namespace boost
+{
+    template <class K,
+        class T,
+        class H = hash<K>,
+        class P = std::equal_to<K>,
+        class A = std::allocator<std::pair<const K, T> > >
+    class unordered_map;
+    template <class K, class T, class H, class P, class A>
+    bool operator==(unordered_map<K, T, H, P, A> const&,
+        unordered_map<K, T, H, P, A> const&);
+    template <class K, class T, class H, class P, class A>
+    bool operator!=(unordered_map<K, T, H, P, A> const&,
+        unordered_map<K, T, H, P, A> const&);
+    template <class K, class T, class H, class P, class A>
+    void swap(unordered_map<K, T, H, P, A>&,
+            unordered_map<K, T, H, P, A>&);
+
+    template <class K,
+        class T,
+        class H = hash<K>,
+        class P = std::equal_to<K>,
+        class A = std::allocator<std::pair<const K, T> > >
+    class unordered_multimap;
+    template <class K, class T, class H, class P, class A>
+    bool operator==(unordered_multimap<K, T, H, P, A> const&,
+        unordered_multimap<K, T, H, P, A> const&);
+    template <class K, class T, class H, class P, class A>
+    bool operator!=(unordered_multimap<K, T, H, P, A> const&,
+        unordered_multimap<K, T, H, P, A> const&);
+    template <class K, class T, class H, class P, class A>
+    void swap(unordered_multimap<K, T, H, P, A>&,
+            unordered_multimap<K, T, H, P, A>&);
+}
+
+#endif
diff --git a/deal.II/contrib/boost/include/boost/unordered/unordered_set.hpp b/deal.II/contrib/boost/include/boost/unordered/unordered_set.hpp
new file mode 100644 (file)
index 0000000..ec48b8c
--- /dev/null
@@ -0,0 +1,1037 @@
+
+// Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard.
+// Copyright (C) 2005-2009 Daniel James.
+// 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 http://www.boost.org/libs/unordered for documentation
+
+#ifndef BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED
+#define BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/unordered/unordered_set_fwd.hpp>
+#include <boost/functional/hash.hpp>
+#include <boost/unordered/detail/allocator_helpers.hpp>
+#include <boost/unordered/detail/equivalent.hpp>
+#include <boost/unordered/detail/unique.hpp>
+
+#if defined(BOOST_NO_RVALUE_REFERENCES)
+#include <boost/unordered/detail/move.hpp>
+#endif
+
+#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+#if defined(BOOST_MSVC)
+#pragma warning(push)
+#if BOOST_MSVC >= 1400
+#pragma warning(disable:4396) //the inline specifier cannot be used when a
+                              // friend declaration refers to a specialization
+                              // of a function template
+#endif
+#endif
+
+namespace boost
+{
+    template <class T, class H, class P, class A>
+    class unordered_set
+    {
+    public:
+
+        typedef T key_type;
+        typedef T value_type;
+        typedef H hasher;
+        typedef P key_equal;
+        typedef A allocator_type;
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+    private:
+#endif
+
+        typedef BOOST_DEDUCED_TYPENAME
+            boost::unordered_detail::rebind_wrap<
+                allocator_type, value_type>::type
+            value_allocator;
+
+        typedef boost::unordered_detail::set<H, P,
+            value_allocator> types;
+        typedef BOOST_DEDUCED_TYPENAME types::impl table;
+
+        typedef BOOST_DEDUCED_TYPENAME types::iterator_base iterator_base;
+
+    public:
+
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::pointer pointer;
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::const_pointer const_pointer;
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::reference reference;
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::const_reference const_reference;
+
+        typedef std::size_t size_type;
+        typedef std::ptrdiff_t difference_type;
+
+        typedef boost::unordered_detail::hash_const_local_iterator<
+            value_allocator, boost::unordered_detail::ungrouped>
+                const_local_iterator;
+        typedef boost::unordered_detail::hash_const_iterator<
+            value_allocator, boost::unordered_detail::ungrouped>
+                const_iterator;
+        typedef const_local_iterator local_iterator;
+        typedef const_iterator iterator;
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+    private:
+#endif
+
+        table table_;
+        
+        BOOST_DEDUCED_TYPENAME types::iterator_base const&
+            get(const_iterator const& it)
+        {
+            return boost::unordered_detail::iterator_access::get(it);
+        }
+
+    public:
+
+        // construct/destroy/copy
+
+        explicit unordered_set(
+                size_type n = boost::unordered_detail::default_bucket_count,
+                const hasher &hf = hasher(),
+                const key_equal &eql = key_equal(),
+                const allocator_type &a = allocator_type())
+          : table_(n, hf, eql, a)
+        {
+        }
+
+        explicit unordered_set(allocator_type const& a)
+          : table_(boost::unordered_detail::default_bucket_count,
+                hasher(), key_equal(), a)
+        {
+        }
+
+        unordered_set(unordered_set const& other, allocator_type const& a)
+          : table_(other.table_, a)
+        {
+        }
+
+        template <class InputIt>
+        unordered_set(InputIt f, InputIt l)
+          : table_(boost::unordered_detail::initial_size(f, l),
+            hasher(), key_equal(), allocator_type())
+        {
+            table_.insert_range(f, l);
+        }
+
+        template <class InputIt>
+        unordered_set(InputIt f, InputIt l, size_type n,
+                const hasher &hf = hasher(),
+                const key_equal &eql = key_equal())
+          : table_(boost::unordered_detail::initial_size(f, l, n),
+            hf, eql, allocator_type())
+        {
+            table_.insert_range(f, l);
+        }
+        
+        template <class InputIt>
+        unordered_set(InputIt f, InputIt l, size_type n,
+                const hasher &hf,
+                const key_equal &eql,
+                const allocator_type &a)
+          : table_(boost::unordered_detail::initial_size(f, l, n), hf, eql, a)
+        {
+            table_.insert_range(f, l);
+        }
+        
+        ~unordered_set() {}
+
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
+        unordered_set(unordered_set&& other)
+          : table_(other.table_, boost::unordered_detail::move_tag())
+        {
+        }
+
+        unordered_set(unordered_set&& other, allocator_type const& a)
+          : table_(other.table_, a, boost::unordered_detail::move_tag())
+        {
+        }
+
+        unordered_set& operator=(unordered_set&& x)
+        {
+            table_.move(x.table_);
+            return *this;
+        }
+#else
+        unordered_set(boost::unordered_detail::move_from<
+                unordered_set<T, H, P, A>
+            > other)
+          : table_(other.source.table_, boost::unordered_detail::move_tag())
+        {
+        }
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0593)
+        unordered_set& operator=(unordered_set x)
+        {
+            table_.move(x.table_);
+            return *this;
+        }
+#endif
+#endif
+
+#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
+        unordered_set(std::initializer_list<value_type> list,
+                size_type n = boost::unordered_detail::default_bucket_count,
+                const hasher &hf = hasher(),
+                const key_equal &eql = key_equal(),
+                const allocator_type &a = allocator_type())
+          : table_(boost::unordered_detail::initial_size(
+                    list.begin(), list.end(), n),
+                hf, eql, a)
+        {
+            table_.insert_range(list.begin(), list.end());
+        }
+
+        unordered_set& operator=(std::initializer_list<value_type> list)
+        {
+            table_.clear();
+            table_.insert_range(list.begin(), list.end());
+            return *this;
+        }
+#endif
+
+        allocator_type get_allocator() const
+        {
+            return table_.node_alloc();
+        }
+
+        // size and capacity
+
+        bool empty() const
+        {
+            return table_.size_ == 0;
+        }
+
+        size_type size() const
+        {
+            return table_.size_;
+        }
+
+        size_type max_size() const
+        {
+            return table_.max_size();
+        }
+
+        // iterators
+
+        iterator begin()
+        {
+            return iterator(table_.begin());
+        }
+
+        const_iterator begin() const
+        {
+            return const_iterator(table_.begin());
+        }
+
+        iterator end()
+        {
+            return iterator(table_.end());
+        }
+
+        const_iterator end() const
+        {
+            return const_iterator(table_.end());
+        }
+
+        const_iterator cbegin() const
+        {
+            return const_iterator(table_.begin());
+        }
+
+        const_iterator cend() const
+        {
+            return const_iterator(table_.end());
+        }
+
+        // modifiers
+
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+        template <class... Args>
+        std::pair<iterator, bool> emplace(Args&&... args)
+        {
+            return boost::unordered_detail::pair_cast<iterator, bool>(
+                table_.emplace(std::forward<Args>(args)...));
+        }
+
+        template <class... Args>
+        iterator emplace_hint(const_iterator, Args&&... args)
+        {
+            return iterator(table_.emplace(std::forward<Args>(args)...).first);
+        }
+#else
+
+        std::pair<iterator, bool> emplace(value_type const& v = value_type())
+        {
+            return boost::unordered_detail::pair_cast<iterator, bool>(
+                table_.emplace(v));
+        }
+
+        iterator emplace_hint(const_iterator,
+            value_type const& v = value_type())
+        {
+            return iterator(table_.emplace(v).first);
+        }
+
+#define BOOST_UNORDERED_EMPLACE(z, n, _)                                       \
+            template <                                                         \
+                BOOST_UNORDERED_TEMPLATE_ARGS(z, n)                            \
+            >                                                                  \
+            std::pair<iterator, bool> emplace(                                 \
+                BOOST_UNORDERED_FUNCTION_PARAMS(z, n)                          \
+            )                                                                  \
+            {                                                                  \
+                return boost::unordered_detail::pair_cast<iterator, bool>(     \
+                    table_.emplace(                                            \
+                        BOOST_UNORDERED_CALL_PARAMS(z, n)                      \
+                    ));                                                        \
+            }                                                                  \
+                                                                               \
+            template <                                                         \
+                BOOST_UNORDERED_TEMPLATE_ARGS(z, n)                            \
+            >                                                                  \
+            iterator emplace_hint(const_iterator,                              \
+                BOOST_UNORDERED_FUNCTION_PARAMS(z, n)                          \
+            )                                                                  \
+            {                                                                  \
+                return iterator(table_.emplace(                                \
+                    BOOST_UNORDERED_CALL_PARAMS(z, n)).first);                 \
+            }
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT,
+            BOOST_UNORDERED_EMPLACE, _)
+
+#undef BOOST_UNORDERED_EMPLACE
+
+#endif
+
+        std::pair<iterator, bool> insert(const value_type& obj)
+        {
+            return boost::unordered_detail::pair_cast<iterator, bool>(
+                    table_.emplace(obj));
+        }
+
+        iterator insert(const_iterator, const value_type& obj)
+        {
+            return iterator(table_.emplace(obj).first);
+        }
+
+        template <class InputIt>
+            void insert(InputIt first, InputIt last)
+        {
+            table_.insert_range(first, last);
+        }
+
+#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
+        void insert(std::initializer_list<value_type> list)
+        {
+            table_.insert_range(list.begin(), list.end());
+        }
+#endif
+
+        iterator erase(const_iterator position)
+        {
+            return iterator(table_.erase_return_iterator(get(position)));
+        }
+
+        size_type erase(const key_type& k)
+        {
+            return table_.erase_key(k);
+        }
+
+        iterator erase(const_iterator first, const_iterator last)
+        {
+            return iterator(table_.erase_range(get(first), get(last)));
+        }
+
+        void quick_erase(const_iterator position)
+        {
+            table_.erase(get(position));
+        }
+
+        void erase_return_void(const_iterator position)
+        {
+            table_.erase(get(position));
+        }
+
+        void clear()
+        {
+            table_.clear();
+        }
+
+        void swap(unordered_set& other)
+        {
+            table_.swap(other.table_);
+        }
+
+        // observers
+
+        hasher hash_function() const
+        {
+            return table_.hash_function();
+        }
+
+        key_equal key_eq() const
+        {
+            return table_.key_eq();
+        }
+
+        // lookup
+
+        const_iterator find(const key_type& k) const
+        {
+            return const_iterator(table_.find(k));
+        }
+
+        template <class CompatibleKey, class CompatibleHash,
+            class CompatiblePredicate>
+        const_iterator find(
+            CompatibleKey const& k,
+            CompatibleHash const& hash,
+            CompatiblePredicate const& eq) const
+        {
+            return iterator(table_.find(k, hash, eq));
+        }
+        size_type count(const key_type& k) const
+        {
+            return table_.count(k);
+        }
+
+        std::pair<const_iterator, const_iterator>
+            equal_range(const key_type& k) const
+        {
+            return boost::unordered_detail::pair_cast<
+                const_iterator, const_iterator>(
+                    table_.equal_range(k));
+        }
+
+        // bucket interface
+
+        size_type bucket_count() const
+        {
+            return table_.bucket_count_;
+        }
+
+        size_type max_bucket_count() const
+        {
+            return table_.max_bucket_count();
+        }
+
+        size_type bucket_size(size_type n) const
+        {
+            return table_.bucket_size(n);
+        }
+
+        size_type bucket(const key_type& k) const
+        {
+            return table_.bucket_index(k);
+        }
+
+        local_iterator begin(size_type n)
+        {
+            return local_iterator(table_.bucket_begin(n));
+        }
+
+        const_local_iterator begin(size_type n) const
+        {
+            return const_local_iterator(table_.bucket_begin(n));
+        }
+
+        local_iterator end(size_type)
+        {
+            return local_iterator();
+        }
+
+        const_local_iterator end(size_type) const
+        {
+            return const_local_iterator();
+        }
+
+        const_local_iterator cbegin(size_type n) const
+        {
+            return const_local_iterator(table_.bucket_begin(n));
+        }
+
+        const_local_iterator cend(size_type) const
+        {
+            return const_local_iterator();
+        }
+
+        // hash policy
+
+        float load_factor() const
+        {
+            return table_.load_factor();
+        }
+
+        float max_load_factor() const
+        {
+            return table_.mlf_;
+        }
+
+        void max_load_factor(float m)
+        {
+            table_.max_load_factor(m);
+        }
+
+        void rehash(size_type n)
+        {
+            table_.rehash(n);
+        }
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+        friend bool operator==<T, H, P, A>(
+            unordered_set const&, unordered_set const&);
+        friend bool operator!=<T, H, P, A>(
+            unordered_set const&, unordered_set const&);
+#endif
+    }; // class template unordered_set
+
+    template <class T, class H, class P, class A>
+    inline bool operator==(unordered_set<T, H, P, A> const& m1,
+        unordered_set<T, H, P, A> const& m2)
+    {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+        struct dummy { unordered_set<T,H,P,A> x; };
+#endif
+        return m1.table_.equals(m2.table_);
+    }
+
+    template <class T, class H, class P, class A>
+    inline bool operator!=(unordered_set<T, H, P, A> const& m1,
+        unordered_set<T, H, P, A> const& m2)
+    {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+        struct dummy { unordered_set<T,H,P,A> x; };
+#endif
+        return !m1.table_.equals(m2.table_);
+    }
+
+    template <class T, class H, class P, class A>
+    inline void swap(unordered_set<T, H, P, A> &m1,
+            unordered_set<T, H, P, A> &m2)
+    {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+        struct dummy { unordered_set<T,H,P,A> x; };
+#endif
+        m1.swap(m2);
+    }
+
+    template <class T, class H, class P, class A>
+    class unordered_multiset
+    {
+    public:
+
+        typedef T key_type;
+        typedef T value_type;
+        typedef H hasher;
+        typedef P key_equal;
+        typedef A allocator_type;
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+    private:
+#endif
+
+        typedef BOOST_DEDUCED_TYPENAME
+            boost::unordered_detail::rebind_wrap<
+                allocator_type, value_type>::type
+            value_allocator;
+
+        typedef boost::unordered_detail::multiset<H, P,
+            value_allocator> types;
+        typedef BOOST_DEDUCED_TYPENAME types::impl table;
+
+        typedef BOOST_DEDUCED_TYPENAME types::iterator_base iterator_base;
+
+    public:
+
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::pointer pointer;
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::const_pointer const_pointer;
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::reference reference;
+        typedef BOOST_DEDUCED_TYPENAME
+            value_allocator::const_reference const_reference;
+
+        typedef std::size_t size_type;
+        typedef std::ptrdiff_t difference_type;
+
+        typedef boost::unordered_detail::hash_const_local_iterator<
+            value_allocator, boost::unordered_detail::grouped>
+                const_local_iterator;
+        typedef boost::unordered_detail::hash_const_iterator<
+            value_allocator, boost::unordered_detail::grouped>
+                const_iterator;
+        typedef const_local_iterator local_iterator;
+        typedef const_iterator iterator;
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+    private:
+#endif
+
+        table table_;
+        
+        BOOST_DEDUCED_TYPENAME types::iterator_base const&
+            get(const_iterator const& it)
+        {
+            return boost::unordered_detail::iterator_access::get(it);
+        }
+
+    public:
+
+        // construct/destroy/copy
+
+        explicit unordered_multiset(
+                size_type n = boost::unordered_detail::default_bucket_count,
+                const hasher &hf = hasher(),
+                const key_equal &eql = key_equal(),
+                const allocator_type &a = allocator_type())
+          : table_(n, hf, eql, a)
+        {
+        }
+
+        explicit unordered_multiset(allocator_type const& a)
+          : table_(boost::unordered_detail::default_bucket_count,
+                hasher(), key_equal(), a)
+        {
+        }
+
+        unordered_multiset(unordered_multiset const& other,
+            allocator_type const& a)
+          : table_(other.table_, a)
+        {
+        }
+
+        template <class InputIt>
+        unordered_multiset(InputIt f, InputIt l)
+          : table_(boost::unordered_detail::initial_size(f, l),
+                hasher(), key_equal(), allocator_type())
+        {
+            table_.insert_range(f, l);
+        }
+
+        template <class InputIt>
+        unordered_multiset(InputIt f, InputIt l, size_type n,
+                const hasher &hf = hasher(),
+                const key_equal &eql = key_equal())
+          : table_(boost::unordered_detail::initial_size(f, l, n),
+                hf, eql, allocator_type())
+        {
+            table_.insert_range(f, l);
+        }
+
+        template <class InputIt>
+        unordered_multiset(InputIt f, InputIt l, size_type n,
+                const hasher &hf,
+                const key_equal &eql,
+                const allocator_type &a)
+          : table_(boost::unordered_detail::initial_size(f, l, n), hf, eql, a)
+        {
+            table_.insert_range(f, l);
+        }
+
+        ~unordered_multiset() {}
+
+#if !defined(BOOST_NO_RVALUE_REFERENCES)
+        unordered_multiset(unordered_multiset&& other)
+          : table_(other.table_, boost::unordered_detail::move_tag())
+        {
+        }
+
+        unordered_multiset(unordered_multiset&& other, allocator_type const& a)
+          : table_(other.table_, a, boost::unordered_detail::move_tag())
+        {
+        }
+
+        unordered_multiset& operator=(unordered_multiset&& x)
+        {
+            table_.move(x.table_);
+            return *this;
+        }
+#else
+        unordered_multiset(boost::unordered_detail::move_from<
+                unordered_multiset<T, H, P, A>
+            > other)
+          : table_(other.source.table_, boost::unordered_detail::move_tag())
+        {
+        }
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0593)
+        unordered_multiset& operator=(unordered_multiset x)
+        {
+            table_.move(x.table_);
+            return *this;
+        }
+#endif
+#endif
+
+#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
+        unordered_multiset(std::initializer_list<value_type> list,
+                size_type n = boost::unordered_detail::default_bucket_count,
+                const hasher &hf = hasher(),
+                const key_equal &eql = key_equal(),
+                const allocator_type &a = allocator_type())
+          : table_(boost::unordered_detail::initial_size(
+                    list.begin(), list.end(), n),
+                hf, eql, a)
+        {
+            table_.insert_range(list.begin(), list.end());
+        }
+
+        unordered_multiset& operator=(std::initializer_list<value_type> list)
+        {
+            table_.clear();
+            table_.insert_range(list.begin(), list.end());
+            return *this;
+        }
+#endif
+
+        allocator_type get_allocator() const
+        {
+            return table_.node_alloc();
+        }
+
+        // size and capacity
+
+        bool empty() const
+        {
+            return table_.size_ == 0;
+        }
+
+        size_type size() const
+        {
+            return table_.size_;
+        }
+
+        size_type max_size() const
+        {
+            return table_.max_size();
+        }
+
+        // iterators
+
+        iterator begin()
+        {
+            return iterator(table_.begin());
+        }
+
+        const_iterator begin() const
+        {
+            return const_iterator(table_.begin());
+        }
+
+        iterator end()
+        {
+            return iterator(table_.end());
+        }
+
+        const_iterator end() const
+        {
+            return const_iterator(table_.end());
+        }
+
+        const_iterator cbegin() const
+        {
+            return const_iterator(table_.begin());
+        }
+
+        const_iterator cend() const
+        {
+            return const_iterator(table_.end());
+        }
+
+        // modifiers
+
+#if defined(BOOST_UNORDERED_STD_FORWARD)
+        template <class... Args>
+        iterator emplace(Args&&... args)
+        {
+            return iterator(table_.emplace(std::forward<Args>(args)...));
+        }
+
+        template <class... Args>
+        iterator emplace_hint(const_iterator, Args&&... args)
+        {
+            return iterator(table_.emplace(std::forward<Args>(args)...));
+        }
+#else
+
+        iterator emplace(value_type const& v = value_type())
+        {
+            return iterator(table_.emplace(v));
+        }
+
+        iterator emplace_hint(const_iterator,
+            value_type const& v = value_type())
+        {
+            return iterator(table_.emplace(v));
+        }
+
+#define BOOST_UNORDERED_EMPLACE(z, n, _)                                       \
+            template <                                                         \
+                BOOST_UNORDERED_TEMPLATE_ARGS(z, n)                            \
+            >                                                                  \
+            iterator emplace(                                                  \
+                BOOST_UNORDERED_FUNCTION_PARAMS(z, n)                          \
+            )                                                                  \
+            {                                                                  \
+                return iterator(                                               \
+                    table_.emplace(BOOST_UNORDERED_CALL_PARAMS(z, n)));        \
+            }                                                                  \
+                                                                               \
+            template <                                                         \
+                BOOST_UNORDERED_TEMPLATE_ARGS(z, n)                            \
+            >                                                                  \
+            iterator emplace_hint(const_iterator,                              \
+                BOOST_UNORDERED_FUNCTION_PARAMS(z, n)                          \
+            )                                                                  \
+            {                                                                  \
+                return iterator(table_.emplace(                                \
+                        BOOST_UNORDERED_CALL_PARAMS(z, n)                      \
+                ));                                                            \
+            }
+
+        BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT,
+            BOOST_UNORDERED_EMPLACE, _)
+
+#undef BOOST_UNORDERED_EMPLACE
+
+#endif
+
+        iterator insert(const value_type& obj)
+        {
+            return iterator(table_.emplace(obj));
+        }
+
+        iterator insert(const_iterator, const value_type& obj)
+        {
+            return iterator(table_.emplace(obj));
+        }
+
+        template <class InputIt>
+            void insert(InputIt first, InputIt last)
+        {
+            table_.insert_range(first, last);
+        }
+
+#if !defined(BOOST_NO_0X_HDR_INITIALIZER_LIST)
+        void insert(std::initializer_list<value_type> list)
+        {
+            table_.insert_range(list.begin(), list.end());
+        }
+#endif
+
+        iterator erase(const_iterator position)
+        {
+            return iterator(table_.erase_return_iterator(get(position)));
+        }
+
+        size_type erase(const key_type& k)
+        {
+            return table_.erase_key(k);
+        }
+
+        iterator erase(const_iterator first, const_iterator last)
+        {
+            return iterator(table_.erase_range(get(first), get(last)));
+        }
+
+        void quick_erase(const_iterator position)
+        {
+            table_.erase(get(position));
+        }
+
+        void erase_return_void(const_iterator position)
+        {
+            table_.erase(get(position));
+        }
+
+        void clear()
+        {
+            table_.clear();
+        }
+
+        void swap(unordered_multiset& other)
+        {
+            table_.swap(other.table_);
+        }
+
+        // observers
+
+        hasher hash_function() const
+        {
+            return table_.hash_function();
+        }
+
+        key_equal key_eq() const
+        {
+            return table_.key_eq();
+        }
+
+        // lookup
+
+        const_iterator find(const key_type& k) const
+        {
+            return const_iterator(table_.find(k));
+        }
+
+        template <class CompatibleKey, class CompatibleHash,
+            class CompatiblePredicate>
+        const_iterator find(
+            CompatibleKey const& k,
+            CompatibleHash const& hash,
+            CompatiblePredicate const& eq) const
+        {
+            return iterator(table_.find(k, hash, eq));
+        }
+
+        size_type count(const key_type& k) const
+        {
+            return table_.count(k);
+        }
+
+        std::pair<const_iterator, const_iterator>
+            equal_range(const key_type& k) const
+        {
+            return boost::unordered_detail::pair_cast<
+                const_iterator, const_iterator>(
+                    table_.equal_range(k));
+        }
+
+        // bucket interface
+
+        size_type bucket_count() const
+        {
+            return table_.bucket_count_;
+        }
+
+        size_type max_bucket_count() const
+        {
+            return table_.max_bucket_count();
+        }
+
+        size_type bucket_size(size_type n) const
+        {
+            return table_.bucket_size(n);
+        }
+
+        size_type bucket(const key_type& k) const
+        {
+            return table_.bucket_index(k);
+        }
+
+        local_iterator begin(size_type n)
+        {
+            return local_iterator(table_.bucket_begin(n));
+        }
+
+        const_local_iterator begin(size_type n) const
+        {
+            return const_local_iterator(table_.bucket_begin(n));
+        }
+
+        local_iterator end(size_type)
+        {
+            return local_iterator();
+        }
+
+        const_local_iterator end(size_type) const
+        {
+            return const_local_iterator();
+        }
+
+        const_local_iterator cbegin(size_type n) const
+        {
+            return const_local_iterator(table_.bucket_begin(n));
+        }
+
+        const_local_iterator cend(size_type) const
+        {
+            return const_local_iterator();
+        }
+
+        // hash policy
+
+        float load_factor() const
+        {
+            return table_.load_factor();
+        }
+
+        float max_load_factor() const
+        {
+            return table_.mlf_;
+        }
+
+        void max_load_factor(float m)
+        {
+            table_.max_load_factor(m);
+        }
+
+        void rehash(size_type n)
+        {
+            table_.rehash(n);
+        }
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
+        friend bool operator==<T, H, P, A>(
+            unordered_multiset const&, unordered_multiset const&);
+        friend bool operator!=<T, H, P, A>(
+            unordered_multiset const&, unordered_multiset const&);
+#endif
+    }; // class template unordered_multiset
+
+    template <class T, class H, class P, class A>
+    inline bool operator==(unordered_multiset<T, H, P, A> const& m1,
+        unordered_multiset<T, H, P, A> const& m2)
+    {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+        struct dummy { unordered_multiset<T,H,P,A> x; };
+#endif
+        return m1.table_.equals(m2.table_);
+    }
+
+    template <class T, class H, class P, class A>
+    inline bool operator!=(unordered_multiset<T, H, P, A> const& m1,
+        unordered_multiset<T, H, P, A> const& m2)
+    {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+        struct dummy { unordered_multiset<T,H,P,A> x; };
+#endif
+        return !m1.table_.equals(m2.table_);
+    }
+
+    template <class T, class H, class P, class A>
+    inline void swap(unordered_multiset<T, H, P, A> &m1,
+            unordered_multiset<T, H, P, A> &m2)
+    {
+#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
+        struct dummy { unordered_multiset<T,H,P,A> x; };
+#endif
+        m1.swap(m2);
+    }
+
+} // namespace boost
+
+#if defined(BOOST_MSVC)
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED
diff --git a/deal.II/contrib/boost/include/boost/unordered/unordered_set_fwd.hpp b/deal.II/contrib/boost/include/boost/unordered/unordered_set_fwd.hpp
new file mode 100644 (file)
index 0000000..8000eb1
--- /dev/null
@@ -0,0 +1,51 @@
+
+// Copyright (C) 2008-2009 Daniel James.
+// 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)
+
+#ifndef BOOST_UNORDERED_SET_FWD_HPP_INCLUDED
+#define BOOST_UNORDERED_SET_FWD_HPP_INCLUDED
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+#include <memory>
+#include <functional>
+#include <boost/functional/hash_fwd.hpp>
+
+namespace boost
+{
+    template <class T,
+        class H = hash<T>,
+        class P = std::equal_to<T>,
+        class A = std::allocator<T> >
+    class unordered_set;
+    template <class T, class H, class P, class A>
+    bool operator==(unordered_set<T, H, P, A> const&,
+        unordered_set<T, H, P, A> const&);
+    template <class T, class H, class P, class A>
+    bool operator!=(unordered_set<T, H, P, A> const&,
+        unordered_set<T, H, P, A> const&);
+    template <class T, class H, class P, class A>
+    void swap(unordered_set<T, H, P, A> &m1,
+            unordered_set<T, H, P, A> &m2);
+
+    template <class T,
+        class H = hash<T>,
+        class P = std::equal_to<T>,
+        class A = std::allocator<T> >
+    class unordered_multiset;
+    template <class T, class H, class P, class A>
+    bool operator==(unordered_multiset<T, H, P, A> const&,
+        unordered_multiset<T, H, P, A> const&);
+    template <class T, class H, class P, class A>
+    bool operator!=(unordered_multiset<T, H, P, A> const&,
+        unordered_multiset<T, H, P, A> const&);
+    template <class T, class H, class P, class A>
+    void swap(unordered_multiset<T, H, P, A> &m1,
+            unordered_multiset<T, H, P, A> &m2);
+}
+
+#endif
index 177fe743450c2135ba873a239bf2e14b0b9592bb..5aefac928d94e65af05dc18b9410d47e26047a8e 100644 (file)
@@ -114,8 +114,6 @@ class value_initialized
 
 
 
-
-
 template<class T>
 T const& get ( value_initialized<T> const& x )
 {
diff --git a/deal.II/contrib/boost/include/boost/vector_property_map.hpp b/deal.II/contrib/boost/include/boost/vector_property_map.hpp
deleted file mode 100644 (file)
index 2b30568..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*=============================================================================
-Copyright (c) 2009 Trustees of Indiana University
-
-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)
-=============================================================================*/
-// Redirect/warning header, adapted from the version in Spirit
-
-#include <boost/version.hpp>
-
-#if BOOST_VERSION >= 103800
-#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__)
-#  pragma message ("Warning: This header is deprecated. Please use: boost/property_map/vector_property_map.hpp")
-#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-#  warning "This header is deprecated. Please use: boost/property_map/vector_property_map.hpp"
-#endif
-#endif
-
-#include <boost/property_map/vector_property_map.hpp>
index ad3435917b9986dd57b6947f66b0cf33f1418e44..82a1daf5356614352a87ff88eb0c20f43e024c33 100644 (file)
@@ -19,7 +19,7 @@
 //  BOOST_VERSION / 100 % 1000 is the minor version
 //  BOOST_VERSION / 100000 is the major version
 
-#define BOOST_VERSION 104100
+#define BOOST_VERSION 104300
 
 //
 //  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
@@ -27,7 +27,7 @@
 //  number, y is the minor version number, and z is the patch level if not 0.
 //  This is used by <config/auto_link.hpp> to select which library version to link to.
 
-#define BOOST_LIB_VERSION "1_41"
+#define BOOST_LIB_VERSION "1_43"
 
 #endif
 
index 7605ab8533b539b5aaa5bd1c5d7346f6a5266500..a965cc0b688eb94fb55f9040147319203a671b24 100644 (file)
@@ -5,7 +5,7 @@
 
     See http://www.boost.org/libs/wave for documentation
 
-    Copyright (c) 2001-2009 Hartmut Kaiser. Distributed under the Boost
+    Copyright (c) 2001-2010 Hartmut Kaiser. 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)
 =============================================================================*/
index fd53e7dee1c400871cc3507b46c854fe3aaa6674..ecbdcb2290c4a63c5ff108ec7d14258db1733107 100644 (file)
@@ -45,6 +45,15 @@ all subsequent `call_once` invocations on the same `once_flag` object. ]]
 
 [[Throws:] [`thread_resource_error` when the effects cannot be achieved. or any exception propagated from `func`.]]
 
+[[Note:] [The function passed to `call_once` must not also call
+`call_once` passing the same `once_flag` object. This may cause
+deadlock, or invoking the passed function a second time. The
+alternative is to allow the second call to return immediately, but
+that assumes the code knows it has been called recursively, and can
+proceed even though the call to `call_once` didn't actually call the
+function, in which case it could also avoid calling `call_once`
+recursively.]]
+
 ]
 
     void call_once(void (*func)(),once_flag& flag);
index 1232707aa61b6493d5f0178e712b6d88fb4a604a..1c13a9a29b35360e0a7411ece39c6697d7e6d5df 100644 (file)
@@ -2,7 +2,7 @@
 // William E. Kempf
 // Copyright (C) 2007-8 Anthony Williams
 //
-//  Distributed under the Boost Software License, Version 1.0. (See accompanying
+//  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)
 
 #include <boost/thread/detail/config.hpp>
@@ -13,6 +13,7 @@
 #include <boost/thread/locks.hpp>
 #include <boost/thread/once.hpp>
 #include <boost/thread/tss.hpp>
+#include <boost/throw_exception.hpp>
 #ifdef __linux__
 #include <sys/sysinfo.h>
 #elif defined(__APPLE__) || defined(__FreeBSD__)
@@ -85,14 +86,14 @@ namespace boost
                     }
                 }
             }
-
+    
 
             void create_current_thread_tls_key()
             {
                 BOOST_VERIFY(!pthread_key_create(&current_thread_tls_key,&tls_destructor));
             }
         }
-
+        
         boost::detail::thread_data_base* get_current_thread_data()
         {
             boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key);
@@ -105,7 +106,7 @@ namespace boost
             BOOST_VERIFY(!pthread_setspecific(current_thread_tls_key,new_data));
         }
     }
-
+    
     namespace
     {
         extern "C"
@@ -145,7 +146,7 @@ namespace boost
             {
                 interrupt_enabled=false;
             }
-
+            
             void run()
             {}
 
@@ -186,7 +187,7 @@ namespace boost
         if (res != 0)
         {
             thread_info->self.reset();
-            throw thread_resource_error();
+            boost::throw_exception(thread_resource_error());
         }
     }
 
@@ -207,7 +208,7 @@ namespace boost
         if(local_thread_info)
         {
             bool do_join=false;
-
+            
             {
                 unique_lock<mutex> lock(local_thread_info->data_mutex);
                 while(!local_thread_info->done)
@@ -215,7 +216,7 @@ namespace boost
                     local_thread_info->done_condition.wait(lock);
                 }
                 do_join=!local_thread_info->join_started;
-
+                
                 if(do_join)
                 {
                     local_thread_info->join_started=true;
@@ -236,7 +237,7 @@ namespace boost
                 local_thread_info->joined=true;
                 local_thread_info->done_condition.notify_all();
             }
-
+            
             lock_guard<mutex> l1(thread_info_mutex);
             if(thread_info==local_thread_info)
             {
@@ -251,7 +252,7 @@ namespace boost
         if(local_thread_info)
         {
             bool do_join=false;
-
+            
             {
                 unique_lock<mutex> lock(local_thread_info->data_mutex);
                 while(!local_thread_info->done)
@@ -262,7 +263,7 @@ namespace boost
                     }
                 }
                 do_join=!local_thread_info->join_started;
-
+                
                 if(do_join)
                 {
                     local_thread_info->join_started=true;
@@ -283,7 +284,7 @@ namespace boost
                 local_thread_info->joined=true;
                 local_thread_info->done_condition.notify_all();
             }
-
+            
             lock_guard<mutex> l1(thread_info_mutex);
             if(thread_info==local_thread_info)
             {
@@ -306,7 +307,7 @@ namespace boost
             lock_guard<mutex> l1(thread_info_mutex);
             thread_info.swap(local_thread_info);
         }
-
+        
         if(local_thread_info)
         {
             lock_guard<mutex> lock(local_thread_info->data_mutex);
@@ -321,20 +322,20 @@ namespace boost
 
     namespace this_thread
     {
-
+        
         void sleep(const system_time& st)
         {
             detail::thread_data_base* const thread_info=detail::get_current_thread_data();
-
+        
             if(thread_info)
             {
                 unique_lock<mutex> lk(thread_info->sleep_mutex);
-                while(thread_info->sleep_condition.timed_wait(lk,st)) {}
+                while(thread_info->sleep_condition.timed_wait(lk,st));
             }
             else
             {
                 xtime const xt=get_xtime(st);
-
+            
                 for (int foo=0; foo < 5; ++foo)
                 {
 #   if defined(BOOST_HAS_PTHREAD_DELAY_NP)
@@ -344,7 +345,7 @@ namespace boost
 #   elif defined(BOOST_HAS_NANOSLEEP)
                     timespec ts;
                     to_timespec_duration(xt, ts);
-
+                
                     //  nanosleep takes a timespec that is an offset, not
                     //  an absolute time.
                     nanosleep(&ts, 0);
@@ -448,8 +449,8 @@ namespace boost
             return pthread_t();
         }
     }
-
-
+    
+    
 
     namespace this_thread
     {
@@ -472,13 +473,13 @@ namespace boost
                 }
             }
         }
-
+        
         bool interruption_enabled()
         {
             boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
             return thread_info && thread_info->interrupt_enabled;
         }
-
+        
         bool interruption_requested()
         {
             boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
@@ -501,7 +502,7 @@ namespace boost
                 detail::get_current_thread_data()->interrupt_enabled=false;
             }
         }
-
+        
         disable_interruption::~disable_interruption()
         {
             if(detail::get_current_thread_data())
@@ -517,7 +518,7 @@ namespace boost
                 detail::get_current_thread_data()->interrupt_enabled=true;
             }
         }
-
+        
         restore_interruption::~restore_interruption()
         {
             if(detail::get_current_thread_data())
@@ -574,7 +575,7 @@ namespace boost
             detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
             current_thread_data->tss_data.erase(key);
         }
-
+        
         void set_tss_data(void const* key,
                           boost::shared_ptr<tss_cleanup_function> func,
                           void* tss_data,bool cleanup_existing)
index 5ec3b1798a42ec3658b5e690a33aea94643fd967..b75a1353bb95eae891767b7112ca0d918ce540ae 100644 (file)
@@ -1,11 +1,14 @@
 // Copyright (C) 2001-2003
 // William E. Kempf
+// Copyright (C) 2009 Anthony Williams
 //
 //  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)
 
 // boostinspect:nounnamed
 
+#include <boost/assert.hpp>
+
 namespace {
 const int MILLISECONDS_PER_SECOND = 1000;
 const int NANOSECONDS_PER_SECOND = 1000000000;
@@ -18,7 +21,7 @@ inline void to_time(int milliseconds, boost::xtime& xt)
 {
     int res = 0;
     res = boost::xtime_get(&xt, boost::TIME_UTC);
-    assert(res == boost::TIME_UTC);
+    BOOST_ASSERT(res == boost::TIME_UTC);
 
     xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
     xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
@@ -55,7 +58,7 @@ inline void to_timespec_duration(const boost::xtime& xt, timespec& ts)
     boost::xtime cur;
     int res = 0;
     res = boost::xtime_get(&cur, boost::TIME_UTC);
-    assert(res == boost::TIME_UTC);
+    BOOST_ASSERT(res == boost::TIME_UTC);
 
     if (boost::xtime_cmp(xt, cur) <= 0)
     {
@@ -86,7 +89,7 @@ inline void to_duration(boost::xtime xt, int& milliseconds)
     boost::xtime cur;
     int res = 0;
     res = boost::xtime_get(&cur, boost::TIME_UTC);
-    assert(res == boost::TIME_UTC);
+    BOOST_ASSERT(res == boost::TIME_UTC);
 
     if (boost::xtime_cmp(xt, cur) <= 0)
         milliseconds = 0;
@@ -108,7 +111,7 @@ inline void to_microduration(boost::xtime xt, int& microseconds)
     boost::xtime cur;
     int res = 0;
     res = boost::xtime_get(&cur, boost::TIME_UTC);
-    assert(res == boost::TIME_UTC);
+    BOOST_ASSERT(res == boost::TIME_UTC);
 
     if (boost::xtime_cmp(xt, cur) <= 0)
         microseconds = 0;
index 46af8600a7d8a40526ba9ec570a5b5d4ae14b89a..b85e6505fa54d469e69048fcf5568e46f27eb468 100644 (file)
@@ -17,6 +17,7 @@
 #include <boost/thread/once.hpp>
 #include <boost/thread/tss.hpp>
 #include <boost/assert.hpp>
+#include <boost/throw_exception.hpp>
 #include <boost/thread/detail/tss_hooks.hpp>
 #include <boost/date_time/posix_time/conversion.hpp>
 
@@ -188,7 +189,7 @@ namespace boost
         uintptr_t const new_thread=_beginthreadex(0,0,&thread_start_function,thread_info.get(),CREATE_SUSPENDED,&thread_info->id);
         if(!new_thread)
         {
-            throw thread_resource_error();
+            boost::throw_exception(thread_resource_error());
         }
         intrusive_ptr_add_ref(thread_info.get());
         thread_info->thread_handle=(detail::win32::handle)(new_thread);
index 3e43ddf478282891e31bbe2026453ee6ae0b7525..e924e9b161ee49599b27441c29c5c590c55cf3c3 100644 (file)
@@ -42,6 +42,7 @@ rule thread-run ( sources )
           [ thread-run test_thread_move_return.cpp ]
           [ thread-run test_thread_launching.cpp ]
           [ thread-run test_thread_mf.cpp ]
+          [ thread-run test_thread_exit.cpp ]
           [ thread-run test_move_function.cpp ]
           [ thread-run test_mutex.cpp ]
           [ thread-run test_condition_notify_one.cpp ]
index c8af0e3d3704a22b817a851d2a8242cfd2b35d99..1e815d8234d34134c4f6fb8d2737dcfe72b6aa56 100644 (file)
@@ -1,4 +1,4 @@
-//  (C) Copyright 2008-9 Anthony Williams 
+//  (C) Copyright 2008-10 Anthony Williams 
 //
 //  Distributed under the Boost Software License, Version 1.0. (See
 //  accompanying file LICENSE_1_0.txt or copy at
@@ -14,7 +14,7 @@
 
 #include <boost/test/unit_test.hpp>
 
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     template<typename T>
     typename boost::remove_reference<T>::type&& cast_to_rval(T&& t)
     {
@@ -41,7 +41,7 @@ public:
     X():
         i(42)
     {}
-#ifdef BOOST_HAS_RVALUE_REFS
+#ifndef BOOST_NO_RVALUE_REFERENCES
     X(X&& other):
         i(other.i)
     {
@@ -89,7 +89,7 @@ void set_promise_exception_thread(boost::promise<int>* p)
 void test_store_value_from_thread()
 {
     boost::promise<int> pi2;
-    boost::unique_future<int> fi2=pi2.get_future();
+    boost::unique_future<int> fi2(pi2.get_future());
     boost::thread(set_promise_thread,&pi2);
     int j=fi2.get();
     BOOST_CHECK(j==42);
diff --git a/deal.II/contrib/boost/libs/thread/test/test_thread_exit.cpp b/deal.II/contrib/boost/libs/thread/test/test_thread_exit.cpp
new file mode 100644 (file)
index 0000000..b9e0c10
--- /dev/null
@@ -0,0 +1,73 @@
+//  (C) Copyright 2009 Anthony Williams 
+//
+//  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)
+
+#include "boost/thread/thread.hpp"
+#include "boost/thread/mutex.hpp"
+#include "boost/thread/condition.hpp"
+#include "boost/thread/future.hpp"
+#include <utility>
+#include <memory>
+#include <string>
+
+#include <boost/test/unit_test.hpp>
+
+boost::thread::id exit_func_thread_id;
+
+void exit_func()
+{
+    exit_func_thread_id=boost::this_thread::get_id();
+}
+
+void tf1()
+{
+    boost::this_thread::at_thread_exit(exit_func);
+    BOOST_CHECK(exit_func_thread_id!=boost::this_thread::get_id());
+}
+
+void test_thread_exit_func_runs_when_thread_exits()
+{
+    exit_func_thread_id=boost::thread::id();
+    boost::thread t(tf1);
+    boost::thread::id const t_id=t.get_id();
+    t.join();
+    BOOST_CHECK(exit_func_thread_id==t_id);
+}
+
+struct fo
+{
+    void operator()()
+    {
+        exit_func_thread_id=boost::this_thread::get_id();
+    }
+};
+
+void tf2()
+{
+    boost::this_thread::at_thread_exit(fo());
+    BOOST_CHECK(exit_func_thread_id!=boost::this_thread::get_id());
+}
+
+
+void test_can_use_function_object_for_exit_func()
+{
+    exit_func_thread_id=boost::thread::id();
+    boost::thread t(tf2);
+    boost::thread::id const t_id=t.get_id();
+    t.join();
+    BOOST_CHECK(exit_func_thread_id==t_id);
+}
+
+
+boost::unit_test_framework::test_suite* init_unit_test_suite(int, char*[])
+{
+    boost::unit_test_framework::test_suite* test =
+        BOOST_TEST_SUITE("Boost.Threads: futures test suite");
+
+    test->add(BOOST_TEST_CASE(test_thread_exit_func_runs_when_thread_exits));
+    test->add(BOOST_TEST_CASE(test_can_use_function_object_for_exit_func));
+
+    return test;
+}

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.