![]() |
Boost-Commit : |
From: daniel_james_at_[hidden]
Date: 2008-02-03 05:36:14
Author: danieljames
Date: 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
New Revision: 43063
URL: http://svn.boost.org/trac/boost/changeset/43063
Log:
Merge.
Added:
branches/fix-links/boost/graph/edmonds_karp_max_flow.hpp
- copied unchanged from r43061, /trunk/boost/graph/edmonds_karp_max_flow.hpp
branches/fix-links/boost/intrusive/detail/common_slist_algorithms.hpp
- copied unchanged from r43061, /trunk/boost/intrusive/detail/common_slist_algorithms.hpp
branches/fix-links/boost/ptr_container/clone_inserter.hpp
- copied unchanged from r43061, /trunk/boost/ptr_container/clone_inserter.hpp
branches/fix-links/boost/ptr_container/ptr_inserter.hpp
- copied unchanged from r43061, /trunk/boost/ptr_container/ptr_inserter.hpp
branches/fix-links/boost/xpressive/proto/detail/pop_front.hpp
- copied unchanged from r43061, /trunk/boost/xpressive/proto/detail/pop_front.hpp
branches/fix-links/boost/xpressive/proto/detail/reverse.hpp
- copied unchanged from r43061, /trunk/boost/xpressive/proto/detail/reverse.hpp
branches/fix-links/libs/graph/doc/edmonds_karp_max_flow.html
- copied unchanged from r43061, /trunk/libs/graph/doc/edmonds_karp_max_flow.html
branches/fix-links/libs/graph/example/edmonds-karp-eg.cpp
- copied unchanged from r43061, /trunk/libs/graph/example/edmonds-karp-eg.cpp
branches/fix-links/libs/iostreams/test/stream_offset_32bit_test.cpp
- copied unchanged from r43061, /trunk/libs/iostreams/test/stream_offset_32bit_test.cpp
branches/fix-links/libs/iostreams/test/stream_offset_64bit_test.cpp
- copied unchanged from r43061, /trunk/libs/iostreams/test/stream_offset_64bit_test.cpp
branches/fix-links/libs/ptr_container/test/ptr_inserter.cpp
- copied unchanged from r43061, /trunk/libs/ptr_container/test/ptr_inserter.cpp
branches/fix-links/libs/wave/test/testwave/testfiles/t_9_019.cpp
- copied unchanged from r43061, /trunk/libs/wave/test/testwave/testfiles/t_9_019.cpp
branches/fix-links/libs/wave/test/testwave/testfiles/t_9_019.hpp
- copied unchanged from r43061, /trunk/libs/wave/test/testwave/testfiles/t_9_019.hpp
branches/fix-links/libs/xpressive/proto/doc/concepts/
- copied from r43061, /trunk/libs/xpressive/proto/doc/concepts/
branches/fix-links/libs/xpressive/proto/doc/concepts/PolymorphicFunctionObject.xml
- copied unchanged from r43061, /trunk/libs/xpressive/proto/doc/concepts/PolymorphicFunctionObject.xml
branches/fix-links/libs/xpressive/proto/doc/concepts/PrimitiveTransform.xml
- copied unchanged from r43061, /trunk/libs/xpressive/proto/doc/concepts/PrimitiveTransform.xml
branches/fix-links/libs/xpressive/proto/doc/concepts/Transform.xml
- copied unchanged from r43061, /trunk/libs/xpressive/proto/doc/concepts/Transform.xml
branches/fix-links/libs/xpressive/proto/doc/proto.xml
- copied unchanged from r43061, /trunk/libs/xpressive/proto/doc/proto.xml
branches/fix-links/libs/xpressive/proto/doc/wave.sh
- copied unchanged from r43061, /trunk/libs/xpressive/proto/doc/wave.sh
branches/fix-links/libs/xpressive/proto/example/futures.cpp
- copied unchanged from r43061, /trunk/libs/xpressive/proto/example/futures.cpp
branches/fix-links/libs/xpressive/proto/test/deep_copy.cpp
- copied unchanged from r43061, /trunk/libs/xpressive/proto/test/deep_copy.cpp
branches/fix-links/libs/xpressive/proto/test/make_expr.cpp
- copied unchanged from r43061, /trunk/libs/xpressive/proto/test/make_expr.cpp
Removed:
branches/fix-links/boost/graph/edmunds_karp_max_flow.hpp
branches/fix-links/libs/graph/doc/edmunds_karp_max_flow.html
branches/fix-links/libs/graph/example/edmunds-karp-eg.cpp
Properties modified:
branches/fix-links/ (props changed)
Text files modified:
branches/fix-links/Jamroot | 2
branches/fix-links/boost/asio/buffer.hpp | 5
branches/fix-links/boost/asio/detail/old_win_sdk_compat.hpp | 16
branches/fix-links/boost/asio/detail/socket_ops.hpp | 3
branches/fix-links/boost/circular_buffer/base.hpp | 10
branches/fix-links/boost/circular_buffer/details.hpp | 2
branches/fix-links/boost/circular_buffer/space_optimized.hpp | 5
branches/fix-links/boost/function_types/detail/pp_arity_loop.hpp | 12
branches/fix-links/boost/function_types/detail/pp_cc_loop/master.hpp | 8
branches/fix-links/boost/function_types/detail/pp_cc_loop/preprocessed.hpp | 18
branches/fix-links/boost/function_types/detail/pp_loop.hpp | 4
branches/fix-links/boost/function_types/detail/pp_variate_loop/master.hpp | 2
branches/fix-links/boost/function_types/detail/pp_variate_loop/preprocessed.hpp | 40
branches/fix-links/boost/function_types/is_member_object_pointer.hpp | 4
branches/fix-links/boost/function_types/property_tags.hpp | 2
branches/fix-links/boost/functional/hash/hash.hpp | 8
branches/fix-links/boost/graph/edge_connectivity.hpp | 4
branches/fix-links/boost/interprocess/allocators/allocator.hpp | 10
branches/fix-links/boost/interprocess/allocators/detail/adaptive_node_pool.hpp | 159 ++++---
branches/fix-links/boost/interprocess/allocators/detail/allocator_common.hpp | 2
branches/fix-links/boost/interprocess/allocators/detail/node_pool.hpp | 53 +-
branches/fix-links/boost/interprocess/containers/deque.hpp | 5
branches/fix-links/boost/interprocess/containers/detail/node_alloc_holder.hpp | 5
branches/fix-links/boost/interprocess/containers/slist.hpp | 22
branches/fix-links/boost/interprocess/containers/string.hpp | 2
branches/fix-links/boost/interprocess/containers/vector.hpp | 2
branches/fix-links/boost/interprocess/detail/algorithms.hpp | 2
branches/fix-links/boost/interprocess/detail/managed_open_or_create_impl.hpp | 3
branches/fix-links/boost/interprocess/detail/segment_manager_helper.hpp | 2
branches/fix-links/boost/interprocess/detail/utilities.hpp | 48 ++
branches/fix-links/boost/interprocess/indexes/iunordered_set_index.hpp | 5
branches/fix-links/boost/interprocess/mem_algo/detail/mem_algo_common.hpp | 101 +---
branches/fix-links/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp | 1
branches/fix-links/boost/interprocess/mem_algo/rbtree_best_fit.hpp | 2
branches/fix-links/boost/interprocess/segment_manager.hpp | 13
branches/fix-links/boost/interprocess/smart_ptr/detail/shared_count.hpp | 2
branches/fix-links/boost/intrusive/circular_list_algorithms.hpp | 7
branches/fix-links/boost/intrusive/circular_slist_algorithms.hpp | 269 ++++++-------
branches/fix-links/boost/intrusive/hashtable.hpp | 2
branches/fix-links/boost/intrusive/intrusive_fwd.hpp | 1
branches/fix-links/boost/intrusive/linear_slist_algorithms.hpp | 200 ++++----
branches/fix-links/boost/intrusive/list.hpp | 169 +++----
branches/fix-links/boost/intrusive/options.hpp | 14
branches/fix-links/boost/intrusive/slist.hpp | 493 ++++++++++++++++-------
branches/fix-links/boost/iostreams/categories.hpp | 3
branches/fix-links/boost/iostreams/chain.hpp | 3
branches/fix-links/boost/iostreams/char_traits.hpp | 3
branches/fix-links/boost/iostreams/checked_operations.hpp | 3
branches/fix-links/boost/iostreams/close.hpp | 3
branches/fix-links/boost/iostreams/code_converter.hpp | 3
branches/fix-links/boost/iostreams/combine.hpp | 3
branches/fix-links/boost/iostreams/compose.hpp | 3
branches/fix-links/boost/iostreams/concepts.hpp | 15
branches/fix-links/boost/iostreams/constants.hpp | 3
branches/fix-links/boost/iostreams/copy.hpp | 3
branches/fix-links/boost/iostreams/detail/access_control.hpp | 3
branches/fix-links/boost/iostreams/detail/adapter/concept_adapter.hpp | 3
branches/fix-links/boost/iostreams/detail/adapter/device_adapter.hpp | 3
branches/fix-links/boost/iostreams/detail/adapter/direct_adapter.hpp | 3
branches/fix-links/boost/iostreams/detail/adapter/filter_adapter.hpp | 3
branches/fix-links/boost/iostreams/detail/adapter/mode_adapter.hpp | 3
branches/fix-links/boost/iostreams/detail/adapter/non_blocking_adapter.hpp | 3
branches/fix-links/boost/iostreams/detail/adapter/output_iterator_adapter.hpp | 3
branches/fix-links/boost/iostreams/detail/adapter/range_adapter.hpp | 3
branches/fix-links/boost/iostreams/detail/add_facet.hpp | 3
branches/fix-links/boost/iostreams/detail/bool_trait_def.hpp | 3
branches/fix-links/boost/iostreams/detail/broken_overload_resolution/forward.hpp | 3
branches/fix-links/boost/iostreams/detail/broken_overload_resolution/stream.hpp | 3
branches/fix-links/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp | 3
branches/fix-links/boost/iostreams/detail/buffer.hpp | 3
branches/fix-links/boost/iostreams/detail/call_traits.hpp | 3
branches/fix-links/boost/iostreams/detail/char_traits.hpp | 3
branches/fix-links/boost/iostreams/detail/codecvt_helper.hpp | 3
branches/fix-links/boost/iostreams/detail/codecvt_holder.hpp | 3
branches/fix-links/boost/iostreams/detail/config/auto_link.hpp | 3
branches/fix-links/boost/iostreams/detail/config/bzip2.hpp | 3
branches/fix-links/boost/iostreams/detail/config/codecvt.hpp | 3
branches/fix-links/boost/iostreams/detail/config/disable_warnings.hpp | 3
branches/fix-links/boost/iostreams/detail/config/dyn_link.hpp | 3
branches/fix-links/boost/iostreams/detail/config/enable_warnings.hpp | 3
branches/fix-links/boost/iostreams/detail/config/fpos.hpp | 3
branches/fix-links/boost/iostreams/detail/config/gcc.hpp | 3
branches/fix-links/boost/iostreams/detail/config/limits.hpp | 3
branches/fix-links/boost/iostreams/detail/config/overload_resolution.hpp | 3
branches/fix-links/boost/iostreams/detail/config/rtl.hpp | 3
branches/fix-links/boost/iostreams/detail/config/wide_streams.hpp | 3
branches/fix-links/boost/iostreams/detail/config/windows_posix.hpp | 4
branches/fix-links/boost/iostreams/detail/config/zlib.hpp | 3
branches/fix-links/boost/iostreams/detail/counted_array.hpp | 3
branches/fix-links/boost/iostreams/detail/default_arg.hpp | 3
branches/fix-links/boost/iostreams/detail/dispatch.hpp | 3
branches/fix-links/boost/iostreams/detail/double_object.hpp | 3
branches/fix-links/boost/iostreams/detail/enable_if_stream.hpp | 3
branches/fix-links/boost/iostreams/detail/error.hpp | 3
branches/fix-links/boost/iostreams/detail/execute.hpp | 3
branches/fix-links/boost/iostreams/detail/forward.hpp | 3
branches/fix-links/boost/iostreams/detail/fstream.hpp | 3
branches/fix-links/boost/iostreams/detail/functional.hpp | 3
branches/fix-links/boost/iostreams/detail/ios.hpp | 3
branches/fix-links/boost/iostreams/detail/iostream.hpp | 3
branches/fix-links/boost/iostreams/detail/is_dereferenceable.hpp | 3
branches/fix-links/boost/iostreams/detail/is_iterator_range.hpp | 3
branches/fix-links/boost/iostreams/detail/newline.hpp | 3
branches/fix-links/boost/iostreams/detail/optional.hpp | 3
branches/fix-links/boost/iostreams/detail/param_type.hpp | 3
branches/fix-links/boost/iostreams/detail/push.hpp | 3
branches/fix-links/boost/iostreams/detail/push_params.hpp | 3
branches/fix-links/boost/iostreams/detail/resolve.hpp | 3
branches/fix-links/boost/iostreams/detail/restrict_impl.hpp | 3
branches/fix-links/boost/iostreams/detail/select.hpp | 3
branches/fix-links/boost/iostreams/detail/select_by_size.hpp | 3
branches/fix-links/boost/iostreams/detail/streambuf.hpp | 3
branches/fix-links/boost/iostreams/detail/streambuf/chainbuf.hpp | 3
branches/fix-links/boost/iostreams/detail/streambuf/direct_streambuf.hpp | 3
branches/fix-links/boost/iostreams/detail/streambuf/indirect_streambuf.hpp | 3
branches/fix-links/boost/iostreams/detail/streambuf/linked_streambuf.hpp | 8
branches/fix-links/boost/iostreams/detail/system_failure.hpp | 3
branches/fix-links/boost/iostreams/detail/template_params.hpp | 3
branches/fix-links/boost/iostreams/detail/translate_int_type.hpp | 3
branches/fix-links/boost/iostreams/detail/vc6/close.hpp | 3
branches/fix-links/boost/iostreams/detail/vc6/read.hpp | 3
branches/fix-links/boost/iostreams/detail/vc6/write.hpp | 3
branches/fix-links/boost/iostreams/detail/wrap_unwrap.hpp | 3
branches/fix-links/boost/iostreams/device/array.hpp | 3
branches/fix-links/boost/iostreams/device/back_inserter.hpp | 3
branches/fix-links/boost/iostreams/device/file.hpp | 3
branches/fix-links/boost/iostreams/device/file_descriptor.hpp | 21
branches/fix-links/boost/iostreams/device/mapped_file.hpp | 3
branches/fix-links/boost/iostreams/device/null.hpp | 3
branches/fix-links/boost/iostreams/filter/aggregate.hpp | 3
branches/fix-links/boost/iostreams/filter/bzip2.hpp | 3
branches/fix-links/boost/iostreams/filter/counter.hpp | 3
branches/fix-links/boost/iostreams/filter/gzip.hpp | 3
branches/fix-links/boost/iostreams/filter/line.hpp | 3
branches/fix-links/boost/iostreams/filter/newline.hpp | 3
branches/fix-links/boost/iostreams/filter/regex.hpp | 11
branches/fix-links/boost/iostreams/filter/stdio.hpp | 3
branches/fix-links/boost/iostreams/filter/symmetric.hpp | 3
branches/fix-links/boost/iostreams/filter/test.hpp | 3
branches/fix-links/boost/iostreams/filter/zlib.hpp | 3
branches/fix-links/boost/iostreams/filtering_stream.hpp | 3
branches/fix-links/boost/iostreams/filtering_streambuf.hpp | 3
branches/fix-links/boost/iostreams/flush.hpp | 3
branches/fix-links/boost/iostreams/get.hpp | 3
branches/fix-links/boost/iostreams/imbue.hpp | 3
branches/fix-links/boost/iostreams/input_sequence.hpp | 3
branches/fix-links/boost/iostreams/invert.hpp | 3
branches/fix-links/boost/iostreams/operations.hpp | 3
branches/fix-links/boost/iostreams/operations_fwd.hpp | 3
branches/fix-links/boost/iostreams/optimal_buffer_size.hpp | 3
branches/fix-links/boost/iostreams/output_sequence.hpp | 3
branches/fix-links/boost/iostreams/pipeline.hpp | 3
branches/fix-links/boost/iostreams/positioning.hpp | 3
branches/fix-links/boost/iostreams/put.hpp | 3
branches/fix-links/boost/iostreams/putback.hpp | 3
branches/fix-links/boost/iostreams/read.hpp | 3
branches/fix-links/boost/iostreams/restrict.hpp | 4
branches/fix-links/boost/iostreams/seek.hpp | 3
branches/fix-links/boost/iostreams/skip.hpp | 3
branches/fix-links/boost/iostreams/slice.hpp | 4
branches/fix-links/boost/iostreams/stream.hpp | 3
branches/fix-links/boost/iostreams/stream_buffer.hpp | 3
branches/fix-links/boost/iostreams/tee.hpp | 3
branches/fix-links/boost/iostreams/traits.hpp | 3
branches/fix-links/boost/iostreams/traits_fwd.hpp | 3
branches/fix-links/boost/iostreams/write.hpp | 3
branches/fix-links/boost/regex/pending/unicode_iterator.hpp | 1
branches/fix-links/boost/regex/v4/basic_regex_creator.hpp | 13
branches/fix-links/boost/regex/v4/perl_matcher_non_recursive.hpp | 9
branches/fix-links/boost/spirit/tree/impl/tree_to_xml.ipp | 2
branches/fix-links/boost/test/impl/execution_monitor.ipp | 2
branches/fix-links/boost/test/test_tools.hpp | 1
branches/fix-links/boost/unordered/detail/hash_table.hpp | 12
branches/fix-links/boost/unordered/detail/hash_table_impl.hpp | 8
branches/fix-links/boost/utility/value_init.hpp | 26
branches/fix-links/boost/wave/util/cpp_macromap.hpp | 39 +
branches/fix-links/boost/wave/util/flex_string.hpp | 2
branches/fix-links/boost/wave/wave_config.hpp | 17
branches/fix-links/boost/xpressive/basic_regex.hpp | 4
branches/fix-links/boost/xpressive/detail/core/access.hpp | 2
branches/fix-links/boost/xpressive/detail/core/action.hpp | 2
branches/fix-links/boost/xpressive/detail/core/adaptor.hpp | 2
branches/fix-links/boost/xpressive/detail/core/finder.hpp | 24 +
branches/fix-links/boost/xpressive/detail/core/flow_control.hpp | 2
branches/fix-links/boost/xpressive/detail/core/icase.hpp | 2
branches/fix-links/boost/xpressive/detail/core/linker.hpp | 28 +
branches/fix-links/boost/xpressive/detail/core/matcher/action_matcher.hpp | 73 ++-
branches/fix-links/boost/xpressive/detail/core/matcher/alternate_end_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/alternate_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/any_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/assert_bol_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/assert_bos_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/assert_eol_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/assert_eos_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/assert_line_base.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/assert_word_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/attr_begin_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/attr_end_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/attr_matcher.hpp | 4
branches/fix-links/boost/xpressive/detail/core/matcher/charset_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/end_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/epsilon_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/keeper_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/literal_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/logical_newline_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/lookahead_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/lookbehind_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/mark_begin_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/mark_end_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/mark_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/optional_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/posix_charset_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/predicate_matcher.hpp | 4
branches/fix-links/boost/xpressive/detail/core/matcher/range_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/regex_byref_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/regex_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/repeat_begin_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/repeat_end_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/set_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp | 28 +
branches/fix-links/boost/xpressive/detail/core/matcher/string_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matcher/true_matcher.hpp | 2
branches/fix-links/boost/xpressive/detail/core/matchers.hpp | 2
branches/fix-links/boost/xpressive/detail/core/optimize.hpp | 11
branches/fix-links/boost/xpressive/detail/core/peeker.hpp | 74 ++-
branches/fix-links/boost/xpressive/detail/core/quant_style.hpp | 2
branches/fix-links/boost/xpressive/detail/core/regex_impl.hpp | 2
branches/fix-links/boost/xpressive/detail/core/results_cache.hpp | 2
branches/fix-links/boost/xpressive/detail/core/state.hpp | 4
branches/fix-links/boost/xpressive/detail/core/sub_match_impl.hpp | 2
branches/fix-links/boost/xpressive/detail/core/sub_match_vector.hpp | 2
branches/fix-links/boost/xpressive/detail/detail_fwd.hpp | 2
branches/fix-links/boost/xpressive/detail/dynamic/dynamic.hpp | 2
branches/fix-links/boost/xpressive/detail/dynamic/matchable.hpp | 2
branches/fix-links/boost/xpressive/detail/dynamic/parse_charset.hpp | 2
branches/fix-links/boost/xpressive/detail/dynamic/parser.hpp | 2
branches/fix-links/boost/xpressive/detail/dynamic/parser_enum.hpp | 2
branches/fix-links/boost/xpressive/detail/dynamic/parser_traits.hpp | 2
branches/fix-links/boost/xpressive/detail/dynamic/sequence.hpp | 2
branches/fix-links/boost/xpressive/detail/static/compile.hpp | 2
branches/fix-links/boost/xpressive/detail/static/grammar.hpp | 2
branches/fix-links/boost/xpressive/detail/static/is_pure.hpp | 2
branches/fix-links/boost/xpressive/detail/static/modifier.hpp | 2
branches/fix-links/boost/xpressive/detail/static/placeholders.hpp | 2
branches/fix-links/boost/xpressive/detail/static/static.hpp | 2
branches/fix-links/boost/xpressive/detail/static/transforms/as_action.hpp | 109 ++--
branches/fix-links/boost/xpressive/detail/static/transforms/as_alternate.hpp | 20
branches/fix-links/boost/xpressive/detail/static/transforms/as_independent.hpp | 27
branches/fix-links/boost/xpressive/detail/static/transforms/as_inverse.hpp | 4
branches/fix-links/boost/xpressive/detail/static/transforms/as_marker.hpp | 24
branches/fix-links/boost/xpressive/detail/static/transforms/as_matcher.hpp | 7
branches/fix-links/boost/xpressive/detail/static/transforms/as_modifier.hpp | 7
branches/fix-links/boost/xpressive/detail/static/transforms/as_quantifier.hpp | 123 ++---
branches/fix-links/boost/xpressive/detail/static/transforms/as_sequence.hpp | 15
branches/fix-links/boost/xpressive/detail/static/transforms/as_set.hpp | 18
branches/fix-links/boost/xpressive/detail/static/transmogrify.hpp | 2
branches/fix-links/boost/xpressive/detail/static/type_traits.hpp | 2
branches/fix-links/boost/xpressive/detail/static/visitor.hpp | 2
branches/fix-links/boost/xpressive/detail/static/width_of.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/algorithm.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/any.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/boyer_moore.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/chset/chset.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/cons.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/dont_care.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/hash_peek_bitset.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/ignore_unused.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/literals.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/never_true.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/save_restore.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/sequence_stack.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/tracking_ptr.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/traits_utils.hpp | 2
branches/fix-links/boost/xpressive/detail/utility/width.hpp | 2
branches/fix-links/boost/xpressive/match_results.hpp | 6
branches/fix-links/boost/xpressive/proto/args.hpp | 2
branches/fix-links/boost/xpressive/proto/context.hpp | 2
branches/fix-links/boost/xpressive/proto/context/callable.hpp | 2
branches/fix-links/boost/xpressive/proto/context/default.hpp | 2
branches/fix-links/boost/xpressive/proto/context/null.hpp | 4
branches/fix-links/boost/xpressive/proto/debug.hpp | 54 +
branches/fix-links/boost/xpressive/proto/deep_copy.hpp | 83 +++
branches/fix-links/boost/xpressive/proto/detail/as_lvalue.hpp | 2
branches/fix-links/boost/xpressive/proto/detail/dont_care.hpp | 2
branches/fix-links/boost/xpressive/proto/detail/funop.hpp | 8
branches/fix-links/boost/xpressive/proto/detail/prefix.hpp | 2
branches/fix-links/boost/xpressive/proto/detail/suffix.hpp | 2
branches/fix-links/boost/xpressive/proto/domain.hpp | 101 ++++
branches/fix-links/boost/xpressive/proto/eval.hpp | 45 +
branches/fix-links/boost/xpressive/proto/expr.hpp | 135 +++---
branches/fix-links/boost/xpressive/proto/extends.hpp | 363 +++++++++++------
branches/fix-links/boost/xpressive/proto/fusion.hpp | 278 ++++++++++---
branches/fix-links/boost/xpressive/proto/generate.hpp | 93 +++-
branches/fix-links/boost/xpressive/proto/literal.hpp | 25
branches/fix-links/boost/xpressive/proto/make_expr.hpp | 496 +++++++++++++++---------
branches/fix-links/boost/xpressive/proto/matches.hpp | 96 +++-
branches/fix-links/boost/xpressive/proto/operators.hpp | 44 -
branches/fix-links/boost/xpressive/proto/proto.hpp | 2
branches/fix-links/boost/xpressive/proto/proto_fwd.hpp | 203 +++------
branches/fix-links/boost/xpressive/proto/proto_typeof.hpp | 2
branches/fix-links/boost/xpressive/proto/ref.hpp | 7
branches/fix-links/boost/xpressive/proto/tags.hpp | 4
branches/fix-links/boost/xpressive/proto/traits.hpp | 55 +
branches/fix-links/boost/xpressive/proto/transform.hpp | 2
branches/fix-links/boost/xpressive/proto/transform/arg.hpp | 65 ++
branches/fix-links/boost/xpressive/proto/transform/bind.hpp | 32
branches/fix-links/boost/xpressive/proto/transform/call.hpp | 146 ++++--
branches/fix-links/boost/xpressive/proto/transform/fold.hpp | 187 ++++++--
branches/fix-links/boost/xpressive/proto/transform/fold_tree.hpp | 33
branches/fix-links/boost/xpressive/proto/transform/make.hpp | 41 +
branches/fix-links/boost/xpressive/proto/transform/pass_through.hpp | 67 ++-
branches/fix-links/boost/xpressive/proto/transform/when.hpp | 31
branches/fix-links/boost/xpressive/regex_actions.hpp | 2
branches/fix-links/boost/xpressive/regex_algorithms.hpp | 6
branches/fix-links/boost/xpressive/regex_compiler.hpp | 4
branches/fix-links/boost/xpressive/regex_constants.hpp | 2
branches/fix-links/boost/xpressive/regex_error.hpp | 2
branches/fix-links/boost/xpressive/regex_iterator.hpp | 11
branches/fix-links/boost/xpressive/regex_primitives.hpp | 145 ++++--
branches/fix-links/boost/xpressive/regex_token_iterator.hpp | 14
branches/fix-links/boost/xpressive/regex_traits.hpp | 2
branches/fix-links/boost/xpressive/sub_match.hpp | 2
branches/fix-links/boost/xpressive/traits/c_regex_traits.hpp | 2
branches/fix-links/boost/xpressive/traits/cpp_regex_traits.hpp | 2
branches/fix-links/boost/xpressive/traits/detail/c_ctype.hpp | 2
branches/fix-links/boost/xpressive/traits/null_regex_traits.hpp | 2
branches/fix-links/boost/xpressive/xpressive.hpp | 2
branches/fix-links/boost/xpressive/xpressive_dynamic.hpp | 2
branches/fix-links/boost/xpressive/xpressive_fwd.hpp | 2
branches/fix-links/boost/xpressive/xpressive_static.hpp | 2
branches/fix-links/boost/xpressive/xpressive_typeof.hpp | 2
branches/fix-links/libs/accumulators/doc/Jamfile.v2 | 6
branches/fix-links/libs/circular_buffer/doc/circular_buffer.html | 52 ++
branches/fix-links/libs/circular_buffer/doc/space_optimized.html | 22 +
branches/fix-links/libs/circular_buffer/test/base_test.cpp | 1
branches/fix-links/libs/circular_buffer/test/common.ipp | 4
branches/fix-links/libs/function_types/build/timestamps/cc_names | 3
branches/fix-links/libs/function_types/build/timestamps/encoding | 2
branches/fix-links/libs/functional/hash/test/hash_number_test.cpp | 4
branches/fix-links/libs/gil/test/image.cpp | 1
branches/fix-links/libs/graph/doc/kolmogorov_max_flow.html | 2
branches/fix-links/libs/graph/doc/push_relabel_max_flow.html | 2
branches/fix-links/libs/graph/example/edge-connectivity.cpp | 4
branches/fix-links/libs/graph/example/regression.cfg | 2
branches/fix-links/libs/graph/test/max_flow_test.cpp | 6
branches/fix-links/libs/interprocess/test/file_mapping_test.cpp | 9
branches/fix-links/libs/interprocess/test/get_process_id_name.hpp | 5
branches/fix-links/libs/interprocess/test/list_test.hpp | 30
branches/fix-links/libs/interprocess/test/memory_algorithm_test.cpp | 8
branches/fix-links/libs/intrusive/proj/vc7ide/_intrusivelib/_intrusivelib.vcproj | 3
branches/fix-links/libs/intrusive/test/itestvalue.hpp | 12
branches/fix-links/libs/intrusive/test/list_test.cpp | 58 ++
branches/fix-links/libs/intrusive/test/slist_test.cpp | 227 +++++++++-
branches/fix-links/libs/iostreams/build/Jamfile.v2 | 6
branches/fix-links/libs/iostreams/doc/acknowledgments.html | 8
branches/fix-links/libs/iostreams/doc/bibliography.html | 8
branches/fix-links/libs/iostreams/doc/classes/aggregate.html | 8
branches/fix-links/libs/iostreams/doc/classes/array.html | 8
branches/fix-links/libs/iostreams/doc/classes/back_inserter.html | 8
branches/fix-links/libs/iostreams/doc/classes/bzip2.html | 8
branches/fix-links/libs/iostreams/doc/classes/chain.html | 8
branches/fix-links/libs/iostreams/doc/classes/char_traits.html | 8
branches/fix-links/libs/iostreams/doc/classes/classes.html | 8
branches/fix-links/libs/iostreams/doc/classes/code_converter.html | 8
branches/fix-links/libs/iostreams/doc/classes/counter.html | 8
branches/fix-links/libs/iostreams/doc/classes/device.html | 8
branches/fix-links/libs/iostreams/doc/classes/file.html | 8
branches/fix-links/libs/iostreams/doc/classes/file_descriptor.html | 8
branches/fix-links/libs/iostreams/doc/classes/filter.html | 8
branches/fix-links/libs/iostreams/doc/classes/filtering_stream.html | 8
branches/fix-links/libs/iostreams/doc/classes/filtering_streambuf.html | 8
branches/fix-links/libs/iostreams/doc/classes/gzip.html | 8
branches/fix-links/libs/iostreams/doc/classes/line_filter.html | 8
branches/fix-links/libs/iostreams/doc/classes/mapped_file.html | 8
branches/fix-links/libs/iostreams/doc/classes/mode.html | 8
branches/fix-links/libs/iostreams/doc/classes/newline_filter.html | 8
branches/fix-links/libs/iostreams/doc/classes/null.html | 10
branches/fix-links/libs/iostreams/doc/classes/regex_filter.html | 8
branches/fix-links/libs/iostreams/doc/classes/stdio_filter.html | 8
branches/fix-links/libs/iostreams/doc/classes/symmetric_filter.html | 8
branches/fix-links/libs/iostreams/doc/classes/zlib.html | 8
branches/fix-links/libs/iostreams/doc/concepts/bidirectional_device.html | 8
branches/fix-links/libs/iostreams/doc/concepts/bidirectional_filter.html | 8
branches/fix-links/libs/iostreams/doc/concepts/blocking.html | 8
branches/fix-links/libs/iostreams/doc/concepts/closable.html | 8
branches/fix-links/libs/iostreams/doc/concepts/concepts.html | 8
branches/fix-links/libs/iostreams/doc/concepts/device.html | 8
branches/fix-links/libs/iostreams/doc/concepts/direct.html | 8
branches/fix-links/libs/iostreams/doc/concepts/dual_use_filter.html | 8
branches/fix-links/libs/iostreams/doc/concepts/filter.html | 8
branches/fix-links/libs/iostreams/doc/concepts/flushable.html | 8
branches/fix-links/libs/iostreams/doc/concepts/input_filter.html | 8
branches/fix-links/libs/iostreams/doc/concepts/localizable.html | 8
branches/fix-links/libs/iostreams/doc/concepts/multi-character.html | 6
branches/fix-links/libs/iostreams/doc/concepts/multi_character.html | 8
branches/fix-links/libs/iostreams/doc/concepts/optimally_buffered.html | 8
branches/fix-links/libs/iostreams/doc/concepts/output_filter.html | 8
branches/fix-links/libs/iostreams/doc/concepts/peekable.html | 8
branches/fix-links/libs/iostreams/doc/concepts/pipable.html | 8
branches/fix-links/libs/iostreams/doc/concepts/seekable_device.html | 8
branches/fix-links/libs/iostreams/doc/concepts/seekable_filter.html | 8
branches/fix-links/libs/iostreams/doc/concepts/sink.html | 8
branches/fix-links/libs/iostreams/doc/concepts/source.html | 8
branches/fix-links/libs/iostreams/doc/concepts/symmetric_filter.html | 8
branches/fix-links/libs/iostreams/doc/faq.html | 8
branches/fix-links/libs/iostreams/doc/functions/close.html | 8
branches/fix-links/libs/iostreams/doc/functions/combine.html | 8
branches/fix-links/libs/iostreams/doc/functions/compose.html | 8
branches/fix-links/libs/iostreams/doc/functions/copy.html | 8
branches/fix-links/libs/iostreams/doc/functions/filter_test.html | 8
branches/fix-links/libs/iostreams/doc/functions/flush.html | 8
branches/fix-links/libs/iostreams/doc/functions/functions.html | 8
branches/fix-links/libs/iostreams/doc/functions/get.html | 8
branches/fix-links/libs/iostreams/doc/functions/imbue.html | 8
branches/fix-links/libs/iostreams/doc/functions/invert.html | 8
branches/fix-links/libs/iostreams/doc/functions/optimal_buffer_size.html | 8
branches/fix-links/libs/iostreams/doc/functions/positioning.html | 8
branches/fix-links/libs/iostreams/doc/functions/put.html | 8
branches/fix-links/libs/iostreams/doc/functions/putback.html | 8
branches/fix-links/libs/iostreams/doc/functions/read.html | 8
branches/fix-links/libs/iostreams/doc/functions/restrict.html | 8
branches/fix-links/libs/iostreams/doc/functions/seek.html | 8
branches/fix-links/libs/iostreams/doc/functions/tee.html | 8
branches/fix-links/libs/iostreams/doc/functions/write.html | 8
branches/fix-links/libs/iostreams/doc/guide/asynchronous.html | 8
branches/fix-links/libs/iostreams/doc/guide/buffering.html | 8
branches/fix-links/libs/iostreams/doc/guide/code_conversion.html | 8
branches/fix-links/libs/iostreams/doc/guide/concepts.html | 8
branches/fix-links/libs/iostreams/doc/guide/exceptions.html | 8
branches/fix-links/libs/iostreams/doc/guide/filtering_streams.html | 8
branches/fix-links/libs/iostreams/doc/guide/generic_streams.html | 8
branches/fix-links/libs/iostreams/doc/guide/guide.html | 8
branches/fix-links/libs/iostreams/doc/guide/lifetimes.html | 8
branches/fix-links/libs/iostreams/doc/guide/modes.html | 8
branches/fix-links/libs/iostreams/doc/guide/pipelines.html | 8
branches/fix-links/libs/iostreams/doc/guide/text_processing.html | 8
branches/fix-links/libs/iostreams/doc/guide/traits.html | 2
branches/fix-links/libs/iostreams/doc/guide/views.html | 8
branches/fix-links/libs/iostreams/doc/home.html | 8
branches/fix-links/libs/iostreams/doc/index.html | 2
branches/fix-links/libs/iostreams/doc/installation.html | 8
branches/fix-links/libs/iostreams/doc/macros/buffer_sizes.html | 8
branches/fix-links/libs/iostreams/doc/macros/macros.html | 8
branches/fix-links/libs/iostreams/doc/macros/workarounds.html | 8
branches/fix-links/libs/iostreams/doc/portability.html | 8
branches/fix-links/libs/iostreams/doc/quick_reference.html | 8
branches/fix-links/libs/iostreams/doc/rationale.html | 8
branches/fix-links/libs/iostreams/doc/reference.html | 8
branches/fix-links/libs/iostreams/doc/theme/iostreams.css | 7
branches/fix-links/libs/iostreams/doc/tree/tree.css | 3
branches/fix-links/libs/iostreams/doc/tree/tree.js | 3
branches/fix-links/libs/iostreams/doc/tutorial/container_device.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/container_sink.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/container_source.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/dictionary_filters.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/dual_use_filters.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/filter_usage.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/finite_state_filters.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/line_wrapping_filters.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/multichar_filters.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/shell_comments_filters.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/tab_expanding_filters.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/tutorial.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/unix2dos_filters.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/writing_devices.html | 8
branches/fix-links/libs/iostreams/doc/tutorial/writing_filters.html | 8
branches/fix-links/libs/iostreams/example/boost_back_inserter_example.cpp | 3
branches/fix-links/libs/iostreams/example/container_device.hpp | 3
branches/fix-links/libs/iostreams/example/container_device_example.cpp | 3
branches/fix-links/libs/iostreams/example/container_sink_example.cpp | 3
branches/fix-links/libs/iostreams/example/container_source_example.cpp | 3
branches/fix-links/libs/iostreams/example/dictionary_filter.hpp | 3
branches/fix-links/libs/iostreams/example/finite_state_filter.hpp | 3
branches/fix-links/libs/iostreams/example/iterator_range_example.cpp | 3
branches/fix-links/libs/iostreams/example/line_wrapping_filter.hpp | 3
branches/fix-links/libs/iostreams/example/shell_comments_filter.hpp | 3
branches/fix-links/libs/iostreams/example/std_back_inserter_example.cpp | 3
branches/fix-links/libs/iostreams/example/tab_expanding_filter.hpp | 3
branches/fix-links/libs/iostreams/example/unix2dos_filter.hpp | 3
branches/fix-links/libs/iostreams/src/bzip2.cpp | 3
branches/fix-links/libs/iostreams/src/file_descriptor.cpp | 14
branches/fix-links/libs/iostreams/src/mapped_file.cpp | 12
branches/fix-links/libs/iostreams/src/zlib.cpp | 3
branches/fix-links/libs/iostreams/test/Jamfile.v2 | 3
branches/fix-links/libs/iostreams/test/array_test.cpp | 3
branches/fix-links/libs/iostreams/test/auto_close_test.cpp | 3
branches/fix-links/libs/iostreams/test/buffer_size_test.cpp | 3
branches/fix-links/libs/iostreams/test/bzip2_test.cpp | 3
branches/fix-links/libs/iostreams/test/close_test.cpp | 3
branches/fix-links/libs/iostreams/test/code_converter_test.cpp | 3
branches/fix-links/libs/iostreams/test/combine_test.cpp | 3
branches/fix-links/libs/iostreams/test/component_access_test.cpp | 3
branches/fix-links/libs/iostreams/test/compose_test.cpp | 3
branches/fix-links/libs/iostreams/test/copy_test.cpp | 3
branches/fix-links/libs/iostreams/test/counter_test.cpp | 3
branches/fix-links/libs/iostreams/test/detail/closable.hpp | 3
branches/fix-links/libs/iostreams/test/detail/constants.hpp | 3
branches/fix-links/libs/iostreams/test/detail/filters.hpp | 3
branches/fix-links/libs/iostreams/test/detail/null_padded_codecvt.hpp | 3
branches/fix-links/libs/iostreams/test/detail/operation_sequence.hpp | 3
branches/fix-links/libs/iostreams/test/detail/sequence.hpp | 3
branches/fix-links/libs/iostreams/test/detail/temp_file.hpp | 3
branches/fix-links/libs/iostreams/test/detail/verification.hpp | 3
branches/fix-links/libs/iostreams/test/direct_adapter_test.cpp | 3
branches/fix-links/libs/iostreams/test/example_test.cpp | 3
branches/fix-links/libs/iostreams/test/execute_test.cpp | 3
branches/fix-links/libs/iostreams/test/file_descriptor_test.cpp | 3
branches/fix-links/libs/iostreams/test/file_test.cpp | 3
branches/fix-links/libs/iostreams/test/filter_test.cpp | 3
branches/fix-links/libs/iostreams/test/filtering_stream_test.cpp | 3
branches/fix-links/libs/iostreams/test/finite_state_filter_test.cpp | 3
branches/fix-links/libs/iostreams/test/flush_test.cpp | 3
branches/fix-links/libs/iostreams/test/gzip_test.cpp | 3
branches/fix-links/libs/iostreams/test/invert_test.cpp | 3
branches/fix-links/libs/iostreams/test/large_file_test.cpp | 4
branches/fix-links/libs/iostreams/test/line_filter_test.cpp | 3
branches/fix-links/libs/iostreams/test/mapped_file_test.cpp | 3
branches/fix-links/libs/iostreams/test/newline_test.cpp | 3
branches/fix-links/libs/iostreams/test/null_test.cpp | 3
branches/fix-links/libs/iostreams/test/operation_sequence_test.cpp | 3
branches/fix-links/libs/iostreams/test/pipeline_test.cpp | 3
branches/fix-links/libs/iostreams/test/putback_test.hpp | 3
branches/fix-links/libs/iostreams/test/read_bidir_filter_test.hpp | 3
branches/fix-links/libs/iostreams/test/read_bidir_streambuf_test.hpp | 3
branches/fix-links/libs/iostreams/test/read_bidir_test.hpp | 3
branches/fix-links/libs/iostreams/test/read_input_filter_test.hpp | 3
branches/fix-links/libs/iostreams/test/read_input_istream_test.hpp | 3
branches/fix-links/libs/iostreams/test/read_input_seq_test.hpp | 3
branches/fix-links/libs/iostreams/test/read_input_test.hpp | 3
branches/fix-links/libs/iostreams/test/read_seekable_seq_test.hpp | 3
branches/fix-links/libs/iostreams/test/read_seekable_test.hpp | 3
branches/fix-links/libs/iostreams/test/regex_filter_test.cpp | 23 +
branches/fix-links/libs/iostreams/test/restrict_test.cpp | 3
branches/fix-links/libs/iostreams/test/seek_test.hpp | 3
branches/fix-links/libs/iostreams/test/seekable_file_test.cpp | 3
branches/fix-links/libs/iostreams/test/seekable_filter_test.cpp | 3
branches/fix-links/libs/iostreams/test/sequence_test.cpp | 3
branches/fix-links/libs/iostreams/test/slice_test.cpp | 3
branches/fix-links/libs/iostreams/test/stdio_filter_test.cpp | 3
branches/fix-links/libs/iostreams/test/symmetric_filter_test.cpp | 3
branches/fix-links/libs/iostreams/test/tee_test.cpp | 3
branches/fix-links/libs/iostreams/test/wide_stream_test.cpp | 3
branches/fix-links/libs/iostreams/test/write_bidir_filter_test.hpp | 3
branches/fix-links/libs/iostreams/test/write_bidir_streambuf_test.hpp | 3
branches/fix-links/libs/iostreams/test/write_bidir_test.hpp | 3
branches/fix-links/libs/iostreams/test/write_output_filter_test.hpp | 3
branches/fix-links/libs/iostreams/test/write_output_iterator_test.hpp | 3
branches/fix-links/libs/iostreams/test/write_output_ostream_test.hpp | 3
branches/fix-links/libs/iostreams/test/write_output_seq_test.hpp | 3
branches/fix-links/libs/iostreams/test/write_output_test.hpp | 3
branches/fix-links/libs/iostreams/test/write_seekable_seq_test.hpp | 3
branches/fix-links/libs/iostreams/test/write_seekable_test.hpp | 3
branches/fix-links/libs/iostreams/test/zlib_test.cpp | 3
branches/fix-links/libs/logic/test/tribool_io_test.cpp | 1
branches/fix-links/libs/mpl/doc/refmanual/vector.html | 2
branches/fix-links/libs/ptr_container/test/Jamfile.v2 | 3
branches/fix-links/libs/random/index.html | 2
branches/fix-links/libs/statechart/example/Performance/Performance.cpp | 1
branches/fix-links/libs/unordered/doc/unordered.qbk | 2
branches/fix-links/libs/unordered/test/helpers/allocator.hpp | 6
branches/fix-links/libs/unordered/test/helpers/random_values.hpp | 2
branches/fix-links/libs/unordered/test/objects/exception.hpp | 2
branches/fix-links/libs/unordered/test/objects/minimal.hpp | 3
branches/fix-links/libs/unordered/test/objects/test.hpp | 2
branches/fix-links/libs/unordered/test/unordered/simple_tests.cpp | 19
branches/fix-links/libs/variant/doc/tutorial/advanced.xml | 2
branches/fix-links/libs/wave/ChangeLog | 12
branches/fix-links/libs/wave/doc/compiletime_config.html | 17
branches/fix-links/libs/wave/test/testwave/testfiles/test.cfg | 1
branches/fix-links/libs/xpressive/doc/acknowledgements.qbk | 3
branches/fix-links/libs/xpressive/example/example.vcproj | 34 +
branches/fix-links/libs/xpressive/example/numbers.cpp | 118 ++--
branches/fix-links/libs/xpressive/proto/doc/Jamfile.v2 | 87 ++--
branches/fix-links/libs/xpressive/proto/doc/calculator.qbk | 2
branches/fix-links/libs/xpressive/proto/doc/construction.qbk | 517 +++++++++++++++++++++++++
branches/fix-links/libs/xpressive/proto/doc/evaluation.qbk | 15
branches/fix-links/libs/xpressive/proto/doc/examples.qbk | 87 +++
branches/fix-links/libs/xpressive/proto/doc/installation.qbk | 7
branches/fix-links/libs/xpressive/proto/doc/preface.qbk | 11
branches/fix-links/libs/xpressive/proto/doc/proto.qbk | 4
branches/fix-links/libs/xpressive/proto/doc/protodoc.xml | 816 +++++++++++++++++++++------------------
branches/fix-links/libs/xpressive/proto/doc/rationale.qbk | 74 +++
branches/fix-links/libs/xpressive/proto/doc/transforms.qbk | 4
branches/fix-links/libs/xpressive/proto/example/Jamfile.v2 | 5
branches/fix-links/libs/xpressive/proto/example/calc1.cpp | 2
branches/fix-links/libs/xpressive/proto/example/calc2.cpp | 2
branches/fix-links/libs/xpressive/proto/example/calc3.cpp | 2
branches/fix-links/libs/xpressive/proto/example/hello.cpp | 2
branches/fix-links/libs/xpressive/proto/example/lazy_vector.cpp | 2
branches/fix-links/libs/xpressive/proto/example/mixed.cpp | 15
branches/fix-links/libs/xpressive/proto/example/rgb.cpp | 2
branches/fix-links/libs/xpressive/proto/example/tarray.cpp | 2
branches/fix-links/libs/xpressive/proto/example/vec3.cpp | 2
branches/fix-links/libs/xpressive/proto/example/vector.cpp | 2
branches/fix-links/libs/xpressive/proto/test/Jamfile.v2 | 10
branches/fix-links/libs/xpressive/proto/test/calculator.cpp | 2
branches/fix-links/libs/xpressive/proto/test/examples.cpp | 20
branches/fix-links/libs/xpressive/proto/test/lambda.cpp | 2
branches/fix-links/libs/xpressive/proto/test/matches.cpp | 2
branches/fix-links/libs/xpressive/proto/test/proto_fusion.cpp | 2
branches/fix-links/libs/xpressive/proto/test/proto_fusion_s.cpp | 2
branches/fix-links/libs/xpressive/proto/test/toy_spirit.cpp | 2
branches/fix-links/libs/xpressive/proto/test/toy_spirit2.cpp | 7
branches/fix-links/libs/xpressive/test/misc1.cpp | 2
branches/fix-links/libs/xpressive/test/misc2.cpp | 2
branches/fix-links/libs/xpressive/test/multiple_defs1.cpp | 2
branches/fix-links/libs/xpressive/test/multiple_defs2.cpp | 2
branches/fix-links/libs/xpressive/test/test.hpp | 2
branches/fix-links/libs/xpressive/test/test1.cpp | 2
branches/fix-links/libs/xpressive/test/test1.hpp | 2
branches/fix-links/libs/xpressive/test/test10.cpp | 2
branches/fix-links/libs/xpressive/test/test10.hpp | 2
branches/fix-links/libs/xpressive/test/test10u.cpp | 2
branches/fix-links/libs/xpressive/test/test11.cpp | 2
branches/fix-links/libs/xpressive/test/test11.hpp | 2
branches/fix-links/libs/xpressive/test/test11u.cpp | 2
branches/fix-links/libs/xpressive/test/test1u.cpp | 2
branches/fix-links/libs/xpressive/test/test2.cpp | 2
branches/fix-links/libs/xpressive/test/test2.hpp | 2
branches/fix-links/libs/xpressive/test/test2u.cpp | 2
branches/fix-links/libs/xpressive/test/test3.cpp | 2
branches/fix-links/libs/xpressive/test/test3.hpp | 2
branches/fix-links/libs/xpressive/test/test3u.cpp | 2
branches/fix-links/libs/xpressive/test/test4.cpp | 2
branches/fix-links/libs/xpressive/test/test4.hpp | 2
branches/fix-links/libs/xpressive/test/test4u.cpp | 2
branches/fix-links/libs/xpressive/test/test5.cpp | 2
branches/fix-links/libs/xpressive/test/test5.hpp | 2
branches/fix-links/libs/xpressive/test/test5u.cpp | 2
branches/fix-links/libs/xpressive/test/test6.cpp | 2
branches/fix-links/libs/xpressive/test/test6.hpp | 2
branches/fix-links/libs/xpressive/test/test6u.cpp | 2
branches/fix-links/libs/xpressive/test/test7.cpp | 2
branches/fix-links/libs/xpressive/test/test7.hpp | 2
branches/fix-links/libs/xpressive/test/test7u.cpp | 2
branches/fix-links/libs/xpressive/test/test8.cpp | 2
branches/fix-links/libs/xpressive/test/test8.hpp | 2
branches/fix-links/libs/xpressive/test/test8u.cpp | 2
branches/fix-links/libs/xpressive/test/test9.cpp | 2
branches/fix-links/libs/xpressive/test/test9.hpp | 2
branches/fix-links/libs/xpressive/test/test9u.cpp | 2
branches/fix-links/libs/xpressive/test/test_actions.cpp | 6
branches/fix-links/libs/xpressive/test/test_assert.cpp | 4
branches/fix-links/libs/xpressive/test/test_basic_regex.cpp | 2
branches/fix-links/libs/xpressive/test/test_cycles.cpp | 2
branches/fix-links/libs/xpressive/test/test_dynamic.cpp | 2
branches/fix-links/libs/xpressive/test/test_dynamic_grammar.cpp | 2
branches/fix-links/libs/xpressive/test/test_match_results.cpp | 2
branches/fix-links/libs/xpressive/test/test_non_char.cpp | 2
branches/fix-links/libs/xpressive/test/test_partial_match.cpp | 2
branches/fix-links/libs/xpressive/test/test_regex_algorithms.cpp | 2
branches/fix-links/libs/xpressive/test/test_regex_compiler.cpp | 2
branches/fix-links/libs/xpressive/test/test_regex_constants.cpp | 2
branches/fix-links/libs/xpressive/test/test_regex_error.cpp | 2
branches/fix-links/libs/xpressive/test/test_regex_iterator.cpp | 2
branches/fix-links/libs/xpressive/test/test_regex_primitives.cpp | 2
branches/fix-links/libs/xpressive/test/test_regex_token_iterator.cpp | 2
branches/fix-links/libs/xpressive/test/test_regex_traits.cpp | 2
branches/fix-links/libs/xpressive/test/test_skip.cpp | 4
branches/fix-links/libs/xpressive/test/test_static.cpp | 2
branches/fix-links/libs/xpressive/test/test_sub_match.cpp | 2
branches/fix-links/libs/xpressive/test/test_symbols.cpp | 26
branches/fix-links/libs/xpressive/test/test_typeof.cpp | 2
branches/fix-links/libs/xpressive/test/test_typeof2.cpp | 14
branches/fix-links/status/explicit-failures-markup.xml | 11
branches/fix-links/tools/build/v2/roll.sh | 2
branches/fix-links/tools/build/v2/tools/intel-darwin.jam | 2
branches/fix-links/tools/build/v2/tools/pgi.jam | 2
branches/fix-links/tools/build/v2/tools/quickbook.jam | 3
branches/fix-links/tools/build/v2/tools/stage.jam | 6
branches/fix-links/tools/build/v2/util/path.jam | 115 +++--
branches/fix-links/tools/jam/src/filesys.c | 1
branches/fix-links/tools/wave/build/Jamfile.v2 | 1
673 files changed, 6026 insertions(+), 3845 deletions(-)
Modified: branches/fix-links/Jamroot
==============================================================================
--- branches/fix-links/Jamroot (original)
+++ branches/fix-links/Jamroot 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -53,7 +53,7 @@
# complete - Attempts to build all possible
# variations.
#
-# --builddir=DIR Build in this location instead of building
+# --build-dir=DIR Build in this location instead of building
# within the distribution tree. Recommended!
#
# --toolset=toolset Indicates the toolset to build with.
Modified: branches/fix-links/boost/asio/buffer.hpp
==============================================================================
--- branches/fix-links/boost/asio/buffer.hpp (original)
+++ branches/fix-links/boost/asio/buffer.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -393,7 +393,12 @@
~buffer_debug_check()
{
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+ // MSVC's string iterator checking may crash in a std::string::iterator
+ // object's destructor when the iterator points to an already-destroyed
+ // std::string object, unless the iterator is cleared first.
iter_ = Iterator();
+#endif // BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
}
void operator()()
Modified: branches/fix-links/boost/asio/detail/old_win_sdk_compat.hpp
==============================================================================
--- branches/fix-links/boost/asio/detail/old_win_sdk_compat.hpp (original)
+++ branches/fix-links/boost/asio/detail/old_win_sdk_compat.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -31,6 +31,10 @@
#if defined(BOOST_ASIO_HAS_OLD_WIN_SDK)
// Emulation of types that are missing from old Platform SDKs.
+//
+// N.B. this emulation is also used if building for a Windows 2000 target with
+// a recent (i.e. Vista or later) SDK, as the SDK does not provide IPv6 support
+// in that case.
namespace boost {
namespace asio {
@@ -55,9 +59,19 @@
struct in6_addr_emulation
{
- u_char s6_addr[16];
+ union
+ {
+ u_char Byte[16];
+ u_short Word[8];
+ } u;
};
+#if !defined(s6_addr)
+# define _S6_un u
+# define _S6_u8 Byte
+# define s6_addr _S6_un._S6_u8
+#endif // !defined(s6_addr)
+
struct sockaddr_in6_emulation
{
short sin6_family;
Modified: branches/fix-links/boost/asio/detail/socket_ops.hpp
==============================================================================
--- branches/fix-links/boost/asio/detail/socket_ops.hpp (original)
+++ branches/fix-links/boost/asio/detail/socket_ops.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1825,7 +1825,8 @@
if (gni_t gni = (gni_t)::GetProcAddress(winsock_module, "getnameinfo"))
{
clear_error(ec);
- int error = gni(addr, addrlen, host, static_cast<DWORD>(hostlen),
+ int error = gni(addr, static_cast<int>(addrlen),
+ host, static_cast<DWORD>(hostlen),
serv, static_cast<DWORD>(servlen), flags);
return ec = translate_addrinfo_error(error);
}
Modified: branches/fix-links/boost/circular_buffer/base.hpp
==============================================================================
--- branches/fix-links/boost/circular_buffer/base.hpp (original)
+++ branches/fix-links/boost/circular_buffer/base.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -909,8 +909,8 @@
used).
\par Complexity
Constant.
- \note This constructor has been defined only due to compatibility with the STL container definition. Avoid
- using it because it may allocate very large amount of memory.
+ \warning This constructor has been defined only due to compatibility with the STL container definition. Avoid
+ using it because it may allocate <b>very large</b> amount of memory.
*/
explicit circular_buffer(const allocator_type& alloc = allocator_type())
: m_size(0), m_alloc(alloc) {
@@ -1781,6 +1781,9 @@
the erased element (towards the beginning).
\par Complexity
Linear (in <code>std::distance(begin(), pos)</code>).
+ \note This method is symetric to the <code>erase(iterator)</code> method and is more effective than
+ <code>erase(iterator)</code> if the iterator <code>pos</code> is close to the beginning of the
+ <code>circular_buffer</code>. (See the <i>Complexity</i>.)
\sa <code>erase(iterator)</code>, <code>erase(iterator, iterator)</code>,
<code>rerase(iterator, iterator)</code>, <code>clear()</code>
*/
@@ -1818,6 +1821,9 @@
the erased range (towards the beginning).
\par Complexity
Linear (in <code>std::distance(begin(), last)</code>).
+ \note This method is symetric to the <code>erase(iterator, iterator)</code> method and is more effective than
+ <code>erase(iterator, iterator)</code> if <code>std::distance(begin(), first)</code> is lower that
+ <code>std::distance(last, end())</code>.
\sa <code>erase(iterator)</code>, <code>erase(iterator, iterator)</code>, <code>rerase(iterator)</code>,
<code>clear()</code>
*/
Modified: branches/fix-links/boost/circular_buffer/details.hpp
==============================================================================
--- branches/fix-links/boost/circular_buffer/details.hpp (original)
+++ branches/fix-links/boost/circular_buffer/details.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -227,7 +227,7 @@
//! Difference type.
typedef typename base_iterator::difference_type difference_type;
-#if !defined(BOOST_CB_TEST) && !BOOST_CB_ENABLE_DEBUG
+#if !defined(BOOST_CB_TEST) && BOOST_CB_ENABLE_DEBUG == 0
private:
#endif
// Member variables
Modified: branches/fix-links/boost/circular_buffer/space_optimized.hpp
==============================================================================
--- branches/fix-links/boost/circular_buffer/space_optimized.hpp (original)
+++ branches/fix-links/boost/circular_buffer/space_optimized.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1141,6 +1141,8 @@
equal to <code>end()</code>).
\par Complexity
Linear (in the size of the <code>circular_buffer_space_optimized</code>).
+ \note Basically there is no difference between <code>erase(iterator)</code> and this method. It is implemented
+ only for consistency with the base <code>circular_buffer</code>.
\sa <code>erase(iterator)</code>, <code>erase(iterator, iterator)</code>,
<code>rerase(iterator, iterator)</code>, <code>clear()</code>
*/
@@ -1171,6 +1173,9 @@
equal to <code>end()</code>).
\par Complexity
Linear (in the size of the <code>circular_buffer_space_optimized</code>).
+ \note Basically there is no difference between <code>erase(iterator, iterator)</code> and this method. It is
+ implemented only for consistency with the base
+ <code>circular_buffer</code>.
\sa <code>erase(iterator)</code>, <code>erase(iterator, iterator)</code>, <code>rerase(iterator)</code>,
<code>clear()</code>
*/
Modified: branches/fix-links/boost/function_types/detail/pp_arity_loop.hpp
==============================================================================
--- branches/fix-links/boost/function_types/detail/pp_arity_loop.hpp (original)
+++ branches/fix-links/boost/function_types/detail/pp_arity_loop.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -81,14 +81,16 @@
# include <boost/preprocessor/repetition/enum_trailing_params.hpp>
# endif
+# define BOOST_FT_AL_INCLUDE_FILE <BOOST_FT_al_path/master.hpp>
+
# define BOOST_FT_ARITY_LOOP_PREFIX 1
-# include BOOST_PP_EXPAND(<BOOST_FT_al_path/master.hpp>)
+# include BOOST_FT_AL_INCLUDE_FILE
# undef BOOST_FT_ARITY_LOOP_PREFIX
# if !BOOST_PP_IS_ITERATING
-# define BOOST_PP_FILENAME_1 <BOOST_FT_al_path/master.hpp>
+# define BOOST_PP_FILENAME_1 BOOST_FT_AL_INCLUDE_FILE
# elif BOOST_PP_ITERATION_DEPTH() == 1
-# define BOOST_PP_FILENAME_2 <BOOST_FT_al_path/master.hpp>
+# define BOOST_PP_FILENAME_2 BOOST_FT_AL_INCLUDE_FILE
# else
# error "loops nested too deeply"
# endif
@@ -133,8 +135,10 @@
# undef BOOST_FT_type
# define BOOST_FT_ARITY_LOOP_SUFFIX 1
-# include BOOST_PP_EXPAND(<BOOST_FT_al_path/master.hpp>)
+# include BOOST_FT_AL_INCLUDE_FILE
# undef BOOST_FT_ARITY_LOOP_SUFFIX
+
+# undef BOOST_FT_AL_INCLUDE_FILE
# endif
# undef BOOST_FT_FROM_ARITY
Modified: branches/fix-links/boost/function_types/detail/pp_cc_loop/master.hpp
==============================================================================
--- branches/fix-links/boost/function_types/detail/pp_cc_loop/master.hpp (original)
+++ branches/fix-links/boost/function_types/detail/pp_cc_loop/master.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -42,7 +42,7 @@
# define BOOST_FT_cc_name implicit_cc
# define BOOST_FT_cc BOOST_PP_EMPTY
# define BOOST_FT_cond callable_builtin
-# include BOOST_PP_EXPAND ( <BOOST_FT_cc_file> )
+# include BOOST_FT_cc_file
# undef BOOST_FT_cond
# undef BOOST_FT_cc_name
# undef BOOST_FT_cc
@@ -54,7 +54,7 @@
BOOST_PP_EXPAND(#) define BOOST_FT_cc BOOST_PP_EMPTY
BOOST_PP_EXPAND(#) define BOOST_FT_cond callable_builtin
#define _()
-BOOST_PP_EXPAND(#) include BOOST_PP_EXPAND _()( <BOOST_FT_cc_file> )
+BOOST_PP_EXPAND(#) include BOOST_FT_cc_file
#undef _
BOOST_PP_EXPAND(#) undef BOOST_FT_cond
BOOST_PP_EXPAND(#) undef BOOST_FT_cc_name
@@ -85,7 +85,7 @@
# if BOOST_FT_cond
# define BOOST_FT_config_valid 1
-# include BOOST_PP_EXPAND(<BOOST_FT_cc_file>)
+# include BOOST_FT_cc_file
# endif
# undef BOOST_FT_cond
@@ -121,7 +121,7 @@
BOOST_PP_EXPAND(#) if BOOST_FT_cond
BOOST_PP_EXPAND(#) define BOOST_FT_config_valid 1
#define _()
-BOOST_PP_EXPAND(#) include BOOST_PP_EXPAND _()(<BOOST_FT_cc_file>)
+BOOST_PP_EXPAND(#) include BOOST_FT_cc_file
#undef _
BOOST_PP_EXPAND(#) endif
Modified: branches/fix-links/boost/function_types/detail/pp_cc_loop/preprocessed.hpp
==============================================================================
--- branches/fix-links/boost/function_types/detail/pp_cc_loop/preprocessed.hpp (original)
+++ branches/fix-links/boost/function_types/detail/pp_cc_loop/preprocessed.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -15,7 +15,7 @@
# define BOOST_FT_cond BOOST_FT_CC_IMPLICIT
# if BOOST_FT_cond
# define BOOST_FT_config_valid 1
-# include BOOST_PP_EXPAND ( <BOOST_FT_cc_file> )
+# include BOOST_FT_cc_file
# endif
# undef BOOST_FT_cond
# undef BOOST_FT_cc_name
@@ -27,7 +27,7 @@
# define BOOST_FT_cond BOOST_FT_CC_CDECL
# if BOOST_FT_cond
# define BOOST_FT_config_valid 1
-# include BOOST_PP_EXPAND ( <BOOST_FT_cc_file> )
+# include BOOST_FT_cc_file
# endif
# undef BOOST_FT_cond
# undef BOOST_FT_cc_name
@@ -39,7 +39,7 @@
# define BOOST_FT_cond BOOST_FT_CC_STDCALL
# if BOOST_FT_cond
# define BOOST_FT_config_valid 1
-# include BOOST_PP_EXPAND ( <BOOST_FT_cc_file> )
+# include BOOST_FT_cc_file
# endif
# undef BOOST_FT_cond
# undef BOOST_FT_cc_name
@@ -51,7 +51,7 @@
# define BOOST_FT_cond BOOST_FT_CC_PASCAL
# if BOOST_FT_cond
# define BOOST_FT_config_valid 1
-# include BOOST_PP_EXPAND ( <BOOST_FT_cc_file> )
+# include BOOST_FT_cc_file
# endif
# undef BOOST_FT_cond
# undef BOOST_FT_cc_name
@@ -63,7 +63,7 @@
# define BOOST_FT_cond BOOST_FT_CC_FASTCALL
# if BOOST_FT_cond
# define BOOST_FT_config_valid 1
-# include BOOST_PP_EXPAND ( <BOOST_FT_cc_file> )
+# include BOOST_FT_cc_file
# endif
# undef BOOST_FT_cond
# undef BOOST_FT_cc_name
@@ -75,7 +75,7 @@
# define BOOST_FT_cond BOOST_FT_CC_CLRCALL
# if BOOST_FT_cond
# define BOOST_FT_config_valid 1
-# include BOOST_PP_EXPAND ( <BOOST_FT_cc_file> )
+# include BOOST_FT_cc_file
# endif
# undef BOOST_FT_cond
# undef BOOST_FT_cc_name
@@ -87,7 +87,7 @@
# define BOOST_FT_cond BOOST_FT_CC_THISCALL
# if BOOST_FT_cond
# define BOOST_FT_config_valid 1
-# include BOOST_PP_EXPAND ( <BOOST_FT_cc_file> )
+# include BOOST_FT_cc_file
# endif
# undef BOOST_FT_cond
# undef BOOST_FT_cc_name
@@ -99,7 +99,7 @@
# define BOOST_FT_cond BOOST_FT_CC_IMPLICIT_THISCALL
# if BOOST_FT_cond
# define BOOST_FT_config_valid 1
-# include BOOST_PP_EXPAND ( <BOOST_FT_cc_file> )
+# include BOOST_FT_cc_file
# endif
# undef BOOST_FT_cond
# undef BOOST_FT_cc_name
@@ -110,7 +110,7 @@
# define BOOST_FT_cc_name implicit_cc
# define BOOST_FT_cc BOOST_PP_EMPTY
# define BOOST_FT_cond 0x00000001
-# include BOOST_PP_EXPAND ( <BOOST_FT_cc_file> )
+# include BOOST_FT_cc_file
# undef BOOST_FT_cond
# undef BOOST_FT_cc_name
# undef BOOST_FT_cc
Modified: branches/fix-links/boost/function_types/detail/pp_loop.hpp
==============================================================================
--- branches/fix-links/boost/function_types/detail/pp_loop.hpp (original)
+++ branches/fix-links/boost/function_types/detail/pp_loop.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -28,9 +28,9 @@
#if defined(BOOST_FT_al_path)
# define BOOST_FT_cc_file \
- boost/function_types/detail/pp_variate_loop/preprocessed.hpp
+ <boost/function_types/detail/pp_variate_loop/preprocessed.hpp>
# define BOOST_FT_variate_file \
- boost/function_types/detail/pp_arity_loop.hpp
+ <boost/function_types/detail/pp_arity_loop.hpp>
# ifndef BOOST_FT_type_function
# define BOOST_FT_type_function(cc,name) BOOST_FT_SYNTAX( \
Modified: branches/fix-links/boost/function_types/detail/pp_variate_loop/master.hpp
==============================================================================
--- branches/fix-links/boost/function_types/detail/pp_variate_loop/master.hpp (original)
+++ branches/fix-links/boost/function_types/detail/pp_variate_loop/master.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -140,7 +140,7 @@
# endif
# endif
BOOST_PP_EXPAND(#) define BOOST_FT_flags BOOST_PP_SLOT(1)
-BOOST_PP_EXPAND(#) include BOOST_PP_EXPAND BOOST_PP_EMPTY()(<BOOST_FT_variate_file>)
+BOOST_PP_EXPAND(#) include BOOST_FT_variate_file
BOOST_PP_EXPAND(#) undef BOOST_FT_cv
BOOST_PP_EXPAND(#) undef BOOST_FT_ell
Modified: branches/fix-links/boost/function_types/detail/pp_variate_loop/preprocessed.hpp
==============================================================================
--- branches/fix-links/boost/function_types/detail/pp_variate_loop/preprocessed.hpp (original)
+++ branches/fix-links/boost/function_types/detail/pp_variate_loop/preprocessed.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -15,7 +15,7 @@
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv
# define BOOST_FT_flags 519
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -28,7 +28,7 @@
# define BOOST_FT_nullary_param
# define BOOST_FT_cv
# define BOOST_FT_flags 263
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -42,7 +42,7 @@
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv const
# define BOOST_FT_flags 1543
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -55,7 +55,7 @@
# define BOOST_FT_nullary_param
# define BOOST_FT_cv const
# define BOOST_FT_flags 1287
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -68,7 +68,7 @@
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv volatile
# define BOOST_FT_flags 2567
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -81,7 +81,7 @@
# define BOOST_FT_nullary_param
# define BOOST_FT_cv volatile
# define BOOST_FT_flags 2311
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -94,7 +94,7 @@
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv const volatile
# define BOOST_FT_flags 3591
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -107,7 +107,7 @@
# define BOOST_FT_nullary_param
# define BOOST_FT_cv const volatile
# define BOOST_FT_flags 3335
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -123,7 +123,7 @@
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv
# define BOOST_FT_flags 523
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -136,7 +136,7 @@
# define BOOST_FT_nullary_param
# define BOOST_FT_cv
# define BOOST_FT_flags 267
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -151,7 +151,7 @@
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv
# define BOOST_FT_flags 531
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -164,7 +164,7 @@
# define BOOST_FT_nullary_param
# define BOOST_FT_cv
# define BOOST_FT_flags 275
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -181,7 +181,7 @@
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv
# define BOOST_FT_flags 609
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -194,7 +194,7 @@
# define BOOST_FT_nullary_param
# define BOOST_FT_cv
# define BOOST_FT_flags 353
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -207,7 +207,7 @@
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv const
# define BOOST_FT_flags 1633
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -220,7 +220,7 @@
# define BOOST_FT_nullary_param
# define BOOST_FT_cv const
# define BOOST_FT_flags 1377
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -233,7 +233,7 @@
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv volatile
# define BOOST_FT_flags 2657
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -246,7 +246,7 @@
# define BOOST_FT_nullary_param
# define BOOST_FT_cv volatile
# define BOOST_FT_flags 2401
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -259,7 +259,7 @@
# define BOOST_FT_nullary_param BOOST_FT_NULLARY_PARAM
# define BOOST_FT_cv const volatile
# define BOOST_FT_flags 3681
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
@@ -272,7 +272,7 @@
# define BOOST_FT_nullary_param
# define BOOST_FT_cv const volatile
# define BOOST_FT_flags 3425
-# include BOOST_PP_EXPAND ( <BOOST_FT_variate_file> )
+# include BOOST_FT_variate_file
# undef BOOST_FT_cv
# undef BOOST_FT_ell
# undef BOOST_FT_nullary_param
Modified: branches/fix-links/boost/function_types/is_member_object_pointer.hpp
==============================================================================
--- branches/fix-links/boost/function_types/is_member_object_pointer.hpp (original)
+++ branches/fix-links/boost/function_types/is_member_object_pointer.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -24,10 +24,10 @@
< function_types::components<T>
, detail::member_object_pointer_tag >
{
- BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_member_object_pointer,(T,Tag))
+ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_member_object_pointer,(T))
};
}
- BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,function_types::is_member_object_pointer)
+ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,function_types::is_member_object_pointer)
}
#endif
Modified: branches/fix-links/boost/function_types/property_tags.hpp
==============================================================================
--- branches/fix-links/boost/function_types/property_tags.hpp (original)
+++ branches/fix-links/boost/function_types/property_tags.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -141,7 +141,7 @@
#include <boost/function_types/detail/pp_tags/preprocessed.hpp>
namespace boost { namespace function_types {
-#define BOOST_FT_cc_file boost/function_types/detail/pp_tags/cc_tag.hpp
+#define BOOST_FT_cc_file <boost/function_types/detail/pp_tags/cc_tag.hpp>
#include <boost/function_types/detail/pp_loop.hpp>
} } // namespace boost::function_types
Modified: branches/fix-links/boost/functional/hash/hash.hpp
==============================================================================
--- branches/fix-links/boost/functional/hash/hash.hpp (original)
+++ branches/fix-links/boost/functional/hash/hash.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -46,8 +46,8 @@
#endif
#if defined(BOOST_HAS_LONG_LONG)
- std::size_t hash_value(long long);
- std::size_t hash_value(unsigned long long);
+ std::size_t hash_value(boost::long_long_type);
+ std::size_t hash_value(boost::ulong_long_type);
#endif
#if !BOOST_WORKAROUND(__DMC__, <= 0x848)
@@ -195,12 +195,12 @@
#endif
#if defined(BOOST_HAS_LONG_LONG)
- inline std::size_t hash_value(long long v)
+ inline std::size_t hash_value(boost::long_long_type v)
{
return hash_detail::hash_value_signed(v);
}
- inline std::size_t hash_value(unsigned long long v)
+ inline std::size_t hash_value(boost::ulong_long_type v)
{
return hash_detail::hash_value_unsigned(v);
}
Modified: branches/fix-links/boost/graph/edge_connectivity.hpp
==============================================================================
--- branches/fix-links/boost/graph/edge_connectivity.hpp (original)
+++ branches/fix-links/boost/graph/edge_connectivity.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -16,7 +16,7 @@
#include <vector>
#include <set>
#include <algorithm>
-#include <boost/graph/edmunds_karp_max_flow.hpp>
+#include <boost/graph/edmonds_karp_max_flow.hpp>
namespace boost {
@@ -139,7 +139,7 @@
while (!non_neighbor_S.empty()) { // at most n - 1 times
k = non_neighbor_S.front();
- alpha_S_k = edmunds_karp_max_flow
+ alpha_S_k = edmonds_karp_max_flow
(flow_g, p, k, cap, res_cap, rev_edge, &color[0], &pred[0]);
if (alpha_S_k < alpha_star) {
Deleted: branches/fix-links/boost/graph/edmunds_karp_max_flow.hpp
==============================================================================
--- branches/fix-links/boost/graph/edmunds_karp_max_flow.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
+++ (empty file)
@@ -1,250 +0,0 @@
-//=======================================================================
-// Copyright 2000 University of Notre Dame.
-// Authors: Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//=======================================================================
-
-#ifndef EDMUNDS_KARP_MAX_FLOW_HPP
-#define EDMUNDS_KARP_MAX_FLOW_HPP
-
-#include <boost/config.hpp>
-#include <vector>
-#include <algorithm> // for std::min and std::max
-#include <boost/config.hpp>
-#include <boost/pending/queue.hpp>
-#include <boost/property_map.hpp>
-#include <boost/graph/graph_traits.hpp>
-#include <boost/graph/properties.hpp>
-#include <boost/graph/filtered_graph.hpp>
-#include <boost/graph/breadth_first_search.hpp>
-
-namespace boost {
-
- // The "labeling" algorithm from "Network Flows" by Ahuja, Magnanti,
- // Orlin. I think this is the same as or very similar to the original
- // Edmunds-Karp algorithm. This solves the maximum flow problem.
-
- namespace detail {
-
- template <class Graph, class ResCapMap>
- filtered_graph<Graph, is_residual_edge<ResCapMap> >
- residual_graph(Graph& g, ResCapMap residual_capacity) {
- return filtered_graph<Graph, is_residual_edge<ResCapMap> >
- (g, is_residual_edge<ResCapMap>(residual_capacity));
- }
-
- template <class Graph, class PredEdgeMap, class ResCapMap,
- class RevEdgeMap>
- inline void
- augment(Graph& g,
- typename graph_traits<Graph>::vertex_descriptor src,
- typename graph_traits<Graph>::vertex_descriptor sink,
- PredEdgeMap p,
- ResCapMap residual_capacity,
- RevEdgeMap reverse_edge)
- {
- typename graph_traits<Graph>::edge_descriptor e;
- typename graph_traits<Graph>::vertex_descriptor u;
- typedef typename property_traits<ResCapMap>::value_type FlowValue;
-
- // find minimum residual capacity along the augmenting path
- FlowValue delta = (std::numeric_limits<FlowValue>::max)();
- e = p[sink];
- do {
- BOOST_USING_STD_MIN();
- delta = min BOOST_PREVENT_MACRO_SUBSTITUTION(delta, residual_capacity[e]);
- u = source(e, g);
- e = p[u];
- } while (u != src);
-
- // push delta units of flow along the augmenting path
- e = p[sink];
- do {
- residual_capacity[e] -= delta;
- residual_capacity[reverse_edge[e]] += delta;
- u = source(e, g);
- e = p[u];
- } while (u != src);
- }
-
- } // namespace detail
-
- template <class Graph,
- class CapacityEdgeMap, class ResidualCapacityEdgeMap,
- class ReverseEdgeMap, class ColorMap, class PredEdgeMap>
- typename property_traits<CapacityEdgeMap>::value_type
- edmunds_karp_max_flow
- (Graph& g,
- typename graph_traits<Graph>::vertex_descriptor src,
- typename graph_traits<Graph>::vertex_descriptor sink,
- CapacityEdgeMap cap,
- ResidualCapacityEdgeMap res,
- ReverseEdgeMap rev,
- ColorMap color,
- PredEdgeMap pred)
- {
- typedef typename graph_traits<Graph>::vertex_descriptor vertex_t;
- typedef typename property_traits<ColorMap>::value_type ColorValue;
- typedef color_traits<ColorValue> Color;
-
- typename graph_traits<Graph>::vertex_iterator u_iter, u_end;
- typename graph_traits<Graph>::out_edge_iterator ei, e_end;
- for (tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter)
- for (tie(ei, e_end) = out_edges(*u_iter, g); ei != e_end; ++ei)
- res[*ei] = cap[*ei];
-
- color[sink] = Color::gray();
- while (color[sink] != Color::white()) {
- boost::queue<vertex_t> Q;
- breadth_first_search
- (detail::residual_graph(g, res), src, Q,
- make_bfs_visitor(record_edge_predecessors(pred, on_tree_edge())),
- color);
- if (color[sink] != Color::white())
- detail::augment(g, src, sink, pred, res, rev);
- } // while
-
- typename property_traits<CapacityEdgeMap>::value_type flow = 0;
- for (tie(ei, e_end) = out_edges(src, g); ei != e_end; ++ei)
- flow += (cap[*ei] - res[*ei]);
- return flow;
- } // edmunds_karp_max_flow()
-
- namespace detail {
- //-------------------------------------------------------------------------
- // Handle default for color property map
-
- // use of class here is a VC++ workaround
- template <class ColorMap>
- struct edmunds_karp_dispatch2 {
- template <class Graph, class PredMap, class P, class T, class R>
- static typename edge_capacity_value<Graph, P, T, R>::type
- apply
- (Graph& g,
- typename graph_traits<Graph>::vertex_descriptor src,
- typename graph_traits<Graph>::vertex_descriptor sink,
- PredMap pred,
- const bgl_named_params<P, T, R>& params,
- ColorMap color)
- {
- return edmunds_karp_max_flow
- (g, src, sink,
- choose_const_pmap(get_param(params, edge_capacity), g, edge_capacity),
- choose_pmap(get_param(params, edge_residual_capacity),
- g, edge_residual_capacity),
- choose_const_pmap(get_param(params, edge_reverse), g, edge_reverse),
- color, pred);
- }
- };
- template<>
- struct edmunds_karp_dispatch2<detail::error_property_not_found> {
- template <class Graph, class PredMap, class P, class T, class R>
- static typename edge_capacity_value<Graph, P, T, R>::type
- apply
- (Graph& g,
- typename graph_traits<Graph>::vertex_descriptor src,
- typename graph_traits<Graph>::vertex_descriptor sink,
- PredMap pred,
- const bgl_named_params<P, T, R>& params,
- detail::error_property_not_found)
- {
- typedef typename graph_traits<Graph>::edge_descriptor edge_descriptor;
- typedef typename graph_traits<Graph>::vertices_size_type size_type;
- size_type n = is_default_param(get_param(params, vertex_color)) ?
- num_vertices(g) : 1;
- std::vector<default_color_type> color_vec(n);
- return edmunds_karp_max_flow
- (g, src, sink,
- choose_const_pmap(get_param(params, edge_capacity), g, edge_capacity),
- choose_pmap(get_param(params, edge_residual_capacity),
- g, edge_residual_capacity),
- choose_const_pmap(get_param(params, edge_reverse), g, edge_reverse),
- make_iterator_property_map(color_vec.begin(), choose_const_pmap
- (get_param(params, vertex_index),
- g, vertex_index), color_vec[0]),
- pred);
- }
- };
-
- //-------------------------------------------------------------------------
- // Handle default for predecessor property map
-
- // use of class here is a VC++ workaround
- template <class PredMap>
- struct edmunds_karp_dispatch1 {
- template <class Graph, class P, class T, class R>
- static typename edge_capacity_value<Graph, P, T, R>::type
- apply(Graph& g,
- typename graph_traits<Graph>::vertex_descriptor src,
- typename graph_traits<Graph>::vertex_descriptor sink,
- const bgl_named_params<P, T, R>& params,
- PredMap pred)
- {
- typedef typename property_value< bgl_named_params<P,T,R>, vertex_color_t>::type C;
- return edmunds_karp_dispatch2<C>::apply
- (g, src, sink, pred, params, get_param(params, vertex_color));
- }
- };
- template<>
- struct edmunds_karp_dispatch1<detail::error_property_not_found> {
-
- template <class Graph, class P, class T, class R>
- static typename edge_capacity_value<Graph, P, T, R>::type
- apply
- (Graph& g,
- typename graph_traits<Graph>::vertex_descriptor src,
- typename graph_traits<Graph>::vertex_descriptor sink,
- const bgl_named_params<P, T, R>& params,
- detail::error_property_not_found)
- {
- typedef typename graph_traits<Graph>::edge_descriptor edge_descriptor;
- typedef typename graph_traits<Graph>::vertices_size_type size_type;
- size_type n = is_default_param(get_param(params, vertex_predecessor)) ?
- num_vertices(g) : 1;
- std::vector<edge_descriptor> pred_vec(n);
-
- typedef typename property_value< bgl_named_params<P,T,R>, vertex_color_t>::type C;
- return edmunds_karp_dispatch2<C>::apply
- (g, src, sink,
- make_iterator_property_map(pred_vec.begin(), choose_const_pmap
- (get_param(params, vertex_index),
- g, vertex_index), pred_vec[0]),
- params,
- get_param(params, vertex_color));
- }
- };
-
- } // namespace detail
-
- template <class Graph, class P, class T, class R>
- typename detail::edge_capacity_value<Graph, P, T, R>::type
- edmunds_karp_max_flow
- (Graph& g,
- typename graph_traits<Graph>::vertex_descriptor src,
- typename graph_traits<Graph>::vertex_descriptor sink,
- const bgl_named_params<P, T, R>& params)
- {
- typedef typename property_value< bgl_named_params<P,T,R>, vertex_predecessor_t>::type Pred;
- return detail::edmunds_karp_dispatch1<Pred>::apply
- (g, src, sink, params, get_param(params, vertex_predecessor));
- }
-
- template <class Graph>
- typename property_traits<
- typename property_map<Graph, edge_capacity_t>::const_type
- >::value_type
- edmunds_karp_max_flow
- (Graph& g,
- typename graph_traits<Graph>::vertex_descriptor src,
- typename graph_traits<Graph>::vertex_descriptor sink)
- {
- bgl_named_params<int, buffer_param_t> params(0);
- return edmunds_karp_max_flow(g, src, sink, params);
- }
-
-} // namespace boost
-
-#endif // EDMUNDS_KARP_MAX_FLOW_HPP
Modified: branches/fix-links/boost/interprocess/allocators/allocator.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/allocators/allocator.hpp (original)
+++ branches/fix-links/boost/interprocess/allocators/allocator.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -101,9 +101,13 @@
typedef transform_iterator
< typename SegmentManager::
multiallocation_iterator
- , detail::cast_functor <T> > multiallocation_iterator;
- typedef typename SegmentManager::
- multiallocation_chain multiallocation_chain;
+ , detail::cast_functor <T> > multiallocation_iterator;
+ typedef detail::multiallocation_chain_adaptor
+ <typename SegmentManager::
+ multiallocation_chain
+ , T> multiallocation_chain;
+// typedef typename SegmentManager::
+// multiallocation_chain multiallocation_chain;
/// @endcond
Modified: branches/fix-links/boost/interprocess/allocators/detail/adaptive_node_pool.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/allocators/detail/adaptive_node_pool.hpp (original)
+++ branches/fix-links/boost/interprocess/allocators/detail/adaptive_node_pool.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -186,39 +186,11 @@
//!Deallocates an array pointed by ptr. Never throws
void deallocate_node(void *pElem)
{
- priv_invariants();
- chunk_info_t *chunk_info = priv_chunk_from_node(pElem);
- assert(chunk_info->free_nodes.size() < m_real_num_node);
- //We put the node at the beginning of the free node list
- node_t * to_deallocate = static_cast<node_t*>(pElem);
- chunk_info->free_nodes.push_front(*to_deallocate);
-
- chunk_iterator this_chunk(chunk_multiset_t::s_iterator_to(*chunk_info));
- chunk_iterator next_chunk(this_chunk);
- ++next_chunk;
-
- //Cache the free nodes from the chunk
- std::size_t this_chunk_free_nodes = this_chunk->free_nodes.size();
-
- if(this_chunk_free_nodes == 1){
- m_chunk_multiset.insert(m_chunk_multiset.begin(), *chunk_info);
- }
- else{
- chunk_iterator next_chunk(this_chunk);
- ++next_chunk;
- if(next_chunk != m_chunk_multiset.end()){
- std::size_t next_free_nodes = next_chunk->free_nodes.size();
- if(this_chunk_free_nodes > next_free_nodes){
- //Now move the chunk to the new position
- m_chunk_multiset.erase(this_chunk);
- m_chunk_multiset.insert(*chunk_info);
- }
- }
- }
+ this->priv_reinsert_nodes_in_chunk
+ (multiallocation_iterator::create_simple_range(pElem));
//Update free chunk count
- if(this_chunk_free_nodes == m_real_num_node){
- ++m_totally_free_chunks;
- priv_deallocate_free_chunks(m_max_free_chunks);
+ if(m_totally_free_chunks > m_max_free_chunks){
+ this->priv_deallocate_free_chunks(m_max_free_chunks);
}
priv_invariants();
}
@@ -227,7 +199,6 @@
//!can throw boost::interprocess::bad_alloc
void allocate_nodes(multiallocation_chain &nodes, const std::size_t n)
{
- std::size_t old_node_count = nodes.size();
try{
priv_invariants();
for(std::size_t i = 0; i != n; ++i){
@@ -239,12 +210,10 @@
}
}
catch(...){
- priv_deallocate_nodes(nodes, nodes.size());
- priv_deallocate_free_chunks(m_max_free_chunks);
+ this->deallocate_nodes(nodes, nodes.size());
+ this->priv_deallocate_free_chunks(m_max_free_chunks);
throw;
}
- //remove me
- assert((n+old_node_count) == (std::size_t)std::distance(nodes.get_it(), multiallocation_iterator()));
priv_invariants();
}
@@ -259,25 +228,31 @@
//!Deallocates a linked list of nodes. Never throws
void deallocate_nodes(multiallocation_chain &nodes)
- { priv_deallocate_nodes(nodes, nodes.size()); }
+ {
+ this->deallocate_nodes(nodes.get_it());
+ nodes.reset();
+ }
//!Deallocates the first n nodes of a linked list of nodes. Never throws
void deallocate_nodes(multiallocation_chain &nodes, std::size_t n)
- { priv_deallocate_nodes(nodes, n); }
+ {
+ assert(nodes.size() >= n);
+ for(std::size_t i = 0; i < n; ++i){
+ this->deallocate_node(nodes.pop_front());
+ }
+ }
//!Deallocates the nodes pointed by the multiallocation iterator. Never throws
void deallocate_nodes(multiallocation_iterator it)
{
- multiallocation_iterator itend;
- while(it != itend){
- void *addr = &*it;
- ++it;
- deallocate_node(addr);
+ this->priv_reinsert_nodes_in_chunk(it);
+ if(m_totally_free_chunks > m_max_free_chunks){
+ this->priv_deallocate_free_chunks(m_max_free_chunks);
}
}
void deallocate_free_chunks()
- { priv_deallocate_free_chunks(0); }
+ { this->priv_deallocate_free_chunks(0); }
std::size_t num_free_nodes()
{
@@ -302,6 +277,71 @@
}
private:
+ void priv_deallocate_free_chunks(std::size_t max_free_chunks)
+ {
+ priv_invariants();
+ //Now check if we've reached the free nodes limit
+ //and check if we have free chunks. If so, deallocate as much
+ //as we can to stay below the limit
+ for( chunk_iterator itend = m_chunk_multiset.end()
+ ; m_totally_free_chunks > max_free_chunks
+ ; --m_totally_free_chunks
+ ){
+ assert(!m_chunk_multiset.empty());
+ chunk_iterator it = itend;
+ --it;
+ std::size_t num_nodes = it->free_nodes.size();
+ assert(num_nodes == m_real_num_node);
+ (void)num_nodes;
+ m_chunk_multiset.erase_and_dispose
+ (it, chunk_destroyer(this));
+ }
+ }
+
+ void priv_reinsert_nodes_in_chunk(multiallocation_iterator it)
+ {
+ multiallocation_iterator itend;
+ chunk_iterator chunk_it(m_chunk_multiset.end());
+ while(it != itend){
+ void *pElem = &*it;
+ ++it;
+ priv_invariants();
+ chunk_info_t *chunk_info = this->priv_chunk_from_node(pElem);
+ assert(chunk_info->free_nodes.size() < m_real_num_node);
+ //We put the node at the beginning of the free node list
+ node_t * to_deallocate = static_cast<node_t*>(pElem);
+ chunk_info->free_nodes.push_front(*to_deallocate);
+
+ chunk_iterator this_chunk(chunk_multiset_t::s_iterator_to(*chunk_info));
+ chunk_iterator next_chunk(this_chunk);
+ ++next_chunk;
+
+ //Cache the free nodes from the chunk
+ std::size_t this_chunk_free_nodes = this_chunk->free_nodes.size();
+
+ if(this_chunk_free_nodes == 1){
+ m_chunk_multiset.insert(m_chunk_multiset.begin(), *chunk_info);
+ }
+ else{
+ chunk_iterator next_chunk(this_chunk);
+ ++next_chunk;
+ if(next_chunk != chunk_it){
+ std::size_t next_free_nodes = next_chunk->free_nodes.size();
+ if(this_chunk_free_nodes > next_free_nodes){
+ //Now move the chunk to the new position
+ m_chunk_multiset.erase(this_chunk);
+ m_chunk_multiset.insert(*chunk_info);
+ }
+ }
+ }
+ //Update free chunk count
+ if(this_chunk_free_nodes == m_real_num_node){
+ ++m_totally_free_chunks;
+ }
+ priv_invariants();
+ }
+ }
+
node_t *priv_take_first_node()
{
assert(m_chunk_multiset.begin() != m_chunk_multiset.end());
@@ -321,14 +361,6 @@
return first_node;
}
- void priv_deallocate_nodes(multiallocation_chain &nodes, const std::size_t num)
- {
- assert(nodes.size() >= num);
- for(std::size_t i = 0; i < num; ++i){
- deallocate_node(nodes.pop_front());
- }
- }
-
class chunk_destroyer;
friend class chunk_destroyer;
@@ -451,27 +483,6 @@
return hdr_off_holder;
}
- void priv_deallocate_free_chunks(std::size_t max_free_chunks)
- {
- priv_invariants();
- //Now check if we've reached the free nodes limit
- //and check if we have free chunks. If so, deallocate as much
- //as we can to stay below the limit
- for( chunk_iterator itend = m_chunk_multiset.end()
- ; m_totally_free_chunks > max_free_chunks
- ; --m_totally_free_chunks
- ){
- assert(!m_chunk_multiset.empty());
- chunk_iterator it = itend;
- --it;
- std::size_t num_nodes = it->free_nodes.size();
- assert(num_nodes == m_real_num_node);
- (void)num_nodes;
- m_chunk_multiset.erase_and_dispose
- (it, chunk_destroyer(this));
- }
- }
-
//!Allocates a several chunks of nodes. Can throw boost::interprocess::bad_alloc
void priv_alloc_chunk(std::size_t n)
{
Modified: branches/fix-links/boost/interprocess/allocators/detail/allocator_common.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/allocators/detail/allocator_common.hpp (original)
+++ branches/fix-links/boost/interprocess/allocators/detail/allocator_common.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -174,7 +174,7 @@
}
BOOST_CATCH(...){
this->cached_deallocation(multiallocation_iterator(chain.get_it()));
- throw;
+ BOOST_RETHROW
}
BOOST_CATCH_END
}
Modified: branches/fix-links/boost/interprocess/allocators/detail/node_pool.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/allocators/detail/node_pool.hpp (original)
+++ branches/fix-links/boost/interprocess/allocators/detail/node_pool.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -91,11 +91,26 @@
//!Allocates array of count elements. Can throw boost::interprocess::bad_alloc
void *allocate_node()
- { return priv_alloc_node(); }
+ {
+ //If there are no free nodes we allocate a new block
+ if (m_freelist.empty())
+ priv_alloc_chunk();
+ //We take the first free node
+ node_t *n = (node_t*)&m_freelist.front();
+ m_freelist.pop_front();
+ ++m_allocated;
+ return n;
+ }
//!Deallocates an array pointed by ptr. Never throws
void deallocate_node(void *ptr)
- { priv_dealloc_node(ptr); }
+ {
+ //We put the node at the beginning of the free node list
+ node_t * to_deallocate = static_cast<node_t*>(ptr);
+ m_freelist.push_front(*to_deallocate);
+ assert(m_allocated>0);
+ --m_allocated;
+ }
//!Allocates a singly linked list of n nodes ending in null pointer and pushes them in the chain.
//!can throw boost::interprocess::bad_alloc
@@ -104,7 +119,7 @@
std::size_t i = 0;
try{
for(; i < n; ++i){
- nodes.push_front(priv_alloc_node());
+ nodes.push_front(this->allocate_node());
}
}
catch(...){
@@ -121,7 +136,7 @@
std::size_t i = 0;
try{
for(; i < n; ++i){
- nodes.push_front(priv_alloc_node());
+ nodes.push_front(this->allocate_node());
}
}
catch(...){
@@ -133,7 +148,10 @@
//!Deallocates a linked list of nodes. Never throws
void deallocate_nodes(multiallocation_chain &nodes)
- { this->deallocate_nodes(nodes.get_it()); }
+ {
+ this->deallocate_nodes(nodes.get_it());
+ nodes.reset();
+ }
//!Deallocates the first n nodes of a linked list of nodes. Never throws
void deallocate_nodes(multiallocation_chain &nodes, std::size_t num)
@@ -287,31 +305,6 @@
const char * end_;
};
- //!Allocates one node, using single segregated storage algorithm.
- //!Never throws
- node_t *priv_alloc_node()
- {
- //If there are no free nodes we allocate a new block
- if (m_freelist.empty())
- priv_alloc_chunk();
- //We take the first free node
- node_t *n = (node_t*)&m_freelist.front();
- m_freelist.pop_front();
- ++m_allocated;
- return n;
- }
-
- //!Deallocates one node, using single segregated storage algorithm.
- //!Never throws
- void priv_dealloc_node(void *pElem)
- {
- //We put the node at the beginning of the free node list
- node_t * to_deallocate = static_cast<node_t*>(pElem);
- m_freelist.push_front(*to_deallocate);
- assert(m_allocated>0);
- --m_allocated;
- }
-
//!Allocates a chunk of nodes. Can throw boost::interprocess::bad_alloc
void priv_alloc_chunk()
{
Modified: branches/fix-links/boost/interprocess/containers/deque.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/containers/deque.hpp (original)
+++ branches/fix-links/boost/interprocess/containers/deque.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1359,9 +1359,9 @@
size_type new_nodes = (new_elems + this->s_buffer_size() - 1) /
this->s_buffer_size();
this->priv_reserve_map_at_front(new_nodes);
- size_type i;
+ size_type i = 1;
BOOST_TRY {
- for (i = 1; i <= new_nodes; ++i)
+ for (; i <= new_nodes; ++i)
*(this->members_.m_start.m_node - i) = this->priv_allocate_node();
}
BOOST_CATCH(...) {
@@ -1453,6 +1453,7 @@
for(;first2 != mid2; ++first2){
detail::get_pointer(&*first2)->~value_type();
}
+ BOOST_RETHROW
}
BOOST_CATCH_END
}
Modified: branches/fix-links/boost/interprocess/containers/detail/node_alloc_holder.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/containers/detail/node_alloc_holder.hpp (original)
+++ branches/fix-links/boost/interprocess/containers/detail/node_alloc_holder.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -176,7 +176,7 @@
BOOST_CATCH(...){
valueptr->first.~first_type();
static_cast<hook_type*>(nodeptr)->~hook_type();
- throw;
+ BOOST_RETHROW
}
BOOST_CATCH_END
}
@@ -201,7 +201,7 @@
BOOST_CATCH(...){
valueptr->first.~first_type();
static_cast<hook_type*>(nodeptr)->~hook_type();
- throw;
+ BOOST_RETHROW
}
BOOST_CATCH_END
}
@@ -296,6 +296,7 @@
this->destroy(p);
}
this->node_alloc().deallocate_many(itbeg);
+ BOOST_RETHROW
}
BOOST_CATCH_END
return beg;
Modified: branches/fix-links/boost/interprocess/containers/slist.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/containers/slist.hpp (original)
+++ branches/fix-links/boost/interprocess/containers/slist.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -347,7 +347,7 @@
slist(InpIt first, InpIt last,
const allocator_type& a = allocator_type())
: AllocHolder(a)
- { this->insert_after(this->end_node(), first, last); }
+ { this->insert_after(this->before_begin(), first, last); }
//! <b>Effects</b>: Copy constructs a list.
//!
@@ -804,7 +804,7 @@
//! <b>Complexity</b>: Linear to the difference between size() and new_size.
void resize(size_type new_size, const T& x)
{
- typename Icont::iterator end_n(this->icont().end()), cur(end_n), cur_next;
+ typename Icont::iterator end_n(this->icont().end()), cur(this->icont().before_begin()), cur_next;
while (++(cur_next = cur) != end_n && new_size > 0){
--new_size;
cur = cur_next;
@@ -823,7 +823,7 @@
//! <b>Complexity</b>: Linear to the difference between size() and new_size.
void resize(size_type new_size)
{
- typename Icont::iterator end_n(this->icont().end()), cur(end_n), cur_next;
+ typename Icont::iterator end_n(this->icont().end()), cur(this->icont().before_begin()), cur_next;
size_type len = this->size();
size_type left = new_size;
@@ -835,7 +835,7 @@
this->erase_after(iterator(cur), iterator(end_n));
}
else{
- this->priv_create_and_insert_nodes(this->end(), new_size - len);
+ this->priv_create_and_insert_nodes(iterator(cur), new_size - len);
}
}
@@ -1252,9 +1252,9 @@
void priv_fill_assign(size_type n, const T& val)
{
- iterator end_n(end());
- iterator prev(before_begin());
- iterator node(begin());
+ iterator end_n(this->end());
+ iterator prev(this->before_begin());
+ iterator node(this->begin());
for ( ; node != end_n && n > 0 ; --n){
*node = val;
prev = node;
@@ -1274,9 +1274,9 @@
void priv_assign_dispatch(InpIt first, InpIt last,
detail::false_)
{
- iterator end_n(end());
- iterator prev(before_begin());
- iterator node(begin());
+ iterator end_n(this->end());
+ iterator prev(this->before_begin());
+ iterator node(this->begin());
while (node != end_n && first != last){
*node = *first;
prev = node;
@@ -1295,7 +1295,7 @@
template <class InIter>
void priv_insert_after_range_dispatch(iterator prev_pos, InIter first, InIter last, detail::false_)
- { return priv_create_and_insert_nodes(prev_pos, first, last); }
+ { this->priv_create_and_insert_nodes(prev_pos, first, last); }
//Functors for member algorithm defaults
struct value_less
Modified: branches/fix-links/boost/interprocess/containers/string.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/containers/string.hpp (original)
+++ branches/fix-links/boost/interprocess/containers/string.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1684,7 +1684,7 @@
for (; constructed--; ++dest_init){
this->destroy(dest_init);
}
- BOOST_RETHROW;
+ BOOST_RETHROW
}
BOOST_CATCH_END
return (constructed);
Modified: branches/fix-links/boost/interprocess/containers/vector.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/containers/vector.hpp (original)
+++ branches/fix-links/boost/interprocess/containers/vector.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -731,7 +731,7 @@
//There is not enough memory, allocate a new
//buffer or expand the old one.
bool same_buffer_start;
- size_type real_cap;
+ size_type real_cap = 0;
std::pair<pointer, bool> ret =
this->allocation_command
(allocate_new | expand_fwd | expand_bwd,
Modified: branches/fix-links/boost/interprocess/detail/algorithms.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/detail/algorithms.hpp (original)
+++ branches/fix-links/boost/interprocess/detail/algorithms.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -92,7 +92,7 @@
for (; new_count--; ++dest_init){
detail::get_pointer(&*dest_init)->~value_type();
}
- BOOST_RETHROW;
+ BOOST_RETHROW
}
BOOST_CATCH_END
return first;
Modified: branches/fix-links/boost/interprocess/detail/managed_open_or_create_impl.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/detail/managed_open_or_create_impl.hpp (original)
+++ branches/fix-links/boost/interprocess/detail/managed_open_or_create_impl.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -332,7 +332,8 @@
//If the following throws, we will truncate the file to 1
mapped_region region(dev, read_write, 0, 0, addr);
- boost::uint32_t *patomic_word = static_cast<boost::uint32_t*>(region.get_address());
+ boost::uint32_t *patomic_word = 0; //avoid gcc warning
+ patomic_word = static_cast<boost::uint32_t*>(region.get_address());
boost::uint32_t previous = detail::atomic_cas32(patomic_word, InitializingSegment, UninitializedSegment);
if(previous == UninitializedSegment){
Modified: branches/fix-links/boost/interprocess/detail/segment_manager_helper.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/detail/segment_manager_helper.hpp (original)
+++ branches/fix-links/boost/interprocess/detail/segment_manager_helper.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -210,7 +210,7 @@
BOOST_CATCH(...){
std::size_t destroyed = 0;
table.destroy_n(mem, constructed, destroyed);
- BOOST_RETHROW;
+ BOOST_RETHROW
}
BOOST_CATCH_END
}
Modified: branches/fix-links/boost/interprocess/detail/utilities.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/detail/utilities.hpp (original)
+++ branches/fix-links/boost/interprocess/detail/utilities.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -26,7 +26,7 @@
#include <boost/type_traits/has_trivial_destructor.hpp>
#include <boost/interprocess/detail/min_max.hpp>
#include <boost/interprocess/detail/type_traits.hpp>
-#include <boost/interprocess/detail/type_traits.hpp>
+#include <boost/interprocess/detail/iterators.hpp>
#include <boost/interprocess/detail/version_type.hpp>
#include <utility>
#include <algorithm>
@@ -678,6 +678,52 @@
{ return *static_cast<T*>(static_cast<void*>(&ptr)); }
};
+template<class MultiallocChain, class T>
+class multiallocation_chain_adaptor
+{
+ private:
+ MultiallocChain chain_;
+
+ multiallocation_chain_adaptor
+ (const multiallocation_chain_adaptor &);
+ multiallocation_chain_adaptor &operator=
+ (const multiallocation_chain_adaptor &);
+
+ public:
+ typedef transform_iterator
+ < typename MultiallocChain::
+ multiallocation_iterator
+ , detail::cast_functor <T> > multiallocation_iterator;
+
+ multiallocation_chain_adaptor()
+ : chain_()
+ {}
+
+ void push_back(T *mem)
+ { chain_.push_back(mem); }
+
+ void push_front(T *mem)
+ { chain_.push_front(mem); }
+
+ void swap(multiallocation_chain_adaptor &other_chain)
+ { chain_.swap(other_chain.chain_); }
+
+ void splice_back(multiallocation_chain_adaptor &other_chain)
+ { chain_.splice_back(other_chain.chain_); }
+
+ T *pop_front()
+ { return static_cast<T*>(chain_.pop_front()); }
+
+ bool empty() const
+ { return chain_.empty(); }
+
+ multiallocation_iterator get_it() const
+ { return multiallocation_iterator(chain_.get_it()); }
+
+ std::size_t size() const
+ { return chain_.size(); }
+};
+
} //namespace detail {
//!The pair is movable if any of its members is movable
Modified: branches/fix-links/boost/interprocess/indexes/iunordered_set_index.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/indexes/iunordered_set_index.hpp (original)
+++ branches/fix-links/boost/interprocess/indexes/iunordered_set_index.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -289,15 +289,14 @@
size_type cur_size = this->size();
size_type cur_count = this->bucket_count();
bucket_ptr old_p = this->bucket_pointer();
- size_type sug_count;
if(!this->size() && old_p != bucket_ptr(&this->init_bucket)){
- sug_count = 1;
this->rehash(bucket_traits(bucket_ptr(&this->init_bucket), 1));
destroy_buckets(this->alloc, old_p, cur_count);
}
else{
- sug_count = index_type::suggested_upper_bucket_count(cur_size);
+ size_type sug_count = 0; //gcc warning
+ sug_count = index_type::suggested_upper_bucket_count(cur_size);
if(sug_count >= cur_count)
return;
Modified: branches/fix-links/boost/interprocess/mem_algo/detail/mem_algo_common.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/mem_algo/detail/mem_algo_common.hpp (original)
+++ branches/fix-links/boost/interprocess/mem_algo/detail/mem_algo_common.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -22,6 +22,7 @@
#include <boost/interprocess/allocators/allocation_type.hpp>
#include <boost/interprocess/detail/utilities.hpp>
#include <boost/interprocess/detail/type_traits.hpp>
+#include <boost/interprocess/detail/iterators.hpp>
#include <boost/assert.hpp>
#include <boost/static_assert.hpp>
@@ -100,6 +101,16 @@
pointer operator->() const
{ return &(*(*this)); }
+ static basic_multiallocation_iterator create_simple_range(void *mem)
+ {
+ basic_multiallocation_iterator it;
+ typedef multi_allocation_next<VoidPointer> next_impl_t;
+ next_impl_t * tmp_mem = static_cast<next_impl_t*>(mem);
+ it = basic_multiallocation_iterator<VoidPointer>(tmp_mem);
+ tmp_mem->next_ = 0;
+ return it;
+ }
+
private:
multi_allocation_next<VoidPointer> next_alloc_;
};
@@ -122,6 +133,13 @@
: it_(0), last_mem_(0), num_mem_(0)
{}
+ void reset()
+ {
+ this->it_ = multiallocation_iterator();
+ this->last_mem_ = 0;
+ this->num_mem_ = 0;
+ }
+
void push_back(void *mem)
{
typedef multi_allocation_next<VoidPointer> next_impl_t;
@@ -138,35 +156,21 @@
++num_mem_;
}
- void push_back(multiallocation_iterator it, std::size_t n)
+ void push_front(void *mem)
{
typedef multi_allocation_next<VoidPointer> next_impl_t;
- next_impl_t * tmp_mem = (next_impl_t*)(&*it);
-
- if(!this->last_mem_){
- this->it_ = it;
- }
- else{
- static_cast<next_impl_t*>(detail::get_pointer(this->last_mem_))->next_ = tmp_mem;
- }
- tmp_mem->next_ = 0;
- this->last_mem_ = tmp_mem;
+ next_impl_t * tmp_mem = static_cast<next_impl_t*>(mem);
++num_mem_;
- }
- void push_front(void *mem)
- {
- typedef multi_allocation_next<VoidPointer> next_impl_t;
-
if(!this->last_mem_){
- push_back(mem);
+ this->it_ = basic_multiallocation_iterator<VoidPointer>(tmp_mem);
+ tmp_mem->next_ = 0;
+ this->last_mem_ = tmp_mem;
}
else{
- next_impl_t * tmp_mem = static_cast<next_impl_t*>(mem);
next_impl_t * old_first = (next_impl_t*)(&*this->it_);
- static_cast<next_impl_t*>(mem)->next_ = old_first;
+ tmp_mem->next_ = old_first;
this->it_ = basic_multiallocation_iterator<VoidPointer>(tmp_mem);
- ++num_mem_;
}
}
@@ -186,14 +190,15 @@
if(end_it == other_it){
return;
}
- else if(end_it == other_it){
+ else if(end_it == this_it){
this->swap(other_chain);
}
-
- static_cast<next_impl_t*>(detail::get_pointer(this->last_mem_))->next_
- = (next_impl_t*)&*this->it_;
- this->last_mem_ = other_chain.last_mem_;
- this->num_mem_ += other_chain.num_mem_;
+ else{
+ static_cast<next_impl_t*>(detail::get_pointer(this->last_mem_))->next_
+ = (next_impl_t*)&*other_chain.it_;
+ this->last_mem_ = other_chain.last_mem_;
+ this->num_mem_ += other_chain.num_mem_;
+ }
}
void *pop_front()
@@ -226,45 +231,6 @@
{ return num_mem_; }
};
-template<class Allocator>
-class allocator_multiallocation_chain
-{
- typedef typename detail::
- pointer_to_other<typename Allocator::pointer, void>::type
- void_ptr;
-
- typedef typename Allocator::multiallocation_iterator multiallocation_iterator;
- basic_multiallocation_chain<void_ptr> chain_;
-
- public:
-
- allocator_multiallocation_chain()
- : chain_()
- {}
-
- void push_back(void *mem)
- { chain_.push_back(mem); }
-
- multiallocation_iterator get_it() const
- { return multiallocation_iterator(chain_.get_it()); }
-};
-
-
-#define BOOST_MULTIALLOC_IT_CHAIN_INIT(IT_CHAIN) ((IT_CHAIN).it.next = 0, (IT_CHAIN).last_mem = 0)
-#define BOOST_MULTIALLOC_IT_CHAIN_ADD(IT_CHAIN, MEM)\
- do{\
- multialloc_it_t *____tmp_mem____ = (multialloc_it_t*)(MEM);\
- if(!IT_CHAIN.last_mem){\
- (IT_CHAIN).it.next = ____tmp_mem____;\
- }else{\
- ((multialloc_it_t*)(IT_CHAIN.last_mem))->next = ____tmp_mem____;\
- }\
- ____tmp_mem____->next = 0;\
- IT_CHAIN.last_mem = ____tmp_mem____;\
- }while(0)
-
-#define BOOST_MULTIALLOC_IT_CHAIN_IT(IT_CHAIN) ((IT_CHAIN).it)
-
//!This class implements several allocation functions shared by different algorithms
//!(aligned allocation, multiple allocation...).
@@ -622,14 +588,15 @@
if((received_units - total_used_units) >= (elem_units + MemoryAlgorithm::BlockCtrlUnits)){
std::size_t shrunk_received;
std::size_t shrunk_request = elem_units*Alignment - AllocatedCtrlBytes + UsableByPreviousChunk;
- bool ret = shrink
+ bool shrink_ok = shrink
(memory_algo
,memory_algo->priv_get_user_buffer(new_block)
,shrunk_request
,shrunk_request
,shrunk_received);
+ (void)shrink_ok;
//Shrink must always succeed with passed parameters
- BOOST_ASSERT(ret);
+ BOOST_ASSERT(shrink_ok);
//Some sanity checks
BOOST_ASSERT(shrunk_request == shrunk_received);
BOOST_ASSERT(elem_units == ((shrunk_request-UsableByPreviousChunk)/Alignment + AllocatedCtrlUnits));
Modified: branches/fix-links/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp (original)
+++ branches/fix-links/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -394,6 +394,7 @@
std::size_t received_size;
void *addr = priv_check_and_allocate(last_units, prev, last, received_size);
+ (void)addr;
assert(addr);
assert(received_size == last_units*Alignment - AllocatedCtrlBytes);
Modified: branches/fix-links/boost/interprocess/mem_algo/rbtree_best_fit.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/mem_algo/rbtree_best_fit.hpp (original)
+++ branches/fix-links/boost/interprocess/mem_algo/rbtree_best_fit.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1138,6 +1138,7 @@
}
else{
block_ctrl *prev = priv_prev_block(ptr);
+ (void)prev;
assert(!priv_is_allocated_block(prev));
return false;
}
@@ -1151,6 +1152,7 @@
assert(first_segment_block->m_prev_allocated);
block_ctrl *end_block = reinterpret_cast<block_ctrl *>
(detail::char_ptr_cast(first_segment_block) - first_segment_block->m_prev_size*Alignment);
+ (void)end_block;
assert(priv_is_allocated_block(end_block));
assert(end_block > first_segment_block);
return end_block;
Modified: branches/fix-links/boost/interprocess/segment_manager.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/segment_manager.hpp (original)
+++ branches/fix-links/boost/interprocess/segment_manager.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -272,7 +272,8 @@
//Now construct the header
block_header_t * hdr = new(ptr_struct) block_header_t(block_info);
- void *ptr = hdr->value();
+ void *ptr = 0; //avoid gcc warning
+ ptr = hdr->value();
//Now call constructors
detail::array_construct(ptr, num, table);
@@ -1062,7 +1063,7 @@
//Ignore exceptions
BOOST_CATCH(...){
if(dothrow)
- BOOST_RETHROW;
+ BOOST_RETHROW
return 0;
}
BOOST_CATCH_END
@@ -1096,7 +1097,8 @@
//Now construct the intrusive hook plus the header
intrusive_value_type * intrusive_hdr = new(buffer_ptr) intrusive_value_type();
block_header_t * hdr = new(intrusive_hdr->get_block_header())block_header_t(block_info);
- void *ptr = hdr->value();
+ void *ptr = 0; //avoid gcc warning
+ ptr = hdr->value();
//Copy name to memory segment and insert data
CharT *name_ptr = static_cast<CharT *>(hdr->template name<CharT>());
@@ -1109,7 +1111,7 @@
//Ignore exceptions
BOOST_CATCH(...){
if(dothrow)
- BOOST_RETHROW;
+ BOOST_RETHROW
return 0;
}
BOOST_CATCH_END
@@ -1235,7 +1237,8 @@
}
hdr = new(hdr)block_header_t(block_info);
- void *ptr = hdr->value();
+ void *ptr = 0; //avoid gcc warning
+ ptr = hdr->value();
//Copy name to memory segment and insert data
CharT *name_ptr = static_cast<CharT *>(hdr->template name<CharT>());
Modified: branches/fix-links/boost/interprocess/smart_ptr/detail/shared_count.hpp
==============================================================================
--- branches/fix-links/boost/interprocess/smart_ptr/detail/shared_count.hpp (original)
+++ branches/fix-links/boost/interprocess/smart_ptr/detail/shared_count.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -92,7 +92,7 @@
}
BOOST_CATCH (...){
d(p); // delete p
- throw;
+ BOOST_RETHROW
}
BOOST_CATCH_END
}
Modified: branches/fix-links/boost/intrusive/circular_list_algorithms.hpp
==============================================================================
--- branches/fix-links/boost/intrusive/circular_list_algorithms.hpp (original)
+++ branches/fix-links/boost/intrusive/circular_list_algorithms.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -154,10 +154,9 @@
static void unlink(node_ptr b, node_ptr e)
{
if (b != e) {
- node_ptr prev(NodeTraits::get_previous(b));
- node_ptr next(NodeTraits::get_next(e));
- NodeTraits::set_previous(next, prev);
- NodeTraits::set_next(prev, next);
+ node_ptr prevb(NodeTraits::get_previous(b));
+ NodeTraits::set_previous(e, prevb);
+ NodeTraits::set_next(prevb, e);
}
}
Modified: branches/fix-links/boost/intrusive/circular_slist_algorithms.hpp
==============================================================================
--- branches/fix-links/boost/intrusive/circular_slist_algorithms.hpp (original)
+++ branches/fix-links/boost/intrusive/circular_slist_algorithms.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -16,6 +16,7 @@
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/common_slist_algorithms.hpp>
#include <boost/intrusive/detail/assert.hpp>
#include <cstddef>
@@ -45,22 +46,98 @@
//! <tt>static void set_next(node_ptr n, node_ptr next);</tt>
template<class NodeTraits>
class circular_slist_algorithms
+ /// @cond
+ : public detail::common_slist_algorithms<NodeTraits>
+ /// @endcond
{
+ /// @cond
+ typedef detail::common_slist_algorithms<NodeTraits> base_t;
+ /// @endcond
public:
typedef typename NodeTraits::node_ptr node_ptr;
typedef typename NodeTraits::const_node_ptr const_node_ptr;
typedef NodeTraits node_traits;
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <b>Effects</b>: Constructs an non-used list element, putting the next
+ //! pointer to null:
+ //! <tt>NodeTraits::get_next(this_node) == 0
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void init(node_ptr this_node);
+
//! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
//!
- //! <b>Effects</b>: Returns the previous node of this_node in the circular list.
+ //! <b>Effects</b>: Returns true is "this_node" is the only node of a circular list:
+ //! or it's a not inserted node:
+ //! <tt>return !NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</tt>
//!
- //! <b>Complexity</b>: Linear to the number of elements in the circular list.
+ //! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static node_ptr get_previous_node(node_ptr this_node)
- { return get_previous_node(this_node, this_node); }
+ static bool unique(const_node_ptr this_node);
+
+ //! <b>Effects</b>: Returns true is "this_node" has the same state as
+ //! if it was inited using "init(node_ptr)"
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static bool inited(const_node_ptr this_node);
+
+ //! <b>Requires</b>: prev_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Unlinks the next node of prev_node from the circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void unlink_after(node_ptr prev_node);
+
+ //! <b>Requires</b>: prev_node and last_node must be in a circular list
+ //! or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Unlinks the range (prev_node, last_node) from the circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void unlink_after(node_ptr prev_node, node_ptr last_node);
+
+ //! <b>Requires</b>: prev_node must be a node of a circular list.
+ //!
+ //! <b>Effects</b>: Links this_node after prev_node in the circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void link_after(node_ptr prev_node, node_ptr this_node);
+
+ //! <b>Requires</b>: b and e must be nodes of the same circular list or an empty range.
+ //! and p must be a node of a different circular list.
+ //!
+ //! <b>Effects</b>: Removes the nodes from (b, e] range from their circular list and inserts
+ //! them after p in p's circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void transfer_after(node_ptr p, node_ptr b, node_ptr e);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! <b>Effects</b>: Constructs an empty list, making this_node the only
+ //! node of the circular list:
+ //! <tt>NodeTraits::get_next(this_node) == this_node</tt>.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void init_header(node_ptr this_node)
+ { NodeTraits::set_next(this_node, this_node); }
//! <b>Requires</b>: this_node and prev_init_node must be in the same circular list.
//!
@@ -72,17 +149,17 @@
//!
//! <b>Throws</b>: Nothing.
static node_ptr get_previous_node(node_ptr prev_init_node, node_ptr this_node)
- {
- node_ptr p = prev_init_node;
- for( node_ptr p_next
- ; this_node != (p_next = NodeTraits::get_next(p))
- ; p = p_next){
- //Logic error: possible use of linear lists with
- //operations only permitted with circular lists
- BOOST_INTRUSIVE_INVARIANT_ASSERT(p);
- }
- return p;
- }
+ { return base_t::get_previous_node(prev_init_node, this_node); }
+
+ //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Returns the previous node of this_node in the circular list.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the circular list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr get_previous_node(node_ptr this_node)
+ { return base_t::get_previous_node(this_node, this_node); }
//! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
//!
@@ -116,49 +193,6 @@
return p;
}
- //! <b>Effects</b>: Constructs an empty list, making this_node the only
- //! node of the circular list:
- //! <tt>NodeTraits::get_next(this_node) == this_node</tt>.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void init_header(node_ptr this_node)
- { NodeTraits::set_next(this_node, this_node); }
-
- //! <b>Effects</b>: Constructs an non-used list element, putting the next
- //! pointer to null:
- //! <tt>NodeTraits::get_next(this_node) == 0
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void init(node_ptr this_node)
- { NodeTraits::set_next(this_node, 0); }
-
- //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Returns true is "this_node" is the only node of a circular list:
- //! or it's a not inserted node:
- //! <tt>return !NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</tt> or
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static bool unique(const_node_ptr this_node)
- {
- node_ptr next = NodeTraits::get_next(this_node);
- return !next || next == this_node;
- }
-
- //! <b>Effects</b>: Returns true is "this_node" has the same state as if it was inited using "init(node_ptr)"
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static bool inited(const_node_ptr this_node)
- { return !NodeTraits::get_next(this_node); }
-
//! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
//!
//! <b>Effects</b>: Returns the number of nodes in a circular list. If the circular list
@@ -178,33 +212,6 @@
return result;
}
- //! <b>Requires</b>: prev_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Unlinks the next node of prev_node from the circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void unlink_after(node_ptr prev_node)
- {
- node_ptr this_node(NodeTraits::get_next(prev_node));
- NodeTraits::set_next(prev_node, NodeTraits::get_next(this_node));
- //NodeTraits::set_next(this_node, this_node);
- }
-
- //! <b>Requires</b>: nxt_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Unlinks the previous node of nxt_node from the circular list.
- //!
- //! <b>Complexity</b>: Linear to the elements in the circular list.
- //!
- //! <b>Throws</b>: Nothing.
- static void unlink_before(node_ptr nxt_node)
- {
- node_ptr prev_to_erase(get_previous_previous_node(nxt_node));
- unlink_after(prev_to_erase);
- }
-
//! <b>Requires</b>: this_node must be in a circular list, be an empty circular list or be inited.
//!
//! <b>Effects</b>: Unlinks the node from the circular list.
@@ -215,20 +222,7 @@
static void unlink(node_ptr this_node)
{
if(NodeTraits::get_next(this_node))
- unlink_after(get_previous_node(this_node));
- }
-
- //! <b>Requires</b>: prev_node must be a node of a circular list.
- //!
- //! <b>Effects</b>: Links this_node after prev_node in the circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void link_after(node_ptr prev_node, node_ptr this_node)
- {
- NodeTraits::set_next(this_node, NodeTraits::get_next(prev_node));
- NodeTraits::set_next(prev_node, this_node);
+ base_t::unlink_after(get_previous_node(this_node));
}
//! <b>Requires</b>: nxt_node must be a node of a circular list.
@@ -239,7 +233,7 @@
//!
//! <b>Throws</b>: Nothing.
static void link_before (node_ptr nxt_node, node_ptr this_node)
- { link_after(get_previous_node(nxt_node), this_node); }
+ { base_t::link_after(get_previous_node(nxt_node), this_node); }
//! <b>Requires</b>: this_node and other_node must be nodes inserted
//! in circular lists or be empty circular lists.
@@ -255,17 +249,17 @@
{
if (other_node == this_node)
return;
- bool this_inited = inited(this_node);
- bool other_inited = inited(other_node);
+ bool this_inited = base_t::inited(this_node);
+ bool other_inited = base_t::inited(other_node);
if(this_inited){
- init_header(this_node);
+ base_t::init_header(this_node);
}
if(other_inited){
- init_header(other_node);
+ base_t::init_header(other_node);
}
- bool empty1 = unique(this_node);
- bool empty2 = unique(other_node);
+ bool empty1 = base_t::unique(this_node);
+ bool empty2 = base_t::unique(other_node);
node_ptr prev_this (get_previous_node(this_node));
node_ptr prev_other(get_previous_node(other_node));
@@ -277,31 +271,10 @@
NodeTraits::set_next(empty2 ? this_node : prev_other, this_node);
if(this_inited){
- init(other_node);
+ base_t::init(other_node);
}
if(other_inited){
- init(this_node);
- }
- }
-
- //! <b>Requires</b>: b and e must be nodes of the same circular list or an empty range.
- //! and p must be a node of a different circular list.
- //!
- //! <b>Effects</b>: Removes the nodes from (b, e] range from their circular list and inserts
- //! them after p in p's circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void transfer_after(node_ptr p, node_ptr b, node_ptr e)
- {
- if (p != b && p != e) {
- node_ptr next_b = NodeTraits::get_next(b);
- node_ptr next_e = NodeTraits::get_next(e);
- node_ptr next_p = NodeTraits::get_next(p);
- NodeTraits::set_next(b, next_e);
- NodeTraits::set_next(e, next_p);
- NodeTraits::set_next(p, next_b);
+ base_t::init(this_node);
}
}
@@ -317,24 +290,27 @@
node_ptr nxt(NodeTraits::get_next(i));
if (nxt == e)
break;
- transfer_after(e, i, nxt);
+ base_t::transfer_after(e, i, nxt);
}
}
//! <b>Effects</b>: Moves the node p n positions towards the end of the list.
- //!
+ //!
+ //! <b>Returns</b>: The previous node of p after the function if there has been any movement,
+ //! Null if n leads to no movement.
+ //!
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
- static void move_backwards(node_ptr p, std::size_t n)
+ static node_ptr move_backwards(node_ptr p, std::size_t n)
{
//Null shift, nothing to do
- if(!n) return;
+ if(!n) return 0;
node_ptr first = NodeTraits::get_next(p);
//count() == 1 or 2, nothing to do
if(NodeTraits::get_next(first) == p)
- return;
+ return 0;
bool end_found = false;
node_ptr new_last(0);
@@ -350,11 +326,11 @@
//Shortcut the shift with the modulo of the size of the list
n %= i;
if(!n)
- return;
+ return 0;
i = 0;
//Unlink p and continue the new first node search
first = NodeTraits::get_next(p);
- unlink_after(new_last);
+ base_t::unlink_after(new_last);
end_found = true;
}
}
@@ -362,26 +338,30 @@
//If the p has not been found in the previous loop, find it
//starting in the new first node and unlink it
if(!end_found){
- unlink_after(get_previous_node(first, p));
+ base_t::unlink_after(base_t::get_previous_node(first, p));
}
//Now link p after the new last node
- link_after(new_last, p);
+ base_t::link_after(new_last, p);
+ return new_last;
}
//! <b>Effects</b>: Moves the node p n positions towards the beginning of the list.
//!
+ //! <b>Returns</b>: The previous node of p after the function if there has been any movement,
+ //! Null if n leads equals to no movement.
+ //!
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
- static void move_forward(node_ptr p, std::size_t n)
+ static node_ptr move_forward(node_ptr p, std::size_t n)
{
//Null shift, nothing to do
- if(!n) return;
+ if(!n) return 0;
node_ptr first = node_traits::get_next(p);
//count() == 1 or 2, nothing to do
- if(node_traits::get_next(first) == p) return;
+ if(node_traits::get_next(first) == p) return 0;
//Iterate until p is found to know where the current last node is.
//If the shift count is less than the size of the list, we can also obtain
@@ -400,7 +380,7 @@
//Shortcut the shift with the modulo of the size of the list
std::size_t new_before_last_pos = (distance - (n % distance))% distance;
//If the shift is a multiple of the size there is nothing to do
- if(!new_before_last_pos) return;
+ if(!new_before_last_pos) return 0;
for( new_last = p
; new_before_last_pos--
@@ -410,8 +390,9 @@
}
//Now unlink p and link it after the new last node
- unlink_after(old_last);
- link_after(new_last, p);
+ base_t::unlink_after(old_last);
+ base_t::link_after(new_last, p);
+ return new_last;
}
};
Modified: branches/fix-links/boost/intrusive/hashtable.hpp
==============================================================================
--- branches/fix-links/boost/intrusive/hashtable.hpp (original)
+++ branches/fix-links/boost/intrusive/hashtable.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -747,7 +747,7 @@
}
BOOST_INTRUSIVE_CATCH(...){
this->clear_and_dispose(disposer);
- BOOST_RETHROW;
+ BOOST_INTRUSIVE_RETHROW;
}
BOOST_INTRUSIVE_CATCH_END
}
Modified: branches/fix-links/boost/intrusive/intrusive_fwd.hpp
==============================================================================
--- branches/fix-links/boost/intrusive/intrusive_fwd.hpp (original)
+++ branches/fix-links/boost/intrusive/intrusive_fwd.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -70,6 +70,7 @@
, class O2 = none
, class O3 = none
, class O4 = none
+ , class O5 = none
>
class slist;
Modified: branches/fix-links/boost/intrusive/linear_slist_algorithms.hpp
==============================================================================
--- branches/fix-links/boost/intrusive/linear_slist_algorithms.hpp (original)
+++ branches/fix-links/boost/intrusive/linear_slist_algorithms.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -16,7 +16,9 @@
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/common_slist_algorithms.hpp>
#include <cstddef>
+#include <utility>
namespace boost {
namespace intrusive {
@@ -43,76 +45,110 @@
//! <tt>static void set_next(node_ptr n, node_ptr next);</tt>
template<class NodeTraits>
class linear_slist_algorithms
+ /// @cond
+ : public detail::common_slist_algorithms<NodeTraits>
+ /// @endcond
{
+ /// @cond
+ typedef detail::common_slist_algorithms<NodeTraits> base_t;
+ /// @endcond
public:
typedef typename NodeTraits::node_ptr node_ptr;
typedef typename NodeTraits::const_node_ptr const_node_ptr;
typedef NodeTraits node_traits;
- //! <b>Requires</b>: this_node and prev_init_node must be in the same linear list.
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <b>Effects</b>: Constructs an non-used list element, putting the next
+ //! pointer to null:
+ //! <tt>NodeTraits::get_next(this_node) == 0
//!
- //! <b>Effects</b>: Returns the previous node of this_node in the linear list starting.
- //! the search from prev_init_node. The first node checked for equality
- //! is NodeTraits::get_next(prev_init_node).
+ //! <b>Complexity</b>: Constant
//!
- //! <b>Complexity</b>: Linear to the number of elements between prev_init_node and this_node.
+ //! <b>Throws</b>: Nothing.
+ static void init(node_ptr this_node);
+
+ //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Returns true is "this_node" is the only node of a circular list:
+ //! or it's a not inserted node:
+ //! <tt>return !NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</tt>
+ //!
+ //! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static node_ptr get_previous_node(node_ptr prev_init_node, node_ptr this_node)
- {
- node_ptr p = prev_init_node;
- for( node_ptr p_next
- ; this_node != (p_next = NodeTraits::get_next(p))
- ; p = p_next){
- //empty
- }
- return p;
- }
+ static bool unique(const_node_ptr this_node);
- //! <b>Effects</b>: Constructs an empty list, making this_node the only
- //! node of the linear list:
- //! <tt>NodeTraits::get_next(this_node) == 0.
+ //! <b>Effects</b>: Returns true is "this_node" has the same state as if
+ //! it was inited using "init(node_ptr)"
//!
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static void init_header(node_ptr this_node)
- { NodeTraits::set_next(this_node, 0); }
+ static bool inited(const_node_ptr this_node);
- //! <b>Effects</b>: Constructs an non-used list element, putting the next
- //! pointer to null:
- //! <tt>NodeTraits::get_next(this_node) == 0
+ //! <b>Requires</b>: prev_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Unlinks the next node of prev_node from the circular list.
//!
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static void init(node_ptr this_node)
- { NodeTraits::set_next(this_node, 0); }
+ static void unlink_after(node_ptr prev_node);
- //! <b>Requires</b>: this_node must be in a linear list or be an empty linear list.
+ //! <b>Requires</b>: prev_node and last_node must be in a circular list
+ //! or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Unlinks the range (prev_node, last_node) from the linear list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void unlink_after(node_ptr prev_node, node_ptr last_node);
+
+ //! <b>Requires</b>: prev_node must be a node of a linear list.
//!
- //! <b>Effects</b>: Returns true is "this_node" is the only node of a linear list:
- //! <tt>return NodeTraits::get_next(this_node) == this_node</tt>
+ //! <b>Effects</b>: Links this_node after prev_node in the linear list.
//!
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static bool unique(const_node_ptr this_node)
- {
- node_ptr next = NodeTraits::get_next(this_node);
- return !next || next == this_node;
- }
+ static void link_after(node_ptr prev_node, node_ptr this_node);
- //! <b>Requires</b>: this_node must be in a linear list or be an empty linear list.
+ //! <b>Requires</b>: b and e must be nodes of the same linear list or an empty range.
+ //! and p must be a node of a different linear list.
//!
- //! <b>Effects</b>: Returns true is "this_node" is the only node of a linear list:
- //! <tt>return NodeTraits::get_next(this_node) == this_node</tt>
+ //! <b>Effects</b>: Removes the nodes from (b, e] range from their linear list and inserts
+ //! them after p in p's linear list.
//!
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
- static bool inited(const_node_ptr this_node)
- { return !NodeTraits::get_next(this_node); }
+ static void transfer_after(node_ptr p, node_ptr b, node_ptr e);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <b>Effects</b>: Constructs an empty list, making this_node the only
+ //! node of the circular list:
+ //! <tt>NodeTraits::get_next(this_node) == this_node</tt>.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void init_header(node_ptr this_node)
+ { NodeTraits::set_next(this_node, 0); }
+
+ //! <b>Requires</b>: this_node and prev_init_node must be in the same linear list.
+ //!
+ //! <b>Effects</b>: Returns the previous node of this_node in the linear list starting.
+ //! the search from prev_init_node. The first node checked for equality
+ //! is NodeTraits::get_next(prev_init_node).
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements between prev_init_node and this_node.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr get_previous_node(node_ptr prev_init_node, node_ptr this_node)
+ { return base_t::get_previous_node(prev_init_node, this_node); }
//! <b>Requires</b>: this_node must be in a linear list or be an empty linear list.
//!
@@ -133,32 +169,6 @@
return result;
}
- //! <b>Requires</b>: prev_node must be in a linear list or be an empty linear list.
- //!
- //! <b>Effects</b>: Unlinks the next node of prev_node from the linear list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void unlink_after(node_ptr prev_node)
- {
- node_ptr this_node(NodeTraits::get_next(prev_node));
- NodeTraits::set_next(prev_node, NodeTraits::get_next(this_node));
- }
-
- //! <b>Requires</b>: prev_node must be a node of a linear list.
- //!
- //! <b>Effects</b>: Links this_node after prev_node in the linear list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void link_after(node_ptr prev_node, node_ptr this_node)
- {
- NodeTraits::set_next(this_node, NodeTraits::get_next(prev_node));
- NodeTraits::set_next(prev_node, this_node);
- }
-
//! <b>Requires</b>: this_node and other_node must be nodes inserted
//! in linear lists or be empty linear lists.
//!
@@ -176,27 +186,6 @@
NodeTraits::set_next(other_node, this_nxt);
}
- //! <b>Requires</b>: b and e must be nodes of the same linear list or an empty range.
- //! and p must be a node of a different linear list.
- //!
- //! <b>Effects</b>: Removes the nodes from (b, e] range from their linear list and inserts
- //! them after p in p's linear list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void transfer_after(node_ptr p, node_ptr b, node_ptr e)
- {
- if (p != b && p != e) {
- node_ptr next_b = NodeTraits::get_next(b);
- node_ptr next_e = NodeTraits::get_next(e);
- node_ptr next_p = NodeTraits::get_next(p);
- NodeTraits::set_next(b, next_e);
- NodeTraits::set_next(e, next_p);
- NodeTraits::set_next(p, next_b);
- }
- }
-
//! <b>Effects</b>: Reverses the order of elements in the list.
//!
//! <b>Returns</b>: The new first node of the list.
@@ -211,7 +200,7 @@
node_ptr first(p);
while(i){
node_ptr nxti(NodeTraits::get_next(i));
- unlink_after(p);
+ base_t::unlink_after(p);
NodeTraits::set_next(i, first);
first = i;
i = nxti;
@@ -219,16 +208,21 @@
return first;
}
- //! <b>Effects</b>: Moves the node p n positions towards the end of the list.
+ //! <b>Effects</b>: Moves the first n nodes starting at p to the end of the list.
+ //!
+ //! <b>Returns</b>: A pair containing the new first and last node of the list or
+ //! if there has been any movement, a null pair if n leads to no movement.
//!
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
- static node_ptr move_backwards(node_ptr p, std::size_t n)
+ static std::pair<node_ptr, node_ptr> move_first_n_backwards(node_ptr p, std::size_t n)
{
+ std::pair<node_ptr, node_ptr> ret(0, 0);
//Null shift, or count() == 0 or 1, nothing to do
- if(!n || !p || !NodeTraits::get_next(p))
- return p;
+ if(!n || !p || !NodeTraits::get_next(p)){
+ return ret;
+ }
node_ptr first = p;
bool end_found = false;
@@ -245,7 +239,7 @@
if(first == 0){
//Shortcut the shift with the modulo of the size of the list
n %= i;
- if(!n) return p;
+ if(!n) return ret;
old_last = new_last;
i = 0;
//Unlink p and continue the new first node search
@@ -258,25 +252,31 @@
//If the p has not been found in the previous loop, find it
//starting in the new first node and unlink it
if(!end_found){
- old_last = get_previous_node(first, 0);
+ old_last = base_t::get_previous_node(first, 0);
}
//Now link p after the new last node
NodeTraits::set_next(old_last, p);
NodeTraits::set_next(new_last, 0);
- return first;
+ ret.first = first;
+ ret.second = new_last;
+ return ret;
}
- //! <b>Effects</b>: Moves the node p n positions towards the beginning of the list.
+ //! <b>Effects</b>: Moves the first n nodes starting at p to the beginning of the list.
+ //!
+ //! <b>Returns</b>: A pair containing the new first and last node of the list or
+ //! if there has been any movement, a null pair if n leads to no movement.
//!
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
- static node_ptr move_forward(node_ptr p, std::size_t n)
+ static std::pair<node_ptr, node_ptr> move_first_n_forward(node_ptr p, std::size_t n)
{
+ std::pair<node_ptr, node_ptr> ret(0, 0);
//Null shift, or count() == 0 or 1, nothing to do
if(!n || !p || !NodeTraits::get_next(p))
- return p;
+ return ret;
node_ptr first = p;
@@ -298,7 +298,7 @@
std::size_t new_before_last_pos = (distance - (n % distance))% distance;
//If the shift is a multiple of the size there is nothing to do
if(!new_before_last_pos)
- return p;
+ return ret;
for( new_last = p
; --new_before_last_pos
@@ -308,11 +308,13 @@
}
//Get the first new node
- node_ptr new_first = node_traits::get_next(new_last);
+ node_ptr new_first(node_traits::get_next(new_last));
//Now put the old beginning after the old end
NodeTraits::set_next(old_last, p);
NodeTraits::set_next(new_last, 0);
- return new_first;
+ ret.first = new_first;
+ ret.second = new_last;
+ return ret;
}
};
Modified: branches/fix-links/boost/intrusive/list.hpp
==============================================================================
--- branches/fix-links/boost/intrusive/list.hpp (original)
+++ branches/fix-links/boost/intrusive/list.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -290,14 +290,8 @@
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Invalidates the iterators (but not the references) to the erased element.
- void pop_back()
- {
- node_ptr to_erase = node_traits::get_previous(this->get_root_node());
- node_algorithms::unlink(to_erase);
- this->priv_size_traits().decrement();
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- }
+ void pop_back()
+ { return this->pop_back_and_dispose(detail::null_disposer()); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -329,14 +323,8 @@
//! <b>Complexity</b>: Constant.
//!
//! <b>Note</b>: Invalidates the iterators (but not the references) to the erased element.
- void pop_front()
- {
- node_ptr to_erase = node_traits::get_next(this->get_root_node());
- node_algorithms::unlink(to_erase);
- this->priv_size_traits().decrement();
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- }
+ void pop_front()
+ { return this->pop_front_and_dispose(detail::null_disposer()); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -406,7 +394,7 @@
//!
//! <b>Complexity</b>: Constant.
const_iterator begin() const
- { return cbegin(); }
+ { return this->cbegin(); }
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
//!
@@ -430,7 +418,7 @@
//!
//! <b>Complexity</b>: Constant.
const_iterator end() const
- { return cend(); }
+ { return this->cend(); }
//! <b>Effects</b>: Returns a constant iterator to the end of the list.
//!
@@ -447,7 +435,7 @@
//!
//! <b>Complexity</b>: Constant.
reverse_iterator rbegin()
- { return reverse_iterator(end()); }
+ { return reverse_iterator(this->end()); }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
//! of the reversed list.
@@ -456,7 +444,7 @@
//!
//! <b>Complexity</b>: Constant.
const_reverse_iterator rbegin() const
- { return crbegin(); }
+ { return this->crbegin(); }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
//! of the reversed list.
@@ -483,7 +471,7 @@
//!
//! <b>Complexity</b>: Constant.
const_reverse_iterator rend() const
- { return crend(); }
+ { return this->crend(); }
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
//! of the reversed list.
@@ -492,7 +480,7 @@
//!
//! <b>Complexity</b>: Constant.
const_reverse_iterator crend() const
- { return const_reverse_iterator(begin()); }
+ { return const_reverse_iterator(this->begin()); }
//! <b>Precondition</b>: end_iterator must be a valid end iterator
//! of list.
@@ -503,7 +491,7 @@
//!
//! <b>Complexity</b>: Constant.
static list_impl &container_from_end_iterator(iterator end_iterator)
- { return priv_container_from_end_iterator(end_iterator); }
+ { return list_impl::priv_container_from_end_iterator(end_iterator); }
//! <b>Precondition</b>: end_iterator must be a valid end const_iterator
//! of list.
@@ -514,7 +502,7 @@
//!
//! <b>Complexity</b>: Constant.
static const list_impl &container_from_end_iterator(const_iterator end_iterator)
- { return priv_container_from_end_iterator(end_iterator); }
+ { return list_impl::priv_container_from_end_iterator(end_iterator); }
//! <b>Effects</b>: Returns the number of the elements contained in the list.
//!
@@ -540,7 +528,7 @@
//!
//! <b>Note</b>: Does not affect the validity of iterators and references.
bool empty() const
- { return node_algorithms::unique(this->get_root_node()); }
+ { return node_algorithms::unique(this->get_root_node()); }
//! <b>Effects</b>: Swaps the elements of x and *this.
//!
@@ -596,16 +584,7 @@
//! <b>Note</b>: Invalidates the iterators (but not the references) to the
//! erased element.
iterator erase(iterator i)
- {
- iterator erase = i;
- ++i;
- node_ptr to_erase = erase.pointed_node();
- node_algorithms::unlink(to_erase);
- this->priv_size_traits().decrement();
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- return i;
- }
+ { return this->erase_and_dispose(i, detail::null_disposer()); }
//! <b>Requires</b>: first and last must be valid iterator to elements in *this.
//!
@@ -625,10 +604,7 @@
iterator erase(iterator b, iterator e)
{
if(safemode_or_autounlink || constant_time_size){
- while(b != e){
- b = this->erase(b);
- }
- return b;
+ return this->erase_and_dispose(b, e, detail::null_disposer());
}
else{
node_algorithms::unlink(b.pointed_node(), e.pointed_node());
@@ -653,14 +629,13 @@
template <class Disposer>
iterator erase_and_dispose(iterator i, Disposer disposer)
{
- iterator erase = i;
+ node_ptr to_erase(i.pointed_node());
++i;
- node_ptr to_erase = erase.pointed_node();
node_algorithms::unlink(to_erase);
this->priv_size_traits().decrement();
if(safemode_or_autounlink)
node_algorithms::init(to_erase);
- disposer(get_real_value_traits().to_value_ptr(to_erase));
+ disposer(this->get_real_value_traits().to_value_ptr(to_erase));
return i;
}
@@ -681,10 +656,17 @@
template <class Disposer>
iterator erase_and_dispose(iterator b, iterator e, Disposer disposer)
{
- while(b != e){
- b = this->erase_and_dispose(b, disposer);
+ node_ptr bp(b.pointed_node()), ep(e.pointed_node());
+ node_algorithms::unlink(bp, ep);
+ while(bp != ep){
+ node_ptr to_erase(bp);
+ bp = node_traits::get_next(bp);
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(get_real_value_traits().to_value_ptr(to_erase));
+ this->priv_size_traits().decrement();
}
- return b;
+ return e;
}
//! <b>Effects</b>: Erases all the elements of the container.
@@ -699,7 +681,7 @@
void clear()
{
if(safemode_or_autounlink){
- this->erase(this->begin(), this->end());
+ this->clear_and_dispose(detail::null_disposer());
}
else{
node_algorithms::init_header(this->get_root_node());
@@ -720,7 +702,18 @@
//! <b>Note</b>: Invalidates the iterators to the erased elements.
template <class Disposer>
void clear_and_dispose(Disposer disposer)
- { this->erase_and_dispose(this->begin(), this->end(), disposer); }
+ {
+ iterator it(this->begin()), itend(this->end());
+ while(it != itend){
+ node_ptr to_erase(it.pointed_node());
+ ++it;
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(get_real_value_traits().to_value_ptr(to_erase));
+ }
+ node_algorithms::init_header(this->get_root_node());
+ this->priv_size_traits().set_size(0);
+ }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -765,7 +758,7 @@
//! <b>Note</b>: Does not affect the validity of iterators and references.
iterator insert(iterator p, reference value)
{
- node_ptr to_insert = get_real_value_traits().to_node_ptr(value);
+ node_ptr to_insert = this->get_real_value_traits().to_node_ptr(value);
if(safemode_or_autounlink)
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::inited(to_insert));
node_algorithms::link_before(p.pointed_node(), to_insert);
@@ -894,19 +887,10 @@
//! list. Iterators of this list and all the references are not invalidated.
void splice(iterator p, list_impl&x, iterator start, iterator end)
{
- if(start != end){
- if(constant_time_size){
- size_traits &thist = this->priv_size_traits();
- size_traits &xt = x.priv_size_traits();
- size_type increment = std::distance(start, end);
- node_algorithms::transfer(p.pointed_node(), start.pointed_node(), end.pointed_node());
- thist.set_size(thist.get_size() + increment);
- xt.set_size(xt.get_size() - increment);
- }
- else{
- node_algorithms::transfer(p.pointed_node(), start.pointed_node(), end.pointed_node());
- }
- }
+ if(constant_time_size)
+ this->splice(p, x, start, end, std::distance(start, end));
+ else
+ this->splice(p, x, start, end, 1);//distance is a dummy value
}
//! <b>Requires</b>: p must be a valid iterator of *this.
@@ -951,7 +935,7 @@
//! <b>Complexity</b>: The number of comparisons is approximately N log N, where N
//! is the list's size.
void sort()
- { sort(std::less<value_type>()); }
+ { this->sort(std::less<value_type>()); }
//! <b>Requires</b>: p must be a comparison function that induces a strict weak ordering
//!
@@ -1004,7 +988,7 @@
//!
//! <b>Note</b>: Iterators and references are not invalidated
void merge(list_impl& x)
- { merge(x, std::less<value_type>()); }
+ { this->merge(x, std::less<value_type>()); }
//! <b>Requires</b>: p must be a comparison function that induces a strict weak
//! ordering and both *this and x must be sorted according to that ordering
@@ -1023,9 +1007,9 @@
template<class Predicate>
void merge(list_impl& x, Predicate p)
{
- iterator e = this->end();
- iterator bx = x.begin();
- iterator ex = x.end();
+ iterator e(this->end());
+ iterator bx(x.begin());
+ iterator ex(x.end());
for (iterator b = this->begin(); b != e; ++b) {
size_type n(0);
@@ -1060,7 +1044,7 @@
//! <b>Note</b>: The relative order of elements that are not removed is unchanged,
//! and iterators to elements that are not removed remain valid.
void remove(const_reference value)
- { remove_if(detail::equal_to_value<const_reference>(value)); }
+ { this->remove_if(detail::equal_to_value<const_reference>(value)); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -1075,7 +1059,7 @@
//! and iterators to elements that are not removed remain valid.
template<class Disposer>
void remove_and_dispose(const_reference value, Disposer disposer)
- { remove_and_dispose_if(detail::equal_to_value<const_reference>(value), disposer); }
+ { this->remove_and_dispose_if(detail::equal_to_value<const_reference>(value), disposer); }
//! <b>Effects</b>: Removes all the elements for which a specified
//! predicate is satisfied. No destructors are called.
@@ -1088,7 +1072,7 @@
//! and iterators to elements that are not removed remain valid.
template<class Pred>
void remove_if(Pred pred)
- { remove_and_dispose_if(pred, detail::null_disposer()); }
+ { this->remove_and_dispose_if(pred, detail::null_disposer()); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -1105,17 +1089,15 @@
template<class Pred, class Disposer>
void remove_and_dispose_if(Pred pred, Disposer disposer)
{
- iterator first = begin();
- iterator last = end();
- while(first != last) {
- iterator next = first;
- ++next;
- if(pred(*first)){
- pointer p = first.operator->();
- this->erase(first);
- disposer(p);
+ iterator cur(this->begin());
+ iterator last(this->end());
+ while(cur != last) {
+ if(pred(*cur)){
+ cur = this->erase_and_dispose(cur, disposer);
+ }
+ else{
+ ++cur;
}
- first = next;
}
}
@@ -1129,7 +1111,7 @@
//! <b>Note</b>: The relative order of elements that are not removed is unchanged,
//! and iterators to elements that are not removed remain valid.
void unique()
- { unique_and_dispose(std::equal_to<value_type>(), detail::null_disposer()); }
+ { this->unique_and_dispose(std::equal_to<value_type>(), detail::null_disposer()); }
//! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
//! elements that satisfy some binary predicate from the list.
@@ -1143,7 +1125,7 @@
//! and iterators to elements that are not removed remain valid.
template<class BinaryPredicate>
void unique(BinaryPredicate pred)
- { unique_and_dispose(pred, detail::null_disposer()); }
+ { this->unique_and_dispose(pred, detail::null_disposer()); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -1159,7 +1141,7 @@
//! and iterators to elements that are not removed remain valid.
template<class Disposer>
void unique_and_dispose(Disposer disposer)
- { unique_and_dispose(std::equal_to<value_type>(), disposer); }
+ { this->unique_and_dispose(std::equal_to<value_type>(), disposer); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -1176,18 +1158,19 @@
template<class BinaryPredicate, class Disposer>
void unique_and_dispose(BinaryPredicate pred, Disposer disposer)
{
- if(!this->empty()){
- iterator first = begin();
- iterator after = first;
+ iterator itend(this->end());
+ iterator cur(this->begin());
+
+ if(cur != itend){
+ iterator after(cur);
++after;
- while(after != this->end()){
- if(pred(*first, *after)){
- pointer p = after.operator->();
- after = erase(after);
- disposer(p);
+ while(after != itend){
+ if(pred(*cur, *after)){
+ after = this->erase_and_dispose(after, disposer);
}
else{
- first = after++;
+ cur = after;
+ ++after;
}
}
}
@@ -1239,7 +1222,7 @@
//!
//! <b>Note</b>: Iterators and references are not invalidated.
iterator iterator_to(reference value)
- {
+ {
BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(real_value_traits::to_node_ptr(value)));
return iterator(real_value_traits::to_node_ptr(value), this);
}
@@ -1254,7 +1237,7 @@
//!
//! <b>Note</b>: Iterators and references are not invalidated.
const_iterator iterator_to(const_reference value) const
- {
+ {
BOOST_INTRUSIVE_INVARIANT_ASSERT(!node_algorithms::inited(real_value_traits::to_node_ptr(const_cast<reference> (value))));
return const_iterator(real_value_traits::to_node_ptr(const_cast<reference> (value)), this);
}
Modified: branches/fix-links/boost/intrusive/options.hpp
==============================================================================
--- branches/fix-links/boost/intrusive/options.hpp (original)
+++ branches/fix-links/boost/intrusive/options.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -360,6 +360,20 @@
/// @endcond
};
+//!This option setter specifies if the list container should
+//!use a linear implementation instead of a circular one.
+template<bool Enabled>
+struct cache_last
+{
+/// @cond
+ template<class Base>
+ struct pack : Base
+ {
+ static const bool cache_last = Enabled;
+ };
+/// @endcond
+};
+
//!This option setter specifies the bucket traits
//!class for unordered associative containers. When this option is specified,
//!instead of using the default bucket traits, a user defined holder will be defined
Modified: branches/fix-links/boost/intrusive/slist.hpp
==============================================================================
--- branches/fix-links/boost/intrusive/slist.hpp (original)
+++ branches/fix-links/boost/intrusive/slist.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -28,7 +28,8 @@
#include <iterator>
#include <functional>
#include <algorithm>
-#include <cstddef>
+#include <cstddef> //std::size_t
+#include <utility> //std::pair
namespace boost {
namespace intrusive {
@@ -47,13 +48,27 @@
struct get_default_slist_hook
{ typedef typename T::default_slist_hook type; };
-template <class ValueTraits, class SizeType, bool ConstantTimeSize, bool Linear>
+template <class ValueTraits, class SizeType, bool ConstantTimeSize, bool Linear, bool CacheLast>
struct slistopt
{
typedef ValueTraits value_traits;
typedef SizeType size_type;
- static const bool constant_time_size = ConstantTimeSize;
- static const bool linear = Linear;
+ static const bool constant_time_size = ConstantTimeSize;
+ static const bool linear = Linear;
+ static const bool cache_last = CacheLast;
+};
+
+template<class Node, class NodePtr, bool>
+struct root_plus_last
+{
+ Node root_;
+ NodePtr last_;
+};
+
+template<class Node, class NodePtr>
+struct root_plus_last<Node, NodePtr, false>
+{
+ Node root_;
};
template <class T>
@@ -70,6 +85,7 @@
, constant_time_size<true>
, linear<false>
, size_type<std::size_t>
+ , cache_last<false>
>::type
{};
@@ -89,15 +105,15 @@
//!
//! The container supports the following options:
//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<> and \c size_type<>.
+//! \c constant_time_size<>, \c size_type<>,
+//! \c linear<> and \c cache_last<>.
//!
//! The iterators of slist are forward iterators. slist provides a static
//! function called "previous" to compute the previous iterator of a given iterator.
//! This function has linear complexity. To improve the usability esp. with
//! the '*_after' functions, ++end() == begin() and previous(begin()) == end()
-//! are defined. In addition, whenever you have an end iterator, 'after this
-//! iterator' means 'at the beginning of the list'. To improve the self-documentation
-//! a "before_begin()" function is defined, returning the end() iterator.
+//! are defined. An new special function "before_begin()" is defined, which returns
+//! an iterator that points one less the beginning of the list: ++before_begin() == begin()
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
template<class T, class ...Options>
#else
@@ -141,6 +157,7 @@
static const bool constant_time_size = Config::constant_time_size;
static const bool stateful_value_traits = detail::store_cont_ptr_on_it<slist_impl>::value;
static const bool linear = Config::linear;
+ static const bool cache_last = Config::cache_last;
/// @cond
private:
@@ -162,6 +179,14 @@
BOOST_STATIC_ASSERT(!(constant_time_size && ((int)real_value_traits::link_mode == (int)auto_unlink)));
//Linear singly linked lists are incompatible with auto-unlink hooks!
BOOST_STATIC_ASSERT(!(linear && ((int)real_value_traits::link_mode == (int)auto_unlink)));
+ //A list with cached last node is incompatible with auto-unlink hooks!
+ BOOST_STATIC_ASSERT(!(cache_last && ((int)real_value_traits::link_mode == (int)auto_unlink)));
+
+ node_ptr get_end_node()
+ { return node_ptr(linear ? 0 : this->get_root_node()); }
+
+ const_node_ptr get_end_node() const
+ { return const_node_ptr(linear ? 0 : this->get_root_node()); }
node_ptr get_root_node()
{ return node_ptr(&data_.root_plus_size_.root_); }
@@ -169,16 +194,49 @@
const_node_ptr get_root_node() const
{ return const_node_ptr(&data_.root_plus_size_.root_); }
+ node_ptr get_last_node()
+ { return this->get_last_node(detail::bool_<cache_last>()); }
+
+ const_node_ptr get_last_node() const
+ { return this->get_last_node(detail::bool_<cache_last>()); }
+
+ void set_last_node(node_ptr n)
+ { return this->set_last_node(n, detail::bool_<cache_last>()); }
+
+ node_ptr get_last_node(detail::bool_<false>)
+ { return node_ptr(0); }
+
+ const_node_ptr get_last_node(detail::bool_<false>) const
+ { return const_node_ptr(0); }
+
+ void set_last_node(node_ptr, detail::bool_<false>)
+ {}
+
+ node_ptr get_last_node(detail::bool_<true>)
+ { return node_ptr(data_.root_plus_size_.last_); }
+
+ const_node_ptr get_last_node(detail::bool_<true>) const
+ { return const_node_ptr(data_.root_plus_size_.last_); }
+
+ void set_last_node(node_ptr n, detail::bool_<true>)
+ { data_.root_plus_size_.last_ = n; }
+
static node_ptr uncast(const_node_ptr ptr)
+ { return node_ptr(const_cast<node*>(detail::get_pointer(ptr))); }
+
+ void set_default_constructed_state()
{
- return node_ptr(const_cast<node*>(detail::get_pointer(ptr)));
+ node_algorithms::init_header(this->get_root_node());
+ this->priv_size_traits().set_size(size_type(0));
+ if(cache_last){
+ this->set_last_node(this->get_root_node());
+ }
}
struct root_plus_size
: public size_traits
- {
- node root_;
- };
+ , public root_plus_last<node, node_ptr, cache_last>
+ {};
struct data_t
: public slist_impl::value_traits
@@ -228,10 +286,7 @@
//! constructor throws (this does not happen with predefined Boost.Intrusive hooks).
slist_impl(const value_traits &v_traits = value_traits())
: data_(v_traits)
- {
- this->priv_size_traits().set_size(size_type(0));
- node_algorithms::init_header(this->get_root_node());
- }
+ { this->set_default_constructed_state(); }
//! <b>Requires</b>: Dereferencing iterator must yield an lvalue of type value_type.
//!
@@ -245,9 +300,8 @@
slist_impl(Iterator b, Iterator e, const value_traits &v_traits = value_traits())
: data_(v_traits)
{
- this->priv_size_traits().set_size(size_type(0));
- node_algorithms::init_header(this->get_root_node());
- insert_after(before_begin(), b, e);
+ this->set_default_constructed_state();
+ this->insert_after(this->before_begin(), b, e);
}
//! <b>Effects</b>: If it's a safe-mode
@@ -273,11 +327,10 @@
void clear()
{
if(safemode_or_autounlink){
- this->erase_after(this->before_begin(), this->end());
+ this->clear_and_dispose(detail::null_disposer());
}
else{
- node_algorithms::init_header(this->get_root_node());
- this->priv_size_traits().set_size(size_type(0));
+ this->set_default_constructed_state();
}
}
@@ -293,7 +346,17 @@
//! <b>Note</b>: Invalidates the iterators to the erased elements.
template <class Disposer>
void clear_and_dispose(Disposer disposer)
- { this->erase_after_and_dispose(this->before_begin(), this->end(), disposer); }
+ {
+ iterator it(this->begin()), itend(this->end());
+ while(it != itend){
+ node_ptr to_erase(it.pointed_node());
+ ++it;
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(get_real_value_traits().to_value_ptr(to_erase));
+ }
+ this->set_default_constructed_state();
+ }
//! <b>Requires</b>: value must be an lvalue.
//!
@@ -310,10 +373,32 @@
node_ptr to_insert = get_real_value_traits().to_node_ptr(value);
if(safemode_or_autounlink)
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::inited(to_insert));
+ if(cache_last){
+ if(this->empty()){
+ this->set_last_node(to_insert);
+ }
+ }
node_algorithms::link_after(this->get_root_node(), to_insert);
this->priv_size_traits().increment();
}
+ //! <b>Requires</b>: value must be an lvalue.
+ //!
+ //! <b>Effects</b>: Inserts the value in the back of the list.
+ //! No copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! This function is only available is cache_last<> is true.
+ void push_back(reference value)
+ {
+ BOOST_STATIC_ASSERT((cache_last != 0));
+ this->insert_after(iterator(this->get_last_node(), this), value);
+ }
+
//! <b>Effects</b>: Erases the first element of the list.
//! No destructors are called.
//!
@@ -323,13 +408,7 @@
//!
//! <b>Note</b>: Invalidates the iterators (but not the references) to the erased element.
void pop_front()
- {
- node_ptr to_erase = node_traits::get_next(this->get_root_node());
- node_algorithms::unlink_after(this->get_root_node());
- this->priv_size_traits().decrement();
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- }
+ { return this->pop_front_and_dispose(detail::null_disposer()); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -345,8 +424,16 @@
void pop_front_and_dispose(Disposer disposer)
{
node_ptr to_erase = node_traits::get_next(this->get_root_node());
- this->pop_front();
+ node_algorithms::unlink_after(this->get_root_node());
+ this->priv_size_traits().decrement();
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
disposer(get_real_value_traits().to_value_ptr(to_erase));
+ if(cache_last){
+ if(this->empty()){
+ this->set_last_node(this->get_root_node());
+ }
+ }
}
//! <b>Effects</b>: Returns a reference to the first element of the list.
@@ -355,7 +442,7 @@
//!
//! <b>Complexity</b>: Constant.
reference front()
- { return *get_real_value_traits().to_value_ptr(node_traits::get_next(this->get_root_node())); }
+ { return *this->get_real_value_traits().to_value_ptr(node_traits::get_next(this->get_root_node())); }
//! <b>Effects</b>: Returns a const_reference to the first element of the list.
//!
@@ -363,7 +450,35 @@
//!
//! <b>Complexity</b>: Constant.
const_reference front() const
- { return *get_real_value_traits().to_value_ptr(uncast(node_traits::get_next(this->get_root_node()))); }
+ { return *this->get_real_value_traits().to_value_ptr(uncast(node_traits::get_next(this->get_root_node()))); }
+
+ //! <b>Effects</b>: Returns a reference to the last element of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! This function is only available is cache_last<> is true.
+ reference back()
+ {
+ BOOST_STATIC_ASSERT((cache_last != 0));
+ return *this->get_real_value_traits().to_value_ptr(this->get_last_node());
+ }
+
+ //! <b>Effects</b>: Returns a const_reference to the last element of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! This function is only available is cache_last<> is true.
+ const_reference back() const
+ {
+ BOOST_STATIC_ASSERT((cache_last != 0));
+ return *this->get_real_value_traits().to_value_ptr(this->get_last_node());
+ }
//! <b>Effects</b>: Returns an iterator to the first element contained in the list.
//!
@@ -387,7 +502,7 @@
//!
//! <b>Complexity</b>: Constant.
const_iterator cbegin() const
- { return const_iterator (node_traits::get_next(this->get_root_node()), this); }
+ { return const_iterator(node_traits::get_next(this->get_root_node()), this); }
//! <b>Effects</b>: Returns an iterator to the end of the list.
//!
@@ -395,7 +510,7 @@
//!
//! <b>Complexity</b>: Constant.
iterator end()
- { return iterator (linear ? 0 : this->get_root_node(), this); }
+ { return iterator(this->get_end_node(), this); }
//! <b>Effects</b>: Returns a const_iterator to the end of the list.
//!
@@ -403,7 +518,7 @@
//!
//! <b>Complexity</b>: Constant.
const_iterator end() const
- { return const_iterator (linear ? 0 : uncast(this->get_root_node()), this); }
+ { return const_iterator(uncast(this->get_end_node()), this); }
//! <b>Effects</b>: Returns a const_iterator to the end of the list.
//!
@@ -449,7 +564,7 @@
//!
//! <b>Complexity</b>: Constant.
static slist_impl &container_from_end_iterator(iterator end_iterator)
- { return priv_container_from_end_iterator(end_iterator); }
+ { return slist_impl::priv_container_from_end_iterator(end_iterator); }
//! <b>Precondition</b>: end_iterator must be a valid end const_iterator
//! of slist.
@@ -460,7 +575,7 @@
//!
//! <b>Complexity</b>: Constant.
static const slist_impl &container_from_end_iterator(const_iterator end_iterator)
- { return priv_container_from_end_iterator(end_iterator); }
+ { return slist_impl::priv_container_from_end_iterator(end_iterator); }
//! <b>Effects</b>: Returns the number of the elements contained in the list.
//!
@@ -492,12 +607,18 @@
//!
//! <b>Throws</b>: Nothing.
//!
- //! <b>Complexity</b>: Linear to the number of elements of both lists.
+ //! <b>Complexity</b>: Linear to the number of elements of both lists.
+ //! Constant-time if linear<> and/or cache_last<> options are used.
//!
//! <b>Note</b>: Does not affect the validity of iterators and references.
void swap(slist_impl& other)
{
- priv_swap_lists(this->get_root_node(), other.get_root_node(), detail::bool_<linear>());
+ if(cache_last){
+ this->priv_swap_cache_last(other);
+ }
+ else{
+ this->priv_swap_lists(this->get_root_node(), other.get_root_node(), detail::bool_<linear>());
+ }
if(constant_time_size){
size_type backup = this->priv_size_traits().get_size();
this->priv_size_traits().set_size(other.priv_size_traits().get_size());
@@ -515,9 +636,7 @@
//!
//! <b>Note</b>: Iterators Does not affect the validity of iterators and references.
void shift_backwards(size_type n = 1)
- {
- priv_shift_backwards(n, detail::bool_<linear>());
- }
+ { this->priv_shift_backwards(n, detail::bool_<linear>()); }
//! <b>Effects</b>: Moves forward all the elements, so that the second
//! element becomes the first, the third becomes the second...
@@ -529,9 +648,7 @@
//!
//! <b>Note</b>: Does not affect the validity of iterators and references.
void shift_forward(size_type n = 1)
- {
- priv_shift_forward(n, detail::bool_<linear>());
- }
+ { this->priv_shift_forward(n, detail::bool_<linear>()); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -548,18 +665,18 @@
//! <b>Throws</b>: If cloner throws.
template <class Cloner, class Disposer>
void clone_from(const slist_impl &src, Cloner cloner, Disposer disposer)
- {
+ {
this->clear_and_dispose(disposer);
BOOST_INTRUSIVE_TRY{
- iterator prev = this->before_begin();
+ iterator prev(this->before_begin());
const_iterator b(src.begin()), e(src.end());
- for(; b != e; ++b, ++prev){
- this->insert_after(prev, *cloner(*b));
+ for(; b != e; ++b){
+ prev = this->insert_after(prev, *cloner(*b));
}
}
BOOST_INTRUSIVE_CATCH(...){
this->clear_and_dispose(disposer);
- BOOST_RETHROW;
+ BOOST_INTRUSIVE_RETHROW;
}
BOOST_INTRUSIVE_CATCH_END
}
@@ -582,7 +699,11 @@
node_ptr n = get_real_value_traits().to_node_ptr(value);
if(safemode_or_autounlink)
BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::inited(n));
- node_algorithms::link_after(prev_p.pointed_node(), n);
+ node_ptr prev_n(prev_p.pointed_node());
+ node_algorithms::link_after(prev_n, n);
+ if(cache_last && (this->get_last_node() == prev_n)){
+ this->set_last_node(n);
+ }
this->priv_size_traits().increment();
return iterator (n, this);
}
@@ -603,7 +724,7 @@
void insert_after(iterator prev_p, Iterator first, Iterator last)
{
for (; first != last; ++first)
- prev_p = insert_after(prev_p, *first);
+ prev_p = this->insert_after(prev_p, *first);
}
//! <b>Requires</b>: value must be an lvalue and p must point to an element
@@ -614,11 +735,12 @@
//!
//! <b>Throws</b>: Nothing.
//!
- //! <b>Complexity</b>: Linear to the number of elements before p.
+ //! <b>Complexity</b>: Linear to the number of elements before p.
+ //! Constant-time if cache_last<> is true and p == end().
//!
//! <b>Note</b>: Does not affect the validity of iterators and references.
iterator insert(iterator p, reference value)
- { return insert_after(this->previous(p), value); }
+ { return this->insert_after(this->previous(p), value); }
//! <b>Requires</b>: Dereferencing iterator must yield
//! an lvalue of type value_type and p must point to an element
@@ -631,11 +753,12 @@
//!
//! <b>Complexity</b>: Linear to the number of elements inserted plus linear
//! to the elements before b.
+ //! Linear to the number of elements to insert if cache_last<> option is true and p == end().
//!
//! <b>Note</b>: Does not affect the validity of iterators and references.
template<class Iterator>
void insert(iterator p, Iterator b, Iterator e)
- { return insert_after(this->previous(p), b, e); }
+ { return this->insert_after(this->previous(p), b, e); }
//! <b>Effects</b>: Erases the element after the element pointed by prev of
//! the list. No destructors are called.
@@ -698,7 +821,7 @@
//! <b>Note</b>: Invalidates the iterators (but not the references) to the
//! erased elements.
iterator erase(iterator first, iterator last)
- { return erase_after(this->previous(first), last); }
+ { return this->erase_after(this->previous(first), last); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -721,7 +844,11 @@
++it;
node_ptr to_erase(it.pointed_node());
++it;
- node_algorithms::unlink_after(prev.pointed_node());
+ node_ptr prev_n(prev.pointed_node());
+ node_algorithms::unlink_after(prev_n);
+ if(cache_last && (to_erase == this->get_last_node())){
+ this->set_last_node(prev_n);
+ }
this->priv_size_traits().decrement();
if(safemode_or_autounlink)
node_algorithms::init(to_erase);
@@ -746,10 +873,19 @@
template<class Disposer>
iterator erase_after_and_dispose(iterator before_first, iterator last, Disposer disposer)
{
- iterator next(before_first);
- ++next;
- while(next != last){
- next = this->erase_after_and_dispose(before_first, disposer);
+ node_ptr bfp(before_first.pointed_node()), lp(last.pointed_node());
+ node_ptr fp(node_traits::get_next(bfp));
+ node_algorithms::unlink_after(bfp, lp);
+ while(fp != lp){
+ node_ptr to_erase(fp);
+ fp = node_traits::get_next(fp);
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(get_real_value_traits().to_value_ptr(to_erase));
+ this->priv_size_traits().decrement();
+ }
+ if(cache_last && (node_traits::get_next(bfp) == this->get_end_node())){
+ this->set_last_node(bfp);
}
return last;
}
@@ -792,7 +928,7 @@
//! erased elements.
template<class Disposer>
iterator erase_and_dispose(iterator first, iterator last, Disposer disposer)
- { return erase_after_and_dispose(this->previous(first), last, disposer); }
+ { return this->erase_after_and_dispose(this->previous(first), last, disposer); }
//! <b>Requires</b>: Dereferencing iterator must yield
//! an lvalue of type value_type.
@@ -813,7 +949,7 @@
void assign(Iterator b, Iterator e)
{
this->clear();
- this->insert_after(before_begin(), b, e);
+ this->insert_after(this->before_begin(), b, e);
}
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
@@ -850,18 +986,21 @@
//!
//! <b>Throws</b>: Nothing.
//!
- //! <b>Complexity</b>: Linear to the elements contained in x
+ //! <b>Complexity</b>: Linear to the elements contained in x.
+ //! Constant-time if cache_last<> option is true.
//!
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
//! list. Iterators of this list and all the references are not invalidated.
iterator splice_after(iterator prev, slist_impl &x)
{
if (!x.empty()){
- iterator last_x(x.previous(x.end()));
- node_algorithms::transfer_after
- ( prev.pointed_node()
- , x.before_begin().pointed_node()
- , last_x.pointed_node());
+ iterator last_x(x.previous(x.end())); //<- constant time if cache_last is active
+ node_ptr prev_n(prev.pointed_node());
+ node_ptr last_x_n(last_x.pointed_node());
+ if(cache_last && node_traits::get_next(prev_n) == this->get_end_node()){
+ this->set_last_node(last_x_n);
+ }
+ node_algorithms::transfer_after( prev_n, x.before_begin().pointed_node(), last_x_n);
this->priv_size_traits().set_size(this->priv_size_traits().get_size() + x.priv_size_traits().get_size());
x.priv_size_traits().set_size(size_type(0));
return last_x;
@@ -884,15 +1023,12 @@
//!
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
//! list. Iterators of this list and all the references are not invalidated.
- void splice_after(iterator prev, slist_impl &x, iterator prev_ele)
+ void splice_after(iterator prev_pos, slist_impl &x, iterator prev_ele)
{
- iterator nxt = prev_ele;
- ++nxt;
- if (nxt != prev && prev_ele != prev){
- node_algorithms::transfer_after
- (prev.pointed_node(), prev_ele.pointed_node(), nxt.pointed_node());
- this->priv_size_traits().increment();
- x.priv_size_traits().decrement();
+ iterator elem = prev_ele;
+ ++elem;
+ if (elem != prev_pos && prev_ele != prev_pos){
+ this->splice_after(prev_pos, x, prev_ele, elem, 1);
}
}
@@ -913,19 +1049,11 @@
//! list. Iterators of this list and all the references are not invalidated.
void splice_after(iterator prev_pos, slist_impl &x, iterator before_first, iterator before_last)
{
- if (before_first != before_last){
- if(constant_time_size){
- size_type increment = std::distance(before_first, before_last);
- node_algorithms::transfer_after
- (prev_pos.pointed_node(), before_first.pointed_node(), before_last.pointed_node());
- this->priv_size_traits().set_size(this->priv_size_traits().get_size() + increment);
- x.priv_size_traits().set_size(x.priv_size_traits().get_size() - increment);
- }
- else{
- node_algorithms::transfer_after
- (prev_pos.pointed_node(), before_first.pointed_node(), before_last.pointed_node());
- }
- }
+ if(constant_time_size)
+ this->splice_after(prev_pos, x, before_first, before_last, std::distance(before_first, before_last));
+ else
+ this->priv_splice_after
+ (prev_pos.pointed_node(), x, before_first.pointed_node(), before_last.pointed_node());
}
//! <b>Requires</b>: prev_pos must be a dereferenceable iterator in *this or be
@@ -945,17 +1073,13 @@
void splice_after(iterator prev_pos, slist_impl &x, iterator before_first, iterator before_last, difference_type n)
{
if(n){
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(std::distance(before_first, before_last) == n);
+ this->priv_splice_after
+ (prev_pos.pointed_node(), x, before_first.pointed_node(), before_last.pointed_node());
if(constant_time_size){
- BOOST_INTRUSIVE_INVARIANT_ASSERT(std::distance(before_first, before_last) == n);
- node_algorithms::transfer_after
- (prev_pos.pointed_node(), before_first.pointed_node(), before_last.pointed_node());
this->priv_size_traits().set_size(this->priv_size_traits().get_size() + n);
x.priv_size_traits().set_size(x.priv_size_traits().get_size() - n);
}
- else{
- node_algorithms::transfer_after
- (prev_pos.pointed_node(), before_first.pointed_node(), before_last.pointed_node());
- }
}
}
@@ -973,11 +1097,13 @@
//!
//! <b>Complexity</b>: Linear to the elements contained in x plus linear to
//! the elements before it.
+ //! Linear to the elements before it if cache_last<> option is true.
+ //! Constant-time if cache_last<> option is true and it == end().
//!
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
//! list. Iterators of this list and all the references are not invalidated.
iterator splice(iterator it, slist_impl &x)
- { return splice_after(this->previous(it), x); }
+ { return this->splice_after(this->previous(it), x); }
//! <b>Requires</b>: it p must be a valid iterator of *this.
//! elem must point to an element contained in list
@@ -989,11 +1115,12 @@
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Linear to the elements before pos and before elem.
+ //! Linear to the elements before elem if cache_last<> option is true and pos == end().
//!
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
//! list. Iterators of this list and all the references are not invalidated.
void splice(iterator pos, slist_impl &x, iterator elem)
- { return splice_after(this->previous(pos), x, this->previous(elem)); }
+ { return this->splice_after(this->previous(pos), x, x.previous(elem)); }
//! <b>Requires</b>: pos must be a dereferenceable iterator in *this
//! and first and last belong to x and first and last a valid range on x.
@@ -1004,13 +1131,16 @@
//!
//! <b>Throws</b>: Nothing.
//!
- //! <b>Complexity</b>: Linear to the sum of elements before pos, first, and last.
- //! Plus linear to the number of elements transferred if constant_time_size is true.
+ //! <b>Complexity</b>: Linear to the sum of elements before pos, first, and last
+ //! plus linear to the number of elements transferred if constant_time_size is true.
+ //! Linear to the sum of elements before first, and last
+ //! plus linear to the number of elements transferred if constant_time_size is true
+ //! if cache_last<> is true and pos == end()
//!
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
//! list. Iterators of this list and all the references are not invalidated.
void splice(iterator pos, slist_impl &x, iterator first, iterator last)
- { return splice_after(this->previous(pos), x, this->previous(first), this->previous(last)); }
+ { return this->splice_after(this->previous(pos), x, x.previous(first), x.previous(last)); }
//! <b>Requires</b>: pos must be a dereferenceable iterator in *this
//! and first and last belong to x and first and last a valid range on x.
@@ -1023,11 +1153,13 @@
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Linear to the sum of elements before pos, first, and last.
+ //! Linear to the sum of elements before first and last
+ //! if cache_last<> is true and pos == end().
//!
//! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
//! list. Iterators of this list and all the references are not invalidated.
void splice(iterator pos, slist_impl &x, iterator first, iterator last, difference_type n)
- { return splice_after(this->previous(pos), x, this->previous(first), this->previous(last), n); }
+ { return this->splice_after(this->previous(pos), x, x.previous(first), x.previous(last), n); }
//! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
//! The sort is stable, that is, the relative order of equivalent elements is preserved.
@@ -1173,8 +1305,13 @@
//! <b>Complexity</b>: This function is linear to the contained elements.
//!
//! <b>Note</b>: Iterators and references are not invalidated
- void reverse()
- { priv_reverse(detail::bool_<linear>()); }
+ void reverse()
+ {
+ if(cache_last && !this->empty()){
+ this->set_last_node(node_traits::get_next(this->get_root_node()));
+ }
+ this->priv_reverse(detail::bool_<linear>());
+ }
//! <b>Effects</b>: Removes all the elements that compare equal to value.
//! No destructors are called.
@@ -1187,7 +1324,7 @@
//! and iterators to elements that are not removed remain valid. This function is
//! linear time: it performs exactly size() comparisons for equality.
void remove(const_reference value)
- { remove_if(detail::equal_to_value<const_reference>(value)); }
+ { this->remove_if(detail::equal_to_value<const_reference>(value)); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -1202,7 +1339,7 @@
//! and iterators to elements that are not removed remain valid.
template<class Disposer>
void remove_and_dispose(const_reference value, Disposer disposer)
- { remove_and_dispose_if(detail::equal_to_value<const_reference>(value), disposer); }
+ { this->remove_and_dispose_if(detail::equal_to_value<const_reference>(value), disposer); }
//! <b>Effects</b>: Removes all the elements for which a specified
//! predicate is satisfied. No destructors are called.
@@ -1215,7 +1352,7 @@
//! and iterators to elements that are not removed remain valid.
template<class Pred>
void remove_if(Pred pred)
- { remove_and_dispose_if(pred, detail::null_disposer()); }
+ { this->remove_and_dispose_if(pred, detail::null_disposer()); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -1232,18 +1369,20 @@
template<class Pred, class Disposer>
void remove_and_dispose_if(Pred pred, Disposer disposer)
{
- iterator bcur(this->before_begin()), cur, e(this->end());
+ iterator bcur(this->before_begin()), cur(this->begin()), e(this->end());
- while(++(cur = bcur) != e){
+ while(cur != e){
if (pred(*cur)){
- pointer p = cur.operator->();
- this->erase_after(bcur);
- disposer(p);
+ cur = this->erase_after_and_dispose(bcur, disposer);
}
else{
- ++bcur;
+ bcur = cur;
+ ++cur;
}
}
+ if(cache_last){
+ this->set_last_node(bcur.pointed_node());
+ }
}
//! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
@@ -1256,7 +1395,7 @@
//! <b>Note</b>: The relative order of elements that are not removed is unchanged,
//! and iterators to elements that are not removed remain valid.
void unique()
- { unique_and_dispose(std::equal_to<value_type>(), detail::null_disposer()); }
+ { this->unique_and_dispose(std::equal_to<value_type>(), detail::null_disposer()); }
//! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
//! elements that satisfy some binary predicate from the list.
@@ -1270,7 +1409,7 @@
//! and iterators to elements that are not removed remain valid.
template<class BinaryPredicate>
void unique(BinaryPredicate pred)
- { unique_and_dispose(pred, detail::null_disposer()); }
+ { this->unique_and_dispose(pred, detail::null_disposer()); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -1286,7 +1425,7 @@
//! and iterators to elements that are not removed remain valid.
template<class Disposer>
void unique_and_dispose(Disposer disposer)
- { unique(std::equal_to<value_type>(), disposer); }
+ { this->unique(std::equal_to<value_type>(), disposer); }
//! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
//!
@@ -1303,21 +1442,23 @@
template<class BinaryPredicate, class Disposer>
void unique_and_dispose(BinaryPredicate pred, Disposer disposer)
{
- iterator end_n(end());
- iterator cur(begin());
- iterator cur_next;
-
- if (cur != end_n) {
- while(++(cur_next = cur) != end_n) {
- if (pred(*cur, *cur_next)){
- pointer p = cur_next.operator->();
- this->erase_after(cur);
- disposer(p);
+ iterator end_n(this->end());
+ iterator bcur(this->begin());
+ if(bcur != end_n){
+ iterator cur(bcur);
+ ++cur;
+ while(cur != end_n) {
+ if (pred(*bcur, *cur)){
+ cur = this->erase_after_and_dispose(bcur, disposer);
}
else{
+ bcur = cur;
++cur;
}
}
+ if(cache_last){
+ this->set_last_node(bcur.pointed_node());
+ }
}
}
@@ -1367,7 +1508,7 @@
//!
//! <b>Note</b>: Iterators and references are not invalidated.
iterator iterator_to(reference value)
- {
+ {
//BOOST_INTRUSIVE_INVARIANT_ASSERT (!node_algorithms::inited(value_traits::to_node_ptr(value)));
return iterator (value_traits::to_node_ptr(value), this);
}
@@ -1382,7 +1523,7 @@
//!
//! <b>Note</b>: Iterators and references are not invalidated.
const_iterator iterator_to(const_reference value) const
- {
+ {
//BOOST_INTRUSIVE_INVARIANT_ASSERT (!node_algorithms::inited(value_traits::to_node_ptr(const_cast<reference> (value))));
return const_iterator (value_traits::to_node_ptr(const_cast<reference> (value)), this);
}
@@ -1393,12 +1534,16 @@
//!
//! <b>Throws</b>: Nothing.
//!
- //! <b>Complexity</b>: Linear to the number of elements before i.
+ //! <b>Complexity</b>: Linear to the number of elements before i.
+ //! Constant if cache_last<> is true and i == end().
iterator previous(iterator i)
{
+ if(cache_last && (i.pointed_node() == this->get_end_node())){
+ return iterator(this->get_last_node(), this);
+ }
return iterator
(node_algorithms::get_previous_node
- (before_begin().pointed_node(), i.pointed_node()), 0);
+ (this->before_begin().pointed_node(), i.pointed_node()), this);
}
//! <b>Returns</b>: The const_iterator to the element before i in the list.
@@ -1408,14 +1553,30 @@
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Linear to the number of elements before i.
+ //! Constant if cache_last<> is true and i == end().
const_iterator previous(const_iterator i) const
{
+ if(cache_last && (i.pointed_node() == this->get_end_node())){
+ return iterator(uncast(this->get_last_node()), this);
+ }
return const_iterator
(node_algorithms::get_previous_node
- (before_begin().pointed_node(), i.pointed_node()), 0);
+ (this->before_begin().pointed_node(), i.pointed_node()), this);
}
private:
+ void priv_splice_after(node_ptr prev_pos_n, slist_impl &x, node_ptr before_first_n, node_ptr before_last_n)
+ {
+ if(cache_last){
+ if(node_traits::get_next(prev_pos_n) == this->get_end_node()){
+ this->set_last_node(before_last_n);
+ }
+ if(node_traits::get_next(before_last_n) == x.get_end_node()){
+ x.set_last_node(before_first_n);
+ }
+ }
+ node_algorithms::transfer_after(prev_pos_n, before_first_n, before_last_n);
+ }
void priv_reverse(detail::bool_<false>)
{ node_algorithms::reverse(this->get_root_node()); }
@@ -1429,26 +1590,63 @@
void priv_shift_backwards(size_type n, detail::bool_<false>)
{
- node_algorithms::move_forward(this->get_root_node(), (std::size_t)n);
+ node_ptr last = node_algorithms::move_forward(this->get_root_node(), (std::size_t)n);
+ if(cache_last && last){
+ this->set_last_node(last);
+ }
}
void priv_shift_backwards(size_type n, detail::bool_<true>)
{
- node_ptr new_first = node_algorithms::move_forward
- (node_traits::get_next(this->get_root_node()), (std::size_t)n);
- node_traits::set_next(this->get_root_node(), new_first);
+ std::pair<node_ptr, node_ptr> ret(
+ node_algorithms::move_first_n_forward
+ (node_traits::get_next(this->get_root_node()), (std::size_t)n));
+ if(ret.first){
+ node_traits::set_next(this->get_root_node(), ret.first);
+ if(cache_last){
+ this->set_last_node(ret.second);
+ }
+ }
}
void priv_shift_forward(size_type n, detail::bool_<false>)
{
- node_algorithms::move_backwards(this->get_root_node(), (std::size_t)n);
+ node_ptr last = node_algorithms::move_backwards(this->get_root_node(), (std::size_t)n);
+ if(cache_last && last){
+ this->set_last_node(last);
+ }
}
void priv_shift_forward(size_type n, detail::bool_<true>)
{
- node_ptr new_first = node_algorithms::move_backwards
- (node_traits::get_next(this->get_root_node()), (std::size_t)n);
- node_traits::set_next(this->get_root_node(), new_first);
+ std::pair<node_ptr, node_ptr> ret(
+ node_algorithms::move_first_n_backwards
+ (node_traits::get_next(this->get_root_node()), (std::size_t)n));
+ if(ret.first){
+ node_traits::set_next(this->get_root_node(), ret.first);
+ if(cache_last){
+ this->set_last_node(ret.second);
+ }
+ }
+ }
+
+ void priv_swap_cache_last(slist_impl &other)
+ {
+ node_ptr other_last(other.get_last_node());
+ node_ptr this_last(this->get_last_node());
+ node_ptr other_bfirst(other.get_root_node());
+ node_ptr this_bfirst(this->get_root_node());
+ node_algorithms::transfer_after(this_bfirst, other_bfirst, other_last);
+ node_algorithms::transfer_after(other_bfirst, other_last != other_bfirst? other_last : this_bfirst, this_last);
+ node_ptr tmp(this->get_last_node());
+ this->set_last_node(other.get_last_node());
+ other.set_last_node(tmp);
+ if(this->get_last_node() == other_bfirst){
+ this->set_last_node(this_bfirst);
+ }
+ if(other.get_last_node() == this_bfirst){
+ other.set_last_node(other_bfirst);
+ }
}
//circular version
@@ -1465,7 +1663,7 @@
//singly linked lists (because "end" is represented by the null pointer)
BOOST_STATIC_ASSERT(!linear);
root_plus_size *r = detail::parent_from_member<root_plus_size, node>
- ( detail::get_pointer(end_iterator.pointed_node()), &root_plus_size::root_);
+ ( detail::get_pointer(end_iterator.pointed_node()), (&root_plus_size::root_));
data_t *d = detail::parent_from_member<data_t, root_plus_size>
( r, &data_t::root_plus_size_);
slist_impl *s = detail::parent_from_member<slist_impl, data_t>(d, &slist_impl::data_);
@@ -1595,13 +1793,13 @@
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
template<class T, class ...Options>
#else
-template<class T, class O1 = none, class O2 = none, class O3 = none, class O4 = none>
+template<class T, class O1 = none, class O2 = none, class O3 = none, class O4 = none, class O5 = none>
#endif
struct make_slist
{
/// @cond
typedef typename pack_options
- < slist_defaults<T>, O1, O2, O3, O4>::type packed_options;
+ < slist_defaults<T>, O1, O2, O3, O4, O5>::type packed_options;
typedef typename detail::get_value_traits
<T, typename packed_options::value_traits>::type value_traits;
typedef slist_impl
@@ -1611,6 +1809,7 @@
, typename packed_options::size_type
, packed_options::constant_time_size
, packed_options::linear
+ , packed_options::cache_last
>
> implementation_defined;
/// @endcond
@@ -1619,12 +1818,12 @@
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-template<class T, class O1, class O2, class O3, class O4>
+template<class T, class O1, class O2, class O3, class O4, class O5>
class slist
- : public make_slist<T, O1, O2, O3, O4>::type
+ : public make_slist<T, O1, O2, O3, O4, O5>::type
{
typedef typename make_slist
- <T, O1, O2, O3, O4>::type Base;
+ <T, O1, O2, O3, O4, O5>::type Base;
typedef typename Base::real_value_traits real_value_traits;
//Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename real_value_traits::value_type, T>::value));
Modified: branches/fix-links/boost/iostreams/categories.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/categories.hpp (original)
+++ branches/fix-links/boost/iostreams/categories.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/chain.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/chain.hpp (original)
+++ branches/fix-links/boost/iostreams/chain.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/char_traits.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/char_traits.hpp (original)
+++ branches/fix-links/boost/iostreams/char_traits.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/checked_operations.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/checked_operations.hpp (original)
+++ branches/fix-links/boost/iostreams/checked_operations.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/close.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/close.hpp (original)
+++ branches/fix-links/boost/iostreams/close.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/code_converter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/code_converter.hpp (original)
+++ branches/fix-links/boost/iostreams/code_converter.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/combine.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/combine.hpp (original)
+++ branches/fix-links/boost/iostreams/combine.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/compose.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/compose.hpp (original)
+++ branches/fix-links/boost/iostreams/compose.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/concepts.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/concepts.hpp (original)
+++ branches/fix-links/boost/iostreams/concepts.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
@@ -114,12 +115,12 @@
template<typename Mode, typename Ch = wchar_t>
struct multichar_wfilter : multichar_filter<Mode, Ch> { };
-typedef multichar_filter<input> multichar_input_filter;
-typedef multichar_filter<input> multichar_input_wfilter;
-typedef multichar_filter<output> multichar_output_filter;
-typedef multichar_filter<output> multichar_output_wfilter;
-typedef multichar_filter<dual_use> multichar_dual_use_filter;
-typedef multichar_filter<dual_use> multichar_dual_use_wfilter;
+typedef multichar_filter<input> multichar_input_filter;
+typedef multichar_wfilter<input> multichar_input_wfilter;
+typedef multichar_filter<output> multichar_output_filter;
+typedef multichar_wfilter<output> multichar_output_wfilter;
+typedef multichar_filter<dual_use> multichar_dual_use_filter;
+typedef multichar_wfilter<dual_use> multichar_dual_use_wfilter;
//----------------------------------------------------------------------------//
Modified: branches/fix-links/boost/iostreams/constants.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/constants.hpp (original)
+++ branches/fix-links/boost/iostreams/constants.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/copy.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/copy.hpp (original)
+++ branches/fix-links/boost/iostreams/copy.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/access_control.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/access_control.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/access_control.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/adapter/concept_adapter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/adapter/concept_adapter.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/adapter/concept_adapter.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/adapter/device_adapter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/adapter/device_adapter.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/adapter/device_adapter.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -5,8 +5,9 @@
* File: boost/iostreams/detail/adapter/filter_adapter.hpp
* Date: Mon Nov 26 14:35:48 MST 2007
*
- * Copyright: 2007 CodeRage
+ * Copyright: 2007-2008 CodeRage, LLC
* Author: Jonathan Turkanis
+ * Contact: turkanis at coderage 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.)
Modified: branches/fix-links/boost/iostreams/detail/adapter/direct_adapter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/adapter/direct_adapter.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/adapter/direct_adapter.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/adapter/filter_adapter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/adapter/filter_adapter.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/adapter/filter_adapter.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -4,8 +4,9 @@
*
* File: boost/iostreams/detail/adapter/filter_adapter.hpp
* Date: Mon Nov 26 14:35:48 MST 2007
- * Copyright: 2007 CodeRage
+ * Copyright: 2007-2008 CodeRage, LLC
* Author: Jonathan Turkanis
+ * Contact: turkanis at coderage 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.)
Modified: branches/fix-links/boost/iostreams/detail/adapter/mode_adapter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/adapter/mode_adapter.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/adapter/mode_adapter.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/adapter/non_blocking_adapter.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/adapter/non_blocking_adapter.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/adapter/output_iterator_adapter.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/adapter/output_iterator_adapter.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/adapter/range_adapter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/adapter/range_adapter.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/adapter/range_adapter.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/add_facet.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/add_facet.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/add_facet.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/bool_trait_def.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/bool_trait_def.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/bool_trait_def.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/broken_overload_resolution/forward.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/broken_overload_resolution/forward.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/broken_overload_resolution/forward.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/broken_overload_resolution/stream.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/broken_overload_resolution/stream.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/broken_overload_resolution/stream.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/buffer.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/buffer.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/buffer.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003-5.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/call_traits.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/call_traits.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/call_traits.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/char_traits.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/char_traits.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/char_traits.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/codecvt_helper.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/codecvt_helper.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/codecvt_helper.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/codecvt_holder.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/codecvt_holder.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/codecvt_holder.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/config/auto_link.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/auto_link.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/auto_link.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/config/bzip2.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/bzip2.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/bzip2.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/config/codecvt.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/codecvt.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/codecvt.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/config/disable_warnings.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/disable_warnings.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/disable_warnings.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/config/dyn_link.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/dyn_link.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/dyn_link.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/config/enable_warnings.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/enable_warnings.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/enable_warnings.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/config/fpos.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/fpos.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/fpos.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -6,8 +6,9 @@
* File: boost/iostreams/detail/execute.hpp
* Date: Thu Dec 06 13:21:54 MST 2007
- * Copyright: 2007 CodeRage
+ * Copyright: 2007-2008 CodeRage, LLC
* Author: Jonathan Turkanis
+ * Contact: turkanis at coderage dot com
*
* Defines the preprocessor symbol BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS for
* platforms that use the implementation of std::fpos from the Dinkumware
Modified: branches/fix-links/boost/iostreams/detail/config/gcc.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/gcc.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/gcc.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/config/limits.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/limits.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/limits.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/config/overload_resolution.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/overload_resolution.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/overload_resolution.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/config/rtl.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/rtl.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/rtl.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -11,8 +11,9 @@
* File: boost/iostreams/detail/config/rtl.hpp
* Date: Wed Dec 26 11:58:11 MST 2007
*
- * Copyright: 2007 CodeRage
+ * Copyright: 2007-2008 CodeRage, LLC
* Author: Jonathan Turkanis
+ * Contact: turkanis at coderage dot com
*/
#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_RTL_HPP_INCLUDED
Modified: branches/fix-links/boost/iostreams/detail/config/wide_streams.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/wide_streams.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/wide_streams.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/config/windows_posix.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/windows_posix.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/windows_posix.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,6 +1,6 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2004-2007 Jonathan Turkanis
// (C) Copyright 2002, 2003 Beman Dawes Boost.Filesystem
-// (C) Copyright Jonathan Turkanis 2004.
-
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/config/zlib.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/config/zlib.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/config/zlib.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/counted_array.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/counted_array.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/counted_array.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/default_arg.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/default_arg.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/default_arg.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/dispatch.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/dispatch.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/dispatch.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/double_object.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/double_object.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/double_object.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2004
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2004-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/enable_if_stream.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/enable_if_stream.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/enable_if_stream.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/error.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/error.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/error.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/execute.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/execute.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/execute.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -6,8 +6,9 @@
* File: boost/iostreams/detail/execute.hpp
* Date: Thu Dec 06 13:21:54 MST 2007
- * Copyright: 2007 CodeRage
+ * Copyright: 2007-2008 CodeRage, LLC
* Author: Jonathan Turkanis
+ * Contact: turkanis at coderage dot com
* Defines the overloaded function template
* boost::iostreams::detail::execute_all() and the function template
Modified: branches/fix-links/boost/iostreams/detail/forward.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/forward.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/forward.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/fstream.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/fstream.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/fstream.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/functional.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/functional.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/functional.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -6,8 +6,9 @@
* File: boost/iostreams/detail/functional.hpp
* Date: Sun Dec 09 05:38:03 MST 2007
- * Copyright: 2007 CodeRage
+ * Copyright: 2007-2008 CodeRage, LLC
* Author: Jonathan Turkanis
+ * Contact: turkanis at coderage dot com
* Defines several function objects and object generators for use with
* execute_all()
Modified: branches/fix-links/boost/iostreams/detail/ios.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/ios.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/ios.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/iostream.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/iostream.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/iostream.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/is_dereferenceable.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/is_dereferenceable.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/is_dereferenceable.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,5 +1,6 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// (C) Copyright David Abrahams 2004.
-// (C) Copyright Jonathan Turkanis 2005.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/is_iterator_range.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/is_iterator_range.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/is_iterator_range.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/newline.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/newline.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/newline.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/optional.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/optional.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/optional.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/param_type.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/param_type.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/param_type.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/push.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/push.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/push.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/push_params.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/push_params.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/push_params.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/resolve.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/resolve.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/resolve.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/restrict_impl.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/restrict_impl.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/restrict_impl.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -6,8 +6,9 @@
* File: boost/iostreams/detail/restrict_impl.hpp
* Date: Sun Jan 06 12:57:30 MST 2008
- * Copyright: 2007 CodeRage
+ * Copyright: 2007-2008 CodeRage, LLC
* Author: Jonathan Turkanis
+ * Contact: turkanis at coderage dot com
*
* If included with the macro BOOST_IOSTREAMS_RESTRICT undefined, defines the
* class template boost::iostreams::restriction. If included with the macro
Modified: branches/fix-links/boost/iostreams/detail/select.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/select.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/select.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/select_by_size.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/select_by_size.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/select_by_size.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2004.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2004-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/streambuf.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/streambuf.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/streambuf.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/streambuf/chainbuf.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/streambuf/chainbuf.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/streambuf/chainbuf.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/streambuf/direct_streambuf.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/streambuf/direct_streambuf.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/streambuf/direct_streambuf.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/streambuf/indirect_streambuf.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/streambuf/indirect_streambuf.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the 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.
Modified: branches/fix-links/boost/iostreams/detail/streambuf/linked_streambuf.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/streambuf/linked_streambuf.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/streambuf/linked_streambuf.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
@@ -32,9 +33,8 @@
using base::setg; using base::gbump; using base::pbase; \
using base::pptr; using base::epptr; using base::setp; \
using base::pbump; using base::underflow; using base::pbackfail; \
- using base::xsgetn; using base::overflow; using base::sputc; \
- using base::xsputn; using base::sync; using base::seekoff; \
- using base::seekpos; \
+ using base::xsgetn; using base::overflow; using base::xsputn; \
+ using base::sync; using base::seekoff; using base::seekpos; \
/**/
template<typename Ch, typename Tr = BOOST_IOSTREAMS_CHAR_TRAITS(Ch) >
Modified: branches/fix-links/boost/iostreams/detail/system_failure.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/system_failure.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/system_failure.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,5 +1,6 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// (C) Copyright Jonathan Graehl 2004.
-// (C) Copyright Jonathan Turkanis 2005.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/template_params.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/template_params.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/template_params.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/translate_int_type.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/translate_int_type.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/translate_int_type.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/vc6/close.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/vc6/close.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/vc6/close.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/vc6/read.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/vc6/read.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/vc6/read.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/vc6/write.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/vc6/write.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/vc6/write.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/detail/wrap_unwrap.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/detail/wrap_unwrap.hpp (original)
+++ branches/fix-links/boost/iostreams/detail/wrap_unwrap.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/device/array.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/device/array.hpp (original)
+++ branches/fix-links/boost/iostreams/device/array.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2004.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2004-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/device/back_inserter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/device/back_inserter.hpp (original)
+++ branches/fix-links/boost/iostreams/device/back_inserter.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/device/file.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/device/file.hpp (original)
+++ branches/fix-links/boost/iostreams/device/file.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/device/file_descriptor.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/device/file_descriptor.hpp (original)
+++ branches/fix-links/boost/iostreams/device/file_descriptor.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
@@ -51,11 +52,21 @@
BOOST_IOS::in | BOOST_IOS::out,
BOOST_IOS::openmode base_mode =
BOOST_IOS::in | BOOST_IOS::out );
+ explicit file_descriptor( const char* path,
+ BOOST_IOS::openmode mode =
+ BOOST_IOS::in | BOOST_IOS::out,
+ BOOST_IOS::openmode base_mode =
+ BOOST_IOS::in | BOOST_IOS::out );
void open( const std::string& path,
BOOST_IOS::openmode =
BOOST_IOS::in | BOOST_IOS::out,
BOOST_IOS::openmode base_mode =
BOOST_IOS::in | BOOST_IOS::out );
+ void open( const char* path,
+ BOOST_IOS::openmode =
+ BOOST_IOS::in | BOOST_IOS::out,
+ BOOST_IOS::openmode base_mode =
+ BOOST_IOS::in | BOOST_IOS::out );
bool is_open() const { return pimpl_->flags_ != 0; }
std::streamsize read(char_type* s, std::streamsize n);
std::streamsize write(const char_type* s, std::streamsize n);
@@ -125,6 +136,10 @@
BOOST_IOS::openmode m = BOOST_IOS::in )
: file_descriptor(path, m & ~BOOST_IOS::out, BOOST_IOS::in)
{ }
+ explicit file_descriptor_source( const char* path,
+ BOOST_IOS::openmode m = BOOST_IOS::in )
+ : file_descriptor(path, m & ~BOOST_IOS::out, BOOST_IOS::in)
+ { }
};
struct file_descriptor_sink : private file_descriptor {
@@ -158,6 +173,10 @@
BOOST_IOS::openmode m = BOOST_IOS::out )
: file_descriptor(path, m & ~BOOST_IOS::in, BOOST_IOS::out)
{ }
+ explicit file_descriptor_sink( const char* path,
+ BOOST_IOS::openmode m = BOOST_IOS::out )
+ : file_descriptor(path, m & ~BOOST_IOS::in, BOOST_IOS::out)
+ { }
};
} } // End namespaces iostreams, boost.
Modified: branches/fix-links/boost/iostreams/device/mapped_file.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/device/mapped_file.hpp (original)
+++ branches/fix-links/boost/iostreams/device/mapped_file.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// (C) Copyright Craig Henderson 2002. 'boost/memmap.hpp' from sandbox
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/device/null.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/device/null.hpp (original)
+++ branches/fix-links/boost/iostreams/device/null.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2004.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2004-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/filter/aggregate.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/aggregate.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/aggregate.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/filter/bzip2.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/bzip2.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/bzip2.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/filter/counter.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/counter.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/counter.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/filter/gzip.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/gzip.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/gzip.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/filter/line.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/line.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/line.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/filter/newline.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/newline.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/newline.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/filter/regex.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/regex.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/regex.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
@@ -57,7 +58,7 @@
return;
iterator first(&src[0], &src[0] + src.size(), re_, flags_);
iterator last;
- const Ch* suffix = 0; // Prevent GCC 2.95 warning.
+ const Ch* suffix = 0;
for (; first != last; ++first) {
dest.insert( dest.end(),
first->prefix().first,
@@ -68,7 +69,11 @@
replacement.end() );
suffix = first->suffix().first;
}
- dest.insert(dest.end(), suffix, &src[0] + src.size());
+ if (suffix) {
+ dest.insert(dest.end(), suffix, &src[0] + src.size());
+ } else {
+ dest.insert(dest.end(), &src[0], &src[0] + src.size());
+ }
}
struct simple_formatter {
simple_formatter(const string_type& fmt, flag_type fmt_flags)
Modified: branches/fix-links/boost/iostreams/filter/stdio.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/stdio.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/stdio.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/filter/symmetric.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/symmetric.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/symmetric.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/filter/test.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/test.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/test.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/filter/zlib.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filter/zlib.hpp (original)
+++ branches/fix-links/boost/iostreams/filter/zlib.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/filtering_stream.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filtering_stream.hpp (original)
+++ branches/fix-links/boost/iostreams/filtering_stream.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2004
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2004-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/filtering_streambuf.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/filtering_streambuf.hpp (original)
+++ branches/fix-links/boost/iostreams/filtering_streambuf.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/flush.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/flush.hpp (original)
+++ branches/fix-links/boost/iostreams/flush.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/get.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/get.hpp (original)
+++ branches/fix-links/boost/iostreams/get.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/imbue.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/imbue.hpp (original)
+++ branches/fix-links/boost/iostreams/imbue.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/input_sequence.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/input_sequence.hpp (original)
+++ branches/fix-links/boost/iostreams/input_sequence.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/invert.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/invert.hpp (original)
+++ branches/fix-links/boost/iostreams/invert.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/operations.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/operations.hpp (original)
+++ branches/fix-links/boost/iostreams/operations.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/operations_fwd.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/operations_fwd.hpp (original)
+++ branches/fix-links/boost/iostreams/operations_fwd.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/optimal_buffer_size.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/optimal_buffer_size.hpp (original)
+++ branches/fix-links/boost/iostreams/optimal_buffer_size.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/output_sequence.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/output_sequence.hpp (original)
+++ branches/fix-links/boost/iostreams/output_sequence.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/pipeline.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/pipeline.hpp (original)
+++ branches/fix-links/boost/iostreams/pipeline.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/positioning.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/positioning.hpp (original)
+++ branches/fix-links/boost/iostreams/positioning.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/put.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/put.hpp (original)
+++ branches/fix-links/boost/iostreams/put.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/putback.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/putback.hpp (original)
+++ branches/fix-links/boost/iostreams/putback.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/read.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/read.hpp (original)
+++ branches/fix-links/boost/iostreams/read.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/restrict.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/restrict.hpp (original)
+++ branches/fix-links/boost/iostreams/restrict.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -6,8 +6,10 @@
*
* File: boost/iostreams/detail/restrict.hpp
* Date: Sun Jan 06 12:57:30 MST 2008
- * Copyright: 2004-2007 Jonathan Turkanis
+ * Copyright: 2008 CodeRage, LLC
+ 2004-2007 Jonathan Turkanis
* Author: Jonathan Turkanis
+ * Contact: turkanis at coderage dot com
*
* Defines the class template boost::iostreams::restriction and the
* overloaded function template boost::iostreams::restrict
Modified: branches/fix-links/boost/iostreams/seek.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/seek.hpp (original)
+++ branches/fix-links/boost/iostreams/seek.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/skip.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/skip.hpp (original)
+++ branches/fix-links/boost/iostreams/skip.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/slice.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/slice.hpp (original)
+++ branches/fix-links/boost/iostreams/slice.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -6,8 +6,10 @@
*
* File: boost/iostreams/detail/restrict.hpp
* Date: Sun Jan 06 12:57:30 MST 2008
- * Copyright: 2004-2007 Jonathan Turkanis
+ * Copyright: 2008 CodeRage, LLC
+ 2004-2007 Jonathan Turkanis
* Author: Jonathan Turkanis
+ * Contact: turkanis at coderage dot com
*
* Defines the class template boost::iostreams::restriction and the
* overloaded function template boost::iostreams::slice.
Modified: branches/fix-links/boost/iostreams/stream.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/stream.hpp (original)
+++ branches/fix-links/boost/iostreams/stream.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/stream_buffer.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/stream_buffer.hpp (original)
+++ branches/fix-links/boost/iostreams/stream_buffer.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/tee.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/tee.hpp (original)
+++ branches/fix-links/boost/iostreams/tee.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2005.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/traits.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/traits.hpp (original)
+++ branches/fix-links/boost/iostreams/traits.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/traits_fwd.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/traits_fwd.hpp (original)
+++ branches/fix-links/boost/iostreams/traits_fwd.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/iostreams/write.hpp
==============================================================================
--- branches/fix-links/boost/iostreams/write.hpp (original)
+++ branches/fix-links/boost/iostreams/write.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,4 +1,5 @@
-// (C) Copyright Jonathan Turkanis 2003.
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
Modified: branches/fix-links/boost/regex/pending/unicode_iterator.hpp
==============================================================================
--- branches/fix-links/boost/regex/pending/unicode_iterator.hpp (original)
+++ branches/fix-links/boost/regex/pending/unicode_iterator.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -68,6 +68,7 @@
#include <stdexcept>
#ifndef BOOST_NO_STD_LOCALE
#include <sstream>
+#include <ios>
#endif
#include <limits.h> // CHAR_BIT
Modified: branches/fix-links/boost/regex/v4/basic_regex_creator.hpp
==============================================================================
--- branches/fix-links/boost/regex/v4/basic_regex_creator.hpp (original)
+++ branches/fix-links/boost/regex/v4/basic_regex_creator.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1270,6 +1270,19 @@
state = state->next.p;
continue;
}
+ if((static_cast<re_brace*>(state)->index == -1)
+ || (static_cast<re_brace*>(state)->index == -2))
+ {
+ // skip past the zero width assertion:
+ state = static_cast<const re_jump*>(state->next.p)->alt.p->next.p;
+ continue;
+ }
+ if(static_cast<re_brace*>(state)->index == -3)
+ {
+ // Have to skip the leading jump state:
+ state = state->next.p->next.p;
+ continue;
+ }
return;
case syntax_element_endmark:
case syntax_element_start_line:
Modified: branches/fix-links/boost/regex/v4/perl_matcher_non_recursive.hpp
==============================================================================
--- branches/fix-links/boost/regex/v4/perl_matcher_non_recursive.hpp (original)
+++ branches/fix-links/boost/regex/v4/perl_matcher_non_recursive.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1193,6 +1193,9 @@
pstate = rep->next.p;
}while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
}
+ // remember where we got to if this is a leading repeat:
+ if((rep->leading) && (count < rep->max))
+ restart = position;
if(position == last)
{
// can't repeat any more, remove the pushed state:
@@ -1259,6 +1262,9 @@
pstate = rep->next.p;
}while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
}
+ // remember where we got to if this is a leading repeat:
+ if((rep->leading) && (count < rep->max))
+ restart = position;
if(position == last)
{
// can't repeat any more, remove the pushed state:
@@ -1326,6 +1332,9 @@
pstate = rep->next.p;
}while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
}
+ // remember where we got to if this is a leading repeat:
+ if((rep->leading) && (count < rep->max))
+ restart = position;
if(position == last)
{
// can't repeat any more, remove the pushed state:
Modified: branches/fix-links/boost/spirit/tree/impl/tree_to_xml.ipp
==============================================================================
--- branches/fix-links/boost/spirit/tree/impl/tree_to_xml.ipp (original)
+++ branches/fix-links/boost/spirit/tree/impl/tree_to_xml.ipp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,5 +1,5 @@
/*=============================================================================
- Copyright (c) 2001-2007 Hartmut Kaiser
+ Copyright (c) 2001-2008 Hartmut Kaiser
Copyright (c) 2001-2003 Daniel Nuffer
http://spirit.sourceforge.net/
Modified: branches/fix-links/boost/test/impl/execution_monitor.ipp
==============================================================================
--- branches/fix-links/boost/test/impl/execution_monitor.ipp (original)
+++ branches/fix-links/boost/test/impl/execution_monitor.ipp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -65,7 +65,7 @@
# include <windows.h>
-# if defined(__MWERKS__) || defined(BOOST_MSVC)
+# if defined(__MWERKS__) || (defined(BOOST_MSVC) && !defined(UNDER_CE))
# include <eh.h>
# endif
Modified: branches/fix-links/boost/test/test_tools.hpp
==============================================================================
--- branches/fix-links/boost/test/test_tools.hpp (original)
+++ branches/fix-links/boost/test/test_tools.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -44,6 +44,7 @@
// STL
#include <cstddef> // for std::size_t
#include <iosfwd>
+#include <ios> // for std::boolalpha
#include <climits> // for CHAR_BIT
#include <boost/test/detail/suppress_warnings.hpp>
Modified: branches/fix-links/boost/unordered/detail/hash_table.hpp
==============================================================================
--- branches/fix-links/boost/unordered/detail/hash_table.hpp (original)
+++ branches/fix-links/boost/unordered/detail/hash_table.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -109,6 +109,18 @@
{
return std::pair<Dst1, Dst2>(Dst1(x.first), Dst2(x.second));
}
+
+#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
+
}
}
Modified: branches/fix-links/boost/unordered/detail/hash_table_impl.hpp
==============================================================================
--- branches/fix-links/boost/unordered/detail/hash_table_impl.hpp (original)
+++ branches/fix-links/boost/unordered/detail/hash_table_impl.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1045,7 +1045,7 @@
boost::forward_traversal_tag)
{
// max load factor isn't set yet, but when it is, it'll be 1.0.
- return (std::max)(static_cast<size_type>(std::distance(i, j)) + 1, n);
+ return (std::max)(static_cast<size_type>(unordered_detail::distance(i, j)) + 1, n);
}
template <typename I>
@@ -1312,7 +1312,7 @@
// throws - basic:
if (need_to_reserve) {
rehash_impl(double_to_size_t(floor(
- n / (double) mlf_ * 1.25)) + 1);
+ n / (double) mlf_ * 1.25)) + 1);
}
BOOST_ASSERT(n < max_load_ || n > max_size());
return need_to_reserve;
@@ -1545,7 +1545,7 @@
template <typename I>
void insert_for_range(I i, I j, forward_traversal_tag)
{
- size_type distance = std::distance(i, j);
+ size_type distance = unordered_detail::distance(i, j);
if(distance == 1) {
insert(*i);
}
@@ -1687,7 +1687,7 @@
template <typename I>
size_type insert_size(I i, I j, boost::forward_traversal_tag)
{
- return std::distance(i, j);
+ return unordered_detail::distance(i, j);
}
template <typename I>
Modified: branches/fix-links/boost/utility/value_init.hpp
==============================================================================
--- branches/fix-links/boost/utility/value_init.hpp (original)
+++ branches/fix-links/boost/utility/value_init.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -5,7 +5,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
//
// 21 Ago 2002 (Created) Fernando Cacciola
-// 19 Jan 2008 (Worked around compiler bugs, added initialized_value) Fernando Cacciola, Niels Dekker
+// 30 Jan 2008 (Worked around compiler bugs, added initialized_value) Fernando Cacciola, Niels Dekker
//
#ifndef BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
#define BOOST_UTILITY_VALUE_INIT_21AGO2002_HPP
@@ -37,13 +37,22 @@
remove_const<T>::type data;
};
- mutable aligned_storage<sizeof(wrapper), alignment_of<wrapper>::value> x;
+ mutable
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592))
+ typename
+#endif
+ aligned_storage<sizeof(wrapper), alignment_of<wrapper>::value>::type x;
+
+ wrapper * wrapper_address() const
+ {
+ return static_cast<wrapper *>( static_cast<void*>(&x));
+ }
public :
value_initialized()
{
- std::memset(x.address(), 0, sizeof(x));
+ std::memset(&x, 0, sizeof(x));
#ifdef BOOST_MSVC
#pragma warning(push)
#if _MSC_VER >= 1310
@@ -53,7 +62,7 @@
#pragma warning(disable: 4345)
#endif
#endif
- new (x.address()) wrapper();
+ new (wrapper_address()) wrapper();
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
@@ -61,24 +70,23 @@
value_initialized(value_initialized const & arg)
{
- new (x.address()) wrapper( *static_cast<wrapper const *>(arg.x.address()) );
+ new (wrapper_address()) wrapper( static_cast<wrapper const &>(*(arg.wrapper_address())));
}
value_initialized & operator=(value_initialized const & arg)
{
- T const & arg_data = arg.data();
- this->data() = arg_data;
+ this->data() = static_cast<T const &>( arg.data() );
return *this;
}
~value_initialized()
{
- static_cast<wrapper *>(x.address())->wrapper::~wrapper();
+ wrapper_address()->wrapper::~wrapper();
}
T& data() const
{
- return static_cast<wrapper *>(x.address())->data;
+ return wrapper_address()->data;
}
operator T&() const { return this->data(); }
Modified: branches/fix-links/boost/wave/util/cpp_macromap.hpp
==============================================================================
--- branches/fix-links/boost/wave/util/cpp_macromap.hpp (original)
+++ branches/fix-links/boost/wave/util/cpp_macromap.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -162,10 +162,18 @@
bool expand_operator_defined);
// Collect all arguments supplied to a macro invocation
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
template <typename IteratorT, typename ContainerT, typename SizeT>
typename std::vector<ContainerT>::size_type collect_arguments (
token_type const curr_token, std::vector<ContainerT> &arguments,
IteratorT &next, IteratorT const &end, SizeT const ¶meter_count);
+#else
+ template <typename IteratorT, typename ContainerT, typename SizeT>
+ typename std::vector<ContainerT>::size_type collect_arguments (
+ token_type const curr_token, std::vector<ContainerT> &arguments,
+ IteratorT &next, IteratorT &endparen, IteratorT const &end,
+ SizeT const ¶meter_count);
+#endif
// Expand a single macro name
template <typename IteratorT, typename ContainerT>
@@ -688,12 +696,21 @@
// return the number of successfully detected non-empty arguments
//
///////////////////////////////////////////////////////////////////////////////
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
+template <typename ContextT>
+template <typename IteratorT, typename ContainerT, typename SizeT>
+inline typename std::vector<ContainerT>::size_type
+macromap<ContextT>::collect_arguments (token_type const curr_token,
+ std::vector<ContainerT> &arguments, IteratorT &next,
+ IteratorT const &end, SizeT const ¶meter_count)
+#else
template <typename ContextT>
template <typename IteratorT, typename ContainerT, typename SizeT>
inline typename std::vector<ContainerT>::size_type
macromap<ContextT>::collect_arguments (token_type const curr_token,
- std::vector<ContainerT> &arguments, IteratorT &next, IteratorT const &end,
- SizeT const ¶meter_count)
+ std::vector<ContainerT> &arguments, IteratorT &next, IteratorT &endparen,
+ IteratorT const &end, SizeT const ¶meter_count)
+#endif
{
using namespace boost::wave;
@@ -734,6 +751,9 @@
else {
// found closing parenthesis
// trim_sequence(argument);
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS == 0
+ endparen = next;
+#endif
if (parameter_count > 0) {
if (argument->empty() ||
impl::is_whitespace_only(*argument))
@@ -1186,6 +1206,7 @@
#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS == 0
IteratorT seqstart = first;
+ IteratorT seqend = first;
#endif
if (macro_def.is_functionlike) {
@@ -1193,9 +1214,15 @@
// collect the arguments
std::vector<ContainerT> arguments;
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
typename std::vector<ContainerT>::size_type count_args =
collect_arguments (curr_token, arguments, first, last,
macro_def.macroparameters.size());
+#else
+ typename std::vector<ContainerT>::size_type count_args =
+ collect_arguments (curr_token, arguments, first, seqend, last,
+ macro_def.macroparameters.size());
+#endif
// verify the parameter count
if (count_args < macro_def.macroparameters.size() ||
@@ -1240,7 +1267,7 @@
if (ctx.get_hooks().expanding_function_like_macro(
ctx, macro_def.macroname, macro_def.macroparameters,
macro_def.macrodefinition, curr_token, arguments,
- seqstart, first))
+ seqend, first))
{
// do not expand this macro, just copy the whole sequence
std::copy(seqstart, first,
@@ -1477,8 +1504,14 @@
}
std::vector<ContainerT> arguments;
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
typename std::vector<ContainerT>::size_type count_args =
collect_arguments (pragma_token, arguments, first, last, 1);
+#else
+ IteratorT endparen = first;
+ typename std::vector<ContainerT>::size_type count_args =
+ collect_arguments (pragma_token, arguments, first, endparen, last, 1);
+#endif
// verify the parameter count
if (pragma_token.get_position().get_file().empty())
Modified: branches/fix-links/boost/wave/util/flex_string.hpp
==============================================================================
--- branches/fix-links/boost/wave/util/flex_string.hpp (original)
+++ branches/fix-links/boost/wave/util/flex_string.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2256,7 +2256,7 @@
{
Enforce(pos1 <= size(), (std::out_of_range*)0, "");
Procust(n1, size() - pos1);
- const int r = traits_type::compare(data(), s, Min(n1, n2));
+ const int r = traits_type::compare(data()+pos1, s, Min(n1, n2));
return
r != 0 ? r :
n1 > n2 ? 1 :
Modified: branches/fix-links/boost/wave/wave_config.hpp
==============================================================================
--- branches/fix-links/boost/wave/wave_config.hpp (original)
+++ branches/fix-links/boost/wave/wave_config.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -388,9 +388,22 @@
}}
///////////////////////////////////////////////////////////////////////////////
-// configure Boost.Spirit thread support, Boost.Pool is configured
-// automatically
+// Configure Wave thread support, Boost.Spirit and Boost.Pool are configured
+// based on these settings automatically
+//
+// If BOOST_WAVE_SUPPORT_THREADING is not defined, Wave will use the global
+// Boost build settings (BOOST_HAS_THREADS), if it is defined its value
+// defines, whether threading will be enabled or not (should be set to '0'
+// or '1').
+#if !defined(BOOST_WAVE_SUPPORT_THREADING)
#if defined(BOOST_HAS_THREADS)
+#define BOOST_WAVE_SUPPORT_THREADING 1
+#else
+#define BOOST_WAVE_SUPPORT_THREADING 0
+#endif
+#endif
+
+#if BOOST_WAVE_SUPPORT_THREADING != 0
#define BOOST_SPIRIT_THREADSAFE 1
#define PHOENIX_THREADSAFE 1
#else
Modified: branches/fix-links/boost/xpressive/basic_regex.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/basic_regex.hpp (original)
+++ branches/fix-links/boost/xpressive/basic_regex.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// Contains the definition of the basic_regex\<\> class template and its
/// associated helper functions.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -152,7 +152,7 @@
/// \return A basic_regex object corresponding to the regular expression
/// represented by the character range.
/// \pre [begin,end) is a valid range.
- /// \pre The range of characters specified by [begin,end) contains a
+ /// \pre The range of characters specified by [begin,end) contains a
/// valid string-based representation of a regular expression.
/// \throw regex_error when the range of characters has invalid regular
/// expression syntax.
Modified: branches/fix-links/boost/xpressive/detail/core/access.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/access.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/access.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// access.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/action.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/action.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/action.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// action.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/adaptor.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/adaptor.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/adaptor.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// adaptor.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/finder.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/finder.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/finder.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,6 +1,6 @@
/// Contains the definition of the basic_regex\<\> class template and its associated helper functions.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -185,6 +185,28 @@
bool bits_[256];
};
+///////////////////////////////////////////////////////////////////////////////
+// leading_simple_repeat_finder
+//
+template<typename BidiIter>
+struct leading_simple_repeat_finder
+ : finder<BidiIter>
+{
+ leading_simple_repeat_finder()
+ : finder<BidiIter>()
+ {}
+
+ bool operator ()(match_state<BidiIter> &state) const
+ {
+ state.cur_ = state.next_search_;
+ return true;
+ }
+
+private:
+ leading_simple_repeat_finder(leading_simple_repeat_finder const &);
+ leading_simple_repeat_finder &operator =(leading_simple_repeat_finder const &);
+};
+
}}}
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
Modified: branches/fix-links/boost/xpressive/detail/core/flow_control.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/flow_control.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/flow_control.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// flow_control.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/icase.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/icase.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/icase.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// icase.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/linker.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/linker.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/linker.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// linker.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -145,6 +145,7 @@
: back_stack_()
, traits_(&traits)
, traits_type_(&typeid(Traits))
+ , has_backrefs_(false)
{
}
@@ -154,6 +155,24 @@
// no-op
}
+ template<typename Traits, typename ICase>
+ void accept(mark_matcher<Traits, ICase> const &, void const *)
+ {
+ this->has_backrefs_ = true;
+ }
+
+ template<typename Action>
+ void accept(action_matcher<Action> const &, void const *)
+ {
+ this->has_backrefs_ = true;
+ }
+
+ template<typename Predicate>
+ void accept(predicate_matcher<Predicate> const &, void const *)
+ {
+ this->has_backrefs_ = true;
+ }
+
void accept(repeat_begin_matcher const &, void const *next)
{
this->back_stack_.push(next);
@@ -217,6 +236,12 @@
matcher.xpr_.link(*this);
}
+ // accessors
+ bool has_backrefs() const
+ {
+ return this->has_backrefs_;
+ }
+
// for use by alt_link_pred below
template<typename Xpr>
void alt_branch_link(Xpr const &xpr, void const *next, xpression_peeker<Char> *peeker)
@@ -292,6 +317,7 @@
std::stack<void const *> back_stack_;
void const *traits_;
std::type_info const *traits_type_;
+ bool has_backrefs_;
};
}}} // namespace boost::xpressive::detail
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/action_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/action_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/action_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,8 +1,8 @@
///////////////////////////////////////////////////////////////////////////////
// action_matcher.hpp
//
-// Copyright 2007 Eric Niebler.
-// Copyright 2007 David Jenkins.
+// Copyright 2008 Eric Niebler.
+// Copyright 2008 David Jenkins.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -215,7 +215,7 @@
>::type
>::type
temp_type;
-
+
typedef typename temp_type::type result_type;
result_type operator ()(Expr const &expr, action_context const &ctx) const
@@ -265,13 +265,14 @@
//
struct subreg_transform : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::terminal<sub_match<typename State::iterator> >
- {};
+ {
+ typedef State unref_state;
+ typedef typename proto::terminal<sub_match<typename unref_state::iterator> >::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -287,13 +288,16 @@
//
struct mark_transform : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::terminal<sub_match<typename State::iterator> >
- {};
+ {
+ typedef State unref_state;
+ typedef
+ typename proto::terminal<sub_match<typename unref_state::iterator> >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -331,15 +335,17 @@
//
struct attr_transform : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::result_of::as_expr<
- opt<typename Expr::proto_arg0::matcher_type::value_type::second_type>
- >
- {};
+ {
+ typedef
+ typename proto::result_of::as_expr<
+ opt<typename Expr::proto_arg0::matcher_type::value_type::second_type>
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -356,18 +362,20 @@
// attr_with_default_transform
//
template<typename Grammar, typename Callable = proto::callable>
- struct attr_with_default_transform
+ struct attr_with_default_transform : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::unary_expr<
- attr_with_default_tag
- , typename Grammar::template result<void(Expr, State, Visitor)>::type
- >
- {};
+ {
+ typedef
+ typename proto::unary_expr<
+ attr_with_default_tag
+ , typename Grammar::template result<void(Expr, State, Visitor)>::type
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -385,19 +393,22 @@
//
struct by_ref_transform : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::terminal<typename proto::result_of::arg<Expr>::const_reference>
- {};
+ {
+ typedef
+ typename proto::terminal<typename proto::result_of::arg<Expr>::const_reference>::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &, Visitor &) const
{
- return result<void(Expr, State, Visitor)>::type::make(proto::arg(expr));
+ typedef typename result<void(Expr, State, Visitor)>::type that_type;
+ return that_type::make(proto::arg(expr));
}
};
@@ -439,7 +450,7 @@
{
// Bind the arguments
int sub = this->sub_; // BUGBUG this is a hack
- typedef typename BindActionArgs::result<void(Actor, match_state<BidiIter>, int)>::type action_type;
+ typedef typename BindActionArgs::template result<void(Actor, match_state<BidiIter>, int)>::type action_type;
action<action_type> actor(BindActionArgs()(this->actor_, state, sub));
// Put the action in the action list
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/alternate_end_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/alternate_end_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/alternate_end_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// alternate_end_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/alternate_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/alternate_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/alternate_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// alternate_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/any_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/any_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/any_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// any_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/assert_bol_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/assert_bol_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/assert_bol_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// assert_bol_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/assert_bos_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/assert_bos_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/assert_bos_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// assert_bos_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/assert_eol_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/assert_eol_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/assert_eol_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// assert_eol_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/assert_eos_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/assert_eos_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/assert_eos_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// assert_eos_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/assert_line_base.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/assert_line_base.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/assert_line_base.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// assert_line_base.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/assert_word_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/assert_word_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/assert_word_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// assert_word_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/attr_begin_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/attr_begin_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/attr_begin_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// attr_begin_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/attr_end_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/attr_end_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/attr_end_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// attr_end_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/attr_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/attr_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/attr_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,8 +1,8 @@
///////////////////////////////////////////////////////////////////////////////
// attr_matcher.hpp
//
-// Copyright 2007 Eric Niebler.
-// Copyright 2007 David Jenkins.
+// Copyright 2008 Eric Niebler.
+// Copyright 2008 David Jenkins.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/charset_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/charset_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/charset_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// charset_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/end_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/end_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/end_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// end_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/epsilon_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/epsilon_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/epsilon_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// epsilon_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/keeper_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/keeper_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/keeper_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// keeper_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/literal_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/literal_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/literal_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// literal_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/logical_newline_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/logical_newline_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/logical_newline_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// logical_newline_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/lookahead_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/lookahead_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/lookahead_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// lookahead_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/lookbehind_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/lookbehind_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/lookbehind_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// lookbehind_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/mark_begin_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/mark_begin_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/mark_begin_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// mark_begin_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/mark_end_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/mark_end_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/mark_end_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// mark_end_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/mark_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/mark_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/mark_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// mark_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/optional_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/optional_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/optional_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// optional_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/posix_charset_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/posix_charset_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/posix_charset_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// posix_charset_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/predicate_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/predicate_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/predicate_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// predicate_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -122,7 +122,7 @@
bool match(match_state<BidiIter> &state, Next const &next) const
{
// Predicate is check(assertion), where assertion can be
- // a lambda or a function object.
+ // a lambda or a function object.
return this->match_(state, next, proto::matches<Predicate, AssertionFunctor>());
}
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/range_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/range_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/range_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// range_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/regex_byref_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/regex_byref_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/regex_byref_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// regex_byref_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/regex_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/regex_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/regex_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// regex_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/repeat_begin_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/repeat_begin_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/repeat_begin_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// repeat_end_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/repeat_end_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/repeat_end_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/repeat_end_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// repeat_end_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/set_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/set_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/set_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// set.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/simple_repeat_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// simple_repeat_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -16,6 +16,7 @@
#include <boost/assert.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/bool.hpp>
+#include <boost/next_prior.hpp>
#include <boost/xpressive/detail/detail_fwd.hpp>
#include <boost/xpressive/detail/core/quant_style.hpp>
#include <boost/xpressive/detail/core/state.hpp>
@@ -65,12 +66,14 @@
Xpr xpr_;
unsigned int min_, max_;
std::size_t width_;
+ mutable bool leading_;
simple_repeat_matcher(Xpr const &xpr, unsigned int min, unsigned int max, std::size_t width)
: xpr_(xpr)
, min_(min)
, max_(max)
, width_(width)
+ , leading_(false)
{
// it is the job of the parser to make sure this never happens
BOOST_ASSERT(min <= max);
@@ -101,6 +104,16 @@
++matches;
}
+ // If this repeater is at the front of the pattern, note
+ // how much of the input we consumed so that a repeated search
+ // doesn't have to cover the same ground again.
+ if(this->leading_)
+ {
+ state.next_search_ = (matches && matches < this->max_)
+ ? state.cur_
+ : (tmp == state.end_) ? tmp : boost::next(tmp);
+ }
+
if(this->min_ > matches)
{
state.cur_ = tmp;
@@ -126,6 +139,7 @@
template<typename BidiIter, typename Next>
bool match_(match_state<BidiIter> &state, Next const &next, non_greedy_tag) const
{
+ BOOST_ASSERT(!this->leading_);
BidiIter const tmp = state.cur_;
unsigned int matches = 0;
@@ -161,12 +175,24 @@
// is there enough room?
if(this->min_ > diff_to_end)
{
+ if(this->leading_)
+ {
+ // BUGBUG
+ state.next_search_ = boost::next(tmp);
+ }
return false;
}
BidiIter const min_iter = tmp + this->min_;
state.cur_ += (std::min)((std::size_t)this->max_, diff_to_end);
+ if(this->leading_)
+ {
+ state.next_search_ = (diff_to_end && diff_to_end < this->max_)
+ ? state.cur_
+ : (tmp == state.end_) ? tmp : boost::next(tmp);
+ }
+
for(;; --state.cur_)
{
if(next.match(state))
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/string_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/string_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/string_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// string_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matcher/true_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matcher/true_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matcher/true_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// true_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/matchers.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/matchers.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/matchers.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// matchers.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/optimize.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/optimize.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/optimize.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// optimize.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -39,6 +39,13 @@
new line_start_finder<BidiIter, Traits>(traits)
);
}
+ else if(peeker.leading_simple_repeat())
+ {
+ return intrusive_ptr<finder<BidiIter> >
+ (
+ new leading_simple_repeat_finder<BidiIter>()
+ );
+ }
else if(256 != peeker.bitset().count())
{
return intrusive_ptr<finder<BidiIter> >
@@ -96,7 +103,7 @@
// "peek" into the compiled regex to see if there are optimization opportunities
hash_peek_bitset<char_type> bset;
- xpression_peeker<char_type> peeker(bset, traits);
+ xpression_peeker<char_type> peeker(bset, traits, linker.has_backrefs());
regex->peek(peeker);
// optimization: get the peek chars OR the boyer-moore search string
Modified: branches/fix-links/boost/xpressive/detail/core/peeker.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/peeker.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/peeker.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// peeker.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -31,28 +31,7 @@
{
///////////////////////////////////////////////////////////////////////////////
-// peek_next
-// tell whether or not to keep looking for a peek optimization
-template<typename Matcher>
-struct peek_next
- : mpl::bool_<Matcher::width == 0>
-{
-};
-
-template<>
-struct peek_next<mark_begin_matcher>
- : mpl::true_
-{
-};
-
-template<>
-struct peek_next<repeat_begin_matcher>
- : mpl::true_
-{
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// xpression_peeker
+// peeker_string
//
template<typename Char>
struct peeker_string
@@ -91,12 +70,14 @@
struct xpression_peeker
{
template<typename Traits>
- xpression_peeker(hash_peek_bitset<Char> &bset, Traits const &traits)
+ xpression_peeker(hash_peek_bitset<Char> &bset, Traits const &traits, bool has_backrefs = false)
: bset_(bset)
, str_()
, line_start_(false)
, traits_(0)
, traits_type_(0)
+ , leading_simple_repeat_(0)
+ , has_backrefs_(has_backrefs)
{
this->set_traits(traits);
}
@@ -113,6 +94,11 @@
return this->line_start_;
}
+ bool leading_simple_repeat() const
+ {
+ return 0 < this->leading_simple_repeat_;
+ }
+
hash_peek_bitset<Char> const &bitset() const
{
return this->bset_;
@@ -120,19 +106,31 @@
///////////////////////////////////////////////////////////////////////////////
// modifiers
- void fail(bool do_fail = true)
+ void fail()
{
- if(do_fail)
+ this->bset_.set_all();
+ }
+
+ template<typename Matcher>
+ mpl::false_ accept(Matcher const &)
+ {
+ this->fail();
+ return mpl::false_();
+ }
+
+ mpl::true_ accept(mark_begin_matcher const &)
+ {
+ if(this->has_backrefs_)
{
- this->bset_.set_all();
+ --this->leading_simple_repeat_;
}
+ return mpl::true_();
}
- template<typename Matcher>
- peek_next<Matcher> accept(Matcher const &)
+ mpl::true_ accept(repeat_begin_matcher const &)
{
- this->fail(!peek_next<Matcher>::value);
- return peek_next<Matcher>();
+ --this->leading_simple_repeat_;
+ return mpl::true_();
}
template<typename Traits>
@@ -228,10 +226,22 @@
template<typename Xpr, typename Greedy>
mpl::false_ accept(simple_repeat_matcher<Xpr, Greedy> const &xpr)
{
+ if(Greedy() && 1U == xpr.width_)
+ {
+ ++this->leading_simple_repeat_;
+ xpr.leading_ = this->leading_simple_repeat();
+ }
0 != xpr.min_ ? xpr.xpr_.peek(*this) : this->fail(); // could be a union of xpr and next
return mpl::false_();
}
+ template<typename Xpr>
+ mpl::false_ accept(keeper_matcher<Xpr> const &xpr)
+ {
+ xpr.xpr_.peek(*this);
+ return mpl::false_();
+ }
+
template<typename Traits>
void set_traits(Traits const &traits)
{
@@ -261,6 +271,8 @@
bool line_start_;
void const *traits_;
std::type_info const *traits_type_;
+ int leading_simple_repeat_;
+ bool has_backrefs_;
};
}}} // namespace boost::xpressive::detail
Modified: branches/fix-links/boost/xpressive/detail/core/quant_style.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/quant_style.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/quant_style.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// quant_style.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/regex_impl.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/regex_impl.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/regex_impl.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// regex_impl.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/results_cache.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/results_cache.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/results_cache.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// results_cache.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/state.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/state.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/state.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// state.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -127,6 +127,7 @@
actionable const **action_list_tail_;
action_args_type *action_args_;
attr_context attr_context_;
+ BidiIter next_search_;
///////////////////////////////////////////////////////////////////////////////
//
@@ -151,6 +152,7 @@
, action_list_tail_(&action_list_.next)
, action_args_(&core_access<BidiIter>::get_action_args(what))
, attr_context_() // zero-initializes the fields of attr_context_
+ , next_search_(begin)
{
// reclaim any cached memory in the match_results struct
this->extras_->sub_match_stack_.unwind();
Modified: branches/fix-links/boost/xpressive/detail/core/sub_match_impl.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/sub_match_impl.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/sub_match_impl.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// sub_match_impl.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/core/sub_match_vector.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/core/sub_match_vector.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/core/sub_match_vector.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// sub_match_vector.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/detail_fwd.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/detail_fwd.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/detail_fwd.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// detail_fwd.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/dynamic/dynamic.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/dynamic/dynamic.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/dynamic/dynamic.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// dynamic.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/dynamic/matchable.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/dynamic/matchable.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/dynamic/matchable.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// matchable.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/dynamic/parse_charset.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/dynamic/parse_charset.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/dynamic/parse_charset.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// parse_charset.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/dynamic/parser.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/dynamic/parser.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/dynamic/parser.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// Contains the definition of regex_compiler, a factory for building regex objects
/// from strings.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/dynamic/parser_enum.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/dynamic/parser_enum.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/dynamic/parser_enum.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// parser_enum.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/dynamic/parser_traits.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/dynamic/parser_traits.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/dynamic/parser_traits.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// detail/dynamic/parser_traits.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/dynamic/sequence.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/dynamic/sequence.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/dynamic/sequence.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// sequence.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/static/compile.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/compile.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/compile.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// compile.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/static/grammar.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/grammar.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/grammar.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// grammar.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/static/is_pure.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/is_pure.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/is_pure.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// is_pure.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/static/modifier.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/modifier.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/modifier.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// modifier.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/static/placeholders.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/placeholders.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/placeholders.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// placeholders.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/static/static.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/static.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/static.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// static.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/static/transforms/as_action.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/transforms/as_action.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/transforms/as_action.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,8 +1,8 @@
///////////////////////////////////////////////////////////////////////////////
// as_action.hpp
//
-// Copyright 2007 Eric Niebler.
-// Copyright 2007 David Jenkins.
+// Copyright 2008 Eric Niebler.
+// Copyright 2008 David Jenkins.
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -62,21 +62,26 @@
// For patterns like (a1 = RHS)[ref(i) = a1], transform to
// (a1 = RHS)[ref(i) = read_attr<1, RHS>] so that when reading the attribute
// we know what type is stored in the attribute slot.
- struct as_read_attr : callable
+ struct as_read_attr : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::result_of::as_expr<
- detail::read_attr<
- typename Expr::proto_arg0::nbr_type
- , typename FindAttr<typename Expr::proto_arg0::nbr_type>
- ::template result<void(State, mpl::void_, int)>::type
- >
- >
- {};
+ {
+ typedef
+ typename proto::result_of::as_expr<
+ detail::read_attr<
+ typename Expr::proto_arg0::nbr_type
+ , typename FindAttr<typename Expr::proto_arg0::nbr_type>::template result<void(
+ State
+ , mpl::void_
+ , int
+ )>::type
+ >
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -90,15 +95,19 @@
///////////////////////////////////////////////////////////////////////////////
// by_value
// Store all terminals within an action by value to avoid dangling references.
- struct by_value : callable
+ struct by_value : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::result_of::as_expr<typename proto::result_of::arg<Expr>::type>
- {};
+ {
+ typedef
+ typename proto::result_of::as_expr<
+ typename proto::result_of::arg<Expr>::type
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -123,15 +132,15 @@
///////////////////////////////////////////////////////////////////////////////
// attr_nbr
// For an attribute placeholder, return the attribute's slot number.
- struct attr_nbr : callable
+ struct attr_nbr : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : Expr::proto_arg0::nbr_type
- {};
+ {
+ typedef typename Expr::proto_arg0::nbr_type::type type;
+ };
};
struct max_attr;
@@ -152,24 +161,23 @@
///////////////////////////////////////////////////////////////////////////////
// max_attr
// Take the maximum of the current attr slot number and the state.
- struct max_attr : callable
+ struct max_attr : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : mpl::max<State, typename MaxAttr::result<void(Expr, State, Visitor)>::type>
- {};
+ {
+ typedef typename mpl::max<State, typename MaxAttr::template result<void(Expr, State, Visitor)>::type >::type type;
+ };
};
///////////////////////////////////////////////////////////////////////////////
// as_attr_matcher
// turn a1=matcher into attr_matcher<Matcher>(1)
- struct as_attr_matcher : callable
+ struct as_attr_matcher : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -198,29 +206,31 @@
///////////////////////////////////////////////////////////////////////////////
// add_attrs
// Wrap an expression in attr_begin_matcher/attr_end_matcher pair
- struct add_attrs : callable
+ struct add_attrs : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : shift_right<
- typename terminal<
- detail::attr_begin_matcher<typename MaxAttr::result<void(Expr, mpl::int_<0>, int)>::type>
- >::type
- , typename shift_right<
- Expr
- , terminal<detail::attr_end_matcher>::type
+ {
+ typedef
+ typename shift_right<
+ typename terminal<
+ detail::attr_begin_matcher<typename MaxAttr::template result<void(Expr, mpl::int_<0>, int)>::type >
+ >::type
+ , typename shift_right<
+ Expr
+ , terminal<detail::attr_end_matcher>::type
+ >::type
>::type
- >
- {};
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &, Visitor &) const
{
- detail::attr_begin_matcher<typename MaxAttr::result<void(Expr, mpl::int_<0>, int)>::type> begin;
+ detail::attr_begin_matcher<typename MaxAttr::template result<void(Expr, mpl::int_<0>, int)>::type > begin;
detail::attr_end_matcher end;
typename result<void(Expr, State, Visitor)>::type that = {{begin}, {expr, {end}}};
return that;
@@ -245,20 +255,19 @@
// If A and B use attributes, wrap the above expression in
// a attr_begin_matcher<Count> / attr_end_matcher pair, where Count is
// the number of attribute slots used by the pattern/action.
- struct as_action : callable
+ struct as_action : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
{
typedef typename proto::result_of::left<Expr>::type expr_type;
typedef typename proto::result_of::right<Expr>::type action_type;
- typedef typename DeepCopy::result<void(action_type, expr_type, int)>::type action_copy_type;
+ typedef typename DeepCopy::template result<void(action_type, expr_type, int)>::type action_copy_type;
typedef
- typename InsertMark::result<void(expr_type, State, Visitor)>::type
+ typename InsertMark::template result<void(expr_type, State, Visitor)>::type
marked_expr_type;
typedef
@@ -277,7 +286,7 @@
no_attr_type;
typedef
- typename InsertAttrs::result<void(no_attr_type, State, Visitor)>::type
+ typename InsertAttrs::template result<void(no_attr_type, State, Visitor)>::type
type;
};
Modified: branches/fix-links/boost/xpressive/detail/static/transforms/as_alternate.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/transforms/as_alternate.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/transforms/as_alternate.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// as_alternate.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -22,10 +22,6 @@
#include <boost/xpressive/detail/core/matcher/alternate_matcher.hpp>
#include <boost/xpressive/detail/utility/cons.hpp>
-#define UNCV(x) typename remove_const<x>::type
-#define UNREF(x) typename remove_reference<x>::type
-#define UNCVREF(x) UNCV(UNREF(x))
-
namespace boost { namespace xpressive
{
namespace detail
@@ -66,10 +62,9 @@
///////////////////////////////////////////////////////////////////////////////
// in_alternate_list
template<typename Grammar>
- struct in_alternate_list : callable
+ struct in_alternate_list : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -94,10 +89,9 @@
///////////////////////////////////////////////////////////////////////////////
// as_alternate_matcher
template<typename Grammar>
- struct as_alternate_matcher : callable
+ struct as_alternate_matcher : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -122,8 +116,4 @@
}}
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
-
#endif
Modified: branches/fix-links/boost/xpressive/detail/static/transforms/as_independent.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/transforms/as_independent.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/transforms/as_independent.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// as_independent.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -35,10 +35,9 @@
{
template<typename Grammar>
- struct as_lookahead : callable
+ struct as_lookahead : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -61,28 +60,23 @@
};
template<typename Grammar>
- struct as_lookbehind : callable
+ struct as_lookbehind : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
{
typedef typename proto::result_of::arg<Expr>::type arg_type;
- typedef detail::lookbehind_matcher<
- typename Grammar::template result<void(arg_type, detail::true_xpression, Visitor)>::type
- > type;
+ typedef typename Grammar::template result<void(arg_type, detail::true_xpression, Visitor)>::type xpr_type;
+ typedef detail::lookbehind_matcher<xpr_type> type;
};
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &, Visitor &visitor) const
{
- typedef typename proto::result_of::arg<Expr>::type arg_type;
- typedef
- typename Grammar::template result<void(arg_type, detail::true_xpression, Visitor)>::type
- xpr_type;
+ typedef typename result<void(Expr, State, Visitor)>::xpr_type xpr_type;
xpr_type const &expr2 = Grammar()(proto::arg(expr), detail::true_xpression(), visitor);
std::size_t width = expr2.get_width().value();
return detail::lookbehind_matcher<xpr_type>(expr2, width, false);
@@ -90,10 +84,9 @@
};
template<typename Grammar>
- struct as_keeper : callable
+ struct as_keeper : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
Modified: branches/fix-links/boost/xpressive/detail/static/transforms/as_inverse.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/transforms/as_inverse.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/transforms/as_inverse.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// as_inverse.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -68,7 +68,7 @@
}
};
- struct as_inverse : callable
+ struct as_inverse : proto::callable
{
template<typename Sig>
struct result;
Modified: branches/fix-links/boost/xpressive/detail/static/transforms/as_marker.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/transforms/as_marker.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/transforms/as_marker.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// as_marker.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -23,21 +23,23 @@
///////////////////////////////////////////////////////////////////////////////
// as_marker
// Insert mark tags before and after the expression
- struct as_marker : callable
+ struct as_marker : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : shift_right<
- terminal<detail::mark_begin_matcher>::type
- , typename shift_right<
- typename proto::result_of::right<Expr>::type
- , terminal<detail::mark_end_matcher>::type
+ {
+ typedef
+ typename shift_right<
+ terminal<detail::mark_begin_matcher>::type
+ , typename shift_right<
+ typename proto::result_of::right<Expr>::type
+ , terminal<detail::mark_end_matcher>::type
+ >::type
>::type
- >
- {};
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
Modified: branches/fix-links/boost/xpressive/detail/static/transforms/as_matcher.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/transforms/as_matcher.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/transforms/as_matcher.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// as_matcher.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -19,10 +19,9 @@
namespace boost { namespace xpressive { namespace grammar_detail
{
- struct as_matcher : callable
+ struct as_matcher : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
Modified: branches/fix-links/boost/xpressive/detail/static/transforms/as_modifier.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/transforms/as_modifier.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/transforms/as_modifier.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// as_modifier.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -37,10 +37,9 @@
///////////////////////////////////////////////////////////////////////////////
// as_modifier
template<typename Grammar>
- struct as_modifier : callable
+ struct as_modifier : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
Modified: branches/fix-links/boost/xpressive/detail/static/transforms/as_quantifier.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/transforms/as_quantifier.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/transforms/as_quantifier.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// as_quantifier.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -19,13 +19,6 @@
#include <boost/xpressive/detail/static/static.hpp>
#include <boost/xpressive/proto/proto.hpp>
-#define CV(x) typename add_const<x>::type
-#define REF(x) typename add_reference<x>::type
-#define CVREF(x) REF(CV(x))
-#define UNCV(x) typename remove_const<x>::type
-#define UNREF(x) typename remove_reference<x>::type
-#define UNCVREF(x) UNCV(UNREF(x))
-
namespace boost { namespace xpressive { namespace detail
{
///////////////////////////////////////////////////////////////////////////////
@@ -71,10 +64,9 @@
///////////////////////////////////////////////////////////////////////////////
// as_simple_quantifier
template<typename Grammar, typename Greedy>
- struct as_simple_quantifier : callable
+ struct as_simple_quantifier : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -89,34 +81,37 @@
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- typedef typename proto::result_of::arg<Expr>::type arg_type;
- typedef typename Grammar::template result<void(arg_type, detail::true_xpression, Visitor)>::type xpr_type;
- typedef detail::simple_repeat_matcher<xpr_type, Greedy> matcher_type;
+ typedef result<void(Expr, State, Visitor)> result_;
+ typedef typename result_::arg_type arg_type;
+ typedef typename result_::xpr_type xpr_type;
+ typedef typename result_::matcher_type matcher_type;
typedef typename Expr::proto_tag tag;
xpr_type const &xpr = Grammar()(proto::arg(expr), detail::true_xpression(), visitor);
- matcher_type matcher(xpr, min_type<tag>(), max_type<tag>(), xpr.get_width().value());
+ matcher_type matcher(xpr, (uint_t)min_type<tag>(), (uint_t)max_type<tag>(), xpr.get_width().value());
return proto::terminal<matcher_type>::type::make(matcher);
}
};
///////////////////////////////////////////////////////////////////////////////
// add_hidden_mark
- struct add_hidden_mark : callable
+ struct add_hidden_mark : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : shift_right<
- terminal<detail::mark_begin_matcher>::type
- , typename shift_right<
- Expr
- , terminal<detail::mark_end_matcher>::type
+ {
+ typedef
+ typename shift_right<
+ terminal<detail::mark_begin_matcher>::type
+ , typename shift_right<
+ Expr
+ , terminal<detail::mark_end_matcher>::type
+ >::type
>::type
- >
- {};
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -145,37 +140,42 @@
///////////////////////////////////////////////////////////////////////////////
// as_default_quantifier_impl
template<typename Greedy, uint_t Min, uint_t Max>
- struct as_default_quantifier_impl : callable
+ struct as_default_quantifier_impl : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : shift_right<
- terminal<detail::repeat_begin_matcher>::type
- , typename shift_right<
- typename InsertMark::template result<void(typename proto::result_of::arg<Expr>::type, State, Visitor)>::type
- , typename terminal<detail::repeat_end_matcher<Greedy> >::type
+ {
+ typedef
+ typename InsertMark::template result<void(typename proto::result_of::arg<Expr>::type, State, Visitor)>::type
+ marked_sub_type;
+
+ typedef
+ typename shift_right<
+ terminal<detail::repeat_begin_matcher>::type
+ , typename shift_right<
+ marked_sub_type
+ , typename terminal<detail::repeat_end_matcher<Greedy> >::type
+ >::type
>::type
- >
- {};
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
// Ensure this sub-expression is book-ended with mark matchers
- typedef typename proto::result_of::arg<Expr>::type arg_type;
- typename InsertMark::template result<void(arg_type, State, Visitor)>::type const &
+ typename result<void(Expr, State, Visitor)>::marked_sub_type const &
marked_sub = InsertMark()(proto::arg(expr), state, visitor);
// Get the mark_number from the begin_mark_matcher
int mark_number = proto::arg(proto::left(marked_sub)).mark_number_;
BOOST_ASSERT(0 != mark_number);
- unsigned min_ = min_type<typename Expr::proto_tag>();
- unsigned max_ = max_type<typename Expr::proto_tag>();
+ uint_t min_ = (uint_t)min_type<typename Expr::proto_tag>();
+ uint_t max_ = (uint_t)max_type<typename Expr::proto_tag>();
detail::repeat_begin_matcher begin(mark_number);
detail::repeat_end_matcher<Greedy> end(mark_number, min_, max_);
@@ -195,10 +195,9 @@
///////////////////////////////////////////////////////////////////////////////
// as_default_optional
template<typename Grammar, typename Greedy>
- struct as_default_optional : callable
+ struct as_default_optional : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -222,10 +221,9 @@
///////////////////////////////////////////////////////////////////////////////
// as_mark_optional
template<typename Grammar, typename Greedy>
- struct as_mark_optional : callable
+ struct as_mark_optional : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -263,22 +261,22 @@
struct as_optional
: or_<
when<IsMarkerOrRepeater, as_mark_optional<Grammar, Greedy> >
- , otherwise<as_default_optional<Grammar, Greedy> >
+ , otherwise<as_default_optional<Grammar, Greedy> >
>
{};
///////////////////////////////////////////////////////////////////////////////
// make_optional_
template<typename Greedy>
- struct make_optional_ : callable
+ struct make_optional_ : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : unary_expr<optional_tag<Greedy>, Expr>
- {};
+ {
+ typedef typename unary_expr<optional_tag<Greedy>, Expr>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename unary_expr<optional_tag<Greedy>, Expr>::type
@@ -306,21 +304,23 @@
///////////////////////////////////////////////////////////////////////////////
// as_default_quantifier
template<typename Greedy>
- struct as_default_quantifier : callable
+ struct as_default_quantifier : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : boost::result_of<
+ {
+ typedef
as_default_quantifier_impl<
Greedy
, min_type<typename Expr::proto_tag>::value
, max_type<typename Expr::proto_tag>::value
- >(Expr, State, Visitor)
- >
- {};
+ >
+ impl;
+
+ typedef typename impl::template result<void(Expr, State, Visitor)>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -336,11 +336,4 @@
}}}
-#undef CV
-#undef REF
-#undef CVREF
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
-
#endif
Modified: branches/fix-links/boost/xpressive/detail/static/transforms/as_sequence.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/transforms/as_sequence.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/transforms/as_sequence.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// as_sequence.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -18,17 +18,12 @@
#include <boost/xpressive/detail/detail_fwd.hpp>
#include <boost/xpressive/detail/static/static.hpp>
-#define UNCV(x) typename remove_const<x>::type
-#define UNREF(x) typename remove_reference<x>::type
-#define UNCVREF(x) UNCV(UNREF(x))
-
namespace boost { namespace xpressive { namespace grammar_detail
{
template<typename Grammar>
- struct in_sequence : callable
+ struct in_sequence : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -52,8 +47,4 @@
}}}
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
-
#endif
Modified: branches/fix-links/boost/xpressive/detail/static/transforms/as_set.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/transforms/as_set.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/transforms/as_set.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// as_set.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -20,10 +20,6 @@
#include <boost/xpressive/detail/utility/chset/chset.hpp>
#include <boost/xpressive/detail/utility/traits_utils.hpp>
-#define UNCV(x) typename remove_const<x>::type
-#define UNREF(x) typename remove_reference<x>::type
-#define UNCVREF(x) UNCV(UNREF(x))
-
namespace boost { namespace xpressive { namespace grammar_detail
{
@@ -76,8 +72,7 @@
template<typename Char>
struct as_list_set_matcher
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -175,10 +170,9 @@
///////////////////////////////////////////////////////////////////////////////
//
template<typename Grammar>
- struct as_set_matcher
+ struct as_set_matcher : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -214,8 +208,4 @@
}}}
-#undef UNCV
-#undef UNREF
-#undef UNCVREF
-
#endif
Modified: branches/fix-links/boost/xpressive/detail/static/transmogrify.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/transmogrify.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/transmogrify.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// transmogrify.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/static/type_traits.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/type_traits.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/type_traits.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// type_traits.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/static/visitor.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/visitor.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/visitor.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// visitor.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/static/width_of.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/static/width_of.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/static/width_of.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// width_of.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/algorithm.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/algorithm.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/algorithm.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// algorithm.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/any.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/any.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/any.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// any.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/boyer_moore.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/boyer_moore.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/boyer_moore.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -4,7 +4,7 @@
/// purpose boyer-moore implementation. It truncates the search string at
/// 256 characters, but it is sufficient for the needs of xpressive.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/chset/chset.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/chset/chset.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/chset/chset.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// chset.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/cons.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/cons.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/cons.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// cons.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/dont_care.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/dont_care.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/dont_care.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// dont_care.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/hash_peek_bitset.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/hash_peek_bitset.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/hash_peek_bitset.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// hash_peek_bitset.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/ignore_unused.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/ignore_unused.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/ignore_unused.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// ignore_unused.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/literals.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/literals.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/literals.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// literals.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/never_true.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/never_true.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/never_true.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// never_true.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/save_restore.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/save_restore.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/save_restore.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// save_restore.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/sequence_stack.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/sequence_stack.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/sequence_stack.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// sequence_stack.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/tracking_ptr.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/tracking_ptr.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/tracking_ptr.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// tracking_ptr.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/traits_utils.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/traits_utils.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/traits_utils.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// traits_utils.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/detail/utility/width.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/detail/utility/width.hpp (original)
+++ branches/fix-links/boost/xpressive/detail/utility/width.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// width.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/match_results.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/match_results.hpp (original)
+++ branches/fix-links/boost/xpressive/match_results.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -4,7 +4,7 @@
/// The match_results type holds the results of a regex_match() or
/// regex_search() operation.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
//
@@ -324,8 +324,8 @@
return *this;
}
- /// Returns one plus the number of marked sub-expressions in the regular
- /// expression that was matched if *this represents the result of a
+ /// Returns one plus the number of marked sub-expressions in the regular
+ /// expression that was matched if *this represents the result of a
/// successful match. Otherwise returns 0.
size_type size() const
{
Modified: branches/fix-links/boost/xpressive/proto/args.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/args.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/args.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// \file args.hpp
/// Contains definition of args\<\> class template.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/proto/context.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/context.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/context.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file context.hpp
/// Includes all the context classes in the context/ sub-directory.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/proto/context/callable.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/context/callable.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/context/callable.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -7,7 +7,7 @@
/// have an overload that handles this node, fall-back to the default_context.
/// TODO: make the fall-back configurable!
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/proto/context/default.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/context/default.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/context/default.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -5,7 +5,7 @@
/// proto::eval() that uses Boost.Typeof to deduce return types
/// of the built-in operators.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/proto/context/null.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/context/null.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/context/null.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -5,7 +5,7 @@
/// proto::eval() that simply evaluates each child expression, doesn't
/// combine the results at all, and returns void.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -74,7 +74,7 @@
void operator ()(Expr &expr, Context &ctx) const
{
- BOOST_PP_REPEAT(N, BOOST_PROTO_EVAL_N, ~)
+ BOOST_PP_REPEAT(N, BOOST_PROTO_EVAL_N, ~)
}
};
Modified: branches/fix-links/boost/xpressive/proto/debug.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/debug.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/debug.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,8 +1,8 @@
///////////////////////////////////////////////////////////////////////////////
/// \file debug.hpp
-/// Utilities for debugging proto expression trees
+/// Utilities for debugging Proto expression trees
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -20,7 +20,7 @@
#include <boost/xpressive/proto/expr.hpp>
#include <boost/xpressive/proto/traits.hpp>
#else
-/// INTERNAL <> ONLY
+/// INTERNAL ONLY
/// Needed to work around doxygen bug
struct a_dummy_global;
#endif
@@ -54,17 +54,19 @@
{};
}
+ /// INTERNAL ONLY
template<typename Tag>
inline typename hidden_detail_::printable_tag<Tag>::type proto_tag_name(Tag)
{
return hidden_detail_::printable_tag<Tag>::call();
}
- #define BOOST_PROTO_DEFINE_TAG_NAME(Tag)\
- inline char const *proto_tag_name(tag::Tag)\
- {\
- return #Tag;\
- }\
+ #define BOOST_PROTO_DEFINE_TAG_NAME(Tag) \
+ /** \brief INTERNAL ONLY */ \
+ inline char const *proto_tag_name(tag::Tag) \
+ { \
+ return #Tag; \
+ } \
/**/
BOOST_PROTO_DEFINE_TAG_NAME(posit)
@@ -117,15 +119,28 @@
namespace functional
{
- // Display a proto expression tree
+ /// \brief Pretty-print a Proto expression tree.
+ ///
+ /// A PolymorphicFunctionObject which accepts a Proto expression
+ /// tree and pretty-prints it to an \c ostream for debugging
+ /// purposes.
struct display_expr
{
+ typedef void result_type;
+
+ /// \param depth The starting indentation depth for this node.
+ /// Children nodes will be displayed at a starting
+ /// depth of <tt>depth+4</tt>.
+ /// \param sout The \c ostream to which the expression tree
+ /// will be written.
display_expr(int depth = 0, std::ostream &sout = std::cout)
: depth_(depth)
, first_(true)
, sout_(sout)
{}
+ /// \brief Pretty-print the current node in a Proto expression
+ /// tree.
template<typename Args>
void operator()(proto::expr<tag::terminal, Args, 0> const &expr) const
{
@@ -139,8 +154,9 @@
/**/
#define BOOST_PP_LOCAL_MACRO(N) \
+ /** \overload */ \
template<typename Tag, typename Args> \
- void operator()(proto::expr<Tag, Args, N> const &expr) const \
+ void operator()(proto::expr<Tag, Args, N> const &expr) const \
{ \
using namespace tag; \
this->sout_ << std::setw(this->depth_) << (this->first_? "" : ", ") \
@@ -156,6 +172,8 @@
#include BOOST_PP_LOCAL_ITERATE()
#undef BOOST_PROTO_ARG
+ /// \overload
+ ///
template<typename T>
void operator()(T const &t) const
{
@@ -169,16 +187,24 @@
};
}
+ /// \brief Pretty-print a Proto expression tree.
+ ///
+ /// \note Equivalent to <tt>functional::display_expr(0, sout)(expr)</tt>
+ /// \param expr The Proto expression tree to pretty-print
+ /// \param sout The \c ostream to which the output should be
+ /// written.
template<typename Expr>
- void display_expr(Expr const &expr)
+ void display_expr(Expr const &expr, std::ostream &sout)
{
- functional::display_expr()(expr);
+ functional::display_expr(0, sout)(expr);
}
+ /// \overload
+ ///
template<typename Expr>
- void display_expr(Expr const &expr, std::ostream &sout)
+ void display_expr(Expr const &expr)
{
- functional::display_expr(0, sout)(expr);
+ functional::display_expr()(expr);
}
}}
Modified: branches/fix-links/boost/xpressive/proto/deep_copy.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/deep_copy.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/deep_copy.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// \file deep_copy.hpp
/// Replace all nodes stored by reference by nodes stored by value.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -14,7 +14,7 @@
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
- #include <boost/call_traits.hpp>
+ #include <boost/type_traits/is_function.hpp>
#include <boost/xpressive/proto/proto_fwd.hpp>
#include <boost/xpressive/proto/expr.hpp>
#include <boost/xpressive/proto/generate.hpp>
@@ -30,7 +30,16 @@
template<typename Expr>
struct deep_copy_impl<Expr, 0>
{
- typedef typename terminal<typename result_of::arg<Expr>::type>::type expr_type;
+ typedef BOOST_PROTO_UNCVREF(typename Expr::proto_arg0) raw_terminal_type;
+ // can't store a function type in a terminal.
+ typedef
+ typename mpl::if_<
+ is_function<raw_terminal_type>
+ , typename Expr::proto_arg0
+ , raw_terminal_type
+ >::type
+ actual_terminal_type;
+ typedef typename terminal<actual_terminal_type>::type expr_type;
typedef typename Expr::proto_domain::template apply<expr_type>::type type;
template<typename Expr2>
@@ -43,33 +52,74 @@
namespace result_of
{
+ /// \brief A metafunction for calculating the return type
+ /// of \c proto::deep_copy().
+ ///
+ /// A metafunction for calculating the return type
+ /// of \c proto::deep_copy(). The type parameter \c Expr
+ /// should be the type of a Proto expression tree.
+ /// It should not be a reference type, nor should it
+ /// be cv-qualified.
template<typename Expr>
struct deep_copy
- : detail::deep_copy_impl<Expr>
- {};
+ {
+ typedef typename detail::deep_copy_impl<Expr>::type type;
+ };
}
namespace functional
{
+ /// \brief A PolymorphicFunctionObject type for deep-copying
+ /// Proto expression trees.
+ ///
+ /// A PolymorphicFunctionObject type for deep-copying
+ /// Proto expression trees. When a tree is deep-copied,
+ /// all internal nodes and most terminals held by reference
+ /// are instead held by value.
+ ///
+ /// \attention Terminals of reference-to-function type are
+ /// left unchanged. Terminals of reference-to-array type are
+ /// stored by value, which can cause a large amount of data
+ /// to be passed by value and stored on the stack.
struct deep_copy
{
+ BOOST_PROTO_CALLABLE()
+
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
- : result_of::deep_copy<typename detail::remove_cv_ref<Expr>::type>
- {};
-
+ {
+ typedef
+ typename result_of::deep_copy<BOOST_PROTO_UNCVREF(Expr)>::type
+ type;
+ };
+
+ /// \brief Deep-copies a Proto expression tree, turning all
+ /// nodes and terminals held by reference into ones held by
+ /// value.
template<typename Expr>
typename result_of::deep_copy<Expr>::type
operator()(Expr const &expr) const
{
- return result_of::deep_copy<Expr>::call(expr);
+ return proto::detail::deep_copy_impl<Expr>::call(expr);
}
};
}
+ /// \brief A PolymorphicFunctionObject for deep-copying
+ /// Proto expression trees.
+ ///
+ /// A PolymorphicFunctionObject for deep-copying
+ /// Proto expression trees. When a tree is deep-copied,
+ /// all internal nodes and most terminals held by reference
+ /// are instead held by value.
+ ///
+ /// \attention Terminals of reference-to-array type and of
+ /// reference-to-function type are left unchanged.
+ ///
+ /// \sa proto::functional::deep_copy.
functional::deep_copy const deep_copy = {};
namespace detail
@@ -98,9 +148,15 @@
template<typename Expr>
struct deep_copy_impl<Expr, N>
{
- typedef proto::expr<typename Expr::proto_tag, BOOST_PP_CAT(args, N)<
- BOOST_PP_ENUM(N, BOOST_PROTO_DEFINE_DEEP_COPY_TYPE, ~)
- > > expr_type;
+ typedef
+ proto::expr<
+ typename Expr::proto_tag
+ , BOOST_PP_CAT(args, N)<
+ BOOST_PP_ENUM(N, BOOST_PROTO_DEFINE_DEEP_COPY_TYPE, ~)
+ >
+ >
+ expr_type;
+
typedef typename Expr::proto_domain::template apply<expr_type>::type type;
template<typename Expr2>
@@ -109,6 +165,7 @@
expr_type that = {
BOOST_PP_ENUM(N, BOOST_PROTO_DEFINE_DEEP_COPY_FUN, ~)
};
+
return Expr::proto_domain::make(that);
}
};
Modified: branches/fix-links/boost/xpressive/proto/detail/as_lvalue.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/detail/as_lvalue.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/detail/as_lvalue.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file as_lvalue.hpp
/// Contains definition of the call<> transform.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/proto/detail/dont_care.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/detail/dont_care.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/detail/dont_care.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file dont_care.hpp
/// Definintion of dont_care, a dummy parameter
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/proto/detail/funop.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/detail/funop.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/detail/funop.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
// funop.hpp
// Contains definition of funop[n]\<\> class template.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -10,6 +10,8 @@
#error Do not include this file directly
#endif
+ /// \brief A helper metafunction for computing the
+ /// return type of \c proto::expr\<\>::operator().
template<typename Expr BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), typename A)>
struct BOOST_PP_CAT(funop, BOOST_PP_ITERATION())
{
@@ -38,6 +40,8 @@
}
};
+ /// \brief A helper metafunction for computing the
+ /// return type of \c proto::expr\<\>::operator().
template<typename Expr BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), typename A), typename This>
struct funop<Expr(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), This>
: BOOST_PP_CAT(funop, BOOST_PP_ITERATION())<
@@ -50,6 +54,8 @@
>
{};
+ /// \brief A helper metafunction for computing the
+ /// return type of \c proto::expr\<\>::operator().
template<typename Expr BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(), typename A), typename This>
struct funop<Expr const(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), A)), This>
: BOOST_PP_CAT(funop, BOOST_PP_ITERATION())<
Modified: branches/fix-links/boost/xpressive/proto/detail/prefix.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/detail/prefix.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/detail/prefix.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -4,7 +4,7 @@
#endif
///////////////////////////////////////////////////////////////////////////////
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
///////////////////////////////////////////////////////////////////////////////
Modified: branches/fix-links/boost/xpressive/proto/detail/suffix.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/detail/suffix.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/detail/suffix.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
///////////////////////////////////////////////////////////////////////////////
Modified: branches/fix-links/boost/xpressive/proto/domain.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/domain.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/domain.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,9 +1,10 @@
///////////////////////////////////////////////////////////////////////////////
/// \file domain.hpp
-/// Contains definition of domain\<\> class template, for defining domains
-/// with a grammar for controlling operator overloading.
+/// Contains definition of domain\<\> class template and helpers for
+/// defining domains with a generator and a grammar for controlling
+/// operator overloading.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -30,21 +31,75 @@
namespace domainns_
{
+ /// \brief For use in defining domain tags to be used
+ /// with \c proto::extends\<\>. A \e Domain associates
+ /// an expression type with a \e Generator, and optionally
+ /// a \e Grammar.
+ ///
+ /// The Generator determines how new expressions in the
+ /// domain are constructed. Typically, a generator wraps
+ /// all new expressions in a wrapper that imparts
+ /// domain-specific behaviors to expressions within its
+ /// domain. (See \c proto::extends\<\>.)
+ ///
+ /// The Grammar determines whether a given expression is
+ /// valid within the domain, and automatically disables
+ /// any operator overloads which would cause an invalid
+ /// expression to be created. By default, the Grammar
+ /// parameter defaults to the wildcard, \c proto::_, which
+ /// makes all expressions valid within the domain.
+ ///
+ /// Example:
+ /// \code
+ /// template<typename Expr>
+ /// struct MyExpr;
+ ///
+ /// struct MyGrammar
+ /// : or_< terminal<_>, plus<MyGrammar, MyGrammar> >
+ /// {};
+ ///
+ /// // Define MyDomain, in which all expressions are
+ /// // wrapped in MyExpr<> and only expressions that
+ /// // conform to MyGrammar are allowed.
+ /// struct MyDomain
+ /// : domain<generator<MyExpr>, MyGrammar>
+ /// {};
+ ///
+ /// // Use MyDomain to define MyExpr
+ /// template<typename Expr>
+ /// struct MyExpr
+ /// : extends<Expr, MyExpr<Expr>, MyDomain>
+ /// {
+ /// // ...
+ /// };
+ /// \endcode
+ ///
template<typename Generator, typename Grammar>
struct domain
: Generator
{
- typedef Grammar grammar;
+ typedef Grammar proto_grammar;
/// INTERNAL ONLY
///
typedef void proto_is_domain_;
};
+ /// \brief The domain expressions have by default, if
+ /// \c proto::extends\<\> has not been used to associate
+ /// a domain with an expression.
+ ///
struct default_domain
: domain<>
{};
+ /// \brief A pseudo-domain for use in functions and
+ /// metafunctions that require a domain parameter. It
+ /// indicates that the domain of the parent node should
+ /// be inferred from the domains of the children nodes.
+ ///
+ /// \attention \c deduce_domain is not itself a valid domain.
+ ///
struct deduce_domain
: domain<detail::not_a_generator, detail::not_a_grammar>
{};
@@ -52,27 +107,65 @@
namespace result_of
{
+ /// A metafunction that returns \c mpl::true_
+ /// if the type \c T is the type of a Proto domain;
+ /// \c mpl::false_ otherwise. If \c T inherits from
+ /// \c proto::domain\<\>, \c is_domain\<T\> is
+ /// \c mpl::true_.
template<typename T, typename EnableIf>
struct is_domain
: mpl::false_
{};
+ /// INTERNAL ONLY
+ ///
template<typename T>
struct is_domain<T, typename T::proto_is_domain_>
: mpl::true_
{};
+ /// A metafunction that returns the domain of
+ /// a given type. If \c T is a Proto expression
+ /// type, it returns that expression's associated
+ /// domain. If not, it returns
+ /// \c proto::default_domain.
template<typename T, typename EnableIf>
struct domain_of
{
typedef default_domain type;
};
+ /// INTERNAL ONLY
+ ///
template<typename T>
struct domain_of<T, typename T::proto_is_expr_>
{
typedef typename T::proto_domain type;
};
+
+ /// INTERNAL ONLY
+ ///
+ template<typename T>
+ struct domain_of<T &, void>
+ {
+ typedef typename domain_of<T>::type type;
+ };
+
+ /// INTERNAL ONLY
+ ///
+ template<typename T>
+ struct domain_of<boost::reference_wrapper<T>, void>
+ {
+ typedef typename domain_of<T>::type type;
+ };
+
+ /// INTERNAL ONLY
+ ///
+ template<typename T>
+ struct domain_of<boost::reference_wrapper<T> const, void>
+ {
+ typedef typename domain_of<T>::type type;
+ };
}
}}
Modified: branches/fix-links/boost/xpressive/proto/eval.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/eval.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/eval.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file eval.hpp
/// Contains the eval() expression evaluator.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -18,6 +18,13 @@
namespace result_of
{
+ /// \brief A metafunction for calculating the return type
+ /// of \c proto::eval() given a certain \c Expr and \c Context
+ /// types.
+ ///
+ /// \note The types \c Expr and \c Context should not be
+ /// reference types. They may be cv-qualified, but the
+ /// cv-qualification on the \c Context parameter is ignored.
template<typename Expr, typename Context>
struct eval
{
@@ -27,19 +34,34 @@
namespace functional
{
+ /// \brief A PolymorphicFunctionObject type for
+ /// evaluating a given Proto expression with a given
+ /// context.
struct eval
{
+ BOOST_PROTO_CALLABLE()
+
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr, typename Context>
struct result<This(Expr, Context)>
- : proto::result_of::eval<
- typename remove_reference<Expr>::type
- , typename remove_reference<Context>::type
- >
- {};
-
+ {
+ typedef
+ typename proto::result_of::eval<
+ typename remove_reference<Expr>::type
+ , typename remove_reference<Context>::type
+ >::type
+ type;
+ };
+
+ /// \brief Evaluate a given Proto expression with a given
+ /// context.
+ /// \param The Proto expression to evaluate
+ /// \param The context in which the expression should be
+ /// evaluated.
+ /// \note This function is equivalent to
+ /// <tt>typename Context::template eval<Expr>()(expr, context)</tt>.
template<typename Expr, typename Context>
typename proto::result_of::eval<Expr, Context>::type
operator ()(Expr &expr, Context &context) const
@@ -47,6 +69,8 @@
return typename Context::template eval<Expr>()(expr, context);
}
+ /// \overload
+ ///
template<typename Expr, typename Context>
typename proto::result_of::eval<Expr, Context>::type
operator ()(Expr &expr, Context const &context) const
@@ -56,6 +80,11 @@
};
}
+ /// \brief A PolymorphicFunctionObject for
+ /// evaluating a given Proto expression with
+ /// a given context.
+ ///
+ /// \sa proto::functional::eval.
functional::eval const eval = {};
}}
Modified: branches/fix-links/boost/xpressive/proto/expr.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/expr.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/expr.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// \file expr.hpp
/// Contains definition of expr\<\> class template.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -41,39 +41,40 @@
namespace boost { namespace proto
{
- /// INTERNAL ONLY
- ///
- #define BOOST_PROTO_ARG(z, n, data)\
- typedef typename Args::BOOST_PP_CAT(arg, n) BOOST_PP_CAT(proto_arg, n);\
- BOOST_PP_CAT(proto_arg, n) BOOST_PP_CAT(arg, n);\
- /**/
-
- /// INTERNAL ONLY
- ///
- #define BOOST_PROTO_VOID(z, n, data)\
- typedef void BOOST_PP_CAT(proto_arg, n);\
- /**/
-
- /// INTERNAL ONLY
- ///
- #define BOOST_PROTO_AS_OP(z, n, data)\
- proto::as_arg(BOOST_PP_CAT(a,n))\
- /**/
-
- /// INTERNAL ONLY
- ///
- #define BOOST_PROTO_UNREF_ARG_TYPE(z, n, data)\
- typename result_of::unref<typename Args::BOOST_PP_CAT(arg, n)>::const_reference\
- /**/
-
- /// INTERNAL ONLY
- ///
- #define BOOST_PROTO_UNREF_ARG(z, n, data)\
- proto::unref(this->BOOST_PP_CAT(arg, n))\
- /**/
namespace detail
{
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_ARG(z, n, data) \
+ typedef typename Args::BOOST_PP_CAT(arg, n) BOOST_PP_CAT(proto_arg, n); \
+ BOOST_PP_CAT(proto_arg, n) BOOST_PP_CAT(arg, n); \
+ /**/
+
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_VOID(z, n, data) \
+ typedef void BOOST_PP_CAT(proto_arg, n); \
+ /**/
+
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_AS_OP(z, n, data) \
+ proto::as_arg(BOOST_PP_CAT(a,n)) \
+ /**/
+
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_UNREF_ARG_TYPE(z, n, data) \
+ typename result_of::unref<typename Args::BOOST_PP_CAT(arg, n)>::const_reference \
+ /**/
+
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_UNREF_ARG(z, n, data) \
+ proto::unref(this->BOOST_PP_CAT(arg, n)) \
+ /**/
+
template<typename Tag, typename Arg>
struct address_of_hack
{
@@ -81,7 +82,7 @@
};
template<typename Expr>
- struct address_of_hack<tag::address_of, ref_<Expr> >
+ struct address_of_hack<proto::tag::address_of, ref_<Expr> >
{
typedef Expr *type;
};
@@ -108,6 +109,8 @@
namespace result_of
{
+ /// \brief A helper metafunction for computing the
+ /// return type of \c proto::expr\<\>::operator().
template<typename Sig, typename This>
struct funop;
@@ -117,15 +120,15 @@
namespace exprns_
{
- #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PROTO_MAX_ARITY, <boost/xpressive/proto/expr.hpp>))
- #include BOOST_PP_ITERATE()
+ #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PROTO_MAX_ARITY, <boost/xpressive/proto/expr.hpp>))
+ #include BOOST_PP_ITERATE()
}
- #undef BOOST_PROTO_ARG
- #undef BOOST_PROTO_VOID
- #undef BOOST_PROTO_AS_OP
- #undef BOOST_PROTO_UNREF_ARG_TYPE
- #undef BOOST_PROTO_UNREF_ARG
+ #undef BOOST_PROTO_ARG
+ #undef BOOST_PROTO_VOID
+ #undef BOOST_PROTO_AS_OP
+ #undef BOOST_PROTO_UNREF_ARG_TYPE
+ #undef BOOST_PROTO_UNREF_ARG
}}
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
@@ -140,11 +143,11 @@
#define IS_TERMINAL 0 == BOOST_PP_ITERATION()
/// \brief Representation of a node in an expression tree.
- ///
+ ///
/// \c proto::expr\<\> is a node in an expression template tree. It
/// is a container for its children sub-trees. It also serves as
/// the terminal nodes of the tree.
- ///
+ ///
/// \c Tag is type that represents the operation encoded by
/// this expression. It is typically one of the structs
/// in the \c boost::proto::tag namespace, but it doesn't
@@ -154,12 +157,15 @@
///
/// \c Args is a type list representing the type of the children
/// of this expression. It is an instantiation of one
- /// of \c proto::args1\<\>, \c proto::args2\<\>, etc. The
+ /// of \c proto::args1\<\>, \c proto::args2\<\>, etc. The
/// children types must all themselves be either \c expr\<\>
/// or \c proto::ref_\<proto::expr\<\>\>, unless the \c Tag
/// type is \c boost::proto::tag::terminal, in which case
- /// \c Args must be \c proto::args1\<T\>, where \c T can be any
+ /// \c Args must be \c proto::args0\<T\>, where \c T can be any
/// type.
+ ///
+ /// \c proto::expr\<\> is a valid Fusion random-access sequence, where
+ /// the elements of the sequence are the children expressions.
template<typename Tag, typename Args>
struct expr<Tag, Args, BOOST_PP_ITERATION() >
{
@@ -168,11 +174,10 @@
typedef expr proto_base_expr;
typedef Args proto_args;
typedef default_domain proto_domain;
- typedef tag::proto_expr fusion_tag;
+ BOOST_PROTO_DEFINE_FUSION_TAG(proto::tag::proto_expr)
typedef void proto_is_expr_;
typedef expr proto_derived_expr;
- //BOOST_PROTO_IDENTITY_TRANSFORM();
BOOST_PP_REPEAT(ARG_COUNT, BOOST_PROTO_ARG, ~)
BOOST_PP_REPEAT_FROM_TO(ARG_COUNT, BOOST_PROTO_MAX_ARITY, BOOST_PROTO_VOID, ~)
@@ -255,20 +260,20 @@
/// \param a The rhs.
/// \return A new \c expr\<\> node representing an assignment of \c a to \c *this.
template<typename A>
- proto::expr<tag::assign, args2<ref_<expr const>, typename result_of::as_arg<A>::type> > const
+ proto::expr<proto::tag::assign, args2<ref_<expr const>, typename result_of::as_arg<A>::type> > const
operator =(A &a) const
{
- proto::expr<tag::assign, args2<ref_<expr const>, typename result_of::as_arg<A>::type> > that = {{*this}, proto::as_arg(a)};
+ proto::expr<proto::tag::assign, args2<ref_<expr const>, typename result_of::as_arg<A>::type> > that = {{*this}, proto::as_arg(a)};
return that;
}
/// \overload
///
template<typename A>
- proto::expr<tag::assign, args2<ref_<expr const>, typename result_of::as_arg<A const>::type> > const
+ proto::expr<proto::tag::assign, args2<ref_<expr const>, typename result_of::as_arg<A const>::type> > const
operator =(A const &a) const
{
- proto::expr<tag::assign, args2<ref_<expr const>, typename result_of::as_arg<A const>::type> > that = {{*this}, proto::as_arg(a)};
+ proto::expr<proto::tag::assign, args2<ref_<expr const>, typename result_of::as_arg<A const>::type> > that = {{*this}, proto::as_arg(a)};
return that;
}
@@ -276,20 +281,20 @@
/// \overload
///
template<typename A>
- proto::expr<tag::assign, args2<ref_<expr>, typename result_of::as_arg<A>::type> > const
+ proto::expr<proto::tag::assign, args2<ref_<expr>, typename result_of::as_arg<A>::type> > const
operator =(A &a)
{
- proto::expr<tag::assign, args2<ref_<expr>, typename result_of::as_arg<A>::type> > that = {{*this}, proto::as_arg(a)};
+ proto::expr<proto::tag::assign, args2<ref_<expr>, typename result_of::as_arg<A>::type> > that = {{*this}, proto::as_arg(a)};
return that;
}
/// \overload
///
template<typename A>
- proto::expr<tag::assign, args2<ref_<expr>, typename result_of::as_arg<A const>::type> > const
+ proto::expr<proto::tag::assign, args2<ref_<expr>, typename result_of::as_arg<A const>::type> > const
operator =(A const &a)
{
- proto::expr<tag::assign, args2<ref_<expr>, typename result_of::as_arg<A const>::type> > that = {{*this}, proto::as_arg(a)};
+ proto::expr<proto::tag::assign, args2<ref_<expr>, typename result_of::as_arg<A const>::type> > that = {{*this}, proto::as_arg(a)};
return that;
}
#endif
@@ -299,20 +304,20 @@
/// \param a The rhs.
/// \return A new \c expr\<\> node representing \c *this subscripted with \c a.
template<typename A>
- proto::expr<tag::subscript, args2<ref_<expr const>, typename result_of::as_arg<A>::type> > const
+ proto::expr<proto::tag::subscript, args2<ref_<expr const>, typename result_of::as_arg<A>::type> > const
operator [](A &a) const
{
- proto::expr<tag::subscript, args2<ref_<expr const>, typename result_of::as_arg<A>::type> > that = {{*this}, proto::as_arg(a)};
+ proto::expr<proto::tag::subscript, args2<ref_<expr const>, typename result_of::as_arg<A>::type> > that = {{*this}, proto::as_arg(a)};
return that;
}
/// \overload
///
template<typename A>
- proto::expr<tag::subscript, args2<ref_<expr const>, typename result_of::as_arg<A const>::type> > const
+ proto::expr<proto::tag::subscript, args2<ref_<expr const>, typename result_of::as_arg<A const>::type> > const
operator [](A const &a) const
{
- proto::expr<tag::subscript, args2<ref_<expr const>, typename result_of::as_arg<A const>::type> > that = {{*this}, proto::as_arg(a)};
+ proto::expr<proto::tag::subscript, args2<ref_<expr const>, typename result_of::as_arg<A const>::type> > that = {{*this}, proto::as_arg(a)};
return that;
}
@@ -320,20 +325,20 @@
/// \overload
///
template<typename A>
- proto::expr<tag::subscript, args2<ref_<expr>, typename result_of::as_arg<A>::type> > const
+ proto::expr<proto::tag::subscript, args2<ref_<expr>, typename result_of::as_arg<A>::type> > const
operator [](A &a)
{
- proto::expr<tag::subscript, args2<ref_<expr>, typename result_of::as_arg<A>::type> > that = {{*this}, proto::as_arg(a)};
+ proto::expr<proto::tag::subscript, args2<ref_<expr>, typename result_of::as_arg<A>::type> > that = {{*this}, proto::as_arg(a)};
return that;
}
/// \overload
///
template<typename A>
- proto::expr<tag::subscript, args2<ref_<expr>, typename result_of::as_arg<A const>::type> > const
+ proto::expr<proto::tag::subscript, args2<ref_<expr>, typename result_of::as_arg<A const>::type> > const
operator [](A const &a)
{
- proto::expr<tag::subscript, args2<ref_<expr>, typename result_of::as_arg<A const>::type> > that = {{*this}, proto::as_arg(a)};
+ proto::expr<proto::tag::subscript, args2<ref_<expr>, typename result_of::as_arg<A const>::type> > that = {{*this}, proto::as_arg(a)};
return that;
}
#endif
@@ -349,20 +354,20 @@
/// Function call
///
/// \return A new \c expr\<\> node representing the function invocation of \c (*this)().
- proto::expr<tag::function, args1<ref_<expr const> > > const
+ proto::expr<proto::tag::function, args1<ref_<expr const> > > const
operator ()() const
{
- proto::expr<tag::function, args1<ref_<expr const> > > that = {{*this}};
+ proto::expr<proto::tag::function, args1<ref_<expr const> > > that = {{*this}};
return that;
}
#if IS_TERMINAL
/// \overload
///
- proto::expr<tag::function, args1<ref_<expr> > > const
+ proto::expr<proto::tag::function, args1<ref_<expr> > > const
operator ()()
{
- proto::expr<tag::function, args1<ref_<expr> > > that = {{*this}};
+ proto::expr<proto::tag::function, args1<ref_<expr> > > that = {{*this}};
return that;
}
#endif
Modified: branches/fix-links/boost/xpressive/proto/extends.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/extends.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/extends.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file extends.hpp
/// Macros and a base class for defining end-user expression types
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -48,175 +48,266 @@
/// INTERNAL ONLY
///
- #define BOOST_PROTO_DEFINE_FUN_OP_IMPL_(Z, N, Data, Const)\
- BOOST_PP_IF(N, BOOST_PROTO_TEMPLATE_YES_, BOOST_PROTO_TEMPLATE_NO_)(Z, N)\
- typename boost::mpl::apply_wrap1<\
- BOOST_PP_TUPLE_ELEM(3, 2, Data)\
- , typename boost::proto::result_of::BOOST_PP_CAT(funop, N)<\
- BOOST_PP_TUPLE_ELEM(3, 1, Data) BOOST_PROTO_CONST ## Const\
- BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, const A)\
- >::type\
- >::type const\
- operator ()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, const &a)) BOOST_PROTO_CONST ## Const\
- {\
- typedef boost::proto::result_of::BOOST_PP_CAT(funop, N)<\
- BOOST_PP_TUPLE_ELEM(3, 1, Data) BOOST_PROTO_CONST ## Const\
- BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, const A)\
- > funop;\
- return BOOST_PP_TUPLE_ELEM(3, 2, Data)::make(\
- funop::call(*static_cast<BOOST_PP_TUPLE_ELEM(3, 1, Data) BOOST_PROTO_CONST ## Const *>(this) BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, a))\
- );\
- }\
+ #define BOOST_PROTO_DEFINE_FUN_OP_IMPL_(Z, N, Data, Const) \
+ BOOST_PP_IF(N, BOOST_PROTO_TEMPLATE_YES_, BOOST_PROTO_TEMPLATE_NO_)(Z, N) \
+ typename boost::mpl::apply_wrap1< \
+ BOOST_PP_TUPLE_ELEM(3, 2, Data) \
+ , typename boost::proto::result_of::BOOST_PP_CAT(funop, N)< \
+ BOOST_PP_TUPLE_ELEM(3, 1, Data) BOOST_PROTO_CONST ## Const \
+ BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, const A) \
+ >::type \
+ >::type const \
+ operator ()(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, const &a)) BOOST_PROTO_CONST ## Const \
+ { \
+ typedef boost::proto::result_of::BOOST_PP_CAT(funop, N)< \
+ BOOST_PP_TUPLE_ELEM(3, 1, Data) BOOST_PROTO_CONST ## Const \
+ BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, const A) \
+ > funop; \
+ return BOOST_PP_TUPLE_ELEM(3, 2, Data)::make( \
+ funop::call( \
+ *static_cast<BOOST_PP_TUPLE_ELEM(3, 1, Data) BOOST_PROTO_CONST ## Const *>(this)\
+ BOOST_PP_ENUM_TRAILING_PARAMS_Z(Z, N, a) \
+ ) \
+ ); \
+ } \
/**/
/// INTERNAL ONLY
///
- #define BOOST_PROTO_DEFINE_FUN_OP_CONST(Z, N, Data)\
+ #define BOOST_PROTO_DEFINE_FUN_OP_CONST(Z, N, Data) \
BOOST_PROTO_DEFINE_FUN_OP_IMPL_(Z, N, Data, 1)
/// INTERNAL ONLY
///
- #define BOOST_PROTO_DEFINE_FUN_OP_NON_CONST(Z, N, Data)\
+ #define BOOST_PROTO_DEFINE_FUN_OP_NON_CONST(Z, N, Data) \
BOOST_PROTO_DEFINE_FUN_OP_IMPL_(Z, N, Data, 0)
/// INTERNAL ONLY
///
- #define BOOST_PROTO_DEFINE_FUN_OP(Z, N, Data)\
- BOOST_PROTO_DEFINE_FUN_OP_CONST(Z, N, Data)\
- BOOST_PROTO_DEFINE_FUN_OP_NON_CONST(Z, N, Data)\
+ #define BOOST_PROTO_DEFINE_FUN_OP(Z, N, Data) \
+ BOOST_PROTO_DEFINE_FUN_OP_CONST(Z, N, Data) \
+ BOOST_PROTO_DEFINE_FUN_OP_NON_CONST(Z, N, Data) \
/**/
/// INTERNAL ONLY
///
- #define BOOST_PROTO_EXTENDS_ARG(z, n, Expr)\
- typedef\
- typename Expr::BOOST_PP_CAT(proto_arg, n)\
- BOOST_PP_CAT(proto_arg, n);\
- /**/
-
- #define BOOST_PROTO_EXTENDS(Expr, Derived, Domain)\
- Expr expr;\
- \
- typedef Expr proto_base_expr;\
- typedef Domain proto_domain;\
- typedef Derived proto_derived_expr;\
- typedef typename Expr::proto_tag proto_tag;\
- typedef typename Expr::proto_args proto_args;\
- typedef typename Expr::proto_arity proto_arity;\
- typedef void proto_is_expr_;\
- typedef boost::proto::tag::proto_expr fusion_tag;\
- \
- BOOST_PROTO_IDENTITY_TRANSFORM();\
- BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, BOOST_PROTO_EXTENDS_ARG, Expr)\
- \
- static Derived const make(Expr const &expr)\
- {\
- Derived that = {expr};\
- return that;\
- }\
- \
- Expr &proto_base()\
- {\
- return this->expr;\
- }\
- \
- Expr const &proto_base() const\
- {\
- return this->expr;\
- }\
+ #define BOOST_PROTO_EXTENDS_ARG(z, n, Expr) \
+ typedef \
+ typename Expr::BOOST_PP_CAT(proto_arg, n) \
+ BOOST_PP_CAT(proto_arg, n); \
+ /**/
+
+ #define BOOST_PROTO_EXTENDS(Expr, Derived, Domain) \
+ Expr expr; \
+ \
+ typedef Expr proto_base_expr; \
+ typedef Domain proto_domain; \
+ typedef Derived proto_derived_expr; \
+ typedef typename Expr::proto_tag proto_tag; \
+ typedef typename Expr::proto_args proto_args; \
+ typedef typename Expr::proto_arity proto_arity; \
+ typedef void proto_is_expr_; \
+ BOOST_PROTO_DEFINE_FUSION_TAG(boost::proto::tag::proto_expr) \
+ BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, BOOST_PROTO_EXTENDS_ARG, Expr) \
+ \
+ static Derived const make(Expr const &expr) \
+ { \
+ Derived that = {expr}; \
+ return that; \
+ } \
+ \
+ Expr &proto_base() \
+ { \
+ return this->expr; \
+ } \
+ \
+ Expr const &proto_base() const \
+ { \
+ return this->expr; \
+ } \
/**/
/// INTERNAL ONLY
///
- #define BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(Expr, Derived, Domain, Const)\
- template<typename A>\
- typename boost::mpl::apply_wrap1<Domain, boost::proto::expr<boost::proto::tag::assign, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A>::type> > >::type const\
- operator =(A &a) BOOST_PROTO_CONST ## Const\
- {\
- typedef boost::proto::expr<boost::proto::tag::assign, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A>::type> > that_type;\
- that_type that = {{*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)}, boost::proto::as_arg(a)};\
- return Domain::make(that);\
- }\
- \
- template<typename A>\
- typename boost::mpl::apply_wrap1<Domain, boost::proto::expr<boost::proto::tag::assign, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A const>::type> > >::type const\
- operator =(A const &a) BOOST_PROTO_CONST ## Const\
- {\
- typedef boost::proto::expr<boost::proto::tag::assign, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A const>::type> > that_type;\
- that_type that = {{*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)}, boost::proto::as_arg(a)};\
- return Domain::make(that);\
- }\
+ #define BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(Expr, Derived, Domain, Const) \
+ template<typename A> \
+ typename boost::mpl::apply_wrap1< \
+ Domain \
+ , boost::proto::expr< \
+ boost::proto::tag::assign \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A>::type \
+ > \
+ > \
+ >::type const \
+ operator =(A &a) BOOST_PROTO_CONST ## Const \
+ { \
+ typedef boost::proto::expr< \
+ boost::proto::tag::assign \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A>::type \
+ > \
+ > that_type; \
+ that_type that = { \
+ {*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)} \
+ , boost::proto::as_arg(a) \
+ }; \
+ return Domain::make(that); \
+ } \
+ \
+ template<typename A> \
+ typename boost::mpl::apply_wrap1< \
+ Domain \
+ , boost::proto::expr< \
+ boost::proto::tag::assign \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A const>::type \
+ > \
+ > \
+ >::type const \
+ operator =(A const &a) BOOST_PROTO_CONST ## Const \
+ { \
+ typedef boost::proto::expr< \
+ boost::proto::tag::assign \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A const>::type \
+ > \
+ > that_type; \
+ that_type that = { \
+ {*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)} \
+ , boost::proto::as_arg(a) \
+ }; \
+ return Domain::make(that); \
+ } \
/**/
- #define BOOST_PROTO_EXTENDS_ASSIGN_CONST(Expr, Derived, Domain)\
+ #define BOOST_PROTO_EXTENDS_ASSIGN_CONST(Expr, Derived, Domain) \
BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(Expr, Derived, Domain, 1)
- #define BOOST_PROTO_EXTENDS_ASSIGN_NON_CONST(Expr, Derived, Domain)\
+ #define BOOST_PROTO_EXTENDS_ASSIGN_NON_CONST(Expr, Derived, Domain) \
BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(Expr, Derived, Domain, 0)
- #define BOOST_PROTO_EXTENDS_ASSIGN(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_ASSIGN_CONST(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_ASSIGN_NON_CONST(Expr, Derived, Domain)\
+ #define BOOST_PROTO_EXTENDS_ASSIGN(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_ASSIGN_CONST(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_ASSIGN_NON_CONST(Expr, Derived, Domain) \
/**/
/// INTERNAL ONLY
///
- #define BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(Expr, Derived, Domain, Const)\
- template<typename A>\
- typename boost::mpl::apply_wrap1<Domain, boost::proto::expr<boost::proto::tag::subscript, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A>::type> > >::type const\
- operator [](A &a) BOOST_PROTO_CONST ## Const\
- {\
- typedef boost::proto::expr<boost::proto::tag::subscript, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A>::type> > that_type;\
- that_type that = {{*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)}, boost::proto::as_arg(a)};\
- return Domain::make(that);\
- }\
- \
- template<typename A>\
- typename boost::mpl::apply_wrap1<Domain, boost::proto::expr<boost::proto::tag::subscript, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A const>::type> > >::type const\
- operator [](A const &a) BOOST_PROTO_CONST ## Const\
- {\
- typedef boost::proto::expr<boost::proto::tag::subscript, boost::proto::args2<boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const>, typename boost::proto::result_of::as_arg<A const>::type> > that_type;\
- that_type that = {{*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)}, boost::proto::as_arg(a)};\
- return Domain::make(that);\
- }\
+ #define BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(Expr, Derived, Domain, Const) \
+ template<typename A> \
+ typename boost::mpl::apply_wrap1< \
+ Domain \
+ , boost::proto::expr< \
+ boost::proto::tag::subscript \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A>::type \
+ > \
+ > \
+ >::type const \
+ operator [](A &a) BOOST_PROTO_CONST ## Const \
+ { \
+ typedef boost::proto::expr< \
+ boost::proto::tag::subscript \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A>::type \
+ > \
+ > that_type; \
+ that_type that = { \
+ {*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)} \
+ , boost::proto::as_arg(a) \
+ }; \
+ return Domain::make(that); \
+ } \
+ \
+ template<typename A> \
+ typename boost::mpl::apply_wrap1< \
+ Domain \
+ , boost::proto::expr< \
+ boost::proto::tag::subscript \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A const>::type \
+ > \
+ > \
+ >::type const \
+ operator [](A const &a) BOOST_PROTO_CONST ## Const \
+ { \
+ typedef boost::proto::expr< \
+ boost::proto::tag::subscript \
+ , boost::proto::args2< \
+ boost::proto::ref_<Derived BOOST_PROTO_CONST ## Const> \
+ , typename boost::proto::result_of::as_arg<A const>::type \
+ > \
+ > that_type; \
+ that_type that = { \
+ {*static_cast<Derived BOOST_PROTO_CONST ## Const *>(this)} \
+ , boost::proto::as_arg(a) \
+ }; \
+ return Domain::make(that); \
+ } \
/**/
- #define BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST(Expr, Derived, Domain)\
+ #define BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST(Expr, Derived, Domain) \
BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(Expr, Derived, Domain, 1)
- #define BOOST_PROTO_EXTENDS_SUBSCRIPT_NON_CONST(Expr, Derived, Domain)\
+ #define BOOST_PROTO_EXTENDS_SUBSCRIPT_NON_CONST(Expr, Derived, Domain) \
BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(Expr, Derived, Domain, 0)
- #define BOOST_PROTO_EXTENDS_SUBSCRIPT(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_SUBSCRIPT_NON_CONST(Expr, Derived, Domain)\
+ #define BOOST_PROTO_EXTENDS_SUBSCRIPT(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_SUBSCRIPT_NON_CONST(Expr, Derived, Domain) \
/**/
/// INTERNAL ONLY
///
- #define BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain)\
- template<typename Sig>\
- struct result\
- {\
- typedef\
- typename boost::mpl::apply_wrap1<Domain, typename boost::proto::result_of::funop<Sig, Derived >::type>::type\
- type;\
- };\
- /**/
-
- #define BOOST_PROTO_EXTENDS_FUNCTION_CONST(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain)\
- BOOST_PP_REPEAT_FROM_TO(0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY), BOOST_PROTO_DEFINE_FUN_OP_CONST, (Expr, Derived, Domain))\
- /**/
-
- #define BOOST_PROTO_EXTENDS_FUNCTION_NON_CONST(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain)\
- BOOST_PP_REPEAT_FROM_TO(0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY), BOOST_PROTO_DEFINE_FUN_OP_NON_CONST, (Expr, Derived, Domain))\
- /**/
-
- #define BOOST_PROTO_EXTENDS_FUNCTION(Expr, Derived, Domain)\
- BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain)\
- BOOST_PP_REPEAT_FROM_TO(0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY), BOOST_PROTO_DEFINE_FUN_OP, (Expr, Derived, Domain))\
+ #define BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain) \
+ template<typename Sig> \
+ struct result \
+ { \
+ typedef \
+ typename boost::mpl::apply_wrap1< \
+ Domain \
+ , typename boost::proto::result_of::funop<Sig, Derived >::type \
+ >::type \
+ type; \
+ }; \
+ /**/
+
+ #define BOOST_PROTO_EXTENDS_FUNCTION_CONST(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain) \
+ BOOST_PP_REPEAT_FROM_TO( \
+ 0 \
+ , BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY) \
+ , BOOST_PROTO_DEFINE_FUN_OP_CONST \
+ , (Expr, Derived, Domain) \
+ ) \
+ /**/
+
+ #define BOOST_PROTO_EXTENDS_FUNCTION_NON_CONST(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain) \
+ BOOST_PP_REPEAT_FROM_TO( \
+ 0 \
+ , BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY) \
+ , BOOST_PROTO_DEFINE_FUN_OP_NON_CONST \
+ , (Expr, Derived, Domain) \
+ ) \
+ /**/
+
+ #define BOOST_PROTO_EXTENDS_FUNCTION(Expr, Derived, Domain) \
+ BOOST_PROTO_EXTENDS_FUNCTION_(Expr, Derived, Domain) \
+ BOOST_PP_REPEAT_FROM_TO( \
+ 0 \
+ , BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY) \
+ , BOOST_PROTO_DEFINE_FUN_OP \
+ , (Expr, Derived, Domain) \
+ ) \
/**/
namespace exprns_
@@ -249,7 +340,7 @@
struct is_proto_expr
{};
- /// \brief extends\<\> class template for adding behaviors to a proto expression template
+ /// \brief extends\<\> class template for adding behaviors to a Proto expression template
///
template<typename Expr, typename Derived, typename Domain, typename Tag>
struct extends
@@ -277,8 +368,8 @@
/// INTERNAL ONLY
///
- #define BOOST_PP_LOCAL_MACRO(N) \
- BOOST_PROTO_DEFINE_FUN_OP_CONST(1, N, (Expr, Derived, Domain))\
+ #define BOOST_PP_LOCAL_MACRO(N) \
+ BOOST_PROTO_DEFINE_FUN_OP_CONST(1, N, (Expr, Derived, Domain)) \
/**/
/// INTERNAL ONLY
@@ -287,7 +378,7 @@
#include BOOST_PP_LOCAL_ITERATE()
};
- /// \brief extends\<\> class template for adding behaviors to a proto expression template
+ /// \brief extends\<\> class template for adding behaviors to a Proto expression template
///
template<typename Expr, typename Derived, typename Domain>
struct extends<Expr, Derived, Domain, tag::terminal>
@@ -315,8 +406,8 @@
/// INTERNAL ONLY
///
- #define BOOST_PP_LOCAL_MACRO(N) \
- BOOST_PROTO_DEFINE_FUN_OP(1, N, (Expr, Derived, Domain))\
+ #define BOOST_PP_LOCAL_MACRO(N) \
+ BOOST_PROTO_DEFINE_FUN_OP(1, N, (Expr, Derived, Domain)) \
/**/
/// INTERNAL ONLY
Modified: branches/fix-links/boost/xpressive/proto/fusion.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/fusion.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/fusion.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file fusion.hpp
/// Make any Proto expression a valid Fusion sequence
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -10,8 +10,10 @@
#define BOOST_PROTO_FUSION_HPP_EAN_11_04_2006
#include <boost/xpressive/proto/detail/prefix.hpp>
+#include <boost/version.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/mpl/long.hpp>
+#if BOOST_VERSION >= 103500
#include <boost/fusion/include/is_view.hpp>
#include <boost/fusion/include/tag_of_fwd.hpp>
#include <boost/fusion/include/category_of.hpp>
@@ -25,6 +27,17 @@
#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/size_s.hpp>
#include <boost/fusion/view/ext_/segmented_iterator.hpp>
+#else
+#include <boost/spirit/fusion/sequence/is_sequence.hpp>
+#include <boost/spirit/fusion/sequence/begin.hpp>
+#include <boost/spirit/fusion/sequence/end.hpp>
+#include <boost/spirit/fusion/sequence/at.hpp>
+#include <boost/spirit/fusion/sequence/value_at.hpp>
+#include <boost/spirit/fusion/sequence/single_view.hpp>
+#include <boost/spirit/fusion/sequence/transform_view.hpp>
+#include <boost/xpressive/proto/detail/reverse.hpp>
+#include <boost/xpressive/proto/detail/pop_front.hpp>
+#endif
#include <boost/xpressive/proto/proto_fwd.hpp>
#include <boost/xpressive/proto/traits.hpp>
#include <boost/xpressive/proto/eval.hpp>
@@ -33,7 +46,7 @@
namespace boost { namespace proto
{
-/// INTERNAL MACRO
+/// INTERNAL ONLY
///
#define UNREF(x) typename boost::remove_reference<x>::type
@@ -45,9 +58,9 @@
: fusion::iterator_base<expr_iterator<Expr, Pos> >
{
typedef Expr expr_type;
- static long const index = Pos;
- typedef fusion::random_access_traversal_tag category;
- typedef tag::proto_expr_iterator fusion_tag;
+ BOOST_STATIC_CONSTANT(long, index = Pos);
+ BOOST_PROTO_DEFINE_FUSION_CATEGORY(fusion::random_access_traversal_tag)
+ BOOST_PROTO_DEFINE_FUSION_TAG(tag::proto_expr_iterator)
expr_iterator(Expr const &e)
: expr(e)
@@ -56,81 +69,151 @@
Expr const &expr;
};
- }
+ template<typename Expr>
+ struct flat_view
+ {
+ typedef Expr expr_type;
+ typedef typename Expr::proto_tag proto_tag;
+ BOOST_PROTO_DEFINE_FUSION_CATEGORY(fusion::forward_traversal_tag)
+ BOOST_PROTO_DEFINE_FUSION_TAG(tag::proto_flat_view)
- template<typename Expr>
- struct flat_view
- {
- typedef Expr expr_type;
- typedef typename Expr::proto_tag proto_tag;
- typedef fusion::forward_traversal_tag category;
- typedef tag::proto_flat_view fusion_tag;
+ explicit flat_view(Expr &expr)
+ : expr_(expr)
+ {}
- explicit flat_view(Expr &expr)
- : expr_(expr)
- {}
+ Expr &expr_;
+ };
- Expr &expr_;
- };
+ template<typename Tag>
+ struct as_element
+ {
+ template<typename Sig>
+ struct result {};
+
+ template<typename This, typename Expr>
+ struct result<This(Expr)>
+ : mpl::if_<
+ is_same<Tag, UNREF(Expr)::proto_tag>
+ , flat_view<UNREF(Expr) const>
+ , fusion::single_view<UNREF(Expr) const &>
+ >
+ {};
+
+ template<typename Expr>
+ typename result<as_element(Expr const &)>::type
+ operator ()(Expr const &expr) const
+ {
+ return typename result<as_element(Expr const &)>::type(expr);
+ }
+ };
+
+ }
namespace functional
{
+ /// \brief A PolymorphicFunctionObject type that returns a "flattened"
+ /// view of a Proto expression tree.
+ ///
+ /// A PolymorphicFunctionObject type that returns a "flattened"
+ /// view of a Proto expression tree. For a tree with a top-most node
+ /// tag of type \c T, the elements of the flattened sequence are
+ /// determined by recursing into each child node with the same
+ /// tag type and returning those nodes of different type. So for
+ /// instance, the Proto expression tree corresponding to the
+ /// expression <tt>a | b | c</tt> has a flattened view with elements
+ /// [a, b, c], even though the tree is grouped as
+ /// <tt>((a | b) | c)</tt>.
struct flatten
{
+ BOOST_PROTO_CALLABLE()
+
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
{
- typedef flat_view<UNREF(Expr) const> type;
+ typedef proto::detail::flat_view<UNREF(Expr) const> type;
};
template<typename Expr>
- flat_view<Expr const> operator ()(Expr const &expr) const
+ proto::detail::flat_view<Expr const> operator ()(Expr const &expr) const
{
- return flat_view<Expr const>(expr);
+ return proto::detail::flat_view<Expr const>(expr);
}
};
+ /// \brief A PolymorphicFunctionObject type that invokes the
+ /// \c fusion::pop_front() algorithm on its argument.
+ ///
+ /// A PolymorphicFunctionObject type that invokes the
+ /// \c fusion::pop_front() algorithm on its argument. This is
+ /// useful for defining a CallableTransform like \c pop_front(_)
+ /// which removes the first child from a Proto expression node.
+ /// Such a transform might be used as the first argument to the
+ /// \c proto::transform::fold\<\> transform; that is, fold all but
+ /// the first child.
struct pop_front
{
+ BOOST_PROTO_CALLABLE()
+
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
- : fusion::result_of::pop_front<UNREF(Expr) const>
- {};
+ {
+ typedef
+ typename fusion::BOOST_PROTO_FUSION_RESULT_OF::pop_front<UNREF(Expr) const>::type
+ type;
+ };
template<typename Expr>
- typename fusion::result_of::pop_front<Expr const>::type
+ typename fusion::BOOST_PROTO_FUSION_RESULT_OF::pop_front<Expr const>::type
operator ()(Expr const &expr) const
{
return fusion::pop_front(expr);
}
};
+ /// \brief A PolymorphicFunctionObject type that invokes the
+ /// \c fusion::reverse() algorithm on its argument.
+ ///
+ /// A PolymorphicFunctionObject type that invokes the
+ /// \c fusion::reverse() algorithm on its argument. This is
+ /// useful for defining a CallableTransform like \c reverse(_)
+ /// which reverses the order of the children of a Proto
+ /// expression node.
struct reverse
{
+ BOOST_PROTO_CALLABLE()
+
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
- : fusion::result_of::reverse<UNREF(Expr) const>
- {};
+ {
+ typedef
+ typename fusion::BOOST_PROTO_FUSION_RESULT_OF::reverse<UNREF(Expr) const>::type
+ type;
+ };
template<typename Expr>
- typename fusion::result_of::reverse<Expr const>::type
+ typename fusion::BOOST_PROTO_FUSION_RESULT_OF::reverse<Expr const>::type
operator ()(Expr const &expr) const
{
return fusion::reverse(expr);
}
};
-
}
+ /// \brief A PolymorphicFunctionObject type that returns a "flattened"
+ /// view of a Proto expression tree.
+ ///
+ /// \sa boost::proto::functional::flatten
+ functional::flatten const flatten = {};
+
template<>
struct is_callable<functional::flatten>
: mpl::true_
@@ -146,8 +229,8 @@
: mpl::true_
{};
- functional::flatten const flatten = {};
-
+ /// INTERNAL ONLY
+ ///
template<typename Context>
struct eval_fun
{
@@ -156,12 +239,15 @@
{}
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
- : proto::result_of::eval<UNREF(Expr), Context>
- {};
+ {
+ typedef
+ typename proto::result_of::eval<UNREF(Expr), Context>::type
+ type;
+ };
template<typename Expr>
typename proto::result_of::eval<Expr, Context>::type
@@ -175,10 +261,26 @@
};
}}
+// Don't bother emitting all this into the Doxygen-generated
+// reference section. It's enough to say that Proto expressions
+// are valid Fusion sequence without showing all this gunk.
+#ifndef BOOST_PROTO_DOXYGEN_INVOKED
+
namespace boost { namespace fusion
{
+ #if BOOST_VERSION < 103500
+ template<typename Tag, typename Args, long Arity>
+ struct is_sequence<proto::expr<Tag, Args, Arity> >
+ : mpl::true_
+ {};
- namespace extension
+ template<typename Tag, typename Args, long Arity>
+ struct is_sequence<proto::expr<Tag, Args, Arity> const>
+ : mpl::true_
+ {};
+ #endif
+
+ namespace BOOST_PROTO_FUSION_EXTENSION
{
template<typename Tag>
@@ -208,15 +310,41 @@
template<>
struct value_of_impl<proto::tag::proto_expr_iterator>
{
- template<typename Iterator>
- struct apply
- : proto::result_of::arg_c<
+ template<
+ typename Iterator
+ , typename Value = typename proto::result_of::arg_c<
typename Iterator::expr_type
, Iterator::index
- >
- {};
+ >::wrapped_type
+ >
+ struct apply
+ {
+ typedef Value type;
+ };
+
+ template<typename Iterator, typename Expr>
+ struct apply<Iterator, proto::ref_<Expr> >
+ {
+ typedef Expr &type;
+ };
+
+ template<typename Iterator, typename Expr>
+ struct apply<Iterator, Expr &>
+ {
+ typedef Expr &type;
+ };
};
+ #if BOOST_VERSION < 103500
+ template<typename Tag>
+ struct value_impl;
+
+ template<>
+ struct value_impl<proto::tag::proto_expr_iterator>
+ : value_of_impl<proto::tag::proto_expr_iterator>
+ {};
+ #endif
+
template<typename Tag>
struct deref_impl;
@@ -299,6 +427,7 @@
{};
};
+ #if BOOST_VERSION >= 103500
template<typename Tag>
struct category_of_impl;
@@ -311,6 +440,7 @@
typedef random_access_traversal_tag type;
};
};
+ #endif
template<typename Tag>
struct size_impl;
@@ -371,10 +501,30 @@
template<>
struct value_at_impl<proto::tag::proto_expr>
{
- template<typename Sequence, typename Index>
+ template<
+ typename Sequence
+ , typename Index
+ , typename Value = typename proto::result_of::arg_c<
+ Sequence
+ , Index::value
+ >::wrapped_type
+ >
struct apply
- : proto::result_of::arg_c<Sequence, Index::value>
- {};
+ {
+ typedef Value type;
+ };
+
+ template<typename Sequence, typename Index, typename Expr>
+ struct apply<Sequence, Index, proto::ref_<Expr> >
+ {
+ typedef Expr &type;
+ };
+
+ template<typename Sequence, typename Index, typename Expr>
+ struct apply<Sequence, Index, Expr &>
+ {
+ typedef Expr &type;
+ };
};
template<typename Tag>
@@ -386,7 +536,12 @@
template<typename Sequence, typename Index>
struct apply
{
- typedef typename proto::result_of::arg_c<Sequence, Index::value>::type const &type;
+ typedef
+ typename proto::result_of::arg_c<
+ Sequence
+ , Index::value
+ >::const_reference
+ type;
static type call(Sequence &seq)
{
@@ -395,6 +550,7 @@
};
};
+ #if BOOST_VERSION >= 103500
template<typename Tag>
struct is_segmented_impl;
@@ -408,29 +564,6 @@
};
template<typename Tag>
- struct as_element
- {
- template<typename Sig>
- struct result;
-
- template<typename This, typename Expr>
- struct result<This(Expr)>
- : mpl::if_<
- is_same<Tag, UNREF(Expr)::proto_tag>
- , proto::flat_view<UNREF(Expr) const>
- , fusion::single_view<UNREF(Expr) const &>
- >
- {};
-
- template<typename Expr>
- typename result<as_element(Expr const &)>::type
- operator ()(Expr const &expr) const
- {
- return typename result<as_element(Expr const &)>::type(expr);
- }
- };
-
- template<typename Tag>
struct segments_impl;
template<>
@@ -443,12 +576,12 @@
typedef fusion::transform_view<
typename Sequence::expr_type
- , as_element<proto_tag>
+ , proto::detail::as_element<proto_tag>
> type;
static type call(Sequence &sequence)
{
- return type(sequence.expr_, as_element<proto_tag>());
+ return type(sequence.expr_, proto::detail::as_element<proto_tag>());
}
};
};
@@ -489,11 +622,14 @@
: fusion::segmented_size<Sequence>
{};
};
+ #endif
}
}}
+#endif // BOOST_PROTO_DOXYGEN_INVOKED
+
#undef UNREF
#endif
Modified: branches/fix-links/boost/xpressive/proto/generate.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/generate.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/generate.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -4,7 +4,7 @@
/// Contains definition of generate\<\> class template, which end users can
/// specialize for generating domain-specific expression wrappers.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -29,7 +29,7 @@
template<typename Domain, typename Expr>
struct generate_if
: lazy_enable_if<
- matches<Expr, typename Domain::grammar>
+ matches<Expr, typename Domain::proto_grammar>
, typename Domain::template apply<Expr>
>
{};
@@ -42,36 +42,21 @@
};
template<typename Expr>
- struct arity_;
+ struct expr_traits;
template<typename Tag, typename Args, long N>
- struct arity_<proto::expr<Tag, Args, N> >
- : mpl::long_<N>
- {};
-
- template<typename Expr>
- struct tag_;
-
- template<typename Tag, typename Args, long N>
- struct tag_<proto::expr<Tag, Args, N> >
- {
- typedef Tag type;
- };
-
- template<typename Expr>
- struct args_;
-
- template<typename Tag, typename Args, long N>
- struct args_<proto::expr<Tag, Args, N> >
+ struct expr_traits<proto::expr<Tag, Args, N> >
{
- typedef Args type;
+ typedef Tag tag;
+ typedef Args args;
+ BOOST_STATIC_CONSTANT(long, arity = N);
};
- template<typename Expr, long Arity = detail::arity_<Expr>::value>
+ template<typename Expr, long Arity = expr_traits<Expr>::arity>
struct by_value_generator_;
#define BOOST_PROTO_DEFINE_BY_VALUE_TYPE(Z, N, Expr)\
- typename result_of::unref<typename args_<Expr>::type::BOOST_PP_CAT(arg, N) >::type
+ typename result_of::unref<typename expr_traits<Expr>::args::BOOST_PP_CAT(arg, N) >::type
#define BOOST_PROTO_DEFINE_BY_VALUE(Z, N, expr)\
proto::unref(expr.BOOST_PP_CAT(arg, N))
@@ -86,6 +71,14 @@
namespace generatorns_
{
+ /// \brief A simple generator that passes an expression
+ /// through unchanged.
+ ///
+ /// Generators are intended for use as the first template parameter
+ /// to the \c domain\<\> class template and control if and how
+ /// expressions within that domain are to be customized.
+ /// The \c default_generator makes no modifications to the expressions
+ /// passed to it.
struct default_generator
{
template<typename Expr>
@@ -94,6 +87,8 @@
typedef Expr type;
};
+ /// \param expr A Proto expression
+ /// \return expr
template<typename Expr>
static Expr const &make(Expr const &expr)
{
@@ -101,6 +96,14 @@
}
};
+ /// \brief A generator that wraps expressions passed
+ /// to it in the specified extension wrapper.
+ ///
+ /// Generators are intended for use as the first template parameter
+ /// to the \c domain\<\> class template and control if and how
+ /// expressions within that domain are to be customized.
+ /// \c generator\<\> wraps each expression passed to it in
+ /// the \c Extends\<\> wrapper.
template<template<typename> class Extends>
struct generator
{
@@ -110,6 +113,8 @@
typedef Extends<Expr> type;
};
+ /// \param expr A Proto expression
+ /// \return Extends<Expr>(expr)
template<typename Expr>
static Extends<Expr> make(Expr const &expr)
{
@@ -117,6 +122,16 @@
}
};
+ /// \brief A generator that wraps expressions passed
+ /// to it in the specified extension wrapper and uses
+ /// aggregate initialization for the wrapper.
+ ///
+ /// Generators are intended for use as the first template parameter
+ /// to the \c domain\<\> class template and control if and how
+ /// expressions within that domain are to be customized.
+ /// \c pod_generator\<\> wraps each expression passed to it in
+ /// the \c Extends\<\> wrapper, and uses aggregate initialzation
+ /// for the wrapped object.
template<template<typename> class Extends>
struct pod_generator
{
@@ -126,6 +141,8 @@
typedef Extends<Expr> type;
};
+ /// \param expr The expression to wrap
+ /// \return Extends<Expr> that = {expr}; return that;
template<typename Expr>
static Extends<Expr> make(Expr const &expr)
{
@@ -134,16 +151,32 @@
}
};
+ /// \brief A composite generator that first replaces
+ /// child nodes held by reference with ones held by value
+ /// and then forwards the result on to another generator.
+ ///
+ /// Generators are intended for use as the first template parameter
+ /// to the \c domain\<\> class template and control if and how
+ /// expressions within that domain are to be customized.
+ /// \c by_value_generator\<\> ensures all children nodes are
+ /// held by value before forwarding the expression on to
+ /// another generator for further processing. The \c Generator
+ /// parameter defaults to \c default_generator.
template<typename Generator>
struct by_value_generator
{
template<typename Expr>
struct apply
- : Generator::template apply<
- typename detail::by_value_generator_<Expr>::type
- >
- {};
+ {
+ typedef
+ typename Generator::template apply<
+ typename detail::by_value_generator_<Expr>::type
+ >::type
+ type;
+ };
+ /// \param expr The expression to modify.
+ /// \return Generator::make(deep_copy(expr))
template<typename Expr>
static typename apply<Expr>::type make(Expr const &expr)
{
@@ -164,9 +197,9 @@
struct by_value_generator_<Expr, N>
{
typedef proto::expr<
- typename tag_<Expr>::type
+ typename expr_traits<Expr>::tag
, BOOST_PP_CAT(args, N)<
- // typename result_of::unref<typename args_<Expr>::type::arg0>::type, ...
+ // typename result_of::unref<typename expr_traits<Expr>::args::arg0>::type, ...
BOOST_PP_ENUM(BOOST_PP_MAX(N, 1), BOOST_PROTO_DEFINE_BY_VALUE_TYPE, Expr)
>
> type;
Modified: branches/fix-links/boost/xpressive/proto/literal.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/literal.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/literal.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// The literal\<\> terminal wrapper, and the proto::lit() function for
/// creating literal\<\> wrappers.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -11,6 +11,7 @@
#define BOOST_PROTO_LITERAL_HPP_EAN_01_03_2007
#include <boost/xpressive/proto/detail/prefix.hpp>
+#include <boost/config.hpp>
#include <boost/xpressive/proto/proto_fwd.hpp>
#include <boost/xpressive/proto/expr.hpp>
#include <boost/xpressive/proto/traits.hpp>
@@ -21,13 +22,24 @@
{
namespace utility
{
+ /// \brief A simple wrapper for a terminal, provided for
+ /// ease of use.
+ ///
+ /// A simple wrapper for a terminal, provided for
+ /// ease of use. In all cases, <tt>literal\<X\> l(x);</tt>
+ /// is equivalent to <tt>terminal\<X\>::type l = {x};</tt>.
+ ///
+ /// The \c Domain template parameter defaults to
+ /// \c proto::default_domain.
template<typename T, typename Domain>
struct literal
: extends<typename terminal<T>::type, literal<T, Domain>, Domain>
{
+ private:
typedef typename terminal<T>::type terminal_type;
typedef extends<terminal_type, literal<T, Domain>, Domain> base_type;
+ public:
template<typename U>
literal(U &u)
: base_type(terminal_type::make(u))
@@ -47,8 +59,11 @@
};
}
- /// lit
- ///
+ /// \brief A helper function for creating a \c literal\<\> wrapper.
+ /// \param t The object to wrap.
+ /// \return literal\<T &\>(t)
+ /// \attention The returned value holds the argument by reference.
+ /// \throw nothrow
template<typename T>
inline literal<T &> lit(T &t)
{
@@ -60,14 +75,14 @@
template<typename T>
inline literal<T const &> lit(T const &t)
{
- #ifdef _MSC_VER
+ #ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable: 4180) // warning C4180: qualifier applied to function type has no meaning; ignored
#endif
return literal<T const &>(t);
- #ifdef _MSC_VER
+ #ifdef BOOST_MSVC
#pragma warning(pop)
#endif
}
Modified: branches/fix-links/boost/xpressive/proto/make_expr.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/make_expr.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/make_expr.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,10 +1,11 @@
#ifndef BOOST_PP_IS_ITERATING
///////////////////////////////////////////////////////////////////////////////
/// \file make_expr.hpp
- /// Given a Fusion sequence of arguments and the type of a proto Expression,
- /// unpacks the sequence into the Expression.
+ /// Definition of the \c make_expr() and \c unpack_expr() utilities for
+ /// building Proto expression nodes from children nodes or from a Fusion
+ /// sequence of children nodes, respectively.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -33,6 +34,7 @@
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+ #include <boost/preprocessor/repetition/enum_shifted_binary_params.hpp>
#include <boost/preprocessor/repetition/repeat.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/preprocessor/seq/size.hpp>
@@ -45,9 +47,12 @@
#include <boost/preprocessor/seq/push_front.hpp>
#include <boost/preprocessor/list/for_each_i.hpp>
#include <boost/ref.hpp>
+ #include <boost/mpl/if.hpp>
+ #include <boost/mpl/eval_if.hpp>
#include <boost/mpl/apply_wrap.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
+ #include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/xpressive/proto/proto_fwd.hpp>
@@ -58,79 +63,79 @@
# include <boost/fusion/include/at.hpp>
# include <boost/fusion/include/value_at.hpp>
# include <boost/fusion/include/size.hpp>
- namespace boost { namespace proto { namespace detail
- {
- namespace fusion_ = fusion;
- }}}
#else
# include <boost/spirit/fusion/sequence/at.hpp>
# include <boost/spirit/fusion/sequence/value_at.hpp>
# include <boost/spirit/fusion/sequence/size.hpp>
- namespace boost { namespace proto { namespace detail { namespace fusion_
- {
- namespace result_of = fusion::meta;
- template<int N, typename Seq>
- typename result_of::at_c<Seq, N>::type at_c(Seq &seq) { return fusion::at<N>(seq); }
- template<int N, typename Seq>
- typename result_of::at_c<Seq const, N>::type at_c(Seq const &seq) { return fusion::at<N>(seq); }
- }}}}
#endif
#include <boost/xpressive/proto/detail/suffix.hpp>
- namespace boost { namespace fusion
+ namespace boost
{
- template<typename Function>
- class unfused_generic;
- }}
+ /// INTERNAL ONLY
+ ///
+ namespace fusion
+ {
+ /// INTERNAL ONLY
+ ///
+ template<typename Function>
+ class unfused_generic;
+ }
+ }
namespace boost { namespace proto
{
/// INTERNAL ONLY
///
#define BOOST_PROTO_AS_ARG_TYPE(Z, N, DATA) \
- typename boost::proto::result_of::as_arg< \
- BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2, 0, DATA), N) \
- , BOOST_PP_TUPLE_ELEM(2, 1, DATA) \
+ typename boost::proto::detail::protoify_< \
+ BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(3, 0, DATA), N) \
+ , BOOST_PP_TUPLE_ELEM(3, 2, DATA) \
>::type \
/**/
/// INTERNAL ONLY
///
#define BOOST_PROTO_AS_ARG(Z, N, DATA) \
- boost::proto::as_arg<BOOST_PP_TUPLE_ELEM(2, 1, DATA) >( \
- BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(2, 0, DATA), N) \
- ) \
+ boost::proto::detail::protoify_< \
+ BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(3, 0, DATA), N) \
+ , BOOST_PP_TUPLE_ELEM(3, 2, DATA) \
+ >::call(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(3, 1, DATA), N)) \
/**/
/// INTERNAL ONLY
///
# define BOOST_PROTO_AT_TYPE(Z, N, DATA) \
- typename remove_reference< \
- typename detail::fusion_::result_of::value_at_c<BOOST_PP_TUPLE_ELEM(2, 0, DATA), N >::type \
+ typename add_const< \
+ typename fusion::BOOST_PROTO_FUSION_RESULT_OF::value_at_c< \
+ BOOST_PP_TUPLE_ELEM(3, 0, DATA) \
+ , N \
+ >::type \
>::type \
/**/
/// INTERNAL ONLY
///
# define BOOST_PROTO_AT(Z, N, DATA) \
- detail::fusion_::at_c<N >(BOOST_PP_TUPLE_ELEM(2, 0, DATA)) \
+ fusion::BOOST_PROTO_FUSION_AT_C(N, BOOST_PP_TUPLE_ELEM(3, 1, DATA)) \
/**/
/// INTERNAL ONLY
///
#define BOOST_PROTO_AS_ARG_AT_TYPE(Z, N, DATA) \
- typename boost::proto::result_of::as_arg< \
+ typename boost::proto::detail::protoify_< \
BOOST_PROTO_AT_TYPE(Z, N, DATA) \
- , BOOST_PP_TUPLE_ELEM(2, 1, DATA) \
+ , BOOST_PP_TUPLE_ELEM(3, 2, DATA) \
>::type \
/**/
/// INTERNAL ONLY
///
#define BOOST_PROTO_AS_ARG_AT(Z, N, DATA) \
- boost::proto::as_arg<BOOST_PP_TUPLE_ELEM(2, 1, DATA) >( \
- BOOST_PROTO_AT(Z, N, DATA) \
- ) \
+ boost::proto::detail::protoify_< \
+ BOOST_PROTO_AT_TYPE(Z, N, DATA) \
+ , BOOST_PP_TUPLE_ELEM(3, 2, DATA) \
+ >::call(BOOST_PROTO_AT(Z, N, DATA)) \
/**/
/// INTERNAL ONLY
@@ -272,11 +277,11 @@
, BOOST_PP_TUPLE_ELEM(4, 1, DATA) \
) \
) \
- BOOST_PP_ENUM_TRAILING_PARAMS(N, const A) \
+ BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z(Z, N, A, const & BOOST_PP_INTERCEPT) \
>::type const \
- BOOST_PP_TUPLE_ELEM(4, 0, DATA)(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, const A, &a)) \
+ BOOST_PP_TUPLE_ELEM(4, 0, DATA)(BOOST_PP_ENUM_BINARY_PARAMS_Z(Z, N, A, const &a)) \
{ \
- return boost::proto::result_of::make_expr< \
+ return boost::proto::detail::make_expr_< \
BOOST_PP_SEQ_FOR_EACH_I( \
BOOST_PROTO_VARARG_TYPE_, ~ \
, BOOST_PP_SEQ_PUSH_FRONT( \
@@ -287,7 +292,7 @@
, BOOST_PP_TUPLE_ELEM(4, 1, DATA) \
) \
) \
- BOOST_PP_ENUM_TRAILING_PARAMS(N, const A) \
+ BOOST_PP_ENUM_TRAILING_BINARY_PARAMS_Z(Z, N, A, const & BOOST_PP_INTERCEPT) \
>::call( \
BOOST_PP_SEQ_ENUM( \
BOOST_PP_SEQ_FOR_EACH_I( \
@@ -342,6 +347,45 @@
namespace detail
{
+ template<typename T, typename Domain>
+ struct protoify_
+ {
+ typedef
+ typename mpl::eval_if<
+ boost::is_reference_wrapper<T>
+ , proto::result_of::as_arg<typename boost::unwrap_reference<T>::type, Domain>
+ , proto::result_of::as_expr<T, Domain>
+ >::type
+ type;
+
+ static type call(T &t)
+ {
+ return typename mpl::if_<
+ is_reference_wrapper<T>
+ , functional::as_arg<Domain>
+ , functional::as_expr<Domain>
+ >::type()(static_cast<typename boost::unwrap_reference<T>::type &>(t));
+ }
+ };
+
+ template<typename T, typename Domain>
+ struct protoify_<T &, Domain>
+ {
+ typedef
+ typename proto::result_of::as_arg<
+ typename boost::unwrap_reference<T>::type
+ , Domain
+ >::type
+ type;
+
+ static type call(T &t)
+ {
+ return functional::as_arg<Domain>()(
+ static_cast<typename boost::unwrap_reference<T>::type &>(t)
+ );
+ }
+ };
+
template<
typename Domain
BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(
@@ -379,17 +423,25 @@
template<typename Domain, typename Sequence>
struct unpack_expr_<tag::terminal, Domain, Sequence, 1u>
{
- typedef proto::expr<
- tag::terminal
- , args0<typename fusion_::result_of::value_at_c<Sequence, 0>::type>
- > expr_type;
+ typedef
+ typename add_const<
+ typename fusion::BOOST_PROTO_FUSION_RESULT_OF::value_at_c<
+ Sequence
+ , 0
+ >::type
+ >::type
+ terminal_type;
- typedef typename Domain::template apply<expr_type>::type type;
+ typedef
+ typename proto::detail::protoify_<
+ terminal_type
+ , Domain
+ >::type
+ type;
static type const call(Sequence const &sequence)
{
- expr_type that = {fusion_::at_c<0>(sequence)};
- return Domain::make(that);
+ return proto::detail::protoify_<terminal_type, Domain>::call(fusion::BOOST_PROTO_FUSION_AT_C(0, sequence));
}
};
@@ -415,17 +467,20 @@
struct make_expr_<tag::terminal, Domain, A
BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, void BOOST_PP_INTERCEPT)>
{
- typedef typename add_reference<A>::type reference;
- typedef proto::expr<tag::terminal, args0<reference> > expr_type;
- typedef typename Domain::template apply<expr_type>::type type;
+ typedef typename proto::detail::protoify_<A, Domain>::type type;
- static type const call(reference a)
+ static type const call(typename add_reference<A>::type a)
{
- expr_type that = {a};
- return Domain::make(that);
+ return proto::detail::protoify_<A, Domain>::call(a);
}
};
+ template<typename A>
+ struct make_expr_<tag::terminal, deduce_domain, A
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, void BOOST_PP_INTERCEPT)>
+ : make_expr_<tag::terminal, default_domain, A>
+ {};
+
#define BOOST_PP_ITERATION_PARAMS_1 \
(4, (1, BOOST_PROTO_MAX_ARITY, <boost/xpressive/proto/make_expr.hpp>, 1)) \
/**/
@@ -435,39 +490,48 @@
namespace result_of
{
- template<typename Tag, typename Sequence, typename, typename>
+ template<typename Tag, typename Sequence, typename EnableIf1, typename EnableIf2>
struct unpack_expr
- : detail::unpack_expr_<
- Tag
- , deduce_domain
- , Sequence
- , detail::fusion_::result_of::size<Sequence>::type::value
- >
- {};
+ {
+ typedef
+ typename detail::unpack_expr_<
+ Tag
+ , deduce_domain
+ , Sequence
+ , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence>::type::value
+ >::type
+ type;
+ };
template<typename Tag, typename Domain, typename Sequence>
struct unpack_expr<Tag, Domain, Sequence, typename Domain::proto_is_domain_>
- : detail::unpack_expr_<
- Tag
- , Domain
- , Sequence
- , detail::fusion_::result_of::size<Sequence>::type::value
- >
- {};
+ {
+ typedef
+ typename detail::unpack_expr_<
+ Tag
+ , Domain
+ , Sequence
+ , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence>::type::value
+ >::type
+ type;
+ };
template<
typename Tag
BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, typename A)
- , typename
- , typename
+ , typename EnableIf1
+ , typename EnableIf2
>
struct make_expr
- : make_expr<
- Tag
- , deduce_domain
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, A)
- >
- {};
+ {
+ typedef
+ typename detail::make_expr_<
+ Tag
+ , deduce_domain
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, A)
+ >::type
+ type;
+ };
template<
typename Tag
@@ -480,32 +544,15 @@
BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, A)
, typename Domain::proto_is_domain_
>
- : detail::make_expr_<
- Tag
- , Domain
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, A)
- >
- {};
-
- template<
- typename Tag
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, typename A)
- >
- struct make_expr<
- Tag
- , deduce_domain
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, A)
- , void
- >
- : detail::make_expr_<
- Tag
- , typename detail::deduce_domain_<
- typename domain_of<A0>::type
- , BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PROTO_MAX_ARITY, A)
+ {
+ typedef
+ typename detail::make_expr_<
+ Tag
+ , Domain
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, A)
>::type
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, A)
- >
- {};
+ type;
+ };
}
namespace functional
@@ -516,50 +563,44 @@
BOOST_PROTO_CALLABLE()
template<typename Sig>
- struct result
- {};
+ struct result {};
- template<typename A>
- typename result_of::make_expr<Tag, Domain, A>::type const
- operator ()(A &a) const
+ template<typename This, typename A0>
+ struct result<This(A0)>
{
- return result_of::make_expr<Tag, Domain, A>::call(a);
- }
-
- #define BOOST_PP_ITERATION_PARAMS_1 \
- (4, (1, BOOST_PROTO_MAX_ARITY, <boost/xpressive/proto/make_expr.hpp>, 2)) \
- /**/
-
- #include BOOST_PP_ITERATE()
- };
-
- template<typename Domain>
- struct make_expr<tag::terminal, Domain>
- {
- BOOST_PROTO_CALLABLE()
-
- template<typename Sig>
- struct result
- {};
-
- template<typename This, typename A>
- struct result<This(A)>
- : result_of::make_expr<tag::terminal, Domain, A>
- {};
+ typedef
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0
+ >::type
+ type;
+ };
- template<typename A>
- typename result_of::make_expr<tag::terminal, Domain, A>::type
- operator ()(A &a) const
+ /// Construct an expression node with tag type \c Tag
+ /// and in the domain \c Domain.
+ template<typename A0>
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , A0 const
+ >::type const
+ operator ()(A0 const &a0) const
{
- return result_of::make_expr<tag::terminal, Domain, A>::call(a);
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , A0 const
+ >::call(a0);
}
- template<typename A>
- typename result_of::make_expr<tag::terminal, Domain, A const>::type
- operator ()(A const &a) const
- {
- return result_of::make_expr<tag::terminal, Domain, A const>::call(a);
- }
+ // Additional overloads generated by the preprocessor ...
+
+ #define BOOST_PP_ITERATION_PARAMS_1 \
+ (4, (2, BOOST_PROTO_MAX_ARITY, <boost/xpressive/proto/make_expr.hpp>, 2)) \
+ /**/
+
+ #include BOOST_PP_ITERATE()
};
template<typename Tag, typename Domain>
@@ -573,39 +614,66 @@
template<typename This, typename Sequence>
struct result<This(Sequence)>
- : result_of::unpack_expr<
- Tag
- , Domain
- , typename detail::remove_cv_ref<Sequence>::type
- >
- {};
+ {
+ typedef
+ typename result_of::unpack_expr<
+ Tag
+ , Domain
+ , typename remove_reference<Sequence>::type
+ >::type
+ type;
+ };
template<typename Sequence>
- typename result_of::unpack_expr<Tag, Domain, Sequence>::type
+ typename result_of::unpack_expr<Tag, Domain, Sequence const>::type const
operator ()(Sequence const &sequence) const
{
- return result_of::unpack_expr<Tag, Domain, Sequence>::call(sequence);
+ return proto::detail::unpack_expr_<
+ Tag
+ , Domain
+ , Sequence const
+ , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence>::type::value
+ >::call(sequence);
}
};
+ /// INTERNAL ONLY
+ ///
template<typename Tag, typename Domain>
struct unfused_expr_fun
{
BOOST_PROTO_CALLABLE()
- template<typename Sequence>
- struct result
- : result_of::unpack_expr<Tag, Domain, Sequence>
- {};
+ template<typename Sig>
+ struct result {};
+
+ template<typename This, typename Sequence>
+ struct result<This(Sequence)>
+ {
+ typedef
+ typename result_of::unpack_expr<
+ Tag
+ , Domain
+ , typename remove_reference<Sequence>::type
+ >::type
+ type;
+ };
template<typename Sequence>
- typename proto::result_of::unpack_expr<Tag, Domain, Sequence>::type
+ typename proto::result_of::unpack_expr<Tag, Domain, Sequence const>::type const
operator ()(Sequence const &sequence) const
{
- return result_of::unpack_expr<Tag, Domain, Sequence>::call(sequence);
+ return proto::detail::unpack_expr_<
+ Tag
+ , Domain
+ , Sequence const
+ , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence>::type::value
+ >::call(sequence);
}
};
+ /// INTERNAL ONLY
+ ///
template<typename Tag, typename Domain>
struct unfused_expr
: fusion::unfused_generic<unfused_expr_fun<Tag, Domain> >
@@ -619,20 +687,30 @@
template<typename Tag, typename Sequence>
typename lazy_disable_if<
is_domain<Sequence>
- , result_of::unpack_expr<Tag, Sequence>
+ , result_of::unpack_expr<Tag, Sequence const>
>::type const
unpack_expr(Sequence const &sequence)
{
- return result_of::unpack_expr<Tag, Sequence>::call(sequence);
+ return proto::detail::unpack_expr_<
+ Tag
+ , deduce_domain
+ , Sequence const
+ , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence>::type::value
+ >::call(sequence);
}
/// \overload
///
template<typename Tag, typename Domain, typename Sequence2>
- typename result_of::unpack_expr<Tag, Domain, Sequence2>::type const
+ typename result_of::unpack_expr<Tag, Domain, Sequence2 const>::type const
unpack_expr(Sequence2 const &sequence2)
{
- return result_of::unpack_expr<Tag, Domain, Sequence2>::call(sequence2);
+ return proto::detail::unpack_expr_<
+ Tag
+ , Domain
+ , Sequence2 const
+ , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence2>::type::value
+ >::call(sequence2);
}
/// make_expr
@@ -640,24 +718,41 @@
template<typename Tag, typename A0>
typename lazy_disable_if<
is_domain<A0>
- , result_of::make_expr<Tag, A0>
+ , result_of::make_expr<
+ Tag
+ , A0 const
+ >
>::type const
- make_expr(A0 &a0 BOOST_PROTO_DISABLE_IF_IS_CONST(A0))
+ make_expr(A0 const &a0)
{
- return result_of::make_expr<Tag, A0>::call(a0);
+ return proto::detail::make_expr_<
+ Tag
+ , deduce_domain
+ , A0 const
+ >::call(a0);
}
/// \overload
///
template<typename Tag, typename Domain, typename B0>
- typename result_of::make_expr<Tag, Domain, B0>::type const
- make_expr(B0 &b0 BOOST_PROTO_DISABLE_IF_IS_CONST(B0))
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ , B0 const
+ >::type const
+ make_expr(B0 const &b0)
{
- return result_of::make_expr<Tag, Domain, B0>::call(b0);
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ , B0 const
+ >::call(b0);
}
+ // Additional overloads generated by the preprocessor...
+
#define BOOST_PP_ITERATION_PARAMS_1 \
- (4, (1, BOOST_PROTO_MAX_ARITY, <boost/xpressive/proto/make_expr.hpp>, 3)) \
+ (4, (2, BOOST_PROTO_MAX_ARITY, <boost/xpressive/proto/make_expr.hpp>, 3)) \
/**/
#include BOOST_PP_ITERATE()
@@ -672,6 +767,8 @@
: mpl::true_
{};
+ /// INTERNAL ONLY
+ ///
template<typename Tag, typename Domain>
struct is_callable<functional::unfused_expr<Tag, Domain> >
: mpl::true_
@@ -697,27 +794,43 @@
{
typedef proto::expr<
Tag
- , BOOST_PP_CAT(args, N)<BOOST_PP_ENUM(N, BOOST_PROTO_AS_ARG_TYPE, (A, Domain)) >
+ , BOOST_PP_CAT(args, N)<BOOST_PP_ENUM(N, BOOST_PROTO_AS_ARG_TYPE, (A, ~, Domain)) >
> expr_type;
typedef typename Domain::template apply<expr_type>::type type;
- static type const call(BOOST_PP_ENUM_BINARY_PARAMS(N, A, &a))
+ static type const call(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference<A, >::type a))
{
expr_type that = {
- BOOST_PP_ENUM(N, BOOST_PROTO_AS_ARG, (a, Domain))
+ BOOST_PP_ENUM(N, BOOST_PROTO_AS_ARG, (A, a, Domain))
};
return Domain::make(that);
}
};
+ template<typename Tag BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
+ struct make_expr_<Tag, deduce_domain BOOST_PP_ENUM_TRAILING_PARAMS(N, A)
+ BOOST_PP_ENUM_TRAILING_PARAMS(M, void BOOST_PP_INTERCEPT), void>
+ : make_expr_<
+ Tag
+ , typename detail::deduce_domain_<
+ typename domain_of<
+ A0
+ >::type
+ BOOST_PP_COMMA_IF(BOOST_PP_DEC(N))
+ BOOST_PP_ENUM_SHIFTED_PARAMS(N, A)
+ >::type
+ BOOST_PP_ENUM_TRAILING_PARAMS(N, A)
+ >
+ {};
+
template<typename Tag, typename Domain, typename Sequence>
struct unpack_expr_<Tag, Domain, Sequence, N>
{
typedef proto::expr<
Tag
, BOOST_PP_CAT(args, N)<
- BOOST_PP_ENUM(N, BOOST_PROTO_AS_ARG_AT_TYPE, (Sequence const, Domain))
+ BOOST_PP_ENUM(N, BOOST_PROTO_AS_ARG_AT_TYPE, (Sequence const, ~, Domain))
>
> expr_type;
@@ -726,7 +839,7 @@
static type const call(Sequence const &sequence)
{
expr_type that = {
- BOOST_PP_ENUM(N, BOOST_PROTO_AS_ARG_AT, (sequence, Domain))
+ BOOST_PP_ENUM(N, BOOST_PROTO_AS_ARG_AT, (Sequence const, sequence, Domain))
};
return Domain::make(that);
}
@@ -738,10 +851,10 @@
Tag
, typename detail::deduce_domain_<
typename domain_of<
- BOOST_PROTO_AT_TYPE(~, 0, (Sequence const, ~))
+ BOOST_PROTO_AT_TYPE(~, 0, (Sequence const, ~, ~))
>::type
BOOST_PP_COMMA_IF(BOOST_PP_DEC(N))
- BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_AT_TYPE, (Sequence const, ~))
+ BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_AT_TYPE, (Sequence const, ~, ~))
>::type
, Sequence
, N
@@ -757,17 +870,18 @@
template<typename This BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
struct result<This(BOOST_PP_ENUM_PARAMS(N, A))>
- : result_of::make_expr<
- Tag
- , Domain
- BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(
- N
- , typename remove_reference<A
- , >::type BOOST_PP_INTERCEPT
- )
- >
- {};
+ {
+ typedef
+ typename result_of::make_expr<
+ Tag
+ , Domain
+ BOOST_PP_ENUM_TRAILING_PARAMS(N, A)
+ >::type
+ type;
+ };
+ /// \overload
+ ///
template<BOOST_PP_ENUM_PARAMS(N, typename A)>
typename result_of::make_expr<
Tag
@@ -776,8 +890,11 @@
>::type const
operator ()(BOOST_PP_ENUM_BINARY_PARAMS(N, const A, &a)) const
{
- return result_of::make_expr<Tag, Domain BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)>
- ::call(BOOST_PP_ENUM_PARAMS(N, a));
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)
+ >::call(BOOST_PP_ENUM_PARAMS(N, a));
}
#undef N
@@ -791,12 +908,18 @@
template<typename Tag BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
typename lazy_disable_if<
is_domain<A0>
- , result_of::make_expr<Tag BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)>
+ , result_of::make_expr<
+ Tag
+ BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)
+ >
>::type const
make_expr(BOOST_PP_ENUM_BINARY_PARAMS(N, const A, &a))
{
- return result_of::make_expr<Tag BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)>
- ::call(BOOST_PP_ENUM_PARAMS(N, a));
+ return proto::detail::make_expr_<
+ Tag
+ , deduce_domain
+ BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)
+ >::call(BOOST_PP_ENUM_PARAMS(N, a));
}
/// \overload
@@ -809,8 +932,11 @@
>::type const
make_expr(BOOST_PP_ENUM_BINARY_PARAMS(N, const B, &b))
{
- return result_of::make_expr<Tag, Domain BOOST_PP_ENUM_TRAILING_PARAMS(N, const B)>
- ::call(BOOST_PP_ENUM_PARAMS(N, b));
+ return proto::detail::make_expr_<
+ Tag
+ , Domain
+ BOOST_PP_ENUM_TRAILING_PARAMS(N, const B)
+ >::call(BOOST_PP_ENUM_PARAMS(N, b));
}
#undef N
Modified: branches/fix-links/boost/xpressive/proto/matches.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/matches.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/matches.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -4,7 +4,7 @@
/// Contains definition of matches\<\> metafunction for determining if
/// a given expression matches a given pattern.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -42,7 +42,7 @@
// Some compilers (like GCC) need extra help figuring out a template's arity.
// I use MPL's BOOST_MPL_AUX_LAMBDA_ARITY_PARAM() macro to disambiguate, which
// which is controlled by the BOOST_MPL_LIMIT_METAFUNCTION_ARITY macro. If
- // You define BOOST_PROTO_MAX_ARITY to be greater than
+ // You define BOOST_PROTO_MAX_ARITY to be greater than
// BOOST_MPL_LIMIT_METAFUNCTION_ARITY on these compilers, things don't work.
// You must define BOOST_MPL_LIMIT_METAFUNCTION_ARITY to be greater.
#ifdef BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING
@@ -197,7 +197,7 @@
template<
typename T
, typename U
- , bool B = is_array<typename remove_cv_ref<T>::type>::value
+ , bool B = is_array<BOOST_PROTO_UNCVREF(T)>::value
>
struct terminal_array_matches
: mpl::false_
@@ -225,8 +225,8 @@
mpl::and_<
is_cv_ref_compatible<T, U>
, lambda_matches<
- typename remove_cv_ref<T>::type
- , typename remove_cv_ref<U>::type
+ BOOST_PROTO_UNCVREF(T)
+ , BOOST_PROTO_UNCVREF(U)
>
>
, terminal_array_matches<T, U>
@@ -239,8 +239,8 @@
: mpl::and_<
is_cv_ref_compatible<T, U>
, lambda_matches<
- typename remove_cv_ref<T>::type
- , typename remove_cv_ref<U>::type
+ BOOST_PROTO_UNCVREF(T)
+ , BOOST_PROTO_UNCVREF(U)
>
>
{};
@@ -400,11 +400,23 @@
namespace wildcardns_
{
- struct _
- : has_identity_transform
+ struct _ : proto::callable
{
- BOOST_PROTO_CALLABLE()
typedef _ proto_base_expr;
+
+ template<typename Sig> struct result {};
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
+ {
+ typedef Expr type;
+ };
+
+ template<typename Expr, typename State, typename Visitor>
+ Expr const &operator ()(Expr const &expr, State const &, Visitor &) const
+ {
+ return expr;
+ }
};
}
@@ -412,30 +424,46 @@
{
// not_
template<typename Grammar>
- struct not_
- : has_identity_transform
+ struct not_ : proto::callable
{
- BOOST_PROTO_CALLABLE()
typedef not_ proto_base_expr;
+
+ template<typename Sig> struct result {};
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
+ {
+ typedef Expr type;
+ };
+
+ template<typename Expr, typename State, typename Visitor>
+ Expr const &operator ()(Expr const &expr, State const &, Visitor &) const
+ {
+ return expr;
+ }
};
// if_
template<typename If, typename Then, typename Else>
- struct if_ : callable
+ struct if_ : proto::callable
{
typedef if_ proto_base_expr;
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : mpl::eval_if<
- typename when<_, If>::template result<void(Expr, State, Visitor)>::type
- , typename when<_, Then>::template result<void(Expr, State, Visitor)>
- , typename when<_, Else>::template result<void(Expr, State, Visitor)>
- >
- {};
+ {
+ typedef
+ typename mpl::if_<
+ typename when<_, If>::template result<void(Expr, State, Visitor)>::type
+ , when<_, Then>
+ , when<_, Else>
+ >::type
+ branch;
+
+ typedef typename branch::template result<void(Expr, State, Visitor)>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -455,12 +483,11 @@
// or_
template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, typename G)>
- struct or_ : callable
+ struct or_ : proto::callable
{
typedef or_ proto_base_expr;
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -480,12 +507,11 @@
// and_
template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, typename G)>
- struct and_ : callable
+ struct and_ : proto::callable
{
typedef and_ proto_base_expr;
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -505,23 +531,25 @@
// switch_
template<typename Cases>
- struct switch_ : callable
+ struct switch_ : proto::callable
{
typedef switch_ proto_base_expr;
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : Cases::template case_<typename Expr::proto_tag>::template result<void(Expr, State, Visitor)>
- {};
+ {
+ typedef typename Cases::template case_<typename Expr::proto_tag> impl;
+ typedef typename impl::template result<void(Expr, State, Visitor)>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return typename Cases::template case_<typename Expr::proto_tag>()(expr, state, visitor);
+ typedef typename Cases::template case_<typename Expr::proto_tag> impl;
+ return impl()(expr, state, visitor);
}
};
Modified: branches/fix-links/boost/xpressive/proto/operators.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/operators.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/operators.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,9 +1,9 @@
///////////////////////////////////////////////////////////////////////////////
/// \file operators.hpp
/// Contains all the overloaded operators that make it possible to build
-/// expression templates using proto components
+/// Proto expression trees.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -119,7 +119,7 @@
template<typename Domain, typename Trait, typename Arg, typename Expr>
struct enable_unary
: boost::enable_if<
- boost::mpl::and_<Trait, boost::proto::matches<Expr, typename Domain::grammar> >
+ boost::mpl::and_<Trait, boost::proto::matches<Expr, typename Domain::proto_grammar> >
, Expr
>
{};
@@ -129,7 +129,7 @@
: boost::enable_if<
boost::mpl::and_<
Trait
- , boost::proto::matches<Expr, typename domain_of<Arg>::type::grammar>
+ , boost::proto::matches<Expr, typename domain_of<Arg>::type::proto_grammar>
>
, Expr
>
@@ -145,7 +145,7 @@
: boost::enable_if<
boost::mpl::and_<
mpl::bool_<(3 <= (arg_weight<Arg1, Trait1>::value + arg_weight<Arg2, Trait2>::value))>
- , boost::proto::matches<Expr, typename Domain::grammar>
+ , boost::proto::matches<Expr, typename Domain::proto_grammar>
>
, Expr
>
@@ -156,7 +156,7 @@
: boost::enable_if<
boost::mpl::and_<
mpl::bool_<(3 <= (arg_weight<Arg1, Trait1>::value + arg_weight<Arg2, Trait2>::value))>
- , boost::proto::matches<Expr, typename deduce_domain_<typename domain_of<Arg1>::type, Arg2>::type::grammar>
+ , boost::proto::matches<Expr, typename deduce_domain_<typename domain_of<Arg1>::type, Arg2>::type::proto_grammar>
>
, Expr
>
@@ -179,7 +179,7 @@
template<typename Arg> \
typename detail::generate_if< \
typename Arg::proto_domain \
- , proto::expr<TAG, args1<ref_<typename Arg::proto_derived_expr> > > \
+ , proto::expr<TAG, args1<ref_<typename Arg::proto_derived_expr> > > \
>::type const \
operator OP(Arg &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
{ \
@@ -190,7 +190,7 @@
template<typename Arg> \
typename detail::generate_if< \
typename Arg::proto_domain \
- , proto::expr<TAG, args1<ref_<typename Arg::proto_derived_expr const> > > \
+ , proto::expr<TAG, args1<ref_<typename Arg::proto_derived_expr const> > > \
>::type const \
operator OP(Arg const &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
{ \
@@ -291,58 +291,54 @@
#define BOOST_PROTO_DEFINE_UNARY_OPERATOR(OP, TAG, TRAIT, DOMAIN, POST) \
template<typename Arg> \
typename boost::proto::detail::enable_unary<DOMAIN, TRAIT<Arg>, Arg \
- , typename boost::proto::result_of::make_expr<TAG, DOMAIN, Arg>::type \
+ , typename boost::proto::result_of::make_expr<TAG, DOMAIN, Arg &>::type \
>::type const \
operator OP(Arg &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
{ \
- return boost::proto::result_of::make_expr<TAG, DOMAIN, Arg>::call(arg); \
+ return boost::proto::make_expr<TAG, DOMAIN>(boost::ref(arg)); \
} \
template<typename Arg> \
typename boost::proto::detail::enable_unary<DOMAIN, TRAIT<Arg>, Arg \
- , typename boost::proto::result_of::make_expr<TAG, DOMAIN, Arg const>::type \
+ , typename boost::proto::result_of::make_expr<TAG, DOMAIN, Arg const &>::type \
>::type const \
operator OP(Arg const &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
{ \
- return boost::proto::result_of::make_expr<TAG, DOMAIN, Arg const>::call(arg); \
+ return boost::proto::make_expr<TAG, DOMAIN>(boost::ref(arg)); \
} \
/**/
#define BOOST_PROTO_DEFINE_BINARY_OPERATOR(OP, TAG, TRAIT, DOMAIN) \
template<typename Left, typename Right> \
typename boost::proto::detail::enable_binary<DOMAIN, TRAIT<Left>, Left, TRAIT<Right>, Right \
- , typename boost::proto::result_of::make_expr<TAG, DOMAIN, Left, Right>::type \
+ , typename boost::proto::result_of::make_expr<TAG, DOMAIN, Left &, Right &>::type \
>::type const \
operator OP(Left &left, Right &right) \
{ \
- return boost::proto::result_of::make_expr<TAG, DOMAIN, Left, Right> \
- ::call(left, right); \
+ return boost::proto::make_expr<TAG, DOMAIN>(boost::ref(left), boost::ref(right)); \
} \
template<typename Left, typename Right> \
typename boost::proto::detail::enable_binary<DOMAIN, TRAIT<Left>, Left, TRAIT<Right>, Right \
- , typename boost::proto::result_of::make_expr<TAG, DOMAIN, Left, Right const>::type \
+ , typename boost::proto::result_of::make_expr<TAG, DOMAIN, Left &, Right const &>::type \
>::type const \
operator OP(Left &left, Right const &right) \
{ \
- return boost::proto::result_of::make_expr<TAG, DOMAIN, Left, Right const> \
- ::call(left, right); \
+ return boost::proto::make_expr<TAG, DOMAIN>(boost::ref(left), boost::ref(right)); \
} \
template<typename Left, typename Right> \
typename boost::proto::detail::enable_binary<DOMAIN, TRAIT<Left>, Left, TRAIT<Right>, Right \
- , typename boost::proto::result_of::make_expr<TAG, DOMAIN, Left const, Right>::type \
+ , typename boost::proto::result_of::make_expr<TAG, DOMAIN, Left const &, Right &>::type \
>::type const \
operator OP(Left const &left, Right &right) \
{ \
- return boost::proto::result_of::make_expr<TAG, DOMAIN, Left const, Right> \
- ::call(left, right); \
+ return boost::proto::make_expr<TAG, DOMAIN>(boost::ref(left), boost::ref(right)); \
} \
template<typename Left, typename Right> \
typename boost::proto::detail::enable_binary<DOMAIN, TRAIT<Left>, Left, TRAIT<Right>, Right \
- , typename boost::proto::result_of::make_expr<TAG, DOMAIN, Left const, Right const>::type \
+ , typename boost::proto::result_of::make_expr<TAG, DOMAIN, Left const &, Right const &>::type\
>::type const \
operator OP(Left const &left, Right const &right) \
{ \
- return boost::proto::result_of::make_expr<TAG, DOMAIN, Left const, Right const> \
- ::call(left, right); \
+ return boost::proto::make_expr<TAG, DOMAIN>(boost::ref(left), boost::ref(right)); \
} \
/**/
Modified: branches/fix-links/boost/xpressive/proto/proto.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/proto.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/proto.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file proto.hpp
/// The proto expression template compiler and supporting utilities.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/proto/proto_fwd.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/proto_fwd.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/proto_fwd.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file proto_fwd.hpp
/// Forward declarations of all of proto's public types and functions.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -13,12 +13,14 @@
#include <cstddef>
#include <climits>
#include <boost/config.hpp>
+#include <boost/version.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/preprocessor/arithmetic/sub.hpp>
+#include <boost/preprocessor/punctuation/comma.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/enum_trailing_binary_params.hpp>
#include <boost/mpl/long.hpp>
-#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
#ifndef BOOST_PROTO_MAX_ARITY
@@ -38,13 +40,55 @@
# include <boost/utility/enable_if.hpp>
# include <boost/type_traits/is_const.hpp>
# define BOOST_PROTO_DISABLE_IF_IS_CONST(T)\
- , typename boost::disable_if<boost::is_const<T> >::type * = 0
+ , typename boost::disable_if<boost::is_const<T>, boost::proto::detail::undefined>::type * = 0
#else
# define BOOST_PROTO_DISABLE_IF_IS_CONST(T)
#endif
+#if BOOST_VERSION < 103500
+#define BOOST_PROTO_DEFINE_FUSION_TAG(X) typedef X tag;
+#define BOOST_PROTO_DEFINE_FUSION_CATEGORY(X)
+#define BOOST_PROTO_FUSION_RESULT_OF meta
+#define BOOST_PROTO_FUSION_EXTENSION meta
+#define BOOST_PROTO_FUSION_AT_C(N, X) at<N>(X)
+#else
+#define BOOST_PROTO_DEFINE_FUSION_TAG(X) typedef X fusion_tag;
+#define BOOST_PROTO_DEFINE_FUSION_CATEGORY(X) typedef X category;
+#define BOOST_PROTO_FUSION_RESULT_OF result_of
+#define BOOST_PROTO_FUSION_EXTENSION extension
+#define BOOST_PROTO_FUSION_AT_C(N, X) at_c<N>(X)
+#endif
+
#include <boost/xpressive/proto/detail/suffix.hpp> // must be last include
+#ifdef BOOST_PROTO_DOXYGEN_INVOKED
+// HACKHACK so Doxygen shows inheritance from mpl::true_ and mpl::false_
+namespace boost
+{
+ /// INTERNAL ONLY
+ ///
+ namespace mpl
+ {
+ /// INTERNAL ONLY
+ ///
+ struct true_ {};
+ /// INTERNAL ONLY
+ ///
+ struct false_ {};
+ }
+
+ /// INTERNAL ONLY
+ ///
+ namespace fusion
+ {
+ /// INTERNAL ONLY
+ ///
+ template<typename Function>
+ class unfused_generic {};
+ }
+}
+#endif
+
namespace boost { namespace proto
{
namespace detail
@@ -53,11 +97,12 @@
typedef char (&no_type)[2];
struct dont_care;
+ struct undefined; // leave this undefined
- template<typename T>
- struct remove_cv_ref
- : remove_cv<typename remove_reference<T>::type>
- {};
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_UNCVREF(X) \
+ typename boost::remove_const<typename boost::remove_reference<X>::type>::type
}
///////////////////////////////////////////////////////////////////////////////
@@ -191,14 +236,22 @@
template<
typename Grammar0
, typename Grammar1
- , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_SUB(BOOST_PROTO_MAX_LOGICAL_ARITY,2), typename G, void)
+ , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ BOOST_PP_SUB(BOOST_PROTO_MAX_LOGICAL_ARITY,2)
+ , typename G
+ , void
+ )
>
struct or_;
template<
typename Grammar0
, typename Grammar1
- , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_SUB(BOOST_PROTO_MAX_LOGICAL_ARITY,2), typename G, void)
+ , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ BOOST_PP_SUB(BOOST_PROTO_MAX_LOGICAL_ARITY,2)
+ , typename G
+ , void
+ )
>
struct and_;
@@ -298,17 +351,17 @@
template<
typename Tag
+ , typename DomainOrA0
BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(
BOOST_PROTO_MAX_ARITY
, typename A
, = void BOOST_PP_INTERCEPT
)
- , typename _1 = void
- , typename _2 = void
+ , typename EnableIf = void
>
struct make_expr;
- template<typename Tag, typename DomainOrSequence, typename SequenceOrVoid = void, typename _ = void>
+ template<typename Tag, typename DomainOrSequence, typename SequenceOrVoid = void, typename EnableIf = void>
struct unpack_expr;
template<typename T, typename EnableIf = void>
@@ -408,6 +461,7 @@
struct left;
struct right;
struct unref;
+ struct eval;
struct deep_copy;
template<typename Domain = default_domain>
@@ -433,7 +487,7 @@
template<typename Tag, typename Domain = deduce_domain>
struct unfused_expr;
-
+
typedef make_expr<tag::terminal> make_terminal;
typedef make_expr<tag::posit> make_posit;
typedef make_expr<tag::negate> make_negate;
@@ -480,52 +534,6 @@
typedef make_expr<tag::if_else_> make_if_else;
typedef make_expr<tag::function> make_function;
- //typedef make_expr_ref<tag::terminal> make_terminal_ref;
- //typedef make_expr_ref<tag::posit> make_posit_ref;
- //typedef make_expr_ref<tag::negate> make_negate_ref;
- //typedef make_expr_ref<tag::dereference> make_dereference_ref;
- //typedef make_expr_ref<tag::complement> make_complement_ref;
- //typedef make_expr_ref<tag::address_of> make_address_of_ref;
- //typedef make_expr_ref<tag::logical_not> make_logical_not_ref;
- //typedef make_expr_ref<tag::pre_inc> make_pre_inc_ref;
- //typedef make_expr_ref<tag::pre_dec> make_pre_dec_ref;
- //typedef make_expr_ref<tag::post_inc> make_post_inc_ref;
- //typedef make_expr_ref<tag::post_dec> make_post_dec_ref;
- //typedef make_expr_ref<tag::shift_left> make_shift_left_ref;
- //typedef make_expr_ref<tag::shift_right> make_shift_right_ref;
- //typedef make_expr_ref<tag::multiplies> make_multiplies_ref;
- //typedef make_expr_ref<tag::divides> make_divides_ref;
- //typedef make_expr_ref<tag::modulus> make_modulus_ref;
- //typedef make_expr_ref<tag::plus> make_plus_ref;
- //typedef make_expr_ref<tag::minus> make_minus_ref;
- //typedef make_expr_ref<tag::less> make_less_ref;
- //typedef make_expr_ref<tag::greater> make_greater_ref;
- //typedef make_expr_ref<tag::less_equal> make_less_equal_ref;
- //typedef make_expr_ref<tag::greater_equal> make_greater_equal_ref;
- //typedef make_expr_ref<tag::equal_to> make_equal_to_ref;
- //typedef make_expr_ref<tag::not_equal_to> make_not_equal_to_ref;
- //typedef make_expr_ref<tag::logical_or> make_logical_or_ref;
- //typedef make_expr_ref<tag::logical_and> make_logical_and_ref;
- //typedef make_expr_ref<tag::bitwise_and> make_bitwise_and_ref;
- //typedef make_expr_ref<tag::bitwise_or> make_bitwise_or_ref;
- //typedef make_expr_ref<tag::bitwise_xor> make_bitwise_xor_ref;
- //typedef make_expr_ref<tag::comma> make_comma_ref;
- //typedef make_expr_ref<tag::mem_ptr> make_mem_ptr_ref;
- //typedef make_expr_ref<tag::assign> make_assign_ref;
- //typedef make_expr_ref<tag::shift_left_assign> make_shift_left_assign_ref;
- //typedef make_expr_ref<tag::shift_right_assign> make_shift_right_assign_ref;
- //typedef make_expr_ref<tag::multiplies_assign> make_multiplies_assign_ref;
- //typedef make_expr_ref<tag::divides_assign> make_divides_assign_ref;
- //typedef make_expr_ref<tag::modulus_assign> make_modulus_assign_ref;
- //typedef make_expr_ref<tag::plus_assign> make_plus_assign_ref;
- //typedef make_expr_ref<tag::minus_assign> make_minus_assign_ref;
- //typedef make_expr_ref<tag::bitwise_and_assign> make_bitwise_and_assign_ref;
- //typedef make_expr_ref<tag::bitwise_or_assign> make_bitwise_or_assign_ref;
- //typedef make_expr_ref<tag::bitwise_xor_assign> make_bitwise_xor_assign_ref;
- //typedef make_expr_ref<tag::subscript> make_subscript_ref;
- //typedef make_expr_ref<tag::if_else_> make_if_else_ref;
- //typedef make_expr_ref<tag::function> make_function_ref;
-
struct flatten;
struct pop_front;
struct reverse;
@@ -577,83 +585,12 @@
typedef functional::make_if_else _make_if_else;
typedef functional::make_function _make_function;
- //typedef functional::make_terminal_ref _make_terminal_ref;
- //typedef functional::make_posit_ref _make_posit_ref;
- //typedef functional::make_negate_ref _make_negate_ref;
- //typedef functional::make_dereference_ref _make_dereference_ref;
- //typedef functional::make_complement_ref _make_complement_ref;
- //typedef functional::make_address_of_ref _make_address_of_ref;
- //typedef functional::make_logical_not_ref _make_logical_not_ref;
- //typedef functional::make_pre_inc_ref _make_pre_inc_ref;
- //typedef functional::make_pre_dec_ref _make_pre_dec_ref;
- //typedef functional::make_post_inc_ref _make_post_inc_ref;
- //typedef functional::make_post_dec_ref _make_post_dec_ref;
- //typedef functional::make_shift_left_ref _make_shift_left_ref;
- //typedef functional::make_shift_right_ref _make_shift_right_ref;
- //typedef functional::make_multiplies_ref _make_multiplies_ref;
- //typedef functional::make_divides_ref _make_divides_ref;
- //typedef functional::make_modulus_ref _make_modulus_ref;
- //typedef functional::make_plus_ref _make_plus_ref;
- //typedef functional::make_minus_ref _make_minus_ref;
- //typedef functional::make_less_ref _make_less_ref;
- //typedef functional::make_greater_ref _make_greater_ref;
- //typedef functional::make_less_equal_ref _make_less_equal_ref;
- //typedef functional::make_greater_equal_ref _make_greater_equal_ref;
- //typedef functional::make_equal_to_ref _make_equal_to_ref;
- //typedef functional::make_not_equal_to_ref _make_not_equal_to_ref;
- //typedef functional::make_logical_or_ref _make_logical_or_ref;
- //typedef functional::make_logical_and_ref _make_logical_and_ref;
- //typedef functional::make_bitwise_and_ref _make_bitwise_and_ref;
- //typedef functional::make_bitwise_or_ref _make_bitwise_or_ref;
- //typedef functional::make_bitwise_xor_ref _make_bitwise_xor_ref;
- //typedef functional::make_comma_ref _make_comma_ref;
- //typedef functional::make_mem_ptr_ref _make_mem_ptr_ref;
- //typedef functional::make_assign_ref _make_assign_ref;
- //typedef functional::make_shift_left_assign_ref _make_shift_left_assign_ref;
- //typedef functional::make_shift_right_assign_ref _make_shift_right_assign_ref;
- //typedef functional::make_multiplies_assign_ref _make_multiplies_assign_ref;
- //typedef functional::make_divides_assign_ref _make_divides_assign_ref;
- //typedef functional::make_modulus_assign_ref _make_modulus_assign_ref;
- //typedef functional::make_plus_assign_ref _make_plus_assign_ref;
- //typedef functional::make_minus_assign_ref _make_minus_assign_ref;
- //typedef functional::make_bitwise_and_assign_ref _make_bitwise_and_assign_ref;
- //typedef functional::make_bitwise_or_assign_ref _make_bitwise_or_assign_ref;
- //typedef functional::make_bitwise_xor_assign_ref _make_bitwise_xor_assign_ref;
- //typedef functional::make_subscript_ref _make_subscript_ref;
- //typedef functional::make_if_else_ref _make_if_else_ref;
- //typedef functional::make_function_ref _make_function_ref;
-
typedef functional::flatten _flatten;
typedef functional::pop_front _pop_front;
typedef functional::reverse _reverse;
+ typedef functional::deep_copy _eval;
typedef functional::deep_copy _deep_copy;
-#define BOOST_PROTO_IDENTITY_TRANSFORM() \
- template<typename Expr_, typename State_, typename Visitor_> \
- Expr_ const &operator ()(Expr_ const &expr_, State_ const &, Visitor_ &) const \
- { \
- return expr_; \
- } \
- \
- template<typename Sig> \
- struct result; \
- \
- template<typename This, typename Expr_, typename State_, typename Visitor_> \
- struct result<This(Expr_,State_,Visitor_)> \
- { \
- typedef Expr_ type; \
- }
-
- namespace has_transformns_
- {
- struct has_identity_transform
- {
- BOOST_PROTO_IDENTITY_TRANSFORM();
- };
- }
-
- using has_transformns_::has_identity_transform;
-
template<typename T>
struct is_callable;
@@ -722,6 +659,8 @@
typedef arg0 arg;
typedef arg0 left;
typedef arg1 right;
+
+ struct _ref;
}
using transform::when;
@@ -756,6 +695,8 @@
template<int I>
struct _arg_c;
+ using transform::_ref;
+
template<typename T>
struct is_extension;
Modified: branches/fix-links/boost/xpressive/proto/proto_typeof.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/proto_typeof.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/proto_typeof.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// Type registrations so that proto expression templates can be used together
/// with the Boost.Typeof library.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/proto/ref.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/ref.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/ref.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file ref.hpp
/// Utility for storing a sub-expr by reference
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -43,7 +43,6 @@
typedef typename Expr::proto_args proto_args;
typedef typename Expr::proto_arity proto_arity;
typedef typename Expr::proto_domain proto_domain;
- //typedef tag::proto_expr fusion_tag;
typedef void proto_is_ref_;
typedef void proto_is_expr_;
typedef Expr proto_derived_expr;
@@ -137,11 +136,11 @@
struct unref
{
template<typename T>
- struct result;
+ struct result {};
template<typename This, typename T>
struct result<This(T)>
- : result_of::unref<typename detail::remove_cv_ref<T>::type>
+ : result_of::unref<BOOST_PROTO_UNCVREF(T)>
{};
template<typename T>
Modified: branches/fix-links/boost/xpressive/proto/tags.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/tags.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/tags.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file tags.hpp
/// Contains the tags for all the overloadable operators in C++
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -20,7 +20,7 @@
struct terminal {};
/// Tag type for the unary + operator.
- struct posit {};
+ struct posit {};
/// Tag type for the unary - operator.
struct negate {};
Modified: branches/fix-links/boost/xpressive/proto/traits.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/traits.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/traits.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -5,7 +5,7 @@
/// right\<\>, tag\<\>, and the helper functions arg(), arg_c(),
/// left() and right().
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -241,9 +241,22 @@
{
// terminal
template<typename T>
- struct terminal : has_identity_transform
+ struct terminal
{
- BOOST_PROTO_NOT_CALLABLE()
+ template<typename Sig> struct result {};
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
+ {
+ typedef Expr type;
+ };
+
+ template<typename Expr, typename State, typename Visitor>
+ Expr const &operator ()(Expr const &expr, State const &, Visitor &) const
+ {
+ return expr;
+ }
+
typedef proto::expr<proto::tag::terminal, args0<T> > type;
typedef type proto_base_expr;
typedef proto::tag::terminal proto_tag;
@@ -355,7 +368,7 @@
BOOST_PROTO_BINARY_GENERATOR(bitwise_or_assign)
BOOST_PROTO_BINARY_GENERATOR(bitwise_xor_assign)
BOOST_PROTO_BINARY_GENERATOR(subscript)
-
+
} // namespace op
#undef BOOST_PROTO_UNARY_GENERATOR
@@ -388,7 +401,7 @@
struct as_expr
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename T>
struct result<This(T)>
@@ -430,7 +443,7 @@
struct as_arg
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename T>
struct result<This(T)>
@@ -456,11 +469,11 @@
struct arg_c
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
- : result_of::arg_c<typename detail::remove_cv_ref<Expr>::type, N>
+ : result_of::arg_c<BOOST_PROTO_UNCVREF(Expr), N>
{};
template<typename Expr>
@@ -480,11 +493,11 @@
struct arg
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
- : result_of::arg<typename detail::remove_cv_ref<Expr>::type, N>
+ : result_of::arg<BOOST_PROTO_UNCVREF(Expr), N>
{};
template<typename Expr>
@@ -503,11 +516,11 @@
struct left
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
- : result_of::left<typename detail::remove_cv_ref<Expr>::type>
+ : result_of::left<BOOST_PROTO_UNCVREF(Expr)>
{};
template<typename Expr>
@@ -526,11 +539,11 @@
struct right
{
template<typename Sig>
- struct result;
+ struct result {};
template<typename This, typename Expr>
struct result<This(Expr)>
- : result_of::right<typename detail::remove_cv_ref<Expr>::type>
+ : result_of::right<BOOST_PROTO_UNCVREF(Expr)>
{};
template<typename Expr>
@@ -772,14 +785,22 @@
{
template<typename Expr>
struct arg_c<Expr, N>
- : unref<typename Expr::BOOST_PP_CAT(proto_arg, N)>
{
- static typename arg_c<Expr, N>::reference call(Expr &expr)
+ typedef typename Expr::BOOST_PP_CAT(proto_arg, N) wrapped_type;
+ typedef typename unref<wrapped_type>::type type;
+ typedef typename unref<wrapped_type>::reference reference;
+ typedef typename unref<wrapped_type>::const_reference const_reference;
+
+ /// INTERNAL ONLY
+ ///
+ static reference call(Expr &expr)
{
return proto::unref(expr.proto_base().BOOST_PP_CAT(arg, N));
}
- static typename arg_c<Expr, N>::const_reference call(Expr const &expr)
+ /// INTERNAL ONLY
+ ///
+ static const_reference call(Expr const &expr)
{
return proto::unref(expr.proto_base().BOOST_PP_CAT(arg, N));
}
Modified: branches/fix-links/boost/xpressive/proto/transform.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/transform.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/transform.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file transform.hpp
/// Includes all the transforms in the transform/ sub-directory.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/proto/transform/arg.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/transform/arg.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/transform/arg.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file arg.hpp
/// Contains definition of the argN transforms.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -20,10 +20,9 @@
namespace transform
{
- struct expr : callable
+ struct expr : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -39,10 +38,9 @@
}
};
- struct state : callable
+ struct state : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -58,10 +56,9 @@
}
};
- struct visitor : callable
+ struct visitor : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -78,23 +75,54 @@
};
template<int I>
- struct arg_c : callable
+ struct arg_c : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::result_of::arg_c<Expr, I>
- {};
+ {
+ typedef typename proto::result_of::arg_c<Expr, I>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
- typename proto::result_of::arg_c<Expr, I>::type
+ typename proto::result_of::arg_c<Expr, I>::const_reference
operator ()(Expr const &expr, State const &, Visitor &) const
{
return proto::arg_c<I>(expr);
}
};
+
+ struct _ref : proto::callable
+ {
+ template<typename Sig> struct result {};
+
+ template<typename This, typename T>
+ struct result<This(T)>
+ {
+ typedef boost::reference_wrapper<T const> type;
+ };
+
+ template<typename This, typename T>
+ struct result<This(T &)>
+ {
+ typedef boost::reference_wrapper<T> type;
+ };
+
+ template<typename T>
+ boost::reference_wrapper<T>
+ operator ()(T &t) const
+ {
+ return boost::reference_wrapper<T>(t);
+ }
+
+ template<typename T>
+ boost::reference_wrapper<T const>
+ operator ()(T const &t) const
+ {
+ return boost::reference_wrapper<T const>(t);
+ }
+ };
}
template<int I>
@@ -127,6 +155,11 @@
: mpl::true_
{};
+ template<>
+ struct is_callable<transform::_ref>
+ : mpl::true_
+ {};
+
}}
#endif
Modified: branches/fix-links/boost/xpressive/proto/transform/bind.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/transform/bind.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/transform/bind.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// \file bind.hpp
/// Contains definition of the bind<> transform.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -25,25 +25,22 @@
namespace transform
{
template<typename Fun>
- struct bind : callable
+ struct bind : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : call<
- typename make<Fun>::template result<void(Expr, State, Visitor)>::type
- >::template result<void(Expr, State, Visitor)>
- {};
+ {
+ typedef call<typename make<Fun>::template result<void(Expr, State, Visitor)>::type> impl;
+ typedef typename impl::template result<void(Expr, State, Visitor)>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return call<
- typename make<Fun>::template result<void(Expr, State, Visitor)>::type
- >()(expr, state, visitor);
+ return call<typename make<Fun>::template result<void(Expr, State, Visitor)>::type>()(expr, state, visitor);
}
};
@@ -66,17 +63,16 @@
#define N BOOST_PP_ITERATION()
template<typename Return BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
- struct bind<Return(BOOST_PP_ENUM_PARAMS(N, A))> : callable
+ struct bind<Return(BOOST_PP_ENUM_PARAMS(N, A))> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : call<
- typename make<Return>::template result<void(Expr, State, Visitor)>::type(BOOST_PP_ENUM_PARAMS(N, A))
- >::template result<void(Expr, State, Visitor)>
- {};
+ {
+ typedef call<typename make<Return>::template result<void(Expr, State, Visitor)>::type(BOOST_PP_ENUM_PARAMS(N, A))> impl;
+ typedef typename impl::template result<void(Expr, State, Visitor)>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
Modified: branches/fix-links/boost/xpressive/proto/transform/call.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/transform/call.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/transform/call.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// \file call.hpp
/// Contains definition of the call<> transform.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -184,50 +184,72 @@
};
template<typename Fun>
- struct call<Fun()> : callable
+ struct call<Fun()> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::call0<
- Fun
- , Expr
- , State
- , Visitor
- >
- {};
+ {
+ typedef
+ typename detail::call0<
+ Fun
+ , Expr
+ , State
+ , Visitor
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return result<void(Expr, State, Visitor)>::call(expr, state, visitor);
+ typedef
+ detail::call0<
+ Fun
+ , Expr
+ , State
+ , Visitor
+ >
+ impl;
+
+ return impl::call(expr, state, visitor);
}
};
template<typename Fun, typename Arg0>
- struct call<Fun(Arg0)> : callable
+ struct call<Fun(Arg0)> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::call1<
- Fun
- , typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
- , State
- , Visitor
- >
- {};
+ {
+ typedef
+ typename detail::call1<
+ Fun
+ , typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
+ , State
+ , Visitor
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return result<void(Expr, State, Visitor)>::call(
+ typedef
+ detail::call1<
+ Fun
+ , typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
+ , State
+ , Visitor
+ >
+ impl;
+
+ return impl::call(
detail::as_lvalue(when<_, Arg0>()(expr, state, visitor))
, state
, visitor
@@ -236,26 +258,37 @@
};
template<typename Fun, typename Arg0, typename Arg1>
- struct call<Fun(Arg0, Arg1)> : callable
+ struct call<Fun(Arg0, Arg1)> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::call2<
- Fun
- , typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
- , typename when<_, Arg1>::template result<void(Expr, State, Visitor)>::type
- , Visitor
- >
- {};
+ {
+ typedef
+ typename detail::call2<
+ Fun
+ , typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
+ , typename when<_, Arg1>::template result<void(Expr, State, Visitor)>::type
+ , Visitor
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return result<void(Expr, State, Visitor)>::call(
+ typedef
+ detail::call2<
+ Fun
+ , typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
+ , typename when<_, Arg1>::template result<void(Expr, State, Visitor)>::type
+ , Visitor
+ >
+ impl;
+
+ return impl::call(
detail::as_lvalue(when<_, Arg0>()(expr, state, visitor))
, detail::as_lvalue(when<_, Arg1>()(expr, state, visitor))
, visitor
@@ -264,22 +297,23 @@
};
template<typename Fun, typename Arg0, typename Arg1, typename Arg2>
- struct call<Fun(Arg0, Arg1, Arg2)> : callable
+ struct call<Fun(Arg0, Arg1, Arg2)> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- // TODO can I avoid boost::result_of here
- : boost::result_of<
- Fun(
- typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
- , typename when<_, Arg1>::template result<void(Expr, State, Visitor)>::type
- , typename when<_, Arg2>::template result<void(Expr, State, Visitor)>::type
- )
- >
- {};
+ {
+ typedef
+ typename boost::result_of<
+ Fun(
+ typename when<_, Arg0>::template result<void(Expr, State, Visitor)>::type
+ , typename when<_, Arg1>::template result<void(Expr, State, Visitor)>::type
+ , typename when<_, Arg2>::template result<void(Expr, State, Visitor)>::type
+ )
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -314,19 +348,21 @@
#define N BOOST_PP_ITERATION()
template<typename Fun BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
- struct call<Fun(BOOST_PP_ENUM_PARAMS(N, A))> : callable
+ struct call<Fun(BOOST_PP_ENUM_PARAMS(N, A))> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : boost::result_of<
- #define TMP(Z, M, DATA) typename when<_, BOOST_PP_CAT(A, M)>::template result<void(Expr, State, Visitor)>::type
- Fun(BOOST_PP_ENUM(N, TMP, ~))
- #undef TMP
- >
- {};
+ {
+ typedef
+ typename boost::result_of<
+ #define TMP(Z, M, DATA) typename when<_, BOOST_PP_CAT(A, M)>::template result<void(Expr, State, Visitor)>::type
+ Fun(BOOST_PP_ENUM(N, TMP, ~))
+ #undef TMP
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
Modified: branches/fix-links/boost/xpressive/proto/transform/fold.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/transform/fold.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/transform/fold.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// \file fold.hpp
/// Contains definition of the fold<> and reverse_fold<> transforms.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -11,13 +11,17 @@
#define BOOST_PROTO_TRANSFORM_FOLD_HPP_EAN_11_04_2007
#include <boost/xpressive/proto/detail/prefix.hpp>
+ #include <boost/version.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/arithmetic/inc.hpp>
#include <boost/preprocessor/arithmetic/sub.hpp>
#include <boost/preprocessor/repetition/repeat.hpp>
+ #if BOOST_VERSION >= 103500
#include <boost/fusion/include/fold.hpp>
- #include <boost/fusion/include/reverse.hpp>
+ #else
+ #include <boost/spirit/fusion/algorithm/fold.hpp>
+ #endif
#include <boost/xpressive/proto/proto_fwd.hpp>
#include <boost/xpressive/proto/fusion.hpp>
#include <boost/xpressive/proto/traits.hpp>
@@ -39,29 +43,67 @@
: v_(v)
{}
- typedef when<_, Transform> Tfx;
-
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State>
struct result<This(Expr, State)>
- : Tfx::template result<void(typename proto::detail::remove_cv_ref<Expr>::type
- , typename proto::detail::remove_cv_ref<State>::type
- , Visitor)>
- {};
+ {
+ typedef
+ typename when<_, Transform>::template result<void(
+ BOOST_PROTO_UNCVREF(Expr)
+ , BOOST_PROTO_UNCVREF(State)
+ , Visitor
+ )>::type
+ type;
+ };
+
+ #if BOOST_VERSION < 103500
+ template<typename Expr, typename State>
+ struct apply : result<void(Expr, State)> {};
+ #endif
template<typename Expr, typename State>
- typename Tfx::template result<void(Expr, State, Visitor)>::type
+ typename when<_, Transform>::template result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state) const
{
- return Tfx()(expr, state, this->v_);
+ return when<_, Transform>()(expr, state, this->v_);
}
private:
Visitor &v_;
};
+ #if BOOST_VERSION < 103500
+ template<typename Sequence, typename EnableIf = void>
+ struct as_fusion_sequence_type
+ {
+ typedef Sequence const type;
+ };
+
+ template<typename Sequence>
+ Sequence const &as_fusion_sequence(Sequence const &sequence, ...)
+ {
+ return sequence;
+ }
+
+ template<typename Sequence>
+ struct as_fusion_sequence_type<Sequence, typename Sequence::proto_is_expr_>
+ {
+ typedef typename Sequence::proto_base_expr const type;
+ };
+
+ template<typename Sequence>
+ typename Sequence::proto_base_expr const &as_fusion_sequence(Sequence const &sequence, int)
+ {
+ return sequence.proto_base();
+ }
+
+ #define BOOST_PROTO_AS_FUSION_SEQUENCE_TYPE(X) typename detail::as_fusion_sequence_type<X>::type
+ #define BOOST_PROTO_AS_FUSION_SEQUENCE(X) detail::as_fusion_sequence(X, 0)
+ #else
+ #define BOOST_PROTO_AS_FUSION_SEQUENCE_TYPE(X) X
+ #define BOOST_PROTO_AS_FUSION_SEQUENCE(X) X
+ #endif
template<typename Fun, typename Expr, typename State, typename Visitor, long Arity = Expr::proto_arity::value>
struct fold_impl
@@ -76,8 +118,12 @@
/**/
#define BOOST_PROTO_FOLD_STATE_TYPE(z, n, data)\
- typedef typename when<_, Fun>::template\
- result<void(typename Expr::BOOST_PROTO_ARG_N_TYPE(n)::proto_base_expr, BOOST_PP_CAT(state, n), Visitor)>::type\
+ typedef\
+ typename when<_, Fun>::template result<void(\
+ typename Expr::BOOST_PROTO_ARG_N_TYPE(n)::proto_base_expr\
+ , BOOST_PP_CAT(state, n)\
+ , Visitor\
+ )>::type\
BOOST_PP_CAT(state, BOOST_PP_INC(n));\
/**/
@@ -87,8 +133,12 @@
/**/
#define BOOST_PROTO_REVERSE_FOLD_STATE_TYPE(z, n, data)\
- typedef typename when<_, Fun>::template\
- result<void(typename Expr::BOOST_PROTO_ARG_N_TYPE(BOOST_PP_SUB(data, BOOST_PP_INC(n)))::proto_base_expr, BOOST_PP_CAT(state, BOOST_PP_SUB(data, n)), Visitor)>::type\
+ typedef\
+ typename when<_, Fun>::template result<void(\
+ typename Expr::BOOST_PROTO_ARG_N_TYPE(BOOST_PP_SUB(data, BOOST_PP_INC(n)))::proto_base_expr\
+ , BOOST_PP_CAT(state, BOOST_PP_SUB(data, n))\
+ , Visitor\
+ )>::type\
BOOST_PP_CAT(state, BOOST_PP_SUB(data, BOOST_PP_INC(n)));\
/**/
@@ -109,27 +159,34 @@
} // namespace detail
template<typename Sequence, typename State0, typename Fun>
- struct fold : callable
+ struct fold : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : fusion::result_of::fold<
+ {
+ typedef
typename when<_, Sequence>::template result<void(Expr, State, Visitor)>::type
- , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
- , detail::as_callable<Fun, Visitor>
- >
- {};
+ sequence;
+
+ typedef
+ typename fusion::BOOST_PROTO_FUSION_RESULT_OF::fold<
+ BOOST_PROTO_AS_FUSION_SEQUENCE_TYPE(sequence)
+ , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
+ , detail::as_callable<Fun, Visitor>
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
+ when<_, Sequence> sequence;
detail::as_callable<Fun, Visitor> fun(visitor);
return fusion::fold(
- when<_, Sequence>()(expr, state, visitor)
+ BOOST_PROTO_AS_FUSION_SEQUENCE(sequence(expr, state, visitor))
, when<_, State0>()(expr, state, visitor)
, fun
);
@@ -141,29 +198,43 @@
: fold<_reverse(Sequence), State, Fun>
{};
- // A fold transform that transforms the left sub-tree and
- // uses the result as state while transforming the right.
+ /// This specialization is only for improved compile-time performance
+ /// in the commom case when the Sequence transform is \c proto::_.
+ ///
+ /// INTERNAL ONLY
+ ///
template<typename State0, typename Fun>
- struct fold<_, State0, Fun> : callable
+ struct fold<_, State0, Fun> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::fold_impl<
- Fun
- , typename Expr::proto_base_expr
- , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
- , Visitor
- >
- {};
+ {
+ typedef
+ typename detail::fold_impl<
+ Fun
+ , typename Expr::proto_base_expr
+ , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
+ , Visitor
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return result<void(Expr, State, Visitor)>::call(
+ typedef
+ detail::fold_impl<
+ Fun
+ , typename Expr::proto_base_expr
+ , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
+ , Visitor
+ >
+ impl;
+
+ return impl::call(
expr.proto_base()
, when<_, State0>()(expr, state, visitor)
, visitor
@@ -171,29 +242,43 @@
}
};
- // A reverse_fold compiler that compiles the right sub-tree and
- // uses the result as state while compiling the left.
+ /// This specialization is only for improved compile-time performance
+ /// in the commom case when the Sequence transform is \c proto::_.
+ ///
+ /// INTERNAL ONLY
+ ///
template<typename State0, typename Fun>
- struct reverse_fold<_, State0, Fun> : callable
+ struct reverse_fold<_, State0, Fun> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::reverse_fold_impl<
- Fun
- , typename Expr::proto_base_expr
- , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
- , Visitor
- >
- {};
+ {
+ typedef
+ typename detail::reverse_fold_impl<
+ Fun
+ , typename Expr::proto_base_expr
+ , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
+ , Visitor
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return result<void(Expr, State, Visitor)>::call(
+ typedef
+ detail::reverse_fold_impl<
+ Fun
+ , typename Expr::proto_base_expr
+ , typename when<_, State0>::template result<void(Expr, State, Visitor)>::type
+ , Visitor
+ >
+ impl;
+
+ return impl::call(
expr.proto_base()
, when<_, State0>()(expr, state, visitor)
, visitor
Modified: branches/fix-links/boost/xpressive/proto/transform/fold_tree.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/transform/fold_tree.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/transform/fold_tree.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file fold.hpp
/// Contains definition of the fold_tree<> and reverse_fold_tree<> transforms.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -24,10 +24,9 @@
namespace detail
{
template<typename Tag>
- struct is_tag : callable
+ struct is_tag : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -48,10 +47,9 @@
template<typename Sequence, typename State0, typename Fun>
struct fold_tree
- : callable
+ : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -66,20 +64,24 @@
};
template<typename Expr, typename State, typename Visitor>
- typename result<fold_tree(Expr const &, State const &, Visitor &)>::type
+ typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- typedef typename result<void(Expr, State, Visitor)>::impl impl;
+ typedef fold<
+ Sequence
+ , State0
+ , detail::fold_tree_<typename Expr::proto_tag, Fun>
+ > impl;
+
return impl()(expr, state, visitor);
}
};
template<typename Sequence, typename State0, typename Fun>
struct reverse_fold_tree
- : callable
+ : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
@@ -97,7 +99,12 @@
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- typedef typename result<void(Expr, State, Visitor)>::impl impl;
+ typedef reverse_fold<
+ Sequence
+ , State0
+ , detail::reverse_fold_tree_<typename Expr::proto_tag, Fun>
+ > impl;
+
return impl()(expr, state, visitor);
}
};
Modified: branches/fix-links/boost/xpressive/proto/transform/make.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/transform/make.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/transform/make.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// \file make.hpp
/// Contains definition of the make<> transform.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -166,15 +166,15 @@
}
template<typename Fun>
- struct make : callable
+ struct make : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::make_<Fun, Expr, State, Visitor>
- {};
+ {
+ typedef typename detail::make_<Fun, Expr, State, Visitor>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -243,8 +243,9 @@
, typename Expr, typename State, typename Visitor
>
struct make_if_<R(BOOST_PP_ENUM_PARAMS(N, A)), Expr, State, Visitor, false>
- : when<_, R(BOOST_PP_ENUM_PARAMS(N, A))>::template result<void(Expr, State, Visitor)>
- {};
+ {
+ typedef typename when<_, R(BOOST_PP_ENUM_PARAMS(N, A))>::template result<void(Expr, State, Visitor)>::type type;
+ };
template<
typename R
@@ -252,8 +253,9 @@
, typename Expr, typename State, typename Visitor
>
struct make_if_<R(*)(BOOST_PP_ENUM_PARAMS(N, A)), Expr, State, Visitor, false>
- : when<_, R(BOOST_PP_ENUM_PARAMS(N, A))>::template result<void(Expr, State, Visitor)>
- {};
+ {
+ typedef typename when<_, R(BOOST_PP_ENUM_PARAMS(N, A))>::template result<void(Expr, State, Visitor)>::type type;
+ };
template<typename T, typename A>
struct construct_<proto::expr<T, A, N>, true>
@@ -269,15 +271,15 @@
}
template<typename Return BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
- struct make<Return(BOOST_PP_ENUM_PARAMS(N, A))> : callable
+ struct make<Return(BOOST_PP_ENUM_PARAMS(N, A))> : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : detail::make_<Return, Expr, State, Visitor>
- {};
+ {
+ typedef typename detail::make_<Return, Expr, State, Visitor>::type type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -295,10 +297,13 @@
#if BOOST_WORKAROUND(__GNUC__, == 3)
// work around GCC bug
template<typename Tag, typename Args, long Arity BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
- struct make<proto::expr<Tag, Args, Arity>(BOOST_PP_ENUM_PARAMS(N, A))> : callable
+ struct make<proto::expr<Tag, Args, Arity>(BOOST_PP_ENUM_PARAMS(N, A))>
+ : proto::callable
{
- template<typename Sig>
- struct result
+ template<typename Sig> struct result {};
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
{
typedef proto::expr<Tag, Args, Arity> type;
};
Modified: branches/fix-links/boost/xpressive/proto/transform/pass_through.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/transform/pass_through.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/transform/pass_through.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// \file pass_through.hpp
/// TODO
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -23,17 +23,26 @@
{
namespace detail
{
- template<typename Grammar, typename Expr, typename State, typename Visitor, long Arity = Expr::proto_arity::value>
- struct pass_through_impl {};
+ template<
+ typename Grammar
+ , typename Expr
+ , typename State
+ , typename Visitor
+ , long Arity = Expr::proto_arity::value
+ >
+ struct pass_through_impl
+ {};
- #define BOOST_PROTO_DEFINE_TRANSFORM_TYPE(z, n, data)\
- typename Grammar::BOOST_PP_CAT(proto_arg, n)\
- ::template result<void(typename Expr::BOOST_PP_CAT(proto_arg, n)::proto_base_expr, State, Visitor)>\
- ::type
-
- #define BOOST_PROTO_DEFINE_TRANSFORM(z, n, data)\
- typename Grammar::BOOST_PP_CAT(proto_arg, n)()(\
- expr.BOOST_PP_CAT(arg, n).proto_base(), state, visitor\
+ #define BOOST_PROTO_DEFINE_TRANSFORM_TYPE(z, n, data) \
+ typename Grammar::BOOST_PP_CAT(proto_arg, n)::template result<void( \
+ typename Expr::BOOST_PP_CAT(proto_arg, n)::proto_base_expr \
+ , State \
+ , Visitor \
+ )>::type
+
+ #define BOOST_PROTO_DEFINE_TRANSFORM(z, n, data) \
+ typename Grammar::BOOST_PP_CAT(proto_arg, n)()( \
+ expr.BOOST_PP_CAT(arg, n).proto_base(), state, visitor \
)
#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, BOOST_PROTO_MAX_ARITY, <boost/xpressive/proto/transform/pass_through.hpp>))
@@ -55,27 +64,39 @@
} // namespace detail
template<typename Grammar>
- struct pass_through : callable
+ struct pass_through : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : transform::detail::pass_through_impl<
- Grammar
- , typename Expr::proto_base_expr
- , State
- , Visitor
- , Expr::proto_arity::value
- >
- {};
+ {
+ typedef
+ typename transform::detail::pass_through_impl<
+ Grammar
+ , typename Expr::proto_base_expr
+ , State
+ , Visitor
+ , Expr::proto_arity::value
+ >::type
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
- return result<void(Expr, State, Visitor)>::call(expr.proto_base(), state, visitor);
+ typedef
+ transform::detail::pass_through_impl<
+ Grammar
+ , typename Expr::proto_base_expr
+ , State
+ , Visitor
+ , Expr::proto_arity::value
+ >
+ impl;
+
+ return impl::call(expr.proto_base(), state, visitor);
}
};
Modified: branches/fix-links/boost/xpressive/proto/transform/when.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/proto/transform/when.hpp (original)
+++ branches/fix-links/boost/xpressive/proto/transform/when.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// \file when.hpp
/// Definition of when transform.
//
- // Copyright 2007 Eric Niebler. Distributed under the Boost
+ // Copyright 2008 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)
@@ -56,31 +56,36 @@
template<typename Grammar, typename Return BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
struct when<Grammar, Return(BOOST_PP_ENUM_PARAMS(N, A))>
- : callable
+ : proto::callable
{
- typedef Return when_function_type_(BOOST_PP_ENUM_PARAMS(N, A));
typedef typename Grammar::proto_base_expr proto_base_expr;
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : mpl::if_<
- is_callable<Return>
- , call<when_function_type_> // "Return" is a function to call
- , make<when_function_type_> // "Return" is an object to construct
- >::type::template result<void(Expr, State, Visitor)>
- {};
+ {
+ typedef
+ typename mpl::if_<
+ is_callable<Return>
+ , call<Return(BOOST_PP_ENUM_PARAMS(N, A))> // "Return" is a function to call
+ , make<Return(BOOST_PP_ENUM_PARAMS(N, A))> // "Return" is an object to construct
+ >::type
+ impl;
+
+ typedef typename impl::template result<void(Expr, State, Visitor)>::type type;
+ };
+ /// Function call operator
+ ///
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
operator ()(Expr const &expr, State const &state, Visitor &visitor) const
{
return typename mpl::if_<
is_callable<Return>
- , call<when_function_type_>
- , make<when_function_type_>
+ , call<Return(BOOST_PP_ENUM_PARAMS(N, A))>
+ , make<Return(BOOST_PP_ENUM_PARAMS(N, A))>
>::type()(expr, state, visitor);
}
};
Modified: branches/fix-links/boost/xpressive/regex_actions.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/regex_actions.hpp (original)
+++ branches/fix-links/boost/xpressive/regex_actions.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file regex_actions.hpp
/// Defines the syntax elements of xpressive's action expressions.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/regex_algorithms.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/regex_algorithms.hpp (original)
+++ branches/fix-links/boost/xpressive/regex_algorithms.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file regex_algorithms.hpp
/// Contains the regex_match(), regex_search() and regex_replace() algorithms.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -537,7 +537,7 @@
}
out = what.format(out, fmt, flags);
- cur = state.cur_ = what[0].second;
+ cur = state.cur_ = state.next_search_ = what[0].second;
if(0 == (flags & format_first_only))
{
@@ -552,7 +552,7 @@
access::set_prefix_suffix(what, begin, end);
out = what.format(out, fmt, flags);
- cur = state.cur_ = what[0].second;
+ cur = state.cur_ = state.next_search_ = what[0].second;
not_null = (0 == what.length());
state.reset(what, *access::get_regex_impl(re));
}
Modified: branches/fix-links/boost/xpressive/regex_compiler.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/regex_compiler.hpp (original)
+++ branches/fix-links/boost/xpressive/regex_compiler.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// Contains the definition of regex_compiler, a factory for building regex objects
/// from strings.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -106,7 +106,7 @@
/// represented by the character range.
/// \pre InputIter is a model of the InputIterator concept.
/// \pre [begin,end) is a valid range.
- /// \pre The range of characters specified by [begin,end) contains a
+ /// \pre The range of characters specified by [begin,end) contains a
/// valid string-based representation of a regular expression.
/// \throw regex_error when the range of characters has invalid regular
/// expression syntax.
Modified: branches/fix-links/boost/xpressive/regex_constants.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/regex_constants.hpp (original)
+++ branches/fix-links/boost/xpressive/regex_constants.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// Contains definitions for the syntax_option_type, match_flag_type and
/// error_type enumerations.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/regex_error.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/regex_error.hpp (original)
+++ branches/fix-links/boost/xpressive/regex_error.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file regex_error.hpp
/// Contains the definition of the regex_error exception class.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/regex_iterator.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/regex_iterator.hpp (original)
+++ branches/fix-links/boost/xpressive/regex_iterator.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// Contains the definition of the regex_iterator type, an STL-compatible iterator
/// for stepping through all the matches in a sequence.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -39,6 +39,7 @@
BidiIter begin
, BidiIter cur
, BidiIter end
+ , BidiIter next_search
, basic_regex<BidiIter> const *rex
, regex_constants::match_flag_type flags
, bool not_null = false
@@ -50,6 +51,7 @@
, not_null_(not_null)
{
this->state_.cur_ = cur;
+ this->state_.next_search_ = next_search;
}
bool next()
@@ -63,7 +65,7 @@
// Report position() correctly by setting the base different from prefix().first
access::set_base(this->what_, this->state_.begin_);
- this->state_.cur_ = this->what_[0].second;
+ this->state_.cur_ = this->state_.next_search_ = this->what_[0].second;
this->not_null_ = (0 == this->what_.length());
return true;
@@ -116,7 +118,7 @@
, basic_regex<BidiIter> const &rex
, regex_constants::match_flag_type flags = regex_constants::match_default
)
- : impl_(new impl_type_(begin, begin, end, &rex, flags))
+ : impl_(new impl_type_(begin, begin, end, begin, &rex, flags))
{
this->next_();
}
@@ -130,7 +132,7 @@
, detail::let_<LetExpr> const &args
, regex_constants::match_flag_type flags = regex_constants::match_default
)
- : impl_(new impl_type_(begin, begin, end, &rex, flags))
+ : impl_(new impl_type_(begin, begin, end, begin, &rex, flags))
{
detail::bind_args(args, this->impl_->what_);
this->next_();
@@ -222,6 +224,7 @@
that->state_.begin_
, that->state_.cur_
, that->state_.end_
+ , that->state_.next_search_
, that->rex_
, that->flags_
, that->not_null_
Modified: branches/fix-links/boost/xpressive/regex_primitives.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/regex_primitives.hpp (original)
+++ branches/fix-links/boost/xpressive/regex_primitives.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file regex_primitives.hpp
/// Contains the syntax elements for writing static regular expressions.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -118,19 +118,21 @@
// replace "Expr" with "keep(*State) >> Expr"
struct skip_primitives : proto::callable
{
- template<typename Sig>
- struct result;
+ template<typename Sig> struct result {};
template<typename This, typename Expr, typename State, typename Visitor>
struct result<This(Expr, State, Visitor)>
- : proto::shift_right<
- typename proto::unary_expr<
- keeper_tag
- , typename proto::dereference<State>::type
+ {
+ typedef
+ typename proto::shift_right<
+ typename proto::unary_expr<
+ keeper_tag
+ , typename proto::dereference<State>::type
+ >::type
+ , Expr
>::type
- , Expr
- >
- {};
+ type;
+ };
template<typename Expr, typename State, typename Visitor>
typename result<void(Expr, State, Visitor)>::type
@@ -146,7 +148,7 @@
: proto::or_<
proto::terminal<proto::_>
, proto::comma<proto::_, proto::_>
- , proto::subscript<proto::terminal<set_initializer>, proto::_>
+ , proto::subscript<proto::terminal<set_initializer>, proto::_>
, proto::assign<proto::terminal<set_initializer>, proto::_>
, proto::assign<proto::terminal<attribute_placeholder<proto::_> >, proto::_>
, proto::complement<Primitives>
@@ -178,15 +180,18 @@
template<typename This, typename Expr>
struct result<This(Expr)>
- : proto::shift_right<
- typename SkipGrammar::result<void(
- typename proto::result_of::as_expr<Expr>::type
- , skip_type
- , mpl::void_
- )>::type
- , typename proto::dereference<skip_type>::type
- >
- {};
+ {
+ typedef
+ typename proto::shift_right<
+ typename SkipGrammar::result<void(
+ typename proto::result_of::as_expr<Expr>::type
+ , skip_type
+ , mpl::void_
+ )>::type
+ , typename proto::dereference<skip_type>::type
+ >::type
+ type;
+ };
template<typename Expr>
typename result<skip_directive(Expr)>::type
@@ -603,11 +608,19 @@
/// \brief Make a sub-expression optional. Equivalent to !as_xpr(expr).
///
/// \param expr The sub-expression to make optional.
-#ifdef BOOST_XPRESSIVE_DOXYGEN_INVOKED
-template<typename Expr> detail::unspecified optional(Expr const &expr) { return 0; }
-#else
-proto::functional::make_expr<proto::tag::logical_not, proto::default_domain> const optional = {};
-#endif
+template<typename Expr>
+typename proto::result_of::make_expr<
+ proto::tag::logical_not
+ , proto::default_domain
+ , Expr const &
+>::type const
+optional(Expr const &expr)
+{
+ return proto::make_expr<
+ proto::tag::logical_not
+ , proto::default_domain
+ >(boost::ref(expr));
+}
///////////////////////////////////////////////////////////////////////////////
/// \brief Repeat a sub-expression multiple times.
@@ -621,19 +634,33 @@
///
/// \param expr The sub-expression to repeat.
template<unsigned int Min, unsigned int Max, typename Expr>
-typename proto::result_of::make_expr<detail::generic_quant_tag<Min, Max>, proto::default_domain, Expr const>::type const
+typename proto::result_of::make_expr<
+ detail::generic_quant_tag<Min, Max>
+ , proto::default_domain
+ , Expr const &
+>::type const
repeat(Expr const &expr)
{
- return proto::make_expr<detail::generic_quant_tag<Min, Max>, proto::default_domain>(expr);
+ return proto::make_expr<
+ detail::generic_quant_tag<Min, Max>
+ , proto::default_domain
+ >(boost::ref(expr));
}
/// \overload
///
template<unsigned int Count, typename Expr2>
-typename proto::result_of::make_expr<detail::generic_quant_tag<Count, Count>, proto::default_domain, Expr2 const>::type const
+typename proto::result_of::make_expr<
+ detail::generic_quant_tag<Count, Count>
+ , proto::default_domain
+ , Expr2 const &
+>::type const
repeat(Expr2 const &expr2)
{
- return proto::make_expr<detail::generic_quant_tag<Count, Count>, proto::default_domain>(expr2);
+ return proto::make_expr<
+ detail::generic_quant_tag<Count, Count>
+ , proto::default_domain
+ >(boost::ref(expr2));
}
///////////////////////////////////////////////////////////////////////////////
@@ -646,11 +673,19 @@
/// \attention keep(expr) is equivalent to the perl (?>...) extension.
///
/// \param expr The sub-expression to modify.
-#ifdef BOOST_XPRESSIVE_DOXYGEN_INVOKED
-template<typename Expr> detail::unspecified keep(Expr const &expr) { return 0; }
-#else
-proto::functional::make_expr<detail::keeper_tag, proto::default_domain> const keep = {};
-#endif
+template<typename Expr>
+typename proto::result_of::make_expr<
+ detail::keeper_tag
+ , proto::default_domain
+ , Expr const &
+>::type const
+keep(Expr const &expr)
+{
+ return proto::make_expr<
+ detail::keeper_tag
+ , proto::default_domain
+ >(boost::ref(expr));
+}
///////////////////////////////////////////////////////////////////////////////
/// \brief Look-ahead assertion.
@@ -665,11 +700,19 @@
/// perl (?!...) extension.
///
/// \param expr The sub-expression to put in the look-ahead assertion.
-#ifdef BOOST_XPRESSIVE_DOXYGEN_INVOKED
-template<typename Expr> detail::unspecified before(Expr const &expr) { return 0; }
-#else
-proto::functional::make_expr<detail::lookahead_tag, proto::default_domain> const before = {};
-#endif
+template<typename Expr>
+typename proto::result_of::make_expr<
+ detail::lookahead_tag
+ , proto::default_domain
+ , Expr const &
+>::type const
+before(Expr const &expr)
+{
+ return proto::make_expr<
+ detail::lookahead_tag
+ , proto::default_domain
+ >(boost::ref(expr));
+}
///////////////////////////////////////////////////////////////////////////////
/// \brief Look-behind assertion.
@@ -686,11 +729,19 @@
/// \param expr The sub-expression to put in the look-ahead assertion.
///
/// \pre expr cannot match a variable number of characters.
-#ifdef BOOST_XPRESSIVE_DOXYGEN_INVOKED
-template<typename Expr> detail::unspecified after(Expr const &expr) { return 0; }
-#else
-proto::functional::make_expr<detail::lookbehind_tag, proto::default_domain> const after = {};
-#endif
+template<typename Expr>
+typename proto::result_of::make_expr<
+ detail::lookbehind_tag
+ , proto::default_domain
+ , Expr const &
+>::type const
+after(Expr const &expr)
+{
+ return proto::make_expr<
+ detail::lookbehind_tag
+ , proto::default_domain
+ >(boost::ref(expr));
+}
///////////////////////////////////////////////////////////////////////////////
/// \brief Specify a regex traits or a std::locale.
@@ -751,7 +802,7 @@
/// >> *set[_s | punct];
/// \endcode
///
-/// \attention Skipping does not affect how nested regexes are handles because
+/// \attention Skipping does not affect how nested regexes are handled because
/// they are treated atomically. String literals are also treated
/// atomically; that is, no skipping is done within a string literal. So
/// <tt>skip(_s)("this that")</tt> is not the same as
@@ -810,10 +861,6 @@
ignore_unused(a8);
ignore_unused(a9);
ignore_unused(as_xpr);
- ignore_unused(optional);
- ignore_unused(before);
- ignore_unused(after);
- ignore_unused(keep);
}
}
Modified: branches/fix-links/boost/xpressive/regex_token_iterator.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/regex_token_iterator.hpp (original)
+++ branches/fix-links/boost/xpressive/regex_token_iterator.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// Contains the definition of regex_token_iterator, and STL-compatible iterator
/// for tokenizing a string using a regular expression.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
@@ -39,13 +39,14 @@
BidiIter begin
, BidiIter cur
, BidiIter end
+ , BidiIter next_search
, basic_regex<BidiIter> const *rex
, regex_constants::match_flag_type flags = regex_constants::match_default
, std::vector<int> subs = std::vector<int>(1, 0)
, int n = -2
, bool not_null = false
)
- : iter_(begin, cur, end, rex, flags, not_null)
+ : iter_(begin, cur, end, next_search, rex, flags, not_null)
, result_()
, n_((-2 == n) ? (int)subs.size() - 1 : n)
, subs_()
@@ -158,7 +159,7 @@
, BidiIter end
, basic_regex<BidiIter> const &rex
)
- : impl_(new impl_type_(begin, begin, end, &rex))
+ : impl_(new impl_type_(begin, begin, end, begin, &rex))
{
this->next_();
}
@@ -176,7 +177,7 @@
, basic_regex<BidiIter> const &rex
, detail::let_<LetExpr> const &args
)
- : impl_(new impl_type_(begin, begin, end, &rex))
+ : impl_(new impl_type_(begin, begin, end, begin, &rex))
{
detail::bind_args(args, this->impl_->iter_.what_);
this->next_();
@@ -198,7 +199,7 @@
, Subs const &subs
, regex_constants::match_flag_type flags = regex_constants::match_default
)
- : impl_(new impl_type_(begin, begin, end, &rex, flags, detail::to_vector(subs)))
+ : impl_(new impl_type_(begin, begin, end, begin, &rex, flags, detail::to_vector(subs)))
{
this->next_();
}
@@ -221,7 +222,7 @@
, detail::let_<LetExpr> const &args
, regex_constants::match_flag_type flags = regex_constants::match_default
)
- : impl_(new impl_type_(begin, begin, end, &rex, flags, detail::to_vector(subs)))
+ : impl_(new impl_type_(begin, begin, end, begin, &rex, flags, detail::to_vector(subs)))
{
detail::bind_args(args, this->impl_->iter_.what_);
this->next_();
@@ -307,6 +308,7 @@
this->impl_->iter_.state_.begin_
, this->impl_->iter_.state_.cur_
, this->impl_->iter_.state_.end_
+ , this->impl_->iter_.state_.next_search_
, this->impl_->iter_.rex_
, this->impl_->iter_.flags_
, this->impl_->subs_
Modified: branches/fix-links/boost/xpressive/regex_traits.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/regex_traits.hpp (original)
+++ branches/fix-links/boost/xpressive/regex_traits.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// Includes the C regex traits or the CPP regex traits header file depending on the
/// BOOST_XPRESSIVE_USE_C_TRAITS macro.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/sub_match.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/sub_match.hpp (original)
+++ branches/fix-links/boost/xpressive/sub_match.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// Contains the definition of the class template sub_match\<\>
/// and associated helper functions
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/traits/c_regex_traits.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/traits/c_regex_traits.hpp (original)
+++ branches/fix-links/boost/xpressive/traits/c_regex_traits.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -4,7 +4,7 @@
/// wrapper for the C locale functions that can be used to customize the
/// behavior of static and dynamic regexes.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/traits/cpp_regex_traits.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/traits/cpp_regex_traits.hpp (original)
+++ branches/fix-links/boost/xpressive/traits/cpp_regex_traits.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -4,7 +4,7 @@
/// wrapper for std::locale that can be used to customize the behavior of
/// static and dynamic regexes.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/traits/detail/c_ctype.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/traits/detail/c_ctype.hpp (original)
+++ branches/fix-links/boost/xpressive/traits/detail/c_ctype.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// c_ctype.hpp
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/traits/null_regex_traits.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/traits/null_regex_traits.hpp (original)
+++ branches/fix-links/boost/xpressive/traits/null_regex_traits.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -4,7 +4,7 @@
/// stub regex traits implementation that can be used by static and dynamic
/// regexes for searching non-character data.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/xpressive.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/xpressive.hpp (original)
+++ branches/fix-links/boost/xpressive/xpressive.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// Includes all of xpressive including support for both static and
/// dynamic regular expressions.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/xpressive_dynamic.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/xpressive_dynamic.hpp (original)
+++ branches/fix-links/boost/xpressive/xpressive_dynamic.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file xpressive_dynamic.hpp
/// Includes everything you need to write and use dynamic regular expressions.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/xpressive_fwd.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/xpressive_fwd.hpp (original)
+++ branches/fix-links/boost/xpressive/xpressive_fwd.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file xpressive_fwd.hpp
/// Forward declarations for all of xpressive's public data types.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/xpressive_static.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/xpressive_static.hpp (original)
+++ branches/fix-links/boost/xpressive/xpressive_static.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3,7 +3,7 @@
/// Includes everything you need to write static regular expressions and use
/// them.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/boost/xpressive/xpressive_typeof.hpp
==============================================================================
--- branches/fix-links/boost/xpressive/xpressive_typeof.hpp (original)
+++ branches/fix-links/boost/xpressive/xpressive_typeof.hpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -2,7 +2,7 @@
/// \file xpressive_typeof.hpp
/// Type registrations so that xpressive can be used with the Boost.Typeof library.
//
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 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)
Modified: branches/fix-links/libs/accumulators/doc/Jamfile.v2
==============================================================================
--- branches/fix-links/libs/accumulators/doc/Jamfile.v2 (original)
+++ branches/fix-links/libs/accumulators/doc/Jamfile.v2 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -172,9 +172,6 @@
<xsl:param>toc.max.depth=4
<xsl:param>toc.section.depth=4
<xsl:param>chunk.section.depth=2
- <dependency>accdoc
- <dependency>statsdoc
- <dependency>opdoc
;
boostbook standalone
@@ -185,4 +182,7 @@
<xsl:param>toc.max.depth=4
<xsl:param>toc.section.depth=4
<xsl:param>chunk.section.depth=2
+ <dependency>accdoc
+ <dependency>statsdoc
+ <dependency>opdoc
;
Modified: branches/fix-links/libs/circular_buffer/doc/circular_buffer.html
==============================================================================
--- branches/fix-links/libs/circular_buffer/doc/circular_buffer.html (original)
+++ branches/fix-links/libs/circular_buffer/doc/circular_buffer.html 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -30,6 +30,11 @@
<a href="#briefexample">Introductory Example</a><br>
<a href="#synopsis">Synopsis</a><br>
<a href="#rationale">Rationale</a><br>
+ - Thread-Safety<br>
+ - Overwrite Operation<br>
+ - Writing to a Full Buffer<br>
+ - Reading/Removing from an Empty Buffer<br>
+ - Iterator Invalidation<br>
<a href="#caveats">Caveats</a><br>
<a href="#debug">Debug Support</a><br>
<a href="#examples">More Examples</a><br>
@@ -366,9 +371,10 @@
</h4>
<p>
The thread-safety of the <code>circular_buffer</code> is the same as the thread-safety of containers in most STL
- implementations. This means the <code>circular_buffer</code> is thread-safe only in the sense that simultaneous
- accesses to distinct instances of the <code>circular_buffer</code> are safe, and simultaneous read accesses to a
- shared <code>circular_buffer</code> are safe.
+ implementations. This means the <code>circular_buffer</code> is <b>not</b> thread-safe. The thread-safety is
+ guarantied only in the sense that simultaneous accesses to <b>distinct</b> instances of the
+ <code>circular_buffer</code> are safe, and simultaneous read accesses to a shared <code>circular_buffer</code>
+ are safe.
</p>
<p>
If multiple threads access a single <code>circular_buffer</code>, and at least one of the threads may potentially
@@ -378,7 +384,7 @@
Buffer Example</a>.)
</p>
<h4>
- Overwrite Operation
+ <a name="overwrite" id="overwrite">Overwrite Operation</a>
</h4>
<p>
Overwrite operation occurs when an element is inserted into a full <code>circular_buffer</code> - the old element
@@ -397,7 +403,7 @@
being shifted (e.g. as a result of insertion into the middle of container).
</p>
<h4>
- Writing to a Full Buffer
+ <a name="fullbuffer" id="fullbuffer">Writing to a Full Buffer</a>
</h4>
<p>
There are several options how to cope with the case if a data source produces more data than can fit in the
@@ -429,7 +435,7 @@
contrary to <code>std::vector</code>, it bears an overhead for its circular behaviour.
</p>
<h4>
- Reading/Removing from an Empty Buffer
+ <a name="emptybuffer" id="emptybuffer">Reading/Removing from an Empty Buffer</a>
</h4>
<p>
When reading or removing an element from an empty buffer, the buffer should be able to notify the data consumer
@@ -450,7 +456,7 @@
which throws an exception when the index is out of range.
</p>
<h4>
- Iterator Invalidation
+ <a name="iteratorinvalidation" id="iteratorinvalidation">Iterator Invalidation</a>
</h4>
<p>
An iterator is usually considered to be invalidated if an element, the iterator pointed to, had been removed or
@@ -933,11 +939,11 @@
</dl>
<dl>
<dt>
- <b>Note:</b>
+ <b>Warning:</b>
</dt>
<dd>
This constructor has been defined only due to compatibility with the STL container definition. Avoid
- using it because it may allocate very large amount of memory.
+ using it because it may allocate <b>very large</b> amount of memory.
</dd>
</dl>
</td>
@@ -5986,6 +5992,19 @@
</dl>
<dl>
<dt>
+ <b>Note:</b>
+ </dt>
+ <dd>
+ This method is symetric to the <code><a href=
+ "#classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3">erase(iterator)</a></code> method
+ and is more effective than <code><a href=
+ "#classboost_1_1circular__buffer_197155de712db1759e1698455b49a0be3">erase(iterator)</a></code> if the
+ iterator <code>pos</code> is close to the beginning of the <code>circular_buffer</code>. (See the
+ <i>Complexity</i>.)
+ </dd>
+ </dl>
+ <dl>
+ <dt>
<b>See Also:</b>
</dt>
<dd>
@@ -6097,6 +6116,21 @@
</dl>
<dl>
<dt>
+ <b>Note:</b>
+ </dt>
+ <dd>
+ This method is symetric to the <code><a href=
+ "#classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd">erase(iterator,
+ iterator)</a></code> method and is more effective than <code><a href=
+ "#classboost_1_1circular__buffer_1a96415389509a18bd7d7b5d8e4dda9bd">erase(iterator,
+ iterator)</a></code> if <code>std::distance(<a href=
+ "#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin()</a>, first)</code> is lower
+ that <code>std::distance(last, <a href=
+ "#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>)</code>.
+ </dd>
+ </dl>
+ <dl>
+ <dt>
<b>See Also:</b>
</dt>
<dd>
Modified: branches/fix-links/libs/circular_buffer/doc/space_optimized.html
==============================================================================
--- branches/fix-links/libs/circular_buffer/doc/space_optimized.html (original)
+++ branches/fix-links/libs/circular_buffer/doc/space_optimized.html 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -3922,6 +3922,17 @@
</dl>
<dl>
<dt>
+ <b>Note:</b>
+ </dt>
+ <dd>
+ Basically there is no difference between <code><a href=
+ "#classboost_1_1circular__buffer__space__optimized_136feadef225bd8a10962a92c4ffcdfd3">erase(iterator)</a></code>
+ and this method. It is implemented only for consistency with the base <code><a href=
+ "circular_buffer.html">circular_buffer</a></code>.
+ </dd>
+ </dl>
+ <dl>
+ <dt>
<b>See Also:</b>
</dt>
<dd>
@@ -4043,6 +4054,17 @@
</dl>
<dl>
<dt>
+ <b>Note:</b>
+ </dt>
+ <dd>
+ Basically there is no difference between <code><a href=
+ "#classboost_1_1circular__buffer__space__optimized_19e9a4e0dfca27329da78e014d97201ca">erase(iterator,
+ iterator)</a></code> and this method. It is implemented only for consistency with the base
+ <code>circular_buffer</code>.
+ </dd>
+ </dl>
+ <dl>
+ <dt>
<b>See Also:</b>
</dt>
<dd>
Modified: branches/fix-links/libs/circular_buffer/test/base_test.cpp
==============================================================================
--- branches/fix-links/libs/circular_buffer/test/base_test.cpp (original)
+++ branches/fix-links/libs/circular_buffer/test/base_test.cpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -189,7 +189,6 @@
BOOST_CHECK(!(end - 1 < it));
}
-// TODO add insert, push_back etc.
void iterator_invalidation_test() {
#if !defined(NDEBUG) && !defined(BOOST_CB_DISABLE_DEBUG)
Modified: branches/fix-links/libs/circular_buffer/test/common.ipp
==============================================================================
--- branches/fix-links/libs/circular_buffer/test/common.ipp (original)
+++ branches/fix-links/libs/circular_buffer/test/common.ipp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -534,9 +534,11 @@
BOOST_CHECK(cb1.reserve() == 0);
BOOST_CHECK(cb1.full());
BOOST_CHECK(cb1.empty());
+ BOOST_CHECK(cb1.reserve() == cb1.capacity() - cb1.size());
BOOST_CHECK(cb2.capacity() == 10);
BOOST_CHECK(cb2.size() == 0);
BOOST_CHECK(cb2.reserve() == 10);
+ BOOST_CHECK(cb2.reserve() == cb2.capacity() - cb2.size());
cb1.push_back(1);
cb2.push_back(2);
@@ -548,9 +550,11 @@
BOOST_CHECK(cb1.reserve() == 0);
BOOST_CHECK(cb1.full());
BOOST_CHECK(cb1.empty());
+ BOOST_CHECK(cb1.reserve() == cb1.capacity() - cb1.size());
BOOST_CHECK(cb2.capacity() == 10);
BOOST_CHECK(cb2.size() == 3);
BOOST_CHECK(cb2.reserve() == 7);
+ BOOST_CHECK(cb2.reserve() == cb2.capacity() - cb2.size());
generic_test(cb1);
generic_test(cb2);
Modified: branches/fix-links/libs/function_types/build/timestamps/cc_names
==============================================================================
--- branches/fix-links/libs/function_types/build/timestamps/cc_names (original)
+++ branches/fix-links/libs/function_types/build/timestamps/cc_names 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1,2 +1 @@
-timestamp file
-
+timestamp file
Modified: branches/fix-links/libs/function_types/build/timestamps/encoding
==============================================================================
--- branches/fix-links/libs/function_types/build/timestamps/encoding (original)
+++ branches/fix-links/libs/function_types/build/timestamps/encoding 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -1 +1 @@
-timestamp file
+timestamp file
Modified: branches/fix-links/libs/functional/hash/test/hash_number_test.cpp
==============================================================================
--- branches/fix-links/libs/functional/hash/test/hash_number_test.cpp (original)
+++ branches/fix-links/libs/functional/hash/test/hash_number_test.cpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -150,8 +150,8 @@
NUMERIC_TEST(unsigned long, ulong)
#if defined(BOOST_HAS_LONG_LONG)
- NUMERIC_TEST_NO_LIMITS(long long, hash_longlong)
- NUMERIC_TEST_NO_LIMITS(unsigned long long, ulonglong)
+ NUMERIC_TEST_NO_LIMITS(boost::long_long_type, long_long)
+ NUMERIC_TEST_NO_LIMITS(boost::ulong_long_type, ulong_long)
#endif
NUMERIC_TEST(float, float)
Modified: branches/fix-links/libs/gil/test/image.cpp
==============================================================================
--- branches/fix-links/libs/gil/test/image.cpp (original)
+++ branches/fix-links/libs/gil/test/image.cpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -17,6 +17,7 @@
#include <string>
#include <vector>
+#include <ios>
#include <iostream>
#include <fstream>
#include <map>
Deleted: branches/fix-links/libs/graph/doc/edmunds_karp_max_flow.html
==============================================================================
--- branches/fix-links/libs/graph/doc/edmunds_karp_max_flow.html 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
+++ (empty file)
@@ -1,247 +0,0 @@
-<HTML>
-<!--
- -- Copyright (c) Jeremy Siek 2000
- --
- -- Distributed under the Boost Software License, Version 1.0.
- -- (See accompanying file LICENSE_1_0.txt or copy at
- -- http://www.boost.org/LICENSE_1_0.txt)
- -->
-<Head>
-<Title>Boost Graph Library: Edmunds-Karp Maximum Flow</Title>
-<BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
- ALINK="#ff0000">
-<IMG SRC="../../../boost.png"
- ALT="C++ Boost" width="277" height="86">
-
-<BR Clear>
-
-<H1><A NAME="sec:edmunds_karp_max_flow">
-<TT>edmunds_karp_max_flow</TT>
-</H1>
-
-<PRE>
-<i>// named paramter version</i>
-template <class Graph, class P, class T, class R>
-typename detail::edge_capacity_value<Graph, P, T, R>::value_type
-edmunds_karp_max_flow(Graph& g,
- typename graph_traits<Graph>::vertex_descriptor src,
- typename graph_traits<Graph>::vertex_descriptor sink,
- const bgl_named_params<P, T, R>& params = <i>all defaults</i>)
-
-<i>// non-named parameter version</i>
-template <class Graph,
- class CapacityEdgeMap, class ResidualCapacityEdgeMap,
- class ReverseEdgeMap, class ColorMap, class PredEdgeMap>
-typename property_traits<CapacityEdgeMap>::value_type
-edmunds_karp_max_flow(Graph& g,
- typename graph_traits<Graph>::vertex_descriptor src,
- typename graph_traits<Graph>::vertex_descriptor sink,
- CapacityEdgeMap cap, ResidualCapacityEdgeMap res, ReverseEdgeMap rev,
- ColorMap color, PredEdgeMap pred)
-</PRE>
-
-<P>
-The <tt>edmunds_karp_max_flow()</tt> function calculates the maximum flow
-of a network. See Section <a
-href="./graph_theory_review.html#sec:network-flow-algorithms">Network
-Flow Algorithms</a> for a description of maximum flow. The calculated
-maximum flow will be the return value of the function. The function
-also calculates the flow values <i>f(u,v)</i> for all <i>(u,v)</i> in
-<i>E</i>, which are returned in the form of the residual capacity
-<i>r(u,v) = c(u,v) - f(u,v)</i>.
-
-<p>
-There are several special requirements on the input graph and property
-map parameters for this algorithm. First, the directed graph
-<i>G=(V,E)</i> that represents the network must be augmented to
-include the reverse edge for every edge in <i>E</i>. That is, the
-input graph should be <i>G<sub>in</sub> = (V,{E U
-E<sup>T</sup>})</i>. The <tt>ReverseEdgeMap</tt> argument <tt>rev</tt>
-must map each edge in the original graph to its reverse edge, that is
-<i>(u,v) -> (v,u)</i> for all <i>(u,v)</i> in <i>E</i>. The
-<tt>CapacityEdgeMap</tt> argument <tt>cap</tt> must map each edge in
-<i>E</i> to a positive number, and each edge in <i>E<sup>T</sup></i>
-to 0.
-
-<p>
-The algorithm is due to <a
-href="./bibliography.html#edmonds72:_improvements_netflow">Edmonds and
-Karp</a>, though we are using the variation called the ``labeling
-algorithm'' described in <a
-href="./bibliography.html#ahuja93:_network_flows">Network Flows</a>.
-
-<p>
-This algorithm provides a very simple and easy to implement solution to
-the maximum flow problem. However, there are several reasons why this
-algorithm is not as good as the <a
-href="./push_relabel_max_flow.html"><tt>push_relabel_max_flow()</tt></a>
-or the <a
-href="./kolmogorov_max_flow.html"><tt>kolmogorov_max_flow()</tt></a>
-algorithm.
-
-<ul>
- <li>In the non-integer capacity case, the time complexity is <i>O(V
- E<sup>2</sup>)</i> which is worse than the time complexity of the
- push-relabel algorithm <i>O(V<sup>2</sup>E<sup>1/2</sup>)</i>
- for all but the sparsest of graphs.</li>
-
- <li>In the integer capacity case, if the capacity bound <i>U</i> is
- very large then the algorithm will take a long time.</li>
-</ul>
-
-
-<H3>Where Defined</H3>
-
-<P>
-boost/graph/edmunds_karp_max_flow.hpp
-
-<P>
-
-<h3>Parameters</h3>
-
-IN: <tt>Graph& g</tt>
-<blockquote>
- A directed graph. The
- graph's type must be a model of <a
- href="./VertexListGraph.html">VertexListGraph</a> and IncidenceGraph For each edge
- <i>(u,v)</i> in the graph, the reverse edge <i>(v,u)</i> must also
- be in the graph.
-</blockquote>
-
-IN: <tt>vertex_descriptor src</tt>
-<blockquote>
- The source vertex for the flow network graph.
-</blockquote>
-
-IN: <tt>vertex_descriptor sink</tt>
-<blockquote>
- The sink vertex for the flow network graph.
-</blockquote>
-
-<h3>Named Parameters</h3>
-
-
-IN: <tt>capacity_map(CapacityEdgeMap cap)</tt>
-<blockquote>
- The edge capacity property map. The type must be a model of a
- constant <a
- href="../../property_map/LvaluePropertyMap.html">Lvalue Property Map</a>. The
- key type of the map must be the graph's edge descriptor type.<br>
- <b>Default:</b> <tt>get(edge_capacity, g)</tt>
-</blockquote>
-
-OUT: <tt>residual_capacity_map(ResidualCapacityEdgeMap res)</tt>
-<blockquote>
- This maps edges to their residual capacity. The type must be a model
- of a mutable <a
- href="../../property_map/LvaluePropertyMap.html">Lvalue Property
- Map</a>. The key type of the map must be the graph's edge descriptor
- type.<br>
- <b>Default:</b> <tt>get(edge_residual_capacity, g)</tt>
-</blockquote>
-
-IN: <tt>reverse_edge_map(ReverseEdgeMap rev)</tt>
-<blockquote>
- An edge property map that maps every edge <i>(u,v)</i> in the graph
- to the reverse edge <i>(v,u)</i>. The map must be a model of
- constant <a href="../../property_map/LvaluePropertyMap.html">Lvalue
- Property Map</a>. The key type of the map must be the graph's edge
- descriptor type.<br>
- <b>Default:</b> <tt>get(edge_reverse, g)</tt>
-</blockquote>
-
-UTIL: <tt>color_map(ColorMap color)</tt>
-<blockquote>
- Used by the algorithm to keep track of progress during the
- breadth-first search stage. At the end of the algorithm, the white
- vertices define the minimum cut set. The map must be a model of
- mutable <a
- href="../../property_map/LvaluePropertyMap.html">Lvalue Property Map</a>.
- The key type of the map should be the graph's vertex descriptor type, and
- the value type must be a model of <a
- href="./ColorValue.html">ColorValue</a>.<br>
-
- <b>Default:</b> an <a
- href="../../property_map/iterator_property_map.html">
- <tt>iterator_property_map</tt></a> created from a <tt>std::vector</tt>
- of <tt>default_color_type</tt> of size <tt>num_vertices(g)</tt> and
- using the <tt>i_map</tt> for the index map.
-</blockquote>
-
-UTIL: <tt>predecessor_map(PredEdgeMap pred)</tt>
-<blockquote>
- Use by the algorithm to store augmenting paths. The map must be a
- model of mutable <a
- href="../../property_map/LvaluePropertyMap.html">Lvalue Property Map</a>.
- The key type must be the graph's vertex descriptor type and the
- value type must be the graph's edge descriptor type.<br>
-
- <b>Default:</b> an <a
- href="../../property_map/iterator_property_map.html">
- <tt>iterator_property_map</tt></a> created from a <tt>std::vector</tt>
- of edge descriptors of size <tt>num_vertices(g)</tt> and
- using the <tt>i_map</tt> for the index map.
-</blockquote>
-
-IN: <tt>vertex_index_map(VertexIndexMap i_map)</tt>
-<blockquote>
- Maps each vertex of the graph to a unique integer in the range
- <tt>[0, num_vertices(g))</tt>. This property map is only needed
- if the default for the color or predecessor map is used.
- The vertex index map must be a model of <a
- href="../../property_map/ReadablePropertyMap.html">Readable Property
- Map</a>. The key type of the map must be the graph's vertex
- descriptor type.<br>
- <b>Default:</b> <tt>get(vertex_index, g)</tt>
- Note: if you use this default, make sure your graph has
- an internal <tt>vertex_index</tt> property. For example,
- <tt>adjacenty_list</tt> with <tt>VertexList=listS</tt> does
- not have an internal <tt>vertex_index</tt> property.
-</blockquote>
-
-
-<h3>Complexity</h3>
-
-The time complexity is <i>O(V E<sup>2</sup>)</i> in the general case
-or <i>O(V E U)</i> if capacity values are integers bounded by
-some constant <i>U</i>.
-
-<h3>Example</h3>
-
-The program in <a
-href="../example/edmunds-karp-eg.cpp"><tt>example/edmunds-karp-eg.cpp</tt></a>
-reads an example maximum flow problem (a graph with edge capacities)
-from a file in the DIMACS format and computes the maximum flow.
-
-
-<h3>See Also</h3>
-
-push_relabel_max_flow()<br>
-kolmogorov_max_flow().
-
-<br>
-<HR>
-<TABLE>
-<TR valign=top>
-<TD nowrap>Copyright © 2000-2001</TD><TD>
-<A HREF="http://beta.boost.org/users/people/jeremy_siek.html">Jeremy Siek</A>, Indiana University (<A HREF="mailto:jsiek_at_[hidden]">jsiek_at_[hidden]</A>)
-</TD></TR></TABLE>
-
-</BODY>
-</HTML>
-<!-- LocalWords: HTML Siek Edmunds BGCOLOR ffffff ee VLINK ALINK ff IMG SRC
- -->
-<!-- LocalWords: gif ALT BR sec edmunds karp TT DIV CELLPADDING TR TD PRE lt
- -->
-<!-- LocalWords: typename VertexListGraph CapacityEdgeMap ReverseEdgeMap gt
- -->
-<!-- LocalWords: ResidualCapacityEdgeMap VertexIndexMap src rev ColorMap pred
- -->
-<!-- LocalWords: PredEdgeMap tt href html hpp ul li nbsp br LvaluePropertyMap
- -->
-<!-- LocalWords: num ColorValue DIMACS cpp pre config iostream dimacs int std
- -->
-<!-- LocalWords: namespace vecS directedS cout endl iter ei HR valign nowrap
- -->
-<!-- LocalWords: jeremy siek htm Univ mailto jsiek lsc edu
-p -->
Modified: branches/fix-links/libs/graph/doc/kolmogorov_max_flow.html
==============================================================================
--- branches/fix-links/libs/graph/doc/kolmogorov_max_flow.html (original)
+++ branches/fix-links/libs/graph/doc/kolmogorov_max_flow.html 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -364,7 +364,7 @@
f 7 6 0
f 7 5 0</PRE><H3>
See Also</H3>
-<P STYLE="margin-bottom: 0cm"><TT>edmunds_karp_max_flow()</TT>,<BR><TT>push_relabel_max_flow()</TT>.
+<P STYLE="margin-bottom: 0cm"><TT>edmonds_karp_max_flow()</TT>,<BR><TT>push_relabel_max_flow()</TT>.
</P>
<HR>
<TABLE CELLPADDING=2 CELLSPACING=2>
Modified: branches/fix-links/libs/graph/doc/push_relabel_max_flow.html
==============================================================================
--- branches/fix-links/libs/graph/doc/push_relabel_max_flow.html (original)
+++ branches/fix-links/libs/graph/doc/push_relabel_max_flow.html 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -225,7 +225,7 @@
<h3>See Also</h3>
-edmunds_karp_max_flow()<br>
+edmonds_karp_max_flow()<br>
<a href="./kolmogorov_max_flow.html"><tt>kolmogorov_max_flow()</tt></a>.
<br>
Modified: branches/fix-links/libs/graph/example/edge-connectivity.cpp
==============================================================================
--- branches/fix-links/libs/graph/example/edge-connectivity.cpp (original)
+++ branches/fix-links/libs/graph/example/edge-connectivity.cpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
@@ -8,7 +8,7 @@
#include <boost/config.hpp>
#include <algorithm>
#include <utility>
-#include <boost/graph/edmunds_karp_max_flow.hpp>
+#include <boost/graph/edmonds_karp_max_flow.hpp>
#include <boost/graph/push_relabel_max_flow.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graphviz.hpp>
@@ -110,7 +110,7 @@
while (!nonneighbor_S.empty()) {
k = nonneighbor_S.front();
- alpha_S_k = edmunds_karp_max_flow
+ alpha_S_k = edmonds_karp_max_flow
(flow_g, p, k, cap, res_cap, rev_edge, &color[0], &pred[0]);
if (alpha_S_k < alpha_star) {
alpha_star = alpha_S_k;
Deleted: branches/fix-links/libs/graph/example/edmunds-karp-eg.cpp
==============================================================================
--- branches/fix-links/libs/graph/example/edmunds-karp-eg.cpp 2008-02-03 05:35:18 EST (Sun, 03 Feb 2008)
+++ (empty file)
@@ -1,90 +0,0 @@
-//=======================================================================
-// Copyright 2001 Jeremy G. Siek, Andrew Lumsdaine, Lie-Quan Lee,
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.b