From 554f773259fa76ca88a5d96c027bd3890b2e1b68 Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Mon, 7 Mar 2011 04:53:27 +0000 Subject: [PATCH] Updated boost to 1.46 --- 3party/boost/LICENSE_1_0.txt | 23 + .../algorithm/string/detail/find_format.hpp | 40 +- .../string/detail/find_format_all.hpp | 46 +- .../string/detail/find_format_store.hpp | 2 +- .../boost/algorithm/string/find_iterator.hpp | 12 +- .../boost/boost/archive/archive_exception.hpp | 2 +- 3party/boost/boost/archive/basic_archive.hpp | 14 +- .../boost/archive/basic_binary_iarchive.hpp | 30 +- .../boost/archive/basic_binary_iprimitive.hpp | 8 +- .../boost/archive/basic_binary_oarchive.hpp | 2 +- .../boost/archive/basic_binary_oprimitive.hpp | 10 +- .../boost/archive/basic_text_iprimitive.hpp | 2 +- .../boost/archive/basic_text_oarchive.hpp | 2 +- .../boost/archive/basic_text_oprimitive.hpp | 4 +- .../boost/archive/detail/basic_serializer.hpp | 4 +- .../boost/archive/detail/oserializer.hpp | 10 +- .../archive/impl/basic_binary_iarchive.ipp | 2 +- .../archive/impl/basic_binary_iprimitive.ipp | 2 +- .../archive/impl/basic_binary_oarchive.ipp | 2 +- .../archive/impl/basic_text_iprimitive.ipp | 2 +- .../archive/impl/basic_text_oarchive.ipp | 4 +- .../boost/archive/impl/basic_xml_grammar.hpp | 28 +- .../boost/archive/impl/basic_xml_iarchive.ipp | 2 +- .../boost/archive/impl/xml_wiarchive_impl.ipp | 2 +- .../archive/iterators/base64_exception.hpp | 4 +- .../archive/iterators/base64_from_binary.hpp | 4 +- .../archive/iterators/binary_from_base64.hpp | 2 +- .../boost/archive/iterators/dataflow.hpp | 4 +- .../archive/iterators/dataflow_exception.hpp | 4 +- .../boost/boost/archive/iterators/escape.hpp | 2 +- .../archive/iterators/insert_linebreaks.hpp | 2 +- .../boost/archive/iterators/mb_from_wchar.hpp | 8 +- .../archive/iterators/remove_whitespace.hpp | 2 +- .../archive/iterators/transform_width.hpp | 2 + .../boost/archive/iterators/unescape.hpp | 2 +- .../boost/archive/iterators/wchar_from_mb.hpp | 2 +- .../boost/archive/iterators/xml_escape.hpp | 2 +- .../boost/archive/iterators/xml_unescape.hpp | 2 +- .../iterators/xml_unescape_exception.hpp | 2 +- 3party/boost/boost/archive/text_iarchive.hpp | 3 +- 3party/boost/boost/archive/text_oarchive.hpp | 3 +- 3party/boost/boost/archive/tmpdir.hpp | 4 +- .../boost/archive/xml_archive_exception.hpp | 2 +- 3party/boost/boost/array.hpp | 69 +- 3party/boost/boost/asio.hpp | 2 +- .../boost/asio/basic_datagram_socket.hpp | 2 +- .../boost/boost/asio/basic_deadline_timer.hpp | 2 +- 3party/boost/boost/asio/basic_io_object.hpp | 2 +- 3party/boost/boost/asio/basic_raw_socket.hpp | 2 +- 3party/boost/boost/asio/basic_serial_port.hpp | 2 +- 3party/boost/boost/asio/basic_socket.hpp | 2 +- .../boost/asio/basic_socket_acceptor.hpp | 2 +- .../boost/asio/basic_socket_iostream.hpp | 2 +- .../boost/asio/basic_socket_streambuf.hpp | 2 +- .../boost/boost/asio/basic_stream_socket.hpp | 2 +- 3party/boost/boost/asio/basic_streambuf.hpp | 2 +- .../boost/boost/asio/basic_streambuf_fwd.hpp | 2 +- 3party/boost/boost/asio/buffer.hpp | 2 +- .../boost/boost/asio/buffered_read_stream.hpp | 2 +- .../boost/asio/buffered_read_stream_fwd.hpp | 2 +- 3party/boost/boost/asio/buffered_stream.hpp | 2 +- .../boost/boost/asio/buffered_stream_fwd.hpp | 2 +- .../boost/asio/buffered_write_stream.hpp | 2 +- .../boost/asio/buffered_write_stream_fwd.hpp | 2 +- 3party/boost/boost/asio/buffers_iterator.hpp | 2 +- .../boost/boost/asio/completion_condition.hpp | 2 +- .../boost/asio/datagram_socket_service.hpp | 2 +- 3party/boost/boost/asio/deadline_timer.hpp | 2 +- .../boost/asio/deadline_timer_service.hpp | 2 +- 3party/boost/boost/asio/detail/array_fwd.hpp | 2 +- .../asio/detail/base_from_completion_cond.hpp | 2 +- .../boost/boost/asio/detail/bind_handler.hpp | 2 +- .../boost/asio/detail/buffer_resize_guard.hpp | 2 +- .../asio/detail/buffer_sequence_adapter.hpp | 2 +- .../asio/detail/buffered_stream_storage.hpp | 2 +- 3party/boost/boost/asio/detail/call_stack.hpp | 2 +- .../boost/asio/detail/completion_handler.hpp | 2 +- 3party/boost/boost/asio/detail/config.hpp | 2 +- .../boost/asio/detail/consuming_buffers.hpp | 2 +- .../asio/detail/deadline_timer_service.hpp | 2 +- .../boost/asio/detail/descriptor_ops.hpp | 2 +- .../boost/asio/detail/descriptor_read_op.hpp | 2 +- .../boost/asio/detail/descriptor_write_op.hpp | 2 +- .../boost/asio/detail/dev_poll_reactor.hpp | 2 +- .../asio/detail/dev_poll_reactor_fwd.hpp | 2 +- .../boost/boost/asio/detail/epoll_reactor.hpp | 2 +- .../boost/asio/detail/epoll_reactor_fwd.hpp | 2 +- 3party/boost/boost/asio/detail/event.hpp | 2 +- .../detail/eventfd_select_interrupter.hpp | 2 +- .../boost/asio/detail/fd_set_adapter.hpp | 2 +- .../boost/boost/asio/detail/fenced_block.hpp | 2 +- .../asio/detail/gcc_arm_fenced_block.hpp | 2 +- .../asio/detail/gcc_hppa_fenced_block.hpp | 2 +- .../asio/detail/gcc_sync_fenced_block.hpp | 2 +- .../asio/detail/gcc_x86_fenced_block.hpp | 2 +- .../asio/detail/handler_alloc_helpers.hpp | 2 +- .../asio/detail/handler_invoke_helpers.hpp | 2 +- 3party/boost/boost/asio/detail/hash_map.hpp | 2 +- .../boost/asio/detail/impl/descriptor_ops.ipp | 2 +- .../asio/detail/impl/dev_poll_reactor.hpp | 2 +- .../asio/detail/impl/dev_poll_reactor.ipp | 2 +- .../boost/asio/detail/impl/epoll_reactor.hpp | 2 +- .../boost/asio/detail/impl/epoll_reactor.ipp | 4 +- .../impl/eventfd_select_interrupter.ipp | 2 +- .../boost/asio/detail/impl/kqueue_reactor.hpp | 2 +- .../boost/asio/detail/impl/kqueue_reactor.ipp | 2 +- .../detail/impl/pipe_select_interrupter.ipp | 2 +- .../boost/asio/detail/impl/posix_event.ipp | 2 +- .../boost/asio/detail/impl/posix_mutex.ipp | 2 +- .../boost/asio/detail/impl/posix_thread.ipp | 2 +- .../boost/asio/detail/impl/posix_tss_ptr.ipp | 2 +- .../impl/reactive_descriptor_service.ipp | 2 +- .../impl/reactive_serial_port_service.ipp | 2 +- .../impl/reactive_socket_service_base.ipp | 2 +- .../detail/impl/resolver_service_base.ipp | 2 +- .../boost/asio/detail/impl/select_reactor.hpp | 2 +- .../boost/asio/detail/impl/select_reactor.ipp | 2 +- .../asio/detail/impl/service_registry.hpp | 2 +- .../asio/detail/impl/service_registry.ipp | 2 +- .../boost/asio/detail/impl/socket_ops.ipp | 2 +- .../detail/impl/socket_select_interrupter.ipp | 2 +- .../boost/asio/detail/impl/strand_service.hpp | 2 +- .../boost/asio/detail/impl/strand_service.ipp | 2 +- .../asio/detail/impl/task_io_service.hpp | 2 +- .../asio/detail/impl/task_io_service.ipp | 2 +- .../boost/asio/detail/impl/throw_error.ipp | 2 +- .../boost/asio/detail/impl/timer_queue.ipp | 2 +- .../asio/detail/impl/timer_queue_set.ipp | 2 +- .../boost/asio/detail/impl/win_event.ipp | 2 +- .../detail/impl/win_iocp_handle_service.ipp | 2 +- .../asio/detail/impl/win_iocp_io_service.hpp | 2 +- .../asio/detail/impl/win_iocp_io_service.ipp | 2 +- .../impl/win_iocp_serial_port_service.ipp | 2 +- .../impl/win_iocp_socket_service_base.ipp | 2 +- .../boost/asio/detail/impl/win_mutex.ipp | 2 +- .../boost/asio/detail/impl/win_thread.ipp | 2 +- .../boost/asio/detail/impl/win_tss_ptr.ipp | 2 +- .../boost/asio/detail/impl/winsock_init.ipp | 2 +- 3party/boost/boost/asio/detail/io_control.hpp | 2 +- .../boost/asio/detail/kqueue_reactor.hpp | 2 +- .../boost/asio/detail/kqueue_reactor_fwd.hpp | 2 +- .../asio/detail/local_free_on_block_exit.hpp | 2 +- .../boost/asio/detail/macos_fenced_block.hpp | 2 +- 3party/boost/boost/asio/detail/mutex.hpp | 2 +- .../boost/boost/asio/detail/noncopyable.hpp | 2 +- 3party/boost/boost/asio/detail/null_event.hpp | 2 +- .../boost/asio/detail/null_fenced_block.hpp | 2 +- 3party/boost/boost/asio/detail/null_mutex.hpp | 2 +- .../boost/asio/detail/null_signal_blocker.hpp | 2 +- .../boost/boost/asio/detail/null_thread.hpp | 2 +- .../boost/boost/asio/detail/null_tss_ptr.hpp | 2 +- .../boost/boost/asio/detail/object_pool.hpp | 2 +- .../boost/asio/detail/old_win_sdk_compat.hpp | 2 +- 3party/boost/boost/asio/detail/op_queue.hpp | 2 +- 3party/boost/boost/asio/detail/operation.hpp | 2 +- .../asio/detail/pipe_select_interrupter.hpp | 2 +- .../boost/boost/asio/detail/pop_options.hpp | 2 +- .../boost/boost/asio/detail/posix_event.hpp | 2 +- .../asio/detail/posix_fd_set_adapter.hpp | 2 +- .../boost/boost/asio/detail/posix_mutex.hpp | 2 +- .../asio/detail/posix_signal_blocker.hpp | 2 +- .../boost/boost/asio/detail/posix_thread.hpp | 2 +- .../boost/boost/asio/detail/posix_tss_ptr.hpp | 2 +- .../boost/boost/asio/detail/push_options.hpp | 2 +- .../detail/reactive_descriptor_service.hpp | 2 +- .../asio/detail/reactive_null_buffers_op.hpp | 2 +- .../detail/reactive_serial_port_service.hpp | 2 +- .../asio/detail/reactive_socket_accept_op.hpp | 2 +- .../detail/reactive_socket_connect_op.hpp | 2 +- .../asio/detail/reactive_socket_recv_op.hpp | 2 +- .../detail/reactive_socket_recvfrom_op.hpp | 2 +- .../asio/detail/reactive_socket_send_op.hpp | 2 +- .../asio/detail/reactive_socket_sendto_op.hpp | 2 +- .../asio/detail/reactive_socket_service.hpp | 2 +- .../detail/reactive_socket_service_base.hpp | 2 +- 3party/boost/boost/asio/detail/reactor.hpp | 2 +- .../boost/boost/asio/detail/reactor_fwd.hpp | 2 +- 3party/boost/boost/asio/detail/reactor_op.hpp | 2 +- .../boost/asio/detail/reactor_op_queue.hpp | 2 +- 3party/boost/boost/asio/detail/regex_fwd.hpp | 2 +- .../boost/asio/detail/resolve_endpoint_op.hpp | 2 +- 3party/boost/boost/asio/detail/resolve_op.hpp | 2 +- .../boost/asio/detail/resolver_service.hpp | 2 +- .../asio/detail/resolver_service_base.hpp | 2 +- .../boost/boost/asio/detail/scoped_lock.hpp | 2 +- .../boost/asio/detail/select_interrupter.hpp | 2 +- .../boost/asio/detail/select_reactor.hpp | 2 +- .../boost/asio/detail/select_reactor_fwd.hpp | 2 +- .../boost/asio/detail/service_registry.hpp | 2 +- .../asio/detail/service_registry_fwd.hpp | 2 +- 3party/boost/boost/asio/detail/shared_ptr.hpp | 2 +- .../boost/asio/detail/signal_blocker.hpp | 2 +- .../boost/boost/asio/detail/signal_init.hpp | 2 +- .../boost/boost/asio/detail/socket_holder.hpp | 2 +- 3party/boost/boost/asio/detail/socket_ops.hpp | 2 +- .../boost/boost/asio/detail/socket_option.hpp | 2 +- .../asio/detail/socket_select_interrupter.hpp | 2 +- .../boost/boost/asio/detail/socket_types.hpp | 2 +- .../asio/detail/solaris_fenced_block.hpp | 2 +- .../boost/asio/detail/strand_service.hpp | 2 +- .../boost/asio/detail/task_io_service.hpp | 2 +- .../boost/asio/detail/task_io_service_fwd.hpp | 2 +- .../asio/detail/task_io_service_operation.hpp | 2 +- 3party/boost/boost/asio/detail/thread.hpp | 2 +- .../boost/boost/asio/detail/throw_error.hpp | 2 +- 3party/boost/boost/asio/detail/timer_op.hpp | 2 +- .../boost/boost/asio/detail/timer_queue.hpp | 2 +- .../boost/asio/detail/timer_queue_base.hpp | 2 +- .../boost/asio/detail/timer_queue_fwd.hpp | 2 +- .../boost/asio/detail/timer_queue_set.hpp | 2 +- .../boost/asio/detail/timer_scheduler.hpp | 2 +- .../boost/asio/detail/timer_scheduler_fwd.hpp | 2 +- 3party/boost/boost/asio/detail/tss_ptr.hpp | 2 +- .../boost/boost/asio/detail/wait_handler.hpp | 2 +- 3party/boost/boost/asio/detail/weak_ptr.hpp | 2 +- 3party/boost/boost/asio/detail/win_event.hpp | 2 +- .../boost/asio/detail/win_fd_set_adapter.hpp | 2 +- .../boost/asio/detail/win_fenced_block.hpp | 2 +- .../asio/detail/win_iocp_handle_read_op.hpp | 2 +- .../asio/detail/win_iocp_handle_service.hpp | 2 +- .../asio/detail/win_iocp_handle_write_op.hpp | 2 +- .../boost/asio/detail/win_iocp_io_service.hpp | 2 +- .../asio/detail/win_iocp_io_service_fwd.hpp | 2 +- .../asio/detail/win_iocp_null_buffers_op.hpp | 2 +- .../boost/asio/detail/win_iocp_operation.hpp | 2 +- .../asio/detail/win_iocp_overlapped_op.hpp | 2 +- .../asio/detail/win_iocp_overlapped_ptr.hpp | 2 +- .../detail/win_iocp_serial_port_service.hpp | 2 +- .../asio/detail/win_iocp_socket_accept_op.hpp | 2 +- .../asio/detail/win_iocp_socket_recv_op.hpp | 2 +- .../detail/win_iocp_socket_recvfrom_op.hpp | 2 +- .../asio/detail/win_iocp_socket_send_op.hpp | 2 +- .../asio/detail/win_iocp_socket_service.hpp | 2 +- .../detail/win_iocp_socket_service_base.hpp | 2 +- 3party/boost/boost/asio/detail/win_mutex.hpp | 2 +- 3party/boost/boost/asio/detail/win_thread.hpp | 2 +- .../boost/boost/asio/detail/win_tss_ptr.hpp | 2 +- .../boost/boost/asio/detail/wince_thread.hpp | 2 +- .../boost/boost/asio/detail/winsock_init.hpp | 2 +- .../boost/asio/detail/wrapped_handler.hpp | 2 +- 3party/boost/boost/asio/error.hpp | 2 +- .../boost/boost/asio/handler_alloc_hook.hpp | 2 +- .../boost/boost/asio/handler_invoke_hook.hpp | 2 +- 3party/boost/boost/asio/impl/error.ipp | 2 +- 3party/boost/boost/asio/impl/io_service.hpp | 2 +- 3party/boost/boost/asio/impl/io_service.ipp | 2 +- 3party/boost/boost/asio/impl/read.hpp | 2 +- 3party/boost/boost/asio/impl/read_at.hpp | 2 +- 3party/boost/boost/asio/impl/read_until.hpp | 2 +- .../boost/asio/impl/serial_port_base.hpp | 2 +- .../boost/asio/impl/serial_port_base.ipp | 2 +- 3party/boost/boost/asio/impl/src.cpp | 2 +- 3party/boost/boost/asio/impl/src.hpp | 2 +- 3party/boost/boost/asio/impl/write.hpp | 2 +- 3party/boost/boost/asio/impl/write_at.hpp | 2 +- 3party/boost/boost/asio/io_service.hpp | 2 +- 3party/boost/boost/asio/ip/address.hpp | 2 +- 3party/boost/boost/asio/ip/address_v4.hpp | 2 +- 3party/boost/boost/asio/ip/address_v6.hpp | 2 +- 3party/boost/boost/asio/ip/basic_endpoint.hpp | 2 +- 3party/boost/boost/asio/ip/basic_resolver.hpp | 2 +- .../boost/asio/ip/basic_resolver_entry.hpp | 2 +- .../boost/asio/ip/basic_resolver_iterator.hpp | 2 +- .../boost/asio/ip/basic_resolver_query.hpp | 2 +- .../boost/boost/asio/ip/detail/endpoint.hpp | 2 +- .../boost/asio/ip/detail/impl/endpoint.ipp | 2 +- .../boost/asio/ip/detail/socket_option.hpp | 2 +- 3party/boost/boost/asio/ip/host_name.hpp | 2 +- 3party/boost/boost/asio/ip/icmp.hpp | 2 +- 3party/boost/boost/asio/ip/impl/address.hpp | 2 +- 3party/boost/boost/asio/ip/impl/address.ipp | 2 +- .../boost/boost/asio/ip/impl/address_v4.hpp | 2 +- .../boost/boost/asio/ip/impl/address_v4.ipp | 4 +- .../boost/boost/asio/ip/impl/address_v6.hpp | 2 +- .../boost/boost/asio/ip/impl/address_v6.ipp | 2 +- .../boost/asio/ip/impl/basic_endpoint.hpp | 2 +- 3party/boost/boost/asio/ip/impl/host_name.ipp | 2 +- 3party/boost/boost/asio/ip/multicast.hpp | 2 +- .../boost/asio/ip/resolver_query_base.hpp | 2 +- .../boost/boost/asio/ip/resolver_service.hpp | 2 +- 3party/boost/boost/asio/ip/tcp.hpp | 2 +- 3party/boost/boost/asio/ip/udp.hpp | 2 +- 3party/boost/boost/asio/ip/unicast.hpp | 2 +- 3party/boost/boost/asio/ip/v6_only.hpp | 2 +- 3party/boost/boost/asio/is_read_buffered.hpp | 2 +- 3party/boost/boost/asio/is_write_buffered.hpp | 2 +- .../boost/boost/asio/local/basic_endpoint.hpp | 2 +- .../boost/boost/asio/local/connect_pair.hpp | 2 +- .../boost/asio/local/datagram_protocol.hpp | 2 +- .../boost/asio/local/detail/endpoint.hpp | 2 +- .../boost/asio/local/detail/impl/endpoint.ipp | 2 +- .../boost/asio/local/stream_protocol.hpp | 2 +- 3party/boost/boost/asio/placeholders.hpp | 2 +- .../boost/asio/posix/basic_descriptor.hpp | 2 +- .../asio/posix/basic_stream_descriptor.hpp | 2 +- .../boost/asio/posix/descriptor_base.hpp | 2 +- .../boost/asio/posix/stream_descriptor.hpp | 2 +- .../asio/posix/stream_descriptor_service.hpp | 2 +- .../boost/boost/asio/raw_socket_service.hpp | 2 +- 3party/boost/boost/asio/read.hpp | 2 +- 3party/boost/boost/asio/read_at.hpp | 2 +- 3party/boost/boost/asio/read_until.hpp | 2 +- 3party/boost/boost/asio/serial_port.hpp | 2 +- 3party/boost/boost/asio/serial_port_base.hpp | 2 +- .../boost/boost/asio/serial_port_service.hpp | 2 +- .../boost/asio/socket_acceptor_service.hpp | 2 +- 3party/boost/boost/asio/socket_base.hpp | 2 +- 3party/boost/boost/asio/ssl.hpp | 2 +- 3party/boost/boost/asio/ssl/basic_context.hpp | 2 +- 3party/boost/boost/asio/ssl/context.hpp | 2 +- 3party/boost/boost/asio/ssl/context_base.hpp | 2 +- .../boost/boost/asio/ssl/context_service.hpp | 2 +- .../ssl/detail/openssl_context_service.hpp | 2 +- .../boost/asio/ssl/detail/openssl_init.hpp | 2 +- .../ssl/detail/openssl_stream_service.hpp | 2 +- .../boost/asio/ssl/detail/openssl_types.hpp | 2 +- 3party/boost/boost/asio/ssl/stream.hpp | 2 +- 3party/boost/boost/asio/ssl/stream_base.hpp | 2 +- .../boost/boost/asio/ssl/stream_service.hpp | 2 +- 3party/boost/boost/asio/strand.hpp | 2 +- .../boost/asio/stream_socket_service.hpp | 2 +- 3party/boost/boost/asio/streambuf.hpp | 2 +- 3party/boost/boost/asio/time_traits.hpp | 2 +- 3party/boost/boost/asio/version.hpp | 4 +- .../boost/boost/asio/windows/basic_handle.hpp | 2 +- .../windows/basic_random_access_handle.hpp | 2 +- .../asio/windows/basic_stream_handle.hpp | 2 +- .../boost/asio/windows/overlapped_ptr.hpp | 2 +- .../asio/windows/random_access_handle.hpp | 2 +- .../windows/random_access_handle_service.hpp | 2 +- .../boost/asio/windows/stream_handle.hpp | 2 +- .../asio/windows/stream_handle_service.hpp | 2 +- 3party/boost/boost/asio/write.hpp | 2 +- 3party/boost/boost/asio/write_at.hpp | 2 +- 3party/boost/boost/assert.hpp | 89 +- 3party/boost/boost/circular_buffer/base.hpp | 10 +- 3party/boost/boost/concept_check.hpp | 166 +- 3party/boost/boost/config/auto_link.hpp | 3 - .../boost/boost/config/compiler/borland.hpp | 3 + 3party/boost/boost/config/compiler/comeau.hpp | 2 + .../boost/config/compiler/common_edg.hpp | 6 +- 3party/boost/boost/config/compiler/gcc.hpp | 14 +- .../boost/config/compiler/metrowerks.hpp | 2 + .../boost/boost/config/compiler/pathscale.hpp | 82 + .../boost/boost/config/compiler/sunpro_cc.hpp | 4 + .../boost/boost/config/compiler/visualc.hpp | 11 +- 3party/boost/boost/config/platform/aix.hpp | 8 + .../boost/boost/config/platform/amigaos.hpp | 3 + 3party/boost/boost/config/platform/beos.hpp | 8 + 3party/boost/boost/config/platform/bsd.hpp | 25 +- 3party/boost/boost/config/platform/cygwin.hpp | 66 +- 3party/boost/boost/config/platform/hpux.hpp | 8 + 3party/boost/boost/config/platform/irix.hpp | 6 + 3party/boost/boost/config/platform/linux.hpp | 8 + 3party/boost/boost/config/platform/macos.hpp | 6 + 3party/boost/boost/config/platform/qnxnto.hpp | 8 + .../boost/boost/config/platform/solaris.hpp | 6 + .../boost/boost/config/platform/symbian.hpp | 10 +- .../boost/boost/config/platform/vxworks.hpp | 6 + 3party/boost/boost/config/platform/win32.hpp | 6 +- .../boost/config/select_compiler_config.hpp | 44 +- .../boost/boost/config/stdlib/dinkumware.hpp | 2 +- .../boost/boost/config/stdlib/libstdcpp3.hpp | 11 +- 3party/boost/boost/config/stdlib/sgi.hpp | 11 + 3party/boost/boost/config/stdlib/stlport.hpp | 10 + 3party/boost/boost/config/stdlib/vacpp.hpp | 10 + 3party/boost/boost/config/suffix.hpp | 25 + 3party/boost/boost/detail/bitmask.hpp | 47 + 3party/boost/boost/detail/container_fwd.hpp | 6 +- 3party/boost/boost/detail/endian.hpp | 6 +- 3party/boost/boost/detail/fenv.hpp | 73 + .../boost/boost/detail/lightweight_main.hpp | 36 + .../boost/boost/detail/lightweight_test.hpp | 20 + .../boost/dynamic_bitset/dynamic_bitset.hpp | 4 +- .../exception/diagnostic_information.hpp | 2 +- 3party/boost/boost/filesystem.hpp | 5 +- 3party/boost/boost/filesystem/config.hpp | 5 +- 3party/boost/boost/filesystem/convenience.hpp | 5 +- 3party/boost/boost/filesystem/exception.hpp | 5 +- 3party/boost/boost/filesystem/fstream.hpp | 5 +- 3party/boost/boost/filesystem/operations.hpp | 5 +- 3party/boost/boost/filesystem/path.hpp | 5 +- 3party/boost/boost/filesystem/v2/config.hpp | 10 + .../boost/boost/filesystem/v2/convenience.hpp | 11 +- 3party/boost/boost/filesystem/v2/fstream.hpp | 1 + .../boost/boost/filesystem/v2/operations.hpp | 57 +- 3party/boost/boost/filesystem/v2/path.hpp | 9 +- .../boost/boost/filesystem/v3/operations.hpp | 103 +- 3party/boost/boost/filesystem/v3/path.hpp | 2 +- .../hash/detail/hash_float_generic.hpp | 4 +- 3party/boost/boost/functional/hash/hash.hpp | 23 +- .../boost/fusion/container/deque/deque.hpp | 1 + .../deque/detail/is_sequence_impl.hpp | 33 + .../container/list/detail/build_cons.hpp | 3 +- .../container/vector/detail/vector_n.hpp | 11 +- .../boost/fusion/include/make_unfused.hpp | 13 + 3party/boost/boost/fusion/include/unfused.hpp | 13 + .../sequence/comparison/enable_comparison.hpp | 34 + .../fusion/sequence/comparison/equal_to.hpp | 6 +- .../fusion/sequence/comparison/greater.hpp | 6 +- .../sequence/comparison/greater_equal.hpp | 6 +- .../boost/fusion/sequence/comparison/less.hpp | 6 +- .../fusion/sequence/comparison/less_equal.hpp | 11 +- .../sequence/comparison/not_equal_to.hpp | 6 +- .../boost/fusion/sequence/intrinsic/begin.hpp | 14 +- .../boost/fusion/sequence/intrinsic/end.hpp | 14 +- .../fusion/support/detail/is_mpl_sequence.hpp | 4 +- .../boost/fusion/support/is_sequence.hpp | 14 +- .../boost/fusion/support/sequence_base.hpp | 13 +- .../boost/gil/extension/io/png_dynamic_io.hpp | 2 +- .../boost/gil/extension/io/png_io_private.hpp | 10 +- .../boost/boost/gil/extension/io/tiff_io.hpp | 86 +- 3party/boost/boost/graph/adjacency_matrix.hpp | 8 +- 3party/boost/boost/graph/bipartite.hpp | 4 - .../graph/boykov_kolmogorov_max_flow.hpp | 48 +- .../boost/graph/clustering_coefficient.hpp | 8 +- .../graph/compressed_sparse_row_graph.hpp | 4 +- .../boost/graph/detail/adjacency_list.hpp | 3 +- .../detail/compressed_sparse_row_struct.hpp | 8 +- .../boost/boost/graph/detail/d_ary_heap.hpp | 4 +- .../boost/graph/detail/histogram_sort.hpp | 6 +- 3party/boost/boost/graph/dimacs.hpp | 15 +- .../graph/distributed/adjacency_list.hpp | 60 +- .../distributed/adjlist/serialization.hpp | 17 +- .../distributed/betweenness_centrality.hpp | 3 +- .../boman_et_al_graph_coloring.hpp | 8 +- .../compressed_sparse_row_graph.hpp | 9 +- .../distributed/connected_components.hpp | 27 +- .../connected_components_parallel_search.hpp | 9 +- .../crauser_et_al_shortest_paths.hpp | 3 +- .../graph/distributed/depth_first_search.hpp | 3 +- .../distributed/detail/mpi_process_group.ipp | 44 +- .../distributed/detail/remote_update_set.hpp | 6 +- .../eager_dijkstra_shortest_paths.hpp | 3 +- .../hohberg_biconnected_components.hpp | 30 +- .../boost/graph/distributed/named_graph.hpp | 7 +- .../boost/graph/distributed/page_rank.hpp | 7 +- .../distributed/rmat_graph_generator.hpp | 3 +- .../distributed/shuffled_distribution.hpp | 3 +- .../graph/distributed/strong_components.hpp | 5 +- .../boost/graph/erdos_renyi_generator.hpp | 6 +- 3party/boost/boost/graph/filtered_graph.hpp | 12 + 3party/boost/boost/graph/graph_stats.hpp | 3 +- 3party/boost/boost/graph/graph_test.hpp | 2 +- 3party/boost/boost/graph/graphviz.hpp | 3 +- .../boost/boost/graph/gursoy_atun_layout.hpp | 3 +- .../graph/kamada_kawai_spring_layout.hpp | 31 +- .../boost/boost/graph/kolmogorov_max_flow.hpp | 4 +- .../boost/graph/loop_erased_random_walk.hpp | 6 +- .../boost/graph/mesh_graph_generator.hpp | 4 +- .../boost/graph/minimum_degree_ordering.hpp | 4 +- .../boost/graph/named_function_params.hpp | 18 +- .../boost/boost/graph/one_bit_color_map.hpp | 7 +- .../boost/graph/parallel/distribution.hpp | 7 +- 3party/boost/boost/graph/properties.hpp | 6 +- .../boost/graph/push_relabel_max_flow.hpp | 8 +- 3party/boost/boost/graph/random.hpp | 4 +- .../boost/graph/random_spanning_tree.hpp | 5 +- 3party/boost/boost/graph/read_dimacs.hpp | 2 +- 3party/boost/boost/graph/reverse_graph.hpp | 23 +- .../boost/graph/rmat_graph_generator.hpp | 9 +- .../boost/graph/stoer_wagner_min_cut.hpp | 15 +- 3party/boost/boost/graph/subgraph.hpp | 18 +- .../boost/boost/graph/two_bit_color_map.hpp | 7 +- .../icl/associative_element_container.hpp | 20 + .../icl/associative_interval_container.hpp | 21 + 3party/boost/boost/icl/closed_interval.hpp | 116 ++ 3party/boost/boost/icl/concept/comparable.hpp | 45 + 3party/boost/boost/icl/concept/container.hpp | 87 ++ .../boost/icl/concept/element_associator.hpp | 500 ++++++ .../boost/boost/icl/concept/element_map.hpp | 487 ++++++ .../boost/boost/icl/concept/element_set.hpp | 141 ++ .../boost/icl/concept/element_set_value.hpp | 31 + 3party/boost/boost/icl/concept/interval.hpp | 1348 ++++++++++++++++ .../boost/icl/concept/interval_associator.hpp | 947 ++++++++++++ .../boost/icl/concept/interval_bounds.hpp | 163 ++ .../boost/boost/icl/concept/interval_map.hpp | 680 +++++++++ .../boost/boost/icl/concept/interval_set.hpp | 353 +++++ .../boost/icl/concept/interval_set_value.hpp | 33 + 3party/boost/boost/icl/concept/joinable.hpp | 41 + 3party/boost/boost/icl/concept/map_value.hpp | 61 + 3party/boost/boost/icl/concept/set_value.hpp | 40 + .../boost/boost/icl/continuous_interval.hpp | 171 +++ .../boost/icl/detail/associated_value.hpp | 43 + .../boost/boost/icl/detail/boost_config.hpp | 26 + .../boost/boost/icl/detail/concept_check.hpp | 31 + .../boost/boost/icl/detail/design_config.hpp | 107 ++ .../boost/icl/detail/element_comparer.hpp | 210 +++ .../boost/icl/detail/element_iterator.hpp | 335 ++++ .../boost/icl/detail/exclusive_less_than.hpp | 31 + .../boost/icl/detail/interval_map_algo.hpp | 171 +++ .../boost/icl/detail/interval_morphism.hpp | 107 ++ .../boost/icl/detail/interval_set_algo.hpp | 648 ++++++++ .../icl/detail/interval_subset_comparer.hpp | 368 +++++ 3party/boost/boost/icl/detail/map_algo.hpp | 90 ++ .../boost/icl/detail/mapped_reference.hpp | 192 +++ 3party/boost/boost/icl/detail/notate.hpp | 35 + .../boost/boost/icl/detail/on_absorbtion.hpp | 43 + .../boost/boost/icl/detail/relation_state.hpp | 37 + 3party/boost/boost/icl/detail/set_algo.hpp | 134 ++ 3party/boost/boost/icl/detail/std_set.hpp | 38 + .../boost/icl/detail/subset_comparer.hpp | 259 ++++ 3party/boost/boost/icl/discrete_interval.hpp | 168 ++ .../boost/icl/dynamic_interval_traits.hpp | 37 + 3party/boost/boost/icl/functors.hpp | 473 ++++++ 3party/boost/boost/icl/gregorian.hpp | 127 ++ 3party/boost/boost/icl/impl_config.hpp | 45 + 3party/boost/boost/icl/interval.hpp | 136 ++ 3party/boost/boost/icl/interval_base_map.hpp | 1357 +++++++++++++++++ 3party/boost/boost/icl/interval_base_set.hpp | 551 +++++++ 3party/boost/boost/icl/interval_bounds.hpp | 80 + .../boost/icl/interval_combining_style.hpp | 28 + 3party/boost/boost/icl/interval_map.hpp | 264 ++++ 3party/boost/boost/icl/interval_set.hpp | 204 +++ 3party/boost/boost/icl/interval_traits.hpp | 58 + 3party/boost/boost/icl/iterator.hpp | 103 ++ 3party/boost/boost/icl/left_open_interval.hpp | 117 ++ 3party/boost/boost/icl/map.hpp | 667 ++++++++ 3party/boost/boost/icl/open_interval.hpp | 117 ++ .../boost/icl/predicates/distinct_equal.hpp | 32 + .../boost/icl/predicates/element_equal.hpp | 32 + .../boost/boost/icl/predicates/std_equal.hpp | 33 + .../boost/icl/predicates/sub_super_set.hpp | 54 + 3party/boost/boost/icl/ptime.hpp | 122 ++ 3party/boost/boost/icl/rational.hpp | 70 + .../boost/boost/icl/right_open_interval.hpp | 117 ++ .../boost/boost/icl/separate_interval_set.hpp | 191 +++ 3party/boost/boost/icl/set.hpp | 27 + 3party/boost/boost/icl/split_interval_map.hpp | 213 +++ 3party/boost/boost/icl/split_interval_set.hpp | 207 +++ .../icl/type_traits/absorbs_identities.hpp | 23 + .../boost/icl/type_traits/adds_inversely.hpp | 29 + .../icl/type_traits/codomain_type_of.hpp | 64 + .../boost/icl/type_traits/difference.hpp | 19 + .../icl/type_traits/difference_type_of.hpp | 64 + .../boost/icl/type_traits/domain_type_of.hpp | 54 + .../boost/icl/type_traits/element_type_of.hpp | 112 ++ .../boost/icl/type_traits/has_inverse.hpp | 29 + .../icl/type_traits/has_set_semantics.hpp | 35 + .../icl/type_traits/identity_element.hpp | 34 + .../boost/boost/icl/type_traits/infinity.hpp | 60 + .../icl/type_traits/interval_type_default.hpp | 55 + .../icl/type_traits/interval_type_of.hpp | 53 + .../is_associative_element_container.hpp | 32 + .../type_traits/is_asymmetric_interval.hpp | 54 + .../boost/icl/type_traits/is_combinable.hpp | 568 +++++++ .../icl/type_traits/is_concept_equivalent.hpp | 38 + .../boost/icl/type_traits/is_container.hpp | 56 + .../boost/icl/type_traits/is_continuous.hpp | 28 + .../type_traits/is_continuous_interval.hpp | 26 + .../boost/icl/type_traits/is_discrete.hpp | 46 + .../icl/type_traits/is_discrete_interval.hpp | 26 + .../icl/type_traits/is_element_container.hpp | 53 + .../icl/type_traits/is_icl_container.hpp | 33 + .../boost/icl/type_traits/is_interval.hpp | 171 +++ .../icl/type_traits/is_interval_container.hpp | 47 + .../icl/type_traits/is_interval_joiner.hpp | 25 + .../icl/type_traits/is_interval_separator.hpp | 23 + .../icl/type_traits/is_interval_splitter.hpp | 25 + .../icl/type_traits/is_key_container_of.hpp | 88 ++ 3party/boost/boost/icl/type_traits/is_map.hpp | 25 + .../boost/icl/type_traits/is_numeric.hpp | 54 + 3party/boost/boost/icl/type_traits/is_set.hpp | 26 + .../boost/boost/icl/type_traits/is_total.hpp | 23 + .../boost/boost/icl/type_traits/no_type.hpp | 19 + .../boost/boost/icl/type_traits/predicate.hpp | 44 + .../boost/icl/type_traits/segment_type_of.hpp | 53 + 3party/boost/boost/icl/type_traits/size.hpp | 18 + .../boost/icl/type_traits/size_type_of.hpp | 18 + .../boost/boost/icl/type_traits/succ_pred.hpp | 23 + .../boost/boost/icl/type_traits/to_string.hpp | 43 + .../boost/icl/type_traits/type_to_string.hpp | 85 ++ .../boost/icl/type_traits/unit_element.hpp | 38 + .../boost/icl/type_traits/value_size.hpp | 52 + .../containers/containers_fwd.hpp | 2 + .../interprocess/detail/file_wrapper.hpp | 1 + .../detail/managed_open_or_create_impl.hpp | 116 +- .../interprocess/detail/os_file_functions.hpp | 29 +- .../boost/interprocess/detail/win32_api.hpp | 105 +- .../detail/xsi_shared_memory_device.hpp | 11 +- .../detail/xsi_shared_memory_file_wrapper.hpp | 80 + .../boost/interprocess/interprocess_fwd.hpp | 12 +- .../managed_xsi_shared_memory.hpp | 189 +++ .../boost/boost/interprocess/permissions.hpp | 25 +- .../interprocess/shared_memory_object.hpp | 43 +- 3party/boost/boost/interprocess/xsi_key.hpp | 87 ++ .../boost/interprocess/xsi_shared_memory.hpp | 201 +++ 3party/boost/boost/intrusive/avltree.hpp | 21 +- .../boost/intrusive/detail/tree_node.hpp | 2 +- 3party/boost/boost/intrusive/rbtree.hpp | 12 +- 3party/boost/boost/intrusive/sgtree.hpp | 12 +- 3party/boost/boost/intrusive/splaytree.hpp | 12 +- 3party/boost/boost/intrusive/treap.hpp | 21 +- 3party/boost/boost/io/detail/quoted_manip.hpp | 4 +- 3party/boost/boost/iostreams/chain.hpp | 4 +- 3party/boost/boost/iostreams/close.hpp | 4 +- .../detail/adapter/concept_adapter.hpp | 5 +- .../detail/adapter/range_adapter.hpp | 4 +- .../boost/boost/iostreams/detail/optional.hpp | 14 +- .../detail/streambuf/direct_streambuf.hpp | 6 +- .../boost/iostreams/filter/aggregate.hpp | 6 +- 3party/boost/boost/iostreams/filter/gzip.hpp | 4 +- 3party/boost/boost/iostreams/filter/line.hpp | 6 +- .../boost/boost/iostreams/filter/newline.hpp | 8 +- .../boost/iostreams/filter/symmetric.hpp | 8 +- 3party/boost/boost/iostreams/invert.hpp | 6 +- 3party/boost/boost/iostreams/tee.hpp | 10 +- .../boost/boost/iterator/iterator_facade.hpp | 26 +- 3party/boost/boost/math/bindings/mpfr.hpp | 16 + 3party/boost/boost/math/bindings/mpreal.hpp | 896 +++++++++++ .../boost/math/concepts/distributions.hpp | 232 ++- .../boost/boost/math/constants/constants.hpp | 7 +- 3party/boost/boost/math/distributions.hpp | 2 + .../detail/common_error_handling.hpp | 23 +- .../detail/hypergeometric_pdf.hpp | 74 +- 3party/boost/boost/math/distributions/fwd.hpp | 14 + .../boost/math/distributions/geometric.hpp | 516 +++++++ .../distributions/inverse_chi_squared.hpp | 4 +- .../math/distributions/inverse_gamma.hpp | 4 +- .../math/distributions/inverse_gaussian.hpp | 512 +++++++ .../boost/math/distributions/laplace.hpp | 30 +- .../math/distributions/non_central_beta.hpp | 134 +- .../math/distributions/non_central_t.hpp | 161 +- .../boost/math/policies/error_handling.hpp | 28 +- .../detail/ibeta_inverse.hpp | 47 +- .../detail/unchecked_factorial.hpp | 10 +- .../math/special_functions/factorials.hpp | 23 +- .../boost/math/special_functions/legendre.hpp | 2 +- .../boost/math/special_functions/round.hpp | 8 +- .../boost/math/special_functions/trunc.hpp | 8 +- 3party/boost/boost/math/tools/config.hpp | 2 +- 3party/boost/boost/math/tools/promotion.hpp | 3 +- .../boost/msm/back/default_compile_policy.hpp | 1 + .../boost/msm/back/favor_compile_time.hpp | 1 + .../boost/boost/msm/back/history_policies.hpp | 3 + 3party/boost/boost/msm/back/metafunctions.hpp | 202 ++- .../boost/msm/back/mpl_graph_fsm_check.hpp | 48 + 3party/boost/boost/msm/back/no_fsm_check.hpp | 37 + .../msm/back/queue_container_circular.hpp | 32 + .../boost/msm/back/queue_container_deque.hpp | 32 + 3party/boost/boost/msm/back/state_machine.hpp | 296 +++- 3party/boost/boost/msm/front/euml/common.hpp | 2 +- .../boost/msm/front/euml/state_grammar.hpp | 1 + 3party/boost/boost/msm/front/functor_row.hpp | 39 +- 3party/boost/boost/msm/front/internal_row.hpp | 7 +- 3party/boost/boost/msm/front/row2.hpp | 13 +- .../boost/msm/front/state_machine_def.hpp | 13 +- .../msm/mpl_graph/adjacency_list_graph.hpp | 35 + .../msm/mpl_graph/breadth_first_search.hpp | 167 ++ .../msm/mpl_graph/depth_first_search.hpp | 122 ++ .../mpl_graph/detail/adjacency_list_graph.ipp | 128 ++ .../boost/msm/mpl_graph/detail/as_mpl_map.hpp | 100 ++ .../detail/graph_implementation_interface.ipp | 42 + .../mpl_graph/detail/incidence_list_graph.ipp | 106 ++ .../msm/mpl_graph/incidence_list_graph.hpp | 34 + .../boost/boost/msm/mpl_graph/mpl_graph.hpp | 114 ++ .../boost/boost/msm/mpl_graph/mpl_utils.hpp | 62 + .../boost/msm/mpl_graph/search_colors.hpp | 39 + .../boost/boost/numeric/interval/arith2.hpp | 2 +- .../interval/detail/c99_rounding_control.hpp | 27 +- .../detail/c99sub_rounding_control.hpp | 4 +- .../interval/detail/msvc_rounding_control.hpp | 9 + .../interval/detail/x86_rounding_control.hpp | 4 +- .../boost/boost/numeric/interval/transc.hpp | 2 +- .../boost/boost/numeric/interval/utility.hpp | 4 +- 3party/boost/boost/optional/optional.hpp | 221 ++- 3party/boost/boost/optional/optional_io.hpp | 32 +- 3party/boost/boost/polygon/isotropy.hpp | 4 +- 3party/boost/boost/polygon/polygon_traits.hpp | 2 +- .../boost/pool/detail/pool_construct.inc | 343 +++-- .../boost/boost/pool/detail/pool_construct.m4 | 4 +- .../pool/detail/pool_construct_simple.inc | 12 +- .../pool/detail/pool_construct_simple.m4 | 11 +- 3party/boost/boost/pool/object_pool.hpp | 16 +- 3party/boost/boost/pool/pool.hpp | 74 +- 3party/boost/boost/pool/pool_alloc.hpp | 62 +- 3party/boost/boost/pool/poolfwd.hpp | 9 +- .../boost/pool/simple_segregated_storage.hpp | 14 +- 3party/boost/boost/pool/singleton_pool.hpp | 15 +- .../boost/program_options/detail/parsers.hpp | 6 +- .../boost/boost/program_options/parsers.hpp | 4 +- .../parallel/distributed_property_map.hpp | 5 +- .../impl/distributed_property_map.ipp | 19 +- .../parallel/local_property_map.hpp | 6 +- .../boost/boost/property_map/property_map.hpp | 4 +- 3party/boost/boost/proto/args.hpp | 29 +- 3party/boost/boost/proto/context/callable.hpp | 4 +- 3party/boost/boost/proto/context/default.hpp | 4 +- 3party/boost/boost/proto/debug.hpp | 26 +- 3party/boost/boost/proto/detail/decltype.hpp | 4 +- .../boost/proto/detail/poly_function.hpp | 7 +- 3party/boost/boost/proto/domain.hpp | 22 + 3party/boost/boost/proto/extends.hpp | 28 +- 3party/boost/boost/proto/functional.hpp | 15 + .../boost/boost/proto/functional/fusion.hpp | 19 + .../boost/proto/functional/fusion/at.hpp | 56 + .../proto/functional/fusion/pop_back.hpp | 60 + .../proto/functional/fusion/pop_front.hpp | 65 + .../proto/functional/fusion/push_back.hpp | 49 + .../proto/functional/fusion/push_front.hpp | 49 + .../boost/proto/functional/fusion/reverse.hpp | 60 + 3party/boost/boost/proto/functional/std.hpp | 14 + .../boost/proto/functional/std/utility.hpp | 137 ++ 3party/boost/boost/proto/fusion.hpp | 177 +-- 3party/boost/boost/proto/generate.hpp | 18 +- 3party/boost/boost/proto/make_expr.hpp | 68 +- 3party/boost/boost/proto/matches.hpp | 242 +-- 3party/boost/boost/proto/operators.hpp | 6 +- 3party/boost/boost/proto/proto.hpp | 1 + 3party/boost/boost/proto/proto_fwd.hpp | 43 +- 3party/boost/boost/proto/traits.hpp | 44 +- 3party/boost/boost/proto/transform/call.hpp | 2 +- .../boost/boost/proto/transform/default.hpp | 6 +- 3party/boost/boost/proto/transform/fold.hpp | 1 + .../boost/boost/proto/transform/fold_tree.hpp | 1 + 3party/boost/boost/proto/transform/make.hpp | 134 +- .../boost/proto/transform/pass_through.hpp | 2 +- 3party/boost/boost/proto/transform/when.hpp | 95 ++ .../python/converter/builtin_converters.hpp | 2 +- 3party/boost/boost/python/module_init.hpp | 53 +- .../boost/range/adaptor/adjacent_filtered.hpp | 34 +- .../boost/range/adaptor/define_adaptor.hpp | 10 + 3party/boost/boost/range/adaptor/filtered.hpp | 22 +- .../boost/boost/range/adaptor/indirected.hpp | 22 +- 3party/boost/boost/range/adaptor/map.hpp | 39 +- .../boost/boost/range/adaptor/replaced_if.hpp | 22 +- 3party/boost/boost/range/adaptor/reversed.hpp | 22 +- 3party/boost/boost/range/adaptor/sliced.hpp | 79 +- 3party/boost/boost/range/adaptor/strided.hpp | 320 +++- .../boost/boost/range/adaptor/tokenized.hpp | 22 +- .../boost/boost/range/adaptor/transformed.hpp | 61 +- .../boost/boost/range/adaptor/type_erased.hpp | 184 +++ 3party/boost/boost/range/adaptor/uniqued.hpp | 24 +- .../boost/boost/range/algorithm/search_n.hpp | 231 ++- .../boost/boost/range/algorithm/transform.hpp | 2 +- 3party/boost/boost/range/any_range.hpp | 204 +++ 3party/boost/boost/range/begin.hpp | 23 +- 3party/boost/boost/range/combine.hpp | 8 + 3party/boost/boost/range/concepts.hpp | 39 +- 3party/boost/boost/range/counting_range.hpp | 12 +- .../boost/boost/range/detail/any_iterator.hpp | 587 +++++++ .../range/detail/any_iterator_buffer.hpp | 117 ++ .../range/detail/any_iterator_interface.hpp | 258 ++++ .../range/detail/any_iterator_wrapper.hpp | 590 +++++++ 3party/boost/boost/range/detail/begin.hpp | 28 +- 3party/boost/boost/range/detail/end.hpp | 37 +- 3party/boost/boost/range/detail/safe_bool.hpp | 72 + 3party/boost/boost/range/end.hpp | 23 +- .../boost/boost/range/has_range_iterator.hpp | 62 + 3party/boost/boost/range/istream_range.hpp | 12 +- .../boost/boost/range/iterator_range_core.hpp | 36 +- 3party/boost/boost/range/metafunctions.hpp | 1 + 3party/boost/boost/range/size.hpp | 28 +- .../boost/serialization/binary_object.hpp | 2 +- .../serialization/collections_load_imp.hpp | 2 +- .../serialization/extended_type_info.hpp | 2 +- .../extended_type_info_no_rtti.hpp | 6 +- .../extended_type_info_typeid.hpp | 4 +- 3party/boost/boost/serialization/factory.hpp | 2 +- .../boost/serialization/item_version_type.hpp | 4 +- .../boost/boost/serialization/singleton.hpp | 6 +- .../boost/signals/detail/named_slot_map.hpp | 12 +- .../signals/detail/slot_call_iterator.hpp | 4 +- .../boost/boost/signals/signal_template.hpp | 8 +- 3party/boost/boost/signals2/connection.hpp | 6 +- 3party/boost/boost/signals2/deconstruct.hpp | 14 +- .../boost/signals2/detail/auto_buffer.hpp | 82 +- .../boost/signals2/detail/signal_template.hpp | 52 +- .../signals2/detail/slot_call_iterator.hpp | 4 +- .../boost/signals2/preprocessed_signal.hpp | 4 +- .../boost/spirit/home/classic/core/assert.hpp | 6 +- .../classic/core/composite/directives.hpp | 2 +- .../home/classic/dynamic/rule_alias.hpp | 2 +- .../spirit/home/classic/phoenix/closures.hpp | 4 +- .../boost/spirit/home/classic/tree/common.hpp | 5 +- 3party/boost/boost/spirit/home/karma.hpp | 2 +- .../boost/boost/spirit/home/karma/action.hpp | 2 +- .../boost/spirit/home/karma/action/action.hpp | 12 +- 3party/boost/boost/spirit/home/karma/auto.hpp | 2 +- .../boost/spirit/home/karma/auto/auto.hpp | 2 +- .../home/karma/auto/create_generator.hpp | 2 +- .../spirit/home/karma/auto/meta_create.hpp | 7 +- .../boost/spirit/home/karma/auxiliary.hpp | 2 +- .../spirit/home/karma/auxiliary/attr_cast.hpp | 2 +- .../boost/spirit/home/karma/auxiliary/eol.hpp | 2 +- .../boost/spirit/home/karma/auxiliary/eps.hpp | 2 +- .../spirit/home/karma/auxiliary/lazy.hpp | 4 +- .../boost/boost/spirit/home/karma/binary.hpp | 2 +- .../boost/spirit/home/karma/binary/binary.hpp | 2 +- .../spirit/home/karma/binary/padding.hpp | 2 +- 3party/boost/boost/spirit/home/karma/char.hpp | 2 +- .../boost/spirit/home/karma/char/char.hpp | 104 +- .../spirit/home/karma/char/char_class.hpp | 2 +- .../spirit/home/karma/char/char_generator.hpp | 4 +- .../boost/spirit/home/karma/delimit_flag.hpp | 2 +- .../boost/spirit/home/karma/delimit_out.hpp | 2 +- .../karma/detail/alternative_function.hpp | 4 +- .../boost/spirit/home/karma/detail/as.hpp | 74 + .../spirit/home/karma/detail/attributes.hpp | 4 +- .../home/karma/detail/default_width.hpp | 2 +- .../spirit/home/karma/detail/enable_lit.hpp | 30 + .../spirit/home/karma/detail/extract_from.hpp | 2 +- .../home/karma/detail/fail_function.hpp | 4 +- .../spirit/home/karma/detail/generate.hpp | 2 +- .../home/karma/detail/generate_auto.hpp | 2 +- .../spirit/home/karma/detail/generate_to.hpp | 2 +- .../spirit/home/karma/detail/get_casetag.hpp | 4 +- .../home/karma/detail/get_stricttag.hpp | 2 +- .../home/karma/detail/output_iterator.hpp | 2 +- .../home/karma/detail/pass_container.hpp | 24 +- .../home/karma/detail/string_compare.hpp | 6 +- .../home/karma/detail/string_generate.hpp | 2 +- .../home/karma/detail/unused_delimiter.hpp | 2 +- .../boost/spirit/home/karma/directive.hpp | 8 +- .../boost/spirit/home/karma/directive/as.hpp | 163 ++ .../spirit/home/karma/directive/buffer.hpp | 15 +- .../home/karma/directive/center_alignment.hpp | 19 +- .../spirit/home/karma/directive/columns.hpp | 13 +- .../spirit/home/karma/directive/delimit.hpp | 17 +- .../spirit/home/karma/directive/duplicate.hpp | 12 +- .../spirit/home/karma/directive/encoding.hpp | 4 +- .../home/karma/directive/left_alignment.hpp | 19 +- .../spirit/home/karma/directive/maxwidth.hpp | 11 +- .../home/karma/directive/no_delimit.hpp | 12 +- .../spirit/home/karma/directive/omit.hpp | 12 +- .../spirit/home/karma/directive/repeat.hpp | 22 +- .../home/karma/directive/right_alignment.hpp | 20 +- .../home/karma/directive/strict_relaxed.hpp | 2 +- .../home/karma/directive/upper_lower_case.hpp | 5 +- .../spirit/home/karma/directive/verbatim.hpp | 11 +- .../boost/boost/spirit/home/karma/domain.hpp | 4 +- .../boost/boost/spirit/home/karma/format.hpp | 2 +- .../boost/spirit/home/karma/format_auto.hpp | 2 +- .../boost/spirit/home/karma/generate.hpp | 2 +- .../boost/spirit/home/karma/generate_attr.hpp | 2 +- .../boost/spirit/home/karma/generator.hpp | 4 +- .../boost/spirit/home/karma/meta_compiler.hpp | 4 +- .../boost/spirit/home/karma/nonterminal.hpp | 2 +- .../home/karma/nonterminal/debug_handler.hpp | 4 +- .../karma/nonterminal/debug_handler_state.hpp | 2 +- .../home/karma/nonterminal/detail/fcall.hpp | 4 +- .../nonterminal/detail/generator_binder.hpp | 4 +- .../nonterminal/detail/parameterized.hpp | 4 +- .../spirit/home/karma/nonterminal/grammar.hpp | 29 +- .../karma/nonterminal/nonterminal_fwd.hpp | 31 + .../spirit/home/karma/nonterminal/rule.hpp | 42 +- .../home/karma/nonterminal/simple_trace.hpp | 4 +- .../boost/boost/spirit/home/karma/numeric.hpp | 2 +- .../boost/spirit/home/karma/numeric/bool.hpp | 45 +- .../home/karma/numeric/bool_policies.hpp | 2 +- .../home/karma/numeric/detail/bool_utils.hpp | 2 +- .../karma/numeric/detail/numeric_utils.hpp | 2 +- .../home/karma/numeric/detail/real_utils.hpp | 2 +- .../boost/spirit/home/karma/numeric/int.hpp | 62 +- .../boost/spirit/home/karma/numeric/real.hpp | 44 +- .../home/karma/numeric/real_policies.hpp | 2 +- .../boost/spirit/home/karma/numeric/uint.hpp | 55 +- .../boost/spirit/home/karma/operator.hpp | 2 +- .../home/karma/operator/alternative.hpp | 23 +- .../home/karma/operator/and_predicate.hpp | 13 +- .../spirit/home/karma/operator/kleene.hpp | 19 +- .../boost/spirit/home/karma/operator/list.hpp | 19 +- .../home/karma/operator/not_predicate.hpp | 13 +- .../spirit/home/karma/operator/optional.hpp | 13 +- .../boost/spirit/home/karma/operator/plus.hpp | 20 +- .../spirit/home/karma/operator/sequence.hpp | 83 +- .../spirit/home/karma/phoenix_attributes.hpp | 2 +- .../boost/spirit/home/karma/reference.hpp | 17 +- .../boost/boost/spirit/home/karma/stream.hpp | 2 +- .../home/karma/stream/detail/format_manip.hpp | 2 +- .../karma/stream/detail/format_manip_auto.hpp | 2 +- .../karma/stream/detail/iterator_sink.hpp | 2 +- .../spirit/home/karma/stream/format_manip.hpp | 2 +- .../home/karma/stream/format_manip_attr.hpp | 2 +- .../home/karma/stream/ostream_iterator.hpp | 2 +- .../boost/spirit/home/karma/stream/stream.hpp | 2 +- .../boost/boost/spirit/home/karma/string.hpp | 2 +- .../boost/spirit/home/karma/string/lit.hpp | 111 +- .../spirit/home/karma/string/symbols.hpp | 59 +- 3party/boost/boost/spirit/home/karma/what.hpp | 2 +- 3party/boost/boost/spirit/home/lex.hpp | 2 +- .../boost/boost/spirit/home/lex/argument.hpp | 13 +- .../home/lex/detail/sequence_function.hpp | 10 +- 3party/boost/boost/spirit/home/lex/domain.hpp | 4 +- 3party/boost/boost/spirit/home/lex/lexer.hpp | 2 +- .../boost/spirit/home/lex/lexer/action.hpp | 7 +- .../spirit/home/lex/lexer/char_token_def.hpp | 32 +- .../boost/spirit/home/lex/lexer/lexer.hpp | 33 +- .../spirit/home/lex/lexer/lexertl/functor.hpp | 42 +- .../home/lex/lexer/lexertl/functor_data.hpp | 56 +- .../lex/lexer/lexertl/generate_static.hpp | 4 +- .../home/lex/lexer/lexertl/iterator.hpp | 7 +- .../lex/lexer/lexertl/iterator_tokenizer.hpp | 2 +- .../spirit/home/lex/lexer/lexertl/lexer.hpp | 59 +- .../lexer/lexertl/semantic_action_data.hpp | 10 +- .../lex/lexer/lexertl/static_functor_data.hpp | 54 +- .../home/lex/lexer/lexertl/static_lexer.hpp | 9 +- .../home/lex/lexer/lexertl/static_version.hpp | 2 +- .../spirit/home/lex/lexer/lexertl/token.hpp | 209 ++- .../home/lex/lexer/lexertl/wrap_action.hpp | 4 +- .../spirit/home/lex/lexer/pass_flags.hpp | 2 +- .../boost/spirit/home/lex/lexer/sequence.hpp | 9 +- .../home/lex/lexer/string_token_def.hpp | 33 +- .../home/lex/lexer/support_functions.hpp | 81 +- .../boost/spirit/home/lex/lexer/terminals.hpp | 2 +- .../boost/spirit/home/lex/lexer/token_def.hpp | 41 +- .../boost/spirit/home/lex/lexer_lexertl.hpp | 2 +- .../spirit/home/lex/lexer_static_lexertl.hpp | 2 +- .../boost/spirit/home/lex/lexer_type.hpp | 14 +- .../boost/spirit/home/lex/meta_compiler.hpp | 4 +- 3party/boost/boost/spirit/home/lex/qi.hpp | 3 +- .../boost/spirit/home/lex/qi/in_state.hpp | 2 +- .../boost/spirit/home/lex/qi/plain_token.hpp | 21 +- .../spirit/home/lex/qi/plain_tokenid.hpp | 137 ++ .../spirit/home/lex/qi/state_switcher.hpp | 19 +- .../boost/boost/spirit/home/lex/reference.hpp | 21 +- .../spirit/home/lex/tokenize_and_parse.hpp | 2 +- .../home/lex/tokenize_and_parse_attr.hpp | 4 +- .../home/phoenix/detail/type_deduction.hpp | 10 + 3party/boost/boost/spirit/home/qi.hpp | 2 +- 3party/boost/boost/spirit/home/qi/action.hpp | 2 +- .../boost/spirit/home/qi/action/action.hpp | 10 +- 3party/boost/boost/spirit/home/qi/auto.hpp | 2 +- .../boost/boost/spirit/home/qi/auto/auto.hpp | 2 +- .../spirit/home/qi/auto/create_parser.hpp | 2 +- .../boost/spirit/home/qi/auto/meta_create.hpp | 7 +- .../boost/boost/spirit/home/qi/auxiliary.hpp | 4 +- .../boost/spirit/home/qi/auxiliary/attr.hpp | 4 +- .../spirit/home/qi/auxiliary/attr_cast.hpp | 2 +- .../boost/spirit/home/qi/auxiliary/eoi.hpp | 4 +- .../boost/spirit/home/qi/auxiliary/eol.hpp | 4 +- .../boost/spirit/home/qi/auxiliary/eps.hpp | 2 +- .../boost/spirit/home/qi/auxiliary/lazy.hpp | 27 +- 3party/boost/boost/spirit/home/qi/binary.hpp | 2 +- .../boost/spirit/home/qi/binary/binary.hpp | 4 +- 3party/boost/boost/spirit/home/qi/char.hpp | 2 +- .../boost/boost/spirit/home/qi/char/char.hpp | 65 +- .../boost/spirit/home/qi/char/char_class.hpp | 2 +- .../boost/spirit/home/qi/char/char_parser.hpp | 2 +- .../home/qi/detail/alternative_function.hpp | 2 +- .../boost/spirit/home/qi/detail/assign_to.hpp | 98 +- .../spirit/home/qi/detail/attributes.hpp | 14 +- .../boost/spirit/home/qi/detail/construct.hpp | 24 +- .../spirit/home/qi/detail/enable_lit.hpp | 30 + .../spirit/home/qi/detail/expect_function.hpp | 2 +- .../spirit/home/qi/detail/fail_function.hpp | 2 +- .../boost/spirit/home/qi/detail/parse.hpp | 2 +- .../spirit/home/qi/detail/parse_auto.hpp | 2 +- .../spirit/home/qi/detail/pass_container.hpp | 26 +- .../spirit/home/qi/detail/pass_function.hpp | 2 +- .../home/qi/detail/permute_function.hpp | 2 +- .../spirit/home/qi/detail/string_parse.hpp | 2 +- .../spirit/home/qi/detail/unused_skipper.hpp | 2 +- .../boost/boost/spirit/home/qi/directive.hpp | 3 +- .../boost/spirit/home/qi/directive/as.hpp | 163 ++ .../spirit/home/qi/directive/encoding.hpp | 2 +- .../boost/spirit/home/qi/directive/hold.hpp | 11 +- .../boost/spirit/home/qi/directive/lexeme.hpp | 11 +- .../spirit/home/qi/directive/matches.hpp | 11 +- .../spirit/home/qi/directive/no_case.hpp | 2 +- .../spirit/home/qi/directive/no_skip.hpp | 14 +- .../boost/spirit/home/qi/directive/omit.hpp | 11 +- .../boost/spirit/home/qi/directive/raw.hpp | 11 +- .../boost/spirit/home/qi/directive/repeat.hpp | 15 +- .../boost/spirit/home/qi/directive/skip.hpp | 18 +- 3party/boost/boost/spirit/home/qi/domain.hpp | 2 +- 3party/boost/boost/spirit/home/qi/match.hpp | 2 +- .../boost/boost/spirit/home/qi/match_auto.hpp | 2 +- .../boost/spirit/home/qi/meta_compiler.hpp | 2 +- .../boost/spirit/home/qi/nonterminal.hpp | 2 +- .../home/qi/nonterminal/debug_handler.hpp | 2 +- .../qi/nonterminal/debug_handler_state.hpp | 2 +- .../home/qi/nonterminal/detail/fcall.hpp | 2 +- .../qi/nonterminal/detail/parameterized.hpp | 2 +- .../qi/nonterminal/detail/parser_binder.hpp | 2 +- .../home/qi/nonterminal/error_handler.hpp | 2 +- .../spirit/home/qi/nonterminal/grammar.hpp | 27 +- .../home/qi/nonterminal/nonterminal_fwd.hpp | 31 + .../boost/spirit/home/qi/nonterminal/rule.hpp | 29 +- .../home/qi/nonterminal/simple_trace.hpp | 4 +- 3party/boost/boost/spirit/home/qi/numeric.hpp | 2 +- .../boost/spirit/home/qi/numeric/bool.hpp | 262 +++- .../spirit/home/qi/numeric/bool_policies.hpp | 2 +- .../home/qi/numeric/detail/numeric_utils.hpp | 56 +- .../home/qi/numeric/detail/real_impl.hpp | 6 +- .../boost/spirit/home/qi/numeric/int.hpp | 343 ++++- .../spirit/home/qi/numeric/numeric_utils.hpp | 10 +- .../boost/spirit/home/qi/numeric/real.hpp | 280 +++- .../spirit/home/qi/numeric/real_policies.hpp | 4 +- .../boost/spirit/home/qi/numeric/uint.hpp | 382 ++++- .../boost/boost/spirit/home/qi/operator.hpp | 2 +- .../spirit/home/qi/operator/alternative.hpp | 19 +- .../spirit/home/qi/operator/and_predicate.hpp | 12 +- .../spirit/home/qi/operator/difference.hpp | 12 +- .../boost/spirit/home/qi/operator/expect.hpp | 12 +- .../boost/spirit/home/qi/operator/kleene.hpp | 15 +- .../boost/spirit/home/qi/operator/list.hpp | 15 +- .../spirit/home/qi/operator/not_predicate.hpp | 12 +- .../spirit/home/qi/operator/optional.hpp | 12 +- .../spirit/home/qi/operator/permutation.hpp | 18 +- .../boost/spirit/home/qi/operator/plus.hpp | 15 +- .../spirit/home/qi/operator/sequence.hpp | 10 +- .../spirit/home/qi/operator/sequence_base.hpp | 11 +- .../spirit/home/qi/operator/sequential_or.hpp | 16 +- 3party/boost/boost/spirit/home/qi/parse.hpp | 4 +- .../boost/boost/spirit/home/qi/parse_attr.hpp | 5 +- 3party/boost/boost/spirit/home/qi/parser.hpp | 2 +- .../boost/boost/spirit/home/qi/reference.hpp | 16 +- .../boost/boost/spirit/home/qi/skip_flag.hpp | 2 +- .../boost/boost/spirit/home/qi/skip_over.hpp | 2 +- 3party/boost/boost/spirit/home/qi/stream.hpp | 2 +- .../home/qi/stream/detail/iterator_source.hpp | 2 +- .../home/qi/stream/detail/match_manip.hpp | 2 +- .../qi/stream/detail/match_manip_auto.hpp | 2 +- .../spirit/home/qi/stream/match_manip.hpp | 4 +- .../home/qi/stream/match_manip_attr.hpp | 4 +- .../boost/spirit/home/qi/stream/stream.hpp | 2 +- 3party/boost/boost/spirit/home/qi/string.hpp | 2 +- .../spirit/home/qi/string/detail/tst.hpp | 4 +- .../boost/boost/spirit/home/qi/string/lit.hpp | 72 +- .../boost/spirit/home/qi/string/symbols.hpp | 28 +- .../boost/boost/spirit/home/qi/string/tst.hpp | 2 +- .../boost/spirit/home/qi/string/tst_map.hpp | 2 +- 3party/boost/boost/spirit/home/qi/what.hpp | 2 +- 3party/boost/boost/spirit/home/support.hpp | 2 +- .../spirit/home/support/action_dispatch.hpp | 4 +- .../home/support/adapt_adt_attributes.hpp | 9 +- .../spirit/home/support/algorithm/any.hpp | 2 +- .../spirit/home/support/algorithm/any_if.hpp | 4 +- .../home/support/algorithm/any_if_ns.hpp | 4 +- .../spirit/home/support/algorithm/any_ns.hpp | 2 +- .../boost/spirit/home/support/argument.hpp | 2 +- .../boost/spirit/home/support/assert_msg.hpp | 2 +- .../boost/spirit/home/support/attributes.hpp | 170 ++- .../spirit/home/support/attributes_fwd.hpp | 85 +- .../spirit/home/support/auto/meta_create.hpp | 19 +- .../home/support/auxiliary/attr_cast.hpp | 2 +- .../boost/spirit/home/support/char_class.hpp | 4 +- .../home/support/char_encoding/ascii.hpp | 4 +- .../home/support/char_encoding/iso8859_1.hpp | 4 +- .../home/support/char_encoding/standard.hpp | 4 +- .../support/char_encoding/standard_wide.hpp | 4 +- .../home/support/char_encoding/unicode.hpp | 4 +- .../char_encoding/unicode/category_table.hpp | 2 +- .../char_encoding/unicode/create_tables.cpp | 4 +- .../char_encoding/unicode/lowercase_table.hpp | 2 +- .../support/char_encoding/unicode/query.hpp | 2 +- .../char_encoding/unicode/script_table.hpp | 2 +- .../char_encoding/unicode/uppercase_table.hpp | 2 +- .../home/support/char_set/basic_chset.hpp | 2 +- .../spirit/home/support/char_set/range.hpp | 2 +- .../home/support/char_set/range_functions.hpp | 2 +- .../home/support/char_set/range_run.hpp | 2 +- .../home/support/char_set/range_run_impl.hpp | 2 +- .../spirit/home/support/common_terminals.hpp | 35 +- .../boost/spirit/home/support/container.hpp | 40 +- .../boost/spirit/home/support/context.hpp | 2 +- .../spirit/home/support/detail/as_variant.hpp | 2 +- .../spirit/home/support/detail/endian.hpp | 4 +- .../home/support/detail/get_encoding.hpp | 4 +- .../spirit/home/support/detail/hold_any.hpp | 8 +- .../support/detail/lexer/parser/parser.hpp | 30 +- .../support/detail/lexer/parser/tree/node.hpp | 4 +- .../home/support/detail/lexer/rules.hpp | 20 + .../spirit/home/support/detail/make_cons.hpp | 2 +- .../support/detail/math/detail/fp_traits.hpp | 3 +- .../spirit/home/support/detail/pow10.hpp | 4 +- .../support/detail/scoped_enum_emulation.hpp | 2 +- .../boost/spirit/home/support/detail/sign.hpp | 4 +- .../home/support/detail/what_function.hpp | 2 +- .../spirit/home/support/handles_container.hpp | 55 + .../home/support/has_semantic_action.hpp | 3 +- .../boost/boost/spirit/home/support/info.hpp | 2 +- .../iterators/detail/buf_id_check_policy.hpp | 2 +- .../buffering_input_iterator_policy.hpp | 2 +- .../iterators/detail/combine_policies.hpp | 2 +- .../iterators/detail/first_owner_policy.hpp | 2 +- .../iterators/detail/fixed_size_queue.hpp | 2 +- .../detail/fixed_size_queue_policy.hpp | 2 +- .../iterators/detail/functor_input_policy.hpp | 2 +- .../detail/input_iterator_policy.hpp | 2 +- .../iterators/detail/istream_policy.hpp | 2 +- .../iterators/detail/lex_input_policy.hpp | 2 +- .../support/iterators/detail/multi_pass.hpp | 2 +- .../iterators/detail/no_check_policy.hpp | 2 +- .../iterators/detail/ref_counted_policy.hpp | 2 +- .../detail/split_functor_input_policy.hpp | 2 +- .../detail/split_std_deque_policy.hpp | 2 +- .../support/iterators/istream_iterator.hpp | 2 +- .../support/iterators/line_pos_iterator.hpp | 185 +++ .../home/support/iterators/look_ahead.hpp | 2 +- .../home/support/iterators/multi_pass.hpp | 2 +- .../home/support/iterators/multi_pass_fwd.hpp | 2 +- .../support/iterators/ostream_iterator.hpp | 2 +- .../boost/boost/spirit/home/support/lazy.hpp | 2 +- .../spirit/home/support/make_component.hpp | 2 +- .../spirit/home/support/meta_compiler.hpp | 2 +- .../boost/spirit/home/support/modify.hpp | 2 +- .../home/support/multi_pass_wrapper.hpp | 2 +- .../home/support/nonterminal/expand_arg.hpp | 2 +- .../support/nonterminal/extract_param.hpp | 4 +- .../home/support/nonterminal/locals.hpp | 4 +- .../spirit/home/support/numeric_traits.hpp | 97 ++ .../spirit/home/support/sequence_base_id.hpp | 2 +- .../spirit/home/support/string_traits.hpp | 163 +- .../boost/spirit/home/support/terminal.hpp | 4 +- .../boost/spirit/home/support/unused.hpp | 76 +- .../boost/boost/spirit/home/support/utf8.hpp | 2 +- 3party/boost/boost/spirit/include/karma.hpp | 4 +- .../boost/spirit/include/karma_action.hpp | 4 +- .../spirit/include/karma_alternative.hpp | 4 +- .../spirit/include/karma_and_predicate.hpp | 4 +- .../boost/boost/spirit/include/karma_as.hpp | 19 + .../boost/spirit/include/karma_attr_cast.hpp | 4 +- .../boost/boost/spirit/include/karma_auto.hpp | 4 +- .../boost/spirit/include/karma_auxiliary.hpp | 4 +- .../boost/spirit/include/karma_binary.hpp | 4 +- .../boost/boost/spirit/include/karma_bool.hpp | 4 +- .../boost/spirit/include/karma_buffer.hpp | 4 +- .../spirit/include/karma_center_alignment.hpp | 4 +- .../boost/boost/spirit/include/karma_char.hpp | 4 +- .../boost/spirit/include/karma_char_.hpp | 4 +- .../boost/spirit/include/karma_char_class.hpp | 4 +- .../boost/spirit/include/karma_columns.hpp | 4 +- .../boost/spirit/include/karma_delimit.hpp | 4 +- .../boost/spirit/include/karma_directive.hpp | 4 +- .../boost/spirit/include/karma_domain.hpp | 4 +- .../boost/boost/spirit/include/karma_eol.hpp | 4 +- .../boost/boost/spirit/include/karma_eps.hpp | 4 +- .../boost/spirit/include/karma_format.hpp | 4 +- .../spirit/include/karma_format_attr.hpp | 4 +- .../spirit/include/karma_format_auto.hpp | 4 +- .../boost/spirit/include/karma_generate.hpp | 4 +- .../spirit/include/karma_generate_attr.hpp | 4 +- .../spirit/include/karma_generate_auto.hpp | 4 +- .../boost/boost/spirit/include/karma_int.hpp | 4 +- .../boost/spirit/include/karma_kleene.hpp | 4 +- .../boost/boost/spirit/include/karma_lazy.hpp | 4 +- .../spirit/include/karma_left_alignment.hpp | 4 +- .../boost/boost/spirit/include/karma_list.hpp | 4 +- .../boost/spirit/include/karma_maxwidth.hpp | 4 +- .../boost/spirit/include/karma_no_delimit.hpp | 4 +- .../spirit/include/karma_nonterminal.hpp | 4 +- .../spirit/include/karma_not_predicate.hpp | 4 +- .../boost/spirit/include/karma_numeric.hpp | 4 +- .../boost/boost/spirit/include/karma_omit.hpp | 4 +- .../boost/spirit/include/karma_operator.hpp | 4 +- .../boost/spirit/include/karma_optional.hpp | 4 +- .../include/karma_phoenix_attributes.hpp | 4 +- .../boost/boost/spirit/include/karma_plus.hpp | 4 +- .../boost/boost/spirit/include/karma_real.hpp | 4 +- .../boost/spirit/include/karma_repeat.hpp | 4 +- .../spirit/include/karma_right_alignment.hpp | 4 +- .../boost/spirit/include/karma_sequence.hpp | 4 +- .../boost/spirit/include/karma_stream.hpp | 4 +- .../spirit/include/karma_strict_relaxed.hpp | 4 +- .../boost/spirit/include/karma_string.hpp | 4 +- .../boost/spirit/include/karma_symbols.hpp | 4 +- .../boost/boost/spirit/include/karma_uint.hpp | 4 +- .../spirit/include/karma_upper_lower_case.hpp | 4 +- .../boost/spirit/include/karma_verbatim.hpp | 4 +- .../boost/boost/spirit/include/karma_what.hpp | 4 +- 3party/boost/boost/spirit/include/lex.hpp | 4 +- .../boost/boost/spirit/include/lex_domain.hpp | 4 +- .../boost/boost/spirit/include/lex_lexer.hpp | 4 +- .../boost/spirit/include/lex_lexertl.hpp | 4 +- .../spirit/include/lex_static_lexertl.hpp | 4 +- .../spirit/include/lex_tokenize_and_parse.hpp | 4 +- 3party/boost/boost/spirit/include/phoenix.hpp | 4 +- .../spirit/include/phoenix_algorithm.hpp | 4 +- .../boost/spirit/include/phoenix_bind.hpp | 4 +- .../spirit/include/phoenix_container.hpp | 4 +- .../boost/spirit/include/phoenix_core.hpp | 4 +- .../boost/spirit/include/phoenix_function.hpp | 4 +- .../boost/spirit/include/phoenix_fusion.hpp | 4 +- .../boost/spirit/include/phoenix_object.hpp | 4 +- .../boost/spirit/include/phoenix_operator.hpp | 4 +- .../boost/spirit/include/phoenix_scope.hpp | 4 +- .../spirit/include/phoenix_statement.hpp | 4 +- .../boost/spirit/include/phoenix_stl.hpp | 4 +- .../boost/spirit/include/phoenix_version.hpp | 4 +- 3party/boost/boost/spirit/include/qi.hpp | 4 +- .../boost/boost/spirit/include/qi_action.hpp | 4 +- .../boost/spirit/include/qi_alternative.hpp | 4 +- .../boost/spirit/include/qi_and_predicate.hpp | 4 +- 3party/boost/boost/spirit/include/qi_as.hpp | 19 + 3party/boost/boost/spirit/include/qi_attr.hpp | 4 +- .../boost/spirit/include/qi_attr_cast.hpp | 4 +- 3party/boost/boost/spirit/include/qi_auto.hpp | 4 +- .../boost/spirit/include/qi_auxiliary.hpp | 4 +- .../boost/boost/spirit/include/qi_binary.hpp | 4 +- 3party/boost/boost/spirit/include/qi_bool.hpp | 4 +- 3party/boost/boost/spirit/include/qi_char.hpp | 4 +- .../boost/boost/spirit/include/qi_char_.hpp | 4 +- .../boost/spirit/include/qi_char_class.hpp | 4 +- 3party/boost/boost/spirit/include/qi_core.hpp | 4 +- .../boost/spirit/include/qi_difference.hpp | 4 +- .../boost/spirit/include/qi_directive.hpp | 4 +- .../boost/boost/spirit/include/qi_domain.hpp | 4 +- 3party/boost/boost/spirit/include/qi_eoi.hpp | 4 +- 3party/boost/boost/spirit/include/qi_eol.hpp | 4 +- 3party/boost/boost/spirit/include/qi_eps.hpp | 4 +- .../boost/boost/spirit/include/qi_expect.hpp | 4 +- .../boost/boost/spirit/include/qi_grammar.hpp | 4 +- 3party/boost/boost/spirit/include/qi_hold.hpp | 18 + 3party/boost/boost/spirit/include/qi_int.hpp | 4 +- .../boost/boost/spirit/include/qi_kleene.hpp | 4 +- 3party/boost/boost/spirit/include/qi_lazy.hpp | 4 +- .../boost/boost/spirit/include/qi_lexeme.hpp | 4 +- 3party/boost/boost/spirit/include/qi_list.hpp | 4 +- 3party/boost/boost/spirit/include/qi_lit.hpp | 4 +- .../boost/boost/spirit/include/qi_match.hpp | 4 +- .../boost/spirit/include/qi_match_attr.hpp | 4 +- .../boost/spirit/include/qi_match_auto.hpp | 4 +- .../boost/boost/spirit/include/qi_no_case.hpp | 4 +- .../boost/spirit/include/qi_nonterminal.hpp | 4 +- .../boost/spirit/include/qi_not_predicate.hpp | 4 +- .../boost/boost/spirit/include/qi_numeric.hpp | 4 +- 3party/boost/boost/spirit/include/qi_omit.hpp | 4 +- .../boost/spirit/include/qi_operator.hpp | 4 +- .../boost/spirit/include/qi_optional.hpp | 4 +- .../boost/boost/spirit/include/qi_parse.hpp | 4 +- .../boost/spirit/include/qi_parse_attr.hpp | 4 +- .../boost/spirit/include/qi_parse_auto.hpp | 4 +- .../boost/spirit/include/qi_permutation.hpp | 4 +- 3party/boost/boost/spirit/include/qi_plus.hpp | 4 +- 3party/boost/boost/spirit/include/qi_raw.hpp | 4 +- 3party/boost/boost/spirit/include/qi_real.hpp | 4 +- .../boost/boost/spirit/include/qi_repeat.hpp | 4 +- 3party/boost/boost/spirit/include/qi_rule.hpp | 4 +- .../boost/spirit/include/qi_sequence.hpp | 4 +- .../boost/spirit/include/qi_sequential_or.hpp | 4 +- 3party/boost/boost/spirit/include/qi_skip.hpp | 4 +- .../boost/boost/spirit/include/qi_stream.hpp | 4 +- .../boost/boost/spirit/include/qi_string.hpp | 4 +- .../boost/boost/spirit/include/qi_symbols.hpp | 4 +- 3party/boost/boost/spirit/include/qi_uint.hpp | 4 +- 3party/boost/boost/spirit/include/qi_what.hpp | 4 +- 3party/boost/boost/spirit/include/support.hpp | 4 +- .../boost/spirit/include/support_any.hpp | 4 +- .../boost/spirit/include/support_any_if.hpp | 4 +- .../spirit/include/support_any_if_ns.hpp | 4 +- .../boost/spirit/include/support_any_ns.hpp | 4 +- .../boost/spirit/include/support_argument.hpp | 4 +- .../boost/spirit/include/support_ascii.hpp | 4 +- .../spirit/include/support_attributes.hpp | 4 +- .../spirit/include/support_char_class.hpp | 4 +- .../spirit/include/support_iso8859_1.hpp | 4 +- .../include/support_istream_iterator.hpp | 4 +- .../include/support_line_pos_iterator.hpp | 19 + .../boost/spirit/include/support_locals.hpp | 4 +- .../spirit/include/support_look_ahead.hpp | 4 +- .../boost/spirit/include/support_modify.hpp | 4 +- .../spirit/include/support_multi_pass.hpp | 4 +- .../spirit/include/support_multi_pass_fwd.hpp | 4 +- .../boost/spirit/include/support_standard.hpp | 4 +- .../spirit/include/support_standard_wide.hpp | 4 +- .../spirit/include/support_string_traits.hpp | 4 +- .../boost/spirit/include/support_unused.hpp | 4 +- 3party/boost/boost/spirit/include/version.hpp | 8 +- .../boost/spirit/repository/home/karma.hpp | 4 +- .../repository/home/karma/directive.hpp | 4 +- .../home/karma/directive/confix.hpp | 2 +- .../repository/home/karma/nonterminal.hpp | 4 +- .../home/karma/nonterminal/subrule.hpp | 4 +- .../boost/boost/spirit/repository/home/qi.hpp | 4 +- .../spirit/repository/home/qi/directive.hpp | 4 +- .../repository/home/qi/directive/distinct.hpp | 4 +- .../spirit/repository/home/qi/nonterminal.hpp | 4 +- .../home/qi/nonterminal/subrule.hpp | 2 +- .../spirit/repository/home/qi/primitive.hpp | 4 +- .../home/qi/primitive/flush_multi_pass.hpp | 2 +- .../repository/home/qi/primitive/iter_pos.hpp | 2 +- .../spirit/repository/home/support/confix.hpp | 2 +- .../repository/home/support/distinct.hpp | 2 +- .../home/support/flush_multi_pass.hpp | 2 +- .../boost/spirit/repository/include/karma.hpp | 4 +- .../repository/include/karma_confix.hpp | 4 +- .../repository/include/karma_directive.hpp | 4 +- .../repository/include/karma_nonterminal.hpp | 4 +- .../repository/include/karma_subrule.hpp | 4 +- .../boost/spirit/repository/include/qi.hpp | 4 +- .../spirit/repository/include/qi_confix.hpp | 4 +- .../repository/include/qi_directive.hpp | 4 +- .../spirit/repository/include/qi_distinct.hpp | 4 +- .../include/qi_flush_multi_pass.hpp | 4 +- .../spirit/repository/include/qi_iter_pos.hpp | 4 +- .../repository/include/qi_primitive.hpp | 4 +- .../spirit/repository/include/qi_subrule.hpp | 4 +- 3party/boost/boost/statechart/event.hpp | 4 + .../boost/boost/statechart/simple_state.hpp | 19 +- .../boost/boost/statechart/state_machine.hpp | 45 +- 3party/boost/boost/static_assert.hpp | 10 +- .../boost/thread/win32/thread_heap_alloc.hpp | 4 +- 3party/boost/boost/throw_exception.hpp | 2 +- 3party/boost/boost/token_functions.hpp | 8 +- .../boost/boost/tuple/detail/tuple_basic.hpp | 321 ++-- .../detail/tuple_basic_no_partial_spec.hpp | 24 + 3party/boost/boost/tuple/tuple_io.hpp | 4 + .../boost/boost/type_traits/common_type.hpp | 5 + .../boost/type_traits/function_traits.hpp | 2 +- 3party/boost/boost/type_traits/is_const.hpp | 6 +- .../boost/type_traits/is_virtual_base_of.hpp | 2 +- .../boost/boost/type_traits/is_volatile.hpp | 6 +- 3party/boost/boost/type_traits/remove_cv.hpp | 4 +- .../boost/type_traits/remove_reference.hpp | 4 +- .../boost/boost/typeof/msvc/typeof_impl.hpp | 4 +- .../boost/boost/unordered/detail/buckets.hpp | 2 +- 3party/boost/boost/unordered/detail/fwd.hpp | 140 +- 3party/boost/boost/unordered/detail/util.hpp | 4 +- .../boost/unordered/unordered_map_fwd.hpp | 12 +- .../boost/unordered/unordered_set_fwd.hpp | 12 +- 3party/boost/boost/version.hpp | 4 +- 3party/boost/boost/wave.hpp | 2 +- 3party/boost/boost/wave/cpp_context.hpp | 8 +- 3party/boost/boost/wave/cpp_exceptions.hpp | 2 +- .../boost/wave/cpp_iteration_context.hpp | 2 +- 3party/boost/boost/wave/cpp_throw.hpp | 2 +- .../boost/wave/cpplexer/convert_trigraphs.hpp | 2 +- .../boost/wave/cpplexer/cpp_lex_interface.hpp | 2 +- .../cpplexer/cpp_lex_interface_generator.hpp | 2 +- .../boost/wave/cpplexer/cpp_lex_iterator.hpp | 2 +- .../boost/wave/cpplexer/cpp_lex_token.hpp | 2 +- .../wave/cpplexer/cpplexer_exceptions.hpp | 2 +- .../wave/cpplexer/detect_include_guards.hpp | 2 +- .../boost/boost/wave/cpplexer/re2clex/aq.hpp | 2 +- .../boost/wave/cpplexer/re2clex/cpp_re.hpp | 2 +- .../wave/cpplexer/re2clex/cpp_re2c_lexer.hpp | 11 +- .../boost/wave/cpplexer/re2clex/scanner.hpp | 3 +- .../boost/boost/wave/cpplexer/token_cache.hpp | 2 +- .../wave/cpplexer/validate_universal_char.hpp | 2 +- .../boost/wave/grammars/cpp_chlit_grammar.hpp | 2 +- .../wave/grammars/cpp_defined_grammar.hpp | 2 +- .../wave/grammars/cpp_defined_grammar_gen.hpp | 2 +- .../wave/grammars/cpp_expression_grammar.hpp | 2 +- .../grammars/cpp_expression_grammar_gen.hpp | 2 +- .../wave/grammars/cpp_expression_value.hpp | 2 +- .../boost/boost/wave/grammars/cpp_grammar.hpp | 2 +- .../boost/wave/grammars/cpp_grammar_gen.hpp | 2 +- .../wave/grammars/cpp_intlit_grammar.hpp | 2 +- .../wave/grammars/cpp_literal_grammar_gen.hpp | 2 +- .../wave/grammars/cpp_predef_macros_gen.hpp | 2 +- .../grammars/cpp_predef_macros_grammar.hpp | 2 +- .../boost/wave/grammars/cpp_value_error.hpp | 2 +- 3party/boost/boost/wave/language_support.hpp | 30 +- .../boost/boost/wave/preprocessing_hooks.hpp | 2 +- 3party/boost/boost/wave/token_ids.hpp | 15 +- 3party/boost/boost/wave/util/cpp_ifblock.hpp | 2 +- .../boost/wave/util/cpp_include_paths.hpp | 6 +- 3party/boost/boost/wave/util/cpp_iterator.hpp | 53 +- 3party/boost/boost/wave/util/cpp_macromap.hpp | 118 +- .../boost/wave/util/cpp_macromap_predef.hpp | 52 +- .../boost/wave/util/cpp_macromap_utils.hpp | 38 +- .../boost/boost/wave/util/file_position.hpp | 18 +- .../wave/util/filesystem_compatibility.hpp | 71 +- 3party/boost/boost/wave/util/flex_string.hpp | 28 +- .../boost/boost/wave/util/functor_input.hpp | 2 +- .../wave/util/insert_whitespace_detection.hpp | 2 +- .../boost/wave/util/interpret_pragma.hpp | 2 +- .../boost/wave/util/iteration_context.hpp | 2 +- .../boost/wave/util/macro_definition.hpp | 2 +- .../boost/boost/wave/util/macro_helpers.hpp | 2 +- .../boost/boost/wave/util/pattern_parser.hpp | 2 +- 3party/boost/boost/wave/util/symbol_table.hpp | 2 +- .../wave/util/time_conversion_helper.hpp | 2 +- .../boost/wave/util/transform_iterator.hpp | 2 +- .../boost/wave/util/unput_queue_iterator.hpp | 2 +- 3party/boost/boost/wave/wave_config.hpp | 14 +- .../boost/boost/wave/wave_config_constant.hpp | 2 +- 3party/boost/boost/wave/wave_version.hpp | 6 +- .../boost/boost/wave/whitespace_handling.hpp | 83 +- .../boost/boost/xpressive/match_results.hpp | 6 +- 1372 files changed, 34211 insertions(+), 4626 deletions(-) create mode 100644 3party/boost/LICENSE_1_0.txt create mode 100644 3party/boost/boost/config/compiler/pathscale.hpp create mode 100644 3party/boost/boost/detail/bitmask.hpp create mode 100644 3party/boost/boost/detail/fenv.hpp create mode 100644 3party/boost/boost/detail/lightweight_main.hpp create mode 100644 3party/boost/boost/fusion/container/deque/detail/is_sequence_impl.hpp create mode 100644 3party/boost/boost/fusion/include/make_unfused.hpp create mode 100644 3party/boost/boost/fusion/include/unfused.hpp create mode 100644 3party/boost/boost/fusion/sequence/comparison/enable_comparison.hpp create mode 100644 3party/boost/boost/icl/associative_element_container.hpp create mode 100644 3party/boost/boost/icl/associative_interval_container.hpp create mode 100644 3party/boost/boost/icl/closed_interval.hpp create mode 100644 3party/boost/boost/icl/concept/comparable.hpp create mode 100644 3party/boost/boost/icl/concept/container.hpp create mode 100644 3party/boost/boost/icl/concept/element_associator.hpp create mode 100644 3party/boost/boost/icl/concept/element_map.hpp create mode 100644 3party/boost/boost/icl/concept/element_set.hpp create mode 100644 3party/boost/boost/icl/concept/element_set_value.hpp create mode 100644 3party/boost/boost/icl/concept/interval.hpp create mode 100644 3party/boost/boost/icl/concept/interval_associator.hpp create mode 100644 3party/boost/boost/icl/concept/interval_bounds.hpp create mode 100644 3party/boost/boost/icl/concept/interval_map.hpp create mode 100644 3party/boost/boost/icl/concept/interval_set.hpp create mode 100644 3party/boost/boost/icl/concept/interval_set_value.hpp create mode 100644 3party/boost/boost/icl/concept/joinable.hpp create mode 100644 3party/boost/boost/icl/concept/map_value.hpp create mode 100644 3party/boost/boost/icl/concept/set_value.hpp create mode 100644 3party/boost/boost/icl/continuous_interval.hpp create mode 100644 3party/boost/boost/icl/detail/associated_value.hpp create mode 100644 3party/boost/boost/icl/detail/boost_config.hpp create mode 100644 3party/boost/boost/icl/detail/concept_check.hpp create mode 100644 3party/boost/boost/icl/detail/design_config.hpp create mode 100644 3party/boost/boost/icl/detail/element_comparer.hpp create mode 100644 3party/boost/boost/icl/detail/element_iterator.hpp create mode 100644 3party/boost/boost/icl/detail/exclusive_less_than.hpp create mode 100644 3party/boost/boost/icl/detail/interval_map_algo.hpp create mode 100644 3party/boost/boost/icl/detail/interval_morphism.hpp create mode 100644 3party/boost/boost/icl/detail/interval_set_algo.hpp create mode 100644 3party/boost/boost/icl/detail/interval_subset_comparer.hpp create mode 100644 3party/boost/boost/icl/detail/map_algo.hpp create mode 100644 3party/boost/boost/icl/detail/mapped_reference.hpp create mode 100644 3party/boost/boost/icl/detail/notate.hpp create mode 100644 3party/boost/boost/icl/detail/on_absorbtion.hpp create mode 100644 3party/boost/boost/icl/detail/relation_state.hpp create mode 100644 3party/boost/boost/icl/detail/set_algo.hpp create mode 100644 3party/boost/boost/icl/detail/std_set.hpp create mode 100644 3party/boost/boost/icl/detail/subset_comparer.hpp create mode 100644 3party/boost/boost/icl/discrete_interval.hpp create mode 100644 3party/boost/boost/icl/dynamic_interval_traits.hpp create mode 100644 3party/boost/boost/icl/functors.hpp create mode 100644 3party/boost/boost/icl/gregorian.hpp create mode 100644 3party/boost/boost/icl/impl_config.hpp create mode 100644 3party/boost/boost/icl/interval.hpp create mode 100644 3party/boost/boost/icl/interval_base_map.hpp create mode 100644 3party/boost/boost/icl/interval_base_set.hpp create mode 100644 3party/boost/boost/icl/interval_bounds.hpp create mode 100644 3party/boost/boost/icl/interval_combining_style.hpp create mode 100644 3party/boost/boost/icl/interval_map.hpp create mode 100644 3party/boost/boost/icl/interval_set.hpp create mode 100644 3party/boost/boost/icl/interval_traits.hpp create mode 100644 3party/boost/boost/icl/iterator.hpp create mode 100644 3party/boost/boost/icl/left_open_interval.hpp create mode 100644 3party/boost/boost/icl/map.hpp create mode 100644 3party/boost/boost/icl/open_interval.hpp create mode 100644 3party/boost/boost/icl/predicates/distinct_equal.hpp create mode 100644 3party/boost/boost/icl/predicates/element_equal.hpp create mode 100644 3party/boost/boost/icl/predicates/std_equal.hpp create mode 100644 3party/boost/boost/icl/predicates/sub_super_set.hpp create mode 100644 3party/boost/boost/icl/ptime.hpp create mode 100644 3party/boost/boost/icl/rational.hpp create mode 100644 3party/boost/boost/icl/right_open_interval.hpp create mode 100644 3party/boost/boost/icl/separate_interval_set.hpp create mode 100644 3party/boost/boost/icl/set.hpp create mode 100644 3party/boost/boost/icl/split_interval_map.hpp create mode 100644 3party/boost/boost/icl/split_interval_set.hpp create mode 100644 3party/boost/boost/icl/type_traits/absorbs_identities.hpp create mode 100644 3party/boost/boost/icl/type_traits/adds_inversely.hpp create mode 100644 3party/boost/boost/icl/type_traits/codomain_type_of.hpp create mode 100644 3party/boost/boost/icl/type_traits/difference.hpp create mode 100644 3party/boost/boost/icl/type_traits/difference_type_of.hpp create mode 100644 3party/boost/boost/icl/type_traits/domain_type_of.hpp create mode 100644 3party/boost/boost/icl/type_traits/element_type_of.hpp create mode 100644 3party/boost/boost/icl/type_traits/has_inverse.hpp create mode 100644 3party/boost/boost/icl/type_traits/has_set_semantics.hpp create mode 100644 3party/boost/boost/icl/type_traits/identity_element.hpp create mode 100644 3party/boost/boost/icl/type_traits/infinity.hpp create mode 100644 3party/boost/boost/icl/type_traits/interval_type_default.hpp create mode 100644 3party/boost/boost/icl/type_traits/interval_type_of.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_associative_element_container.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_asymmetric_interval.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_combinable.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_concept_equivalent.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_container.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_continuous.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_continuous_interval.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_discrete.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_discrete_interval.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_element_container.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_icl_container.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_interval.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_interval_container.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_interval_joiner.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_interval_separator.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_interval_splitter.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_key_container_of.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_map.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_numeric.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_set.hpp create mode 100644 3party/boost/boost/icl/type_traits/is_total.hpp create mode 100644 3party/boost/boost/icl/type_traits/no_type.hpp create mode 100644 3party/boost/boost/icl/type_traits/predicate.hpp create mode 100644 3party/boost/boost/icl/type_traits/segment_type_of.hpp create mode 100644 3party/boost/boost/icl/type_traits/size.hpp create mode 100644 3party/boost/boost/icl/type_traits/size_type_of.hpp create mode 100644 3party/boost/boost/icl/type_traits/succ_pred.hpp create mode 100644 3party/boost/boost/icl/type_traits/to_string.hpp create mode 100644 3party/boost/boost/icl/type_traits/type_to_string.hpp create mode 100644 3party/boost/boost/icl/type_traits/unit_element.hpp create mode 100644 3party/boost/boost/icl/type_traits/value_size.hpp create mode 100644 3party/boost/boost/interprocess/detail/xsi_shared_memory_file_wrapper.hpp create mode 100644 3party/boost/boost/interprocess/managed_xsi_shared_memory.hpp create mode 100644 3party/boost/boost/interprocess/xsi_key.hpp create mode 100644 3party/boost/boost/interprocess/xsi_shared_memory.hpp create mode 100644 3party/boost/boost/math/bindings/mpreal.hpp create mode 100644 3party/boost/boost/math/distributions/geometric.hpp create mode 100644 3party/boost/boost/math/distributions/inverse_gaussian.hpp create mode 100644 3party/boost/boost/msm/back/mpl_graph_fsm_check.hpp create mode 100644 3party/boost/boost/msm/back/no_fsm_check.hpp create mode 100644 3party/boost/boost/msm/back/queue_container_circular.hpp create mode 100644 3party/boost/boost/msm/back/queue_container_deque.hpp create mode 100644 3party/boost/boost/msm/mpl_graph/adjacency_list_graph.hpp create mode 100644 3party/boost/boost/msm/mpl_graph/breadth_first_search.hpp create mode 100644 3party/boost/boost/msm/mpl_graph/depth_first_search.hpp create mode 100644 3party/boost/boost/msm/mpl_graph/detail/adjacency_list_graph.ipp create mode 100644 3party/boost/boost/msm/mpl_graph/detail/as_mpl_map.hpp create mode 100644 3party/boost/boost/msm/mpl_graph/detail/graph_implementation_interface.ipp create mode 100644 3party/boost/boost/msm/mpl_graph/detail/incidence_list_graph.ipp create mode 100644 3party/boost/boost/msm/mpl_graph/incidence_list_graph.hpp create mode 100755 3party/boost/boost/msm/mpl_graph/mpl_graph.hpp create mode 100644 3party/boost/boost/msm/mpl_graph/mpl_utils.hpp create mode 100644 3party/boost/boost/msm/mpl_graph/search_colors.hpp create mode 100644 3party/boost/boost/proto/functional.hpp create mode 100644 3party/boost/boost/proto/functional/fusion.hpp create mode 100644 3party/boost/boost/proto/functional/fusion/at.hpp create mode 100644 3party/boost/boost/proto/functional/fusion/pop_back.hpp create mode 100644 3party/boost/boost/proto/functional/fusion/pop_front.hpp create mode 100644 3party/boost/boost/proto/functional/fusion/push_back.hpp create mode 100644 3party/boost/boost/proto/functional/fusion/push_front.hpp create mode 100644 3party/boost/boost/proto/functional/fusion/reverse.hpp create mode 100644 3party/boost/boost/proto/functional/std.hpp create mode 100644 3party/boost/boost/proto/functional/std/utility.hpp create mode 100644 3party/boost/boost/range/adaptor/type_erased.hpp create mode 100644 3party/boost/boost/range/any_range.hpp create mode 100644 3party/boost/boost/range/detail/any_iterator.hpp create mode 100644 3party/boost/boost/range/detail/any_iterator_buffer.hpp create mode 100644 3party/boost/boost/range/detail/any_iterator_interface.hpp create mode 100644 3party/boost/boost/range/detail/any_iterator_wrapper.hpp create mode 100644 3party/boost/boost/range/detail/safe_bool.hpp create mode 100644 3party/boost/boost/range/has_range_iterator.hpp create mode 100644 3party/boost/boost/spirit/home/karma/detail/as.hpp create mode 100644 3party/boost/boost/spirit/home/karma/detail/enable_lit.hpp create mode 100644 3party/boost/boost/spirit/home/karma/directive/as.hpp create mode 100644 3party/boost/boost/spirit/home/karma/nonterminal/nonterminal_fwd.hpp create mode 100644 3party/boost/boost/spirit/home/lex/qi/plain_tokenid.hpp create mode 100644 3party/boost/boost/spirit/home/qi/detail/enable_lit.hpp create mode 100644 3party/boost/boost/spirit/home/qi/directive/as.hpp create mode 100644 3party/boost/boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp create mode 100644 3party/boost/boost/spirit/home/support/handles_container.hpp create mode 100644 3party/boost/boost/spirit/home/support/iterators/line_pos_iterator.hpp create mode 100644 3party/boost/boost/spirit/home/support/numeric_traits.hpp create mode 100644 3party/boost/boost/spirit/include/karma_as.hpp create mode 100644 3party/boost/boost/spirit/include/qi_as.hpp create mode 100644 3party/boost/boost/spirit/include/qi_hold.hpp create mode 100644 3party/boost/boost/spirit/include/support_line_pos_iterator.hpp diff --git a/3party/boost/LICENSE_1_0.txt b/3party/boost/LICENSE_1_0.txt new file mode 100644 index 0000000000..36b7cd93cd --- /dev/null +++ b/3party/boost/LICENSE_1_0.txt @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/3party/boost/boost/algorithm/string/detail/find_format.hpp b/3party/boost/boost/algorithm/string/detail/find_format.hpp index 7f5f780b63..8b9ad42766 100644 --- a/3party/boost/boost/algorithm/string/detail/find_format.hpp +++ b/3party/boost/boost/algorithm/string/detail/find_format.hpp @@ -74,17 +74,17 @@ namespace boost { const InputT& Input, FormatterT Formatter, const FindResultT& FindResult ) - { + { if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { - return ::boost::algorithm::detail::find_format_copy_impl2( - Output, - Input, - Formatter, - FindResult, - Formatter(FindResult) ); + return ::boost::algorithm::detail::find_format_copy_impl2( + Output, + Input, + Formatter, + FindResult, + Formatter(FindResult) ); } else { return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); - } + } } @@ -137,14 +137,14 @@ namespace boost { const FindResultT& FindResult) { if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { - return ::boost::algorithm::detail::find_format_copy_impl2( - Input, - Formatter, - FindResult, - Formatter(FindResult) ); + return ::boost::algorithm::detail::find_format_copy_impl2( + Input, + Formatter, + FindResult, + Formatter(FindResult) ); } else { return Input; - } + } } // replace implementation ----------------------------------------------------// @@ -189,12 +189,12 @@ namespace boost { const FindResultT& FindResult) { if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { - ::boost::algorithm::detail::find_format_impl2( - Input, - Formatter, - FindResult, - Formatter(FindResult) ); - } + ::boost::algorithm::detail::find_format_impl2( + Input, + Formatter, + FindResult, + Formatter(FindResult) ); + } } } // namespace detail diff --git a/3party/boost/boost/algorithm/string/detail/find_format_all.hpp b/3party/boost/boost/algorithm/string/detail/find_format_all.hpp index 0f184a3186..978710c95c 100644 --- a/3party/boost/boost/algorithm/string/detail/find_format_all.hpp +++ b/3party/boost/boost/algorithm/string/detail/find_format_all.hpp @@ -84,18 +84,18 @@ namespace boost { FinderT Finder, FormatterT Formatter, const FindResultT& FindResult ) - { + { if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { - return ::boost::algorithm::detail::find_format_all_copy_impl2( - Output, - Input, - Finder, - Formatter, - FindResult, - Formatter(FindResult) ); + return ::boost::algorithm::detail::find_format_all_copy_impl2( + Output, + Input, + Finder, + Formatter, + FindResult, + Formatter(FindResult) ); } else { return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); - } + } } // find_format_all_copy implementation ----------------------------------------------// @@ -161,15 +161,15 @@ namespace boost { const FindResultT& FindResult) { if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { - return ::boost::algorithm::detail::find_format_all_copy_impl2( - Input, - Finder, - Formatter, - FindResult, - Formatter(FindResult) ); + return ::boost::algorithm::detail::find_format_all_copy_impl2( + Input, + Finder, + Formatter, + FindResult, + Formatter(FindResult) ); } else { return Input; - } + } } // find_format_all implementation ------------------------------------------------// @@ -257,13 +257,13 @@ namespace boost { FindResultT FindResult) { if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { - ::boost::algorithm::detail::find_format_all_impl2( - Input, - Finder, - Formatter, - FindResult, - Formatter(FindResult) ); - } + ::boost::algorithm::detail::find_format_all_impl2( + Input, + Finder, + Formatter, + FindResult, + Formatter(FindResult) ); + } } } // namespace detail diff --git a/3party/boost/boost/algorithm/string/detail/find_format_store.hpp b/3party/boost/boost/algorithm/string/detail/find_format_store.hpp index 4872c5a998..e8bd84a6fe 100644 --- a/3party/boost/boost/algorithm/string/detail/find_format_store.hpp +++ b/3party/boost/boost/algorithm/string/detail/find_format_store.hpp @@ -53,7 +53,7 @@ namespace boost { { iterator_range::operator=(FindResult); if( !this->empty() ) { - m_FormatResult=m_Formatter(FindResult); + m_FormatResult=m_Formatter(FindResult); } return *this; diff --git a/3party/boost/boost/algorithm/string/find_iterator.hpp b/3party/boost/boost/algorithm/string/find_iterator.hpp index 72696c7484..b72ba7c785 100644 --- a/3party/boost/boost/algorithm/string/find_iterator.hpp +++ b/3party/boost/boost/algorithm/string/find_iterator.hpp @@ -259,7 +259,11 @@ namespace boost { m_End(End), m_bEof(false) { - increment(); + // force the correct behavior for empty sequences and yield at least one token + if(Begin!=End) + { + increment(); + } } //! Constructor /*! @@ -278,7 +282,11 @@ namespace boost { m_Next=::boost::begin(lit_col); m_End=::boost::end(lit_col); - increment(); + // force the correct behavior for empty sequences and yield at least one token + if(m_Next!=m_End) + { + increment(); + } } diff --git a/3party/boost/boost/archive/archive_exception.hpp b/3party/boost/boost/archive/archive_exception.hpp index 242f752882..b5f33f6853 100644 --- a/3party/boost/boost/archive/archive_exception.hpp +++ b/3party/boost/boost/archive/archive_exception.hpp @@ -17,7 +17,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include -#include +#include #include #include diff --git a/3party/boost/boost/archive/basic_archive.hpp b/3party/boost/boost/archive/basic_archive.hpp index b6769dddbb..d408485206 100644 --- a/3party/boost/boost/archive/basic_archive.hpp +++ b/3party/boost/boost/archive/basic_archive.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include #include // size_t #include @@ -44,7 +44,7 @@ private: public: library_version_type(): t(0) {}; explicit library_version_type(const unsigned int & t_) : t(t_){ - assert(t_ <= boost::integer_traits::const_max); + BOOST_ASSERT(t_ <= boost::integer_traits::const_max); } library_version_type(const library_version_type & t_) : t(t_.t) @@ -80,7 +80,7 @@ public: // should be private - but MPI fails if it's not!!! version_type(): t(0) {}; explicit version_type(const unsigned int & t_) : t(t_){ - assert(t_ <= boost::integer_traits::const_max); + BOOST_ASSERT(t_ <= boost::integer_traits::const_max); } version_type(const version_type & t_) : t(t_.t) @@ -113,10 +113,10 @@ public: // should be private - but then can't use BOOST_STRONG_TYPE below class_id_type() : t(0) {}; explicit class_id_type(const int t_) : t(t_){ - assert(t_ <= boost::integer_traits::const_max); + BOOST_ASSERT(t_ <= boost::integer_traits::const_max); } explicit class_id_type(const std::size_t t_) : t(t_){ - // assert(t_ <= boost::integer_traits::const_max); + // BOOST_ASSERT(t_ <= boost::integer_traits::const_max); } class_id_type(const class_id_type & t_) : t(t_.t) @@ -151,7 +151,7 @@ private: public: object_id_type(): t(0) {}; explicit object_id_type(const unsigned int & t_) : t(t_){ - assert(t_ <= boost::integer_traits::const_max); + BOOST_ASSERT(t_ <= boost::integer_traits::const_max); } object_id_type(const object_id_type & t_) : t(t_.t) @@ -254,7 +254,7 @@ BOOST_ARCHIVE_SIGNATURE(); #define BOOST_ARCHIVE_STRONG_TYPEDEF(T, D) \ class D : public T { \ public: \ - explicit D(const T t) : T(t){} \ + explicit D(const T tt) : T(tt){} \ }; \ /**/ diff --git a/3party/boost/boost/archive/basic_binary_iarchive.hpp b/3party/boost/boost/archive/basic_binary_iarchive.hpp index 9567395559..d851dab4dc 100644 --- a/3party/boost/boost/archive/basic_binary_iarchive.hpp +++ b/3party/boost/boost/archive/basic_binary_iarchive.hpp @@ -72,7 +72,6 @@ public: // include these to trap a change in binary format which // isn't specifically handled - BOOST_STATIC_ASSERT(sizeof(tracking_type) == sizeof(bool)); // upto 32K classes BOOST_STATIC_ASSERT(sizeof(class_id_type) == sizeof(int_least16_t)); BOOST_STATIC_ASSERT(sizeof(class_id_reference_type) == sizeof(int_least16_t)); @@ -83,6 +82,19 @@ public: // binary files don't include the optional information void load_override(class_id_optional_type & /* t */, int){} + void load_override(tracking_type & t, int /*version*/){ + library_version_type lvt = this->get_library_version(); + if(boost::archive::library_version_type(6) < lvt){ + int_least8_t x=0; + * this->This() >> x; + t = boost::archive::tracking_type(x); + } + else{ + bool x=0; + * this->This() >> x; + t = boost::archive::tracking_type(x); + } + } void load_override(class_id_type & t, int version){ library_version_type lvt = this->get_library_version(); if(boost::archive::library_version_type(7) < lvt){ @@ -134,10 +146,23 @@ public: } else if(boost::archive::library_version_type(6) < lvt){ + uint_least8_t x=0; + * this->This() >> x; + t = boost::archive::version_type(x); + } + else + if(boost::archive::library_version_type(5) < lvt){ uint_least16_t x=0; * this->This() >> x; t = boost::archive::version_type(x); } + else + if(boost::archive::library_version_type(2) < lvt){ + // upto 255 versions + unsigned char x=0; + * this->This() >> x; + t = version_type(x); + } else{ unsigned int x=0; * this->This() >> x; @@ -147,7 +172,8 @@ public: void load_override(boost::serialization::item_version_type & t, int version){ library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ +// if(boost::archive::library_version_type(7) < lvt){ + if(boost::archive::library_version_type(6) < lvt){ this->detail_common_iarchive::load_override(t, version); } else diff --git a/3party/boost/boost/archive/basic_binary_iprimitive.hpp b/3party/boost/boost/archive/basic_binary_iprimitive.hpp index a5b6bd4aa1..fc27123ded 100644 --- a/3party/boost/boost/archive/basic_binary_iprimitive.hpp +++ b/3party/boost/boost/archive/basic_binary_iprimitive.hpp @@ -28,7 +28,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include -#include +#include #include #include // std::memcpy #include // std::size_t @@ -95,7 +95,7 @@ public: void load(bool & t){ load_binary(& t, sizeof(t)); int i = t; - assert(0 == i || 1 == i); + BOOST_ASSERT(0 == i || 1 == i); (void)i; // warning suppression for release builds. } BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) @@ -151,7 +151,7 @@ basic_binary_iprimitive::load_binary( std::size_t count ){ // note: an optimizer should eliminate the following for char files - assert( + BOOST_ASSERT( static_cast(count / sizeof(Elem)) <= boost::integer_traits::const_max ); @@ -165,7 +165,7 @@ basic_binary_iprimitive::load_binary( archive_exception(archive_exception::input_stream_error) ); // note: an optimizer should eliminate the following for char files - assert(count % sizeof(Elem) <= boost::integer_traits::const_max); + BOOST_ASSERT(count % sizeof(Elem) <= boost::integer_traits::const_max); s = static_cast(count % sizeof(Elem)); if(0 < s){ // if(is.fail()) diff --git a/3party/boost/boost/archive/basic_binary_oarchive.hpp b/3party/boost/boost/archive/basic_binary_oarchive.hpp index 5321bf0b63..01622b9f3d 100644 --- a/3party/boost/boost/archive/basic_binary_oarchive.hpp +++ b/3party/boost/boost/archive/basic_binary_oarchive.hpp @@ -23,7 +23,7 @@ // IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE // ON PLATFORM APART FROM THE ONE THEY ARE CREATE ON -#include +#include #include #include #include diff --git a/3party/boost/boost/archive/basic_binary_oprimitive.hpp b/3party/boost/boost/archive/basic_binary_oprimitive.hpp index fb0485881b..53e44e4fa9 100644 --- a/3party/boost/boost/archive/basic_binary_oprimitive.hpp +++ b/3party/boost/boost/archive/basic_binary_oprimitive.hpp @@ -24,7 +24,7 @@ // ON PLATFORM APART FROM THE ONE THEY ARE CREATE ON #include -#include +#include #include #include // basic_streambuf #include @@ -88,7 +88,7 @@ public: // trap usage of invalid uninitialized boolean which would // otherwise crash on load. void save(const bool t){ - assert(0 == static_cast(t) || 1 == static_cast(t)); + BOOST_ASSERT(0 == static_cast(t) || 1 == static_cast(t)); save_binary(& t, sizeof(t)); } BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) @@ -146,7 +146,7 @@ basic_binary_oprimitive::save_binary( const void *address, std::size_t count ){ - //assert( + //BOOST_ASSERT( // static_cast((std::numeric_limits::max)()) >= count //); // note: if the following assertions fail @@ -160,7 +160,7 @@ basic_binary_oprimitive::save_binary( // figure number of elements to output - round up count = ( count + sizeof(Elem) - 1) / sizeof(Elem); - assert(count <= std::size_t(boost::integer_traits::const_max)); + BOOST_ASSERT(count <= std::size_t(boost::integer_traits::const_max)); std::streamsize scount = m_sb.sputn( static_cast(address), static_cast(count) @@ -173,7 +173,7 @@ basic_binary_oprimitive::save_binary( // static_cast(address), // count //); - //assert(os.good()); + //BOOST_ASSERT(os.good()); } } //namespace boost diff --git a/3party/boost/boost/archive/basic_text_iprimitive.hpp b/3party/boost/boost/archive/basic_text_iprimitive.hpp index 67ba7db3ed..b927ec91a0 100644 --- a/3party/boost/boost/archive/basic_text_iprimitive.hpp +++ b/3party/boost/boost/archive/basic_text_iprimitive.hpp @@ -24,7 +24,7 @@ // in such cases. So we can't use basic_ostream but rather // use two template parameters -#include +#include #include #include // size_t diff --git a/3party/boost/boost/archive/basic_text_oarchive.hpp b/3party/boost/boost/archive/basic_text_oarchive.hpp index f6ec53420e..dd10f65981 100644 --- a/3party/boost/boost/archive/basic_text_oarchive.hpp +++ b/3party/boost/boost/archive/basic_text_oarchive.hpp @@ -24,7 +24,7 @@ // in such cases. So we can't use basic_ostream but rather // use two template parameters -#include +#include #include #include #include diff --git a/3party/boost/boost/archive/basic_text_oprimitive.hpp b/3party/boost/boost/archive/basic_text_oprimitive.hpp index c0e884aa01..06885ad35e 100644 --- a/3party/boost/boost/archive/basic_text_oprimitive.hpp +++ b/3party/boost/boost/archive/basic_text_oprimitive.hpp @@ -27,7 +27,7 @@ #include #include #include // isnan -#include +#include #include // size_t #include @@ -97,7 +97,7 @@ public: void save(const bool t){ // trap usage of invalid uninitialized boolean which would // otherwise crash on load. - assert(0 == static_cast(t) || 1 == static_cast(t)); + BOOST_ASSERT(0 == static_cast(t) || 1 == static_cast(t)); if(os.fail()) boost::serialization::throw_exception( archive_exception(archive_exception::output_stream_error) diff --git a/3party/boost/boost/archive/detail/basic_serializer.hpp b/3party/boost/boost/archive/detail/basic_serializer.hpp index ab2ffe9d08..5dbd886525 100644 --- a/3party/boost/boost/archive/detail/basic_serializer.hpp +++ b/3party/boost/boost/archive/detail/basic_serializer.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // NULL #include @@ -42,7 +42,7 @@ protected: ) : m_eti(& eti) { - assert(NULL != & eti); + BOOST_ASSERT(NULL != & eti); } public: inline bool diff --git a/3party/boost/boost/archive/detail/oserializer.hpp b/3party/boost/boost/archive/detail/oserializer.hpp index e676f6365d..7d2694d770 100644 --- a/3party/boost/boost/archive/detail/oserializer.hpp +++ b/3party/boost/boost/archive/detail/oserializer.hpp @@ -22,7 +22,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // NULL #include @@ -186,7 +186,7 @@ BOOST_DLLEXPORT void pointer_oserializer::save_object_ptr( basic_oarchive & ar, const void * x ) const { - assert(NULL != x); + BOOST_ASSERT(NULL != x); // make sure call is routed through the highest interface that might // be specialized by the user. T * t = static_cast(const_cast(x)); @@ -384,7 +384,7 @@ struct save_pointer_type { // retrieve the true type of the object pointed to // if this assertion fails its an error in this library - assert(NULL != this_type); + BOOST_ASSERT(NULL != this_type); const boost::serialization::extended_type_info * true_type = i.get_derived_extended_type_info(t); @@ -433,12 +433,12 @@ struct save_pointer_type { archive_serializer_map >::get_const_instance().find(*true_type) ); - assert(NULL != bpos); + BOOST_ASSERT(NULL != bpos); if(NULL == bpos) boost::serialization::throw_exception( archive_exception( archive_exception::unregistered_class, - bpos->get_debug_info() + "derived class not registered or exported" ) ); ar.save_pointer(vp, bpos); diff --git a/3party/boost/boost/archive/impl/basic_binary_iarchive.ipp b/3party/boost/boost/archive/impl/basic_binary_iarchive.ipp index a9757b30d4..8ea39f7005 100644 --- a/3party/boost/boost/archive/impl/basic_binary_iarchive.ipp +++ b/3party/boost/boost/archive/impl/basic_binary_iarchive.ipp @@ -8,7 +8,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include -#include +#include #include #include diff --git a/3party/boost/boost/archive/impl/basic_binary_iprimitive.ipp b/3party/boost/boost/archive/impl/basic_binary_iprimitive.ipp index f609571326..e0f5c2ea10 100644 --- a/3party/boost/boost/archive/impl/basic_binary_iprimitive.ipp +++ b/3party/boost/boost/archive/impl/basic_binary_iprimitive.ipp @@ -8,7 +8,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // size_t, NULL #include // memcpy diff --git a/3party/boost/boost/archive/impl/basic_binary_oarchive.ipp b/3party/boost/boost/archive/impl/basic_binary_oarchive.ipp index cd12c4c6a7..dec2cd77ab 100644 --- a/3party/boost/boost/archive/impl/basic_binary_oarchive.ipp +++ b/3party/boost/boost/archive/impl/basic_binary_oarchive.ipp @@ -8,7 +8,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include -#include +#include #include #include diff --git a/3party/boost/boost/archive/impl/basic_text_iprimitive.ipp b/3party/boost/boost/archive/impl/basic_text_iprimitive.ipp index 581dbfb333..ad6a6d58d2 100644 --- a/3party/boost/boost/archive/impl/basic_text_iprimitive.ipp +++ b/3party/boost/boost/archive/impl/basic_text_iprimitive.ipp @@ -63,7 +63,7 @@ basic_text_iprimitive::load_binary( if(0 == count) return; - assert( + BOOST_ASSERT( static_cast((std::numeric_limits::max)()) > (count + sizeof(CharType) - 1)/sizeof(CharType) ); diff --git a/3party/boost/boost/archive/impl/basic_text_oarchive.ipp b/3party/boost/boost/archive/impl/basic_text_oarchive.ipp index fb8d18e4ac..34e6995ce5 100644 --- a/3party/boost/boost/archive/impl/basic_text_oarchive.ipp +++ b/3party/boost/boost/archive/impl/basic_text_oarchive.ipp @@ -8,7 +8,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include -#include +#include #include #include // for BOOST_DEDUCED_TYPENAME @@ -32,7 +32,7 @@ basic_text_oarchive::newtoken() { switch(delimiter){ default: - assert(false); + BOOST_ASSERT(false); break; case eol: this->This()->put('\n'); diff --git a/3party/boost/boost/archive/impl/basic_xml_grammar.hpp b/3party/boost/boost/archive/impl/basic_xml_grammar.hpp index ca6182e5da..807ed07223 100644 --- a/3party/boost/boost/archive/impl/basic_xml_grammar.hpp +++ b/3party/boost/boost/archive/impl/basic_xml_grammar.hpp @@ -55,26 +55,8 @@ # pragma warning (disable : 4786) // too long name, harmless warning #endif -//#define BOOST_SPIRIT_DEBUG -#include - -// the following hack is to evade a bogus error generated by using the -// word "arg" when bind.hpp has been included -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) -#define arg xarg -#endif - -// spirit stuff -#if (defined __BORLANDC__) && (__BORLANDC__ < 0x593) \ - || (defined _MSC_VER) && (_MSC_VER <= 1300) -#include -#else +#include #include -#endif - -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) -#undef arg -#endif #include #include @@ -97,12 +79,12 @@ public: private: typedef BOOST_DEDUCED_TYPENAME std::basic_istream IStream; typedef BOOST_DEDUCED_TYPENAME std::basic_string StringType; - typedef BOOST_DEDUCED_TYPENAME boost::spirit::chset chset_t; - typedef BOOST_DEDUCED_TYPENAME boost::spirit::chlit chlit_t; - typedef BOOST_DEDUCED_TYPENAME boost::spirit::scanner< + typedef BOOST_DEDUCED_TYPENAME boost::spirit::classic::chset chset_t; + typedef BOOST_DEDUCED_TYPENAME boost::spirit::classic::chlit chlit_t; + typedef BOOST_DEDUCED_TYPENAME boost::spirit::classic::scanner< BOOST_DEDUCED_TYPENAME std::basic_string::iterator > scanner_t; - typedef BOOST_DEDUCED_TYPENAME boost::spirit::rule rule_t; + typedef BOOST_DEDUCED_TYPENAME boost::spirit::classic::rule rule_t; // Start grammar definition rule_t Reference, diff --git a/3party/boost/boost/archive/impl/basic_xml_iarchive.ipp b/3party/boost/boost/archive/impl/basic_xml_iarchive.ipp index 9528c4ad6a..52dfde1a23 100644 --- a/3party/boost/boost/archive/impl/basic_xml_iarchive.ipp +++ b/3party/boost/boost/archive/impl/basic_xml_iarchive.ipp @@ -8,7 +8,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // NULL #include diff --git a/3party/boost/boost/archive/impl/xml_wiarchive_impl.ipp b/3party/boost/boost/archive/impl/xml_wiarchive_impl.ipp index 58498dbe12..9dde66c878 100644 --- a/3party/boost/boost/archive/impl/xml_wiarchive_impl.ipp +++ b/3party/boost/boost/archive/impl/xml_wiarchive_impl.ipp @@ -20,7 +20,7 @@ namespace std{ #include // msvc 6.0 needs this to suppress warnings #ifndef BOOST_NO_STD_WSTREAMBUF -#include +#include #include #include // Dinkumware and RogueWave diff --git a/3party/boost/boost/archive/iterators/base64_exception.hpp b/3party/boost/boost/archive/iterators/base64_exception.hpp index eb2d2e1ba0..81ad28ed81 100644 --- a/3party/boost/boost/archive/iterators/base64_exception.hpp +++ b/3party/boost/boost/archive/iterators/base64_exception.hpp @@ -20,7 +20,7 @@ #ifndef BOOST_NO_EXCEPTIONS #include -#include +#include namespace boost { namespace archive { @@ -53,7 +53,7 @@ public: msg = "attempt to decode a value not in base64 char set"; break; default: - assert(false); + BOOST_ASSERT(false); break; } return msg; diff --git a/3party/boost/boost/archive/iterators/base64_from_binary.hpp b/3party/boost/boost/archive/iterators/base64_from_binary.hpp index 4e6023a8f0..ecb916a06e 100644 --- a/3party/boost/boost/archive/iterators/base64_from_binary.hpp +++ b/3party/boost/boost/archive/iterators/base64_from_binary.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // size_t #include // for BOOST_DEDUCED_TYPENAME @@ -49,7 +49,7 @@ struct from_6_bit { "abcdefghijklmnopqrstuvwxyz" "0123456789" "+/"; - assert(t < 64); + BOOST_ASSERT(t < 64); return lookup_table[static_cast(t)]; } }; diff --git a/3party/boost/boost/archive/iterators/binary_from_base64.hpp b/3party/boost/boost/archive/iterators/binary_from_base64.hpp index d14439f1cd..47e9d0b19b 100644 --- a/3party/boost/boost/archive/iterators/binary_from_base64.hpp +++ b/3party/boost/boost/archive/iterators/binary_from_base64.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // for BOOST_DEDUCED_TYPENAME #include diff --git a/3party/boost/boost/archive/iterators/dataflow.hpp b/3party/boost/boost/archive/iterators/dataflow.hpp index 7958482401..1623b67b73 100644 --- a/3party/boost/boost/archive/iterators/dataflow.hpp +++ b/3party/boost/boost/archive/iterators/dataflow.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // for BOOST_DEDUCED_TYPENAME @@ -47,7 +47,7 @@ struct tri_state { } m_state; // convert to bool operator bool (){ - assert(is_indeterminant != m_state); + BOOST_ASSERT(is_indeterminant != m_state); return is_true == m_state ? true : false; } // assign from bool diff --git a/3party/boost/boost/archive/iterators/dataflow_exception.hpp b/3party/boost/boost/archive/iterators/dataflow_exception.hpp index 765661e470..1d655a1e48 100644 --- a/3party/boost/boost/archive/iterators/dataflow_exception.hpp +++ b/3party/boost/boost/archive/iterators/dataflow_exception.hpp @@ -21,7 +21,7 @@ #include #endif //BOOST_NO_EXCEPTIONS -#include +#include namespace boost { namespace archive { @@ -66,7 +66,7 @@ public: msg = "invalid multbyte/wide char conversion"; break; default: - assert(false); + BOOST_ASSERT(false); break; } return msg; diff --git a/3party/boost/boost/archive/iterators/escape.hpp b/3party/boost/boost/archive/iterators/escape.hpp index b11d1a6722..bb527d439a 100644 --- a/3party/boost/boost/archive/iterators/escape.hpp +++ b/3party/boost/boost/archive/iterators/escape.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // NULL #include // for BOOST_DEDUCED_TYPENAME diff --git a/3party/boost/boost/archive/iterators/insert_linebreaks.hpp b/3party/boost/boost/archive/iterators/insert_linebreaks.hpp index 09b13e5b41..5f826cacc1 100644 --- a/3party/boost/boost/archive/iterators/insert_linebreaks.hpp +++ b/3party/boost/boost/archive/iterators/insert_linebreaks.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // for BOOST_DEDUCED_TYPENAME #if defined(BOOST_NO_STDC_NAMESPACE) diff --git a/3party/boost/boost/archive/iterators/mb_from_wchar.hpp b/3party/boost/boost/archive/iterators/mb_from_wchar.hpp index 4b34c0fa07..d8f8a129f2 100644 --- a/3party/boost/boost/archive/iterators/mb_from_wchar.hpp +++ b/3party/boost/boost/archive/iterators/mb_from_wchar.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // size_t #include // for wctomb() @@ -90,9 +90,9 @@ class mb_from_wchar #else m_bend = std::wctomb(m_buffer, value); #endif - assert(-1 != m_bend); - assert((std::size_t)m_bend <= sizeof(m_buffer)); - assert(m_bend > 0); + BOOST_ASSERT(-1 != m_bend); + BOOST_ASSERT((std::size_t)m_bend <= sizeof(m_buffer)); + BOOST_ASSERT(m_bend > 0); m_bnext = 0; } diff --git a/3party/boost/boost/archive/iterators/remove_whitespace.hpp b/3party/boost/boost/archive/iterators/remove_whitespace.hpp index 2ccc373080..a8e1092983 100644 --- a/3party/boost/boost/archive/iterators/remove_whitespace.hpp +++ b/3party/boost/boost/archive/iterators/remove_whitespace.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // for BOOST_DEDUCED_TYPENAME diff --git a/3party/boost/boost/archive/iterators/transform_width.hpp b/3party/boost/boost/archive/iterators/transform_width.hpp index 7ffc06d130..6e2c526637 100644 --- a/3party/boost/boost/archive/iterators/transform_width.hpp +++ b/3party/boost/boost/archive/iterators/transform_width.hpp @@ -24,6 +24,8 @@ // character and 8 bit bytes. Lowest common multiple is 24 => 4 6 bit characters // or 3 8 bit characters +#include + #include // for BOOST_DEDUCED_TYPENAME & PTFO #include diff --git a/3party/boost/boost/archive/iterators/unescape.hpp b/3party/boost/boost/archive/iterators/unescape.hpp index f437c388e7..9cbd3161c6 100644 --- a/3party/boost/boost/archive/iterators/unescape.hpp +++ b/3party/boost/boost/archive/iterators/unescape.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // for BOOST_DEDUCED_TYPENAME #include diff --git a/3party/boost/boost/archive/iterators/wchar_from_mb.hpp b/3party/boost/boost/archive/iterators/wchar_from_mb.hpp index 12e7d57e77..4da81215ff 100644 --- a/3party/boost/boost/archive/iterators/wchar_from_mb.hpp +++ b/3party/boost/boost/archive/iterators/wchar_from_mb.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include #include // size_t #include // mblen diff --git a/3party/boost/boost/archive/iterators/xml_escape.hpp b/3party/boost/boost/archive/iterators/xml_escape.hpp index fd40c020fd..eadb96e8bf 100644 --- a/3party/boost/boost/archive/iterators/xml_escape.hpp +++ b/3party/boost/boost/archive/iterators/xml_escape.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // for BOOST_DEDUCED_TYPENAME #include diff --git a/3party/boost/boost/archive/iterators/xml_unescape.hpp b/3party/boost/boost/archive/iterators/xml_unescape.hpp index 375e7d29fa..3295adb393 100644 --- a/3party/boost/boost/archive/iterators/xml_unescape.hpp +++ b/3party/boost/boost/archive/iterators/xml_unescape.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // for BOOST_DEDUCED_TYPENAME diff --git a/3party/boost/boost/archive/iterators/xml_unescape_exception.hpp b/3party/boost/boost/archive/iterators/xml_unescape_exception.hpp index a141737347..259d2ba26b 100644 --- a/3party/boost/boost/archive/iterators/xml_unescape_exception.hpp +++ b/3party/boost/boost/archive/iterators/xml_unescape_exception.hpp @@ -20,7 +20,7 @@ #ifndef BOOST_NO_EXCEPTIONS #include -#include +#include namespace boost { namespace archive { diff --git a/3party/boost/boost/archive/text_iarchive.hpp b/3party/boost/boost/archive/text_iarchive.hpp index 6e601058b9..298928b3e7 100644 --- a/3party/boost/boost/archive/text_iarchive.hpp +++ b/3party/boost/boost/archive/text_iarchive.hpp @@ -87,7 +87,8 @@ protected: init(); BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) text_iarchive_impl(std::istream & is, unsigned int flags); - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + // don't import inline definitions! leave this as a reminder. + //BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) ~text_iarchive_impl(){}; }; diff --git a/3party/boost/boost/archive/text_oarchive.hpp b/3party/boost/boost/archive/text_oarchive.hpp index 183a767370..2100d539ef 100644 --- a/3party/boost/boost/archive/text_oarchive.hpp +++ b/3party/boost/boost/archive/text_oarchive.hpp @@ -80,7 +80,8 @@ protected: #endif BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) text_oarchive_impl(std::ostream & os, unsigned int flags); - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) + // don't import inline definitions! leave this as a reminder. + //BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) ~text_oarchive_impl(){}; public: BOOST_ARCHIVE_DECL(void) diff --git a/3party/boost/boost/archive/tmpdir.hpp b/3party/boost/boost/archive/tmpdir.hpp index f962e1160b..9e6ada4cea 100644 --- a/3party/boost/boost/archive/tmpdir.hpp +++ b/3party/boost/boost/archive/tmpdir.hpp @@ -18,7 +18,7 @@ #include // getenv #include // NULL -//#include +//#include #include #ifdef BOOST_NO_STDC_NAMESPACE @@ -38,7 +38,7 @@ inline const char * tmpdir(){ if(NULL == dirname) dirname = std::getenv("TEMP"); if(NULL == dirname){ - //assert(false); // no temp directory found + //BOOST_ASSERT(false); // no temp directory found dirname = "."; } return dirname; diff --git a/3party/boost/boost/archive/xml_archive_exception.hpp b/3party/boost/boost/archive/xml_archive_exception.hpp index c8d65e0112..48e6cb3299 100644 --- a/3party/boost/boost/archive/xml_archive_exception.hpp +++ b/3party/boost/boost/archive/xml_archive_exception.hpp @@ -17,7 +17,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include -#include +#include #include #include diff --git a/3party/boost/boost/array.hpp b/3party/boost/boost/array.hpp index 7df2771475..85b63a2800 100644 --- a/3party/boost/boost/array.hpp +++ b/3party/boost/boost/array.hpp @@ -13,6 +13,7 @@ * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * + * 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility. * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group. * See or Trac issue #3168 * Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow) @@ -69,10 +70,13 @@ namespace boost { typedef std::ptrdiff_t difference_type; // iterator support - iterator begin() { return elems; } - const_iterator begin() const { return elems; } - iterator end() { return elems+N; } - const_iterator end() const { return elems+N; } + iterator begin() { return elems; } + const_iterator begin() const { return elems; } + const_iterator cbegin() const { return elems; } + + iterator end() { return elems+N; } + const_iterator end() const { return elems+N; } + const_iterator cend() const { return elems+N; } // reverse iterator support #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) @@ -99,10 +103,17 @@ namespace boost { const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } + const_reverse_iterator crbegin() const { + return const_reverse_iterator(end()); + } + reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } + const_reverse_iterator crend() const { + return const_reverse_iterator(begin()); + } // operator[] reference operator[](size_type i) @@ -200,10 +211,13 @@ namespace boost { typedef std::ptrdiff_t difference_type; // iterator support - iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); } - const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } - iterator end() { return begin(); } - const_iterator end() const { return begin(); } + iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); } + const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } + const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } + + iterator end() { return begin(); } + const_iterator end() const { return begin(); } + const_iterator cend() const { return cbegin(); } // reverse iterator support #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) @@ -230,10 +244,17 @@ namespace boost { const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } + const_reverse_iterator crbegin() const { + return const_reverse_iterator(end()); + } + reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } + const_reverse_iterator crend() const { + return const_reverse_iterator(begin()); + } // operator[] reference operator[](size_type /*i*/) @@ -346,7 +367,34 @@ namespace boost { x.swap(y); } - // Specific for boost::array: simply returns its elems data member. +#if defined(__SUNPRO_CC) +// Trac ticket #4757; the Sun Solaris compiler can't handle +// syntax like 'T(&get_c_array(boost::array& arg))[N]' +// +// We can't just use this for all compilers, because the +// borland compilers can't handle this form. + namespace detail { + template struct c_array + { + typedef T type[N]; + }; + } + + // Specific for boost::array: simply returns its elems data member. + template + typename detail::c_array::type& get_c_array(boost::array& arg) + { + return arg.elems; + } + + // Specific for boost::array: simply returns its elems data member. + template + typename const detail::c_array::type& get_c_array(const boost::array& arg) + { + return arg.elems; + } +#else +// Specific for boost::array: simply returns its elems data member. template T(&get_c_array(boost::array& arg))[N] { @@ -359,7 +407,8 @@ namespace boost { { return arg.elems; } - +#endif + #if 0 // Overload for std::array, assuming that std::array will have // explicit conversion functions as discussed at the WG21 meeting diff --git a/3party/boost/boost/asio.hpp b/3party/boost/boost/asio.hpp index f94e0d657b..26818068e2 100644 --- a/3party/boost/boost/asio.hpp +++ b/3party/boost/boost/asio.hpp @@ -2,7 +2,7 @@ // asio.hpp // ~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/basic_datagram_socket.hpp b/3party/boost/boost/asio/basic_datagram_socket.hpp index 5272809990..a79967f420 100644 --- a/3party/boost/boost/asio/basic_datagram_socket.hpp +++ b/3party/boost/boost/asio/basic_datagram_socket.hpp @@ -2,7 +2,7 @@ // basic_datagram_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/basic_deadline_timer.hpp b/3party/boost/boost/asio/basic_deadline_timer.hpp index dc471e293c..452999d35a 100644 --- a/3party/boost/boost/asio/basic_deadline_timer.hpp +++ b/3party/boost/boost/asio/basic_deadline_timer.hpp @@ -2,7 +2,7 @@ // basic_deadline_timer.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/basic_io_object.hpp b/3party/boost/boost/asio/basic_io_object.hpp index 414f36563f..8e137e76de 100644 --- a/3party/boost/boost/asio/basic_io_object.hpp +++ b/3party/boost/boost/asio/basic_io_object.hpp @@ -2,7 +2,7 @@ // basic_io_object.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/basic_raw_socket.hpp b/3party/boost/boost/asio/basic_raw_socket.hpp index 0b877deec1..0e58e7f314 100644 --- a/3party/boost/boost/asio/basic_raw_socket.hpp +++ b/3party/boost/boost/asio/basic_raw_socket.hpp @@ -2,7 +2,7 @@ // basic_raw_socket.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/basic_serial_port.hpp b/3party/boost/boost/asio/basic_serial_port.hpp index 4936c9c250..744fd3b958 100644 --- a/3party/boost/boost/asio/basic_serial_port.hpp +++ b/3party/boost/boost/asio/basic_serial_port.hpp @@ -2,7 +2,7 @@ // basic_serial_port.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/basic_socket.hpp b/3party/boost/boost/asio/basic_socket.hpp index 50a0c47773..11ce5c99a8 100644 --- a/3party/boost/boost/asio/basic_socket.hpp +++ b/3party/boost/boost/asio/basic_socket.hpp @@ -2,7 +2,7 @@ // basic_socket.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/basic_socket_acceptor.hpp b/3party/boost/boost/asio/basic_socket_acceptor.hpp index 5192df73eb..a877bc3a5e 100644 --- a/3party/boost/boost/asio/basic_socket_acceptor.hpp +++ b/3party/boost/boost/asio/basic_socket_acceptor.hpp @@ -2,7 +2,7 @@ // basic_socket_acceptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/basic_socket_iostream.hpp b/3party/boost/boost/asio/basic_socket_iostream.hpp index a8cea4fec0..142f404c1a 100644 --- a/3party/boost/boost/asio/basic_socket_iostream.hpp +++ b/3party/boost/boost/asio/basic_socket_iostream.hpp @@ -2,7 +2,7 @@ // basic_socket_iostream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/basic_socket_streambuf.hpp b/3party/boost/boost/asio/basic_socket_streambuf.hpp index 35e96d0d23..c2a9a99885 100644 --- a/3party/boost/boost/asio/basic_socket_streambuf.hpp +++ b/3party/boost/boost/asio/basic_socket_streambuf.hpp @@ -2,7 +2,7 @@ // basic_socket_streambuf.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/basic_stream_socket.hpp b/3party/boost/boost/asio/basic_stream_socket.hpp index 956d623649..87bd035a40 100644 --- a/3party/boost/boost/asio/basic_stream_socket.hpp +++ b/3party/boost/boost/asio/basic_stream_socket.hpp @@ -2,7 +2,7 @@ // basic_stream_socket.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/basic_streambuf.hpp b/3party/boost/boost/asio/basic_streambuf.hpp index 546a4acad1..e0a96cc821 100644 --- a/3party/boost/boost/asio/basic_streambuf.hpp +++ b/3party/boost/boost/asio/basic_streambuf.hpp @@ -2,7 +2,7 @@ // basic_streambuf.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/basic_streambuf_fwd.hpp b/3party/boost/boost/asio/basic_streambuf_fwd.hpp index 215937ea9a..a7d82d3c59 100644 --- a/3party/boost/boost/asio/basic_streambuf_fwd.hpp +++ b/3party/boost/boost/asio/basic_streambuf_fwd.hpp @@ -2,7 +2,7 @@ // basic_streambuf_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/buffer.hpp b/3party/boost/boost/asio/buffer.hpp index f925361c44..15eaad45e3 100644 --- a/3party/boost/boost/asio/buffer.hpp +++ b/3party/boost/boost/asio/buffer.hpp @@ -2,7 +2,7 @@ // buffer.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/buffered_read_stream.hpp b/3party/boost/boost/asio/buffered_read_stream.hpp index 935f5b9100..af24dd666a 100644 --- a/3party/boost/boost/asio/buffered_read_stream.hpp +++ b/3party/boost/boost/asio/buffered_read_stream.hpp @@ -2,7 +2,7 @@ // buffered_read_stream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/buffered_read_stream_fwd.hpp b/3party/boost/boost/asio/buffered_read_stream_fwd.hpp index 87f27d9f05..9c8a1af41c 100644 --- a/3party/boost/boost/asio/buffered_read_stream_fwd.hpp +++ b/3party/boost/boost/asio/buffered_read_stream_fwd.hpp @@ -2,7 +2,7 @@ // buffered_read_stream_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/buffered_stream.hpp b/3party/boost/boost/asio/buffered_stream.hpp index ceeb6f2986..43d21de638 100644 --- a/3party/boost/boost/asio/buffered_stream.hpp +++ b/3party/boost/boost/asio/buffered_stream.hpp @@ -2,7 +2,7 @@ // buffered_stream.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/buffered_stream_fwd.hpp b/3party/boost/boost/asio/buffered_stream_fwd.hpp index d23bc26fbf..042b9903df 100644 --- a/3party/boost/boost/asio/buffered_stream_fwd.hpp +++ b/3party/boost/boost/asio/buffered_stream_fwd.hpp @@ -2,7 +2,7 @@ // buffered_stream_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/buffered_write_stream.hpp b/3party/boost/boost/asio/buffered_write_stream.hpp index c918a0a29d..a163b13a46 100644 --- a/3party/boost/boost/asio/buffered_write_stream.hpp +++ b/3party/boost/boost/asio/buffered_write_stream.hpp @@ -2,7 +2,7 @@ // buffered_write_stream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/buffered_write_stream_fwd.hpp b/3party/boost/boost/asio/buffered_write_stream_fwd.hpp index 8f0f4095d0..0590a96788 100644 --- a/3party/boost/boost/asio/buffered_write_stream_fwd.hpp +++ b/3party/boost/boost/asio/buffered_write_stream_fwd.hpp @@ -2,7 +2,7 @@ // buffered_write_stream_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/buffers_iterator.hpp b/3party/boost/boost/asio/buffers_iterator.hpp index 1ffd02da1f..33753611e9 100644 --- a/3party/boost/boost/asio/buffers_iterator.hpp +++ b/3party/boost/boost/asio/buffers_iterator.hpp @@ -2,7 +2,7 @@ // buffers_iterator.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/completion_condition.hpp b/3party/boost/boost/asio/completion_condition.hpp index dfb48edb8f..7f5fc099d0 100644 --- a/3party/boost/boost/asio/completion_condition.hpp +++ b/3party/boost/boost/asio/completion_condition.hpp @@ -2,7 +2,7 @@ // completion_condition.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/datagram_socket_service.hpp b/3party/boost/boost/asio/datagram_socket_service.hpp index 4d324e2849..0db1f34fe4 100644 --- a/3party/boost/boost/asio/datagram_socket_service.hpp +++ b/3party/boost/boost/asio/datagram_socket_service.hpp @@ -2,7 +2,7 @@ // datagram_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/deadline_timer.hpp b/3party/boost/boost/asio/deadline_timer.hpp index 3ed7b676a5..866588b3c8 100644 --- a/3party/boost/boost/asio/deadline_timer.hpp +++ b/3party/boost/boost/asio/deadline_timer.hpp @@ -2,7 +2,7 @@ // deadline_timer.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/deadline_timer_service.hpp b/3party/boost/boost/asio/deadline_timer_service.hpp index 77060c44c5..ce8fd138ed 100644 --- a/3party/boost/boost/asio/deadline_timer_service.hpp +++ b/3party/boost/boost/asio/deadline_timer_service.hpp @@ -2,7 +2,7 @@ // deadline_timer_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/array_fwd.hpp b/3party/boost/boost/asio/detail/array_fwd.hpp index 3d47a9af20..b7a27bf5e6 100644 --- a/3party/boost/boost/asio/detail/array_fwd.hpp +++ b/3party/boost/boost/asio/detail/array_fwd.hpp @@ -2,7 +2,7 @@ // detail/array_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/base_from_completion_cond.hpp b/3party/boost/boost/asio/detail/base_from_completion_cond.hpp index 797e3cedf6..b2b76d66f9 100644 --- a/3party/boost/boost/asio/detail/base_from_completion_cond.hpp +++ b/3party/boost/boost/asio/detail/base_from_completion_cond.hpp @@ -2,7 +2,7 @@ // detail/base_from_completion_cond.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/bind_handler.hpp b/3party/boost/boost/asio/detail/bind_handler.hpp index 6b515db90e..019964364b 100644 --- a/3party/boost/boost/asio/detail/bind_handler.hpp +++ b/3party/boost/boost/asio/detail/bind_handler.hpp @@ -2,7 +2,7 @@ // detail/bind_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/buffer_resize_guard.hpp b/3party/boost/boost/asio/detail/buffer_resize_guard.hpp index bcffc1ab3b..7df4128a88 100644 --- a/3party/boost/boost/asio/detail/buffer_resize_guard.hpp +++ b/3party/boost/boost/asio/detail/buffer_resize_guard.hpp @@ -2,7 +2,7 @@ // detail/buffer_resize_guard.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/buffer_sequence_adapter.hpp b/3party/boost/boost/asio/detail/buffer_sequence_adapter.hpp index 214cd41728..fdda23f882 100644 --- a/3party/boost/boost/asio/detail/buffer_sequence_adapter.hpp +++ b/3party/boost/boost/asio/detail/buffer_sequence_adapter.hpp @@ -2,7 +2,7 @@ // detail/buffer_sequence_adapter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/buffered_stream_storage.hpp b/3party/boost/boost/asio/detail/buffered_stream_storage.hpp index 9a2929e9e7..86763b5879 100644 --- a/3party/boost/boost/asio/detail/buffered_stream_storage.hpp +++ b/3party/boost/boost/asio/detail/buffered_stream_storage.hpp @@ -2,7 +2,7 @@ // detail/buffered_stream_storage.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/call_stack.hpp b/3party/boost/boost/asio/detail/call_stack.hpp index 561a8265bb..d5f9099a0f 100644 --- a/3party/boost/boost/asio/detail/call_stack.hpp +++ b/3party/boost/boost/asio/detail/call_stack.hpp @@ -2,7 +2,7 @@ // detail/call_stack.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/completion_handler.hpp b/3party/boost/boost/asio/detail/completion_handler.hpp index 6701fb324d..3b023d178f 100644 --- a/3party/boost/boost/asio/detail/completion_handler.hpp +++ b/3party/boost/boost/asio/detail/completion_handler.hpp @@ -2,7 +2,7 @@ // detail/completion_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/config.hpp b/3party/boost/boost/asio/detail/config.hpp index abd2044cce..45c24152da 100644 --- a/3party/boost/boost/asio/detail/config.hpp +++ b/3party/boost/boost/asio/detail/config.hpp @@ -2,7 +2,7 @@ // detail/config.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/consuming_buffers.hpp b/3party/boost/boost/asio/detail/consuming_buffers.hpp index 23114a07c7..f50d4e09bc 100644 --- a/3party/boost/boost/asio/detail/consuming_buffers.hpp +++ b/3party/boost/boost/asio/detail/consuming_buffers.hpp @@ -2,7 +2,7 @@ // detail/consuming_buffers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/deadline_timer_service.hpp b/3party/boost/boost/asio/detail/deadline_timer_service.hpp index c391824d1b..82e0d43cee 100644 --- a/3party/boost/boost/asio/detail/deadline_timer_service.hpp +++ b/3party/boost/boost/asio/detail/deadline_timer_service.hpp @@ -2,7 +2,7 @@ // detail/deadline_timer_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/descriptor_ops.hpp b/3party/boost/boost/asio/detail/descriptor_ops.hpp index 4f82cd65b0..f92a7b4ea8 100644 --- a/3party/boost/boost/asio/detail/descriptor_ops.hpp +++ b/3party/boost/boost/asio/detail/descriptor_ops.hpp @@ -2,7 +2,7 @@ // detail/descriptor_ops.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/descriptor_read_op.hpp b/3party/boost/boost/asio/detail/descriptor_read_op.hpp index c068108f49..884f8f6e25 100644 --- a/3party/boost/boost/asio/detail/descriptor_read_op.hpp +++ b/3party/boost/boost/asio/detail/descriptor_read_op.hpp @@ -2,7 +2,7 @@ // detail/descriptor_read_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/descriptor_write_op.hpp b/3party/boost/boost/asio/detail/descriptor_write_op.hpp index 09838548ab..805eb0b11f 100644 --- a/3party/boost/boost/asio/detail/descriptor_write_op.hpp +++ b/3party/boost/boost/asio/detail/descriptor_write_op.hpp @@ -2,7 +2,7 @@ // detail/descriptor_write_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/dev_poll_reactor.hpp b/3party/boost/boost/asio/detail/dev_poll_reactor.hpp index ef2b0dcdf9..8826753943 100644 --- a/3party/boost/boost/asio/detail/dev_poll_reactor.hpp +++ b/3party/boost/boost/asio/detail/dev_poll_reactor.hpp @@ -2,7 +2,7 @@ // detail/dev_poll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/dev_poll_reactor_fwd.hpp b/3party/boost/boost/asio/detail/dev_poll_reactor_fwd.hpp index 7e8defc565..c5ceab26bc 100644 --- a/3party/boost/boost/asio/detail/dev_poll_reactor_fwd.hpp +++ b/3party/boost/boost/asio/detail/dev_poll_reactor_fwd.hpp @@ -2,7 +2,7 @@ // detail/dev_poll_reactor_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/epoll_reactor.hpp b/3party/boost/boost/asio/detail/epoll_reactor.hpp index 18d87ee507..eaf415c5b3 100644 --- a/3party/boost/boost/asio/detail/epoll_reactor.hpp +++ b/3party/boost/boost/asio/detail/epoll_reactor.hpp @@ -2,7 +2,7 @@ // detail/epoll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/epoll_reactor_fwd.hpp b/3party/boost/boost/asio/detail/epoll_reactor_fwd.hpp index dc0e92dead..01ee84ce49 100644 --- a/3party/boost/boost/asio/detail/epoll_reactor_fwd.hpp +++ b/3party/boost/boost/asio/detail/epoll_reactor_fwd.hpp @@ -2,7 +2,7 @@ // detail/epoll_reactor_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/event.hpp b/3party/boost/boost/asio/detail/event.hpp index c33b65aeff..c8109d1e0c 100644 --- a/3party/boost/boost/asio/detail/event.hpp +++ b/3party/boost/boost/asio/detail/event.hpp @@ -2,7 +2,7 @@ // detail/event.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/eventfd_select_interrupter.hpp b/3party/boost/boost/asio/detail/eventfd_select_interrupter.hpp index b2cb68b7a4..954fe7902c 100644 --- a/3party/boost/boost/asio/detail/eventfd_select_interrupter.hpp +++ b/3party/boost/boost/asio/detail/eventfd_select_interrupter.hpp @@ -2,7 +2,7 @@ // detail/eventfd_select_interrupter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/fd_set_adapter.hpp b/3party/boost/boost/asio/detail/fd_set_adapter.hpp index 138264f47a..8df0426665 100644 --- a/3party/boost/boost/asio/detail/fd_set_adapter.hpp +++ b/3party/boost/boost/asio/detail/fd_set_adapter.hpp @@ -2,7 +2,7 @@ // detail/fd_set_adapter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/fenced_block.hpp b/3party/boost/boost/asio/detail/fenced_block.hpp index 443f487acd..4cb27dc181 100644 --- a/3party/boost/boost/asio/detail/fenced_block.hpp +++ b/3party/boost/boost/asio/detail/fenced_block.hpp @@ -2,7 +2,7 @@ // detail/fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/gcc_arm_fenced_block.hpp b/3party/boost/boost/asio/detail/gcc_arm_fenced_block.hpp index 1350f09db5..58cdfb49bc 100644 --- a/3party/boost/boost/asio/detail/gcc_arm_fenced_block.hpp +++ b/3party/boost/boost/asio/detail/gcc_arm_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/gcc_arm_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/gcc_hppa_fenced_block.hpp b/3party/boost/boost/asio/detail/gcc_hppa_fenced_block.hpp index ef5c09344c..6c5226b30f 100644 --- a/3party/boost/boost/asio/detail/gcc_hppa_fenced_block.hpp +++ b/3party/boost/boost/asio/detail/gcc_hppa_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/gcc_hppa_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/gcc_sync_fenced_block.hpp b/3party/boost/boost/asio/detail/gcc_sync_fenced_block.hpp index 83341d50ae..65472ccfc5 100644 --- a/3party/boost/boost/asio/detail/gcc_sync_fenced_block.hpp +++ b/3party/boost/boost/asio/detail/gcc_sync_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/gcc_sync_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/gcc_x86_fenced_block.hpp b/3party/boost/boost/asio/detail/gcc_x86_fenced_block.hpp index 5353f87153..fb8473c7c0 100644 --- a/3party/boost/boost/asio/detail/gcc_x86_fenced_block.hpp +++ b/3party/boost/boost/asio/detail/gcc_x86_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/gcc_x86_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/handler_alloc_helpers.hpp b/3party/boost/boost/asio/detail/handler_alloc_helpers.hpp index 00d4c022c0..fc3ec333b9 100644 --- a/3party/boost/boost/asio/detail/handler_alloc_helpers.hpp +++ b/3party/boost/boost/asio/detail/handler_alloc_helpers.hpp @@ -2,7 +2,7 @@ // detail/handler_alloc_helpers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/handler_invoke_helpers.hpp b/3party/boost/boost/asio/detail/handler_invoke_helpers.hpp index 996bde9a84..3b449976d5 100644 --- a/3party/boost/boost/asio/detail/handler_invoke_helpers.hpp +++ b/3party/boost/boost/asio/detail/handler_invoke_helpers.hpp @@ -2,7 +2,7 @@ // detail/handler_invoke_helpers.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/hash_map.hpp b/3party/boost/boost/asio/detail/hash_map.hpp index c58096b5ff..4f4eed3a1b 100644 --- a/3party/boost/boost/asio/detail/hash_map.hpp +++ b/3party/boost/boost/asio/detail/hash_map.hpp @@ -2,7 +2,7 @@ // detail/hash_map.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/descriptor_ops.ipp b/3party/boost/boost/asio/detail/impl/descriptor_ops.ipp index 74a8e6f32a..9a2bb3b10e 100644 --- a/3party/boost/boost/asio/detail/impl/descriptor_ops.ipp +++ b/3party/boost/boost/asio/detail/impl/descriptor_ops.ipp @@ -2,7 +2,7 @@ // detail/impl/descriptor_ops.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/dev_poll_reactor.hpp b/3party/boost/boost/asio/detail/impl/dev_poll_reactor.hpp index 2aed0a806e..a6b7078f80 100644 --- a/3party/boost/boost/asio/detail/impl/dev_poll_reactor.hpp +++ b/3party/boost/boost/asio/detail/impl/dev_poll_reactor.hpp @@ -2,7 +2,7 @@ // detail/impl/dev_poll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/dev_poll_reactor.ipp b/3party/boost/boost/asio/detail/impl/dev_poll_reactor.ipp index 67f6d50de0..b9d5e617b7 100644 --- a/3party/boost/boost/asio/detail/impl/dev_poll_reactor.ipp +++ b/3party/boost/boost/asio/detail/impl/dev_poll_reactor.ipp @@ -2,7 +2,7 @@ // detail/impl/dev_poll_reactor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/epoll_reactor.hpp b/3party/boost/boost/asio/detail/impl/epoll_reactor.hpp index 49f0d50b71..0339cfda91 100644 --- a/3party/boost/boost/asio/detail/impl/epoll_reactor.hpp +++ b/3party/boost/boost/asio/detail/impl/epoll_reactor.hpp @@ -2,7 +2,7 @@ // detail/impl/epoll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/epoll_reactor.ipp b/3party/boost/boost/asio/detail/impl/epoll_reactor.ipp index a4c2491018..5afb891ee4 100644 --- a/3party/boost/boost/asio/detail/impl/epoll_reactor.ipp +++ b/3party/boost/boost/asio/detail/impl/epoll_reactor.ipp @@ -2,7 +2,7 @@ // detail/impl/epoll_reactor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -357,7 +357,7 @@ void epoll_reactor::update_timeout() return; } #endif // defined(BOOST_ASIO_HAS_TIMERFD) - interrupter_.interrupt(); + interrupt(); } int epoll_reactor::get_timeout() diff --git a/3party/boost/boost/asio/detail/impl/eventfd_select_interrupter.ipp b/3party/boost/boost/asio/detail/impl/eventfd_select_interrupter.ipp index 5bcc55be58..d270b310d7 100644 --- a/3party/boost/boost/asio/detail/impl/eventfd_select_interrupter.ipp +++ b/3party/boost/boost/asio/detail/impl/eventfd_select_interrupter.ipp @@ -2,7 +2,7 @@ // detail/impl/eventfd_select_interrupter.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Roelof Naude (roelof.naude at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/impl/kqueue_reactor.hpp b/3party/boost/boost/asio/detail/impl/kqueue_reactor.hpp index 7bb02690a6..779f272cda 100644 --- a/3party/boost/boost/asio/detail/impl/kqueue_reactor.hpp +++ b/3party/boost/boost/asio/detail/impl/kqueue_reactor.hpp @@ -2,7 +2,7 @@ // detail/impl/kqueue_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/impl/kqueue_reactor.ipp b/3party/boost/boost/asio/detail/impl/kqueue_reactor.ipp index 08209bd248..3710109891 100644 --- a/3party/boost/boost/asio/detail/impl/kqueue_reactor.ipp +++ b/3party/boost/boost/asio/detail/impl/kqueue_reactor.ipp @@ -2,7 +2,7 @@ // detail/impl/kqueue_reactor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/impl/pipe_select_interrupter.ipp b/3party/boost/boost/asio/detail/impl/pipe_select_interrupter.ipp index f2a72916d7..9a0a872b2e 100644 --- a/3party/boost/boost/asio/detail/impl/pipe_select_interrupter.ipp +++ b/3party/boost/boost/asio/detail/impl/pipe_select_interrupter.ipp @@ -2,7 +2,7 @@ // detail/impl/pipe_select_interrupter.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/posix_event.ipp b/3party/boost/boost/asio/detail/impl/posix_event.ipp index 7e89b6c181..893e8cc00b 100644 --- a/3party/boost/boost/asio/detail/impl/posix_event.ipp +++ b/3party/boost/boost/asio/detail/impl/posix_event.ipp @@ -2,7 +2,7 @@ // detail/impl/posix_event.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/posix_mutex.ipp b/3party/boost/boost/asio/detail/impl/posix_mutex.ipp index a4f81bb1da..908bfab323 100644 --- a/3party/boost/boost/asio/detail/impl/posix_mutex.ipp +++ b/3party/boost/boost/asio/detail/impl/posix_mutex.ipp @@ -2,7 +2,7 @@ // detail/impl/posix_mutex.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/posix_thread.ipp b/3party/boost/boost/asio/detail/impl/posix_thread.ipp index 5dc41fa048..feb6dd16dd 100644 --- a/3party/boost/boost/asio/detail/impl/posix_thread.ipp +++ b/3party/boost/boost/asio/detail/impl/posix_thread.ipp @@ -2,7 +2,7 @@ // detail/impl/posix_thread.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/posix_tss_ptr.ipp b/3party/boost/boost/asio/detail/impl/posix_tss_ptr.ipp index 1c626e58c8..89c1bf5c09 100644 --- a/3party/boost/boost/asio/detail/impl/posix_tss_ptr.ipp +++ b/3party/boost/boost/asio/detail/impl/posix_tss_ptr.ipp @@ -2,7 +2,7 @@ // detail/impl/posix_tss_ptr.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/reactive_descriptor_service.ipp b/3party/boost/boost/asio/detail/impl/reactive_descriptor_service.ipp index 6f0dc5aa20..a1ee09a233 100644 --- a/3party/boost/boost/asio/detail/impl/reactive_descriptor_service.ipp +++ b/3party/boost/boost/asio/detail/impl/reactive_descriptor_service.ipp @@ -2,7 +2,7 @@ // detail/impl/reactive_descriptor_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/reactive_serial_port_service.ipp b/3party/boost/boost/asio/detail/impl/reactive_serial_port_service.ipp index b46720997f..ece61d38d4 100644 --- a/3party/boost/boost/asio/detail/impl/reactive_serial_port_service.ipp +++ b/3party/boost/boost/asio/detail/impl/reactive_serial_port_service.ipp @@ -2,7 +2,7 @@ // detail/impl/reactive_serial_port_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/impl/reactive_socket_service_base.ipp b/3party/boost/boost/asio/detail/impl/reactive_socket_service_base.ipp index cecbe73aa8..d084a81111 100644 --- a/3party/boost/boost/asio/detail/impl/reactive_socket_service_base.ipp +++ b/3party/boost/boost/asio/detail/impl/reactive_socket_service_base.ipp @@ -2,7 +2,7 @@ // detail/reactive_socket_service_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/resolver_service_base.ipp b/3party/boost/boost/asio/detail/impl/resolver_service_base.ipp index d1af0be4e4..e456bb9984 100644 --- a/3party/boost/boost/asio/detail/impl/resolver_service_base.ipp +++ b/3party/boost/boost/asio/detail/impl/resolver_service_base.ipp @@ -2,7 +2,7 @@ // detail/impl/resolver_service_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/select_reactor.hpp b/3party/boost/boost/asio/detail/impl/select_reactor.hpp index 55e064e4aa..3773bfb776 100644 --- a/3party/boost/boost/asio/detail/impl/select_reactor.hpp +++ b/3party/boost/boost/asio/detail/impl/select_reactor.hpp @@ -2,7 +2,7 @@ // detail/impl/select_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/select_reactor.ipp b/3party/boost/boost/asio/detail/impl/select_reactor.ipp index af6e6c1ecb..8fcf68e2d2 100644 --- a/3party/boost/boost/asio/detail/impl/select_reactor.ipp +++ b/3party/boost/boost/asio/detail/impl/select_reactor.ipp @@ -2,7 +2,7 @@ // detail/impl/select_reactor.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/service_registry.hpp b/3party/boost/boost/asio/detail/impl/service_registry.hpp index 59eb3f786a..97f5771cbf 100644 --- a/3party/boost/boost/asio/detail/impl/service_registry.hpp +++ b/3party/boost/boost/asio/detail/impl/service_registry.hpp @@ -2,7 +2,7 @@ // detail/impl/service_registry.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/service_registry.ipp b/3party/boost/boost/asio/detail/impl/service_registry.ipp index 9f7381ee52..c2f07ec2e9 100644 --- a/3party/boost/boost/asio/detail/impl/service_registry.ipp +++ b/3party/boost/boost/asio/detail/impl/service_registry.ipp @@ -2,7 +2,7 @@ // detail/impl/service_registry.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/socket_ops.ipp b/3party/boost/boost/asio/detail/impl/socket_ops.ipp index 5ac052a457..e240acdaee 100644 --- a/3party/boost/boost/asio/detail/impl/socket_ops.ipp +++ b/3party/boost/boost/asio/detail/impl/socket_ops.ipp @@ -2,7 +2,7 @@ // detail/impl/socket_ops.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/socket_select_interrupter.ipp b/3party/boost/boost/asio/detail/impl/socket_select_interrupter.ipp index d697a6ec5d..3b64771f70 100644 --- a/3party/boost/boost/asio/detail/impl/socket_select_interrupter.ipp +++ b/3party/boost/boost/asio/detail/impl/socket_select_interrupter.ipp @@ -2,7 +2,7 @@ // detail/impl/socket_select_interrupter.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/strand_service.hpp b/3party/boost/boost/asio/detail/impl/strand_service.hpp index e959947a24..5cb320df2d 100644 --- a/3party/boost/boost/asio/detail/impl/strand_service.hpp +++ b/3party/boost/boost/asio/detail/impl/strand_service.hpp @@ -2,7 +2,7 @@ // detail/impl/strand_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/strand_service.ipp b/3party/boost/boost/asio/detail/impl/strand_service.ipp index f94570aacf..6a42146839 100644 --- a/3party/boost/boost/asio/detail/impl/strand_service.ipp +++ b/3party/boost/boost/asio/detail/impl/strand_service.ipp @@ -2,7 +2,7 @@ // detail/impl/strand_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/task_io_service.hpp b/3party/boost/boost/asio/detail/impl/task_io_service.hpp index ed5b2c47f9..a002189373 100644 --- a/3party/boost/boost/asio/detail/impl/task_io_service.hpp +++ b/3party/boost/boost/asio/detail/impl/task_io_service.hpp @@ -2,7 +2,7 @@ // detail/impl/task_io_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/task_io_service.ipp b/3party/boost/boost/asio/detail/impl/task_io_service.ipp index 4cc232624a..babfa7b8cc 100644 --- a/3party/boost/boost/asio/detail/impl/task_io_service.ipp +++ b/3party/boost/boost/asio/detail/impl/task_io_service.ipp @@ -2,7 +2,7 @@ // detail/impl/task_io_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/throw_error.ipp b/3party/boost/boost/asio/detail/impl/throw_error.ipp index e66cca5964..5ba6b9c570 100644 --- a/3party/boost/boost/asio/detail/impl/throw_error.ipp +++ b/3party/boost/boost/asio/detail/impl/throw_error.ipp @@ -2,7 +2,7 @@ // detail/impl/throw_error.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/timer_queue.ipp b/3party/boost/boost/asio/detail/impl/timer_queue.ipp index 3789ac88bd..cff852f306 100644 --- a/3party/boost/boost/asio/detail/impl/timer_queue.ipp +++ b/3party/boost/boost/asio/detail/impl/timer_queue.ipp @@ -2,7 +2,7 @@ // detail/impl/timer_queue.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/timer_queue_set.ipp b/3party/boost/boost/asio/detail/impl/timer_queue_set.ipp index 275b9c5a0a..d1027e6f3d 100644 --- a/3party/boost/boost/asio/detail/impl/timer_queue_set.ipp +++ b/3party/boost/boost/asio/detail/impl/timer_queue_set.ipp @@ -2,7 +2,7 @@ // detail/impl/timer_queue_set.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/win_event.ipp b/3party/boost/boost/asio/detail/impl/win_event.ipp index d383c5b652..fe904fb982 100644 --- a/3party/boost/boost/asio/detail/impl/win_event.ipp +++ b/3party/boost/boost/asio/detail/impl/win_event.ipp @@ -2,7 +2,7 @@ // detail/win_event.ipp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/win_iocp_handle_service.ipp b/3party/boost/boost/asio/detail/impl/win_iocp_handle_service.ipp index 3169632bab..eb6643a8db 100644 --- a/3party/boost/boost/asio/detail/impl/win_iocp_handle_service.ipp +++ b/3party/boost/boost/asio/detail/impl/win_iocp_handle_service.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_handle_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/impl/win_iocp_io_service.hpp b/3party/boost/boost/asio/detail/impl/win_iocp_io_service.hpp index cccff70ab2..18b9413f15 100644 --- a/3party/boost/boost/asio/detail/impl/win_iocp_io_service.hpp +++ b/3party/boost/boost/asio/detail/impl/win_iocp_io_service.hpp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_io_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/win_iocp_io_service.ipp b/3party/boost/boost/asio/detail/impl/win_iocp_io_service.ipp index 08b81e952c..9711702051 100644 --- a/3party/boost/boost/asio/detail/impl/win_iocp_io_service.ipp +++ b/3party/boost/boost/asio/detail/impl/win_iocp_io_service.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_io_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/win_iocp_serial_port_service.ipp b/3party/boost/boost/asio/detail/impl/win_iocp_serial_port_service.ipp index bd2310c7a4..32ab6d1205 100644 --- a/3party/boost/boost/asio/detail/impl/win_iocp_serial_port_service.ipp +++ b/3party/boost/boost/asio/detail/impl/win_iocp_serial_port_service.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_serial_port_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/impl/win_iocp_socket_service_base.ipp b/3party/boost/boost/asio/detail/impl/win_iocp_socket_service_base.ipp index e3016585ef..0a2825b386 100644 --- a/3party/boost/boost/asio/detail/impl/win_iocp_socket_service_base.ipp +++ b/3party/boost/boost/asio/detail/impl/win_iocp_socket_service_base.ipp @@ -2,7 +2,7 @@ // detail/impl/win_iocp_socket_service_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/win_mutex.ipp b/3party/boost/boost/asio/detail/impl/win_mutex.ipp index 65ffb3b7d6..af0d20e160 100644 --- a/3party/boost/boost/asio/detail/impl/win_mutex.ipp +++ b/3party/boost/boost/asio/detail/impl/win_mutex.ipp @@ -2,7 +2,7 @@ // detail/impl/win_mutex.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/win_thread.ipp b/3party/boost/boost/asio/detail/impl/win_thread.ipp index 22d23007e4..07cc5c244e 100644 --- a/3party/boost/boost/asio/detail/impl/win_thread.ipp +++ b/3party/boost/boost/asio/detail/impl/win_thread.ipp @@ -2,7 +2,7 @@ // detail/impl/win_thread.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/win_tss_ptr.ipp b/3party/boost/boost/asio/detail/impl/win_tss_ptr.ipp index 7da9be3443..02abd55088 100644 --- a/3party/boost/boost/asio/detail/impl/win_tss_ptr.ipp +++ b/3party/boost/boost/asio/detail/impl/win_tss_ptr.ipp @@ -2,7 +2,7 @@ // detail/impl/win_tss_ptr.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/impl/winsock_init.ipp b/3party/boost/boost/asio/detail/impl/winsock_init.ipp index 082ea84409..e8fd647c34 100644 --- a/3party/boost/boost/asio/detail/impl/winsock_init.ipp +++ b/3party/boost/boost/asio/detail/impl/winsock_init.ipp @@ -2,7 +2,7 @@ // detail/impl/winsock_init.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/io_control.hpp b/3party/boost/boost/asio/detail/io_control.hpp index cb02fee65b..c63e6e567c 100644 --- a/3party/boost/boost/asio/detail/io_control.hpp +++ b/3party/boost/boost/asio/detail/io_control.hpp @@ -2,7 +2,7 @@ // detail/io_control.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/kqueue_reactor.hpp b/3party/boost/boost/asio/detail/kqueue_reactor.hpp index eb2a2430f0..80f7ca30d5 100644 --- a/3party/boost/boost/asio/detail/kqueue_reactor.hpp +++ b/3party/boost/boost/asio/detail/kqueue_reactor.hpp @@ -2,7 +2,7 @@ // detail/kqueue_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/kqueue_reactor_fwd.hpp b/3party/boost/boost/asio/detail/kqueue_reactor_fwd.hpp index 97f8c96ac4..1bceb30963 100644 --- a/3party/boost/boost/asio/detail/kqueue_reactor_fwd.hpp +++ b/3party/boost/boost/asio/detail/kqueue_reactor_fwd.hpp @@ -2,7 +2,7 @@ // detail/kqueue_reactor_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/local_free_on_block_exit.hpp b/3party/boost/boost/asio/detail/local_free_on_block_exit.hpp index 6c8e038049..576e656749 100644 --- a/3party/boost/boost/asio/detail/local_free_on_block_exit.hpp +++ b/3party/boost/boost/asio/detail/local_free_on_block_exit.hpp @@ -2,7 +2,7 @@ // detail/local_free_on_block_exit.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/macos_fenced_block.hpp b/3party/boost/boost/asio/detail/macos_fenced_block.hpp index a653aee54c..d37eea6143 100644 --- a/3party/boost/boost/asio/detail/macos_fenced_block.hpp +++ b/3party/boost/boost/asio/detail/macos_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/macos_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/mutex.hpp b/3party/boost/boost/asio/detail/mutex.hpp index f601996535..988dd3a003 100644 --- a/3party/boost/boost/asio/detail/mutex.hpp +++ b/3party/boost/boost/asio/detail/mutex.hpp @@ -2,7 +2,7 @@ // detail/mutex.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/noncopyable.hpp b/3party/boost/boost/asio/detail/noncopyable.hpp index 65ae9a26f2..234ce93978 100644 --- a/3party/boost/boost/asio/detail/noncopyable.hpp +++ b/3party/boost/boost/asio/detail/noncopyable.hpp @@ -2,7 +2,7 @@ // detail/noncopyable.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/null_event.hpp b/3party/boost/boost/asio/detail/null_event.hpp index 3acc26c71f..7f079aef0f 100644 --- a/3party/boost/boost/asio/detail/null_event.hpp +++ b/3party/boost/boost/asio/detail/null_event.hpp @@ -2,7 +2,7 @@ // detail/null_event.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/null_fenced_block.hpp b/3party/boost/boost/asio/detail/null_fenced_block.hpp index ead4c876db..70680c5ce7 100644 --- a/3party/boost/boost/asio/detail/null_fenced_block.hpp +++ b/3party/boost/boost/asio/detail/null_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/null_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/null_mutex.hpp b/3party/boost/boost/asio/detail/null_mutex.hpp index 8fca31cbd6..e095e01e38 100644 --- a/3party/boost/boost/asio/detail/null_mutex.hpp +++ b/3party/boost/boost/asio/detail/null_mutex.hpp @@ -2,7 +2,7 @@ // detail/null_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/null_signal_blocker.hpp b/3party/boost/boost/asio/detail/null_signal_blocker.hpp index 9eeccb9669..bcf813b319 100644 --- a/3party/boost/boost/asio/detail/null_signal_blocker.hpp +++ b/3party/boost/boost/asio/detail/null_signal_blocker.hpp @@ -2,7 +2,7 @@ // detail/null_signal_blocker.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/null_thread.hpp b/3party/boost/boost/asio/detail/null_thread.hpp index 1745011c19..ae32014304 100644 --- a/3party/boost/boost/asio/detail/null_thread.hpp +++ b/3party/boost/boost/asio/detail/null_thread.hpp @@ -2,7 +2,7 @@ // detail/null_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/null_tss_ptr.hpp b/3party/boost/boost/asio/detail/null_tss_ptr.hpp index 3eff2dcf06..c44b4deef3 100644 --- a/3party/boost/boost/asio/detail/null_tss_ptr.hpp +++ b/3party/boost/boost/asio/detail/null_tss_ptr.hpp @@ -2,7 +2,7 @@ // detail/null_tss_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/object_pool.hpp b/3party/boost/boost/asio/detail/object_pool.hpp index 87f39023c2..69790a05e2 100644 --- a/3party/boost/boost/asio/detail/object_pool.hpp +++ b/3party/boost/boost/asio/detail/object_pool.hpp @@ -2,7 +2,7 @@ // detail/object_pool.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/old_win_sdk_compat.hpp b/3party/boost/boost/asio/detail/old_win_sdk_compat.hpp index 10cd8985d8..d385d3e6f4 100644 --- a/3party/boost/boost/asio/detail/old_win_sdk_compat.hpp +++ b/3party/boost/boost/asio/detail/old_win_sdk_compat.hpp @@ -2,7 +2,7 @@ // detail/old_win_sdk_compat.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/op_queue.hpp b/3party/boost/boost/asio/detail/op_queue.hpp index e35e82d345..d508e9dc12 100644 --- a/3party/boost/boost/asio/detail/op_queue.hpp +++ b/3party/boost/boost/asio/detail/op_queue.hpp @@ -2,7 +2,7 @@ // detail/op_queue.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/operation.hpp b/3party/boost/boost/asio/detail/operation.hpp index e42455cb62..d2015e712f 100644 --- a/3party/boost/boost/asio/detail/operation.hpp +++ b/3party/boost/boost/asio/detail/operation.hpp @@ -2,7 +2,7 @@ // detail/operation.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/pipe_select_interrupter.hpp b/3party/boost/boost/asio/detail/pipe_select_interrupter.hpp index 054f731ef4..ad32736c92 100644 --- a/3party/boost/boost/asio/detail/pipe_select_interrupter.hpp +++ b/3party/boost/boost/asio/detail/pipe_select_interrupter.hpp @@ -2,7 +2,7 @@ // detail/pipe_select_interrupter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/pop_options.hpp b/3party/boost/boost/asio/detail/pop_options.hpp index d589cb72b8..75afc2b18e 100644 --- a/3party/boost/boost/asio/detail/pop_options.hpp +++ b/3party/boost/boost/asio/detail/pop_options.hpp @@ -2,7 +2,7 @@ // detail/pop_options.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/posix_event.hpp b/3party/boost/boost/asio/detail/posix_event.hpp index 13fa3d47fa..dc2ed317f3 100644 --- a/3party/boost/boost/asio/detail/posix_event.hpp +++ b/3party/boost/boost/asio/detail/posix_event.hpp @@ -2,7 +2,7 @@ // detail/posix_event.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/posix_fd_set_adapter.hpp b/3party/boost/boost/asio/detail/posix_fd_set_adapter.hpp index 5395eb9988..b8be59602e 100644 --- a/3party/boost/boost/asio/detail/posix_fd_set_adapter.hpp +++ b/3party/boost/boost/asio/detail/posix_fd_set_adapter.hpp @@ -2,7 +2,7 @@ // detail/posix_fd_set_adapter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/posix_mutex.hpp b/3party/boost/boost/asio/detail/posix_mutex.hpp index 4fcd8aceaf..5f5fd83d83 100644 --- a/3party/boost/boost/asio/detail/posix_mutex.hpp +++ b/3party/boost/boost/asio/detail/posix_mutex.hpp @@ -2,7 +2,7 @@ // detail/posix_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/posix_signal_blocker.hpp b/3party/boost/boost/asio/detail/posix_signal_blocker.hpp index 247a7a8a75..88fa330d69 100644 --- a/3party/boost/boost/asio/detail/posix_signal_blocker.hpp +++ b/3party/boost/boost/asio/detail/posix_signal_blocker.hpp @@ -2,7 +2,7 @@ // detail/posix_signal_blocker.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/posix_thread.hpp b/3party/boost/boost/asio/detail/posix_thread.hpp index a87e396742..5d8b684460 100644 --- a/3party/boost/boost/asio/detail/posix_thread.hpp +++ b/3party/boost/boost/asio/detail/posix_thread.hpp @@ -2,7 +2,7 @@ // detail/posix_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/posix_tss_ptr.hpp b/3party/boost/boost/asio/detail/posix_tss_ptr.hpp index dfe83696a7..2edcbc17ca 100644 --- a/3party/boost/boost/asio/detail/posix_tss_ptr.hpp +++ b/3party/boost/boost/asio/detail/posix_tss_ptr.hpp @@ -2,7 +2,7 @@ // detail/posix_tss_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/push_options.hpp b/3party/boost/boost/asio/detail/push_options.hpp index 587aef9734..050549d49b 100644 --- a/3party/boost/boost/asio/detail/push_options.hpp +++ b/3party/boost/boost/asio/detail/push_options.hpp @@ -2,7 +2,7 @@ // detail/push_options.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactive_descriptor_service.hpp b/3party/boost/boost/asio/detail/reactive_descriptor_service.hpp index 993211a7a7..510c5054f8 100644 --- a/3party/boost/boost/asio/detail/reactive_descriptor_service.hpp +++ b/3party/boost/boost/asio/detail/reactive_descriptor_service.hpp @@ -2,7 +2,7 @@ // detail/reactive_descriptor_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactive_null_buffers_op.hpp b/3party/boost/boost/asio/detail/reactive_null_buffers_op.hpp index a2a691123e..6ccc19eb9a 100644 --- a/3party/boost/boost/asio/detail/reactive_null_buffers_op.hpp +++ b/3party/boost/boost/asio/detail/reactive_null_buffers_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_null_buffers_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactive_serial_port_service.hpp b/3party/boost/boost/asio/detail/reactive_serial_port_service.hpp index 0955f1d484..303c1f0ae1 100644 --- a/3party/boost/boost/asio/detail/reactive_serial_port_service.hpp +++ b/3party/boost/boost/asio/detail/reactive_serial_port_service.hpp @@ -2,7 +2,7 @@ // detail/reactive_serial_port_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/reactive_socket_accept_op.hpp b/3party/boost/boost/asio/detail/reactive_socket_accept_op.hpp index 3b2413f5e4..3805c9f758 100644 --- a/3party/boost/boost/asio/detail/reactive_socket_accept_op.hpp +++ b/3party/boost/boost/asio/detail/reactive_socket_accept_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_accept_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactive_socket_connect_op.hpp b/3party/boost/boost/asio/detail/reactive_socket_connect_op.hpp index 2bfb55d840..6de7474454 100644 --- a/3party/boost/boost/asio/detail/reactive_socket_connect_op.hpp +++ b/3party/boost/boost/asio/detail/reactive_socket_connect_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_connect_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactive_socket_recv_op.hpp b/3party/boost/boost/asio/detail/reactive_socket_recv_op.hpp index d58aa3f01f..75ce44fd38 100644 --- a/3party/boost/boost/asio/detail/reactive_socket_recv_op.hpp +++ b/3party/boost/boost/asio/detail/reactive_socket_recv_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_recv_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactive_socket_recvfrom_op.hpp b/3party/boost/boost/asio/detail/reactive_socket_recvfrom_op.hpp index 469b6a5d21..b496ea02ad 100644 --- a/3party/boost/boost/asio/detail/reactive_socket_recvfrom_op.hpp +++ b/3party/boost/boost/asio/detail/reactive_socket_recvfrom_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_recvfrom_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactive_socket_send_op.hpp b/3party/boost/boost/asio/detail/reactive_socket_send_op.hpp index 157d075084..2fe195e2cb 100644 --- a/3party/boost/boost/asio/detail/reactive_socket_send_op.hpp +++ b/3party/boost/boost/asio/detail/reactive_socket_send_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_send_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactive_socket_sendto_op.hpp b/3party/boost/boost/asio/detail/reactive_socket_sendto_op.hpp index 6199ec29ca..12046c3198 100644 --- a/3party/boost/boost/asio/detail/reactive_socket_sendto_op.hpp +++ b/3party/boost/boost/asio/detail/reactive_socket_sendto_op.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_sendto_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactive_socket_service.hpp b/3party/boost/boost/asio/detail/reactive_socket_service.hpp index 7288881d4a..92eef4a411 100644 --- a/3party/boost/boost/asio/detail/reactive_socket_service.hpp +++ b/3party/boost/boost/asio/detail/reactive_socket_service.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactive_socket_service_base.hpp b/3party/boost/boost/asio/detail/reactive_socket_service_base.hpp index 1733ce10d6..df87ddb461 100644 --- a/3party/boost/boost/asio/detail/reactive_socket_service_base.hpp +++ b/3party/boost/boost/asio/detail/reactive_socket_service_base.hpp @@ -2,7 +2,7 @@ // detail/reactive_socket_service_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactor.hpp b/3party/boost/boost/asio/detail/reactor.hpp index 468276d767..f225ea0a5d 100644 --- a/3party/boost/boost/asio/detail/reactor.hpp +++ b/3party/boost/boost/asio/detail/reactor.hpp @@ -2,7 +2,7 @@ // detail/reactor.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactor_fwd.hpp b/3party/boost/boost/asio/detail/reactor_fwd.hpp index 3fae83c741..a4ff94a96a 100644 --- a/3party/boost/boost/asio/detail/reactor_fwd.hpp +++ b/3party/boost/boost/asio/detail/reactor_fwd.hpp @@ -2,7 +2,7 @@ // detail/reactor_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactor_op.hpp b/3party/boost/boost/asio/detail/reactor_op.hpp index ed4a33d91b..0c8271c1a1 100644 --- a/3party/boost/boost/asio/detail/reactor_op.hpp +++ b/3party/boost/boost/asio/detail/reactor_op.hpp @@ -2,7 +2,7 @@ // detail/reactor_op.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/reactor_op_queue.hpp b/3party/boost/boost/asio/detail/reactor_op_queue.hpp index 830e9b359b..02b8ea25dd 100644 --- a/3party/boost/boost/asio/detail/reactor_op_queue.hpp +++ b/3party/boost/boost/asio/detail/reactor_op_queue.hpp @@ -2,7 +2,7 @@ // detail/reactor_op_queue.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/regex_fwd.hpp b/3party/boost/boost/asio/detail/regex_fwd.hpp index 2ccb5d1e25..d61ad61a5e 100644 --- a/3party/boost/boost/asio/detail/regex_fwd.hpp +++ b/3party/boost/boost/asio/detail/regex_fwd.hpp @@ -2,7 +2,7 @@ // detail/regex_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/resolve_endpoint_op.hpp b/3party/boost/boost/asio/detail/resolve_endpoint_op.hpp index ccf5f532b9..46acda3257 100644 --- a/3party/boost/boost/asio/detail/resolve_endpoint_op.hpp +++ b/3party/boost/boost/asio/detail/resolve_endpoint_op.hpp @@ -2,7 +2,7 @@ // detail/resolve_endpoint_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/resolve_op.hpp b/3party/boost/boost/asio/detail/resolve_op.hpp index aff61040f8..379ec39ef5 100644 --- a/3party/boost/boost/asio/detail/resolve_op.hpp +++ b/3party/boost/boost/asio/detail/resolve_op.hpp @@ -2,7 +2,7 @@ // detail/resolve_op.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/resolver_service.hpp b/3party/boost/boost/asio/detail/resolver_service.hpp index 1b734a0eb4..1c343cbc0d 100644 --- a/3party/boost/boost/asio/detail/resolver_service.hpp +++ b/3party/boost/boost/asio/detail/resolver_service.hpp @@ -2,7 +2,7 @@ // detail/resolver_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/resolver_service_base.hpp b/3party/boost/boost/asio/detail/resolver_service_base.hpp index cc6ede6d98..60e9e09f6e 100644 --- a/3party/boost/boost/asio/detail/resolver_service_base.hpp +++ b/3party/boost/boost/asio/detail/resolver_service_base.hpp @@ -2,7 +2,7 @@ // detail/resolver_service_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/scoped_lock.hpp b/3party/boost/boost/asio/detail/scoped_lock.hpp index 247411e12d..b523ae54d1 100644 --- a/3party/boost/boost/asio/detail/scoped_lock.hpp +++ b/3party/boost/boost/asio/detail/scoped_lock.hpp @@ -2,7 +2,7 @@ // detail/scoped_lock.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/select_interrupter.hpp b/3party/boost/boost/asio/detail/select_interrupter.hpp index 9683e636d9..f0a1275b70 100644 --- a/3party/boost/boost/asio/detail/select_interrupter.hpp +++ b/3party/boost/boost/asio/detail/select_interrupter.hpp @@ -2,7 +2,7 @@ // detail/select_interrupter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/select_reactor.hpp b/3party/boost/boost/asio/detail/select_reactor.hpp index 55a819d6a6..4b26a269cc 100644 --- a/3party/boost/boost/asio/detail/select_reactor.hpp +++ b/3party/boost/boost/asio/detail/select_reactor.hpp @@ -2,7 +2,7 @@ // detail/select_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/select_reactor_fwd.hpp b/3party/boost/boost/asio/detail/select_reactor_fwd.hpp index f4f9f65a71..78ff61b8cb 100644 --- a/3party/boost/boost/asio/detail/select_reactor_fwd.hpp +++ b/3party/boost/boost/asio/detail/select_reactor_fwd.hpp @@ -2,7 +2,7 @@ // detail/select_reactor_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/service_registry.hpp b/3party/boost/boost/asio/detail/service_registry.hpp index 6ba30f1e73..a247ea81b4 100644 --- a/3party/boost/boost/asio/detail/service_registry.hpp +++ b/3party/boost/boost/asio/detail/service_registry.hpp @@ -2,7 +2,7 @@ // detail/service_registry.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/service_registry_fwd.hpp b/3party/boost/boost/asio/detail/service_registry_fwd.hpp index 8713a30b2f..a6bb25e0ea 100644 --- a/3party/boost/boost/asio/detail/service_registry_fwd.hpp +++ b/3party/boost/boost/asio/detail/service_registry_fwd.hpp @@ -2,7 +2,7 @@ // detail/service_registry_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/shared_ptr.hpp b/3party/boost/boost/asio/detail/shared_ptr.hpp index 0c5586e292..fe497b7069 100644 --- a/3party/boost/boost/asio/detail/shared_ptr.hpp +++ b/3party/boost/boost/asio/detail/shared_ptr.hpp @@ -2,7 +2,7 @@ // detail/shared_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/signal_blocker.hpp b/3party/boost/boost/asio/detail/signal_blocker.hpp index 67eaac0abf..cc00482c24 100644 --- a/3party/boost/boost/asio/detail/signal_blocker.hpp +++ b/3party/boost/boost/asio/detail/signal_blocker.hpp @@ -2,7 +2,7 @@ // detail/signal_blocker.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/signal_init.hpp b/3party/boost/boost/asio/detail/signal_init.hpp index 76d21bffdd..f346956103 100644 --- a/3party/boost/boost/asio/detail/signal_init.hpp +++ b/3party/boost/boost/asio/detail/signal_init.hpp @@ -2,7 +2,7 @@ // detail/signal_init.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/socket_holder.hpp b/3party/boost/boost/asio/detail/socket_holder.hpp index 7815acccdc..52d2e4df4d 100644 --- a/3party/boost/boost/asio/detail/socket_holder.hpp +++ b/3party/boost/boost/asio/detail/socket_holder.hpp @@ -2,7 +2,7 @@ // detail/socket_holder.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/socket_ops.hpp b/3party/boost/boost/asio/detail/socket_ops.hpp index a32b4cc414..18a8131cea 100644 --- a/3party/boost/boost/asio/detail/socket_ops.hpp +++ b/3party/boost/boost/asio/detail/socket_ops.hpp @@ -2,7 +2,7 @@ // detail/socket_ops.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/socket_option.hpp b/3party/boost/boost/asio/detail/socket_option.hpp index 37efa834af..c841033c0b 100644 --- a/3party/boost/boost/asio/detail/socket_option.hpp +++ b/3party/boost/boost/asio/detail/socket_option.hpp @@ -2,7 +2,7 @@ // detail/socket_option.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/socket_select_interrupter.hpp b/3party/boost/boost/asio/detail/socket_select_interrupter.hpp index b674514a4a..6d68d5a355 100644 --- a/3party/boost/boost/asio/detail/socket_select_interrupter.hpp +++ b/3party/boost/boost/asio/detail/socket_select_interrupter.hpp @@ -2,7 +2,7 @@ // detail/socket_select_interrupter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/socket_types.hpp b/3party/boost/boost/asio/detail/socket_types.hpp index 616e85ae95..f0679b604a 100644 --- a/3party/boost/boost/asio/detail/socket_types.hpp +++ b/3party/boost/boost/asio/detail/socket_types.hpp @@ -2,7 +2,7 @@ // detail/socket_types.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/solaris_fenced_block.hpp b/3party/boost/boost/asio/detail/solaris_fenced_block.hpp index db6cb98052..0b117ad6aa 100644 --- a/3party/boost/boost/asio/detail/solaris_fenced_block.hpp +++ b/3party/boost/boost/asio/detail/solaris_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/solaris_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/strand_service.hpp b/3party/boost/boost/asio/detail/strand_service.hpp index 24bec7c98a..0783ac4600 100644 --- a/3party/boost/boost/asio/detail/strand_service.hpp +++ b/3party/boost/boost/asio/detail/strand_service.hpp @@ -2,7 +2,7 @@ // detail/strand_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/task_io_service.hpp b/3party/boost/boost/asio/detail/task_io_service.hpp index a9a7053b22..c014855b14 100644 --- a/3party/boost/boost/asio/detail/task_io_service.hpp +++ b/3party/boost/boost/asio/detail/task_io_service.hpp @@ -2,7 +2,7 @@ // detail/task_io_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/task_io_service_fwd.hpp b/3party/boost/boost/asio/detail/task_io_service_fwd.hpp index 24dd11bd4b..b3243b7c65 100644 --- a/3party/boost/boost/asio/detail/task_io_service_fwd.hpp +++ b/3party/boost/boost/asio/detail/task_io_service_fwd.hpp @@ -2,7 +2,7 @@ // detail/task_io_service_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/task_io_service_operation.hpp b/3party/boost/boost/asio/detail/task_io_service_operation.hpp index e234c07d22..08164fa434 100644 --- a/3party/boost/boost/asio/detail/task_io_service_operation.hpp +++ b/3party/boost/boost/asio/detail/task_io_service_operation.hpp @@ -2,7 +2,7 @@ // detail/task_io_service_operation.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/thread.hpp b/3party/boost/boost/asio/detail/thread.hpp index 8848cd06a2..48cffb156a 100644 --- a/3party/boost/boost/asio/detail/thread.hpp +++ b/3party/boost/boost/asio/detail/thread.hpp @@ -2,7 +2,7 @@ // detail/thread.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/throw_error.hpp b/3party/boost/boost/asio/detail/throw_error.hpp index 713a196339..43bc9c3d64 100644 --- a/3party/boost/boost/asio/detail/throw_error.hpp +++ b/3party/boost/boost/asio/detail/throw_error.hpp @@ -2,7 +2,7 @@ // detail/throw_error.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/timer_op.hpp b/3party/boost/boost/asio/detail/timer_op.hpp index 8f82339e24..24a536c6c9 100644 --- a/3party/boost/boost/asio/detail/timer_op.hpp +++ b/3party/boost/boost/asio/detail/timer_op.hpp @@ -2,7 +2,7 @@ // detail/timer_op.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/timer_queue.hpp b/3party/boost/boost/asio/detail/timer_queue.hpp index 09eb825689..328a9ed7e0 100644 --- a/3party/boost/boost/asio/detail/timer_queue.hpp +++ b/3party/boost/boost/asio/detail/timer_queue.hpp @@ -2,7 +2,7 @@ // detail/timer_queue.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/timer_queue_base.hpp b/3party/boost/boost/asio/detail/timer_queue_base.hpp index 0290308519..d4938711f5 100644 --- a/3party/boost/boost/asio/detail/timer_queue_base.hpp +++ b/3party/boost/boost/asio/detail/timer_queue_base.hpp @@ -2,7 +2,7 @@ // detail/timer_queue_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/timer_queue_fwd.hpp b/3party/boost/boost/asio/detail/timer_queue_fwd.hpp index 0a62a44da1..14c63199a9 100644 --- a/3party/boost/boost/asio/detail/timer_queue_fwd.hpp +++ b/3party/boost/boost/asio/detail/timer_queue_fwd.hpp @@ -2,7 +2,7 @@ // detail/timer_queue_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/timer_queue_set.hpp b/3party/boost/boost/asio/detail/timer_queue_set.hpp index c2cea662f2..549d7e6b43 100644 --- a/3party/boost/boost/asio/detail/timer_queue_set.hpp +++ b/3party/boost/boost/asio/detail/timer_queue_set.hpp @@ -2,7 +2,7 @@ // detail/timer_queue_set.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/timer_scheduler.hpp b/3party/boost/boost/asio/detail/timer_scheduler.hpp index ec80f4079a..2edc0c8e5e 100644 --- a/3party/boost/boost/asio/detail/timer_scheduler.hpp +++ b/3party/boost/boost/asio/detail/timer_scheduler.hpp @@ -2,7 +2,7 @@ // detail/timer_scheduler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/timer_scheduler_fwd.hpp b/3party/boost/boost/asio/detail/timer_scheduler_fwd.hpp index 77d6c99e6c..e01b657f6e 100644 --- a/3party/boost/boost/asio/detail/timer_scheduler_fwd.hpp +++ b/3party/boost/boost/asio/detail/timer_scheduler_fwd.hpp @@ -2,7 +2,7 @@ // detail/timer_scheduler_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/tss_ptr.hpp b/3party/boost/boost/asio/detail/tss_ptr.hpp index 8edf15bb64..35ed8e2ad9 100644 --- a/3party/boost/boost/asio/detail/tss_ptr.hpp +++ b/3party/boost/boost/asio/detail/tss_ptr.hpp @@ -2,7 +2,7 @@ // detail/tss_ptr.hpp // ~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/wait_handler.hpp b/3party/boost/boost/asio/detail/wait_handler.hpp index e451f196d0..95be6bdb20 100644 --- a/3party/boost/boost/asio/detail/wait_handler.hpp +++ b/3party/boost/boost/asio/detail/wait_handler.hpp @@ -2,7 +2,7 @@ // detail/wait_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/weak_ptr.hpp b/3party/boost/boost/asio/detail/weak_ptr.hpp index 9a14297fd0..81a8b069a0 100644 --- a/3party/boost/boost/asio/detail/weak_ptr.hpp +++ b/3party/boost/boost/asio/detail/weak_ptr.hpp @@ -2,7 +2,7 @@ // detail/weak_ptr.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_event.hpp b/3party/boost/boost/asio/detail/win_event.hpp index 736ebb2d9f..63c25c43f5 100644 --- a/3party/boost/boost/asio/detail/win_event.hpp +++ b/3party/boost/boost/asio/detail/win_event.hpp @@ -2,7 +2,7 @@ // detail/win_event.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_fd_set_adapter.hpp b/3party/boost/boost/asio/detail/win_fd_set_adapter.hpp index 4a5d7faa22..8636a91cb3 100644 --- a/3party/boost/boost/asio/detail/win_fd_set_adapter.hpp +++ b/3party/boost/boost/asio/detail/win_fd_set_adapter.hpp @@ -2,7 +2,7 @@ // detail/win_fd_set_adapter.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_fenced_block.hpp b/3party/boost/boost/asio/detail/win_fenced_block.hpp index 928395ead3..769db2eb99 100644 --- a/3party/boost/boost/asio/detail/win_fenced_block.hpp +++ b/3party/boost/boost/asio/detail/win_fenced_block.hpp @@ -2,7 +2,7 @@ // detail/win_fenced_block.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_iocp_handle_read_op.hpp b/3party/boost/boost/asio/detail/win_iocp_handle_read_op.hpp index f1a9b1f6ad..5edffa35cb 100644 --- a/3party/boost/boost/asio/detail/win_iocp_handle_read_op.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_handle_read_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_handle_read_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/win_iocp_handle_service.hpp b/3party/boost/boost/asio/detail/win_iocp_handle_service.hpp index 291a06ffb0..86c43914a1 100644 --- a/3party/boost/boost/asio/detail/win_iocp_handle_service.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_handle_service.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_handle_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/win_iocp_handle_write_op.hpp b/3party/boost/boost/asio/detail/win_iocp_handle_write_op.hpp index 971f174629..574dc22e6d 100644 --- a/3party/boost/boost/asio/detail/win_iocp_handle_write_op.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_handle_write_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_handle_write_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/win_iocp_io_service.hpp b/3party/boost/boost/asio/detail/win_iocp_io_service.hpp index 235424ebab..4c88e7bbf4 100644 --- a/3party/boost/boost/asio/detail/win_iocp_io_service.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_io_service.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_io_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_iocp_io_service_fwd.hpp b/3party/boost/boost/asio/detail/win_iocp_io_service_fwd.hpp index 1357603ba2..b6da9ec6c7 100644 --- a/3party/boost/boost/asio/detail/win_iocp_io_service_fwd.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_io_service_fwd.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_io_service_fwd.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_iocp_null_buffers_op.hpp b/3party/boost/boost/asio/detail/win_iocp_null_buffers_op.hpp index ed1c28f859..b3ecbbdc18 100644 --- a/3party/boost/boost/asio/detail/win_iocp_null_buffers_op.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_null_buffers_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_null_buffers_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_iocp_operation.hpp b/3party/boost/boost/asio/detail/win_iocp_operation.hpp index c9b304127a..3963479e24 100644 --- a/3party/boost/boost/asio/detail/win_iocp_operation.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_operation.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_operation.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_iocp_overlapped_op.hpp b/3party/boost/boost/asio/detail/win_iocp_overlapped_op.hpp index 911449d3af..149eaa576f 100644 --- a/3party/boost/boost/asio/detail/win_iocp_overlapped_op.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_overlapped_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_overlapped_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_iocp_overlapped_ptr.hpp b/3party/boost/boost/asio/detail/win_iocp_overlapped_ptr.hpp index 5589c11090..c560bc3c0b 100644 --- a/3party/boost/boost/asio/detail/win_iocp_overlapped_ptr.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_overlapped_ptr.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_overlapped_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_iocp_serial_port_service.hpp b/3party/boost/boost/asio/detail/win_iocp_serial_port_service.hpp index a0caa691e7..8b543d2ddd 100644 --- a/3party/boost/boost/asio/detail/win_iocp_serial_port_service.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_serial_port_service.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_serial_port_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/detail/win_iocp_socket_accept_op.hpp b/3party/boost/boost/asio/detail/win_iocp_socket_accept_op.hpp index 89dff0c671..ecc1f2d2cf 100644 --- a/3party/boost/boost/asio/detail/win_iocp_socket_accept_op.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_socket_accept_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_accept_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_iocp_socket_recv_op.hpp b/3party/boost/boost/asio/detail/win_iocp_socket_recv_op.hpp index 98d7e99e06..61d053c71b 100644 --- a/3party/boost/boost/asio/detail/win_iocp_socket_recv_op.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_socket_recv_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_recv_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp b/3party/boost/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp index eca34df70b..6b364ee696 100644 --- a/3party/boost/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_recvfrom_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_iocp_socket_send_op.hpp b/3party/boost/boost/asio/detail/win_iocp_socket_send_op.hpp index 2dcb4af412..33bd380467 100644 --- a/3party/boost/boost/asio/detail/win_iocp_socket_send_op.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_socket_send_op.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_send_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_iocp_socket_service.hpp b/3party/boost/boost/asio/detail/win_iocp_socket_service.hpp index 6f1f2bd463..183b74bf11 100644 --- a/3party/boost/boost/asio/detail/win_iocp_socket_service.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_socket_service.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_iocp_socket_service_base.hpp b/3party/boost/boost/asio/detail/win_iocp_socket_service_base.hpp index 2dd3ba35b6..32532f9447 100644 --- a/3party/boost/boost/asio/detail/win_iocp_socket_service_base.hpp +++ b/3party/boost/boost/asio/detail/win_iocp_socket_service_base.hpp @@ -2,7 +2,7 @@ // detail/win_iocp_socket_service_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_mutex.hpp b/3party/boost/boost/asio/detail/win_mutex.hpp index 3f6dadbe47..0c5dc268a0 100644 --- a/3party/boost/boost/asio/detail/win_mutex.hpp +++ b/3party/boost/boost/asio/detail/win_mutex.hpp @@ -2,7 +2,7 @@ // detail/win_mutex.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_thread.hpp b/3party/boost/boost/asio/detail/win_thread.hpp index cba546f63b..4e33bd9b21 100644 --- a/3party/boost/boost/asio/detail/win_thread.hpp +++ b/3party/boost/boost/asio/detail/win_thread.hpp @@ -2,7 +2,7 @@ // detail/win_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/win_tss_ptr.hpp b/3party/boost/boost/asio/detail/win_tss_ptr.hpp index 2c5ee3bd55..75811c1ec5 100644 --- a/3party/boost/boost/asio/detail/win_tss_ptr.hpp +++ b/3party/boost/boost/asio/detail/win_tss_ptr.hpp @@ -2,7 +2,7 @@ // detail/win_tss_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/wince_thread.hpp b/3party/boost/boost/asio/detail/wince_thread.hpp index 82ca544b49..7f7b1e4761 100644 --- a/3party/boost/boost/asio/detail/wince_thread.hpp +++ b/3party/boost/boost/asio/detail/wince_thread.hpp @@ -2,7 +2,7 @@ // detail/wince_thread.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/winsock_init.hpp b/3party/boost/boost/asio/detail/winsock_init.hpp index ac24b0dc34..dc50fbf1d2 100644 --- a/3party/boost/boost/asio/detail/winsock_init.hpp +++ b/3party/boost/boost/asio/detail/winsock_init.hpp @@ -2,7 +2,7 @@ // detail/winsock_init.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/detail/wrapped_handler.hpp b/3party/boost/boost/asio/detail/wrapped_handler.hpp index 9645b64f31..b326847337 100644 --- a/3party/boost/boost/asio/detail/wrapped_handler.hpp +++ b/3party/boost/boost/asio/detail/wrapped_handler.hpp @@ -2,7 +2,7 @@ // detail/wrapped_handler.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/error.hpp b/3party/boost/boost/asio/error.hpp index 569ad80620..d0287a0f5f 100644 --- a/3party/boost/boost/asio/error.hpp +++ b/3party/boost/boost/asio/error.hpp @@ -2,7 +2,7 @@ // error.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/handler_alloc_hook.hpp b/3party/boost/boost/asio/handler_alloc_hook.hpp index 179f75e6c9..ca56871991 100644 --- a/3party/boost/boost/asio/handler_alloc_hook.hpp +++ b/3party/boost/boost/asio/handler_alloc_hook.hpp @@ -2,7 +2,7 @@ // handler_alloc_hook.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/handler_invoke_hook.hpp b/3party/boost/boost/asio/handler_invoke_hook.hpp index f997f11085..f4f68311c0 100644 --- a/3party/boost/boost/asio/handler_invoke_hook.hpp +++ b/3party/boost/boost/asio/handler_invoke_hook.hpp @@ -2,7 +2,7 @@ // handler_invoke_hook.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/impl/error.ipp b/3party/boost/boost/asio/impl/error.ipp index 708654e49c..7c045c0468 100644 --- a/3party/boost/boost/asio/impl/error.ipp +++ b/3party/boost/boost/asio/impl/error.ipp @@ -2,7 +2,7 @@ // impl/error.ipp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/impl/io_service.hpp b/3party/boost/boost/asio/impl/io_service.hpp index 3c082cb936..152f983736 100644 --- a/3party/boost/boost/asio/impl/io_service.hpp +++ b/3party/boost/boost/asio/impl/io_service.hpp @@ -2,7 +2,7 @@ // impl/io_service.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/impl/io_service.ipp b/3party/boost/boost/asio/impl/io_service.ipp index 731adb8774..a0b34af5ba 100644 --- a/3party/boost/boost/asio/impl/io_service.ipp +++ b/3party/boost/boost/asio/impl/io_service.ipp @@ -2,7 +2,7 @@ // impl/io_service.ipp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/impl/read.hpp b/3party/boost/boost/asio/impl/read.hpp index 6f9842c869..9fba190741 100644 --- a/3party/boost/boost/asio/impl/read.hpp +++ b/3party/boost/boost/asio/impl/read.hpp @@ -2,7 +2,7 @@ // impl/read.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/impl/read_at.hpp b/3party/boost/boost/asio/impl/read_at.hpp index f6ea0b3cf6..dcf2c33119 100644 --- a/3party/boost/boost/asio/impl/read_at.hpp +++ b/3party/boost/boost/asio/impl/read_at.hpp @@ -2,7 +2,7 @@ // impl/read_at.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/impl/read_until.hpp b/3party/boost/boost/asio/impl/read_until.hpp index 73f8773559..5eeb1bce16 100644 --- a/3party/boost/boost/asio/impl/read_until.hpp +++ b/3party/boost/boost/asio/impl/read_until.hpp @@ -2,7 +2,7 @@ // impl/read_until.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/impl/serial_port_base.hpp b/3party/boost/boost/asio/impl/serial_port_base.hpp index 2b291f393b..c75f8c275d 100644 --- a/3party/boost/boost/asio/impl/serial_port_base.hpp +++ b/3party/boost/boost/asio/impl/serial_port_base.hpp @@ -2,7 +2,7 @@ // impl/serial_port_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/impl/serial_port_base.ipp b/3party/boost/boost/asio/impl/serial_port_base.ipp index 2bfe58a1a4..c665ac860b 100644 --- a/3party/boost/boost/asio/impl/serial_port_base.ipp +++ b/3party/boost/boost/asio/impl/serial_port_base.ipp @@ -2,7 +2,7 @@ // impl/serial_port_base.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/impl/src.cpp b/3party/boost/boost/asio/impl/src.cpp index fa418563c7..4d1acc2dcd 100644 --- a/3party/boost/boost/asio/impl/src.cpp +++ b/3party/boost/boost/asio/impl/src.cpp @@ -2,7 +2,7 @@ // impl/src.cpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/impl/src.hpp b/3party/boost/boost/asio/impl/src.hpp index 60f92d5a48..9142856d78 100644 --- a/3party/boost/boost/asio/impl/src.hpp +++ b/3party/boost/boost/asio/impl/src.hpp @@ -2,7 +2,7 @@ // impl/src.hpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/impl/write.hpp b/3party/boost/boost/asio/impl/write.hpp index fa2982a1ff..ae420bc8e2 100644 --- a/3party/boost/boost/asio/impl/write.hpp +++ b/3party/boost/boost/asio/impl/write.hpp @@ -2,7 +2,7 @@ // impl/write.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/impl/write_at.hpp b/3party/boost/boost/asio/impl/write_at.hpp index aad64efd96..39dc1af4dd 100644 --- a/3party/boost/boost/asio/impl/write_at.hpp +++ b/3party/boost/boost/asio/impl/write_at.hpp @@ -2,7 +2,7 @@ // impl/write_at.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/io_service.hpp b/3party/boost/boost/asio/io_service.hpp index 9350a84aef..a6a27fa542 100644 --- a/3party/boost/boost/asio/io_service.hpp +++ b/3party/boost/boost/asio/io_service.hpp @@ -2,7 +2,7 @@ // io_service.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/address.hpp b/3party/boost/boost/asio/ip/address.hpp index 8cc3a4b4d3..4ecae7a2cc 100644 --- a/3party/boost/boost/asio/ip/address.hpp +++ b/3party/boost/boost/asio/ip/address.hpp @@ -2,7 +2,7 @@ // ip/address.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/address_v4.hpp b/3party/boost/boost/asio/ip/address_v4.hpp index 21c1a7ff78..5728a17442 100644 --- a/3party/boost/boost/asio/ip/address_v4.hpp +++ b/3party/boost/boost/asio/ip/address_v4.hpp @@ -2,7 +2,7 @@ // ip/address_v4.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/address_v6.hpp b/3party/boost/boost/asio/ip/address_v6.hpp index 7165eac26e..9155beaa72 100644 --- a/3party/boost/boost/asio/ip/address_v6.hpp +++ b/3party/boost/boost/asio/ip/address_v6.hpp @@ -2,7 +2,7 @@ // ip/address_v6.hpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/basic_endpoint.hpp b/3party/boost/boost/asio/ip/basic_endpoint.hpp index 10459c415f..0047adc490 100644 --- a/3party/boost/boost/asio/ip/basic_endpoint.hpp +++ b/3party/boost/boost/asio/ip/basic_endpoint.hpp @@ -2,7 +2,7 @@ // ip/basic_endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/basic_resolver.hpp b/3party/boost/boost/asio/ip/basic_resolver.hpp index 21b83da9ba..f27515a107 100644 --- a/3party/boost/boost/asio/ip/basic_resolver.hpp +++ b/3party/boost/boost/asio/ip/basic_resolver.hpp @@ -2,7 +2,7 @@ // ip/basic_resolver.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/basic_resolver_entry.hpp b/3party/boost/boost/asio/ip/basic_resolver_entry.hpp index 84589b5b24..980b488241 100644 --- a/3party/boost/boost/asio/ip/basic_resolver_entry.hpp +++ b/3party/boost/boost/asio/ip/basic_resolver_entry.hpp @@ -2,7 +2,7 @@ // ip/basic_resolver_entry.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/basic_resolver_iterator.hpp b/3party/boost/boost/asio/ip/basic_resolver_iterator.hpp index de42699303..465c2780e6 100644 --- a/3party/boost/boost/asio/ip/basic_resolver_iterator.hpp +++ b/3party/boost/boost/asio/ip/basic_resolver_iterator.hpp @@ -2,7 +2,7 @@ // ip/basic_resolver_iterator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/basic_resolver_query.hpp b/3party/boost/boost/asio/ip/basic_resolver_query.hpp index 38cba01561..8fd63bce74 100644 --- a/3party/boost/boost/asio/ip/basic_resolver_query.hpp +++ b/3party/boost/boost/asio/ip/basic_resolver_query.hpp @@ -2,7 +2,7 @@ // ip/basic_resolver_query.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/detail/endpoint.hpp b/3party/boost/boost/asio/ip/detail/endpoint.hpp index 9823e72069..fe95a00f11 100644 --- a/3party/boost/boost/asio/ip/detail/endpoint.hpp +++ b/3party/boost/boost/asio/ip/detail/endpoint.hpp @@ -2,7 +2,7 @@ // ip/detail/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/detail/impl/endpoint.ipp b/3party/boost/boost/asio/ip/detail/impl/endpoint.ipp index 4a6e39546f..0443d381e4 100644 --- a/3party/boost/boost/asio/ip/detail/impl/endpoint.ipp +++ b/3party/boost/boost/asio/ip/detail/impl/endpoint.ipp @@ -2,7 +2,7 @@ // ip/detail/impl/endpoint.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/detail/socket_option.hpp b/3party/boost/boost/asio/ip/detail/socket_option.hpp index 59ce6c378f..6fde8c31ad 100644 --- a/3party/boost/boost/asio/ip/detail/socket_option.hpp +++ b/3party/boost/boost/asio/ip/detail/socket_option.hpp @@ -2,7 +2,7 @@ // detail/socket_option.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/host_name.hpp b/3party/boost/boost/asio/ip/host_name.hpp index f40a9df64e..33860c92d8 100644 --- a/3party/boost/boost/asio/ip/host_name.hpp +++ b/3party/boost/boost/asio/ip/host_name.hpp @@ -2,7 +2,7 @@ // ip/host_name.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/icmp.hpp b/3party/boost/boost/asio/ip/icmp.hpp index ca5d4348a2..14bb944e7e 100644 --- a/3party/boost/boost/asio/ip/icmp.hpp +++ b/3party/boost/boost/asio/ip/icmp.hpp @@ -2,7 +2,7 @@ // ip/icmp.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/impl/address.hpp b/3party/boost/boost/asio/ip/impl/address.hpp index c19d25d813..94dfb17870 100644 --- a/3party/boost/boost/asio/ip/impl/address.hpp +++ b/3party/boost/boost/asio/ip/impl/address.hpp @@ -2,7 +2,7 @@ // ip/impl/address.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/impl/address.ipp b/3party/boost/boost/asio/ip/impl/address.ipp index 70513b78bc..11f06fc3cf 100644 --- a/3party/boost/boost/asio/ip/impl/address.ipp +++ b/3party/boost/boost/asio/ip/impl/address.ipp @@ -2,7 +2,7 @@ // ip/impl/address.ipp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/impl/address_v4.hpp b/3party/boost/boost/asio/ip/impl/address_v4.hpp index 7e798e895c..d27d48d94b 100644 --- a/3party/boost/boost/asio/ip/impl/address_v4.hpp +++ b/3party/boost/boost/asio/ip/impl/address_v4.hpp @@ -2,7 +2,7 @@ // ip/impl/address_v4.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/impl/address_v4.ipp b/3party/boost/boost/asio/ip/impl/address_v4.ipp index 3cdcbf1cf6..8bdef19dc1 100644 --- a/3party/boost/boost/asio/ip/impl/address_v4.ipp +++ b/3party/boost/boost/asio/ip/impl/address_v4.ipp @@ -2,7 +2,7 @@ // ip/impl/address_v4.ipp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -141,7 +141,7 @@ bool address_v4::is_multicast() const address_v4 address_v4::broadcast(const address_v4& addr, const address_v4& mask) { - return address_v4(addr.to_ulong() | ~mask.to_ulong()); + return address_v4(addr.to_ulong() | (mask.to_ulong() ^ 0xFFFFFFFF)); } address_v4 address_v4::netmask(const address_v4& addr) diff --git a/3party/boost/boost/asio/ip/impl/address_v6.hpp b/3party/boost/boost/asio/ip/impl/address_v6.hpp index 8b39e3e07c..11e1797957 100644 --- a/3party/boost/boost/asio/ip/impl/address_v6.hpp +++ b/3party/boost/boost/asio/ip/impl/address_v6.hpp @@ -2,7 +2,7 @@ // ip/impl/address_v6.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/impl/address_v6.ipp b/3party/boost/boost/asio/ip/impl/address_v6.ipp index a06dfe5f9e..5a3dddd9d5 100644 --- a/3party/boost/boost/asio/ip/impl/address_v6.ipp +++ b/3party/boost/boost/asio/ip/impl/address_v6.ipp @@ -2,7 +2,7 @@ // ip/impl/address_v6.ipp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/impl/basic_endpoint.hpp b/3party/boost/boost/asio/ip/impl/basic_endpoint.hpp index 474c1933a3..9d39c875de 100644 --- a/3party/boost/boost/asio/ip/impl/basic_endpoint.hpp +++ b/3party/boost/boost/asio/ip/impl/basic_endpoint.hpp @@ -2,7 +2,7 @@ // ip/impl/basic_endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/impl/host_name.ipp b/3party/boost/boost/asio/ip/impl/host_name.ipp index a5ba582480..734341ede4 100644 --- a/3party/boost/boost/asio/ip/impl/host_name.ipp +++ b/3party/boost/boost/asio/ip/impl/host_name.ipp @@ -2,7 +2,7 @@ // ip/impl/host_name.ipp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/multicast.hpp b/3party/boost/boost/asio/ip/multicast.hpp index e4d9f88ebc..2a026274f0 100644 --- a/3party/boost/boost/asio/ip/multicast.hpp +++ b/3party/boost/boost/asio/ip/multicast.hpp @@ -2,7 +2,7 @@ // ip/multicast.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/resolver_query_base.hpp b/3party/boost/boost/asio/ip/resolver_query_base.hpp index 0173e119b0..96ad5125fb 100644 --- a/3party/boost/boost/asio/ip/resolver_query_base.hpp +++ b/3party/boost/boost/asio/ip/resolver_query_base.hpp @@ -2,7 +2,7 @@ // ip/resolver_query_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/resolver_service.hpp b/3party/boost/boost/asio/ip/resolver_service.hpp index b13e0adba3..db0554b0bf 100644 --- a/3party/boost/boost/asio/ip/resolver_service.hpp +++ b/3party/boost/boost/asio/ip/resolver_service.hpp @@ -2,7 +2,7 @@ // ip/resolver_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/tcp.hpp b/3party/boost/boost/asio/ip/tcp.hpp index 2026148874..4163a8d2a5 100644 --- a/3party/boost/boost/asio/ip/tcp.hpp +++ b/3party/boost/boost/asio/ip/tcp.hpp @@ -2,7 +2,7 @@ // ip/tcp.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/udp.hpp b/3party/boost/boost/asio/ip/udp.hpp index 4d78692dc3..40f5d3ad3d 100644 --- a/3party/boost/boost/asio/ip/udp.hpp +++ b/3party/boost/boost/asio/ip/udp.hpp @@ -2,7 +2,7 @@ // ip/udp.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/unicast.hpp b/3party/boost/boost/asio/ip/unicast.hpp index 1f331de62c..dc7d8e92af 100644 --- a/3party/boost/boost/asio/ip/unicast.hpp +++ b/3party/boost/boost/asio/ip/unicast.hpp @@ -2,7 +2,7 @@ // ip/unicast.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ip/v6_only.hpp b/3party/boost/boost/asio/ip/v6_only.hpp index e9aab31446..e67a5482ef 100644 --- a/3party/boost/boost/asio/ip/v6_only.hpp +++ b/3party/boost/boost/asio/ip/v6_only.hpp @@ -2,7 +2,7 @@ // ip/v6_only.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/is_read_buffered.hpp b/3party/boost/boost/asio/is_read_buffered.hpp index e429e6d735..1aac50f306 100644 --- a/3party/boost/boost/asio/is_read_buffered.hpp +++ b/3party/boost/boost/asio/is_read_buffered.hpp @@ -2,7 +2,7 @@ // is_read_buffered.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/is_write_buffered.hpp b/3party/boost/boost/asio/is_write_buffered.hpp index fff68d6a59..03de0f11cd 100644 --- a/3party/boost/boost/asio/is_write_buffered.hpp +++ b/3party/boost/boost/asio/is_write_buffered.hpp @@ -2,7 +2,7 @@ // is_write_buffered.hpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/local/basic_endpoint.hpp b/3party/boost/boost/asio/local/basic_endpoint.hpp index 2cd93f6cf9..fcb53a0ecc 100644 --- a/3party/boost/boost/asio/local/basic_endpoint.hpp +++ b/3party/boost/boost/asio/local/basic_endpoint.hpp @@ -2,7 +2,7 @@ // local/basic_endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Derived from a public domain implementation written by Daniel Casimiro. // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/local/connect_pair.hpp b/3party/boost/boost/asio/local/connect_pair.hpp index cb08777a18..9ef6cd3f17 100644 --- a/3party/boost/boost/asio/local/connect_pair.hpp +++ b/3party/boost/boost/asio/local/connect_pair.hpp @@ -2,7 +2,7 @@ // local/connect_pair.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/local/datagram_protocol.hpp b/3party/boost/boost/asio/local/datagram_protocol.hpp index 2d78773e88..eaa024129f 100644 --- a/3party/boost/boost/asio/local/datagram_protocol.hpp +++ b/3party/boost/boost/asio/local/datagram_protocol.hpp @@ -2,7 +2,7 @@ // local/datagram_protocol.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/local/detail/endpoint.hpp b/3party/boost/boost/asio/local/detail/endpoint.hpp index 5fb7297907..c5277933a0 100644 --- a/3party/boost/boost/asio/local/detail/endpoint.hpp +++ b/3party/boost/boost/asio/local/detail/endpoint.hpp @@ -2,7 +2,7 @@ // local/detail/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Derived from a public domain implementation written by Daniel Casimiro. // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/local/detail/impl/endpoint.ipp b/3party/boost/boost/asio/local/detail/impl/endpoint.ipp index ffbc44ed85..a4c1e5699f 100644 --- a/3party/boost/boost/asio/local/detail/impl/endpoint.ipp +++ b/3party/boost/boost/asio/local/detail/impl/endpoint.ipp @@ -2,7 +2,7 @@ // local/detail/impl/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Derived from a public domain implementation written by Daniel Casimiro. // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/local/stream_protocol.hpp b/3party/boost/boost/asio/local/stream_protocol.hpp index 723c348c7b..e8692c5b47 100644 --- a/3party/boost/boost/asio/local/stream_protocol.hpp +++ b/3party/boost/boost/asio/local/stream_protocol.hpp @@ -2,7 +2,7 @@ // local/stream_protocol.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/placeholders.hpp b/3party/boost/boost/asio/placeholders.hpp index 2940edafb1..5f6be4457c 100644 --- a/3party/boost/boost/asio/placeholders.hpp +++ b/3party/boost/boost/asio/placeholders.hpp @@ -2,7 +2,7 @@ // placeholders.hpp // ~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/posix/basic_descriptor.hpp b/3party/boost/boost/asio/posix/basic_descriptor.hpp index 56ec9d8d66..cf953dbcfa 100644 --- a/3party/boost/boost/asio/posix/basic_descriptor.hpp +++ b/3party/boost/boost/asio/posix/basic_descriptor.hpp @@ -2,7 +2,7 @@ // posix/basic_descriptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/posix/basic_stream_descriptor.hpp b/3party/boost/boost/asio/posix/basic_stream_descriptor.hpp index 0f70604ba6..ee08567590 100644 --- a/3party/boost/boost/asio/posix/basic_stream_descriptor.hpp +++ b/3party/boost/boost/asio/posix/basic_stream_descriptor.hpp @@ -2,7 +2,7 @@ // posix/basic_stream_descriptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/posix/descriptor_base.hpp b/3party/boost/boost/asio/posix/descriptor_base.hpp index 70bac6380c..2e5cb477a5 100644 --- a/3party/boost/boost/asio/posix/descriptor_base.hpp +++ b/3party/boost/boost/asio/posix/descriptor_base.hpp @@ -2,7 +2,7 @@ // posix/descriptor_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/posix/stream_descriptor.hpp b/3party/boost/boost/asio/posix/stream_descriptor.hpp index 30b7e37239..22551ab0a2 100644 --- a/3party/boost/boost/asio/posix/stream_descriptor.hpp +++ b/3party/boost/boost/asio/posix/stream_descriptor.hpp @@ -2,7 +2,7 @@ // posix/stream_descriptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/posix/stream_descriptor_service.hpp b/3party/boost/boost/asio/posix/stream_descriptor_service.hpp index c2034da12e..c582b8e7af 100644 --- a/3party/boost/boost/asio/posix/stream_descriptor_service.hpp +++ b/3party/boost/boost/asio/posix/stream_descriptor_service.hpp @@ -2,7 +2,7 @@ // posix/stream_descriptor_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/raw_socket_service.hpp b/3party/boost/boost/asio/raw_socket_service.hpp index 0db83b60dc..783c4c2e40 100644 --- a/3party/boost/boost/asio/raw_socket_service.hpp +++ b/3party/boost/boost/asio/raw_socket_service.hpp @@ -2,7 +2,7 @@ // raw_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/read.hpp b/3party/boost/boost/asio/read.hpp index d2339d5900..fd13e75026 100644 --- a/3party/boost/boost/asio/read.hpp +++ b/3party/boost/boost/asio/read.hpp @@ -2,7 +2,7 @@ // read.hpp // ~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/read_at.hpp b/3party/boost/boost/asio/read_at.hpp index 27bad65e3d..1feba6cc3f 100644 --- a/3party/boost/boost/asio/read_at.hpp +++ b/3party/boost/boost/asio/read_at.hpp @@ -2,7 +2,7 @@ // read_at.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/read_until.hpp b/3party/boost/boost/asio/read_until.hpp index aa9d2ba6fe..546537b3ce 100644 --- a/3party/boost/boost/asio/read_until.hpp +++ b/3party/boost/boost/asio/read_until.hpp @@ -2,7 +2,7 @@ // read_until.hpp // ~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/serial_port.hpp b/3party/boost/boost/asio/serial_port.hpp index 97757394b1..a2f172199f 100644 --- a/3party/boost/boost/asio/serial_port.hpp +++ b/3party/boost/boost/asio/serial_port.hpp @@ -2,7 +2,7 @@ // serial_port.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/serial_port_base.hpp b/3party/boost/boost/asio/serial_port_base.hpp index a050df2f81..083d006dcf 100644 --- a/3party/boost/boost/asio/serial_port_base.hpp +++ b/3party/boost/boost/asio/serial_port_base.hpp @@ -2,7 +2,7 @@ // serial_port_base.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/asio/serial_port_service.hpp b/3party/boost/boost/asio/serial_port_service.hpp index b1c830106a..1a8a11bcd1 100644 --- a/3party/boost/boost/asio/serial_port_service.hpp +++ b/3party/boost/boost/asio/serial_port_service.hpp @@ -2,7 +2,7 @@ // serial_port_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/socket_acceptor_service.hpp b/3party/boost/boost/asio/socket_acceptor_service.hpp index 3f7436b7e8..f287c6507c 100644 --- a/3party/boost/boost/asio/socket_acceptor_service.hpp +++ b/3party/boost/boost/asio/socket_acceptor_service.hpp @@ -2,7 +2,7 @@ // socket_acceptor_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/socket_base.hpp b/3party/boost/boost/asio/socket_base.hpp index 083ffb6ecc..f5bac91c5b 100644 --- a/3party/boost/boost/asio/socket_base.hpp +++ b/3party/boost/boost/asio/socket_base.hpp @@ -2,7 +2,7 @@ // socket_base.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ssl.hpp b/3party/boost/boost/asio/ssl.hpp index f74237fb11..d47ce2f965 100644 --- a/3party/boost/boost/asio/ssl.hpp +++ b/3party/boost/boost/asio/ssl.hpp @@ -2,7 +2,7 @@ // ssl.hpp // ~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ssl/basic_context.hpp b/3party/boost/boost/asio/ssl/basic_context.hpp index 9f9423ef37..7c376c6811 100644 --- a/3party/boost/boost/asio/ssl/basic_context.hpp +++ b/3party/boost/boost/asio/ssl/basic_context.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ssl/context.hpp b/3party/boost/boost/asio/ssl/context.hpp index 2a0c2c41b1..6d5a0e22d6 100644 --- a/3party/boost/boost/asio/ssl/context.hpp +++ b/3party/boost/boost/asio/ssl/context.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ssl/context_base.hpp b/3party/boost/boost/asio/ssl/context_base.hpp index 8121500df6..363588d0c3 100644 --- a/3party/boost/boost/asio/ssl/context_base.hpp +++ b/3party/boost/boost/asio/ssl/context_base.hpp @@ -2,7 +2,7 @@ // ssl/context_base.hpp // ~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2005-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ssl/context_service.hpp b/3party/boost/boost/asio/ssl/context_service.hpp index 689438d8bc..50b7b57695 100644 --- a/3party/boost/boost/asio/ssl/context_service.hpp +++ b/3party/boost/boost/asio/ssl/context_service.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ssl/detail/openssl_context_service.hpp b/3party/boost/boost/asio/ssl/detail/openssl_context_service.hpp index 1734834985..76e3ad5020 100644 --- a/3party/boost/boost/asio/ssl/detail/openssl_context_service.hpp +++ b/3party/boost/boost/asio/ssl/detail/openssl_context_service.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ssl/detail/openssl_init.hpp b/3party/boost/boost/asio/ssl/detail/openssl_init.hpp index 07bd160103..6cdeb60608 100644 --- a/3party/boost/boost/asio/ssl/detail/openssl_init.hpp +++ b/3party/boost/boost/asio/ssl/detail/openssl_init.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ssl/detail/openssl_stream_service.hpp b/3party/boost/boost/asio/ssl/detail/openssl_stream_service.hpp index a554921ffa..8789669f75 100644 --- a/3party/boost/boost/asio/ssl/detail/openssl_stream_service.hpp +++ b/3party/boost/boost/asio/ssl/detail/openssl_stream_service.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ssl/detail/openssl_types.hpp b/3party/boost/boost/asio/ssl/detail/openssl_types.hpp index 712c55392b..6a6ecd6c9f 100644 --- a/3party/boost/boost/asio/ssl/detail/openssl_types.hpp +++ b/3party/boost/boost/asio/ssl/detail/openssl_types.hpp @@ -2,7 +2,7 @@ // ssl/detail/openssl_types.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2005-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ssl/stream.hpp b/3party/boost/boost/asio/ssl/stream.hpp index c83d8e2e64..b8e0a000b3 100644 --- a/3party/boost/boost/asio/ssl/stream.hpp +++ b/3party/boost/boost/asio/ssl/stream.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ssl/stream_base.hpp b/3party/boost/boost/asio/ssl/stream_base.hpp index 2d967d01ce..c310cdb75c 100644 --- a/3party/boost/boost/asio/ssl/stream_base.hpp +++ b/3party/boost/boost/asio/ssl/stream_base.hpp @@ -2,7 +2,7 @@ // ssl/stream_base.hpp // ~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2005-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/ssl/stream_service.hpp b/3party/boost/boost/asio/ssl/stream_service.hpp index 303f879463..92f7ee36b7 100644 --- a/3party/boost/boost/asio/ssl/stream_service.hpp +++ b/3party/boost/boost/asio/ssl/stream_service.hpp @@ -3,7 +3,7 @@ // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com -// Copyright (c) 2005-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2005-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/strand.hpp b/3party/boost/boost/asio/strand.hpp index e08503086d..29281676ae 100644 --- a/3party/boost/boost/asio/strand.hpp +++ b/3party/boost/boost/asio/strand.hpp @@ -2,7 +2,7 @@ // strand.hpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/stream_socket_service.hpp b/3party/boost/boost/asio/stream_socket_service.hpp index 101eacbe04..40d5e18c53 100644 --- a/3party/boost/boost/asio/stream_socket_service.hpp +++ b/3party/boost/boost/asio/stream_socket_service.hpp @@ -2,7 +2,7 @@ // stream_socket_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/streambuf.hpp b/3party/boost/boost/asio/streambuf.hpp index 30196ad7cf..8f724c311e 100644 --- a/3party/boost/boost/asio/streambuf.hpp +++ b/3party/boost/boost/asio/streambuf.hpp @@ -2,7 +2,7 @@ // streambuf.hpp // ~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/time_traits.hpp b/3party/boost/boost/asio/time_traits.hpp index 9043d7dc91..0da7e6b002 100644 --- a/3party/boost/boost/asio/time_traits.hpp +++ b/3party/boost/boost/asio/time_traits.hpp @@ -2,7 +2,7 @@ // time_traits.hpp // ~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/version.hpp b/3party/boost/boost/asio/version.hpp index 20858bf2ff..d19caa2627 100644 --- a/3party/boost/boost/asio/version.hpp +++ b/3party/boost/boost/asio/version.hpp @@ -2,7 +2,7 @@ // version.hpp // ~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -18,6 +18,6 @@ // BOOST_ASIO_VERSION % 100 is the sub-minor version // BOOST_ASIO_VERSION / 100 % 1000 is the minor version // BOOST_ASIO_VERSION / 100000 is the major version -#define BOOST_ASIO_VERSION 100407 // 1.4.7 +#define BOOST_ASIO_VERSION 100408 // 1.4.8 #endif // BOOST_ASIO_VERSION_HPP diff --git a/3party/boost/boost/asio/windows/basic_handle.hpp b/3party/boost/boost/asio/windows/basic_handle.hpp index 58bb54dc3e..aedd79a5f1 100644 --- a/3party/boost/boost/asio/windows/basic_handle.hpp +++ b/3party/boost/boost/asio/windows/basic_handle.hpp @@ -2,7 +2,7 @@ // windows/basic_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/windows/basic_random_access_handle.hpp b/3party/boost/boost/asio/windows/basic_random_access_handle.hpp index 5c403d0221..207e414600 100644 --- a/3party/boost/boost/asio/windows/basic_random_access_handle.hpp +++ b/3party/boost/boost/asio/windows/basic_random_access_handle.hpp @@ -2,7 +2,7 @@ // windows/basic_random_access_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/windows/basic_stream_handle.hpp b/3party/boost/boost/asio/windows/basic_stream_handle.hpp index 340e4024db..105b041ab1 100644 --- a/3party/boost/boost/asio/windows/basic_stream_handle.hpp +++ b/3party/boost/boost/asio/windows/basic_stream_handle.hpp @@ -2,7 +2,7 @@ // windows/basic_stream_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/windows/overlapped_ptr.hpp b/3party/boost/boost/asio/windows/overlapped_ptr.hpp index 24a199f314..c9b1889513 100644 --- a/3party/boost/boost/asio/windows/overlapped_ptr.hpp +++ b/3party/boost/boost/asio/windows/overlapped_ptr.hpp @@ -2,7 +2,7 @@ // windows/overlapped_ptr.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/windows/random_access_handle.hpp b/3party/boost/boost/asio/windows/random_access_handle.hpp index 03d7055bfa..183ad0d815 100644 --- a/3party/boost/boost/asio/windows/random_access_handle.hpp +++ b/3party/boost/boost/asio/windows/random_access_handle.hpp @@ -2,7 +2,7 @@ // windows/random_access_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/windows/random_access_handle_service.hpp b/3party/boost/boost/asio/windows/random_access_handle_service.hpp index e5a2e11c99..08cb561c8e 100644 --- a/3party/boost/boost/asio/windows/random_access_handle_service.hpp +++ b/3party/boost/boost/asio/windows/random_access_handle_service.hpp @@ -2,7 +2,7 @@ // windows/random_access_handle_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/windows/stream_handle.hpp b/3party/boost/boost/asio/windows/stream_handle.hpp index ca2a56c510..67f64522c0 100644 --- a/3party/boost/boost/asio/windows/stream_handle.hpp +++ b/3party/boost/boost/asio/windows/stream_handle.hpp @@ -2,7 +2,7 @@ // windows/stream_handle.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/windows/stream_handle_service.hpp b/3party/boost/boost/asio/windows/stream_handle_service.hpp index e53464615e..418ea1e4a9 100644 --- a/3party/boost/boost/asio/windows/stream_handle_service.hpp +++ b/3party/boost/boost/asio/windows/stream_handle_service.hpp @@ -2,7 +2,7 @@ // windows/stream_handle_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/write.hpp b/3party/boost/boost/asio/write.hpp index 0ec08797a2..537a8d60ea 100644 --- a/3party/boost/boost/asio/write.hpp +++ b/3party/boost/boost/asio/write.hpp @@ -2,7 +2,7 @@ // write.hpp // ~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/asio/write_at.hpp b/3party/boost/boost/asio/write_at.hpp index a078a7035c..9c0c57592d 100644 --- a/3party/boost/boost/asio/write_at.hpp +++ b/3party/boost/boost/asio/write_at.hpp @@ -2,7 +2,7 @@ // write_at.hpp // ~~~~~~~~~~~~ // -// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/assert.hpp b/3party/boost/boost/assert.hpp index c227f17b9e..174f0846fd 100644 --- a/3party/boost/boost/assert.hpp +++ b/3party/boost/boost/assert.hpp @@ -1,8 +1,11 @@ // // boost/assert.hpp - BOOST_ASSERT(expr) +// BOOST_ASSERT_MSG(expr, msg) +// BOOST_VERIFY(expr) // // Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. // Copyright (c) 2007 Peter Dimov +// Copyright (c) Beman Dawes 2011 // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at @@ -13,6 +16,16 @@ // See http://www.boost.org/libs/utility/assert.html for documentation. // +// +// Stop inspect complaining about use of 'assert': +// +// boostinspect:naassert_macro +// + +//--------------------------------------------------------------------------------------// +// BOOST_ASSERT // +//--------------------------------------------------------------------------------------// + #undef BOOST_ASSERT #if defined(BOOST_DISABLE_ASSERTS) @@ -25,18 +38,86 @@ namespace boost { - -void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined - + void assertion_failed(char const * expr, + char const * function, char const * file, long line); // user defined } // namespace boost -#define BOOST_ASSERT(expr) ((expr)? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) +#define BOOST_ASSERT(expr) ((expr) \ + ? ((void)0) \ + : ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) #else # include // .h to support old libraries w/o - effect is the same # define BOOST_ASSERT(expr) assert(expr) #endif +//--------------------------------------------------------------------------------------// +// BOOST_ASSERT_MSG // +//--------------------------------------------------------------------------------------// + +# undef BOOST_ASSERT_MSG + +#if defined(BOOST_DISABLE_ASSERTS) || defined(NDEBUG) + + #define BOOST_ASSERT_MSG(expr, msg) ((void)0) + +#elif defined(BOOST_ENABLE_ASSERT_HANDLER) + + #include + + namespace boost + { + void assertion_failed_msg(char const * expr, char const * msg, + char const * function, char const * file, long line); // user defined + } // namespace boost + + #define BOOST_ASSERT_MSG(expr, msg) ((expr) \ + ? ((void)0) \ + : ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) + +#else + #ifndef BOOST_ASSERT_HPP + #define BOOST_ASSERT_HPP + #include + #include + #include + + // IDE's like Visual Studio perform better if output goes to std::cout or + // some other stream, so allow user to configure output stream: + #ifndef BOOST_ASSERT_MSG_OSTREAM + # define BOOST_ASSERT_MSG_OSTREAM std::cerr + #endif + + namespace boost + { + namespace assertion + { + namespace detail + { + inline void assertion_failed_msg(char const * expr, char const * msg, char const * function, + char const * file, long line) + { + BOOST_ASSERT_MSG_OSTREAM + << "***** Internal Program Error - assertion (" << expr << ") failed in " + << function << ":\n" + << file << '(' << line << "): " << msg << std::endl; + std::abort(); + } + } // detail + } // assertion + } // detail + #endif + + #define BOOST_ASSERT_MSG(expr, msg) ((expr) \ + ? ((void)0) \ + : ::boost::assertion::detail::assertion_failed_msg(#expr, msg, \ + BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) +#endif + +//--------------------------------------------------------------------------------------// +// BOOST_VERIFY // +//--------------------------------------------------------------------------------------// + #undef BOOST_VERIFY #if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) ) diff --git a/3party/boost/boost/circular_buffer/base.hpp b/3party/boost/boost/circular_buffer/base.hpp index cd68cbc4b1..3b9886a3d3 100644 --- a/3party/boost/boost/circular_buffer/base.hpp +++ b/3party/boost/boost/circular_buffer/base.hpp @@ -34,6 +34,12 @@ #include #endif +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std { + using ::memset; +} +#endif + namespace boost { /*! @@ -2081,7 +2087,7 @@ private: throw_exception(std::length_error("circular_buffer")); #if BOOST_CB_ENABLE_DEBUG pointer p = (n == 0) ? 0 : m_alloc.allocate(n, 0); - ::memset(p, cb_details::UNINITIALIZED, sizeof(value_type) * n); + std::memset(p, cb_details::UNINITIALIZED, sizeof(value_type) * n); return p; #else return (n == 0) ? 0 : m_alloc.allocate(n, 0); @@ -2124,7 +2130,7 @@ private: m_alloc.destroy(p); #if BOOST_CB_ENABLE_DEBUG invalidate_iterators(iterator(this, p)); - ::memset(p, cb_details::UNINITIALIZED, sizeof(value_type)); + std::memset(p, cb_details::UNINITIALIZED, sizeof(value_type)); #endif } diff --git a/3party/boost/boost/concept_check.hpp b/3party/boost/boost/concept_check.hpp index 58bd8b2b9c..01b2f4ec27 100644 --- a/3party/boost/boost/concept_check.hpp +++ b/3party/boost/boost/concept_check.hpp @@ -38,14 +38,14 @@ namespace boost // // Backward compatibility // - + template inline void function_requires(Model* = 0) { BOOST_CONCEPT_ASSERT((Model)); - } + } template inline void ignore_unused_variable_warning(T const&) {} - + # define BOOST_CLASS_REQUIRE(type_var, ns, concept) \ BOOST_CONCEPT_ASSERT((ns::concept)) @@ -58,20 +58,21 @@ namespace boost # define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \ BOOST_CONCEPT_ASSERT((ns::concept)) - + // // Begin concept definitions // BOOST_concept(Integer, (T)) { BOOST_CONCEPT_USAGE(Integer) - { + { x.error_type_must_be_an_integer_type(); } private: T x; }; + template <> struct Integer {}; template <> struct Integer {}; template <> struct Integer {}; template <> struct Integer {}; @@ -89,7 +90,7 @@ namespace boost # endif BOOST_concept(SignedInteger,(T)) { - BOOST_CONCEPT_USAGE(SignedInteger) { + BOOST_CONCEPT_USAGE(SignedInteger) { x.error_type_must_be_a_signed_integer_type(); } private: @@ -103,16 +104,16 @@ namespace boost template <> struct SignedInteger< ::boost::long_long_type> {}; # elif defined(BOOST_HAS_MS_INT64) template <> struct SignedInteger<__int64> {}; -# endif +# endif BOOST_concept(UnsignedInteger,(T)) { - BOOST_CONCEPT_USAGE(UnsignedInteger) { + BOOST_CONCEPT_USAGE(UnsignedInteger) { x.error_type_must_be_an_unsigned_integer_type(); } private: T x; }; - + template <> struct UnsignedInteger {}; template <> struct UnsignedInteger {}; template <> struct UnsignedInteger {}; @@ -138,23 +139,24 @@ namespace boost { BOOST_CONCEPT_USAGE(Assignable) { #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = a; // require assignment operator + a = b; // require assignment operator #endif - const_constraints(a); + const_constraints(b); } private: - void const_constraints(const TT& b) { + void const_constraints(const TT& x) { #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = b; // const required for argument to assignment + a = x; // const required for argument to assignment #else - ignore_unused_variable_warning(b); + ignore_unused_variable_warning(x); #endif } private: TT a; + TT b; }; - + BOOST_concept(CopyConstructible,(TT)) { BOOST_CONCEPT_USAGE(CopyConstructible) { @@ -182,22 +184,23 @@ namespace boost BOOST_concept(SGIAssignable,(TT)) { BOOST_CONCEPT_USAGE(SGIAssignable) { - TT b(a); + TT c(a); #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = a; // require assignment operator + a = b; // require assignment operator #endif - const_constraints(a); - ignore_unused_variable_warning(b); + const_constraints(b); + ignore_unused_variable_warning(c); } private: - void const_constraints(const TT& b) { - TT c(b); + void const_constraints(const TT& x) { + TT c(x); #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = b; // const required for argument to assignment + a = x; // const required for argument to assignment #endif ignore_unused_variable_warning(c); } TT a; + TT b; }; #if (defined _MSC_VER) # pragma warning( pop ) @@ -299,7 +302,7 @@ namespace boost BOOST_concept(Generator,(Func)(Return)) { BOOST_CONCEPT_USAGE(Generator) { test(is_void()); } - + private: void test(boost::mpl::false_) { @@ -312,22 +315,22 @@ namespace boost { f(); } - + Func f; }; BOOST_concept(UnaryFunction,(Func)(Return)(Arg)) { BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void()); } - + private: void test(boost::mpl::false_) { f(arg); // "priming the pump" this way keeps msvc6 happy (ICE) Return r = f(arg); - ignore_unused_variable_warning(r); + ignore_unused_variable_warning(r); } - + void test(boost::mpl::true_) { f(arg); @@ -356,12 +359,21 @@ namespace boost Return r = f(first, second); // require operator() (void)r; } - + void test(boost::mpl::true_) { f(first,second); } - + +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::BinaryFunction::arg" + // in class without a constructor [-Wuninitialized]) + BinaryFunction(); +#endif + Func f; First first; Second second; @@ -373,6 +385,15 @@ namespace boost require_boolean_expr(f(arg)); // require operator() returning bool } private: +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::UnaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + UnaryPredicate(); +#endif + Func f; Arg arg; }; @@ -383,6 +404,14 @@ namespace boost require_boolean_expr(f(a, b)); // require operator() returning bool } private: +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::BinaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + BinaryPredicate(); +#endif Func f; First a; Second b; @@ -392,7 +421,7 @@ namespace boost BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second)) : BinaryPredicate { - BOOST_CONCEPT_USAGE(Const_BinaryPredicate) { + BOOST_CONCEPT_USAGE(Const_BinaryPredicate) { const_constraints(f); } private: @@ -400,6 +429,15 @@ namespace boost // operator() must be a const member function require_boolean_expr(fun(a, b)); } +#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ + && BOOST_WORKAROUND(__GNUC__, > 3))) + // Declare a dummy constructor to make gcc happy. + // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. + // (warning: non-static reference "const double& boost::Const_BinaryPredicate::arg" + // in class without a constructor [-Wuninitialized]) + Const_BinaryPredicate(); +#endif + Func f; First a; Second b; @@ -409,7 +447,7 @@ namespace boost : Generator { typedef typename Func::result_type result_type; - + BOOST_CONCEPT_USAGE(AdaptableGenerator) { BOOST_CONCEPT_ASSERT((Convertible)); @@ -440,7 +478,7 @@ namespace boost typedef typename Func::first_argument_type first_argument_type; typedef typename Func::second_argument_type second_argument_type; typedef typename Func::result_type result_type; - + ~AdaptableBinaryFunction() { BOOST_CONCEPT_ASSERT((Convertible)); @@ -478,7 +516,7 @@ namespace boost { BOOST_CONCEPT_ASSERT((SignedInteger)); BOOST_CONCEPT_ASSERT((Convertible)); - + TT j(i); (void)*i; // require dereference operator ++j; // require preincrement operator @@ -492,7 +530,7 @@ namespace boost : Assignable { BOOST_CONCEPT_USAGE(OutputIterator) { - + ++i; // require preincrement operator i++; // require postincrement operator *i++ = t; // require postincrement and assignment @@ -511,11 +549,11 @@ namespace boost BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category , std::forward_iterator_tag >)); - + typename InputIterator::reference r = *i; ignore_unused_variable_warning(r); } - + private: TT i; }; @@ -577,7 +615,7 @@ namespace boost n = i - j; // require difference operator (void)i[n]; // require element access operator } - + private: TT a, b; TT i, j; @@ -615,7 +653,7 @@ namespace boost BOOST_CONCEPT_ASSERT((InputIterator)); const_constraints(c); } - + private: void const_constraints(const C& cc) { i = cc.begin(); @@ -636,19 +674,19 @@ namespace boost typedef typename C::reference reference; typedef typename C::iterator iterator; typedef typename C::pointer pointer; - + BOOST_CONCEPT_USAGE(Mutable_Container) { BOOST_CONCEPT_ASSERT(( Assignable)); - + BOOST_CONCEPT_ASSERT((InputIterator)); - + i = c.begin(); i = c.end(); c.swap(c2); } - + private: iterator i; C c, c2; @@ -664,7 +702,7 @@ namespace boost typename ForwardContainer::const_iterator >)); } - }; + }; BOOST_concept(Mutable_ForwardContainer,(C)) : ForwardContainer @@ -677,7 +715,7 @@ namespace boost typename Mutable_ForwardContainer::iterator >)); } - }; + }; BOOST_concept(ReversibleContainer,(C)) : ForwardContainer @@ -691,9 +729,9 @@ namespace boost BOOST_CONCEPT_ASSERT(( BidirectionalIterator< typename ReversibleContainer::const_iterator>)); - + BOOST_CONCEPT_ASSERT((BidirectionalIterator)); - + const_constraints(c); } private: @@ -710,17 +748,17 @@ namespace boost , ReversibleContainer { typedef typename C::reverse_iterator reverse_iterator; - + BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer) { typedef typename Mutable_ForwardContainer::iterator iterator; BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); - + reverse_iterator i = c.rbegin(); i = c.rend(); } - private: + private: C c; }; @@ -736,7 +774,7 @@ namespace boost RandomAccessIterator< typename RandomAccessContainer::const_iterator >)); - + const_constraints(c); } private: @@ -745,7 +783,7 @@ namespace boost const_reference r = cc[n]; ignore_unused_variable_warning(r); } - + C c; size_type n; }; @@ -761,11 +799,11 @@ namespace boost { BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); - + typename self::reference r = c[i]; ignore_unused_variable_warning(r); } - + private: typename Mutable_ReversibleContainer::size_type i; C c; @@ -781,7 +819,7 @@ namespace boost { BOOST_CONCEPT_USAGE(Sequence) { - S + S c(n), c2(n, t), c3(first, last); @@ -806,7 +844,7 @@ namespace boost typename Sequence::const_reference r = c.front(); ignore_unused_variable_warning(r); } - + typename S::value_type t; typename S::size_type n; typename S::value_type* first, *last; @@ -865,11 +903,11 @@ namespace boost c.erase(r.first, r.second); const_constraints(c); BOOST_CONCEPT_ASSERT((BinaryPredicate)); - + typedef typename AssociativeContainer::value_type value_type_; BOOST_CONCEPT_ASSERT((BinaryPredicate)); } - + // Redundant with the base concept, but it helps below. typedef typename C::const_iterator const_iterator; private: @@ -895,7 +933,7 @@ namespace boost BOOST_CONCEPT_USAGE(UniqueAssociativeContainer) { C c(first, last); - + pos_flag = c.insert(t); c.insert(first, last); @@ -913,7 +951,7 @@ namespace boost BOOST_CONCEPT_USAGE(MultipleAssociativeContainer) { C c(first, last); - + pos = c.insert(t); c.insert(first, last); @@ -956,7 +994,7 @@ namespace boost { BOOST_CONCEPT_USAGE(SortedAssociativeContainer) { - C + C c(kc), c2(first, last), c3(first, last, kc); @@ -964,15 +1002,15 @@ namespace boost p = c.upper_bound(k); p = c.lower_bound(k); r = c.equal_range(k); - + c.insert(p, t); - + ignore_unused_variable_warning(c); ignore_unused_variable_warning(c2); ignore_unused_variable_warning(c3); const_constraints(c); } - + void const_constraints(const C& c) { kc = c.key_comp(); @@ -982,7 +1020,7 @@ namespace boost cp = c.lower_bound(k); cr = c.equal_range(k); } - + private: typename C::key_compare kc; typename C::value_compare vc; diff --git a/3party/boost/boost/config/auto_link.hpp b/3party/boost/boost/config/auto_link.hpp index e562caff7c..f5a0a007b4 100644 --- a/3party/boost/boost/config/auto_link.hpp +++ b/3party/boost/boost/config/auto_link.hpp @@ -414,7 +414,4 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. #if defined(BOOST_DYN_LINK) # undef BOOST_DYN_LINK #endif -#if defined(BOOST_AUTO_LINK_NOMANGLE) -# undef BOOST_AUTO_LINK_NOMANGLE -#endif diff --git a/3party/boost/boost/config/compiler/borland.hpp b/3party/boost/boost/config/compiler/borland.hpp index a989fd633b..2816ab886d 100644 --- a/3party/boost/boost/config/compiler/borland.hpp +++ b/3party/boost/boost/config/compiler/borland.hpp @@ -12,6 +12,9 @@ // // versions check: // we don't support Borland prior to version 5.4: + +#define BOOST_BORLAND __BORLANDC__ + #if __BORLANDC__ < 0x540 # error "Compiler not supported or configured - please reconfigure" #endif diff --git a/3party/boost/boost/config/compiler/comeau.hpp b/3party/boost/boost/config/compiler/comeau.hpp index 278222dcfd..c2cedb1793 100644 --- a/3party/boost/boost/config/compiler/comeau.hpp +++ b/3party/boost/boost/config/compiler/comeau.hpp @@ -14,6 +14,8 @@ #include "boost/config/compiler/common_edg.hpp" +#define BOOST_COMO __COMO_VERSION__ + #if (__COMO_VERSION__ <= 4245) # if defined(_MSC_VER) && _MSC_VER <= 1300 diff --git a/3party/boost/boost/config/compiler/common_edg.hpp b/3party/boost/boost/config/compiler/common_edg.hpp index 682c73af4a..9042578bfd 100644 --- a/3party/boost/boost/config/compiler/common_edg.hpp +++ b/3party/boost/boost/config/compiler/common_edg.hpp @@ -62,10 +62,13 @@ #if (__EDG_VERSION__ < 310) # define BOOST_NO_EXTERN_TEMPLATE #endif -#if (__EDG_VERSION__ <= 310) || !defined(BOOST_STRICT_CONFIG) +#if (__EDG_VERSION__ <= 310) // No support for initializer lists # define BOOST_NO_INITIALIZER_LISTS #endif +#if (__EDG_VERSION__ < 400) +# define BOOST_NO_VARIADIC_MACROS +#endif #define BOOST_NO_AUTO_DECLARATIONS #define BOOST_NO_AUTO_MULTIDECLARATIONS @@ -88,7 +91,6 @@ #define BOOST_NO_TEMPLATE_ALIASES #define BOOST_NO_UNICODE_LITERALS #define BOOST_NO_VARIADIC_TEMPLATES -#define BOOST_NO_VARIADIC_MACROS #ifdef c_plusplus // EDG has "long long" in non-strict mode diff --git a/3party/boost/boost/config/compiler/gcc.hpp b/3party/boost/boost/config/compiler/gcc.hpp index eeaf998202..7ce7fe6b2e 100644 --- a/3party/boost/boost/config/compiler/gcc.hpp +++ b/3party/boost/boost/config/compiler/gcc.hpp @@ -89,7 +89,6 @@ # define BOOST_NO_EXCEPTIONS #endif - // // Threading support: Turn this on unconditionally here (except for // those platforms where we can know for sure). It will get turned off again @@ -148,8 +147,6 @@ // C++0x features not implemented in any GCC version // -#define BOOST_NO_CONSTEXPR -#define BOOST_NO_NULLPTR #define BOOST_NO_TEMPLATE_ALIASES // C++0x features in 4.3.n and later @@ -211,6 +208,13 @@ # define BOOST_NO_UNICODE_LITERALS #endif +// C++0x features in 4.5.n and later +// +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#define BOOST_NO_CONSTEXPR +#define BOOST_NO_NULLPTR +#endif + // ConceptGCC compiler: // http://www.generic-programming.org/software/ConceptGCC/ #ifdef __GXX_CONCEPTS__ @@ -231,8 +235,8 @@ # error "Compiler not configured - please reconfigure" #endif // -// last known and checked version is 4.4 (Pre-release): -#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 4)) +// last known and checked version is 4.6 (Pre-release): +#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6)) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else diff --git a/3party/boost/boost/config/compiler/metrowerks.hpp b/3party/boost/boost/config/compiler/metrowerks.hpp index 21083b7a1f..81854a0f5f 100644 --- a/3party/boost/boost/config/compiler/metrowerks.hpp +++ b/3party/boost/boost/config/compiler/metrowerks.hpp @@ -12,6 +12,8 @@ // Metrowerks C++ compiler setup: +#define BOOST_MWERKS __MWERKS__ + // locale support is disabled when linking with the dynamic runtime # ifdef _MSL_NO_LOCALE # define BOOST_NO_STD_LOCALE diff --git a/3party/boost/boost/config/compiler/pathscale.hpp b/3party/boost/boost/config/compiler/pathscale.hpp new file mode 100644 index 0000000000..13ede88dea --- /dev/null +++ b/3party/boost/boost/config/compiler/pathscale.hpp @@ -0,0 +1,82 @@ +// (C) Copyright Bryce Lelbach 2011 + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// PathScale EKOPath C++ Compiler + +#ifndef BOOST_COMPILER +# define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__ +#endif + +#if __PATHCC__ >= 4 +# define BOOST_MSVC6_MEMBER_TEMPLATES +# define BOOST_HAS_UNISTD_H +# define BOOST_HAS_STDINT_H +# define BOOST_HAS_SIGACTION +# define BOOST_HAS_SCHED_YIELD +# define BOOST_HAS_THREADS +# define BOOST_HAS_PTHREADS +# define BOOST_HAS_PTHREAD_YIELD +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_PARTIAL_STD_ALLOCATOR +# define BOOST_HAS_NRVO +# define BOOST_HAS_NL_TYPES_H +# define BOOST_HAS_NANOSLEEP +# define BOOST_HAS_LONG_LONG +# define BOOST_HAS_LOG1P +# define BOOST_HAS_GETTIMEOFDAY +# define BOOST_HAS_EXPM1 +# define BOOST_HAS_DIRENT_H +# define BOOST_HAS_CLOCK_GETTIME +# define BOOST_NO_VARIADIC_TEMPLATES +# define BOOST_NO_UNICODE_LITERALS +# define BOOST_NO_TEMPLATE_ALIASES +# define BOOST_NO_STD_UNORDERED +# define BOOST_NO_STATIC_ASSERT +# define BOOST_NO_SFINAE_EXPR +# define BOOST_NO_SCOPED_ENUMS +# define BOOST_NO_RVALUE_REFERENCES +# define BOOST_NO_RAW_LITERALS +# define BOOST_NO_NULLPTR +# define BOOST_NO_NUMERIC_LIMITS_LOWEST +# define BOOST_NO_LAMBDAS +# define BOOST_NO_INITIALIZER_LISTS +# define BOOST_NO_MS_INT64_NUMERIC_LIMITS +# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS +# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS +# define BOOST_NO_DELETED_FUNCTIONS +# define BOOST_NO_DEFAULTED_FUNCTIONS +# define BOOST_NO_DECLTYPE +# define BOOST_NO_CONSTEXPR +# define BOOST_NO_CONCEPTS +# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION +# define BOOST_NO_CHAR32_T +# define BOOST_NO_CHAR16_T +# define BOOST_NO_AUTO_MULTIDECLARATIONS +# define BOOST_NO_AUTO_DECLARATIONS +# define BOOST_NO_0X_HDR_UNORDERED_SET +# define BOOST_NO_0X_HDR_UNORDERED_MAP +# define BOOST_NO_0X_HDR_TYPEINDEX +# define BOOST_NO_0X_HDR_TUPLE +# define BOOST_NO_0X_HDR_THREAD +# define BOOST_NO_0X_HDR_SYSTEM_ERROR +# define BOOST_NO_0X_HDR_REGEX +# define BOOST_NO_0X_HDR_RATIO +# define BOOST_NO_0X_HDR_RANDOM +# define BOOST_NO_0X_HDR_MUTEX +# define BOOST_NO_0X_HDR_MEMORY_CONCEPTS +# define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS +# define BOOST_NO_0X_HDR_INITIALIZER_LIST +# define BOOST_NO_0X_HDR_FUTURE +# define BOOST_NO_0X_HDR_FORWARD_LIST +# define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS +# define BOOST_NO_0X_HDR_CONDITION_VARIABLE +# define BOOST_NO_0X_HDR_CONCEPTS +# define BOOST_NO_0X_HDR_CODECVT +# define BOOST_NO_0X_HDR_CHRONO +#endif + diff --git a/3party/boost/boost/config/compiler/sunpro_cc.hpp b/3party/boost/boost/config/compiler/sunpro_cc.hpp index 85fa462504..e718dbb695 100644 --- a/3party/boost/boost/config/compiler/sunpro_cc.hpp +++ b/3party/boost/boost/config/compiler/sunpro_cc.hpp @@ -11,6 +11,10 @@ // Sun C++ compiler setup: +// Macro identifying the Sun compiler + +#define BOOST_SUNCC __SUNPRO_CC + # if __SUNPRO_CC <= 0x500 # define BOOST_NO_MEMBER_TEMPLATES # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING diff --git a/3party/boost/boost/config/compiler/visualc.hpp b/3party/boost/boost/config/compiler/visualc.hpp index 6755287da4..38789367a8 100644 --- a/3party/boost/boost/config/compiler/visualc.hpp +++ b/3party/boost/boost/config/compiler/visualc.hpp @@ -37,6 +37,9 @@ // #endif +/// Visual Studio has no fenv.h +#define BOOST_NO_FENV_H + #if (_MSC_VER <= 1300) // 1300 == VC++ 7.0 # if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za @@ -94,10 +97,6 @@ # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS #endif -#if _MSC_VER <= 1600 // 1600 == VC++ 10.0 -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#endif - #if _MSC_VER == 1500 // 1500 == VC++ 9.0 // A bug in VC9: # define BOOST_NO_ADL_BARRIER @@ -181,6 +180,7 @@ #define BOOST_NO_STATIC_ASSERT #define BOOST_NO_NULLPTR #endif // _MSC_VER < 1600 + #if _MSC_VER >= 1600 #define BOOST_HAS_STDINT_H #endif @@ -198,10 +198,11 @@ #define BOOST_NO_INITIALIZER_LISTS #define BOOST_NO_RAW_LITERALS #define BOOST_NO_SCOPED_ENUMS -#define BOOST_NO_SFINAE_EXPR #define BOOST_NO_TEMPLATE_ALIASES #define BOOST_NO_UNICODE_LITERALS #define BOOST_NO_VARIADIC_TEMPLATES +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP // // prefix and suffix headers: // diff --git a/3party/boost/boost/config/platform/aix.hpp b/3party/boost/boost/config/platform/aix.hpp index 894ef42ce9..ec22a42f61 100644 --- a/3party/boost/boost/config/platform/aix.hpp +++ b/3party/boost/boost/config/platform/aix.hpp @@ -1,4 +1,5 @@ // (C) Copyright John Maddock 2001 - 2002. +// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -9,6 +10,13 @@ #define BOOST_PLATFORM "IBM Aix" +#define BOOST_NIX 1 +//#define BOOST_GENETIC_NIX 1 +#define BOOST_TRADEMARK_NIX 1 +//#define BOOST_FUNCTIONAL_NIX 1 + +#define BOOST_AIX 1 + #define BOOST_HAS_UNISTD_H #define BOOST_HAS_NL_TYPES_H #define BOOST_HAS_NANOSLEEP diff --git a/3party/boost/boost/config/platform/amigaos.hpp b/3party/boost/boost/config/platform/amigaos.hpp index 34bcf4128b..a1f12f6dec 100644 --- a/3party/boost/boost/config/platform/amigaos.hpp +++ b/3party/boost/boost/config/platform/amigaos.hpp @@ -1,4 +1,5 @@ // (C) Copyright John Maddock 2002. +// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -7,6 +8,8 @@ #define BOOST_PLATFORM "AmigaOS" +#define BOOST_AMIGA 1 + #define BOOST_DISABLE_THREADS #define BOOST_NO_CWCHAR #define BOOST_NO_STD_WSTRING diff --git a/3party/boost/boost/config/platform/beos.hpp b/3party/boost/boost/config/platform/beos.hpp index 48c3d8dc5b..cda00164e2 100644 --- a/3party/boost/boost/config/platform/beos.hpp +++ b/3party/boost/boost/config/platform/beos.hpp @@ -1,4 +1,5 @@ // (C) Copyright John Maddock 2001. +// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -9,6 +10,13 @@ #define BOOST_PLATFORM "BeOS" +#define BOOST_BEOS 1 + +#define BOOST_NIX 1 +//#define BOOST_GENETIC_NIX 1 +//#define BOOST_TRADEMARK_NIX 1 +#define BOOST_FUNCTIONAL_NIX 1 + #define BOOST_NO_CWCHAR #define BOOST_NO_CWCTYPE #define BOOST_HAS_UNISTD_H diff --git a/3party/boost/boost/config/platform/bsd.hpp b/3party/boost/boost/config/platform/bsd.hpp index a0142978eb..9720c777b7 100644 --- a/3party/boost/boost/config/platform/bsd.hpp +++ b/3party/boost/boost/config/platform/bsd.hpp @@ -1,6 +1,7 @@ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001. // (C) Copyright Douglas Gregor 2002. +// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -9,18 +10,30 @@ // generic BSD config options: -#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) -#error "This platform is not BSD" +#if !defined(__FreeBSD__) && \ + !defined(__NetBSD__) && \ + !defined(__OpenBSD__) && \ + !defined(__DragonFly__) + #error "This platform is not BSD" #endif +#define BOOST_NIX 1 +#define BOOST_GENETIC_NIX 1 +//#define BOOST_TRADEMARK_NIX 1 +//#define BOOST_FUNCTIONAL_NIX 1 + #ifdef __FreeBSD__ -#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) + #define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) + #define BOOST_FREEBSD __FreeBSD__ #elif defined(__NetBSD__) -#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) + #define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) + #define BOOST_NETBSD __NetBSD__ #elif defined(__OpenBSD__) -#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) + #define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) + #define BOOST_OPENBSD __OpenBSD__ #elif defined(__DragonFly__) -#define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) + #define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) + #define BOOST_DFBSD __DragonFly__ #endif // diff --git a/3party/boost/boost/config/platform/cygwin.hpp b/3party/boost/boost/config/platform/cygwin.hpp index 8e1bcb0139..aba3719382 100644 --- a/3party/boost/boost/config/platform/cygwin.hpp +++ b/3party/boost/boost/config/platform/cygwin.hpp @@ -1,52 +1,56 @@ -// (C) Copyright John Maddock 2001 - 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// (C) Copyright John Maddock 2001 - 2003 +// (C) Copyright Bryce Lelbach 2010 +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// See http://www.boost.org for most recent version. -// See http://www.boost.org for most recent version. +#define BOOST_PLATFORM "Cygwin" // Platform name. +#define BOOST_CYGWIN __CYGWIN__ // Boost platform ID macros. -// cygwin specific config options: - -#define BOOST_PLATFORM "Cygwin" #define BOOST_HAS_DIRENT_H #define BOOST_HAS_LOG1P #define BOOST_HAS_EXPM1 -// -// Threading API: -// See if we have POSIX threads, if we do use them, otherwise -// revert to native Win threads. +#define BOOST_NIX 1 +//#define BOOST_GENETIC_NIX 1 +//#define BOOST_TRADEMARK_NIX 1 +#define BOOST_FUNCTIONAL_NIX 1 + +// See if we have POSIX threads, otherwise revert to native Win threads. #define BOOST_HAS_UNISTD_H #include -#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) -# define BOOST_HAS_PTHREADS -# define BOOST_HAS_SCHED_YIELD -# define BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_SIGACTION + +#if defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0) && \ + !defined(BOOST_HAS_WINTHREADS) + #define BOOST_HAS_PTHREADS + #define BOOST_HAS_SCHED_YIELD + #define BOOST_HAS_GETTIMEOFDAY + #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE + #define BOOST_HAS_SIGACTION #else -# if !defined(BOOST_HAS_WINTHREADS) -# define BOOST_HAS_WINTHREADS -# endif -# define BOOST_HAS_FTIME + #if !defined(BOOST_HAS_WINTHREADS) + #define BOOST_HAS_WINTHREADS + #endif + #define BOOST_HAS_FTIME #endif -// -// find out if we have a stdint.h, there should be a better way to do this: -// +// Find out if we have a stdint.h, there should be a better way to do this. #include + #ifdef _STDINT_H -#define BOOST_HAS_STDINT_H + #define BOOST_HAS_STDINT_H #endif -// boilerplate code: +/// Cygwin has no fenv.h +#define BOOST_NO_FENV_H + #include -// -// Cygwin lies about XSI conformance, there is no nl_types.h: -// +// Cygwin lies about XSI conformance, there is no nl_types.h. #ifdef BOOST_HAS_NL_TYPES_H -# undef BOOST_HAS_NL_TYPES_H + #undef BOOST_HAS_NL_TYPES_H #endif diff --git a/3party/boost/boost/config/platform/hpux.hpp b/3party/boost/boost/config/platform/hpux.hpp index 19ce68e597..2aefb2d27b 100644 --- a/3party/boost/boost/config/platform/hpux.hpp +++ b/3party/boost/boost/config/platform/hpux.hpp @@ -3,6 +3,7 @@ // (C) Copyright David Abrahams 2002. // (C) Copyright Toon Knapen 2003. // (C) Copyright Boris Gubenko 2006 - 2007. +// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -13,6 +14,13 @@ #define BOOST_PLATFORM "HP-UX" +#define BOOST_HPUX 1 // platform ID macro + +#define BOOST_NIX 1 +//#define BOOST_GENETIC_NIX 1 +#define BOOST_TRADEMARK_NIX 1 +//#define BOOST_FUNCTIONAL_NIX 1 + // In principle, HP-UX has a nice under the name // However, it has the following problem: // Use of UINT32_C(0) results in "0u l" for the preprocessed source diff --git a/3party/boost/boost/config/platform/irix.hpp b/3party/boost/boost/config/platform/irix.hpp index aeae49c8b4..4915d81335 100644 --- a/3party/boost/boost/config/platform/irix.hpp +++ b/3party/boost/boost/config/platform/irix.hpp @@ -1,5 +1,6 @@ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2003. +// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -11,6 +12,11 @@ #define BOOST_PLATFORM "SGI Irix" +#define BOOST_NIX 1 +//#define BOOST_GENETIC_NIX 1 +#define BOOST_TRADEMARK_NIX 1 +//#define BOOST_FUNCTIONAL_NIX 1 + #define BOOST_NO_SWPRINTF // // these are not auto detected by POSIX feature tests: diff --git a/3party/boost/boost/config/platform/linux.hpp b/3party/boost/boost/config/platform/linux.hpp index 51ae13347c..3e7f02c78a 100644 --- a/3party/boost/boost/config/platform/linux.hpp +++ b/3party/boost/boost/config/platform/linux.hpp @@ -1,5 +1,6 @@ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -13,6 +14,13 @@ // make sure we have __GLIBC_PREREQ if available at all #include +#define BOOST_NIX 1 +//#define BOOST_GENETIC_NIX 1 +//#define BOOST_TRADEMARK_NIX 1 +#define BOOST_FUNCTIONAL_NIX 1 + +#define BOOST_LINUX 1 + // // added to glibc 2.1.1 // We can only test for 2.1 though: diff --git a/3party/boost/boost/config/platform/macos.hpp b/3party/boost/boost/config/platform/macos.hpp index 2780ef99e9..d018703d09 100644 --- a/3party/boost/boost/config/platform/macos.hpp +++ b/3party/boost/boost/config/platform/macos.hpp @@ -1,6 +1,7 @@ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001 - 2002. // (C) Copyright Bill Kempf 2002. +// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -13,6 +14,11 @@ #if __MACH__ && !defined(_MSL_USING_MSL_C) +#define BOOST_NIX 1 +//#define BOOST_GENETIC_NIX 1 +#define BOOST_TRADEMARK_NIX 1 +//#define BOOST_FUNCTIONAL_NIX 1 + // Using the Mac OS X system BSD-style C library. # ifndef BOOST_HAS_UNISTD_H diff --git a/3party/boost/boost/config/platform/qnxnto.hpp b/3party/boost/boost/config/platform/qnxnto.hpp index b1377c8d2c..0c54373d07 100644 --- a/3party/boost/boost/config/platform/qnxnto.hpp +++ b/3party/boost/boost/config/platform/qnxnto.hpp @@ -1,4 +1,5 @@ // (C) Copyright Jim Douglas 2005. +// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -7,8 +8,15 @@ // QNX specific config options: +#define BOOST_QNX 1 + #define BOOST_PLATFORM "QNX" +#define BOOST_NIX 1 +//#define BOOST_GENETIC_NIX 1 +//#define BOOST_TRADEMARK_NIX 1 +#define BOOST_FUNCTIONAL_NIX 1 + #define BOOST_HAS_UNISTD_H #include diff --git a/3party/boost/boost/config/platform/solaris.hpp b/3party/boost/boost/config/platform/solaris.hpp index 9f9256664b..9a9e1f4655 100644 --- a/3party/boost/boost/config/platform/solaris.hpp +++ b/3party/boost/boost/config/platform/solaris.hpp @@ -1,5 +1,6 @@ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2003. +// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -10,6 +11,11 @@ #define BOOST_PLATFORM "Sun Solaris" +#define BOOST_NIX 1 +//#define BOOST_GENETIC_NIX 1 +#define BOOST_TRADEMARK_NIX 1 +//#define BOOST_FUNCTIONAL_NIX 1 + #define BOOST_HAS_GETTIMEOFDAY // boilerplate code: diff --git a/3party/boost/boost/config/platform/symbian.hpp b/3party/boost/boost/config/platform/symbian.hpp index ad37943127..798dfac4f0 100644 --- a/3party/boost/boost/config/platform/symbian.hpp +++ b/3party/boost/boost/config/platform/symbian.hpp @@ -1,6 +1,7 @@ // (C) Copyright Yuriy Krasnoschek 2009. // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2003. +// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -9,13 +10,16 @@ // symbian specific config options: - #define BOOST_PLATFORM "Symbian" #define BOOST_SYMBIAN 1 - #if defined(__S60_3X__) -// Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL +// Open C / C++ plugin was introdused in this SDK, earlier versions don't have +// CRT / STL +# define BOOST_NIX 1 +//# define BOOST_GENETIC_NIX 1 +//# define BOOST_TRADEMARK_NIX 1 +# define BOOST_FUNCTIONAL_NIX 1 # define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK // make sure we have __GLIBC_PREREQ if available at all # include diff --git a/3party/boost/boost/config/platform/vxworks.hpp b/3party/boost/boost/config/platform/vxworks.hpp index 6ec5171e39..3b128bf458 100644 --- a/3party/boost/boost/config/platform/vxworks.hpp +++ b/3party/boost/boost/config/platform/vxworks.hpp @@ -1,4 +1,5 @@ // (C) Copyright Dustin Spicuzza 2009. +// (C) Copyright Bryce Lelbach 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -23,6 +24,11 @@ #define _POSIX_TIMERS 1 #define _POSIX_THREADS 1 +#define BOOST_NIX 1 +//#define BOOST_GENETIC_NIX 1 +#define BOOST_TRADEMARK_NIX 1 +//#define BOOST_FUNCTIONAL_NIX 1 + // vxworks doesn't work with asio serial ports #define BOOST_ASIO_DISABLE_SERIAL_PORT diff --git a/3party/boost/boost/config/platform/win32.hpp b/3party/boost/boost/config/platform/win32.hpp index f59c4ea79e..72c3dcebdc 100644 --- a/3party/boost/boost/config/platform/win32.hpp +++ b/3party/boost/boost/config/platform/win32.hpp @@ -31,7 +31,6 @@ # define BOOST_SYMBOL_IMPORT __declspec(dllimport) #endif - #if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0))) # define BOOST_HAS_STDINT_H # define __STDC_LIMIT_MACROS @@ -39,6 +38,11 @@ # define BOOST_HAS_UNISTD_H #endif +#if defined(__MINGW32__) && (__GNUC__ >= 4) +# define BOOST_HAS_EXPM1 +# define BOOST_HAS_LOG1P +# define BOOST_HAS_GETTIMEOFDAY +#endif // // Win32 will normally be using native Win32 threads, // but there is a pthread library avaliable as an option, diff --git a/3party/boost/boost/config/select_compiler_config.hpp b/3party/boost/boost/config/select_compiler_config.hpp index f9b086ad43..e19469ae21 100644 --- a/3party/boost/boost/config/select_compiler_config.hpp +++ b/3party/boost/boost/config/select_compiler_config.hpp @@ -14,25 +14,27 @@ // one identification macro for each of the // compilers we support: -# define BOOST_CXX_GCCXML 0 -# define BOOST_CXX_CLANG 0 -# define BOOST_CXX_COMO 0 -# define BOOST_CXX_DMC 0 -# define BOOST_CXX_INTEL 0 -# define BOOST_CXX_GNUC 0 -# define BOOST_CXX_KCC 0 -# define BOOST_CXX_SGI 0 -# define BOOST_CXX_TRU64 0 -# define BOOST_CXX_GHS 0 -# define BOOST_CXX_BORLAND 0 -# define BOOST_CXX_CW 0 -# define BOOST_CXX_SUNPRO 0 -# define BOOST_CXX_HPACC 0 -# define BOOST_CXX_MPW 0 -# define BOOST_CXX_IBMCPP 0 -# define BOOST_CXX_MSVC 0 -# define BOOST_CXX_PGI 0 -# define BOOST_CXX_NVCC 0 +# define BOOST_CXX_GCCXML 0 +# define BOOST_CXX_NVCC 0 +# define BOOST_CXX_COMO 0 +# define BOOST_CXX_PATHSCALE 0 +# define BOOST_CXX_CLANG 0 +# define BOOST_CXX_DMC 0 +# define BOOST_CXX_INTEL 0 +# define BOOST_CXX_GNUC 0 +# define BOOST_CXX_KCC 0 +# define BOOST_CXX_SGI 0 +# define BOOST_CXX_TRU64 0 +# define BOOST_CXX_GHS 0 +# define BOOST_CXX_BORLAND 0 +# define BOOST_CXX_CW 0 +# define BOOST_CXX_SUNPRO 0 +# define BOOST_CXX_HPACC 0 +# define BOOST_CXX_MPW 0 +# define BOOST_CXX_IBMCPP 0 +# define BOOST_CXX_MSVC 0 +# define BOOST_CXX_PGI 0 +# define BOOST_CXX_NVCC 0 // locate which compiler we are using and define @@ -50,6 +52,10 @@ // Comeau C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp" +#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4) +// PathScale EKOPath compiler (has to come before clang and gcc) +# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp" + #elif defined __clang__ // Clang C++ emulates GCC, so it has to appear early. # define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" diff --git a/3party/boost/boost/config/stdlib/dinkumware.hpp b/3party/boost/boost/config/stdlib/dinkumware.hpp index e33fef12ea..a7579daa09 100644 --- a/3party/boost/boost/config/stdlib/dinkumware.hpp +++ b/3party/boost/boost/config/stdlib/dinkumware.hpp @@ -107,6 +107,7 @@ # define BOOST_NO_0X_HDR_UNORDERED_SET # define BOOST_NO_0X_HDR_TUPLE # define BOOST_NO_0X_HDR_TYPEINDEX +# define BOOST_NO_NUMERIC_LIMITS_LOWEST #endif #if !defined(_HAS_TR1_IMPORTS) && !defined(BOOST_NO_0X_HDR_TUPLE) @@ -125,7 +126,6 @@ # define BOOST_NO_0X_HDR_MUTEX # define BOOST_NO_0X_HDR_RATIO # define BOOST_NO_0X_HDR_THREAD -# define BOOST_NO_NUMERIC_LIMITS_LOWEST #ifdef _CPPLIB_VER # define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER diff --git a/3party/boost/boost/config/stdlib/libstdcpp3.hpp b/3party/boost/boost/config/stdlib/libstdcpp3.hpp index 01dd490751..75bfc4aa26 100644 --- a/3party/boost/boost/config/stdlib/libstdcpp3.hpp +++ b/3party/boost/boost/config/stdlib/libstdcpp3.hpp @@ -54,7 +54,6 @@ # define BOOST_HAS_THREADS #endif - #if !defined(_GLIBCPP_USE_LONG_LONG) \ && !defined(_GLIBCXX_USE_LONG_LONG)\ && defined(BOOST_HAS_LONG_LONG) @@ -63,6 +62,16 @@ # undef BOOST_HAS_LONG_LONG #endif +// Apple doesn't seem to reliably defined a *unix* macro +#if !defined(CYGWIN) && ( defined(__unix__) \ + || defined(__unix) \ + || defined(unix) \ + || defined(__APPLE__) \ + || defined(__APPLE) \ + || defined(APPLE)) +# include +#endif + #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx # define BOOST_HAS_SLIST diff --git a/3party/boost/boost/config/stdlib/sgi.hpp b/3party/boost/boost/config/stdlib/sgi.hpp index 4d4264731c..5731fe5eb6 100644 --- a/3party/boost/boost/config/stdlib/sgi.hpp +++ b/3party/boost/boost/config/stdlib/sgi.hpp @@ -40,6 +40,17 @@ # define BOOST_NO_STRINGSTREAM #endif +// Apple doesn't seem to reliably defined a *unix* macro +#if !defined(CYGWIN) && ( defined(__unix__) \ + || defined(__unix) \ + || defined(unix) \ + || defined(__APPLE__) \ + || defined(__APPLE) \ + || defined(APPLE)) +# include +#endif + + // // Assume no std::locale without own iostreams (this may be an // incorrect assumption in some cases): diff --git a/3party/boost/boost/config/stdlib/stlport.hpp b/3party/boost/boost/config/stdlib/stlport.hpp index 0e1c9b2bc2..85176a4d92 100644 --- a/3party/boost/boost/config/stdlib/stlport.hpp +++ b/3party/boost/boost/config/stdlib/stlport.hpp @@ -16,6 +16,16 @@ # endif #endif +// Apple doesn't seem to reliably defined a *unix* macro +#if !defined(CYGWIN) && ( defined(__unix__) \ + || defined(__unix) \ + || defined(unix) \ + || defined(__APPLE__) \ + || defined(__APPLE) \ + || defined(APPLE)) +# include +#endif + // // __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS // for versions prior to 4.1(beta) diff --git a/3party/boost/boost/config/stdlib/vacpp.hpp b/3party/boost/boost/config/stdlib/vacpp.hpp index 0fc092f0ee..3fcf6e05bc 100644 --- a/3party/boost/boost/config/stdlib/vacpp.hpp +++ b/3party/boost/boost/config/stdlib/vacpp.hpp @@ -12,6 +12,16 @@ #define BOOST_HAS_MACRO_USE_FACET #define BOOST_NO_STD_MESSAGES +// Apple doesn't seem to reliably defined a *unix* macro +#if !defined(CYGWIN) && ( defined(__unix__) \ + || defined(__unix) \ + || defined(unix) \ + || defined(__APPLE__) \ + || defined(__APPLE) \ + || defined(APPLE)) +# include +#endif + // C++0x headers not yet implemented // # define BOOST_NO_0X_HDR_ARRAY diff --git a/3party/boost/boost/config/suffix.hpp b/3party/boost/boost/config/suffix.hpp index 722758f951..4e608d248d 100644 --- a/3party/boost/boost/config/suffix.hpp +++ b/3party/boost/boost/config/suffix.hpp @@ -349,6 +349,13 @@ #define BOOST_HAS_RVALUE_REFS #endif +// +// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_VARIADIC_TEMPLATES is not defined +// +#if !defined(BOOST_NO_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL) +#define BOOST_HAS_VARIADIC_TMPL +#endif + // BOOST_HAS_ABI_HEADERS // This macro gets set if we have headers that fix the ABI, // and prevent ODR violations when linking to external libraries: @@ -632,6 +639,10 @@ namespace std{ using ::typeinfo; } # if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \ || defined(_POSIX_SOURCE) # define BOOST_PLATFORM "Generic Unix" +# define BOOST_NIX 1 +//# define BOOST_GENETIC_NIX 1 +//# define BOOST_TRADEMARK_NIX 1 +# define BOOST_FUNCTIONAL_NIX 1 # else # define BOOST_PLATFORM "Unknown" # endif @@ -643,5 +654,19 @@ namespace std{ using ::typeinfo; } # ifndef BOOST_GPU_ENABLED # define BOOST_GPU_ENABLED # endif + +// +// constexpr workarounds +// +#if defined(BOOST_NO_CONSTEXPR) +#define BOOST_CONSTEXPR +#define BOOST_CONSTEXPR_OR_CONST const +#else +#define BOOST_CONSTEXPR constexpr +#define BOOST_CONSTEXPR_OR_CONST constexpr +#endif + +#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST + #endif diff --git a/3party/boost/boost/detail/bitmask.hpp b/3party/boost/boost/detail/bitmask.hpp new file mode 100644 index 0000000000..c6714a1109 --- /dev/null +++ b/3party/boost/boost/detail/bitmask.hpp @@ -0,0 +1,47 @@ +// boost/detail/bitmask.hpp ------------------------------------------------// + +// Copyright Beman Dawes 2006 + +// Distributed under the Boost Software License, Version 1.0 +// http://www.boost.org/LICENSE_1_0.txt + +// Usage: enum foo { a=1, b=2, c=4 }; +// BOOST_BITMASK( foo ); +// +// void f( foo arg ); +// ... +// f( a | c ); + +#ifndef BOOST_BITMASK_HPP +#define BOOST_BITMASK_HPP + +#include + +#define BOOST_BITMASK(Bitmask) \ + \ + inline Bitmask operator| (Bitmask x , Bitmask y ) \ + { return static_cast( static_cast(x) \ + | static_cast(y)); } \ + \ + inline Bitmask operator& (Bitmask x , Bitmask y ) \ + { return static_cast( static_cast(x) \ + & static_cast(y)); } \ + \ + inline Bitmask operator^ (Bitmask x , Bitmask y ) \ + { return static_cast( static_cast(x) \ + ^ static_cast(y)); } \ + \ + inline Bitmask operator~ (Bitmask x ) \ + { return static_cast(~static_cast(x)); } \ + \ + inline Bitmask & operator&=(Bitmask & x , Bitmask y) \ + { x = x & y ; return x ; } \ + \ + inline Bitmask & operator|=(Bitmask & x , Bitmask y) \ + { x = x | y ; return x ; } \ + \ + inline Bitmask & operator^=(Bitmask & x , Bitmask y) \ + { x = x ^ y ; return x ; } + +#endif // BOOST_BITMASK_HPP + diff --git a/3party/boost/boost/detail/container_fwd.hpp b/3party/boost/boost/detail/container_fwd.hpp index 67c5a21c8a..9a2125230f 100644 --- a/3party/boost/boost/detail/container_fwd.hpp +++ b/3party/boost/boost/detail/container_fwd.hpp @@ -68,7 +68,11 @@ namespace std template struct char_traits; #endif - template class complex; + #if BOOST_CLANG + template struct complex; + #else + template class complex; + #endif } // gcc 3.4 and greater diff --git a/3party/boost/boost/detail/endian.hpp b/3party/boost/boost/detail/endian.hpp index 5f9b90efd9..98c870ca2f 100644 --- a/3party/boost/boost/detail/endian.hpp +++ b/3party/boost/boost/detail/endian.hpp @@ -44,11 +44,13 @@ # endif # define BOOST_BYTE_ORDER __BYTE_ORDER #elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \ - defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) + defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) || \ + defined(_STLP_BIG_ENDIAN) && !defined(_STLP_LITTLE_ENDIAN) # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 #elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \ - defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) + defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) || \ + defined(_STLP_LITTLE_ENDIAN) && !defined(_STLP_BIG_ENDIAN) # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 #elif defined(__sparc) || defined(__sparc__) \ diff --git a/3party/boost/boost/detail/fenv.hpp b/3party/boost/boost/detail/fenv.hpp new file mode 100644 index 0000000000..1ba883370f --- /dev/null +++ b/3party/boost/boost/detail/fenv.hpp @@ -0,0 +1,73 @@ +/*============================================================================= + Copyright (c) 2010 Bryce Lelbach + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +#include + +#if defined(BOOST_NO_FENV_H) + #error This platform does not have a floating point environment +#endif + +#if !defined(BOOST_DETAIL_FENV_HPP) +#define BOOST_DETAIL_FENV_HPP + +/* If we're using clang + glibc, we have to get hacky. + * See http://llvm.org/bugs/show_bug.cgi?id=6907 */ +#if defined(__clang__) && \ + defined(__GNU_LIBRARY__) && /* up to version 5 */ \ + defined(__GLIBC__) /* version 6 + */ + #define _FENV_H + + #include + #include + + extern "C" { + extern int fegetexceptflag (fexcept_t*, int) __THROW; + extern int fesetexceptflag (__const fexcept_t*, int) __THROW; + extern int feclearexcept (int) __THROW; + extern int feraiseexcept (int) __THROW; + extern int fetestexcept (int) __THROW; + extern int fegetround (void) __THROW; + extern int fesetround (int) __THROW; + extern int fegetenv (fenv_t*) __THROW; + extern int fesetenv (__const fenv_t*) __THROW; + extern int feupdateenv (__const fenv_t*) __THROW; + extern int feholdexcept (fenv_t*) __THROW; + + #ifdef __USE_GNU + extern int feenableexcept (int) __THROW; + extern int fedisableexcept (int) __THROW; + extern int fegetexcept (void) __THROW; + #endif + } + + namespace std { namespace tr1 { + using ::fenv_t; + using ::fexcept_t; + using ::fegetexceptflag; + using ::fesetexceptflag; + using ::feclearexcept; + using ::feraiseexcept; + using ::fetestexcept; + using ::fegetround; + using ::fesetround; + using ::fegetenv; + using ::fesetenv; + using ::feupdateenv; + using ::feholdexcept; + } } + +#else /* if we're not using GNU's C stdlib, fenv.h should work with clang */ + #if defined(__SUNPRO_CC) /* lol suncc */ + #include + #endif + + #include + +#endif + +#endif /* BOOST_DETAIL_FENV_HPP */ + diff --git a/3party/boost/boost/detail/lightweight_main.hpp b/3party/boost/boost/detail/lightweight_main.hpp new file mode 100644 index 0000000000..1705309780 --- /dev/null +++ b/3party/boost/boost/detail/lightweight_main.hpp @@ -0,0 +1,36 @@ +// boost/detail/lightweight_main.hpp -------------------------------------------------// + +// Copyright Beman Dawes 2010 + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +//--------------------------------------------------------------------------------------// +// // +// exception reporting main() that calls cpp_main() // +// // +//--------------------------------------------------------------------------------------// + +int cpp_main(int argc, char* argv[]); + +int main(int argc, char* argv[]) +{ + try + { + return cpp_main(argc, argv); + } + + catch (const std::exception& ex) + { + std::cout + << "\nERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR ERROR\n" + << "\n****************************** std::exception *****************************\n" + << ex.what() + << "\n***************************************************************************\n" + << std::endl; + } + return 1; +} diff --git a/3party/boost/boost/detail/lightweight_test.hpp b/3party/boost/boost/detail/lightweight_test.hpp index ffa750d324..8add322630 100644 --- a/3party/boost/boost/detail/lightweight_test.hpp +++ b/3party/boost/boost/detail/lightweight_test.hpp @@ -24,6 +24,7 @@ // #include +#include #include namespace boost @@ -32,9 +33,26 @@ namespace boost namespace detail { +struct report_errors_reminder +{ + bool called_report_errors_function; + report_errors_reminder() : called_report_errors_function(false) {} + ~report_errors_reminder() + { + BOOST_ASSERT(called_report_errors_function); // verify report_errors() was called + } +}; + +inline report_errors_reminder& report_errors_remind() +{ + static report_errors_reminder r; + return r; +} + inline int & test_errors() { static int x = 0; + report_errors_remind(); return x; } @@ -68,6 +86,8 @@ template inline void test_eq_impl( char const * expr1, char co inline int report_errors() { + detail::report_errors_remind().called_report_errors_function = true; + int errors = detail::test_errors(); if( errors == 0 ) diff --git a/3party/boost/boost/dynamic_bitset/dynamic_bitset.hpp b/3party/boost/boost/dynamic_bitset/dynamic_bitset.hpp index 72faa8d192..c20895e535 100644 --- a/3party/boost/boost/dynamic_bitset/dynamic_bitset.hpp +++ b/3party/boost/boost/dynamic_bitset/dynamic_bitset.hpp @@ -54,7 +54,7 @@ class dynamic_bitset // of VC++ are likely able to digest a more drinking form of the // code; but changing it now is probably not worth the risks...] - BOOST_STATIC_ASSERT(detail::dynamic_bitset_impl::allowed_block_type::value); + BOOST_STATIC_ASSERT((bool)detail::dynamic_bitset_impl::allowed_block_type::value); public: typedef Block block_type; @@ -670,7 +670,7 @@ resize(size_type num_bits, bool value) // strong guarantee if (value && (num_bits > m_num_bits)) { - const size_type extra_bits = count_extra_bits(); + const block_width_type extra_bits = count_extra_bits(); if (extra_bits) { assert(old_num_blocks >= 1 && old_num_blocks <= m_bits.size()); diff --git a/3party/boost/boost/exception/diagnostic_information.hpp b/3party/boost/boost/exception/diagnostic_information.hpp index 1d6bc2cc98..229767636d 100644 --- a/3party/boost/boost/exception/diagnostic_information.hpp +++ b/3party/boost/boost/exception/diagnostic_information.hpp @@ -137,7 +137,7 @@ boost } #ifndef BOOST_NO_RTTI tmp << std::string("Dynamic exception type: ") << - units::detail::demangle((be?BOOST_EXCEPTION_DYNAMIC_TYPEID(*be):BOOST_EXCEPTION_DYNAMIC_TYPEID(*se)).type_.name()) << '\n'; + units::detail::demangle((be?(BOOST_EXCEPTION_DYNAMIC_TYPEID(*be)):(BOOST_EXCEPTION_DYNAMIC_TYPEID(*se))).type_.name()) << '\n'; #endif if( with_what && se ) tmp << "std::exception::what: " << wh << '\n'; diff --git a/3party/boost/boost/filesystem.hpp b/3party/boost/boost/filesystem.hpp index f8b9353a7b..d64d760c04 100644 --- a/3party/boost/boost/filesystem.hpp +++ b/3party/boost/boost/filesystem.hpp @@ -12,13 +12,16 @@ #ifndef BOOST_FILESYSTEM_FILESYSTEM_HPP #define BOOST_FILESYSTEM_FILESYSTEM_HPP +#include // for , in case + // BOOST_FILESYSTEM_VERSION defined there + # if defined(BOOST_FILESYSTEM_VERSION) \ && BOOST_FILESYSTEM_VERSION != 2 && BOOST_FILESYSTEM_VERSION != 3 # error BOOST_FILESYSTEM_VERSION defined, but not as 2 or 3 # endif # if !defined(BOOST_FILESYSTEM_VERSION) -# define BOOST_FILESYSTEM_VERSION 2 +# define BOOST_FILESYSTEM_VERSION 3 # endif #if BOOST_FILESYSTEM_VERSION == 2 diff --git a/3party/boost/boost/filesystem/config.hpp b/3party/boost/boost/filesystem/config.hpp index 9d12bce694..c813bf5c02 100644 --- a/3party/boost/boost/filesystem/config.hpp +++ b/3party/boost/boost/filesystem/config.hpp @@ -12,13 +12,16 @@ #ifndef BOOST_FILESYSTEM_CONFIGX_HPP #define BOOST_FILESYSTEM_CONFIGX_HPP +#include // for , in case + // BOOST_FILESYSTEM_VERSION defined there + # if defined(BOOST_FILESYSTEM_VERSION) \ && BOOST_FILESYSTEM_VERSION != 2 && BOOST_FILESYSTEM_VERSION != 3 # error BOOST_FILESYSTEM_VERSION defined, but not as 2 or 3 # endif # if !defined(BOOST_FILESYSTEM_VERSION) -# define BOOST_FILESYSTEM_VERSION 2 +# define BOOST_FILESYSTEM_VERSION 3 # endif #if BOOST_FILESYSTEM_VERSION == 2 diff --git a/3party/boost/boost/filesystem/convenience.hpp b/3party/boost/boost/filesystem/convenience.hpp index def4c3df31..a132e17f0f 100644 --- a/3party/boost/boost/filesystem/convenience.hpp +++ b/3party/boost/boost/filesystem/convenience.hpp @@ -12,13 +12,16 @@ #ifndef BOOST_FILESYSTEM_CONVENIENCEX_HPP #define BOOST_FILESYSTEM_CONVENIENCEX_HPP +#include // for , in case + // BOOST_FILESYSTEM_VERSION defined there + # if defined(BOOST_FILESYSTEM_VERSION) \ && BOOST_FILESYSTEM_VERSION != 2 && BOOST_FILESYSTEM_VERSION != 3 # error BOOST_FILESYSTEM_VERSION defined, but not as 2 or 3 # endif # if !defined(BOOST_FILESYSTEM_VERSION) -# define BOOST_FILESYSTEM_VERSION 2 +# define BOOST_FILESYSTEM_VERSION 3 # endif #if BOOST_FILESYSTEM_VERSION == 2 diff --git a/3party/boost/boost/filesystem/exception.hpp b/3party/boost/boost/filesystem/exception.hpp index cced257108..6ba8466d17 100644 --- a/3party/boost/boost/filesystem/exception.hpp +++ b/3party/boost/boost/filesystem/exception.hpp @@ -12,13 +12,16 @@ #ifndef BOOST_FILESYSTEM_EXCEPTIONX_HPP #define BOOST_FILESYSTEM_EXCEPTIONX_HPP +#include // for , in case + // BOOST_FILESYSTEM_VERSION defined there + # if defined(BOOST_FILESYSTEM_VERSION) \ && BOOST_FILESYSTEM_VERSION != 2 && BOOST_FILESYSTEM_VERSION != 3 # error BOOST_FILESYSTEM_VERSION defined, but not as 2 or 3 # endif # if !defined(BOOST_FILESYSTEM_VERSION) -# define BOOST_FILESYSTEM_VERSION 2 +# define BOOST_FILESYSTEM_VERSION 3 # endif #if BOOST_FILESYSTEM_VERSION == 2 diff --git a/3party/boost/boost/filesystem/fstream.hpp b/3party/boost/boost/filesystem/fstream.hpp index ae44cd9e59..e159e58ed3 100644 --- a/3party/boost/boost/filesystem/fstream.hpp +++ b/3party/boost/boost/filesystem/fstream.hpp @@ -12,13 +12,16 @@ #ifndef BOOST_FILESYSTEM_FSTREAMX_HPP #define BOOST_FILESYSTEM_FSTREAMX_HPP +#include // for , in case + // BOOST_FILESYSTEM_VERSION defined there + # if defined(BOOST_FILESYSTEM_VERSION) \ && BOOST_FILESYSTEM_VERSION != 2 && BOOST_FILESYSTEM_VERSION != 3 # error BOOST_FILESYSTEM_VERSION defined, but not as 2 or 3 # endif # if !defined(BOOST_FILESYSTEM_VERSION) -# define BOOST_FILESYSTEM_VERSION 2 +# define BOOST_FILESYSTEM_VERSION 3 # endif #if BOOST_FILESYSTEM_VERSION == 2 diff --git a/3party/boost/boost/filesystem/operations.hpp b/3party/boost/boost/filesystem/operations.hpp index 7dc94e9714..db7b1235e0 100644 --- a/3party/boost/boost/filesystem/operations.hpp +++ b/3party/boost/boost/filesystem/operations.hpp @@ -12,13 +12,16 @@ #ifndef BOOST_FILESYSTEM_OPERATIONSX_HPP #define BOOST_FILESYSTEM_OPERATIONSX_HPP +#include // for , in case + // BOOST_FILESYSTEM_VERSION defined there + # if defined(BOOST_FILESYSTEM_VERSION) \ && BOOST_FILESYSTEM_VERSION != 2 && BOOST_FILESYSTEM_VERSION != 3 # error BOOST_FILESYSTEM_VERSION defined, but not as 2 or 3 # endif # if !defined(BOOST_FILESYSTEM_VERSION) -# define BOOST_FILESYSTEM_VERSION 2 +# define BOOST_FILESYSTEM_VERSION 3 # endif #if BOOST_FILESYSTEM_VERSION == 2 diff --git a/3party/boost/boost/filesystem/path.hpp b/3party/boost/boost/filesystem/path.hpp index bf12174076..3bed7d2c84 100644 --- a/3party/boost/boost/filesystem/path.hpp +++ b/3party/boost/boost/filesystem/path.hpp @@ -12,13 +12,16 @@ #ifndef BOOST_FILESYSTEM_PATHX_HPP #define BOOST_FILESYSTEM_PATHX_HPP +#include // for , in case + // BOOST_FILESYSTEM_VERSION defined there + # if defined(BOOST_FILESYSTEM_VERSION) \ && BOOST_FILESYSTEM_VERSION != 2 && BOOST_FILESYSTEM_VERSION != 3 # error BOOST_FILESYSTEM_VERSION defined, but not as 2 or 3 # endif # if !defined(BOOST_FILESYSTEM_VERSION) -# define BOOST_FILESYSTEM_VERSION 2 +# define BOOST_FILESYSTEM_VERSION 3 # endif #if BOOST_FILESYSTEM_VERSION == 2 diff --git a/3party/boost/boost/filesystem/v2/config.hpp b/3party/boost/boost/filesystem/v2/config.hpp index 62656efd9a..7116de5c5e 100644 --- a/3party/boost/boost/filesystem/v2/config.hpp +++ b/3party/boost/boost/filesystem/v2/config.hpp @@ -51,6 +51,16 @@ # endif # endif +// throw an exception ----------------------------------------------------------------// +// +// Exceptions were originally thrown via boost::throw_exception(). +// As throw_exception() became more complex, it caused user error reporting +// to be harder to interpret, since the exception reported became much more complex. +// The immediate fix was to throw directly, wrapped in a macro to make any later change +// easier. + +#define BOOST_FILESYSTEM_THROW(EX) throw EX + // narrow support only for badly broken compilers or libraries -------------// # if defined(BOOST_NO_STD_WSTRING) || defined(BOOST_NO_SFINAE) || defined(BOOST_NO_STD_LOCALE) || BOOST_WORKAROUND(__BORLANDC__, <0x610) diff --git a/3party/boost/boost/filesystem/v2/convenience.hpp b/3party/boost/boost/filesystem/v2/convenience.hpp index 4695a01dbe..30b6adee7d 100644 --- a/3party/boost/boost/filesystem/v2/convenience.hpp +++ b/3party/boost/boost/filesystem/v2/convenience.hpp @@ -13,7 +13,8 @@ #ifndef BOOST_FILESYSTEM2_CONVENIENCE_HPP #define BOOST_FILESYSTEM2_CONVENIENCE_HPP -#include +#include +#include #include #include #include @@ -85,11 +86,11 @@ namespace boost # if !defined(_STLPORT_VERSION) return ph.parent_path() / (basename(ph) + new_extension); # else - typedef BOOST_FS_TYPENAME Path::string_type string_type; - string_type filename = basename(ph) + new_extension; - return ph.parent_path() / filename; + typedef BOOST_FS_TYPENAME Path::string_type string_type; + string_type filename = basename(ph) + new_extension; + return ph.parent_path() / filename; # endif - } + } # endif # ifndef BOOST_FILESYSTEM2_NARROW_ONLY diff --git a/3party/boost/boost/filesystem/v2/fstream.hpp b/3party/boost/boost/filesystem/v2/fstream.hpp index bdcd4852d8..887d59d3ab 100644 --- a/3party/boost/boost/filesystem/v2/fstream.hpp +++ b/3party/boost/boost/filesystem/v2/fstream.hpp @@ -12,6 +12,7 @@ #ifndef BOOST_FILESYSTEM2_FSTREAM_HPP #define BOOST_FILESYSTEM2_FSTREAM_HPP +#include #include // for 8.3 hack (see below) #include #include diff --git a/3party/boost/boost/filesystem/v2/operations.hpp b/3party/boost/boost/filesystem/v2/operations.hpp index c60046f09e..57c406daac 100644 --- a/3party/boost/boost/filesystem/v2/operations.hpp +++ b/3party/boost/boost/filesystem/v2/operations.hpp @@ -14,6 +14,7 @@ #ifndef BOOST_FILESYSTEM2_OPERATIONS_HPP #define BOOST_FILESYSTEM2_OPERATIONS_HPP +#include #include #include @@ -258,7 +259,7 @@ namespace boost system::error_code ec; file_status result( detail::status_api( ph.external_file_string(), ec ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::status", ph, ec ) ); return result; } @@ -277,7 +278,7 @@ namespace boost system::error_code ec; file_status result( symlink_status( ph, ec ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::symlink_status", ph, ec ) ); return result; } @@ -292,7 +293,7 @@ namespace boost system::error_code ec; file_status result( detail::status_api( ph.external_file_string(), ec ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::exists", ph, ec ) ); return exists( result ); } @@ -302,7 +303,7 @@ namespace boost system::error_code ec; file_status result( detail::status_api( ph.external_file_string(), ec ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::is_directory", ph, ec ) ); return is_directory( result ); } @@ -312,7 +313,7 @@ namespace boost system::error_code ec; file_status result( detail::status_api( ph.external_file_string(), ec ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::is_regular_file", ph, ec ) ); return is_regular_file( result ); } @@ -323,7 +324,7 @@ namespace boost system::error_code ec; file_status result( detail::status_api( ph.external_file_string(), ec ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::is_regular", ph, ec ) ); return is_regular( result ); } @@ -334,7 +335,7 @@ namespace boost system::error_code ec; file_status result( detail::status_api( ph.external_file_string(), ec ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::is_other", ph, ec ) ); return is_other( result ); } @@ -350,7 +351,7 @@ namespace boost system::error_code ec; file_status result( detail::symlink_status_api( ph.external_file_string(), ec ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::is_symlink", ph, ec ) ); return is_symlink( result ); # endif @@ -369,7 +370,7 @@ namespace boost detail::query_pair result( detail::is_empty_api( ph.external_file_string() ) ); if ( result.first ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::is_empty", ph, result.first ) ); return result.second; } @@ -379,7 +380,7 @@ namespace boost detail::query_pair result( detail::equivalent_api( ph1.external_file_string(), ph2.external_file_string() ) ); if ( result.first ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::equivalent", ph1, ph2, result.first ) ); return result.second; } @@ -389,7 +390,7 @@ namespace boost detail::uintmax_pair result ( detail::file_size_api( ph.external_file_string() ) ); if ( result.first ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::file_size", ph, result.first ) ); return result.second; } @@ -399,7 +400,7 @@ namespace boost detail::space_pair result ( detail::space_api( ph.external_file_string() ) ); if ( result.first ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::space", ph, result.first ) ); return result.second; } @@ -409,7 +410,7 @@ namespace boost detail::time_pair result ( detail::last_write_time_api( ph.external_file_string() ) ); if ( result.first ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::last_write_time", ph, result.first ) ); return result.second; } @@ -422,7 +423,7 @@ namespace boost detail::query_pair result( detail::create_directory_api( dir_ph.external_directory_string() ) ); if ( result.first ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::create_directory", dir_ph, result.first ) ); return result.second; @@ -437,7 +438,7 @@ namespace boost to_ph.external_file_string(), from_ph.external_file_string() ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::create_hard_link", to_ph, from_ph, ec ) ); } @@ -461,7 +462,7 @@ namespace boost to_ph.external_file_string(), from_ph.external_file_string() ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::create_symlink", to_ph, from_ph, ec ) ); } @@ -481,7 +482,7 @@ namespace boost system::error_code ec; file_status f = symlink_status( ph, ec ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::remove", ph, ec ) ); return detail::remove_aux( ph, f ); } @@ -491,7 +492,7 @@ namespace boost system::error_code ec; file_status f = symlink_status( ph, ec ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::remove_all", ph, ec ) ); return exists( f ) ? detail::remove_all_aux( ph, f ) : 0; } @@ -502,7 +503,7 @@ namespace boost from_path.external_directory_string(), to_path.external_directory_string() ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::rename", from_path, to_path, ec ) ); } @@ -518,7 +519,7 @@ namespace boost from_path.external_directory_string(), to_path.external_directory_string(), option == copy_option::fail_if_exists ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::copy_file", from_path, to_path, ec ) ); } @@ -529,7 +530,7 @@ namespace boost typename Path::external_string_type ph; system::error_code ec( detail::get_current_path_api( ph ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::current_path", ec ) ); return Path( Path::traits_type::to_internal( ph ) ); } @@ -539,7 +540,7 @@ namespace boost system::error_code ec( detail::set_current_path_api( ph.external_directory_string() ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::current_path", ph, ec ) ); } @@ -567,7 +568,7 @@ namespace boost system::error_code ec( detail::get_full_path_name_api( ph.external_file_string(), sys_ph ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::system_complete", ph, ec ) ); return Path( Path::traits_type::to_internal( sys_ph ) ); # else @@ -606,7 +607,7 @@ namespace boost system::error_code ec( detail::last_write_time_api( ph.external_file_string(), new_time ) ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::last_write_time", ph, ec ) ); } @@ -782,7 +783,7 @@ namespace boost { system::error_code ec = remove_api( ph.external_file_string() ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::remove", ph, ec ) ); return true; } @@ -803,7 +804,7 @@ namespace boost boost::system::error_code ec; boost::filesystem2::file_status fn = boost::filesystem2::symlink_status( itr->path(), ec ); if ( ec ) - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem:remove_all", ph, ec ) ); count += remove_all_aux( itr->path(), fn ); } @@ -980,7 +981,7 @@ namespace boost system::error_code ec( m_init(dir_path) ); if ( ec ) { - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::basic_directory_iterator constructor", dir_path, ec ) ); } @@ -1013,7 +1014,7 @@ namespace boost name, fs, symlink_fs ); if ( ec ) { - boost::throw_exception( basic_filesystem_error( + BOOST_FILESYSTEM_THROW( basic_filesystem_error( "boost::filesystem::basic_directory_iterator increment", m_imp->m_directory_entry.path().parent_path(), ec ) ); } diff --git a/3party/boost/boost/filesystem/v2/path.hpp b/3party/boost/boost/filesystem/v2/path.hpp index 16d67ca7da..615b89cd31 100644 --- a/3party/boost/boost/filesystem/v2/path.hpp +++ b/3party/boost/boost/filesystem/v2/path.hpp @@ -20,16 +20,15 @@ #include #include #include -#include #include #include #include +#include #include #include // for lexicographical_compare #include // needed by basic_path inserter and extractor #include -#include # ifndef BOOST_FILESYSTEM2_NARROW_ONLY # include @@ -916,7 +915,7 @@ namespace boost boost::BOOST_FILESYSTEM2_NAMESPACE::basic_path path_type; - assert( !str.empty() && str[pos] == slash::value + BOOST_ASSERT( !str.empty() && str[pos] == slash::value && "precondition violation" ); // subsequent logic expects pos to be for leftmost slash of a set @@ -1380,7 +1379,7 @@ namespace boost typedef typename Path::string_type string_type; typedef typename Path::traits_type traits_type; - assert( itr.m_pos < itr.m_path_ptr->m_path.size() && "basic_path::iterator increment past end()" ); + BOOST_ASSERT( itr.m_pos < itr.m_path_ptr->m_path.size() && "basic_path::iterator increment past end()" ); bool was_net( itr.m_name.size() > 2 && itr.m_name[0] == slash::value @@ -1439,7 +1438,7 @@ namespace boost template void iterator_helper::do_decrement( iterator & itr ) { - assert( itr.m_pos && "basic_path::iterator decrement past begin()" ); + BOOST_ASSERT( itr.m_pos && "basic_path::iterator decrement past begin()" ); typedef typename Path::string_type string_type; typedef typename Path::traits_type traits_type; diff --git a/3party/boost/boost/filesystem/v3/operations.hpp b/3party/boost/boost/filesystem/v3/operations.hpp index cf47c56609..7d1608d76a 100644 --- a/3party/boost/boost/filesystem/v3/operations.hpp +++ b/3party/boost/boost/filesystem/v3/operations.hpp @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -75,8 +76,8 @@ namespace boost fifo_file, socket_file, reparse_file, // Windows: FILE_ATTRIBUTE_REPARSE_POINT that is not a symlink - type_unknown, // file does exist, but isn't one of the above types or - // we don't have strong enough permission to find its type + type_unknown, // file does exist, but isn't one of the above types or + // we don't have strong enough permission to find its type _detail_directory_symlink // internal use only; never exposed to users }; @@ -84,7 +85,8 @@ namespace boost class BOOST_FILESYSTEM_DECL file_status { public: - explicit file_status(file_type v = status_error) : m_value(v) {} + file_status() : m_value(status_error) {} + explicit file_status(file_type v) : m_value(v) {} void type(file_type v) { m_value = v; } file_type type() const { return m_value; } @@ -122,7 +124,7 @@ namespace boost }; BOOST_SCOPED_ENUM_START(copy_option) - {fail_if_exists, overwrite_if_exists}; + {none, fail_if_exists = none, overwrite_if_exists}; BOOST_SCOPED_ENUM_END //--------------------------------------------------------------------------------------// @@ -191,6 +193,8 @@ namespace boost BOOST_FILESYSTEM_DECL path system_complete(const path& p, system::error_code* ec=0); BOOST_FILESYSTEM_DECL + path temp_directory_path(system::error_code* ec=0); + BOOST_FILESYSTEM_DECL path unique_path(const path& p, system::error_code* ec=0); } // namespace detail @@ -258,9 +262,7 @@ namespace boost // forward declarations path current_path(); // fwd declaration -# ifndef BOOST_FILESYSTEM_NO_DEPRECATED path initial_path(); -# endif BOOST_FILESYSTEM_DECL path absolute(const path& p, const path& base=current_path()); @@ -331,17 +333,17 @@ namespace boost void create_directory_symlink(const path& to, const path& from, system::error_code& ec) {detail::create_directory_symlink(to, from, &ec);} inline - void create_hard_link(const path& to, const path& from) {detail::create_hard_link(to, from);} + void create_hard_link(const path& to, const path& new_hard_link) {detail::create_hard_link(to, new_hard_link);} inline - void create_hard_link(const path& to, const path& from, system::error_code& ec) - {detail::create_hard_link(to, from, &ec);} + void create_hard_link(const path& to, const path& new_hard_link, system::error_code& ec) + {detail::create_hard_link(to, new_hard_link, &ec);} inline - void create_symlink(const path& to, const path& from) {detail::create_symlink(to, from);} + void create_symlink(const path& to, const path& new_symlink) {detail::create_symlink(to, new_symlink);} inline - void create_symlink(const path& to, const path& from, system::error_code& ec) - {detail::create_symlink(to, from, &ec);} + void create_symlink(const path& to, const path& new_symlink, system::error_code& ec) + {detail::create_symlink(to, new_symlink, &ec);} inline path current_path() {return detail::current_path();} @@ -372,7 +374,6 @@ namespace boost inline boost::uintmax_t hard_link_count(const path& p, system::error_code& ec) {return detail::hard_link_count(p, &ec);} -# ifndef BOOST_FILESYSTEM_NO_DEPRECATED inline path initial_path() {return detail::initial_path();} @@ -383,7 +384,6 @@ namespace boost path initial_path() {return initial_path();} template path initial_path(system::error_code& ec) {return detail::initial_path(&ec);} -# endif inline std::time_t last_write_time(const path& p) {return detail::last_write_time(p);} @@ -446,6 +446,12 @@ namespace boost path system_complete(const path& p, system::error_code& ec) {return detail::system_complete(p, &ec);} inline + path temp_directory_path() {return detail::temp_directory_path();} + + inline + path temp_directory_path(system::error_code& ec) + {return detail::temp_directory_path(&ec);} + inline path unique_path(const path& p="%%%%-%%%%-%%%%-%%%%") { return detail::unique_path(p); } inline @@ -633,6 +639,17 @@ namespace detail // // //--------------------------------------------------------------------------------------// + BOOST_SCOPED_ENUM_START(symlink_option) + { + none, + no_recurse = none, // don't follow directory symlinks (default behavior) + recurse, // follow directory symlinks + _detail_no_push = recurse << 1 // internal use only + }; + BOOST_SCOPED_ENUM_END + + BOOST_BITMASK(BOOST_SCOPED_ENUM(symlink_option)) + namespace detail { struct recur_dir_itr_imp @@ -640,9 +657,9 @@ namespace detail typedef directory_iterator element_type; std::stack< element_type, std::vector< element_type > > m_stack; int m_level; - bool m_no_push_request; + BOOST_SCOPED_ENUM(symlink_option) m_options; - recur_dir_itr_imp() : m_level(0), m_no_push_request(false) {} + recur_dir_itr_imp() : m_level(0), m_options(symlink_option::none) {} void increment(system::error_code* ec); // ec == 0 means throw on error @@ -658,9 +675,11 @@ namespace detail void recur_dir_itr_imp::increment(system::error_code* ec) // ec == 0 means throw on error { - if (m_no_push_request) - { m_no_push_request = false; } - else if (is_directory(m_stack.top()->status())) + if ((m_options & symlink_option::_detail_no_push) == symlink_option::_detail_no_push) + m_options &= ~symlink_option::_detail_no_push; + else if (is_directory(m_stack.top()->status()) + && (!is_symlink(m_stack.top()->symlink_status()) + || (m_options & symlink_option::recurse) == symlink_option::recurse)) { if (ec == 0) m_stack.push(directory_iterator(m_stack.top()->path())); @@ -714,27 +733,41 @@ namespace detail recursive_directory_iterator(){} // creates the "end" iterator - explicit recursive_directory_iterator(const path& dir_path) + explicit recursive_directory_iterator(const path& dir_path, + BOOST_SCOPED_ENUM(symlink_option) opt = symlink_option::none) : m_imp(new detail::recur_dir_itr_imp) { + m_imp->m_options = opt; m_imp->m_stack.push(directory_iterator(dir_path)); if (m_imp->m_stack.top() == directory_iterator()) { m_imp.reset (); } } + recursive_directory_iterator(const path& dir_path, + BOOST_SCOPED_ENUM(symlink_option) opt, + system::error_code & ec) + : m_imp(new detail::recur_dir_itr_imp) + { + m_imp->m_options = opt; + m_imp->m_stack.push(directory_iterator(dir_path, ec)); + if (m_imp->m_stack.top() == directory_iterator()) + { m_imp.reset (); } + } + recursive_directory_iterator(const path& dir_path, system::error_code & ec) : m_imp(new detail::recur_dir_itr_imp) { + m_imp->m_options = symlink_option::none; m_imp->m_stack.push(directory_iterator(dir_path, ec)); if (m_imp->m_stack.top() == directory_iterator()) { m_imp.reset (); } } - recursive_directory_iterator& increment(system::error_code* ec) + recursive_directory_iterator& increment(system::error_code& ec) { BOOST_ASSERT(m_imp.get() && "increment() on end recursive_directory_iterator"); - m_imp->increment(ec); + m_imp->increment(&ec); return *this; } @@ -744,12 +777,17 @@ namespace detail return m_imp->m_level; } - bool no_push_request() const + bool no_push_pending() const { - BOOST_ASSERT(m_imp.get() && "no_push_request() on end recursive_directory_iterator"); - return m_imp->m_no_push_request; + BOOST_ASSERT(m_imp.get() && "is_no_push_requested() on end recursive_directory_iterator"); + return (m_imp->m_options & symlink_option::_detail_no_push) + == symlink_option::_detail_no_push; } +# ifndef BOOST_FILESYSTEM_NO_DEPRECATED + bool no_push_request() const { return no_push_pending(); } +# endif + void pop() { BOOST_ASSERT(m_imp.get() && "pop() on end recursive_directory_iterator"); @@ -757,10 +795,13 @@ namespace detail if (m_imp->m_stack.empty()) m_imp.reset(); // done, so make end iterator } - void no_push() + void no_push(bool value=true) { BOOST_ASSERT(m_imp.get() && "no_push() on end recursive_directory_iterator"); - m_imp->m_no_push_request = true; + if (value) + m_imp->m_options |= symlink_option::_detail_no_push; + else + m_imp->m_options &= ~symlink_option::_detail_no_push; } file_status status() const @@ -799,7 +840,8 @@ namespace detail { BOOST_ASSERT(m_imp.get() && "increment of end recursive_directory_iterator"); m_imp->increment(0); - if (m_imp->m_stack.empty()) m_imp.reset(); // done, so make end iterator + if (m_imp->m_stack.empty()) + m_imp.reset(); // done, so make end iterator } bool equal(const recursive_directory_iterator& rhs) const @@ -963,6 +1005,7 @@ namespace boost using filesystem3::file_type; using filesystem3::filesystem_error; using filesystem3::hard_link_count; + using filesystem3::initial_path; using filesystem3::is_directory; using filesystem3::is_directory; using filesystem3::is_empty; @@ -973,6 +1016,7 @@ namespace boost using filesystem3::read_symlink; using filesystem3::recursive_directory_iterator; using filesystem3::regular_file; + using filesystem3::reparse_file; using filesystem3::remove; using filesystem3::remove_all; using filesystem3::rename; @@ -984,12 +1028,13 @@ namespace boost using filesystem3::status_error; using filesystem3::status_known; using filesystem3::symlink_file; + using filesystem3::symlink_option; using filesystem3::symlink_status; using filesystem3::system_complete; + using filesystem3::temp_directory_path; using filesystem3::type_unknown; using filesystem3::unique_path; # ifndef BOOST_FILESYSTEM_NO_DEPRECATED - using filesystem3::initial_path; using filesystem3::is_regular; using filesystem3::status_unknown; using filesystem3::symbolic_link_exists; diff --git a/3party/boost/boost/filesystem/v3/path.hpp b/3party/boost/boost/filesystem/v3/path.hpp index 1cd1522656..489836e748 100644 --- a/3party/boost/boost/filesystem/v3/path.hpp +++ b/3party/boost/boost/filesystem/v3/path.hpp @@ -479,7 +479,7 @@ namespace filesystem3 class path::iterator : public boost::iterator_facade< - iterator, + path::iterator, path const, boost::bidirectional_traversal_tag > { diff --git a/3party/boost/boost/functional/hash/detail/hash_float_generic.hpp b/3party/boost/boost/functional/hash/detail/hash_float_generic.hpp index fdbf53fe57..1278c2f626 100644 --- a/3party/boost/boost/functional/hash/detail/hash_float_generic.hpp +++ b/3party/boost/boost/functional/hash/detail/hash_float_generic.hpp @@ -53,7 +53,7 @@ namespace boost v = ldexp(v, limits::digits); std::size_t seed = static_cast(v); - v -= seed; + v -= static_cast(seed); // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1; std::size_t const length @@ -66,7 +66,7 @@ namespace boost { v = ldexp(v, limits::digits); std::size_t part = static_cast(v); - v -= part; + v -= static_cast(part); hash_float_combine(seed, part); } diff --git a/3party/boost/boost/functional/hash/hash.hpp b/3party/boost/boost/functional/hash/hash.hpp index 0eedf7f7f9..51ec8608c8 100644 --- a/3party/boost/boost/functional/hash/hash.hpp +++ b/3party/boost/boost/functional/hash/hash.hpp @@ -24,6 +24,10 @@ #include #endif +#if !defined(BOOST_NO_0X_HDR_TYPEINDEX) +#include +#endif + #if BOOST_WORKAROUND(__GNUC__, < 3) \ && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) #define BOOST_HASH_CHAR_TRAITS string_char_traits @@ -87,6 +91,10 @@ namespace boost std::size_t hash_value( std::basic_string, A> const&); +#if !defined(BOOST_NO_0X_HDR_TYPEINDEX) + std::size_t hash_value(std::type_index); +#endif + // Implementation namespace hash_detail @@ -210,8 +218,8 @@ namespace boost #endif { #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 - // for some reason ptrdiff_t on OpenVMS compiler with - // 64 bit is not 64 bit !!! + // for some reason ptrdiff_t on OpenVMS compiler with + // 64 bit is not 64 bit !!! std::size_t x = static_cast( reinterpret_cast(v)); #else @@ -331,6 +339,13 @@ namespace boost return boost::hash_detail::float_hash_value(v); } +#if !defined(BOOST_NO_0X_HDR_TYPEINDEX) + inline std::size_t hash_value(std::type_index v) + { + return v.hash_code(); + } +#endif + // // boost::hash // @@ -435,6 +450,10 @@ namespace boost BOOST_HASH_SPECIALIZE(boost::ulong_long_type) #endif +#if !defined(BOOST_NO_0X_HDR_TYPEINDEX) + BOOST_HASH_SPECIALIZE(std::type_index) +#endif + #undef BOOST_HASH_SPECIALIZE #undef BOOST_HASH_SPECIALIZE_REF diff --git a/3party/boost/boost/fusion/container/deque/deque.hpp b/3party/boost/boost/fusion/container/deque/deque.hpp index b5c9edd840..c26a226cf4 100644 --- a/3party/boost/boost/fusion/container/deque/deque.hpp +++ b/3party/boost/boost/fusion/container/deque/deque.hpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include diff --git a/3party/boost/boost/fusion/container/deque/detail/is_sequence_impl.hpp b/3party/boost/boost/fusion/container/deque/detail/is_sequence_impl.hpp new file mode 100644 index 0000000000..ff88ed6f2c --- /dev/null +++ b/3party/boost/boost/fusion/container/deque/detail/is_sequence_impl.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_CONTAINER_DEQUE_DETAIL_IS_SEQUENCE_IMPL_HPP +#define BOOST_FUSION_CONTAINER_DEQUE_DETAIL_IS_SEQUENCE_IMPL_HPP + +#include + +namespace boost { namespace fusion +{ + struct deque_tag; + + namespace extension + { + template + struct is_sequence_impl; + + template<> + struct is_sequence_impl + { + template + struct apply + : mpl::true_ + {}; + }; + } +}} + +#endif diff --git a/3party/boost/boost/fusion/container/list/detail/build_cons.hpp b/3party/boost/boost/fusion/container/list/detail/build_cons.hpp index befbd4e9ce..8e6276e6f6 100644 --- a/3party/boost/boost/fusion/container/list/detail/build_cons.hpp +++ b/3party/boost/boost/fusion/container/list/detail/build_cons.hpp @@ -48,7 +48,8 @@ namespace boost { namespace fusion { namespace detail static type call(First const& f, Last const& l) { - return type(*f, next_build_cons::call(fusion::next(f), l)); + typename result_of::deref::type v = *f; + return type(v, next_build_cons::call(fusion::next(f), l)); } }; diff --git a/3party/boost/boost/fusion/container/vector/detail/vector_n.hpp b/3party/boost/boost/fusion/container/vector/detail/vector_n.hpp index ea314ac28e..33484c5da7 100644 --- a/3party/boost/boost/fusion/container/vector/detail/vector_n.hpp +++ b/3party/boost/boost/fusion/container/vector/detail/vector_n.hpp @@ -36,8 +36,8 @@ #define N BOOST_PP_ITERATION() - template - struct BOOST_PP_CAT(vector_data, N) : sequence_base + template + struct BOOST_PP_CAT(vector_data, N) { BOOST_PP_CAT(vector_data, N)() : BOOST_PP_ENUM(N, FUSION_MEMBER_DEFAULT_INIT, _) {} @@ -73,12 +73,11 @@ template struct BOOST_PP_CAT(vector, N) - : BOOST_PP_CAT(vector_data, N)< - BOOST_PP_CAT(vector, N) - , BOOST_PP_ENUM_PARAMS(N, T)> + : BOOST_PP_CAT(vector_data, N) + , sequence_base > { typedef BOOST_PP_CAT(vector, N) this_type; - typedef BOOST_PP_CAT(vector_data, N) base_type; + typedef BOOST_PP_CAT(vector_data, N) base_type; typedef mpl::BOOST_PP_CAT(vector, N) types; typedef vector_tag fusion_tag; typedef fusion_sequence_tag tag; // this gets picked up by MPL diff --git a/3party/boost/boost/fusion/include/make_unfused.hpp b/3party/boost/boost/fusion/include/make_unfused.hpp new file mode 100644 index 0000000000..ae3b667928 --- /dev/null +++ b/3party/boost/boost/fusion/include/make_unfused.hpp @@ -0,0 +1,13 @@ +/*============================================================================== + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_MAKE_UNFUSED_HPP +#define BOOST_FUSION_INCLUDE_MAKE_UNFUSED_HPP + +#include + +#endif diff --git a/3party/boost/boost/fusion/include/unfused.hpp b/3party/boost/boost/fusion/include/unfused.hpp new file mode 100644 index 0000000000..e386ce5a7b --- /dev/null +++ b/3party/boost/boost/fusion/include/unfused.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2010 Christopher Schmidt + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_INCLUDE_UNFUSED_HPP +#define BOOST_FUSION_INCLUDE_UNFUSED_HPP + +#include + +#endif diff --git a/3party/boost/boost/fusion/sequence/comparison/enable_comparison.hpp b/3party/boost/boost/fusion/sequence/comparison/enable_comparison.hpp new file mode 100644 index 0000000000..d7d9538342 --- /dev/null +++ b/3party/boost/boost/fusion/sequence/comparison/enable_comparison.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_ENABLE_COMPARISON_09232005_1958) +#define FUSION_ENABLE_COMPARISON_09232005_1958 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace traits +{ + template + struct enable_equality + : mpl::or_, traits::is_sequence > + {}; + + template + struct enable_comparison + : mpl::and_< + mpl::or_, traits::is_sequence > + , mpl::equal_to, result_of::size > + > + {}; +}}} + +#endif diff --git a/3party/boost/boost/fusion/sequence/comparison/equal_to.hpp b/3party/boost/boost/fusion/sequence/comparison/equal_to.hpp index 0c8a37e40f..67040cbeda 100644 --- a/3party/boost/boost/fusion/sequence/comparison/equal_to.hpp +++ b/3party/boost/boost/fusion/sequence/comparison/equal_to.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2006 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_EQUAL_TO_05052005_0431) @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #if defined (BOOST_MSVC) @@ -38,7 +38,7 @@ namespace boost { namespace fusion template inline typename enable_if< - detail::enable_equality + traits::enable_equality , bool >::type operator==(Seq1 const& a, Seq2 const& b) diff --git a/3party/boost/boost/fusion/sequence/comparison/greater.hpp b/3party/boost/boost/fusion/sequence/comparison/greater.hpp index 8df806e424..7579c8872a 100644 --- a/3party/boost/boost/fusion/sequence/comparison/greater.hpp +++ b/3party/boost/boost/fusion/sequence/comparison/greater.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2006 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_GREATER_05052005_0432) @@ -11,7 +11,7 @@ #include #include #include -#include +#include #if defined(FUSION_DIRECT_OPERATOR_USAGE) #include @@ -38,7 +38,7 @@ namespace boost { namespace fusion template inline typename enable_if< - detail::enable_comparison + traits::enable_comparison , bool >::type operator>(Seq1 const& a, Seq2 const& b) diff --git a/3party/boost/boost/fusion/sequence/comparison/greater_equal.hpp b/3party/boost/boost/fusion/sequence/comparison/greater_equal.hpp index 3a20e0e812..dc7df230f1 100644 --- a/3party/boost/boost/fusion/sequence/comparison/greater_equal.hpp +++ b/3party/boost/boost/fusion/sequence/comparison/greater_equal.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2006 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_GREATER_EQUAL_05052005_0432) @@ -11,7 +11,7 @@ #include #include #include -#include +#include #if defined(FUSION_DIRECT_OPERATOR_USAGE) #include @@ -38,7 +38,7 @@ namespace boost { namespace fusion template inline typename enable_if< - detail::enable_comparison + traits::enable_comparison , bool >::type operator>=(Seq1 const& a, Seq2 const& b) diff --git a/3party/boost/boost/fusion/sequence/comparison/less.hpp b/3party/boost/boost/fusion/sequence/comparison/less.hpp index a86c35171f..4022625ab5 100644 --- a/3party/boost/boost/fusion/sequence/comparison/less.hpp +++ b/3party/boost/boost/fusion/sequence/comparison/less.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2006 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_LESS_05052005_0432) @@ -12,7 +12,7 @@ #include #include #include -#include +#include namespace boost { namespace fusion { @@ -29,7 +29,7 @@ namespace boost { namespace fusion template inline typename enable_if< - detail::enable_comparison + traits::enable_comparison , bool >::type operator<(Seq1 const& a, Seq2 const& b) diff --git a/3party/boost/boost/fusion/sequence/comparison/less_equal.hpp b/3party/boost/boost/fusion/sequence/comparison/less_equal.hpp index 518e1c0fd0..6e940a21b3 100644 --- a/3party/boost/boost/fusion/sequence/comparison/less_equal.hpp +++ b/3party/boost/boost/fusion/sequence/comparison/less_equal.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2006 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_LESS_EQUAL_05052005_0432) @@ -11,7 +11,8 @@ #include #include #include -#include +#include +#include #if defined(FUSION_DIRECT_OPERATOR_USAGE) #include @@ -35,7 +36,7 @@ namespace boost { namespace fusion namespace operators { -#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1400) +#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1400) // Workaround for VC8.0 and VC7.1 template inline bool @@ -60,12 +61,12 @@ namespace boost { namespace fusion #else // Somehow VC8.0 and VC7.1 does not like this code -// but barfs somewhere else. +// but barfs somewhere else. template inline typename enable_if< - detail::enable_comparison + traits::enable_comparison , bool >::type operator<=(Seq1 const& a, Seq2 const& b) diff --git a/3party/boost/boost/fusion/sequence/comparison/not_equal_to.hpp b/3party/boost/boost/fusion/sequence/comparison/not_equal_to.hpp index 54648e1601..1b516a15c0 100644 --- a/3party/boost/boost/fusion/sequence/comparison/not_equal_to.hpp +++ b/3party/boost/boost/fusion/sequence/comparison/not_equal_to.hpp @@ -2,7 +2,7 @@ Copyright (c) 1999-2003 Jaakko Jarvi Copyright (c) 2001-2006 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_NOT_EQUAL_TO_05052005_0431) @@ -11,7 +11,7 @@ #include #include #include -#include +#include #if defined(FUSION_DIRECT_OPERATOR_USAGE) #include @@ -41,7 +41,7 @@ namespace boost { namespace fusion template inline typename enable_if< - detail::enable_equality + traits::enable_equality , bool >::type operator!=(Seq1 const& a, Seq2 const& b) diff --git a/3party/boost/boost/fusion/sequence/intrinsic/begin.hpp b/3party/boost/boost/fusion/sequence/intrinsic/begin.hpp index 5dbe0c408d..c9ece3abfa 100644 --- a/3party/boost/boost/fusion/sequence/intrinsic/begin.hpp +++ b/3party/boost/boost/fusion/sequence/intrinsic/begin.hpp @@ -8,6 +8,8 @@ #define FUSION_BEGIN_04052005_1132 #include +#include +#include namespace boost { namespace fusion { @@ -57,14 +59,22 @@ namespace boost { namespace fusion } template - inline typename result_of::begin::type const + inline typename + lazy_enable_if< + traits::is_sequence + , result_of::begin + >::type const begin(Sequence& seq) { return result_of::begin::call(seq); } template - inline typename result_of::begin::type const + inline typename + lazy_enable_if< + traits::is_sequence + , result_of::begin + >::type const begin(Sequence const& seq) { return result_of::begin::call(seq); diff --git a/3party/boost/boost/fusion/sequence/intrinsic/end.hpp b/3party/boost/boost/fusion/sequence/intrinsic/end.hpp index 98a554e307..02476710cf 100644 --- a/3party/boost/boost/fusion/sequence/intrinsic/end.hpp +++ b/3party/boost/boost/fusion/sequence/intrinsic/end.hpp @@ -8,6 +8,8 @@ #define FUSION_END_04052005_1141 #include +#include +#include namespace boost { namespace fusion { @@ -57,14 +59,22 @@ namespace boost { namespace fusion } template - inline typename result_of::end::type const + inline typename + lazy_enable_if< + traits::is_sequence + , result_of::end + >::type const end(Sequence& seq) { return result_of::end::call(seq); } template - inline typename result_of::end::type const + inline typename + lazy_enable_if< + traits::is_sequence + , result_of::end + >::type const end(Sequence const& seq) { return result_of::end::call(seq); diff --git a/3party/boost/boost/fusion/support/detail/is_mpl_sequence.hpp b/3party/boost/boost/fusion/support/detail/is_mpl_sequence.hpp index eeb8f91617..b7e792b395 100644 --- a/3party/boost/boost/fusion/support/detail/is_mpl_sequence.hpp +++ b/3party/boost/boost/fusion/support/detail/is_mpl_sequence.hpp @@ -9,17 +9,17 @@ #define FUSION_DETAIL_IS_MPL_SEQUENCE_29122006_1105 #include -#include #include #include #include +#include namespace boost { namespace fusion { namespace detail { template struct is_mpl_sequence : mpl::and_< - mpl::not_ > + mpl::not_ > , mpl::is_sequence > {}; }}} diff --git a/3party/boost/boost/fusion/support/is_sequence.hpp b/3party/boost/boost/fusion/support/is_sequence.hpp index d57cecb410..f57ca23b96 100644 --- a/3party/boost/boost/fusion/support/is_sequence.hpp +++ b/3party/boost/boost/fusion/support/is_sequence.hpp @@ -1,18 +1,19 @@ /*============================================================================= Copyright (c) 2001-2006 Joel de Guzman - Distributed under the Boost Software License, Version 1.0. (See accompanying + Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_IS_SEQUENCE_05052005_1002) #define FUSION_IS_SEQUENCE_05052005_1002 -#include #include #include #include #include #include +#include +#include namespace boost { namespace fusion { @@ -29,7 +30,9 @@ namespace boost { namespace fusion struct is_sequence_impl { template - struct apply : is_base_of {}; + struct apply + : is_convertible + {}; }; template <> @@ -60,6 +63,11 @@ namespace boost { namespace fusion typename fusion::detail::tag_of::type >::template apply {}; + + template + struct is_native_fusion_sequence + : is_convertible + {}; } }} diff --git a/3party/boost/boost/fusion/support/sequence_base.hpp b/3party/boost/boost/fusion/support/sequence_base.hpp index 1d436ef165..9a5186df78 100644 --- a/3party/boost/boost/fusion/support/sequence_base.hpp +++ b/3party/boost/boost/fusion/support/sequence_base.hpp @@ -12,10 +12,14 @@ namespace boost { namespace fusion { - struct sequence_root {}; + namespace detail + { + struct from_sequence_convertible_type + {}; + } template - struct sequence_base : sequence_root + struct sequence_base { Sequence const& derived() const @@ -28,6 +32,11 @@ namespace boost { namespace fusion { return static_cast(*this); } + + operator detail::from_sequence_convertible_type()const + { + return detail::from_sequence_convertible_type(); + } }; struct fusion_sequence_tag; diff --git a/3party/boost/boost/gil/extension/io/png_dynamic_io.hpp b/3party/boost/boost/gil/extension/io/png_dynamic_io.hpp index 3545da8eff..a3a25a97f4 100644 --- a/3party/boost/boost/gil/extension/io/png_dynamic_io.hpp +++ b/3party/boost/boost/gil/extension/io/png_dynamic_io.hpp @@ -88,7 +88,7 @@ public: int bit_depth, color_type, interlace_type; png_get_IHDR(_png_ptr, _info_ptr, &width, &height,&bit_depth,&color_type,&interlace_type, - int_p_NULL, int_p_NULL); + NULL, NULL); if (!construct_matched(im,png_type_format_checker(bit_depth,color_type))) { io_error("png_reader_dynamic::read_image(): no matching image type between those of the given any_image and that of the file"); } else { diff --git a/3party/boost/boost/gil/extension/io/png_io_private.hpp b/3party/boost/boost/gil/extension/io/png_io_private.hpp index 0f8d29822c..a0ee57be55 100644 --- a/3party/boost/boost/gil/extension/io/png_io_private.hpp +++ b/3party/boost/boost/gil/extension/io/png_io_private.hpp @@ -152,12 +152,12 @@ protected: // allocate/initialize the image information data _info_ptr = png_create_info_struct(_png_ptr); if (_info_ptr == NULL) { - png_destroy_read_struct(&_png_ptr,png_infopp_NULL,png_infopp_NULL); + png_destroy_read_struct(&_png_ptr,NULL,NULL); io_error("png_get_file_size: fail to call png_create_info_struct()"); } if (setjmp(png_jmpbuf(_png_ptr))) { //free all of the memory associated with the png_ptr and info_ptr - png_destroy_read_struct(&_png_ptr, &_info_ptr, png_infopp_NULL); + png_destroy_read_struct(&_png_ptr, &_info_ptr, NULL); io_error("png_get_file_size: fail to call setjmp()"); } png_init_io(_png_ptr, get()); @@ -171,7 +171,7 @@ public: png_reader(const char* filename) : file_mgr(filename, "rb") { init(); } ~png_reader() { - png_destroy_read_struct(&_png_ptr,&_info_ptr,png_infopp_NULL); + png_destroy_read_struct(&_png_ptr,&_info_ptr,NULL); } point2 get_dimensions() { return point2(png_get_image_width(_png_ptr,_info_ptr), @@ -183,7 +183,7 @@ public: int bit_depth, color_type, interlace_type; png_get_IHDR(_png_ptr, _info_ptr, &width, &height,&bit_depth,&color_type,&interlace_type, - int_p_NULL, int_p_NULL); + NULL, NULL); io_error_if(((png_uint_32)view.width()!=width || (png_uint_32)view.height()!= height), "png_read_view: input view size does not match PNG file size"); @@ -314,7 +314,7 @@ protected: io_error_if(!_png_ptr,"png_write_initialize: fail to call png_create_write_struct()"); _info_ptr = png_create_info_struct(_png_ptr); if (!_info_ptr) { - png_destroy_write_struct(&_png_ptr,png_infopp_NULL); + png_destroy_write_struct(&_png_ptr,NULL); io_error("png_write_initialize: fail to call png_create_info_struct()"); } if (setjmp(png_jmpbuf(_png_ptr))) { diff --git a/3party/boost/boost/gil/extension/io/tiff_io.hpp b/3party/boost/boost/gil/extension/io/tiff_io.hpp index 0fe0025537..4198a3f984 100644 --- a/3party/boost/boost/gil/extension/io/tiff_io.hpp +++ b/3party/boost/boost/gil/extension/io/tiff_io.hpp @@ -122,9 +122,13 @@ class tiff_reader { protected: TIFF *_tp; public: - tiff_reader(const char* filename) { + tiff_reader(const char* filename,tdir_t dirnum=0) { io_error_if((_tp=TIFFOpen(filename,"r"))==NULL, "tiff_reader: fail to open file"); + if(dirnum>0) { + io_error_if(TIFFSetDirectory(_tp,dirnum)!=1, + "tiff_reader: fail to set directory"); + } } ~tiff_reader() { TIFFClose(_tp); } template @@ -171,10 +175,10 @@ class tiff_reader_color_convert : public tiff_reader { private: CC _cc; public: - tiff_reader_color_convert(const char* filename) : - tiff_reader(filename) {} - tiff_reader_color_convert(const char* filename,CC cc_in) : - tiff_reader(filename),_cc(cc_in) {} + tiff_reader_color_convert(const char* filename,tdir_t dirnum=0) : + tiff_reader(filename,dirnum) {} + tiff_reader_color_convert(const char* filename,CC cc_in,tdir_t dirnum=0) : + tiff_reader(filename,dirnum),_cc(cc_in) {} template void apply(const View& view) { point2 dims=get_dimensions(); @@ -335,19 +339,35 @@ struct tiff_read_support { typename color_space_type::type>::color_type)); }; +/// \ingroup TIFF_IO +/// \brief Returns the number of directories in the TIFF file +inline int tiff_get_directory_count(const char* filename) { + TIFF *tif; + io_error_if((tif=TIFFOpen(filename,"r"))==NULL, + "tiff_get_count: fail to open file"); + + int dircount = 0; + do { + dircount++; + } while (TIFFReadDirectory(tif)); + + TIFFClose(tif); + return dircount; +} + /// \ingroup TIFF_IO /// \brief Returns the width and height of the TIFF file at the specified location. /// Throws std::ios_base::failure if the location does not correspond to a valid TIFF file -inline point2 tiff_read_dimensions(const char* filename) { - detail::tiff_reader m(filename); +inline point2 tiff_read_dimensions(const char* filename,tdir_t dirnum=0) { + detail::tiff_reader m(filename,dirnum); return m.get_dimensions(); } /// \ingroup TIFF_IO /// \brief Returns the width and height of the TIFF file at the specified location. /// Throws std::ios_base::failure if the location does not correspond to a valid TIFF file -inline point2 tiff_read_dimensions(const std::string& filename) { - return tiff_read_dimensions(filename.c_str()); +inline point2 tiff_read_dimensions(const std::string& filename,tdir_t dirnum=0) { + return tiff_read_dimensions(filename.c_str(),dirnum); } /// \ingroup TIFF_IO @@ -356,17 +376,17 @@ inline point2 tiff_read_dimensions(const std::string& filename) /// Throws std::ios_base::failure if the file is not a valid TIFF file, or if its color space or channel depth are not /// compatible with the ones specified by View, or if its dimensions don't match the ones of the view. template -inline void tiff_read_view(const char* filename,const View& view) { +inline void tiff_read_view(const char* filename,const View& view,tdir_t dirnum=0) { BOOST_STATIC_ASSERT(tiff_read_support::is_supported); - detail::tiff_reader m(filename); + detail::tiff_reader m(filename,dirnum); m.apply(view); } /// \ingroup TIFF_IO /// \brief Loads the image specified by the given tiff image file name into the given view. template -inline void tiff_read_view(const std::string& filename,const View& view) { - tiff_read_view(filename.c_str(),view); +inline void tiff_read_view(const std::string& filename,const View& view,tdir_t dirnum=0) { + tiff_read_view(filename.c_str(),view,dirnum); } /// \ingroup TIFF_IO @@ -375,25 +395,25 @@ inline void tiff_read_view(const std::string& filename,const View& view) { /// Throws std::ios_base::failure if the file is not a valid TIFF file, or if its color space or channel depth are not /// compatible with the ones specified by Image template -void tiff_read_image(const char* filename,Image& im) { +void tiff_read_image(const char* filename,Image& im,tdir_t dirnum=0) { BOOST_STATIC_ASSERT(tiff_read_support::is_supported); - detail::tiff_reader m(filename); + detail::tiff_reader m(filename,dirnum); m.read_image(im); } /// \ingroup TIFF_IO /// \brief Allocates a new image whose dimensions are determined by the given tiff image file, and loads the pixels into it. template -inline void tiff_read_image(const std::string& filename,Image& im) { - tiff_read_image(filename.c_str(),im); +inline void tiff_read_image(const std::string& filename,Image& im,tdir_t dirnum=0) { + tiff_read_image(filename.c_str(),im,dirnum); } /// \ingroup TIFF_IO /// \brief Loads and color-converts the image specified by the given tiff image file name into the given view. /// Throws std::ios_base::failure if the file is not a valid TIFF file, or if its dimensions don't match the ones of the view. template -inline void tiff_read_and_convert_view(const char* filename,const View& view,CC cc) { - detail::tiff_reader_color_convert m(filename,cc); +inline void tiff_read_and_convert_view(const char* filename,const View& view,CC cc,tdir_t dirnum=0) { + detail::tiff_reader_color_convert m(filename,cc,dirnum); m.apply(view); } @@ -401,31 +421,31 @@ inline void tiff_read_and_convert_view(const char* filename,const View& view,CC /// \brief Loads and color-converts the image specified by the given tiff image file name into the given view. /// Throws std::ios_base::failure if the file is not a valid TIFF file, or if its dimensions don't match the ones of the view. template -inline void tiff_read_and_convert_view(const char* filename,const View& view) { - detail::tiff_reader_color_convert m(filename,default_color_converter()); +inline void tiff_read_and_convert_view(const char* filename,const View& view,tdir_t dirnum=0) { + detail::tiff_reader_color_convert m(filename,default_color_converter(),dirnum); m.apply(view); } /// \ingroup TIFF_IO /// \brief Loads and color-converts the image specified by the given tiff image file name into the given view. template -inline void tiff_read_and_convert_view(const std::string& filename,const View& view,CC cc) { - tiff_read_and_convert_view(filename.c_str(),view,cc); +inline void tiff_read_and_convert_view(const std::string& filename,const View& view,CC cc,tdir_t dirnum=0) { + tiff_read_and_convert_view(filename.c_str(),view,cc,dirnum); } /// \ingroup TIFF_IO /// \brief Loads and color-converts the image specified by the given tiff image file name into the given view. template -inline void tiff_read_and_convert_view(const std::string& filename,const View& view) { - tiff_read_and_convert_view(filename.c_str(),view); +inline void tiff_read_and_convert_view(const std::string& filename,const View& view,tdir_t dirnum=0) { + tiff_read_and_convert_view(filename.c_str(),view,dirnum); } /// \ingroup TIFF_IO /// \brief Allocates a new image whose dimensions are determined by the given tiff image file, loads and color-converts the pixels into it. /// Throws std::ios_base::failure if the file is not a valid TIFF file template -void tiff_read_and_convert_image(const char* filename,Image& im,CC cc) { - detail::tiff_reader_color_convert m(filename,cc); +void tiff_read_and_convert_image(const char* filename,Image& im,CC cc,tdir_t dirnum=0) { + detail::tiff_reader_color_convert m(filename,cc,dirnum); m.read_image(im); } @@ -433,23 +453,23 @@ void tiff_read_and_convert_image(const char* filename,Image& im,CC cc) { /// \brief Allocates a new image whose dimensions are determined by the given tiff image file, loads and color-converts the pixels into it. /// Throws std::ios_base::failure if the file is not a valid TIFF file template -void tiff_read_and_convert_image(const char* filename,Image& im) { - detail::tiff_reader_color_convert m(filename,default_color_converter()); +void tiff_read_and_convert_image(const char* filename,Image& im,tdir_t dirnum=0) { + detail::tiff_reader_color_convert m(filename,default_color_converter(),dirnum); m.read_image(im); } /// \ingroup TIFF_IO /// \brief Allocates a new image whose dimensions are determined by the given tiff image file, loads and color-converts the pixels into it. template -inline void tiff_read_and_convert_image(const std::string& filename,Image& im,CC cc) { - tiff_read_and_convert_image(filename.c_str(),im,cc); +inline void tiff_read_and_convert_image(const std::string& filename,Image& im,CC cc,tdir_t dirnum=0) { + tiff_read_and_convert_image(filename.c_str(),im,cc,dirnum); } /// \ingroup TIFF_IO /// \brief Allocates a new image whose dimensions are determined by the given tiff image file, loads and color-converts the pixels into it. template -inline void tiff_read_and_convert_image(const std::string& filename,Image& im) { - tiff_read_and_convert_image(filename.c_str(),im); +inline void tiff_read_and_convert_image(const std::string& filename,Image& im,tdir_t dirnum=0) { + tiff_read_and_convert_image(filename.c_str(),im,dirnum); } /// \ingroup TIFF_IO diff --git a/3party/boost/boost/graph/adjacency_matrix.hpp b/3party/boost/boost/graph/adjacency_matrix.hpp index 6fb1f48651..47d8d5f28a 100644 --- a/3party/boost/boost/graph/adjacency_matrix.hpp +++ b/3party/boost/boost/graph/adjacency_matrix.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -982,7 +982,7 @@ namespace boost { inline typename adjacency_matrix::vertex_descriptor add_vertex(adjacency_matrix& g) { // UNDER CONSTRUCTION - assert(false); + BOOST_ASSERT(false); return *vertices(g).first; } @@ -991,7 +991,7 @@ namespace boost { inline typename adjacency_matrix::vertex_descriptor add_vertex(const VP2& /*vp*/, adjacency_matrix& g) { // UNDER CONSTRUCTION - assert(false); + BOOST_ASSERT(false); return *vertices(g).first; } @@ -1001,7 +1001,7 @@ namespace boost { adjacency_matrix& /*g*/) { // UNDER CONSTRUCTION - assert(false); + BOOST_ASSERT(false); } // O(V) diff --git a/3party/boost/boost/graph/bipartite.hpp b/3party/boost/boost/graph/bipartite.hpp index f902fd3e7a..b917c607e7 100644 --- a/3party/boost/boost/graph/bipartite.hpp +++ b/3party/boost/boost/graph/bipartite.hpp @@ -212,8 +212,6 @@ namespace boost { depth_first_search (graph, vertex_index_map (index_map).visitor (make_dfs_visitor (std::make_pair ( detail::colorize_bipartition (partition_map), std::make_pair (detail::check_bipartition (partition_map), put_property (partition_map, color_traits ::white (), on_start_vertex ())))))); - - // depth_first_search (graph, vertex_index_map (index_map).visitor (dfs_visitor)); } catch (detail::bipartite_visitor_error error) { @@ -284,11 +282,9 @@ namespace boost { typedef std::vector predecessors_t; typedef iterator_property_map predecessor_map_t; - typedef predecessor_recorder predecessor_recorder_t; predecessors_t predecessors (num_vertices (graph), graph_traits ::null_vertex ()); predecessor_map_t predecessor_map (predecessors.begin (), index_map); - predecessor_recorder_t predecessor_recorder (predecessor_map); /// Initialize predecessor map for (boost::tie (vertex_iter, vertex_end) = vertices (graph); vertex_iter != vertex_end; ++vertex_iter) diff --git a/3party/boost/boost/graph/boykov_kolmogorov_max_flow.hpp b/3party/boost/boost/graph/boykov_kolmogorov_max_flow.hpp index 8559bd771d..6a4c4482fe 100644 --- a/3party/boost/boost/graph/boykov_kolmogorov_max_flow.hpp +++ b/3party/boost/boost/graph/boykov_kolmogorov_max_flow.hpp @@ -33,7 +33,7 @@ #define BOOST_BOYKOV_KOLMOGOROV_MAX_FLOW_HPP #include -#include +#include #include #include #include @@ -126,7 +126,7 @@ class bk_max_flow { edge_iterator ei, e_end; for(boost::tie(ei, e_end) = edges(m_g); ei != e_end; ++ei) { m_res_cap_map[*ei] = m_cap_map[*ei]; - assert(m_rev_edge_map[m_rev_edge_map[*ei]] == *ei); //check if the reverse edge map is build up properly + BOOST_ASSERT(m_rev_edge_map[m_rev_edge_map[*ei]] == *ei); //check if the reverse edge map is build up properly } //init the search trees with the two terminals set_tree(m_source, tColorTraits::black()); @@ -235,13 +235,13 @@ class bk_max_flow { * target(returnVal, m_g) is the beginning of the path found in the sink-tree */ std::pair grow(){ - assert(m_orphans.empty()); + BOOST_ASSERT(m_orphans.empty()); vertex_descriptor current_node; while((current_node = get_next_active_node()) != graph_traits::null_vertex()){ //if there is one - assert(get_tree(current_node) != tColorTraits::gray() && - (has_parent(current_node) || - current_node == m_source || - current_node == m_sink)); + BOOST_ASSERT(get_tree(current_node) != tColorTraits::gray() && + (has_parent(current_node) || + current_node == m_source || + current_node == m_sink)); if(get_tree(current_node) == tColorTraits::black()){ //source tree growing @@ -269,7 +269,7 @@ class bk_max_flow { m_time_map[other_node] = m_time_map[current_node]; } } else{ - assert(get_tree(other_node)==tColorTraits::white()); + BOOST_ASSERT(get_tree(other_node)==tColorTraits::white()); //kewl, found a path from one to the other search tree, return // the connecting edge in src->sink dir return std::make_pair(out_edge, true); @@ -278,7 +278,7 @@ class bk_max_flow { } //for all out-edges } //source-tree-growing else{ - assert(get_tree(current_node) == tColorTraits::white()); + BOOST_ASSERT(get_tree(current_node) == tColorTraits::white()); out_edge_iterator ei, e_end; if(current_node != m_last_grow_vertex){ m_last_grow_vertex = current_node; @@ -302,7 +302,7 @@ class bk_max_flow { m_time_map[other_node] = m_time_map[current_node]; } } else{ - assert(get_tree(other_node)==tColorTraits::black()); + BOOST_ASSERT(get_tree(other_node)==tColorTraits::black()); //kewl, found a path from one to the other search tree, // return the connecting edge in src->sink dir return std::make_pair(in_edge, true); @@ -332,16 +332,16 @@ class bk_max_flow { * and so we process the nearest verts to the terminals first */ void augment(edge_descriptor e) { - assert(get_tree(target(e, m_g)) == tColorTraits::white()); - assert(get_tree(source(e, m_g)) == tColorTraits::black()); - assert(m_orphans.empty()); + BOOST_ASSERT(get_tree(target(e, m_g)) == tColorTraits::white()); + BOOST_ASSERT(get_tree(source(e, m_g)) == tColorTraits::black()); + BOOST_ASSERT(m_orphans.empty()); const tEdgeVal bottleneck = find_bottleneck(e); //now we push the found flow through the path //for each edge we saturate we have to look for the verts that belong to that edge, one of them becomes an orphans //now process the connecting edge m_res_cap_map[e] -= bottleneck; - assert(m_res_cap_map[e] >= 0); + BOOST_ASSERT(m_res_cap_map[e] >= 0); m_res_cap_map[m_rev_edge_map[e]] += bottleneck; //now we follow the path back to the source @@ -349,7 +349,7 @@ class bk_max_flow { while(current_node != m_source){ edge_descriptor pred = get_edge_to_parent(current_node); m_res_cap_map[pred] -= bottleneck; - assert(m_res_cap_map[pred] >= 0); + BOOST_ASSERT(m_res_cap_map[pred] >= 0); m_res_cap_map[m_rev_edge_map[pred]] += bottleneck; if(m_res_cap_map[pred] == 0){ set_no_parent(current_node); @@ -362,7 +362,7 @@ class bk_max_flow { while(current_node != m_sink){ edge_descriptor pred = get_edge_to_parent(current_node); m_res_cap_map[pred] -= bottleneck; - assert(m_res_cap_map[pred] >= 0); + BOOST_ASSERT(m_res_cap_map[pred] >= 0); m_res_cap_map[m_rev_edge_map[pred]] += bottleneck; if(m_res_cap_map[pred] == 0){ set_no_parent(current_node); @@ -421,7 +421,7 @@ class bk_max_flow { out_edge_iterator ei, e_end; for(boost::tie(ei, e_end) = out_edges(current_node, m_g); ei != e_end; ++ei){ const edge_descriptor in_edge = m_rev_edge_map[*ei]; - assert(target(in_edge, m_g) == current_node); //we should be the target of this edge + BOOST_ASSERT(target(in_edge, m_g) == current_node); //we should be the target of this edge if(m_res_cap_map[in_edge] > 0){ vertex_descriptor other_node = source(in_edge, m_g); if(get_tree(other_node) == tColorTraits::black() && has_source_connect(other_node)){ @@ -458,7 +458,7 @@ class bk_max_flow { } //source-tree-adoption else{ //now we should be in the sink-tree, check that... - assert(get_tree(current_node) == tColorTraits::white()); + BOOST_ASSERT(get_tree(current_node) == tColorTraits::white()); out_edge_iterator ei, e_end; edge_descriptor new_parent_edge; tDistanceVal min_distance = (std::numeric_limits::max)(); @@ -513,7 +513,7 @@ class bk_max_flow { m_active_nodes.pop(); m_in_active_list_map[v] = false; } else{ - assert(get_tree(v) == tColorTraits::black() || get_tree(v) == tColorTraits::white()); + BOOST_ASSERT(get_tree(v) == tColorTraits::black() || get_tree(v) == tColorTraits::white()); return v; } } @@ -523,7 +523,7 @@ class bk_max_flow { * adds v as an active vertex, but only if its not in the list already */ inline void add_active_node(vertex_descriptor v){ - assert(get_tree(v) != tColorTraits::gray()); + BOOST_ASSERT(get_tree(v) != tColorTraits::gray()); if(m_in_active_list_map[v]){ return; } else{ @@ -536,7 +536,7 @@ class bk_max_flow { * finish_node removes a node from the front of the active queue (its called in grow phase, if no more paths can be found using this node) */ inline void finish_node(vertex_descriptor v){ - assert(m_active_nodes.front() == v); + BOOST_ASSERT(m_active_nodes.front() == v); m_active_nodes.pop(); m_in_active_list_map[v] = false; m_last_grow_vertex = graph_traits::null_vertex(); @@ -548,7 +548,7 @@ class bk_max_flow { * being no more active) */ inline void remove_active_node(vertex_descriptor v){ - assert(!has_parent(v)); + BOOST_ASSERT(!has_parent(v)); } /** @@ -585,7 +585,7 @@ class bk_max_flow { * sets edge to parent vertex of v; */ inline void set_edge_to_parent(vertex_descriptor v, edge_descriptor f_edge_to_parent){ - assert(m_res_cap_map[f_edge_to_parent] > 0); + BOOST_ASSERT(m_res_cap_map[f_edge_to_parent] > 0); m_pre_map[v] = f_edge_to_parent; m_has_parent_map[v] = true; } @@ -750,7 +750,7 @@ boykov_kolmogorov_max_flow(Graph& g, function_requires >(); //write corresponding tree function_requires >(); //write distance to source/sink function_requires >(); //get index 0...|V|-1 - assert(num_vertices(g) >= 2 && src != sink); + BOOST_ASSERT(num_vertices(g) >= 2 && src != sink); detail::bk_max_flow< Graph, CapacityEdgeMap, ResidualCapacityEdgeMap, ReverseEdgeMap, diff --git a/3party/boost/boost/graph/clustering_coefficient.hpp b/3party/boost/boost/graph/clustering_coefficient.hpp index 15574f0415..d897d94b54 100644 --- a/3party/boost/boost/graph/clustering_coefficient.hpp +++ b/3party/boost/boost/graph/clustering_coefficient.hpp @@ -37,8 +37,8 @@ namespace detail template inline typename graph_traits::degree_size_type count_edges(const Graph& g, - typename Graph::vertex_descriptor u, - typename Graph::vertex_descriptor v, + typename graph_traits::vertex_descriptor u, + typename graph_traits::vertex_descriptor v, directed_tag) { @@ -51,8 +51,8 @@ namespace detail template inline typename graph_traits::degree_size_type count_edges(const Graph& g, - typename Graph::vertex_descriptor u, - typename Graph::vertex_descriptor v, + typename graph_traits::vertex_descriptor u, + typename graph_traits::vertex_descriptor v, undirected_tag) { function_requires< AdjacencyMatrixConcept >(); diff --git a/3party/boost/boost/graph/compressed_sparse_row_graph.hpp b/3party/boost/boost/graph/compressed_sparse_row_graph.hpp index 9b5a4d52ce..caa27a9060 100644 --- a/3party/boost/boost/graph/compressed_sparse_row_graph.hpp +++ b/3party/boost/boost/graph/compressed_sparse_row_graph.hpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #if 0 #include // For some debugging code below @@ -1342,7 +1342,7 @@ inline typename BOOST_CSR_GRAPH_TYPE::edge_descriptor edge_from_index(EdgeIndex idx, const BOOST_CSR_GRAPH_TYPE& g) { typedef typename std::vector::const_iterator row_start_iter; - assert (idx < num_edges(g)); + BOOST_ASSERT (idx < num_edges(g)); row_start_iter src_plus_1 = std::upper_bound(g.m_forward.m_rowstart.begin(), g.m_forward.m_rowstart.end(), diff --git a/3party/boost/boost/graph/detail/adjacency_list.hpp b/3party/boost/boost/graph/detail/adjacency_list.hpp index 0cbf5f4e9c..2ff293e11a 100644 --- a/3party/boost/boost/graph/detail/adjacency_list.hpp +++ b/3party/boost/boost/graph/detail/adjacency_list.hpp @@ -35,6 +35,7 @@ #include #include #include +#include // Symbol truncation problems with MSVC, trying to shorten names. #define stored_edge se_ @@ -1216,7 +1217,7 @@ namespace boost { std::pair rng = get_parallel_edge_sublist(e, g, (OutEdgeListS*)(0)); rng.first = std::find(rng.first, rng.second, e); - assert(rng.first != rng.second); + BOOST_ASSERT(rng.first != rng.second); remove_edge(rng.first); } diff --git a/3party/boost/boost/graph/detail/compressed_sparse_row_struct.hpp b/3party/boost/boost/graph/detail/compressed_sparse_row_struct.hpp index 4fb3c2269b..75ac96204d 100644 --- a/3party/boost/boost/graph/detail/compressed_sparse_row_struct.hpp +++ b/3party/boost/boost/graph/detail/compressed_sparse_row_struct.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #if 0 #include // For some debugging code below @@ -255,7 +255,7 @@ namespace detail { std::vector& targets, vertices_size_type numverts, GlobalToLocal global_to_local) { - assert (sources.size() == targets.size()); + BOOST_ASSERT (sources.size() == targets.size()); // Do an in-place histogram sort (at least that's what I think it is) to // sort sources and targets m_rowstart.clear(); @@ -281,8 +281,8 @@ namespace detail { std::vector& edge_props, vertices_size_type numverts, GlobalToLocal global_to_local) { - assert (sources.size() == targets.size()); - assert (sources.size() == edge_props.size()); + BOOST_ASSERT (sources.size() == targets.size()); + BOOST_ASSERT (sources.size() == edge_props.size()); // Do an in-place histogram sort (at least that's what I think it is) to // sort sources and targets m_rowstart.clear(); diff --git a/3party/boost/boost/graph/detail/d_ary_heap.hpp b/3party/boost/boost/graph/detail/d_ary_heap.hpp index c3b3ef7fd5..ba58647a3d 100644 --- a/3party/boost/boost/graph/detail/d_ary_heap.hpp +++ b/3party/boost/boost/graph/detail/d_ary_heap.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -213,7 +213,7 @@ namespace boost { #if 0 for (size_t i = 1; i < data.size(); ++i) { if (compare_indirect(data[i], data[parent(i)])) { - assert (!"Element is smaller than its parent"); + BOOST_ASSERT (!"Element is smaller than its parent"); } } #endif diff --git a/3party/boost/boost/graph/detail/histogram_sort.hpp b/3party/boost/boost/graph/detail/histogram_sort.hpp index 742c6f9639..b359a73ded 100644 --- a/3party/boost/boost/graph/detail/histogram_sort.hpp +++ b/3party/boost/boost/graph/detail/histogram_sort.hpp @@ -10,6 +10,8 @@ #ifndef BOOST_GRAPH_DETAIL_HISTOGRAM_SORT_HPP #define BOOST_GRAPH_DETAIL_HISTOGRAM_SORT_HPP +#include + namespace boost { namespace graph { namespace detail { @@ -165,7 +167,7 @@ histogram_sort_inplace(KeyIterator key_begin, while (!(i >= rowstart[key_transform(key_begin[i])] && i < insert_positions[key_transform(key_begin[i])])) { // Add a slot in the right bucket size_t target_pos = insert_positions[key_transform(key_begin[i])]++; - assert (target_pos < rowstart[key_transform(key_begin[i]) + 1]); + BOOST_ASSERT (target_pos < rowstart[key_transform(key_begin[i]) + 1]); if (target_pos == i) continue; // Swap this edge into place using std::swap; @@ -199,7 +201,7 @@ histogram_sort_inplace(KeyIterator key_begin, while (!(i >= rowstart[key_transform(key_begin[i])] && i < insert_positions[key_transform(key_begin[i])])) { // Add a slot in the right bucket size_t target_pos = insert_positions[key_transform(key_begin[i])]++; - assert (target_pos < rowstart[key_transform(key_begin[i]) + 1]); + BOOST_ASSERT (target_pos < rowstart[key_transform(key_begin[i]) + 1]); if (target_pos == i) continue; // Swap this edge into place using std::swap; diff --git a/3party/boost/boost/graph/dimacs.hpp b/3party/boost/boost/graph/dimacs.hpp index 195ad3b651..3e8407dfab 100644 --- a/3party/boost/boost/graph/dimacs.hpp +++ b/3party/boost/boost/graph/dimacs.hpp @@ -17,6 +17,7 @@ #include #include #include +#include namespace boost { namespace graph { @@ -54,27 +55,27 @@ public: num_edges( 0 ), seen_edges( 0 ), want_weights(false) {} edge_type edge_deref() { - assert( !read_edges.empty() ); + BOOST_ASSERT( !read_edges.empty() ); return read_edges.front(); } inline edge_type* edge_ref() { - assert( !read_edges.empty() ); + BOOST_ASSERT( !read_edges.empty() ); return &read_edges.front(); } inline edge_weight_type edge_weight_deref() { - assert( !read_edge_weights.empty() ); + BOOST_ASSERT( !read_edge_weights.empty() ); return read_edge_weights.front(); } inline dimacs_basic_reader incr( incr_mode mode ) { if( mode == edge ) { - assert( !read_edges.empty() ); + BOOST_ASSERT( !read_edges.empty() ); read_edges.pop(); } else if( mode == edge_weight ) { - assert( !read_edge_weights.empty() ); + BOOST_ASSERT( !read_edge_weights.empty() ); read_edge_weights.pop(); } @@ -100,8 +101,8 @@ public: read_edge_weights.push( weight ); } } - assert( read_edges.size() < 100 ); - assert( read_edge_weights.size() < 100 ); + BOOST_ASSERT( read_edges.size() < 100 ); + BOOST_ASSERT( read_edge_weights.size() < 100 ); } // the 1000000 just happens to be about how many edges can be read in diff --git a/3party/boost/boost/graph/distributed/adjacency_list.hpp b/3party/boost/boost/graph/distributed/adjacency_list.hpp index 8c01c535a4..327d952db9 100644 --- a/3party/boost/boost/graph/distributed/adjacency_list.hpp +++ b/3party/boost/boost/graph/distributed/adjacency_list.hpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -966,7 +966,7 @@ namespace boost { && i->e == e.local) ++i; - assert(i != in_edges.end()); + BOOST_ASSERT(i != in_edges.end()); in_edges.erase(i); } @@ -1692,25 +1692,25 @@ namespace boost { // Directly access a vertex or edge bundle vertex_bundled& operator[](vertex_descriptor v) { - assert(v.owner == processor()); + BOOST_ASSERT(v.owner == processor()); return base()[v.local]; } const vertex_bundled& operator[](vertex_descriptor v) const { - assert(v.owner == processor()); + BOOST_ASSERT(v.owner == processor()); return base()[v.local]; } edge_bundled& operator[](edge_descriptor e) { - assert(e.owner() == processor()); + BOOST_ASSERT(e.owner() == processor()); return base()[e.local]; } const edge_bundled& operator[](edge_descriptor e) const { - assert(e.owner() == processor()); + BOOST_ASSERT(e.owner() == processor()); return base()[e.local]; } @@ -2078,7 +2078,7 @@ namespace boost { detail::parallel::add_local_edge(target(data.e, base()), source(data.e, base()), build_edge_property(data.get_property()), base()); - assert(edge.second); + BOOST_ASSERT(edge.second); put(edge_target_processor_id, base(), edge.first, other_proc); if (edge.second && on_add_edge) @@ -2119,7 +2119,7 @@ namespace boost { remove_local_edge_from_list(src, tgt, undirectedS()); } else { - assert(tgt.owner == process_id(process_group_)); + BOOST_ASSERT(tgt.owner == process_id(process_group_)); in_edge_list_type& in_edges = get(vertex_in_edges, base())[tgt.local]; typename in_edge_list_type::iterator ei; @@ -2287,7 +2287,7 @@ namespace boost { PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_vertex_with_property:: commit() const { - assert(!this->committed); + BOOST_ASSERT(!this->committed); this->committed = true; process_id_type owner @@ -2391,7 +2391,7 @@ namespace boost { std::pair PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge::commit() const { - assert(!committed); + BOOST_ASSERT(!committed); committed = true; if (source.owner == self.processor()) @@ -2583,7 +2583,7 @@ namespace boost { PBGL_DISTRIB_ADJLIST_TYPE::lazy_add_edge_with_property:: commit() const { - assert(!this->committed); + BOOST_ASSERT(!this->committed); this->committed = true; if (this->source.owner == this->self.processor()) @@ -2683,7 +2683,7 @@ namespace boost { out_edges(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v, const PBGL_DISTRIB_ADJLIST_TYPE& g) { - assert(v.owner == g.processor()); + BOOST_ASSERT(v.owner == g.processor()); typedef PBGL_DISTRIB_ADJLIST_TYPE impl; typedef typename impl::out_edge_generator generator; @@ -2705,7 +2705,7 @@ namespace boost { out_degree(typename PBGL_DISTRIB_ADJLIST_TYPE::vertex_descriptor v, const PBGL_DISTRIB_ADJLIST_TYPE& g) { - assert(v.owner == g.processor()); + BOOST_ASSERT(v.owner == g.processor()); return out_degree(v.local, g.base()); } @@ -2727,7 +2727,7 @@ namespace boost { ::vertex_descriptor v, const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g) { - assert(v.owner == g.processor()); + BOOST_ASSERT(v.owner == g.processor()); typedef PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS) impl; typedef typename impl::inherited base_graph_type; @@ -2755,7 +2755,7 @@ namespace boost { ::vertex_descriptor v, const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g) { - assert(v.owner == g.processor()); + BOOST_ASSERT(v.owner == g.processor()); typedef PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS) impl; typedef typename impl::in_edge_generator generator; @@ -2778,7 +2778,7 @@ namespace boost { ::vertex_descriptor v, const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g) { - assert(v.owner == g.processor()); + BOOST_ASSERT(v.owner == g.processor()); return get(vertex_in_edges, g.base())[v.local].size(); } @@ -2792,7 +2792,7 @@ namespace boost { ::vertex_descriptor v, const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g) { - assert(v.owner == g.processor()); + BOOST_ASSERT(v.owner == g.processor()); return out_degree(v.local, g.base()); } @@ -2809,7 +2809,7 @@ namespace boost { ::vertex_descriptor v, const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(undirectedS)& g) { - assert(v.owner == g.processor()); + BOOST_ASSERT(v.owner == g.processor()); return out_degree(v.local, g.base()); } @@ -2823,7 +2823,7 @@ namespace boost { ::vertex_descriptor v, const PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(bidirectionalS)& g) { - assert(v.owner == g.processor()); + BOOST_ASSERT(v.owner == g.processor()); return out_degree(v, g) + in_degree(v, g); } @@ -2893,7 +2893,7 @@ namespace boost { ::edge_descriptor edge_descriptor; // For directed graphs, u must be local - assert(u.owner == process_id(g.process_group())); + BOOST_ASSERT(u.owner == process_id(g.process_group())); typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS) ::out_edge_iterator ei, ei_end; @@ -2930,7 +2930,7 @@ namespace boost { } return std::make_pair(edge_descriptor(), false); } else { - assert(false); + BOOST_ASSERT(false); exit(1); } } @@ -2997,8 +2997,8 @@ namespace boost { remove_edge(typename PBGL_DISTRIB_ADJLIST_TYPE::edge_descriptor e, PBGL_DISTRIB_ADJLIST_TYPE& g) { - assert(source(e, g).owner == g.processor() - || target(e, g).owner == g.processor()); + BOOST_ASSERT(source(e, g).owner == g.processor() + || target(e, g).owner == g.processor()); if (target(e, g).owner == g.processor()) detail::parallel::remove_in_edge(e, g, DirectedS()); @@ -3042,7 +3042,7 @@ namespace boost { ::out_edge_iterator ei, PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)& g) { - assert(source(*ei, g).owner == g.processor()); + BOOST_ASSERT(source(*ei, g).owner == g.processor()); remove_edge(ei->local, g.base()); } @@ -3108,7 +3108,7 @@ namespace boost { typedef parallel::detail::remove_out_edge_predicate Pred; - assert(u.owner == g.processor()); + BOOST_ASSERT(u.owner == g.processor()); remove_out_edge_if(u.local, Pred(g, predicate), g.base()); } @@ -3169,7 +3169,7 @@ namespace boost { typedef parallel::detail::remove_in_edge_predicate Pred; - assert(u.owner == g.processor()); + BOOST_ASSERT(u.owner == g.processor()); graph_detail::erase_if(get(vertex_in_edges, g.base())[u.local], Pred(g, predicate)); } @@ -3336,7 +3336,7 @@ namespace boost { (typename PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)::vertex_descriptor u, PBGL_DISTRIB_ADJLIST_TYPE_CONFIG(directedS)& g) { - assert(u.owner == g.processor()); + BOOST_ASSERT(u.owner == g.processor()); clear_out_edges(u.local, g.base()); } @@ -3401,7 +3401,7 @@ namespace boost { { typedef typename PBGL_DISTRIB_ADJLIST_TYPE::graph_type graph_type; typedef typename graph_type::named_graph_mixin named_graph_mixin; - assert(u.owner == g.processor()); + BOOST_ASSERT(u.owner == g.processor()); static_cast(static_cast(g)) .removing_vertex(u); g.distribution().clear(); @@ -3655,7 +3655,7 @@ namespace boost { if (owner(key) == process_id(g.process_group())) return get(p, g.base(), local(key)); else - assert(false); + BOOST_ASSERT(false); } template diff --git a/3party/boost/boost/graph/distributed/adjlist/serialization.hpp b/3party/boost/boost/graph/distributed/adjlist/serialization.hpp index d38e4d2d21..9325d610cc 100644 --- a/3party/boost/boost/graph/distributed/adjlist/serialization.hpp +++ b/3party/boost/boost/graph/distributed/adjlist/serialization.hpp @@ -9,6 +9,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif +# include # include # include # include @@ -93,11 +94,7 @@ namespace detail { namespace parallel if (!filesystem::is_regular(*i)) boost::throw_exception(std::runtime_error("directory contains non-regular entries")); -#if BOOST_VERSION >= 103600 - std::string process_name = i->path().filename(); -#else - std::string process_name = i->leaf(); -#endif + std::string process_name = i->path().filename().string(); for (std::string::size_type i = 0; i < process_name.size(); ++i) if (!is_digit(process_name[i])) boost::throw_exception(std::runtime_error("directory contains files with invalid names")); @@ -305,7 +302,7 @@ namespace detail { namespace parallel if (is_root()) std::cout << i << " used to be " << old_ids[i] << "\n"; # endif - assert(m_id_mapping[old_ids[i]] == -1); + BOOST_ASSERT(m_id_mapping[old_ids[i]] == -1); m_id_mapping[old_ids[i]] = i; } @@ -513,7 +510,7 @@ namespace detail { namespace parallel detail::parallel::add_local_edge( local(u), local(v) , m_g.build_edge_property(property), m_g.base()); - assert(inserted.second); + BOOST_ASSERT(inserted.second); put(edge_target_processor_id, m_g.base(), inserted.first, owner(v)); edge_descriptor e(owner(u), owner(v), true, inserted.first); @@ -617,7 +614,7 @@ namespace detail { namespace parallel boost::parallel::inplace_all_to_all(m_pg, m_remote_vertices); for (int i = 0; i < num_processes(m_pg); ++i) - assert(m_remote_vertices[i].size() == m_requested_vertices[i].size()); + BOOST_ASSERT(m_remote_vertices[i].size() == m_requested_vertices[i].size()); } template @@ -667,7 +664,7 @@ namespace detail { namespace parallel if (i == m_property_ptrs[owner(u)].end() || i->first != e.property_ptr) { - assert(false); + BOOST_ASSERT(false); } local_edge_descriptor local_edge(local(u), local(v), i->second); @@ -698,7 +695,7 @@ namespace detail { namespace parallel if (i == m_requested_vertices[owner(u)].end() || *i != local(u)) { - assert(false); + BOOST_ASSERT(false); } local_vertex_descriptor local = diff --git a/3party/boost/boost/graph/distributed/betweenness_centrality.hpp b/3party/boost/boost/graph/distributed/betweenness_centrality.hpp index 1f327da980..b6ca7d06ef 100644 --- a/3party/boost/boost/graph/distributed/betweenness_centrality.hpp +++ b/3party/boost/boost/graph/distributed/betweenness_centrality.hpp @@ -20,6 +20,7 @@ #include #include #include +#include // For additive_reducer #include @@ -929,7 +930,7 @@ namespace boost { for (incoming_iterator vw = el.begin(); vw != el.end(); ++vw) { vertex_descriptor v = *vw; - assert(get(path_count, w) != 0); + BOOST_ASSERT(get(path_count, w) != 0); dependency_type factor = dependency_type(get(path_count, v)) / dependency_type(get(path_count, w)); diff --git a/3party/boost/boost/graph/distributed/boman_et_al_graph_coloring.hpp b/3party/boost/boost/graph/distributed/boman_et_al_graph_coloring.hpp index c65f80fa61..f079afe30f 100644 --- a/3party/boost/boost/graph/distributed/boman_et_al_graph_coloring.hpp +++ b/3party/boost/boost/graph/distributed/boman_et_al_graph_coloring.hpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -220,7 +220,7 @@ boman_et_al_graph_coloring // Receive boundary colors from other processors while (optional > stp = probe(pg)) { - assert(stp->second == 17); + BOOST_ASSERT(stp->second == 17); message_type msg; receive(pg, stp->first, stp->second, msg); cache(color, msg.first, msg.second); @@ -279,7 +279,7 @@ boman_et_al_graph_coloring // Receive boundary colors from other processors while (optional > stp = probe(pg)) { - assert(stp->second == 17); + BOOST_ASSERT(stp->second == 17); message_type msg; receive(pg, stp->first, stp->second, msg); cache(color, msg.first, msg.second); @@ -298,7 +298,7 @@ boman_et_al_graph_coloring color_type num_colors = 0; BGL_FORALL_VERTICES_T(v, g, DistributedGraph) { color_type k = get(color, v); - assert(k != no_color); + BOOST_ASSERT(k != no_color); if (k != no_color) { if (k >= (color_type)marked.size()) marked.resize(k + 1, 0); // TBD: perf? if (marked[k] != iter_num) { diff --git a/3party/boost/boost/graph/distributed/compressed_sparse_row_graph.hpp b/3party/boost/boost/graph/distributed/compressed_sparse_row_graph.hpp index 5c1d1bd97f..01d32cfb88 100644 --- a/3party/boost/boost/graph/distributed/compressed_sparse_row_graph.hpp +++ b/3party/boost/boost/graph/distributed/compressed_sparse_row_graph.hpp @@ -17,6 +17,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif +#include #include #include #include @@ -366,7 +367,7 @@ class compressed_sparse_row_graph< { std::pair locator = get(vertex_global, *this, v); - assert(locator.first == process_id(m_process_group)); + BOOST_ASSERT(locator.first == process_id(m_process_group)); return base().m_vertex_properties[locator.second]; } @@ -374,19 +375,19 @@ class compressed_sparse_row_graph< { std::pair locator = get(vertex_global, *this, v); - assert(locator.first == process_id(m_process_group)); + BOOST_ASSERT(locator.first == process_id(m_process_group)); return base().m_process_group[locator.second]; } edge_bundled& operator[](edge_descriptor e) { - assert(get(vertex_owner, *this, e.src) == process_id(m_process_group)); + BOOST_ASSERT(get(vertex_owner, *this, e.src) == process_id(m_process_group)); return base().m_edge_properties[e.idx]; } const edge_bundled& operator[](edge_descriptor e) const { - assert(get(vertex_owner, *this, e.src) == process_id(m_process_group)); + BOOST_ASSERT(get(vertex_owner, *this, e.src) == process_id(m_process_group)); return base().m_edge_properties[e.idx]; } diff --git a/3party/boost/boost/graph/distributed/connected_components.hpp b/3party/boost/boost/graph/distributed/connected_components.hpp index 1072b7c455..fb198abae7 100644 --- a/3party/boost/boost/graph/distributed/connected_components.hpp +++ b/3party/boost/boost/graph/distributed/connected_components.hpp @@ -14,6 +14,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif +#include #include #include #include @@ -116,7 +117,7 @@ namespace boost { namespace graph { namespace distributed { // Receive remote roots and edges while (optional > m = probe(pg)) { - assert(m->second == root_adj_msg); + BOOST_ASSERT(m->second == root_adj_msg); std::vector adjs; receive(pg, m->first, m->second, adjs); @@ -554,12 +555,12 @@ namespace boost { namespace graph { namespace distributed { adj[*liter].begin(), adj[*liter].end() ); #ifdef PBGL_IN_PLACE_MERGE #ifdef PBGL_SORT_ASSERT - assert(__gnu_cxx::is_sorted(my_adj.begin(), - my_adj.end() - adj[*liter].size(), - std::less())); - assert(__gnu_cxx::is_sorted(my_adj.end() - adj[*liter].size(), - my_adj.end(), - std::less())); + BOOST_ASSERT(__gnu_cxx::is_sorted(my_adj.begin(), + my_adj.end() - adj[*liter].size(), + std::less())); + BOOST_ASSERT(__gnu_cxx::is_sorted(my_adj.end() - adj[*liter].size(), + my_adj.end(), + std::less())); #endif std::inplace_merge(my_adj.begin(), my_adj.end() - adj[*liter].size(), @@ -602,12 +603,12 @@ namespace boost { namespace graph { namespace distributed { #ifdef PBGL_IN_PLACE_MERGE std::size_t num_incoming_edges = incoming_edges.size(); #ifdef PBGL_SORT_ASSERT - assert(__gnu_cxx::is_sorted(my_adj.begin(), - my_adj.end() - (num_incoming_edges-1), - std::less())); - assert(__gnu_cxx::is_sorted(my_adj.end() - (num_incoming_edges-1), - my_adj.end(), - std::less())); + BOOST_ASSERT(__gnu_cxx::is_sorted(my_adj.begin(), + my_adj.end() - (num_incoming_edges-1), + std::less())); + BOOST_ASSERT(__gnu_cxx::is_sorted(my_adj.end() - (num_incoming_edges-1), + my_adj.end(), + std::less())); #endif std::inplace_merge(my_adj.begin(), my_adj.end() - (num_incoming_edges - 1), diff --git a/3party/boost/boost/graph/distributed/connected_components_parallel_search.hpp b/3party/boost/boost/graph/distributed/connected_components_parallel_search.hpp index 8e4d286c3d..e8b31f8445 100644 --- a/3party/boost/boost/graph/distributed/connected_components_parallel_search.hpp +++ b/3party/boost/boost/graph/distributed/connected_components_parallel_search.hpp @@ -14,6 +14,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif +#include #include #include #include @@ -111,7 +112,7 @@ namespace boost { namespace graph { namespace distributed { // a mapping for that component number (which would be bad) void add(const component_value_type &a) { - assert(collisions.count(a) == 0); + BOOST_ASSERT(collisions.count(a) == 0); collisions[a] = a; } @@ -147,8 +148,8 @@ namespace boost { namespace graph { namespace distributed { // Used to resolve mapping at end of run. component_value_type update(component_value_type a) { - assert(num_unique > 0); - assert(collisions.count(a) != 0); + BOOST_ASSERT(num_unique > 0); + BOOST_ASSERT(collisions.count(a) != 0); return collisions[a]; } @@ -174,7 +175,7 @@ namespace boost { namespace graph { namespace distributed { // components in the graph. int unique(void) { - assert(num_unique > 0); + BOOST_ASSERT(num_unique > 0); return num_unique; } diff --git a/3party/boost/boost/graph/distributed/crauser_et_al_shortest_paths.hpp b/3party/boost/boost/graph/distributed/crauser_et_al_shortest_paths.hpp index 7f8d9f5297..e718501b12 100644 --- a/3party/boost/boost/graph/distributed/crauser_et_al_shortest_paths.hpp +++ b/3party/boost/boost/graph/distributed/crauser_et_al_shortest_paths.hpp @@ -30,6 +30,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif +#include #include #include #include @@ -330,7 +331,7 @@ namespace detail { crauser_et_al_shortest_paths_stats.deleted_vertices.push_back(deletions); } local_deletions = 0; - assert(deletions > 0); + BOOST_ASSERT(deletions > 0); #endif return min_distance == (std::numeric_limits::max)(); diff --git a/3party/boost/boost/graph/distributed/depth_first_search.hpp b/3party/boost/boost/graph/distributed/depth_first_search.hpp index d64f08531d..032902f4f1 100644 --- a/3party/boost/boost/graph/distributed/depth_first_search.hpp +++ b/3party/boost/boost/graph/distributed/depth_first_search.hpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -163,7 +164,7 @@ namespace boost { break; default: - assert(false); + BOOST_ASSERT(false); } } } diff --git a/3party/boost/boost/graph/distributed/detail/mpi_process_group.ipp b/3party/boost/boost/graph/distributed/detail/mpi_process_group.ipp index ef49232884..551435ef0d 100644 --- a/3party/boost/boost/graph/distributed/detail/mpi_process_group.ipp +++ b/3party/boost/boost/graph/distributed/detail/mpi_process_group.ipp @@ -18,7 +18,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif -#include +#include #include #include #include @@ -166,7 +166,7 @@ void mpi_process_group::send_impl(int dest, int tag, const T& value, mpl::true_ /*is_mpi_datatype*/) const { - assert(tag < msg_reserved_first || tag > msg_reserved_last); + BOOST_ASSERT(tag < msg_reserved_first || tag > msg_reserved_last); impl::outgoing_messages& outgoing = impl_->outgoing[dest]; @@ -197,7 +197,7 @@ void mpi_process_group::send_impl(int dest, int tag, const T& value, mpl::false_ /*is_mpi_datatype*/) const { - assert(tag < msg_reserved_first || tag > msg_reserved_last); + BOOST_ASSERT(tag < msg_reserved_first || tag > msg_reserved_last); impl::outgoing_messages& outgoing = impl_->outgoing[dest]; @@ -246,7 +246,7 @@ typename disable_if, void>::type mpi_process_group:: array_send_impl(int dest, int tag, const T values[], std::size_t n) const { - assert(tag < msg_reserved_first || tag > msg_reserved_last); + BOOST_ASSERT(tag < msg_reserved_first || tag > msg_reserved_last); impl::outgoing_messages& outgoing = impl_->outgoing[dest]; @@ -454,7 +454,7 @@ array_receive_impl(int source, int tag, T* values, std::size_t& n) const template void mpi_process_group::trigger(int tag, const Handler& handler) { - assert(block_num); + BOOST_ASSERT(block_num); install_trigger(tag,my_block_number(),shared_ptr( new trigger_launcher(*this, tag, handler))); } @@ -462,7 +462,7 @@ void mpi_process_group::trigger(int tag, const Handler& handler) template void mpi_process_group::trigger_with_reply(int tag, const Handler& handler) { - assert(block_num); + BOOST_ASSERT(block_num); install_trigger(tag,my_block_number(),shared_ptr( new reply_trigger_launcher(*this, tag, handler))); } @@ -570,7 +570,7 @@ receive(mpi_process_group const&, int source, int tag, << " receive from source " << source << " and tag " << tag << " in block " << (block == -1 ? self.my_block_number() : block) << std::endl; #endif - assert(context == trc_out_of_band); + BOOST_ASSERT(context == trc_out_of_band); boost::parallel::detail::untracked_pair data; @@ -631,7 +631,7 @@ receive(mpi_process_group const& self, int source, int tag, if (context == trc_out_of_band) { return; } - assert (context == trc_irecv_out_of_band); + BOOST_ASSERT (context == trc_irecv_out_of_band); // force posting of new MPI_Irecv, even though buffer is already allocated boost::mpi::packed_iarchive ia(self.impl_->comm,self.impl_->buffers[tag]); @@ -656,7 +656,7 @@ prepare_receive(mpi_process_group const& self, int tag, bool force) const self.impl_->buffers[tag].resize(buffer_size); force = true; } - assert(static_cast(self.impl_->buffers[tag].size()) >= buffer_size); + BOOST_ASSERT(static_cast(self.impl_->buffers[tag].size()) >= buffer_size); //BOOST_MPL_ASSERT(mpl::not_ >); if (force) { @@ -677,7 +677,7 @@ receive(const mpi_process_group& pg, int tag, T& value) value, boost::mpi::is_mpi_datatype())) return source; } - assert (false); + BOOST_ASSERT (false); } template @@ -694,7 +694,7 @@ receive(const mpi_process_group& pg, int tag, T values[], std::size_t n) if (result) return std::make_pair(source, n); } - assert(false); + BOOST_ASSERT(false); } template @@ -708,7 +708,7 @@ receive(const mpi_process_group& pg, int tag, T values[], std::size_t n) values, n)) return std::make_pair(source, n); } - assert(false); + BOOST_ASSERT(false); } template @@ -724,7 +724,7 @@ receive(const mpi_process_group& pg, "Process %d failed to receive a message from process %d with tag %d in block %d.\n", process_id(pg), source, tag, pg.my_block_number()); - assert(false); + BOOST_ASSERT(false); exit(1); } } @@ -745,7 +745,7 @@ receive(const mpi_process_group& pg, int source, int tag, T values[], "Process %d failed to receive a message from process %d with tag %d in block %d.\n", process_id(pg), source, tag, pg.my_block_number()); - assert(false); + BOOST_ASSERT(false); exit(1); } } @@ -837,7 +837,7 @@ all_gather(const mpi_process_group& pg, InputIterator first, int result = MPI_Allgather(&size, 1, MPI_INT, &sizes[0], 1, MPI_INT, communicator(pg)); - assert(result == MPI_SUCCESS); + BOOST_ASSERT(result == MPI_SUCCESS); // Adjust sizes based on the number of bytes std::transform(sizes.begin(), sizes.end(), sizes.begin(), @@ -860,7 +860,7 @@ all_gather(const mpi_process_group& pg, InputIterator first, &out[0], &sizes[0], &displacements[0], MPI_BYTE, communicator(pg)); } - assert(result == MPI_SUCCESS); + BOOST_ASSERT(result == MPI_SUCCESS); } template @@ -878,25 +878,25 @@ process_subgroup(const mpi_process_group& pg, MPI_Group current_group; int result = MPI_Comm_group(communicator(pg), ¤t_group); - assert(result == MPI_SUCCESS); + BOOST_ASSERT(result == MPI_SUCCESS); MPI_Group new_group; result = MPI_Group_incl(current_group, ranks.size(), &ranks[0], &new_group); - assert(result == MPI_SUCCESS); + BOOST_ASSERT(result == MPI_SUCCESS); MPI_Comm new_comm; result = MPI_Comm_create(communicator(pg), new_group, &new_comm); - assert(result == MPI_SUCCESS); + BOOST_ASSERT(result == MPI_SUCCESS); result = MPI_Group_free(&new_group); - assert(result == MPI_SUCCESS); + BOOST_ASSERT(result == MPI_SUCCESS); result = MPI_Group_free(¤t_group); - assert(result == MPI_SUCCESS); + BOOST_ASSERT(result == MPI_SUCCESS); if (new_comm != MPI_COMM_NULL) { mpi_process_group result_pg(boost::mpi::communicator(new_comm,boost::mpi::comm_attach)); result = MPI_Comm_free(&new_comm); - assert(result == 0); + BOOST_ASSERT(result == 0); return result_pg; } else { return mpi_process_group(mpi_process_group::create_empty()); diff --git a/3party/boost/boost/graph/distributed/detail/remote_update_set.hpp b/3party/boost/boost/graph/distributed/detail/remote_update_set.hpp index 08f4316ad6..ef0e9775ca 100644 --- a/3party/boost/boost/graph/distributed/detail/remote_update_set.hpp +++ b/3party/boost/boost/graph/distributed/detail/remote_update_set.hpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include @@ -110,7 +110,7 @@ private: case msg_updates: { updates_size_type num_updates = update_sizes[source]; - assert(num_updates); + BOOST_ASSERT(num_updates); // Receive the actual updates std::vector updates(num_updates); @@ -207,7 +207,7 @@ private: void operator()(process_id_type source, int tag) { // Receive the # of updates - assert(tag == msg_update); + BOOST_ASSERT(tag == msg_update); update_pair_type update; receive(self->process_group, source, tag, update); diff --git a/3party/boost/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp b/3party/boost/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp index a516daf790..8a2098ffcf 100644 --- a/3party/boost/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp +++ b/3party/boost/boost/graph/distributed/eager_dijkstra_shortest_paths.hpp @@ -22,6 +22,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif +#include #include #include #include @@ -284,7 +285,7 @@ template 0); + BOOST_ASSERT(deletions > 0); #endif return min_distance == (std::numeric_limits::max)(); diff --git a/3party/boost/boost/graph/distributed/hohberg_biconnected_components.hpp b/3party/boost/boost/graph/distributed/hohberg_biconnected_components.hpp index 249e8b0252..1cce5c8739 100644 --- a/3party/boost/boost/graph/distributed/hohberg_biconnected_components.hpp +++ b/3party/boost/boost/graph/distributed/hohberg_biconnected_components.hpp @@ -39,7 +39,7 @@ #include #include #include // for std::pair -#include +#include #include // for std::find, std::mismatch #include #include @@ -136,9 +136,9 @@ namespace hohberg_detail { template T branch_point(const std::vector& p1, const std::vector& p2) { - assert(!p1.empty()); - assert(!p2.empty()); - assert(p1.front() == p2.front()); + BOOST_ASSERT(!p1.empty()); + BOOST_ASSERT(!p2.empty()); + BOOST_ASSERT(p1.front() == p2.front()); typedef typename std::vector::const_iterator iterator; @@ -385,7 +385,7 @@ class hohberg_vertex_processor template void serialize(Archiver&, const unsigned int /*version*/) { - assert(false); + BOOST_ASSERT(false); } }; @@ -523,7 +523,7 @@ hohberg_vertex_processor::operator()(Edge e, path_t& path, default: // std::cerr << "Phase is " << int(phase) << "\n"; - assert(false); + BOOST_ASSERT(false); } } @@ -579,7 +579,7 @@ hohberg_vertex_processor::operator()(Edge e, Vertex gamma, break; default: - assert(false); + BOOST_ASSERT(false); } } @@ -596,7 +596,7 @@ hohberg_vertex_processor::operator()(Edge e, edges_size_type name, << name << "), phase = " << (int)phase << std::endl; #endif - assert(phase == 4); + BOOST_ASSERT(phase == 4); typename property_map::const_type owner = get(vertex_owner, g); @@ -684,7 +684,7 @@ start_naming_phase(Vertex alpha, const Graph& g, edges_size_type offset) { using namespace hohberg_detail; - assert(phase == 4); + BOOST_ASSERT(phase == 4); typename property_map::const_type owner = get(vertex_owner, g); @@ -870,7 +870,7 @@ hohberg_vertex_processor::get_edge_index(Edge e, const Graph& g) if (source(e, g) == target(oe, g)) return result; ++result; } - assert(false); + BOOST_ASSERT(false); } template @@ -883,7 +883,7 @@ hohberg_vertex_processor::get_incident_edge_index(Vertex u, Vertex v, if (target(e, g) == v) return result; ++result; } - assert(false); + BOOST_ASSERT(false); } template header; receive(pg, msg->first, msg->second, header); - assert(path_length == header.path_length); + BOOST_ASSERT(path_length == header.path_length); // Receive the path itself path_t path(path_length); @@ -966,7 +966,7 @@ hohberg_biconnected_components case msg_path_vertices: // Should be handled in msg_path_header case, unless we're going // stateless. - assert(false); + BOOST_ASSERT(false); break; case msg_tree_header: @@ -989,7 +989,7 @@ hohberg_biconnected_components case msg_tree_vertices: // Should be handled in msg_tree_header case, unless we're // going stateless. - assert(false); + BOOST_ASSERT(false); break; case msg_name: @@ -1002,7 +1002,7 @@ hohberg_biconnected_components break; default: - assert(false); + BOOST_ASSERT(false); } } ++path_length; diff --git a/3party/boost/boost/graph/distributed/named_graph.hpp b/3party/boost/boost/graph/distributed/named_graph.hpp index 83b00613b6..6984c02c4d 100644 --- a/3party/boost/boost/graph/distributed/named_graph.hpp +++ b/3party/boost/boost/graph/distributed/named_graph.hpp @@ -14,6 +14,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif +#include #include #include #include @@ -393,7 +394,7 @@ typename BGL_NAMED_GRAPH::vertex_descriptor BGL_NAMED_GRAPH::lazy_add_vertex::commit() const { typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type; - assert (!committed); + BOOST_ASSERT (!committed); committed = true; process_id_type owner = self.named_distribution()(name); @@ -530,7 +531,7 @@ BGL_NAMED_GRAPH::lazy_add_edge::commit() const typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type; using boost::parallel::detail::make_untracked_pair; - assert(!committed); + BOOST_ASSERT(!committed); committed = true; /// The result we will return, if we are sending a message to @@ -729,7 +730,7 @@ BGL_NAMED_GRAPH::lazy_add_edge_with_property::commit() const { using boost::detail::parallel::make_pair_with_property; typedef typename BGL_NAMED_GRAPH::process_id_type process_id_type; - assert(!committed); + BOOST_ASSERT(!committed); committed = true; /// The result we will return, if we are sending a message to diff --git a/3party/boost/boost/graph/distributed/page_rank.hpp b/3party/boost/boost/graph/distributed/page_rank.hpp index aae418fc73..c2c230d387 100644 --- a/3party/boost/boost/graph/distributed/page_rank.hpp +++ b/3party/boost/boost/graph/distributed/page_rank.hpp @@ -15,6 +15,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif +#include #include #include #include @@ -53,7 +54,7 @@ namespace detail { 1, MPI_DOUBLE, get(owner, v), local(v), 1, MPI_DOUBLE, MPI_SUM, to_win); - assert(MPI_SUCCESS == ret); + BOOST_ASSERT(MPI_SUCCESS == ret); } } MPI_Win_fence(0, to_win); @@ -100,14 +101,14 @@ page_rank_impl(const Graph& g, RankMap rank_map, Done done, process_group_type pg = process_group(g); process_id_type id = process_id(pg); - assert(me == id); + BOOST_ASSERT(me == id); rank_type initial_rank = rank_type(rank_type(1) / n); BGL_FORALL_VERTICES_T(v, g, Graph) put(rank_map, v, initial_rank); #ifdef WANT_MPI_ONESIDED - assert(sizeof(rank_type) == sizeof(double)); + BOOST_ASSERT(sizeof(rank_type) == sizeof(double)); bool to_map_2 = true; MPI_Win win, win2; diff --git a/3party/boost/boost/graph/distributed/rmat_graph_generator.hpp b/3party/boost/boost/graph/distributed/rmat_graph_generator.hpp index 8b6004339e..dec8250d6e 100644 --- a/3party/boost/boost/graph/distributed/rmat_graph_generator.hpp +++ b/3party/boost/boost/graph/distributed/rmat_graph_generator.hpp @@ -13,6 +13,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif +#include #include #include #include @@ -51,7 +52,7 @@ namespace boost { double d, bool permute_vertices = true) : gen(), done(false) { - assert(a + b + c + d == 1); + BOOST_ASSERT(a + b + c + d == 1); int id = process_id(pg); this->gen.reset(new uniform_01(gen)); diff --git a/3party/boost/boost/graph/distributed/shuffled_distribution.hpp b/3party/boost/boost/graph/distributed/shuffled_distribution.hpp index 92bc0397f2..6d39fb6ceb 100644 --- a/3party/boost/boost/graph/distributed/shuffled_distribution.hpp +++ b/3party/boost/boost/graph/distributed/shuffled_distribution.hpp @@ -9,6 +9,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif +# include # include # include @@ -36,7 +37,7 @@ struct shuffled_distribution : BaseDistribution void assign_mapping(InputIterator first, InputIterator last) { mapping_.assign(first, last); - assert(mapping_.size() == n); + BOOST_ASSERT(mapping_.size() == n); reverse_mapping.resize(mapping_.size()); for (std::vector::iterator i(mapping_.begin()); diff --git a/3party/boost/boost/graph/distributed/strong_components.hpp b/3party/boost/boost/graph/distributed/strong_components.hpp index d7de8b472f..f2c021f8cd 100644 --- a/3party/boost/boost/graph/distributed/strong_components.hpp +++ b/3party/boost/boost/graph/distributed/strong_components.hpp @@ -16,6 +16,7 @@ // #define PBGL_SCC_DEBUG +#include #include #include #include @@ -511,7 +512,7 @@ namespace boost { namespace graph { namespace distributed { // Receive predecessor and successor messages and handle them while (optional > m = probe(pg)) { - assert(m->second == fhp_succ_size_msg || m->second == fhp_pred_size_msg); + BOOST_ASSERT(m->second == fhp_succ_size_msg || m->second == fhp_pred_size_msg); std::size_t num_requests; receive(pg, m->first, m->second, num_requests); VertexPairVec requests(num_requests); @@ -791,7 +792,7 @@ namespace boost { namespace graph { namespace distributed { // Receive edge addition requests and handle them while (optional > m = probe(pg)) { - assert(m->second == fhp_edges_size_msg); + BOOST_ASSERT(m->second == fhp_edges_size_msg); std::size_t num_requests; receive(pg, m->first, m->second, num_requests); VertexPairVec requests(num_requests); diff --git a/3party/boost/boost/graph/erdos_renyi_generator.hpp b/3party/boost/boost/graph/erdos_renyi_generator.hpp index a459441683..5be06d79df 100644 --- a/3party/boost/boost/graph/erdos_renyi_generator.hpp +++ b/3party/boost/boost/graph/erdos_renyi_generator.hpp @@ -10,7 +10,7 @@ #ifndef BOOST_GRAPH_ERDOS_RENYI_GENERATOR_HPP #define BOOST_GRAPH_ERDOS_RENYI_GENERATOR_HPP -#include +#include #include #include #include @@ -155,8 +155,8 @@ namespace boost { // bernoulli_distribution would need to be run until it returns true. // Thus, this distribution can be used to step through the edges // which are actually present. - assert (src != (std::numeric_limits::max)() && - src != n); + BOOST_ASSERT (src != (std::numeric_limits::max)() && + src != n); while (src != n) { vertices_size_type increment = rand_vertex(*gen); size_t tgt_index_limit = diff --git a/3party/boost/boost/graph/filtered_graph.hpp b/3party/boost/boost/graph/filtered_graph.hpp index 764b2d7d1c..66cead609b 100644 --- a/3party/boost/boost/graph/filtered_graph.hpp +++ b/3party/boost/boost/graph/filtered_graph.hpp @@ -233,6 +233,13 @@ namespace boost { typedef typename edge_property_type::type type; }; + template + struct graph_property_type > { + typedef typename graph_property_type::type type; + }; + #ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES template @@ -244,6 +251,11 @@ namespace boost { struct edge_bundle_type > : edge_bundle_type { }; + + template + struct graph_bundle_type > + : graph_bundle_type { }; #endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES //=========================================================================== diff --git a/3party/boost/boost/graph/graph_stats.hpp b/3party/boost/boost/graph/graph_stats.hpp index 636c49137d..ad0e330cae 100644 --- a/3party/boost/boost/graph/graph_stats.hpp +++ b/3party/boost/boost/graph/graph_stats.hpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace boost { namespace graph { @@ -124,7 +125,7 @@ std::map weight_degree_dist( Graph& g ) { for( std::map::iterator iter = dist.begin(); iter != dist.end(); ++iter ) { - assert( n[iter->first] != 0 ); + BOOST_ASSERT( n[iter->first] != 0 ); dist[iter->first] /= n[iter->first]; } diff --git a/3party/boost/boost/graph/graph_test.hpp b/3party/boost/boost/graph/graph_test.hpp index fc4d9f0f93..7b3a5402bd 100644 --- a/3party/boost/boost/graph/graph_test.hpp +++ b/3party/boost/boost/graph/graph_test.hpp @@ -213,7 +213,7 @@ namespace boost { IsoMap iso_map(iso_vec.begin(), get(vertex_index, g)); copy_graph(g, cpy, orig_to_copy(iso_map)); - assert((verify_isomorphism(g, cpy, iso_map))); + BOOST_CHECK((verify_isomorphism(g, cpy, iso_map))); vertex_t v = add_vertex(g); diff --git a/3party/boost/boost/graph/graphviz.hpp b/3party/boost/boost/graph/graphviz.hpp index 1e6aeaf006..718220ffec 100644 --- a/3party/boost/boost/graph/graphviz.hpp +++ b/3party/boost/boost/graph/graphviz.hpp @@ -67,7 +67,8 @@ namespace boost { if (regex_match(s, valid_unquoted_id)) { return s; } else { - return "\"" + regex_replace(s, sregex(as_xpr('"')), "\\\"") + "\""; + boost::algorithm::replace_all(s, "\"", "\\\""); + return "\"" + s + "\""; } } diff --git a/3party/boost/boost/graph/gursoy_atun_layout.hpp b/3party/boost/boost/graph/gursoy_atun_layout.hpp index b16a01f68f..9269c4b06f 100644 --- a/3party/boost/boost/graph/gursoy_atun_layout.hpp +++ b/3party/boost/boost/graph/gursoy_atun_layout.hpp @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -169,7 +170,7 @@ gursoy_atun_step } min_distance_unset = false; } - assert (!min_distance_unset); // Graph must have at least one vertex + BOOST_ASSERT (!min_distance_unset); // Graph must have at least one vertex boost::detail::update_position_visitor< PositionMap, NodeDistanceMap, Topology, VertexListAndIncidenceGraph> diff --git a/3party/boost/boost/graph/kamada_kawai_spring_layout.hpp b/3party/boost/boost/graph/kamada_kawai_spring_layout.hpp index 0262e1fc28..f39ef90caf 100644 --- a/3party/boost/boost/graph/kamada_kawai_spring_layout.hpp +++ b/3party/boost/boost/graph/kamada_kawai_spring_layout.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -216,11 +217,13 @@ namespace boost { weight_type edge_length = detail::graph::compute_edge_length(g, distance, index, edge_or_side_length); + + std::cerr << "edge_length = " << edge_length << std::endl; // Compute l_{ij} and k_{ij} const weight_type K = spring_constant; - vertex_iterator ui, end = vertices(g).second; - for (ui = vertices(g).first; ui != end; ++ui) { + vertex_iterator ui, end; + for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) { vertex_iterator vi = ui; for (++vi; vi != end; ++vi) { weight_type dij = distance[get(index, *ui)][get(index, *vi)]; @@ -237,7 +240,7 @@ namespace boost { vertex_descriptor p = *vertices(g).first; weight_type delta_p(0); - for (ui = vertices(g).first; ui != end; ++ui) { + for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) { deriv_type deriv = compute_partial_derivatives(*ui); put(partial_derivatives, *ui, deriv); @@ -255,12 +258,25 @@ namespace boost { // update the delta_i values in O(n) time instead of O(n^2) // time. std::vector p_partials(num_vertices(g)); - for (ui = vertices(g).first; ui != end; ++ui) { + for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) { vertex_descriptor i = *ui; p_partials[get(index, i)] = compute_partial_derivative(i, p); } do { + // For debugging, compute the energy value E + double E = 0.; + for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) { + vertex_iterator vi = ui; + for (++vi; vi != end; ++vi) { + double dist = topology.distance(position[*ui], position[*vi]); + weight_type k_ij = spring_strength[get(index,*ui)][get(index,*vi)]; + weight_type l_ij = distance[get(index, *ui)][get(index, *vi)]; + E += .5 * k_ij * (dist - l_ij) * (dist - l_ij); + } + } + std::cerr << "E = " << E << std::endl; + // Compute the elements of the Jacobian // From // http://www.cs.panam.edu/~rfowler/papers/1994_kumar_fowler_A_Spring_UTPACSTR.pdf @@ -269,7 +285,7 @@ namespace boost { for (std::size_t i = 0; i < Point::dimensions; ++i) for (std::size_t j = 0; j < Point::dimensions; ++j) dE_d_d[i][j] = 0.; - for (ui = vertices(g).first; ui != end; ++ui) { + for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) { vertex_descriptor i = *ui; if (i != p) { point_difference_type diff = topology.difference(position[p], position[i]); @@ -284,6 +300,7 @@ namespace boost { dE_d_d[i][i] += k_mi * (1 + (l_mi * (diff[i] * diff[i] - dist_squared) * inv_dist_cubed)); } else { dE_d_d[i][j] += k_mi * l_mi * diff[i] * diff[j] * inv_dist_cubed; + // dE_d_d[i][j] += k_mi * l_mi * sqrt(hypot(diff[i], diff[j])) * inv_dist_cubed; } } } @@ -292,7 +309,7 @@ namespace boost { deriv_type dE_d = get(partial_derivatives, p); - // Solve dE_d_d * delta = dE_d to get delta + // Solve dE_d_d * delta = -dE_d to get delta point_difference_type delta = -linear_solver::solve(dE_d_d, dE_d); // Move p by delta @@ -307,7 +324,7 @@ namespace boost { // Select new p by updating each partial derivative and delta vertex_descriptor old_p = p; - for (ui = vertices(g).first; ui != end; ++ui) { + for (ui = vertices(g).first, end = vertices(g).second; ui != end; ++ui) { deriv_type old_deriv_p = p_partials[get(index, *ui)]; deriv_type old_p_partial = compute_partial_derivative(*ui, old_p); diff --git a/3party/boost/boost/graph/kolmogorov_max_flow.hpp b/3party/boost/boost/graph/kolmogorov_max_flow.hpp index c2b94c0943..035a60ea13 100644 --- a/3party/boost/boost/graph/kolmogorov_max_flow.hpp +++ b/3party/boost/boost/graph/kolmogorov_max_flow.hpp @@ -33,9 +33,9 @@ #define BOOST_KOLMOGOROV_MAX_FLOW_HPP #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) -# pragma message ("The kolmogorov_max_flow.hpp header is deprecated and will be removed in Boost 1.46. Use boykov_kolmogorov_max_flow.hpp instead.") +# pragma message ("The kolmogorov_max_flow.hpp header is deprecated and will be removed in Boost 1.47. Use boykov_kolmogorov_max_flow.hpp instead.") #elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__) -# warning "The kolmogorov_max_flow.hpp header is deprecated and will be removed in Boost 1.46. Use boykov_kolmogorov_max_flow.hpp instead." +# warning "The kolmogorov_max_flow.hpp header is deprecated and will be removed in Boost 1.47. Use boykov_kolmogorov_max_flow.hpp instead." #endif #include diff --git a/3party/boost/boost/graph/loop_erased_random_walk.hpp b/3party/boost/boost/graph/loop_erased_random_walk.hpp index 6e6752a79c..712c45d7ca 100644 --- a/3party/boost/boost/graph/loop_erased_random_walk.hpp +++ b/3party/boost/boost/graph/loop_erased_random_walk.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include namespace boost { @@ -51,7 +51,7 @@ namespace boost { typedef typename boost::property_traits::value_type color_t; typedef boost::color_traits color_gen; - assert (get(color, s) == color_gen::white()); + BOOST_ASSERT (get(color, s) == color_gen::white()); path.clear(); path.push_back(s); put(color, s, color_gen::gray()); @@ -67,7 +67,7 @@ namespace boost { // Found a loop; delete from path from the first occurrence of t to the // end, coloring vertices white. typename std::vector::iterator it = std::find(path.begin(), path.end(), t); - assert (it != path.end()); + BOOST_ASSERT (it != path.end()); ++it; for (typename std::vector::iterator j = it; j != path.end(); ++j) { put(color, *j, color_gen::white()); diff --git a/3party/boost/boost/graph/mesh_graph_generator.hpp b/3party/boost/boost/graph/mesh_graph_generator.hpp index 5bf1d47f31..141eca30f1 100644 --- a/3party/boost/boost/graph/mesh_graph_generator.hpp +++ b/3party/boost/boost/graph/mesh_graph_generator.hpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include #include @@ -47,7 +47,7 @@ namespace boost { bool toroidal = true) : x(x), y(y), n(x*y), source(0), target(1), current(0,1), toroidal(toroidal), done(false) - { assert(x > 1 && y > 1); } + { BOOST_ASSERT(x > 1 && y > 1); } reference operator*() const { return current; } pointer operator->() const { return ¤t; } diff --git a/3party/boost/boost/graph/minimum_degree_ordering.hpp b/3party/boost/boost/graph/minimum_degree_ordering.hpp index 85e6e7bedc..1e171da6cb 100644 --- a/3party/boost/boost/graph/minimum_degree_ordering.hpp +++ b/3party/boost/boost/graph/minimum_degree_ordering.hpp @@ -12,7 +12,7 @@ #define MINIMUM_DEGREE_ORDERING_HPP #include -#include +#include #include #include #include // for integer_traits @@ -53,7 +53,7 @@ namespace boost { : data(_data), current(-(std::numeric_limits::max)()) {} void pop() { - assert(! empty()); + BOOST_ASSERT(! empty()); current = data[current]; } void push(value_type v) { diff --git a/3party/boost/boost/graph/named_function_params.hpp b/3party/boost/boost/graph/named_function_params.hpp index e08c5c4c5f..c5e35fa54e 100644 --- a/3party/boost/boost/graph/named_function_params.hpp +++ b/3party/boost/boost/graph/named_function_params.hpp @@ -584,14 +584,18 @@ BOOST_BGL_DECLARE_NAMED_PARAMS g_hasQ = (parameter_exists ::value)); + typedef boost::reference_wrapper int_refw; + typedef typename boost::parameter::value_type< + ArgPack, + PriorityQueueTag, + int_refw + >::type + param_value_type_wrapper; + typedef typename param_value_type_wrapper::type + param_value_type; + typedef typename boost::remove_const::type param_value_type_no_const; typedef priority_queue_maker_helper - >::type::type - >::type> helper; + param_value_type_no_const> helper; typedef typename helper::priority_queue_type priority_queue_type; static priority_queue_type make_queue(const Graph& g, const ArgPack& ap, KeyT defaultKey) { diff --git a/3party/boost/boost/graph/one_bit_color_map.hpp b/3party/boost/boost/graph/one_bit_color_map.hpp index 95a9604f6b..b153b732f7 100644 --- a/3party/boost/boost/graph/one_bit_color_map.hpp +++ b/3party/boost/boost/graph/one_bit_color_map.hpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -65,7 +66,7 @@ get(const one_bit_color_map& pm, { BOOST_STATIC_CONSTANT(int, bits_per_char = one_bit_color_map::bits_per_char); typename property_traits::value_type i = get(pm.index, key); - assert ((std::size_t)i < pm.n); + BOOST_ASSERT ((std::size_t)i < pm.n); return one_bit_color_type((pm.data.get()[i / bits_per_char] >> (i % bits_per_char)) & 1); } @@ -77,8 +78,8 @@ put(const one_bit_color_map& pm, { BOOST_STATIC_CONSTANT(int, bits_per_char = one_bit_color_map::bits_per_char); typename property_traits::value_type i = get(pm.index, key); - assert ((std::size_t)i < pm.n); - assert (value >= 0 && value < 2); + BOOST_ASSERT ((std::size_t)i < pm.n); + BOOST_ASSERT (value >= 0 && value < 2); std::size_t byte_num = i / bits_per_char; std::size_t bit_position = (i % bits_per_char); pm.data.get()[byte_num] = diff --git a/3party/boost/boost/graph/parallel/distribution.hpp b/3party/boost/boost/graph/parallel/distribution.hpp index d717a1f822..8256b197e7 100644 --- a/3party/boost/boost/graph/parallel/distribution.hpp +++ b/3party/boost/boost/graph/parallel/distribution.hpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -194,7 +195,7 @@ struct uneven_block explicit uneven_block(const LinearProcessGroup& pg, const std::vector& local_sizes) : id(process_id(pg)), p(num_processes(pg)), local_sizes(local_sizes) { - assert(local_sizes.size() == p); + BOOST_ASSERT(local_sizes.size() == p); local_starts.resize(p + 1); local_starts[0] = 0; std::partial_sum(local_sizes.begin(), local_sizes.end(), &local_starts[1]); @@ -219,7 +220,7 @@ struct uneven_block template SizeType operator()(SizeType i) const { - assert (i >= (SizeType) 0 && i < (SizeType) n); // check for valid range + BOOST_ASSERT (i >= (SizeType) 0 && i < (SizeType) n); // check for valid range size_vector::const_iterator lb = std::lower_bound(local_starts.begin(), local_starts.end(), (std::size_t) i); return ((SizeType)(*lb) == i ? lb : --lb) - local_starts.begin(); } @@ -402,7 +403,7 @@ struct twod_block_cyclic std::cerr << "global(" << i << "@" << id << ") = " << result << " =? " << local(result) << std::endl; - assert(i == local(result)); + BOOST_ASSERT(i == local(result)); return result; } diff --git a/3party/boost/boost/graph/properties.hpp b/3party/boost/boost/graph/properties.hpp index fa8440e93f..f4c57ea259 100644 --- a/3party/boost/boost/graph/properties.hpp +++ b/3party/boost/boost/graph/properties.hpp @@ -11,7 +11,7 @@ #define BOOST_GRAPH_PROPERTIES_HPP #include -#include +#include #include #include @@ -266,7 +266,7 @@ namespace boost { class graph_property { public: typedef typename property_value< - typename Graph::graph_property_type, Property + typename boost::graph_property_type::type, Property >::type type; }; @@ -353,7 +353,7 @@ namespace boost { > make_container_vertex_map(RandomAccessContainer& c, const PropertyGraph& g) { - assert(c.size() >= num_vertices(g)); + BOOST_ASSERT(c.size() >= num_vertices(g)); return make_iterator_vertex_map(c.begin(), g); } diff --git a/3party/boost/boost/graph/push_relabel_max_flow.hpp b/3party/boost/boost/graph/push_relabel_max_flow.hpp index fdea7a7e6d..4044815d94 100644 --- a/3party/boost/boost/graph/push_relabel_max_flow.hpp +++ b/3party/boost/boost/graph/push_relabel_max_flow.hpp @@ -11,7 +11,7 @@ #define BOOST_PUSH_RELABEL_MAX_FLOW_HPP #include -#include +#include #include #include #include @@ -266,7 +266,7 @@ namespace boost { // but it is called "discharge" in the paper and in hi_pr.c. void discharge(vertex_descriptor u) { - assert(get(excess_flow, u) > 0); + BOOST_ASSERT(get(excess_flow, u) > 0); while (1) { out_edge_iterator ai, ai_end; for (boost::tie(ai, ai_end) = current[u]; ai != ai_end; ++ai) { @@ -703,8 +703,8 @@ namespace boost { algo.convert_preflow_to_flow(); - assert(algo.is_flow()); - assert(algo.is_optimal()); + BOOST_ASSERT(algo.is_flow()); + BOOST_ASSERT(algo.is_optimal()); return flow; } // push_relabel_max_flow() diff --git a/3party/boost/boost/graph/random.hpp b/3party/boost/boost/graph/random.hpp index 7e1d659694..f4001337a1 100644 --- a/3party/boost/boost/graph/random.hpp +++ b/3party/boost/boost/graph/random.hpp @@ -26,7 +26,7 @@ #include #include -#include +#include namespace boost { @@ -104,7 +104,7 @@ namespace boost { chosen_weight -= w; } } - assert (false); // Should not get here + BOOST_ASSERT (false); // Should not get here } namespace detail { diff --git a/3party/boost/boost/graph/random_spanning_tree.hpp b/3party/boost/boost/graph/random_spanning_tree.hpp index 7e36388fc7..5ecd4f17d9 100644 --- a/3party/boost/boost/graph/random_spanning_tree.hpp +++ b/3party/boost/boost/graph/random_spanning_tree.hpp @@ -11,6 +11,7 @@ #define BOOST_GRAPH_RANDOM_SPANNING_TREE_HPP #include +#include #include #include #include @@ -34,7 +35,7 @@ namespace boost { typedef typename graph_traits::vertex_descriptor vertex_descriptor; typedef typename graph_traits::edge_descriptor edge_descriptor; - assert (num_vertices(g) >= 1); // g must also be undirected (or symmetric) and connected + BOOST_ASSERT (num_vertices(g) >= 1); // g must also be undirected (or symmetric) and connected typedef color_traits::value_type> color_gen; BGL_FORALL_VERTICES_T(v, g, Graph) put(color, v, color_gen::white()); @@ -53,7 +54,7 @@ namespace boost { ++i) { typename std::vector::const_reverse_iterator j = i; ++j; - assert (get(color, *j) == color_gen::gray()); + BOOST_ASSERT (get(color, *j) == color_gen::gray()); put(color, *j, color_gen::black()); put(pred, *j, *i); } diff --git a/3party/boost/boost/graph/read_dimacs.hpp b/3party/boost/boost/graph/read_dimacs.hpp index b19c81392b..4e82f84edd 100644 --- a/3party/boost/boost/graph/read_dimacs.hpp +++ b/3party/boost/boost/graph/read_dimacs.hpp @@ -90,7 +90,7 @@ int read_dimacs_max_flow_internal(Graph& g, const int EN20 = 19; const int EN22 = 20; - static char *err_message[] = + static const char *err_message[] = { /* 0*/ "more than one problem line.", /* 1*/ "wrong number of parameters in the problem line.", diff --git a/3party/boost/boost/graph/reverse_graph.hpp b/3party/boost/boost/graph/reverse_graph.hpp index 60de2b0ee7..30d303b19f 100644 --- a/3party/boost/boost/graph/reverse_graph.hpp +++ b/3party/boost/boost/graph/reverse_graph.hpp @@ -79,16 +79,6 @@ class reverse_graph { typedef reverse_graph_tag graph_tag; - // Graph, vertex, and edge properties - typedef typename graph_property_type::type graph_property_type; - typedef typename graph_bundle_type::type graph_bundled; - - typedef typename vertex_property_type::type vertex_property_type; - typedef typename vertex_bundle_type::type vertex_bundled; - - typedef typename edge_property_type::type edge_property_type; - typedef typename edge_bundle_type::type edge_bundled; - #ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES // Bundled properties support template @@ -101,10 +91,10 @@ class reverse_graph { operator[](Descriptor x) const { return m_g[x]; } - graph_bundled& operator[](graph_bundle_t) + typename boost::graph_property_type::type& operator[](graph_bundle_t) { return get_property(*this); } - graph_bundled const& operator[](graph_bundle_t) const + typename boost::graph_property_type::type const& operator[](graph_bundle_t) const { return get_property(*this); } #endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES @@ -128,6 +118,11 @@ struct edge_property_type > { typedef typename boost::edge_property_type::type type; }; +template +struct graph_property_type > { + typedef typename boost::graph_property_type::type type; +}; + #ifndef BOOST_GRAPH_NO_BUNDLED_PROPERTIES template struct vertex_bundle_type > @@ -136,6 +131,10 @@ struct edge_property_type > { template struct edge_bundle_type > : edge_bundle_type { }; + + template + struct graph_bundle_type > + : graph_bundle_type { }; #endif // BOOST_GRAPH_NO_BUNDLED_PROPERTIES template diff --git a/3party/boost/boost/graph/rmat_graph_generator.hpp b/3party/boost/boost/graph/rmat_graph_generator.hpp index 9e8cfd542c..4256d7a8aa 100644 --- a/3party/boost/boost/graph/rmat_graph_generator.hpp +++ b/3party/boost/boost/graph/rmat_graph_generator.hpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -155,7 +156,7 @@ namespace boost { { this->gen.reset(new uniform_01(gen)); - assert(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5))); + BOOST_ASSERT(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5))); if (permute_vertices) generate_permutation_vector(gen, vertexPermutation, n); @@ -265,7 +266,7 @@ namespace boost { values(sort_pair()), done(false) { - assert(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5))); + BOOST_ASSERT(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5))); this->gen.reset(new uniform_01(gen)); @@ -366,7 +367,7 @@ namespace boost { : gen(), done(false) { - assert(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5))); + BOOST_ASSERT(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5))); this->gen.reset(new uniform_01(gen)); @@ -479,7 +480,7 @@ namespace boost { values(sort_pair()), done(false) { - assert(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5))); + BOOST_ASSERT(boost::test_tools::check_is_close(a + b + c + d, 1., boost::test_tools::fraction_tolerance(1.e-5))); this->gen.reset(new uniform_01(gen)); diff --git a/3party/boost/boost/graph/stoer_wagner_min_cut.hpp b/3party/boost/boost/graph/stoer_wagner_min_cut.hpp index 9cd2d0da06..814eae0ce8 100644 --- a/3party/boost/boost/graph/stoer_wagner_min_cut.hpp +++ b/3party/boost/boost/graph/stoer_wagner_min_cut.hpp @@ -6,7 +6,7 @@ #ifndef BOOST_GRAPH_STOER_WAGNER_MIN_CUT_HPP #define BOOST_GRAPH_STOER_WAGNER_MIN_CUT_HPP 1 -#include +#include #include #include #include @@ -61,7 +61,7 @@ namespace boost { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::property_traits::value_type weight_type; - assert(pq.empty()); + BOOST_ASSERT(pq.empty()); typename KeyedUpdatablePriorityQueue::key_map keys = pq.keys(); BGL_FORALL_VERTICES_T(v, g, UndirectedGraph) { @@ -72,9 +72,10 @@ namespace boost { } } - assert(pq.size() >= 2); + BOOST_ASSERT(pq.size() >= 2); - vertex_descriptor s, t; + vertex_descriptor s = boost::graph_traits::null_vertex(); + vertex_descriptor t = boost::graph_traits::null_vertex(); weight_type w; while (!pq.empty()) { // while PQ \neq {} do const vertex_descriptor u = pq.top(); // u = extractmax(PQ) @@ -168,7 +169,7 @@ namespace boost { weight_type bestW; boost::tie(s, t, bestW) = boost::detail::stoer_wagner_phase(g, assignments, assignedVertices, weights, pq); - assert(s != t); + BOOST_ASSERT(s != t); BGL_FORALL_VERTICES_T(v, g, UndirectedGraph) { put(parities, v, parity_type(v == t ? 1 : 0)); } @@ -179,7 +180,7 @@ namespace boost { for (; n >= 2; --n) { weight_type w; boost::tie(s, t, w) = boost::detail::stoer_wagner_phase(g, assignments, assignedVertices, weights, pq); - assert(s != t); + BOOST_ASSERT(s != t); if (w < bestW) { BGL_FORALL_VERTICES_T(v, g, UndirectedGraph) { @@ -200,7 +201,7 @@ namespace boost { assignedVertices.insert(t); } - assert(pq.empty()); + BOOST_ASSERT(pq.empty()); return bestW; } diff --git a/3party/boost/boost/graph/subgraph.hpp b/3party/boost/boost/graph/subgraph.hpp index 33f67a4065..9e0919413f 100644 --- a/3party/boost/boost/graph/subgraph.hpp +++ b/3party/boost/boost/graph/subgraph.hpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -181,7 +181,7 @@ typedef typename Traits::traversal_category traversal_category; vertex_descriptor u_local; bool in_subgraph; if (is_root()) return u_global; boost::tie(u_local, in_subgraph) = this->find_vertex(u_global); - assert(in_subgraph == true); + BOOST_ASSERT(in_subgraph == true); return u_local; } @@ -345,8 +345,8 @@ typename subgraph::vertex_descriptor add_vertex(typename subgraph::vertex_descriptor u_global, subgraph& g) { - assert(!g.is_root()); - typename subgraph::vertex_descriptor u_local, v_global, uu_global; + BOOST_ASSERT(!g.is_root()); + typename subgraph::vertex_descriptor u_local, v_global; typename subgraph::edge_descriptor e_global; u_local = add_vertex(g.m_graph); @@ -371,11 +371,13 @@ add_vertex(typename subgraph::vertex_descriptor u_global, typename subgraph::out_edge_iterator ei, ei_end; for(boost::tie(vi, vi_end) = vertices(r); vi != vi_end; ++vi) { v_global = *vi; - if(g.find_vertex(v_global).second) + if (v_global == u_global) + continue; // don't insert self loops twice! + if (!g.find_vertex(v_global).second) + continue; // not a subgraph vertex => try next one for(boost::tie(ei, ei_end) = out_edges(*vi, r); ei != ei_end; ++ei) { e_global = *ei; - uu_global = target(e_global, r); - if(uu_global == u_global && g.find_vertex(v_global).second) { + if(target(e_global, r) == u_global) { g.local_add_edge(g.global_to_local(v_global), u_local, e_global); } } @@ -749,7 +751,7 @@ add_vertex(subgraph& g) // TODO: Under Construction template void remove_vertex(typename subgraph::vertex_descriptor u, subgraph& g) -{ assert(false); } +{ BOOST_ASSERT(false); } #endif //=========================================================================== diff --git a/3party/boost/boost/graph/two_bit_color_map.hpp b/3party/boost/boost/graph/two_bit_color_map.hpp index 9a3872fd04..3d55eabc70 100644 --- a/3party/boost/boost/graph/two_bit_color_map.hpp +++ b/3party/boost/boost/graph/two_bit_color_map.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -68,7 +69,7 @@ get(const two_bit_color_map& pm, { BOOST_STATIC_CONSTANT(int, elements_per_char = two_bit_color_map::elements_per_char); typename property_traits::value_type i = get(pm.index, key); - assert ((std::size_t)i < pm.n); + BOOST_ASSERT ((std::size_t)i < pm.n); std::size_t byte_num = i / elements_per_char; std::size_t bit_position = ((i % elements_per_char) * 2); return two_bit_color_type((pm.data.get()[byte_num] >> bit_position) & 3); @@ -82,8 +83,8 @@ put(const two_bit_color_map& pm, { BOOST_STATIC_CONSTANT(int, elements_per_char = two_bit_color_map::elements_per_char); typename property_traits::value_type i = get(pm.index, key); - assert ((std::size_t)i < pm.n); - assert (value >= 0 && value < 4); + BOOST_ASSERT ((std::size_t)i < pm.n); + BOOST_ASSERT (value >= 0 && value < 4); std::size_t byte_num = i / elements_per_char; std::size_t bit_position = ((i % elements_per_char) * 2); pm.data.get()[byte_num] = diff --git a/3party/boost/boost/icl/associative_element_container.hpp b/3party/boost/boost/icl/associative_element_container.hpp new file mode 100644 index 0000000000..0f54e54a1f --- /dev/null +++ b/3party/boost/boost/icl/associative_element_container.hpp @@ -0,0 +1,20 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_101023 +#define BOOST_ICL_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_101023 + +#include +#include +#include +#include +#include +#include + +#endif + + diff --git a/3party/boost/boost/icl/associative_interval_container.hpp b/3party/boost/boost/icl/associative_interval_container.hpp new file mode 100644 index 0000000000..24ded90305 --- /dev/null +++ b/3party/boost/boost/icl/associative_interval_container.hpp @@ -0,0 +1,21 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_ASSOCIATIVE_INTERVAL_CONTAINER_HPP_JOFA_101023 +#define BOOST_ICL_ASSOCIATIVE_INTERVAL_CONTAINER_HPP_JOFA_101023 + +#include +#include +#include +#include +#include +#include +#include + +#endif + + diff --git a/3party/boost/boost/icl/closed_interval.hpp b/3party/boost/boost/icl/closed_interval.hpp new file mode 100644 index 0000000000..64f79650f7 --- /dev/null +++ b/3party/boost/boost/icl/closed_interval.hpp @@ -0,0 +1,116 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CLOSED_INTERVAL_HPP_JOFA_100324 +#define BOOST_ICL_CLOSED_INTERVAL_HPP_JOFA_100324 + +#include +#include +#include + +namespace boost{namespace icl +{ + +template +class closed_interval +{ +public: + typedef closed_interval type; + typedef DomainT domain_type; + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /** Default constructor; yields an empty interval [0,0). */ + closed_interval() + : _lwb(unit_element::value()), _upb(identity_element::value()) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + BOOST_STATIC_ASSERT((icl::is_discrete::value)); + } + + //NOTE: Compiler generated copy constructor is used + + /** Constructor for a closed singleton interval [val,val] */ + explicit closed_interval(const DomainT& val) + : _lwb(val), _upb(val) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + BOOST_STATIC_ASSERT((!icl::is_continuous::value)); + } + + /** Interval from low to up with bounds bounds */ + closed_interval(const DomainT& low, const DomainT& up) : + _lwb(low), _upb(up) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + } + + DomainT lower()const{ return _lwb; } + DomainT upper()const{ return _upb; } + + DomainT first()const{ return _lwb; } + DomainT last() const{ return _upb; } + +private: + DomainT _lwb; + DomainT _upb; +}; + + +//============================================================================== +//=T closed_interval -> concept intervals +//============================================================================== +template +struct interval_traits< icl::closed_interval > +{ + typedef DomainT domain_type; + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + typedef icl::closed_interval interval_type; + + static interval_type construct(const domain_type& lo, const domain_type& up) + { + return interval_type(lo, up); + } + + static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); }; + static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); }; +}; + +//============================================================================== +//= Type traits +//============================================================================== +template +struct interval_bound_type< closed_interval > +{ + typedef interval_bound_type type; + BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_closed); +}; + +template +struct type_to_string > +{ + static std::string apply() + { return "[I]<"+ type_to_string::apply() +">"; } +}; + +template +struct value_size > +{ + static std::size_t apply(const icl::closed_interval& value) + { return 2; } +}; + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/concept/comparable.hpp b/3party/boost/boost/icl/concept/comparable.hpp new file mode 100644 index 0000000000..a4a70752a3 --- /dev/null +++ b/3party/boost/boost/icl/concept/comparable.hpp @@ -0,0 +1,45 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_COMPARABLE_HPP_JOFA_100921 +#define BOOST_ICL_CONCEPT_COMPARABLE_HPP_JOFA_100921 + +#include +#include + +namespace boost{ namespace icl +{ + +//============================================================================== +//= Equivalences and Orderings +//============================================================================== +template +inline typename enable_if, bool>::type +operator != (const Type& left, const Type& right) +{ return !(left == right); } + +template +inline typename enable_if, bool>::type +operator > (const Type& left, const Type& right) +{ return right < left; } + +/** Partial ordering which is induced by Compare */ +template +inline typename enable_if, bool>::type +operator <= (const Type& left, const Type& right) +{ return !(left > right); } + +template +inline typename enable_if, bool>::type +operator >= (const Type& left, const Type& right) +{ return !(left < right); } + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/concept/container.hpp b/3party/boost/boost/icl/concept/container.hpp new file mode 100644 index 0000000000..f5bf0a389c --- /dev/null +++ b/3party/boost/boost/icl/concept/container.hpp @@ -0,0 +1,87 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_CONTAINER_HPP_JOFA_100923 +#define BOOST_ICL_CONCEPT_CONTAINER_HPP_JOFA_100923 + +#include +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + +//============================================================================== +//= Emptieness +//============================================================================== + +/** Tests if the container is empty. + Complexity: constant. */ +template +typename enable_if, bool>::type +is_empty(const Type& object) +{ + return object.begin()==object.end(); +} + + +/** All content of the container is dropped. + Complexity: linear. */ +template +typename enable_if, void>::type +clear(Type& object) +{ + object.erase(object.begin(), object.end()); +} + +//============================================================================== +//= Size +//============================================================================== + +template +typename enable_if + , mpl::not_ > > + , std::size_t>::type +iterative_size(const Type& object) +{ + return object.size(); +} + +//============================================================================== +//= Swap +//============================================================================== + +template +typename enable_if, void>::type +swap(Type& left, Type& right) +{ + left.swap(right); +} + +//============================================================================== +//= Iteration +//============================================================================== + +template +typename enable_if, typename Type::iterator>::type +cyclic_prior(Type& object, typename Type::iterator it_) +{ return it_ == object.begin() ? object.end() : --it_; } + +template +typename enable_if, typename Type::const_iterator>::type +cyclic_prior(const Type& object, typename Type::const_iterator it_) +{ return it_ == object.begin() ? object.end() : --it_; } + + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/concept/element_associator.hpp b/3party/boost/boost/icl/concept/element_associator.hpp new file mode 100644 index 0000000000..8d45ecfa30 --- /dev/null +++ b/3party/boost/boost/icl/concept/element_associator.hpp @@ -0,0 +1,500 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_ELEMENT_ASSOCIATOR_HPP_JOFA_100921 +#define BOOST_ICL_CONCEPT_ELEMENT_ASSOCIATOR_HPP_JOFA_100921 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + +//============================================================================== +//= Size +//============================================================================== +template +typename enable_if, std::size_t>::type +iterative_size(const Type& object) +{ + return object.size(); +} + +template +typename enable_if, typename Type::size_type>::type +size(const Type& object) +{ + return icl::iterative_size(object); +} + +template +typename enable_if, typename Type::size_type>::type +cardinality(const Type& object) +{ + return icl::iterative_size(object); +} + + +//============================================================================== +//= Containedness +//============================================================================== +//------------------------------------------------------------------------------ +//- bool within(c P&, c T&) T:{s}|{m} P:{e}|{i} fragment_types|key_types +//------------------------------------------------------------------------------ +/** Checks if a key is in the associative container */ +template +typename enable_if, bool>::type +within(const typename Type::key_type& key, const Type& super) +{ + return !(super.find(key) == super.end()); +} + +//------------------------------------------------------------------------------ +//- bool within(c P&, c T&) T:{s}|{m} P:{s'} fragment_types|key_types +//------------------------------------------------------------------------------ +template +typename enable_if + , is_key_container_of >, + bool>::type +within(const SubT& sub, const SuperT& super) +{ + if(icl::is_empty(sub)) return true; + if(icl::is_empty(super)) return false; + if(icl::size(super) < icl::size(sub)) return false; + + typename SubT::const_iterator common_lwb_; + typename SubT::const_iterator common_upb_; + if(!Set::common_range(common_lwb_, common_upb_, sub, super)) + return false; + + typename SubT::const_iterator sub_ = sub.begin(); + typename SuperT::const_iterator super_; + while(sub_ != sub.end()) + { + super_ = super.find(key_value(sub_)); + if(super_ == super.end()) + return false; + else if(!co_equal(sub_, super_, &sub, &super)) + return false; + + ++sub_; + } + return true; +} + +//------------------------------------------------------------------------------ +//- bool contains(c T&, c P&) T:{s}|{m} P:{e}|{i} fragment_types|key_types +//------------------------------------------------------------------------------ +template +typename enable_if, bool>::type +contains(const Type& super, const typename Type::key_type& key) +{ + return icl::within(key, super); +} + +//------------------------------------------------------------------------------ +//- bool contains(c T&, c P&) T:{s}|{m} P:{s'} fragment_types|key_types +//------------------------------------------------------------------------------ +template +typename enable_if + , is_key_container_of >, + bool>::type +contains(const SuperT& super, const SubT& sub) +{ + return icl::within(sub, super); +} + +//============================================================================== +//= Equivalences and Orderings +//============================================================================== + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4996) //'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' +#endif // I do guarantee here that I am using the parameters correctly :) + +/** Standard equality, which is lexicographical equality of the sets + as sequences, that are given by their Compare order. */ +template +inline typename enable_if, bool>::type +operator == (const Type& left, const Type& right) +{ + return left.size() == right.size() + && std::equal(left.begin(), left.end(), right.begin()); +} + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +template +inline typename enable_if, bool>::type +is_element_equal(const Type& left, const Type& right) +{ return left == right; } + + +/* Strict weak less ordering which is given by the Compare order */ +template +inline typename enable_if, bool>::type +operator < (const Type& left, const Type& right) +{ + return std::lexicographical_compare( + left.begin(), left.end(), right.begin(), right.end(), + typename Type::element_compare() + ); +} + +template +typename enable_if, + int>::type +inclusion_compare(const LeftT& left, const RightT& right) +{ + return Set::subset_compare(left, right, + left.begin(), left.end(), + right.begin(), right.end()); +} + +//============================================================================== +//= Addition +//============================================================================== +template +inline typename enable_if, Type>::type& +operator += (Type& object, const typename Type::value_type& operand) +{ + return icl::add(object, operand); +} + +template +inline typename enable_if, Type>::type +operator + (Type object, const typename Type::value_type& operand) +{ + return object += operand; +} + +template +inline typename enable_if, Type>::type +operator + (const typename Type::value_type& operand, Type object) +{ + return object += operand; +} + +template +inline typename enable_if, Type>::type +operator += (Type& object, const Type& operand) +{ + if(&object == &operand) + return object; + + typename Type::iterator prior_ = object.end(); + ICL_const_FORALL(typename Type, it_, operand) + prior_ = icl::add(object, prior_, *it_); + + return object; +} + +template +inline typename enable_if, Type>::type +operator + (Type object, const Type& operand) +{ + return object += operand; +} + +//============================================================================== +template +inline typename enable_if, Type>::type& +operator |= (Type& object, const typename Type::value_type& operand) +{ + return icl::add(object, operand); +} + +template +inline typename enable_if, Type>::type +operator | (Type object, const typename Type::value_type& operand) +{ + return object += operand; +} + +template +inline typename enable_if, Type>::type +operator | (const typename Type::value_type& operand, Type object) +{ + return object += operand; +} + +template +inline typename enable_if, Type>::type& +operator |= (Type& object, const Type& operand) +{ + return object += operand; +} + +template +inline typename enable_if, Type>::type +operator | (Type object, const Type& operand) +{ + return object += operand; +} + + +//============================================================================== +//= Insertion +//============================================================================== +//------------------------------------------------------------------------------ +//- V insert(T&, c P&) T:{s}|{m} P:{e}|{b} fragment_type +//------------------------------------------------------------------------------ +template +typename enable_if, + std::pair >::type +insert(Type& object, const typename Type::value_type& operand) +{ + return object.insert(operand); +} + +template +typename enable_if, + typename Type::iterator>::type +insert(Type& object, typename Type::iterator prior, + const typename Type::value_type& operand) +{ + return object.insert(prior, operand); +} + +//------------------------------------------------------------------------------ +//- T insert(T&, c T&) T:{s m} map fragment_type +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +insert(Type& object, const Type& addend) +{ + typedef typename Type::iterator iterator; + + iterator prior_ = object.end(); + ICL_const_FORALL(typename Type, elem_, addend) + icl::insert(object, prior_, *elem_); + + return object; +} + + +//============================================================================== +//= Erasure +//============================================================================== +template +typename enable_if, typename Type::size_type>::type +erase(Type& object, const typename Type::key_type& key_value) +{ + typedef typename Type::size_type size_type; + typename Type::iterator it_ = object.find(key_value); + if(it_ != object.end()) + { + object.erase(it_); + return unit_element::value(); + } + return identity_element::value(); +} + +template +typename enable_if, Type>::type& +erase(Type& object, const Type& erasure) +{ + ICL_const_FORALL(typename Type, elem_, erasure) + icl::erase(object, *elem_); + + return object; +} + + + +//============================================================================== +//= Subtraction +//============================================================================== +template +inline typename enable_if, Type>::type& +operator -= (Type& object, const typename Type::value_type& operand) +{ + return icl::subtract(object, operand); +} + +template +inline typename enable_if, Type>::type +operator - (Type object, const typename Type::value_type& operand) +{ + return object -= operand; +} + +template +inline typename enable_if, Type>::type& +operator -= (Type& object, const Type& subtrahend) +{ + ICL_const_FORALL(typename Type, it_, subtrahend) + icl::subtract(object, *it_); + + return object; +} + +template +inline typename enable_if, Type>::type +operator - (Type object, const Type& subtrahend) +{ + return object -= subtrahend; +} + + +//============================================================================== +//= Intersection +//============================================================================== +//------------------------------------------------------------------------------ +//- void add_intersection(T&, c T&, c P&) T:{s}{m} P:{e}{e} key_type +//------------------------------------------------------------------------------ +template +inline typename enable_if, void>::type +add_intersection(Type& section, const Type& object, + const typename Type::key_type& operand) +{ + typedef typename Type::const_iterator const_iterator; + const_iterator it_ = object.find(operand); + if(it_ != object.end()) + icl::add(section, *it_); +} + +//------------------------------------------------------------------------------ +//- void add_intersection(T&, c T&, c P&) T:{s}{m} P:{s}{s} set key_type +//------------------------------------------------------------------------------ +template +inline typename enable_if, void>::type +add_intersection(Type& section, const Type& object, + const typename key_container_type_of::type& operand) +{ + typedef typename key_container_type_of::type key_container_type; + typedef typename key_container_type::const_iterator const_iterator; + const_iterator common_lwb_, common_upb_; + if(!Set::common_range(common_lwb_, common_upb_, operand, object)) + return; + + const_iterator sec_ = common_lwb_; + while(sec_ != common_upb_) + add_intersection(section, object, *sec_++); +} + +//------------------------------------------------------------------------------ +//- Intersection +//------------------------------------------------------------------------------ +template +inline typename enable_if, Type>::type& +operator &= (Type& object, const typename Type::key_type& operand) +{ + Type section; + add_intersection(section, object, operand); + object.swap(section); + return object; +} + +template +inline typename enable_if, Type>::type +operator & (Type object, const typename Type::key_type& operand) +{ + return object &= operand; +} + +template +inline typename enable_if, Type>::type +operator & (const typename Type::key_type& operand, Type object) +{ + return object &= operand; +} + +template +inline typename enable_if, Type>::type& +operator &= (Type& object, const typename key_container_type_of::type& operand) +{ + Type section; + add_intersection(section, object, operand); + object.swap(section); + return object; +} + +//------------------------------------------------------------------------------ + +template +inline typename enable_if, bool>::type +disjoint(const Type& left, const Type& right) +{ + return !intersects(left, right); +} + +//============================================================================== +//= Symmetric difference +//============================================================================== +template +inline typename enable_if, Type>::type +operator ^ (Type object, const typename Type::value_type& operand) +{ + return icl::flip(object, operand); +} + +template +inline typename enable_if, Type>::type +operator ^ (const typename Type::value_type& operand, Type object) +{ + return icl::flip(object, operand); +} + +template +inline typename enable_if, Type>::type +operator ^ (Type object, const Type& operand) +{ + return object ^= operand; +} + + +//============================================================================== +//= Manipulation by predicates +//============================================================================== +template +typename enable_if, Type>::type& +erase_if(const Predicate& pred, Type& object) +{ + typename Type::iterator it_ = object.begin(); + while(it_ != object.end()) + if(pred(*it_)) + icl::erase(object, it_++); + else ++it_; + return object; +} + +template +inline typename enable_if, Type>::type& +add_if(const Predicate& pred, Type& object, const Type& src) +{ + typename Type::const_iterator it_ = src.begin(); + while(it_ != src.end()) + if(pred(*it_)) + icl::add(object, *it_++); + + return object; +} + +template +inline typename enable_if, Type>::type& +assign_if(const Predicate& pred, Type& object, const Type& src) +{ + icl::clear(object); + return add_if(object, src, pred); +} + + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/concept/element_map.hpp b/3party/boost/boost/icl/concept/element_map.hpp new file mode 100644 index 0000000000..441c563154 --- /dev/null +++ b/3party/boost/boost/icl/concept/element_map.hpp @@ -0,0 +1,487 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_ELEMENT_MAP_HPP_JOFA_100921 +#define BOOST_ICL_CONCEPT_ELEMENT_MAP_HPP_JOFA_100921 + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + + +namespace boost{ namespace icl +{ + +//NOTE: Some forward declarations are needed by some compilers. +template +typename enable_if, Type>::type& +erase_if(const Predicate& pred, Type& object); + + +//============================================================================== +//= Containedness +//============================================================================== +//------------------------------------------------------------------------------ +//- bool within(c P&, c T&) T:{m} P:{b} fragment_types +//------------------------------------------------------------------------------ +/** Checks if a key-value pair is in the map */ +template +typename enable_if, bool>::type +within(const typename Type::element_type& value_pair, const Type& super) +{ + typedef typename Type::const_iterator const_iterator; + const_iterator found_ = super.find(value_pair.first); + return found_ != super.end() && found_->second == value_pair.second; +} + +//------------------------------------------------------------------------------ +//- bool contains(c T&, c P&) T:{m} P:{b} fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if, bool>::type +contains(const Type& super, const typename Type::element_type& value_pair) +{ + return icl::within(value_pair, super); +} + +//============================================================================== +//= Equivalences and Orderings +//============================================================================== + +/** Protonic equality is equality on all elements that do not carry an identity element as content. */ +template +inline typename enable_if, bool>::type +is_distinct_equal(const Type& lhs, const Type& rhs) +{ + return Map::lexicographical_distinct_equal(lhs, rhs); +} + +//============================================================================== +//= Addition +//============================================================================== +/** \c add inserts \c value_pair into the map if it's key does + not exist in the map. + If \c value_pairs's key value exists in the map, it's data + value is added to the data value already found in the map. */ +template +typename enable_if, Type>::type& +add(Type& object, const typename Type::value_type& value_pair) +{ + return object.add(value_pair); +} + +/** \c add add \c value_pair into the map using \c prior as a hint to + insert \c value_pair after the position \c prior is pointing to. */ +template +typename enable_if, typename Type::iterator>::type +add(Type& object, typename Type::iterator prior, + const typename Type::value_type& value_pair) +{ + return object.add(prior, value_pair); +} + +//============================================================================== +//= Erasure +//============================================================================== +//------------------------------------------------------------------------------ +//- T& erase(T&, c P&) T:{m} P:{b} fragment_type +//------------------------------------------------------------------------------ +template +typename enable_if, typename Type::size_type>::type +erase(Type& object, const typename Type::element_type& value_pair) +{ + typedef typename Type::size_type size_type; + typedef typename Type::iterator iterator; + typedef typename Type::on_identity_absorbtion on_identity_absorbtion; + + if(on_identity_absorbtion::is_absorbable(value_pair.second)) + return identity_element::value(); + + iterator it_ = object.find(value_pair.first); + if(it_ != object.end() && value_pair.second == it_->second) + { + object.erase(it_); + return unit_element::value(); + } + + return identity_element::value(); +} + +template +typename enable_if, Type>::type& +erase(Type& object, const typename Type::set_type& erasure) +{ + typedef typename Type::set_type set_type; + ICL_const_FORALL(typename set_type, elem_, erasure) + icl::erase(object, *elem_); + + return object; +} + +//============================================================================== +//= Subtraction +//============================================================================== +//------------------------------------------------------------------------------ +//- T& subtract(T&, c P&) T:{m} P:{b} fragment_type +//------------------------------------------------------------------------------ +template +inline typename enable_if, Type>::type& +subtract(Type& object, const typename Type::element_type& operand) +{ + return object.subtract(operand); +} + +//------------------------------------------------------------------------------ +//- T& subtract(T&, c P&) T:{m} P:{e} key_type +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +subtract(Type& object, const typename Type::domain_type& key_value) +{ + return icl::erase(object, key_value); +} + +//------------------------------------------------------------------------------ +//- T& subtract(T&, c P&) T:{m} P:{s} set key_type +//------------------------------------------------------------------------------ +template +inline typename enable_if, Type>::type& +operator -= (Type& object, const typename Type::set_type& operand) +{ + typedef typename Type::set_type set_type; + typedef typename set_type::const_iterator co_iterator; + typedef typename Type::iterator iterator; + + co_iterator common_lwb_, common_upb_; + if(!Set::common_range(common_lwb_, common_upb_, operand, object)) + return object; + + co_iterator it_ = common_lwb_; + iterator common_; + + while(it_ != common_upb_) + object.erase(*it_++); + + return object; +} + +template +inline typename enable_if, Type>::type +operator - (Type object, const typename Type::set_type& subtrahend) +{ + return object -= subtrahend; +} + +//============================================================================== +//= Selective Update +//============================================================================== +//------------------------------------------------------------------------------ +//- T& set_at(T&, c P&) T:{m} P:{b} +//------------------------------------------------------------------------------ +template +inline typename enable_if, Type>::type& +set_at(Type& object, const typename Type::element_type& operand) +{ + typedef typename Type::iterator iterator; + typedef typename Type::codomain_combine codomain_combine; + typedef on_absorbtion::value> + on_identity_absorbtion; + + if(!on_identity_absorbtion::is_absorbable(operand.second)) + { + std::pair insertion = object.insert(operand); + if(!insertion.second) + insertion->second = operand.second; + } + return object; +} + + +//============================================================================== +//= Intersection +//============================================================================== +template +inline typename enable_if, void>::type +add_intersection(Type& section, const Type& object, + const typename Type::element_type& operand) +{ + object.add_intersection(section, operand); +} + +template +inline typename enable_if, void>::type +add_intersection(Type& section, const Type& object, const Type& operand) +{ + ICL_const_FORALL(typename Type, it_, operand) + icl::add_intersection(section, object, *it_); +} + +//------------------------------------------------------------------------------ +//- T& op &=(T&, c P&) T:{m} P:{b m} fragment_types +//------------------------------------------------------------------------------ + +template +inline typename enable_if, is_total >, Type>::type& +operator &=(Type& object, const typename Type::element_type& operand) +{ + object.add(operand); + return object; +} + +template +inline typename enable_if, mpl::not_ > >, Type>::type& +operator &=(Type& object, const typename Type::element_type& operand) +{ + Type section; + icl::add_intersection(section, object, operand); + object.swap(section); + return object; +} + +template +inline typename enable_if, Type>::type +operator & (Type object, const typename Type::element_type& operand) +{ + return object &= operand; +} + +template +inline typename enable_if, Type>::type +operator & (const typename Type::element_type& operand, Type object) +{ + return object &= operand; +} + + +template +inline typename enable_if, is_total >, Type>::type& +operator &=(Type& object, const Type& operand) +{ + object += operand; + return object; +} + +template +inline typename enable_if, mpl::not_ > >, Type>::type& +operator &=(Type& object, const Type& operand) +{ + Type section; + icl::add_intersection(section, object, operand); + object.swap(section); + return object; +} + +template +inline typename enable_if, Type>::type +operator & (Type object, const Type& operand) +{ + return object &= operand; +} + +template +inline typename enable_if, Type>::type +operator & (Type object, const typename Type::key_object_type& operand) +{ + return object &= operand; +} + +template +inline typename enable_if, Type>::type +operator & (const typename Type::key_object_type& operand, Type object) +{ + return object &= operand; +} + +//============================================================================== +//= Intersection bool intersects(x,y) +//============================================================================== +template +inline typename enable_if< mpl::and_< is_element_map + , is_total > + , bool>::type +intersects(const Type&, const CoType&) +{ + return true; +} + +template +inline typename enable_if< mpl::and_< is_element_map + , mpl::not_ > > + , bool>::type +intersects(const Type& object, const typename Type::domain_type& operand) +{ + return icl::contains(object, operand); +} + +template +inline typename enable_if< mpl::and_< is_element_map + , mpl::not_ > > + , bool>::type +intersects(const Type& object, const typename Type::set_type& operand) +{ + if(object.iterative_size() < operand.iterative_size()) + return Map::intersects(object, operand); + else + return Map::intersects(operand, object); +} + +template +inline typename enable_if< mpl::and_< is_element_map + , mpl::not_ > > + , bool>::type +intersects(const Type& object, const typename Type::element_type& operand) +{ + Type intersection; + icl::add_intersection(intersection, object, operand); + return !intersection.empty(); +} + +template +inline typename enable_if< mpl::and_< is_element_map + , mpl::not_ > > + , bool>::type +intersects(const Type& object, const Type& operand) +{ + if(object.iterative_size() < operand.iterative_size()) + return Map::intersects(object, operand); + else + return Map::intersects(operand, object); +} + +//============================================================================== +//= Symmetric difference +//============================================================================== +template +inline typename enable_if, Type>::type& +flip(Type& object, const typename Type::element_type& operand) +{ + return object.flip(operand); +} + +template +inline typename enable_if< mpl::and_< is_element_map + , is_total + , absorbs_identities > + , Type>::type& +operator ^= (Type& object, const CoType&) +{ + icl::clear(object); + return object; +} + +template +inline typename enable_if< mpl::and_< is_element_map + , is_total + , mpl::not_ > > + , Type>::type& +operator ^= (Type& object, const typename Type::element_type& operand) +{ + return object.flip(operand); +} + +template +inline typename enable_if< mpl::and_< is_element_map + , is_total + , mpl::not_ > > + , Type>::type& +operator ^= (Type& object, const Type& operand) +{ + ICL_const_FORALL(typename Type, it_, operand) + icl::flip(object, *it_); + + ICL_FORALL(typename Type, it2_, object) + it2_->second = identity_element::value(); + + return object; +} + + +template +inline typename enable_if< mpl::and_< is_element_map + , mpl::not_ > > + , Type>::type& +operator ^= (Type& object, const typename Type::element_type& operand) +{ + return icl::flip(object, operand); +} + +template +inline typename enable_if< mpl::and_< is_element_map + , mpl::not_ > > + , Type>::type& +operator ^= (Type& object, const Type& operand) +{ + typedef typename Type::const_iterator const_iterator; + const_iterator it_ = operand.begin(); + while(it_ != operand.end()) + icl::flip(object, *it_++); + + return object; +} + + +//============================================================================== +//= Set selection +//============================================================================== +template +inline typename enable_if, + typename Type::set_type>::type& +domain(typename Type::set_type& domain_set, const Type& object) +{ + typename Type::set_type::iterator prior_ = domain_set.end(); + typename Type::const_iterator it_ = object.begin(); + while(it_ != object.end()) + prior_ = domain_set.insert(prior_, (*it_++).first); + + return domain_set; +} + +//============================================================================== +//= Neutron absorbtion +//============================================================================== +template +inline typename enable_if + , absorbs_identities >, Type>::type& +absorb_identities(Type& object) +{ + typedef typename Type::element_type element_type; + return icl::erase_if(content_is_identity_element(), object); +} + +template +inline typename enable_if + , mpl::not_ > > + , Type>::type& +absorb_identities(Type&){} + +//============================================================================== +//= Streaming +//============================================================================== +template +inline typename enable_if, std::basic_ostream >::type& +operator << (std::basic_ostream& stream, const Type& object) +{ + stream << "{"; + ICL_const_FORALL(typename Type, it, object) + stream << "(" << it->first << "->" << it->second << ")"; + + return stream << "}"; +} + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/concept/element_set.hpp b/3party/boost/boost/icl/concept/element_set.hpp new file mode 100644 index 0000000000..64e771deb3 --- /dev/null +++ b/3party/boost/boost/icl/concept/element_set.hpp @@ -0,0 +1,141 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_ELEMENT_SET_HPP_JOFA_100921 +#define BOOST_ICL_CONCEPT_ELEMENT_SET_HPP_JOFA_100921 + +#include +#include +#include +#include + + +namespace boost{ namespace icl +{ + +//============================================================================== +//= Addition +//============================================================================== +/** \c add inserts \c operand into the map if it's key does + not exist in the map. + If \c operands's key value exists in the map, it's data + value is added to the data value already found in the map. */ +template +typename enable_if, Type>::type& +add(Type& object, const typename Type::value_type& operand) +{ + object.insert(operand); + return object; +} + +/** \c add add \c operand into the map using \c prior as a hint to + insert \c operand after the position \c prior is pointing to. */ +template +typename enable_if, typename Type::iterator>::type +add(Type& object, typename Type::iterator prior, + const typename Type::value_type& operand) +{ + return object.insert(prior, operand); +} + +//============================================================================== +//= Subtraction +//============================================================================== +/** If the \c operand's key value is in the map, it's data value is + subtraced from the data value stored in the map. */ +template +typename enable_if, Type>::type& +subtract(Type& object, const typename Type::value_type& operand) +{ + object.erase(operand); + return object; +} + + +//============================================================================== +//= Intersection +//============================================================================== +template +inline typename enable_if, Type>::type +operator & (Type object, const Type& operand) +{ + return object &= operand; +} + +template +inline typename enable_if, bool>::type +intersects(const Type& object, const typename Type::key_type& operand) +{ + return !(object.find(operand) == object.end()); +} + +template +inline typename enable_if, bool>::type +intersects(const Type& object, const Type& operand) +{ + if(iterative_size(object) < iterative_size(operand)) + return Set::intersects(object, operand); + else + return Set::intersects(operand, object); +} + +//============================================================================== +//= Symmetric difference +//============================================================================== +template +inline typename enable_if, Type>::type& +flip(Type& object, const typename Type::value_type& operand) +{ + typedef typename Type::iterator iterator; + std::pair insertion = object.insert(operand); + if(!insertion.second) + object.erase(insertion.first); + + return object; +} + +template +inline typename enable_if, Type>::type& +operator ^= (Type& object, const typename Type::element_tpye& operand) +{ + return icl::flip(object, operand); +} + +/** Symmetric subtract map \c x2 and \c *this. + So \c *this becomes the symmetric difference of \c *this and \c x2 */ +template +inline typename enable_if, Type>::type& +operator ^= (Type& object, const Type& operand) +{ + typedef typename Type::const_iterator const_iterator; + const_iterator it_ = operand.begin(); + while(it_ != operand.end()) + icl::flip(object, *it_++); + + return object; +} + +//============================================================================== +//= Streaming +//============================================================================== +template +inline typename enable_if, std::basic_ostream >::type& +operator << (std::basic_ostream& stream, const Type& object) +{ + stream << "{"; + ICL_const_FORALL(typename Type, it, object) + stream << (*it) << " "; + + return stream << "}"; +} + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/concept/element_set_value.hpp b/3party/boost/boost/icl/concept/element_set_value.hpp new file mode 100644 index 0000000000..274fc549db --- /dev/null +++ b/3party/boost/boost/icl/concept/element_set_value.hpp @@ -0,0 +1,31 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_ELEMENT_SET_VALUE_HPP_JOFA_100924 +#define BOOST_ICL_CONCEPT_ELEMENT_SET_VALUE_HPP_JOFA_100924 + +#include + +namespace boost{ namespace icl +{ + +//============================================================================== +//= AlgoUnifiers +//============================================================================== +template +inline typename enable_if, const typename Type::key_type>::type& +co_value(Iterator it_) +{ + return *it_; +} + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/concept/interval.hpp b/3party/boost/boost/icl/concept/interval.hpp new file mode 100644 index 0000000000..98b6f85bfc --- /dev/null +++ b/3party/boost/boost/icl/concept/interval.hpp @@ -0,0 +1,1348 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_INTERVAL_HPP_JOFA_100323 +#define BOOST_ICL_CONCEPT_INTERVAL_HPP_JOFA_100323 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + + +namespace boost{namespace icl +{ + +//============================================================================== +//= Ordering +//============================================================================== +template +inline typename enable_if, bool>::type +domain_less(const typename interval_traits::domain_type& left, + const typename interval_traits::domain_type& right) +{ + return typename interval_traits::domain_compare()(left, right); +} + +template +inline typename enable_if, bool>::type +domain_less_equal(const typename interval_traits::domain_type& left, + const typename interval_traits::domain_type& right) +{ + return !(typename interval_traits::domain_compare()(right, left)); +} + +template +inline typename enable_if, bool>::type +domain_equal(const typename interval_traits::domain_type& left, + const typename interval_traits::domain_type& right) +{ + typedef typename interval_traits::domain_compare domain_compare; + return !(domain_compare()(left, right)) && !(domain_compare()(right, left)); +} + +//============================================================================== +//= Construct singleton +//============================================================================== +template +typename enable_if +< + mpl::and_< is_static_right_open + , is_discrete::domain_type> > + , Type +>::type +singleton(const typename interval_traits::domain_type& value) +{ + //ASSERT: This always creates an interval with exactly one element + return interval_traits::construct(value, icl::succ(value)); +} + +template +typename enable_if +< + mpl::and_< is_static_left_open + , is_discrete::domain_type> > + , Type +>::type +singleton(const typename interval_traits::domain_type& value) +{ + //ASSERT: This always creates an interval with exactly one element + typedef typename interval_traits::domain_type domain_type; + BOOST_ASSERT((numeric_minimum::value >::is_less_than(value) )); + + return interval_traits::construct(icl::pred(value), value); +} + +template +typename enable_if, Type>::type +singleton(const typename interval_traits::domain_type& value) +{ + //ASSERT: This always creates an interval with exactly one element + typedef typename interval_traits::domain_type domain_type; + BOOST_ASSERT((numeric_minimum::value >::is_less_than(value))); + + return interval_traits::construct(icl::pred(value), icl::succ(value)); +} + +template +typename enable_if, Type>::type +singleton(const typename interval_traits::domain_type& value) +{ + //ASSERT: This always creates an interval with exactly one element + return interval_traits::construct(value, value); +} + +template +typename enable_if, Type>::type +singleton(const typename interval_traits::domain_type& value) +{ + return dynamic_interval_traits::construct(value, value, interval_bounds::closed()); +} + +//============================================================================== +//= Construct multon +//============================================================================== +template +typename enable_if, Type>::type +construct(const typename interval_traits::domain_type& low, + const typename interval_traits::domain_type& up ) +{ + return interval_traits::construct(low, up); +} + +template +typename enable_if, Type>::type +construct(const typename interval_traits::domain_type& low, + const typename interval_traits::domain_type& up, + interval_bounds bounds = interval_bounds::right_open()) +{ + return dynamic_interval_traits::construct(low, up, bounds); +} + + +//- construct form bounded values ---------------------------------------------- +template +typename enable_if, Type>::type +construct(const typename Type::bounded_domain_type& low, + const typename Type::bounded_domain_type& up) +{ + return dynamic_interval_traits::construct_bounded(low, up); +} + +template +typename enable_if, Type>::type +span(const typename interval_traits::domain_type& left, + const typename interval_traits::domain_type& right) +{ + if(interval_traits::domain_compare(left,right)) + return construct(left, right); + else + return construct(right, left); +} + + +//============================================================================== +template +typename enable_if, Type>::type +hull(const typename interval_traits::domain_type& left, + const typename interval_traits::domain_type& right) +{ + if(interval_traits::domain_compare(left,right)) + return construct(left, icl::succ(right)); + else + return construct(right, icl::succ(left)); +} + +template +typename enable_if, Type>::type +hull(const typename interval_traits::domain_type& left, + const typename interval_traits::domain_type& right) +{ + typedef typename interval_traits::domain_type domain_type; + if(interval_traits::domain_compare(left,right)) + { + BOOST_ASSERT((numeric_minimum::value >::is_less_than(left) )); + return construct(icl::pred(left), right); + } + else + { + BOOST_ASSERT((numeric_minimum::value >::is_less_than(right) )); + return construct(icl::pred(right), left); + } +} + +template +typename enable_if, Type>::type +hull(const typename interval_traits::domain_type& left, + const typename interval_traits::domain_type& right) +{ + if(interval_traits::domain_compare(left,right)) + return construct(left, right); + else + return construct(right, left); +} + +template +typename enable_if, Type>::type +hull(const typename interval_traits::domain_type& left, + const typename interval_traits::domain_type& right) +{ + typedef typename interval_traits::domain_type domain_type; + if(interval_traits::domain_compare(left,right)) + { + BOOST_ASSERT((numeric_minimum::value >::is_less_than(left) )); + return construct(icl::pred(left), icl::succ(right)); + } + else + { + BOOST_ASSERT((numeric_minimum::value >::is_less_than(right) )); + return construct(icl::pred(right), icl::succ(left)); + } +} + +template +typename enable_if, Type>::type +hull(const typename interval_traits::domain_type& left, + const typename interval_traits::domain_type& right) +{ + if(interval_traits::domain_compare(left,right)) + return construct(left, right, interval_bounds::closed()); + else + return construct(right, left, interval_bounds::closed()); +} + +//============================================================================== +//= Selection +//============================================================================== + +template +inline typename enable_if, + typename interval_traits::domain_type>::type +lower(const Type& object) +{ + return interval_traits::lower(object); +} + +template +inline typename enable_if, + typename interval_traits::domain_type>::type +upper(const Type& object) +{ + return interval_traits::upper(object); +} + + +//- first ---------------------------------------------------------------------- +template +inline typename +enable_if< mpl::or_, is_static_closed > + , typename interval_traits::domain_type>::type +first(const Type& object) +{ + return lower(object); +} + +template +inline typename +enable_if< mpl::and_< mpl::or_, is_static_open > + , is_discrete::domain_type> > + , typename interval_traits::domain_type>::type +first(const Type& object) +{ + return icl::succ(lower(object)); +} + +template +inline typename enable_if, + typename interval_traits::domain_type>::type +first(const Type& object) +{ + return is_left_closed(object.bounds()) ? + lower(object) : + icl::succ(lower(object)); +} + +//- last ----------------------------------------------------------------------- +template +inline typename +enable_if< mpl::or_, is_static_closed > + , typename interval_traits::domain_type>::type +last(const Type& object) +{ + return upper(object); +} + +template +inline typename +enable_if< mpl::and_< mpl::or_, is_static_open > + , is_discrete::domain_type> > + , typename interval_traits::domain_type>::type +last(const Type& object) +{ + typedef typename interval_traits::domain_type domain_type; + BOOST_ASSERT((numeric_minimum::value> + ::is_less_than(upper(object)) )); + return icl::pred(upper(object)); +} + +template +inline typename enable_if, + typename interval_traits::domain_type>::type +last(const Type& object) +{ + typedef typename interval_traits::domain_type domain_type; + BOOST_ASSERT((numeric_minimum::value> + ::is_less_than_or(upper(object), is_right_closed(object.bounds())) )); + return is_right_closed(object.bounds()) ? + upper(object) : + icl::pred(upper(object)); +} + +//- last_next ------------------------------------------------------------------ +template +inline typename +enable_if< mpl::and_< mpl::or_, is_static_closed > + , is_discrete::domain_type> > + , typename interval_traits::domain_type>::type +last_next(const Type& object) +{ + return icl::succ(upper(object)); +} + +template +inline typename +enable_if< mpl::and_< mpl::or_, is_static_open > + , is_discrete::domain_type> > + , typename interval_traits::domain_type>::type +last_next(const Type& object) +{ + typedef typename interval_traits::domain_type domain_type; + return upper(object); // NOTE: last_next is implemented to avoid calling pred(object) +} // For unsigned integral types this may cause underflow. + +template +inline typename enable_if, + typename interval_traits::domain_type>::type +last_next(const Type& object) +{ + return is_right_closed(object.bounds()) ? + icl::succ(upper(object)): + upper(object) ; +} + +//------------------------------------------------------------------------------ +template +typename enable_if, + typename Type::bounded_domain_type>::type +bounded_lower(const Type& object) +{ + return typename + Type::bounded_domain_type(lower(object), object.bounds().left()); +} + +template +typename enable_if, + typename Type::bounded_domain_type>::type +reverse_bounded_lower(const Type& object) +{ + return typename + Type::bounded_domain_type(lower(object), + object.bounds().reverse_left()); +} + +template +typename enable_if, + typename Type::bounded_domain_type>::type +bounded_upper(const Type& object) +{ + return typename + Type::bounded_domain_type(upper(object), + object.bounds().right()); +} + +template +typename enable_if, + typename Type::bounded_domain_type>::type +reverse_bounded_upper(const Type& object) +{ + return typename + Type::bounded_domain_type(upper(object), + object.bounds().reverse_right()); +} + +//- bounds --------------------------------------------------------------------- +template +inline typename enable_if, interval_bounds>::type +bounds(const Type& object) +{ + return object.bounds(); +} + +template +inline typename enable_if, interval_bounds>::type +bounds(const Type&) +{ + return interval_bounds(interval_bound_type::value); +} + + +//============================================================================== +//= Emptieness +//============================================================================== +/** Is the interval empty? */ +template +typename boost::enable_if, bool>::type +is_empty(const Type& object) +{ + return domain_less_equal(upper(object), lower(object)); +} + +template +typename boost::enable_if, bool>::type +is_empty(const Type& object) +{ + return domain_less(upper(object), lower(object)); +} + +template +typename boost::enable_if, bool>::type +is_empty(const Type& object) +{ + return domain_less_equal(upper(object), icl::succ(lower(object))); +} + +template +typename boost::enable_if, bool>::type +is_empty(const Type& object) +{ + if(object.bounds() == interval_bounds::closed()) + return domain_less(upper(object), lower(object)); + else if(object.bounds() == interval_bounds::open()) + return domain_less_equal(upper(object), icl::succ(lower(object))); + else + return domain_less_equal(upper(object), lower(object)); +} + +template +typename boost::enable_if, bool>::type +is_empty(const Type& object) +{ + return domain_less(upper(object), lower(object)) + || ( domain_equal(upper(object), lower(object)) + && object.bounds() != interval_bounds::closed() ); +} + +//============================================================================== +//= Orderings, containedness (non empty) +//============================================================================== +namespace non_empty +{ + + template + inline typename boost::enable_if, bool>::type + exclusive_less(const Type& left, const Type& right) + { + BOOST_ASSERT(!(icl::is_empty(left) || icl::is_empty(right))); + return domain_less_equal(upper(left), lower(right)); + } + + template + inline typename boost::enable_if, bool>::type + exclusive_less(const Type& left, const Type& right) + { + BOOST_ASSERT(!(icl::is_empty(left) || icl::is_empty(right))); + return domain_less(last(left), first(right)); + } + + template + inline typename boost:: + enable_if, bool>::type + exclusive_less(const Type& left, const Type& right) + { + BOOST_ASSERT(!(icl::is_empty(left) || icl::is_empty(right))); + return domain_less(last(left), first(right)); + } + + template + inline typename boost::enable_if, bool>::type + exclusive_less(const Type& left, const Type& right) + { + BOOST_ASSERT(!(icl::is_empty(left) || icl::is_empty(right))); + return domain_less (left.upper(), right.lower()) + || ( domain_equal(left.upper(), right.lower()) + && inner_bounds(left,right) != interval_bounds::open() ); + } + + template + inline typename boost::enable_if, bool>::type + contains(const Type& super, const Type& sub) + { + return lower_less_equal(super,sub) && upper_less_equal(sub,super); + } + + +} //namespace non_empty + + +//- contains ------------------------------------------------------------------- +template +inline typename boost::enable_if, bool>::type +contains(const Type& super, const Type& sub) +{ + return icl::is_empty(sub) || non_empty::contains(super, sub); +} + +template +typename boost::enable_if, bool>::type +contains(const Type& super, const typename interval_traits::domain_type& element) +{ + return domain_less_equal(icl::first(super), element ) + && domain_less_equal( element, icl::last(super)); +} + +template +typename boost::enable_if, bool>::type +contains(const Type& super, const typename interval_traits::domain_type& element) +{ + return domain_less (icl::lower(super), element ) + && domain_less_equal( element, icl::upper(super)); +} + +template +typename boost::enable_if, bool>::type +contains(const Type& super, const typename interval_traits::domain_type& element) +{ + return domain_less_equal(icl::lower(super), element ) + && domain_less ( element, icl::upper(super)); +} + +template +typename boost::enable_if, bool>::type +contains(const Type& super, const typename interval_traits::domain_type& element) +{ + return + (is_left_closed(super.bounds()) + ? domain_less_equal(super.lower(), element) + : domain_less(super.lower(), element)) + && + (is_right_closed(super.bounds()) + ? domain_less_equal(element, super.upper()) + : domain_less(element, super.upper())); +} + +//- within --------------------------------------------------------------------- +template +inline typename boost::enable_if, bool>::type +within(const Type& sub, const Type& super) +{ + return contains(super,sub); +} + + +//============================================================================== +//= Equivalences and Orderings +//============================================================================== +//- exclusive_less ------------------------------------------------------------- +/** Maximal element of left is less than the minimal element of + right */ +template +inline typename boost::enable_if, bool>::type +exclusive_less(const Type& left, const Type& right) +{ + return icl::is_empty(left) || icl::is_empty(right) + || domain_less_equal(upper(left), lower(right)); +} + +template +inline typename boost::enable_if, bool>::type +exclusive_less(const Type& left, const Type& right) +{ + return icl::is_empty(left) || icl::is_empty(right) + || domain_less(last(left), first(right)); +} + +template +inline typename boost:: +enable_if, bool>::type +exclusive_less(const Type& left, const Type& right) +{ + return icl::is_empty(left) || icl::is_empty(right) + || domain_less(last(left), first(right)); +} + +template +inline typename boost::enable_if, bool>::type +exclusive_less(const Type& left, const Type& right) +{ + return icl::is_empty(left) || icl::is_empty(right) + || domain_less(left.upper(), right.lower()) + || ( domain_equal(left.upper(), right.lower()) + && inner_bounds(left,right) != interval_bounds::open() ); +} + + +//------------------------------------------------------------------------------ +template +typename boost::enable_if, bool>::type +lower_less(const Type& left, const Type& right) +{ + return domain_less(left.lower(), right.lower()); +} + +template +typename boost::enable_if, bool>::type +lower_less(const Type& left, const Type& right) +{ + return domain_less(first(left), first(right)); +} + +template +typename boost::enable_if, bool>::type +lower_less(const Type& left, const Type& right) +{ + if(left_bounds(left,right) == interval_bounds::right_open()) //'[(' == 10 + return domain_less_equal(left.lower(), right.lower()); + else + return domain_less(left.lower(), right.lower()); +} + + +//------------------------------------------------------------------------------ +template +typename boost::enable_if, bool>::type +upper_less(const Type& left, const Type& right) +{ + return domain_less(left.upper(), right.upper()); +} + +template +typename boost::enable_if, bool>::type +upper_less(const Type& left, const Type& right) +{ + return domain_less(last(left), last(right)); +} + +template +typename boost::enable_if, bool>::type +upper_less(const Type& left, const Type& right) +{ + if(right_bounds(left,right) == interval_bounds::left_open()) + return domain_less_equal(left.upper(), right.upper()); + else + return domain_less(left.upper(), right.upper()); +} + +//------------------------------------------------------------------------------ +template +typename boost::enable_if, + typename Type::bounded_domain_type >::type +lower_min(const Type& left, const Type& right) +{ + return lower_less(left, right) ? bounded_lower(left) : bounded_lower(right); +} + +//------------------------------------------------------------------------------ +template +typename boost::enable_if, + typename Type::bounded_domain_type >::type +lower_max(const Type& left, const Type& right) +{ + return lower_less(left, right) ? bounded_lower(right) : bounded_lower(left); +} + +//------------------------------------------------------------------------------ +template +typename boost::enable_if, + typename Type::bounded_domain_type >::type +upper_max(const Type& left, const Type& right) +{ + return upper_less(left, right) ? bounded_upper(right) : bounded_upper(left); +} + +//------------------------------------------------------------------------------ +template +typename boost::enable_if, + typename Type::bounded_domain_type >::type +upper_min(const Type& left, const Type& right) +{ + return upper_less(left, right) ? bounded_upper(left) : bounded_upper(right); +} + + +//------------------------------------------------------------------------------ +template +typename boost::enable_if, bool>::type +lower_equal(const Type& left, const Type& right) +{ + return domain_equal(left.lower(), right.lower()); +} + +template +typename boost::enable_if, bool>::type +lower_equal(const Type& left, const Type& right) +{ + return domain_equal(first(left), first(right)); +} + +template +typename boost::enable_if, bool>::type +lower_equal(const Type& left, const Type& right) +{ + return domain_equal(first(left), first(right)); +} + +template +typename boost::enable_if, bool>::type +lower_equal(const Type& left, const Type& right) +{ + return (left.bounds().left()==right.bounds().left()) + && domain_equal(left.lower(), right.lower()); +} + + +//------------------------------------------------------------------------------ +template +typename boost::enable_if, bool>::type +upper_equal(const Type& left, const Type& right) +{ + return domain_equal(left.upper(), right.upper()); +} + +template +typename boost::enable_if, bool>::type +upper_equal(const Type& left, const Type& right) +{ + return domain_equal(last(left), last(right)); +} + +template +typename boost::enable_if, bool>::type +upper_equal(const Type& left, const Type& right) +{ + return domain_equal(last(left), last(right)); +} + +template +typename boost::enable_if, bool>::type +upper_equal(const Type& left, const Type& right) +{ + return (left.bounds().right()==right.bounds().right()) + && domain_equal(left.upper(), right.upper()); +} + +//------------------------------------------------------------------------------ +template +typename boost::enable_if, bool>::type +lower_less_equal(const Type& left, const Type& right) +{ + return lower_less(left,right) || lower_equal(left,right); +} + +template +typename boost::enable_if, bool>::type +upper_less_equal(const Type& left, const Type& right) +{ + return upper_less(left,right) || upper_equal(left,right); +} + + +//- operator == ---------------------------------------------------------------- +template +typename boost::enable_if, bool>::type +operator == (const Type& left, const Type& right) +{ + return (icl::is_empty(left) && icl::is_empty(right)) + || (lower_equal(left,right) && upper_equal(left,right)); +} + +template +typename boost::enable_if, bool>::type +operator != (const Type& left, const Type& right) +{ + return !(left == right); +} + +//- operator < ----------------------------------------------------------------- +template +typename boost::enable_if, bool>::type +operator < (const Type& left, const Type& right) +{ + if(icl::is_empty(left)) + return !icl::is_empty(right); + else + return lower_less(left,right) + || (lower_equal(left,right) && upper_less(left,right)); +} + + + +//------------------------------------------------------------------------------ +template +typename boost::enable_if, bool>::type +touches(const Type& left, const Type& right) +{ + return domain_equal(upper(left), lower(right)); +} + +template +typename boost::enable_if, bool>::type +touches(const Type& left, const Type& right) +{ + return domain_equal(last_next(left), first(right)); +} + +template +typename boost::enable_if, bool>::type +touches(const Type& left, const Type& right) +{ + return domain_equal(icl::succ(last(left)), first(right)); +} + +template +typename boost::enable_if, bool>::type +touches(const Type& left, const Type& right) +{ + return is_complementary(inner_bounds(left,right)) + && domain_equal(left.upper(), right.lower()); +} + + +//============================================================================== +//= Size +//============================================================================== +//- cardinality ---------------------------------------------------------------- + +template +typename boost::enable_if, + typename size_type_of >::type>::type +cardinality(const Type& object) +{ + typedef typename size_type_of >::type SizeT; + if(icl::is_empty(object)) + return icl::identity_element::value(); + else if( object.bounds() == interval_bounds::closed() + && domain_equal(lower(object), upper(object))) + return icl::unit_element::value(); + else + return infinity::value(); +} + +template +typename boost::enable_if, + typename size_type_of >::type>::type +cardinality(const Type& object) +{ + typedef typename size_type_of >::type SizeT; + return icl::is_empty(object) ? identity_element::value() + : static_cast(last_next(object) - first(object)); +} + +template +typename boost::enable_if, + typename size_type_of >::type>::type +cardinality(const Type& object) +{ + typedef typename size_type_of >::type SizeT; + if(icl::is_empty(object)) + return icl::identity_element::value(); + else + return infinity::value(); +} + +template +typename boost::enable_if, + typename size_type_of >::type>::type +cardinality(const Type& object) +{ + typedef typename size_type_of >::type SizeT; + return icl::is_empty(object) ? identity_element::value() + : static_cast(last_next(object) - first(object)); +} + +template +typename boost::enable_if, + typename size_type_of >::type>::type +cardinality(const Type& object) +{ + typedef typename size_type_of >::type SizeT; + return icl::is_empty(object) ? identity_element::value() + : static_cast(last_next(object) - first(object)); +} + + + +//- size ----------------------------------------------------------------------- +template +inline typename enable_if, + typename size_type_of >::type>::type +size(const Type& object) +{ + return cardinality(object); +} + +//- length --------------------------------------------------------------------- +template +inline typename boost::enable_if, + typename difference_type_of >::type>::type +length(const Type& object) +{ + typedef typename difference_type_of >::type DiffT; + return icl::is_empty(object) ? identity_element::value() + : upper(object) - lower(object); +} + +template +inline typename boost::enable_if, + typename difference_type_of >::type>::type +length(const Type& object) +{ + typedef typename difference_type_of >::type DiffT; + return icl::is_empty(object) ? identity_element::value() + : last_next(object) - first(object); +} + +template +typename boost::enable_if, + typename difference_type_of >::type>::type +length(const Type& object) +{ + typedef typename difference_type_of >::type DiffT; + return icl::is_empty(object) ? identity_element::value() + : upper(object) - lower(object); +} + +template +inline typename boost::enable_if, + typename difference_type_of >::type>::type +length(const Type& object) +{ + typedef typename difference_type_of >::type DiffT; + return icl::is_empty(object) ? identity_element::value() + : last_next(object) - first(object); +} + +//- iterative_size ------------------------------------------------------------- +template +inline typename enable_if, + typename size_type_of >::type>::type +iterative_size(const Type& object) +{ + return 2; +} + + +//============================================================================== +//= Addition +//============================================================================== +//- hull ----------------------------------------------------------------------- +/** \c hull returns the smallest interval containing \c left and \c right. */ +template +typename boost::enable_if, Type>::type +hull(Type left, const Type& right) +{ + typedef typename interval_traits::domain_compare domain_compare; + + if(icl::is_empty(right)) + return left; + else if(icl::is_empty(left)) + return right; + + return + construct + ( + (std::min)(lower(left), lower(right), domain_compare()), + (std::max)(upper(left), upper(right), domain_compare()) + ); +} + +template +typename boost::enable_if, Type>::type +hull(Type left, const Type& right) +{ + if(icl::is_empty(right)) + return left; + else if(icl::is_empty(left)) + return right; + + return dynamic_interval_traits::construct_bounded + ( + lower_min(left, right), + upper_max(left, right) + ); +} + +//============================================================================== +//= Subtraction +//============================================================================== +//- left_subtract -------------------------------------------------------------- +/** subtract \c left_minuend from the \c right interval on it's left side. + Return the difference: The part of \c right right of \c left_minuend. +\code +right_over = right - left_minuend; //on the left. +... d) : right +... c) : left_minuend + [c d) : right_over +\endcode +*/ +template +typename boost::enable_if, Type>::type +left_subtract(Type right, const Type& left_minuend) +{ + if(exclusive_less(left_minuend, right)) + return right; + + return construct(upper(left_minuend), upper(right)); +} + +template +typename boost::enable_if, Type>::type +left_subtract(Type right, const Type& left_minuend) +{ + if(exclusive_less(left_minuend, right)) + return right; + + return construct(icl::succ(upper(left_minuend)), upper(right)); +} + +template +typename boost::enable_if, Type>::type +left_subtract(Type right, const Type& left_minuend) +{ + if(exclusive_less(left_minuend, right)) + return right; + + return construct(icl::pred(upper(left_minuend)), upper(right)); +} + +template +typename boost::enable_if, Type>::type +left_subtract(Type right, const Type& left_minuend) +{ + if(exclusive_less(left_minuend, right)) + return right; + return dynamic_interval_traits::construct_bounded + ( reverse_bounded_upper(left_minuend), bounded_upper(right) ); +} + + +//- right_subtract ------------------------------------------------------------- +/** subtract \c right_minuend from the \c left interval on it's right side. + Return the difference: The part of \c left right of \c right_minuend. +\code +left_over = left - right_minuend; //on the right side. +[a ... : left + [b ... : right_minuend +[a b) : left_over +\endcode +*/ +template +typename boost::enable_if, Type>::type +right_subtract(Type left, const Type& right_minuend) +{ + if(exclusive_less(left, right_minuend)) + return left; + return construct(lower(left), lower(right_minuend)); +} + +template +typename boost::enable_if, Type>::type +right_subtract(Type left, const Type& right_minuend) +{ + if(exclusive_less(left, right_minuend)) + return left; + else if(lower_less_equal(right_minuend, left)) + return identity_element::value(); + + return construct(lower(left), icl::pred(lower(right_minuend))); +} + +template +typename boost::enable_if, Type>::type +right_subtract(Type left, const Type& right_minuend) +{ + if(exclusive_less(left, right_minuend)) + return left; + + return construct(lower(left), icl::succ(lower(right_minuend))); +} + +template +typename boost::enable_if, Type>::type +right_subtract(Type left, const Type& right_minuend) +{ + if(exclusive_less(left, right_minuend)) + return left; + + return dynamic_interval_traits::construct_bounded + ( bounded_lower(left), reverse_bounded_lower(right_minuend) ); +} + +//============================================================================== +//= Intersection +//============================================================================== +//- operator & ----------------------------------------------------------------- +/** Returns the intersection of \c left and \c right interval. */ +template +typename boost::enable_if, Type>::type +operator & (Type left, const Type& right) +{ + typedef typename interval_traits::domain_compare domain_compare; + + if(icl::is_empty(left) || icl::is_empty(right)) + return identity_element::value(); + else + return + construct + ( + (std::max)(icl::lower(left), icl::lower(right), domain_compare()), + (std::min)(icl::upper(left), icl::upper(right), domain_compare()) + ); +} + +template +typename boost::enable_if, Type>::type +operator & (Type left, const Type& right) +{ + typedef typename interval_traits::domain_compare domain_compare; + + if(icl::is_empty(left) || icl::is_empty(right)) + return identity_element::value(); + else + return + construct + ( + (std::max)(icl::lower(left), icl::lower(right), domain_compare()), + (std::min)(icl::upper(left), icl::upper(right), domain_compare()) + ); +} + +template +typename boost::enable_if, Type>::type +operator & (Type left, const Type& right) +{ + if(icl::is_empty(left) || icl::is_empty(right)) + return identity_element::value(); + else + return dynamic_interval_traits::construct_bounded + ( + lower_max(left, right), + upper_min(left, right) + ); +} + + +//- intersects ----------------------------------------------------------------- +template +typename boost::enable_if, bool>::type +intersects(const Type& left, const Type& right) +{ + return !( icl::is_empty(left) || icl::is_empty(right) + || exclusive_less(left,right) || exclusive_less(right,left)); +} + +//- disjoint ------------------------------------------------------------------- +template +typename boost::enable_if, bool>::type +disjoint(const Type& left, const Type& right) +{ + return icl::is_empty(left) || icl::is_empty(right) + || exclusive_less(left,right) || exclusive_less(right,left); +} + +//============================================================================== +//= Complement +//============================================================================== + +template +typename boost::enable_if, Type>::type +inner_complement(const Type& left, const Type& right) +{ + if(icl::is_empty(left) || icl::is_empty(right)) + return identity_element::value(); + else if(exclusive_less(left, right)) + return construct(upper(left), lower(right)); + else if(exclusive_less(right, left)) + return construct(upper(right), lower(left)); + else + return identity_element::value(); +} + +template +typename boost::enable_if, Type>::type +inner_complement(const Type& left, const Type& right) +{ + if(icl::is_empty(left) || icl::is_empty(right)) + return identity_element::value(); + else if(exclusive_less(left, right)) + return construct(icl::succ(upper(left)), icl::pred(lower(right))); + else if(exclusive_less(right, left)) + return construct(icl::succ(upper(right)), icl::pred(lower(left))); + else + return identity_element::value(); +} + +template +typename boost::enable_if, Type>::type +inner_complement(const Type& left, const Type& right) +{ + if(icl::is_empty(left) || icl::is_empty(right)) + return identity_element::value(); + else if(exclusive_less(left, right)) + return construct(last(left), first(right)); + else if(exclusive_less(right, left)) + return construct(last(right), first(left)); + else + return identity_element::value(); +} + +template +typename boost::enable_if, Type>::type +inner_complement(const Type& left, const Type& right) +{ + if(icl::is_empty(left) || icl::is_empty(right)) + return identity_element::value(); + else if(exclusive_less(left, right)) + return right_subtract(left_subtract(hull(left, right), left), right); + else if(exclusive_less(right, left)) + return right_subtract(left_subtract(hull(right, left), right), left); + else + return identity_element::value(); +} + +template +inline typename boost::enable_if, Type>::type +between(const Type& left, const Type& right) +{ + return inner_complement(left, right); +} + + + +//============================================================================== +//= Distance +//============================================================================== +template +typename boost:: +enable_if< mpl::and_< is_interval + , has_difference::domain_type> + , is_discrete::domain_type> + > + , typename difference_type_of >::type>::type +distance(const Type& x1, const Type& x2) +{ + typedef typename difference_type_of >::type difference_type; + + if(icl::is_empty(x1) || icl::is_empty(x2)) + return icl::identity_element::value(); + else if(domain_less(last(x1), first(x2))) + return static_cast(icl::pred(first(x2) - last(x1))); + else if(domain_less(last(x2), first(x1))) + return static_cast(icl::pred(first(x1) - last(x2))); + else + return icl::identity_element::value(); +} + +template +typename boost:: +enable_if< mpl::and_< is_interval + , has_difference::domain_type> + , is_continuous::domain_type> + > + , typename difference_type_of >::type>::type +distance(const Type& x1, const Type& x2) +{ + typedef typename difference_type_of >::type DiffT; + + if(icl::is_empty(x1) || icl::is_empty(x2)) + return icl::identity_element::value(); + else if(domain_less(upper(x1), lower(x2))) + return x2.lower() - x1.upper(); + else if(domain_less(upper(x2), lower(x1))) + return lower(x1) - upper(x2); + else + return icl::identity_element::value(); +} + +//============================================================================== +//= Streaming, representation +//============================================================================== +template +typename boost:: + enable_if< mpl::or_< is_static_left_open + , is_static_open >, std::string>::type +left_bracket(const Type&) { return "("; } + +template +typename boost:: + enable_if< mpl::or_< is_static_right_open + , is_static_closed >, std::string>::type +left_bracket(const Type&) { return "["; } + +template +typename boost::enable_if, std::string>::type +left_bracket(const Type& object) +{ + return left_bracket(object.bounds()); +} + +//------------------------------------------------------------------------------ +template +typename boost:: + enable_if< mpl::or_< is_static_right_open + , is_static_open >, std::string>::type +right_bracket(const Type&) { return ")"; } + +template +typename boost:: + enable_if< mpl::or_< is_static_left_open + , is_static_closed >, std::string>::type +right_bracket(const Type&) { return "]"; } + +template +typename boost::enable_if, std::string>::type +right_bracket(const Type& object) +{ + return right_bracket(object.bounds()); +} + +//------------------------------------------------------------------------------ +template +typename boost::enable_if, + std::basic_ostream >::type& +operator << (std::basic_ostream &stream, Type const& object) +{ + if(boost::icl::is_empty(object)) + return stream << left_bracket(object) << right_bracket(object); + else + return stream << left_bracket(object) + << interval_traits::lower(object) + << "," + << interval_traits::upper(object) + << right_bracket(object) ; +} + + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/concept/interval_associator.hpp b/3party/boost/boost/icl/concept/interval_associator.hpp new file mode 100644 index 0000000000..38188e146c --- /dev/null +++ b/3party/boost/boost/icl/concept/interval_associator.hpp @@ -0,0 +1,947 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_INTERVAL_ASSOCIATOR_HPP_JOFA_100920 +#define BOOST_ICL_CONCEPT_INTERVAL_ASSOCIATOR_HPP_JOFA_100920 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + +//============================================================================== +//= Containedness +//============================================================================== +//------------------------------------------------------------------------------ +//- bool within(c T&, c P&) T={Set,Map} P={e i b p S M} +//------------------------------------------------------------------------------ +template +typename enable_if, bool>::type +within(const SubT& sub, const SuperT& super) +{ + return icl::contains(super, sub); +} + +//============================================================================== +//= Equivalences and Orderings +//============================================================================== +template +inline typename enable_if, bool>::type +operator == (const Type& left, const Type& right) +{ + return Set::lexicographical_equal(left, right); +} + +template +inline typename enable_if, bool>::type +operator < (const Type& left, const Type& right) +{ + typedef typename Type::segment_compare segment_compare; + return std::lexicographical_compare( + left.begin(), left.end(), right.begin(), right.end(), + segment_compare() + ); +} + +/** Returns true, if \c left and \c right contain the same elements. + Complexity: linear. */ +template +typename enable_if, bool>::type +is_element_equal(const LeftT& left, const RightT& right) +{ + return Interval_Set::is_element_equal(left, right); +} + +/** Returns true, if \c left is lexicographically less than \c right. + Intervals are interpreted as sequence of elements. + Complexity: linear. */ +template +typename enable_if, bool>::type +is_element_less(const LeftT& left, const RightT& right) +{ + return Interval_Set::is_element_less(left, right); +} + +/** Returns true, if \c left is lexicographically greater than \c right. + Intervals are interpreted as sequence of elements. + Complexity: linear. */ +template +typename enable_if, bool>::type +is_element_greater(const LeftT& left, const RightT& right) +{ + return Interval_Set::is_element_greater(left, right); +} + +//------------------------------------------------------------------------------ +template +typename enable_if, int>::type +inclusion_compare(const LeftT& left, const RightT& right) +{ + return Interval_Set::subset_compare(left, right, + left.begin(), left.end(), + right.begin(), right.end()); +} + +//------------------------------------------------------------------------------ +template +typename enable_if< is_concept_compatible, + bool >::type +is_distinct_equal(const LeftT& left, const RightT& right) +{ + return Map::lexicographical_distinct_equal(left, right); +} + +//============================================================================== +//= Size +//============================================================================== +template +typename enable_if, std::size_t>::type +iterative_size(const Type& object) +{ + return object.iterative_size(); +} + +template +typename enable_if +< mpl::and_< is_interval_container + , is_discrete > +, typename Type::size_type +>::type +cardinality(const Type& object) +{ + typedef typename Type::size_type size_type; + typedef typename Type::interval_type interval_type; + + size_type size = identity_element::value(); + ICL_const_FORALL(typename Type, it, object) + size += icl::cardinality(key_value(it)); + return size; + +} + +template +typename enable_if +< mpl::and_< is_interval_container + , mpl::not_ > > +, typename Type::size_type +>::type +cardinality(const Type& object) +{ + typedef typename Type::size_type size_type; + typedef typename Type::interval_type interval_type; + + size_type size = identity_element::value(); + size_type interval_size; + ICL_const_FORALL(typename Type, it, object) + { + interval_size = icl::cardinality(key_value(it)); + if(interval_size == infinity::value()) + return interval_size; + else + size += interval_size; + } + return size; +} + +template +inline typename enable_if, typename Type::size_type>::type +size(const Type& object) +{ + return icl::cardinality(object); +} + +template +typename enable_if, typename Type::difference_type>::type +length(const Type& object) +{ + typedef typename Type::difference_type difference_type; + typedef typename Type::const_iterator const_iterator; + difference_type length = identity_element::value(); + const_iterator it_ = object.begin(); + + while(it_ != object.end()) + length += icl::length(key_value(it_++)); + return length; +} + +template +typename enable_if, std::size_t>::type +interval_count(const Type& object) +{ + return icl::iterative_size(object); +} + + +template +typename enable_if< is_interval_container + , typename Type::difference_type >::type +distance(const Type& object) +{ + typedef typename Type::difference_type DiffT; + typedef typename Type::const_iterator const_iterator; + const_iterator it_ = object.begin(), pred_; + DiffT dist = identity_element::value(); + + if(it_ != object.end()) + pred_ = it_++; + + while(it_ != object.end()) + dist += icl::distance(key_value(pred_++), key_value(it_++)); + + return dist; +} + + +//============================================================================== +//= Range +//============================================================================== +template +typename enable_if, + typename Type::interval_type>::type +hull(const Type& object) +{ + return + icl::is_empty(object) + ? identity_element::value() + : icl::hull( key_value(object.begin()), + key_value(object.rbegin()) ); +} + +template +typename enable_if, + typename Type::interval_type>::type +lower(const Type& object) +{ + return + icl::is_empty(object) + ? identity_element::value() + : icl::lower( key_value(object.begin()) ); +} + +template +typename enable_if, + typename Type::interval_type>::type +upper(const Type& object) +{ + return + icl::is_empty(object) + ? identity_element::value() + : icl::upper( key_value(object.rbegin()) ); +} + +//------------------------------------------------------------------------------ +template +typename enable_if +< mpl::and_< is_interval_container + , is_discrete > +, typename Type::interval_type>::type +first(const Type& object) +{ + return + icl::is_empty(object) + ? identity_element::value() + : icl::first( key_value(object.begin()) ); +} + +template +typename enable_if +< mpl::and_< is_interval_container + , is_discrete > +, typename Type::interval_type>::type +last(const Type& object) +{ + return + icl::is_empty(object) + ? identity_element::value() + : icl::last( key_value(object.rbegin()) ); +} + + +//============================================================================== +//= Addition +//============================================================================== +//------------------------------------------------------------------------------ +//- T& op +=(T&, c P&) T:{S}|{M} P:{e i}|{b p} +//------------------------------------------------------------------------------ +/* \par \b Requires: \c OperandT is an addable derivative type of \c Type. + \b Effects: \c operand is added to \c object. + \par \b Returns: A reference to \c object. + \b Complexity: +\code + \ OperandT: + \ element segment +Type: + interval container O(log n) O(n) + + interval_set amortized + spearate_interval_set O(log n) + +n = object.interval_count() +\endcode + +For the addition of \b elements or \b segments +complexity is \b logarithmic or \b linear respectively. +For \c interval_sets and \c separate_interval_sets addition of segments +is \b amortized \b logarithmic. +*/ +template +typename enable_if, Type>::type& +operator += (Type& object, const OperandT& operand) +{ + return icl::add(object, operand); +} + + +//------------------------------------------------------------------------------ +//- T& op +=(T&, c P&) T:{S}|{M} P:{S'}|{M'} +//------------------------------------------------------------------------------ +/** \par \b Requires: \c OperandT is an interval container addable to \c Type. + \b Effects: \c operand is added to \c object. + \par \b Returns: A reference to \c object. + \b Complexity: loglinear */ +template +typename enable_if, Type>::type& +operator += (Type& object, const OperandT& operand) +{ + typename Type::iterator prior_ = object.end(); + ICL_const_FORALL(typename OperandT, elem_, operand) + prior_ = icl::add(object, prior_, *elem_); + + return object; +} + + +//------------------------------------------------------------------------------ +//- T op + (T, c P&) T:{S}|{M} P:{e i S}|{b p M} +//------------------------------------------------------------------------------ +/** \par \b Requires: \c object and \c operand are addable. + \b Effects: \c operand is added to \c object. + \par \b Efficieny: There is one additional copy of + \c Type \c object compared to inplace \c operator \c += */ +template +typename enable_if, Type>::type +operator + (Type object, const OperandT& operand) +{ + return object += operand; +} + +//------------------------------------------------------------------------------ +//- T op + (c P&, T) T:{S}|{M} P:{e i S'}|{b p M'} +//------------------------------------------------------------------------------ +/** \par \b Requires: \c object and \c operand are addable. + \b Effects: \c operand is added to \c object. + \par \b Efficieny: There is one additional copy of + \c Type \c object compared to inplace \c operator \c += */ +template +typename enable_if, Type>::type +operator + (const OperandT& operand, Type object) +{ + return object += operand; +} + +//------------------------------------------------------------------------------ +//- T op + (T, c P&) T:{S}|{M} P:{S}|{M} +//------------------------------------------------------------------------------ +/** \par \b Requires: \c object and \c operand are addable. + \b Effects: \c operand is added to \c object. + \par \b Efficieny: There is one additional copy of + \c Type \c object compared to inplace \c operator \c += */ +template +typename enable_if, Type>::type +operator + (Type object, const Type& operand) +{ + return object += operand; +} + + +//------------------------------------------------------------------------------ +//- Addition |=, | +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +//- T& op |=(c P&) T:{S}|{M} P:{e i}|{b p} +//------------------------------------------------------------------------------ +/** \par \b Requires: Types \c Type and \c OperandT are addable. + \par \b Effects: \c operand is added to \c object. + \par \b Returns: A reference to \c object. + \b Complexity: +\code + \ OperandT: interval + \ element segment container +Type: + interval container O(log n) O(n) O(m log(n+m)) + + interval_set amortized + spearate_interval_set O(log n) + +n = object.interval_count() +m = operand.interval_count() +\endcode + +For the addition of \b elements, \b segments and \b interval \b containers +complexity is \b logarithmic, \b linear and \b loglinear respectively. +For \c interval_sets and \c separate_interval_sets addition of segments +is \b amortized \b logarithmic. +*/ +template +typename enable_if, Type>::type& +operator |= (Type& object, const OperandT& operand) +{ + return object += operand; +} + +//------------------------------------------------------------------------------ +//- T op | (T, c P&) T:{S}|{M} P:{e i S}|{b p M} +//------------------------------------------------------------------------------ +/** \par \b Requires: \c object and \c operand are addable. + \b Effects: \c operand is added to \c object. + \par \b Efficieny: There is one additional copy of + \c Type \c object compared to inplace \c operator \c |= */ +template +typename enable_if, Type>::type +operator | (Type object, const OperandT& operand) +{ + return object += operand; +} + +//------------------------------------------------------------------------------ +//- T op | (T, c P&) T:{S}|{M} P:{S}|{M} +//------------------------------------------------------------------------------ +/** \par \b Requires: \c object and \c operand are addable. + \b Effects: \c operand is added to \c object. + \par \b Efficieny: There is one additional copy of + \c Type \c object compared to inplace \c operator \c |= */ +template +typename enable_if, Type>::type +operator | (const OperandT& operand, Type object) +{ + return object += operand; +} + +//------------------------------------------------------------------------------ +//- T op | (T, c P&) T:{S}|{M} P:{S}|{M} +//------------------------------------------------------------------------------ +/** \par \b Requires: \c object and \c operand are addable. + \b Effects: \c operand is added to \c object. + \par \b Efficieny: There is one additional copy of + \c Type \c object compared to inplace \c operator \c |= */ +template +typename enable_if, Type>::type +operator | (Type object, const Type& operand) +{ + return object += operand; +} + +//============================================================================== +//= Insertion +//============================================================================== +//------------------------------------------------------------------------------ +//- T& insert(T&, c P&) T:{S}|{M} P:{S'}|{M'} +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +insert(Type& object, const OperandT& operand) +{ + typename Type::iterator prior_ = object.end(); + ICL_const_FORALL(typename OperandT, elem_, operand) + insert(object, *elem_); + + return object; +} + +//============================================================================== +//= Erasure +//============================================================================== +//------------------------------------------------------------------------------ +//- T& erase(T&, c P&) T:{S}|{M} P:{S'}|{S' M'} +//------------------------------------------------------------------------------ +template +typename enable_if, + Type>::type& +erase(Type& object, const OperandT& operand) +{ + typedef typename OperandT::const_iterator const_iterator; + + if(icl::is_empty(operand)) + return object; + + const_iterator common_lwb, common_upb; + if(!Set::common_range(common_lwb, common_upb, operand, object)) + return object; + + const_iterator it_ = common_lwb; + while(it_ != common_upb) + icl::erase(object, *it_++); + + return object; +} + +//============================================================================== +//= Subtraction +//============================================================================== +//------------------------------------------------------------------------------ +//- T& op -= (c P&) T:{M} P:{M'} +//------------------------------------------------------------------------------ +/** \par \b Requires: Types \c Type and \c OperandT are subtractable. + \par \b Effects: \c operand is subtracted from \c object. + \par \b Returns: A reference to \c object. + \b Complexity: +\code + \ OperandT: interval + \ element segment container +Type: + interval container O(log n) O(n) O(m log(n+m)) + + amortized + interval_sets O(log n) + +n = object.interval_count() +m = operand.interval_count() +\endcode + +For the subtraction of \em elements, \b segments and \b interval \b containers +complexity is \b logarithmic, \b linear and \b loglinear respectively. +For interval sets subtraction of segments +is \b amortized \b logarithmic. +*/ +template +typename enable_if, + Type>::type& +operator -=(Type& object, const OperandT& operand) +{ + ICL_const_FORALL(typename OperandT, elem_, operand) + icl::subtract(object, *elem_); + + return object; +} + +//------------------------------------------------------------------------------ +//- T& op -= (c P&) T:{S}|{M} P:{e i}|{b p} +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +operator -= (Type& object, const OperandT& operand) +{ + return icl::subtract(object, operand); +} + +//------------------------------------------------------------------------------ +//- T& op -= (c P&) T:{M} P:{e i} +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +operator -= (Type& object, const OperandT& operand) +{ + return icl::erase(object, operand); +} + +//------------------------------------------------------------------------------ +//- T& op -= (c P&) T:{S M} P:{S'} +//------------------------------------------------------------------------------ +template +typename enable_if, + Type>::type& +operator -= (Type& object, const IntervalSetT& operand) +{ + return erase(object, operand); +} + + +//------------------------------------------------------------------------------ +//- T op - (T, c P&) T:{S}|{M} P:{e i S'}|{e i b p S' M'} +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type +operator - (Type object, const OperandT& operand) +{ + return object -= operand; +} + + +//============================================================================== +//= Intersection +//============================================================================== +//------------------------------------------------------------------------------ +//- void add_intersection(T&, c T&, c P&) T:{S M} P:{S'} +//------------------------------------------------------------------------------ +template +typename enable_if, + combines_right_to_interval_set >, + void>::type +add_intersection(Type& section, const Type& object, const OperandT& operand) +{ + typedef typename OperandT::const_iterator const_iterator; + + if(operand.empty()) + return; + + const_iterator common_lwb, common_upb; + if(!Set::common_range(common_lwb, common_upb, operand, object)) + return; + + const_iterator it_ = common_lwb; + while(it_ != common_upb) + icl::add_intersection(section, object, key_value(it_++)); +} + +//------------------------------------------------------------------------------ +//- T& op &=(T&, c P&) T:{S}|{M} P:{e i S'}|{e i b p S' M'} +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +operator &= (Type& object, const OperandT& operand) +{ + Type intersection; + add_intersection(intersection, object, operand); + object.swap(intersection); + return object; +} + +//------------------------------------------------------------------------------ +//- T op & (T, c P&) T:{S}|{M} P:{e i S'}|{e i b p S' M'} S +typename enable_if, Type>::type +operator & (Type object, const OperandT& operand) +{ + return object &= operand; +} + +//------------------------------------------------------------------------------ +//- T op & (c P&, T) T:{S}|{M} P:{e i S'}|{e i b p S' M'} S +typename enable_if, Type>::type +operator & (const OperandT& operand, Type object) +{ + return object &= operand; +} + +//------------------------------------------------------------------------------ +//- T op & (T, c T&) T:{S M} +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type +operator & (Type object, const Type& operand) +{ + return object &= operand; +} + +//------------------------------------------------------------------------------ +//- intersects +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +//- bool intersects(c T&, c P&) T:{S}|{M} P:{e i} +//------------------------------------------------------------------------------ +template +typename enable_if + , is_same > >, + bool>::type +intersects(const Type& left, const CoType& right) +{ + return icl::contains(left, right); +} + +template +typename enable_if + , is_same > >, + bool>::type +intersects(const Type& left, const CoType& right) +{ + return left.find(right) != left.end(); +} + +template +typename enable_if< mpl::and_< is_intra_combinable + , mpl::or_, is_total > > + , bool>::type +intersects(const LeftT& left, const RightT& right) +{ + return true; +} + +template +typename enable_if< mpl::and_< is_intra_combinable + , mpl::not_ + , is_total > > > + , bool>::type +intersects(const LeftT& left, const RightT& right) +{ + typedef typename RightT::const_iterator const_iterator; + LeftT intersection; + + const_iterator right_common_lower_, right_common_upper_; + if(!Set::common_range(right_common_lower_, right_common_upper_, right, left)) + return false; + + const_iterator it_ = right_common_lower_; + while(it_ != right_common_upper_) + { + icl::add_intersection(intersection, left, *it_++); + if(!icl::is_empty(intersection)) + return true; + } + return false; +} + +template +typename enable_if, bool>::type +intersects(const LeftT& left, const RightT& right) +{ + typedef typename RightT::const_iterator const_iterator; + LeftT intersection; + + if(icl::is_empty(left) || icl::is_empty(right)) + return false; + + const_iterator right_common_lower_, right_common_upper_; + if(!Set::common_range(right_common_lower_, right_common_upper_, right, left)) + return false; + + typename RightT::const_iterator it_ = right_common_lower_; + while(it_ != right_common_upper_) + { + icl::add_intersection(intersection, left, key_value(it_++)); + if(!icl::is_empty(intersection)) + return true; + } + + return false; +} + +template +typename enable_if + , is_inter_derivative >, + bool>::type +intersects(const Type& left, const AssociateT& right) +{ + return icl::intersects(left, right); +} + +/** \b Returns true, if \c left and \c right have no common elements. + Intervals are interpreted as sequence of elements. + \b Complexity: loglinear, if \c left and \c right are interval containers. */ +template +typename enable_if, bool>::type +disjoint(const LeftT& left, const RightT& right) +{ + return !intersects(left, right); +} + +/** \b Returns true, if \c left and \c right have no common elements. + Intervals are interpreted as sequence of elements. + \b Complexity: logarithmic, if \c AssociateT is an element type \c Type::element_type. + linear, if \c AssociateT is a segment type \c Type::segment_type. */ +template +typename enable_if, bool>::type +disjoint(const Type& left, const AssociateT& right) +{ + return !intersects(left,right); +} + +//============================================================================== +//= Symmetric difference +//============================================================================== +//------------------------------------------------------------------------------ +//- Symmetric difference ^=, ^ +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +//- T& op ^=(T&, c P&) T:{S}|{M} P:{S'}|{M'} +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +operator ^= (Type& object, const OperandT& operand) +{ + return icl::flip(object, operand); +} + +//------------------------------------------------------------------------------ +//- T& op ^=(T&, c P&) T:{S}|{M} P:{e i}|{b p} +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +operator ^= (Type& object, const OperandT& operand) +{ + return icl::flip(object, operand); +} + +//------------------------------------------------------------------------------ +//- T op ^ (T, c P&) T:{S}|{M} P:{e i S'}|{b p M'} S +typename enable_if, Type>::type +operator ^ (Type object, const OperandT& operand) +{ + return object ^= operand; +} + +//------------------------------------------------------------------------------ +//- T op ^ (c P&, T) T:{S}|{M} P:{e i S'}|{b p M'} S +typename enable_if, Type>::type +operator ^ (const OperandT& operand, Type object) +{ + return object ^= operand; +} + +//------------------------------------------------------------------------------ +//- T op ^ (T, c T&) T:{S M} +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type +operator ^ (typename Type::overloadable_type object, const Type& operand) +{ + return object ^= operand; +} + +//========================================================================== +//= Element Iteration +//========================================================================== +//-------------------------------------------------------------------------- +//- Forward +//-------------------------------------------------------------------------- +template +typename enable_if + + , mpl::not_ > >, +typename Type::element_iterator>::type +elements_begin(Type& object) +{ + return typename Type::element_iterator(object.begin()); +} + +template +typename enable_if + + , mpl::not_ > >, +typename Type::element_iterator>::type +elements_end(Type& object) +{ + return typename Type::element_iterator(object.end()); +} + +template +typename enable_if + + , mpl::not_ > >, +typename Type::element_const_iterator>::type +elements_begin(const Type& object) +{ + return typename Type::element_const_iterator(object.begin()); +} + +template +typename enable_if + + , mpl::not_ > >, +typename Type::element_const_iterator>::type +elements_end(const Type& object) +{ + return typename Type::element_const_iterator(object.end()); +} + +//-------------------------------------------------------------------------- +//- Reverse +//-------------------------------------------------------------------------- +template +typename enable_if + + , mpl::not_ > >, +typename Type::element_reverse_iterator>::type +elements_rbegin(Type& object) +{ + return typename Type::element_reverse_iterator(object.rbegin()); +} + +template +typename enable_if + + , mpl::not_ > >, +typename Type::element_reverse_iterator>::type +elements_rend(Type& object) +{ + return typename Type::element_reverse_iterator(object.rend()); +} + +template +typename enable_if + + , mpl::not_ > >, +typename Type::element_const_reverse_iterator>::type +elements_rbegin(const Type& object) +{ + return typename Type::element_const_reverse_iterator(object.rbegin()); +} + +template +typename enable_if + + , mpl::not_ > >, +typename Type::element_const_reverse_iterator>::type +elements_rend(const Type& object) +{ + return typename Type::element_const_reverse_iterator(object.rend()); +} + +//============================================================================== +//= Morphisms +//============================================================================== +template +typename enable_if, Type>::type& +join(Type& object) +{ + typedef typename Type::interval_type interval_type; + typedef typename Type::iterator iterator; + + iterator it_ = object.begin(); + if(it_ == object.end()) + return object; + + iterator next_ = it_; next_++; + + while(next_ != object.end()) + { + if( segmental::is_joinable(it_, next_) ) + { + iterator fst_mem = it_; // hold the first member + + // Go on while touching members are found + it_++; next_++; + while( next_ != object.end() + && segmental::is_joinable(it_, next_) ) + { it_++; next_++; } + + // finally we arrive at the end of a sequence of joinable intervals + // and it points to the last member of that sequence + const_cast(key_value(it_)) + = hull(key_value(it_), key_value(fst_mem)); + object.erase(fst_mem, it_); + + it_++; next_=it_; + if(next_!=object.end()) + next_++; + } + else { it_++; next_++; } + } + return object; +} + + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/concept/interval_bounds.hpp b/3party/boost/boost/icl/concept/interval_bounds.hpp new file mode 100644 index 0000000000..65cbee9402 --- /dev/null +++ b/3party/boost/boost/icl/concept/interval_bounds.hpp @@ -0,0 +1,163 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_INTERVAL_BOUNDS_HPP_JOFA_100927 +#define BOOST_ICL_CONCEPT_INTERVAL_BOUNDS_HPP_JOFA_100927 + +#include +#include +#include + +namespace boost{namespace icl +{ + +inline interval_bounds left(interval_bounds x1) +{ return interval_bounds(x1._bits & interval_bounds::_left); } + +inline interval_bounds right(interval_bounds x1) +{ return interval_bounds(x1._bits & interval_bounds::_right); } + +inline interval_bounds all(interval_bounds x1) +{ return interval_bounds(x1._bits & interval_bounds::_all); } + +inline bool operator == (const interval_bounds x1, const interval_bounds x2) +{ return x1._bits == x2._bits; } + +inline bool operator != (const interval_bounds x1, const interval_bounds x2) +{ return x1._bits != x2._bits; } + +inline interval_bounds operator & (interval_bounds x1, interval_bounds x2) +{ return interval_bounds(x1._bits & x2._bits); } + +inline interval_bounds operator | (interval_bounds x1, interval_bounds x2) +{ return interval_bounds(x1._bits | x2._bits); } + +// left shift (multiplies by 2^shift) +inline interval_bounds operator << (interval_bounds bounds, unsigned int shift) +{ return interval_bounds(bounds._bits << shift); } + +// right shift (divides by 2^shift) +inline interval_bounds operator >> (interval_bounds bounds, unsigned int shift) +{ return interval_bounds(bounds._bits >> shift); } + +inline interval_bounds operator ~ (interval_bounds x1) +{ return all(interval_bounds(~(x1._bits))); } + +inline interval_bounds outer_bounds(interval_bounds x1, interval_bounds x2) +{ return left(x1) | right(x2); } + +inline interval_bounds inner_bounds(interval_bounds x1, interval_bounds x2) +{ return interval_bounds(x1.reverse_right() | x2.reverse_left()); } + +inline interval_bounds left_bounds(interval_bounds x1, interval_bounds x2) +{ return left(x1) | (left(x2) >> 1); } + +inline interval_bounds right_bounds(interval_bounds x1, interval_bounds x2) +{ return (right(x1) <<1 ) | right(x2); } + +inline interval_bounds left_subtract_bounds(interval_bounds x1, interval_bounds x2) +{ return right(x1) | ~(right(x2) << 1); } + +inline interval_bounds right_subtract_bounds(interval_bounds x1, interval_bounds x2) +{ return left(x1) | ~(left(x2) >> 1); } + +inline bool is_complementary(interval_bounds x1) +{ return x1 == interval_bounds::right_open() || x1 == interval_bounds::left_open(); } + +inline bool is_left_closed(interval_bounds bounds) +{ return bounds.left().bits()==2; } + +inline bool is_right_closed(interval_bounds bounds) +{ return bounds.right().bits()==1; } + +inline std::string left_bracket(interval_bounds bounds) +{ return is_left_closed(bounds) ? "[" : "("; } + +inline std::string right_bracket(interval_bounds bounds) +{ return is_right_closed(bounds) ? "]" : ")"; } + +template +inline typename enable_if, Type>::type +shift_lower(interval_bounds decl, interval_bounds repr, const Type& low) +{ + if(is_left_closed(decl) && !is_left_closed(repr)) + { + BOOST_ASSERT((numeric_minimum::value >::is_less_than(low) )); + return icl::pred(low); + } + else if(!is_left_closed(decl) && is_left_closed(repr)) + return icl::succ(low); + else + return low; +} + +template +inline typename enable_if, Type>::type +shift_upper(interval_bounds decl, interval_bounds repr, const Type& up) +{ + if(!is_right_closed(decl) && is_right_closed(repr)) + { + BOOST_ASSERT((numeric_minimum::value >::is_less_than(up) )); + return icl::pred(up); + } + else if(is_right_closed(decl) && !is_right_closed(repr)) + return icl::succ(up); + else + return up; +} + +template +std::basic_ostream& operator << + (std::basic_ostream &stream, + interval_bounds const& object) +{ + return stream << left_bracket(object) << right_bracket(object); +} + + + +template +inline typename +boost::enable_if, interval_bounds>::type +outer_bounds(const IntervalT& x1, const IntervalT& x2) +{ return outer_bounds(x1.bounds(), x2.bounds()); } + +template +inline typename +boost::enable_if, interval_bounds>::type +inner_bounds(const IntervalT& x1, const IntervalT& x2) +{ return inner_bounds(x1.bounds(), x2.bounds()); } + +template +inline typename +boost::enable_if, interval_bounds>::type +left_bounds(const IntervalT& x1, const IntervalT& x2) +{ return left_bounds(x1.bounds(), x2.bounds()); } + +template +inline typename +boost::enable_if, interval_bounds>::type +right_bounds(const IntervalT& x1, const IntervalT& x2) +{ return right_bounds(x1.bounds(), x2.bounds()); } + +template +inline typename +boost::enable_if, interval_bounds>::type +left_subtract_bounds(const IntervalT& x1, const IntervalT& x2) +{ return left_subtract_bounds(x1.bounds(), x2.bounds()); } + +template +inline typename +boost::enable_if, interval_bounds>::type +right_subtract_bounds(const IntervalT& x1, const IntervalT& x2) +{ return right_subtract_bounds(x1.bounds(), x2.bounds()); } + + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/concept/interval_map.hpp b/3party/boost/boost/icl/concept/interval_map.hpp new file mode 100644 index 0000000000..e741f84a99 --- /dev/null +++ b/3party/boost/boost/icl/concept/interval_map.hpp @@ -0,0 +1,680 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_INTERVAL_MAP_HPP_JOFA_100920 +#define BOOST_ICL_CONCEPT_INTERVAL_MAP_HPP_JOFA_100920 + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + +template +typename enable_if, Type>::type& +join(Type&); + + +template +inline typename enable_if, typename Type::segment_type>::type +make_segment(const typename Type::element_type& element) +{ + typedef typename Type::interval_type interval_type; + typedef typename Type::segment_type segment_type; + return segment_type(icl::singleton(element.key), element.data); +} + +//============================================================================== +//= Containedness +//============================================================================== +//------------------------------------------------------------------------------ +//- bool contains(c T&, c P&) T:{M} P:{b p M} fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if, bool>::type +contains(const Type& super, const typename Type::element_type& key_value_pair) +{ + typedef typename Type::const_iterator const_iterator; + const_iterator it_ = super.find(key_value_pair.key); + return it_ != super.end() && it_->second == key_value_pair.data; +} + +template +typename enable_if, bool>::type +contains(const Type& super, const typename Type::segment_type& sub_segment) +{ + typedef typename Type::interval_type interval_type; + typedef typename Type::const_iterator const_iterator; + + interval_type sub_interval = sub_segment.first; + if(icl::is_empty(sub_interval)) + return true; + + std::pair exterior = super.equal_range(sub_interval); + if(exterior.first == exterior.second) + return false; + + const_iterator last_overlap = prior(exterior.second); + + if(!(sub_segment.second == exterior.first->second) ) + return false; + + return + icl::contains(hull(exterior.first->first, last_overlap->first), sub_interval) + && Interval_Map::is_joinable(super, exterior.first, last_overlap); +} + +template +typename enable_if, bool>::type +contains(const Type& super, const CoType& sub) +{ + return Interval_Set::within(sub, super); +} + + +//------------------------------------------------------------------------------ +//- bool contains(c T&, c P&) T:{M} P:{e i S} key_types : total +//------------------------------------------------------------------------------ +template +typename enable_if< mpl::and_< is_interval_map + , is_total + , is_cross_derivative > + , bool>::type +contains(const Type& super, const CoType& sub) +{ + return true; +} + +//------------------------------------------------------------------------------ +//- bool contains(c T&, c P&) T:{M} P:{e i S} key_types : partial +//------------------------------------------------------------------------------ +template +typename enable_if< mpl::and_< is_interval_map + , mpl::not_ > > + , bool>::type +contains(const Type& super, const typename Type::domain_type& key) +{ + return super.find(key) != super.end(); +} + +template +typename enable_if< mpl::and_< is_interval_map + , mpl::not_ > > + , bool>::type +contains(const Type& super, const typename Type::interval_type& sub_interval) +{ + typedef typename Type::const_iterator const_iterator; + + if(icl::is_empty(sub_interval)) + return true; + + std::pair exterior = super.equal_range(sub_interval); + if(exterior.first == exterior.second) + return false; + + const_iterator last_overlap = prior(exterior.second); + + return + icl::contains(hull(exterior.first->first, last_overlap->first), sub_interval) + && Interval_Set::is_joinable(super, exterior.first, last_overlap); +} + +template +typename enable_if< mpl::and_< is_concept_combinable + , mpl::not_ > > + , bool>::type +contains(const Type& super, const KeyT& sub) +{ + return Interval_Set::within(sub, super); +} + +//============================================================================== +//= Addition +//============================================================================== +//------------------------------------------------------------------------------ +//- T& add(T&, c P&) T:{M} P:{b p} fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +add(Type& object, const typename Type::segment_type& operand) +{ + return object.add(operand); +} + +template +typename enable_if, Type>::type& +add(Type& object, const typename Type::element_type& operand) +{ + return icl::add(object, make_segment(operand)); +} + +//------------------------------------------------------------------------------ +//- T& add(T&, J, c P&) T:{M} P:{p} segment_type +//------------------------------------------------------------------------------ +template +typename enable_if, typename Type::iterator >::type +add(Type& object, typename Type::iterator prior_, + const typename Type::segment_type& operand) +{ + return object.add(prior_, operand); +} + +//============================================================================== +//= Insertion +//============================================================================== +//------------------------------------------------------------------------------ +//- T& insert(T&, c P&) T:{M} P:{b p} fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +insert(Type& object, const typename Type::segment_type& operand) +{ + return object.insert(operand); +} + +template +inline typename enable_if, Type>::type& +insert(Type& object, const typename Type::element_type& operand) +{ + return icl::insert(object, make_segment(operand)); +} + +//------------------------------------------------------------------------------ +//- T& insert(T&, J, c P&) T:{M} P:{p} with hint +//------------------------------------------------------------------------------ +template +typename enable_if, typename Type::iterator>::type +insert(Type& object, typename Type::iterator prior, + const typename Type::segment_type& operand) +{ + return object.insert(prior, operand); +} + + +//============================================================================== +//= Erasure +//============================================================================== +//------------------------------------------------------------------------------ +//- T& erase(T&, c P&) T:{M} P:{e i} key_types +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +erase(Type& object, const typename Type::interval_type& operand) +{ + return object.erase(operand); +} + +template +typename enable_if, Type>::type& +erase(Type& object, const typename Type::domain_type& operand) +{ + typedef typename Type::interval_type interval_type; + return icl::erase(object, icl::singleton(operand)); +} + +//------------------------------------------------------------------------------ +//- T& erase(T&, c P&) T:{M} P:{b p} fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +erase(Type& object, const typename Type::segment_type& operand) +{ + return object.erase(operand); +} + +template +inline typename enable_if, Type>::type& +erase(Type& object, const typename Type::element_type& operand) +{ + return icl::erase(object, make_segment(operand)); +} + +//============================================================================== +//= Subtraction +//============================================================================== +//------------------------------------------------------------------------------ +//- T& subtract(T&, c P&) T:{M} P:{b p} fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +subtract(Type& object, const typename Type::segment_type& operand) +{ + return object.subtract(operand); +} + +template +typename enable_if, Type>::type& +subtract(Type& object, const typename Type::element_type& operand) +{ + return icl::subtract(object, make_segment(operand)); +} + +//------------------------------------------------------------------------------ +//- T& subtract(T&, c P&) T:{M} P:{e i} key_types +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +subtract(Type& object, const typename Type::domain_type& operand) +{ + return object.erase(operand); +} + +template +typename enable_if, Type>::type& +subtract(Type& object, const typename Type::interval_type& operand) +{ + return object.erase(operand); +} + +//============================================================================== +//= Selective Update +//============================================================================== +//------------------------------------------------------------------------------ +//- T& set_at(T&, c P&) T:{M} P:{e i} +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +set_at(Type& object, const typename Type::segment_type& operand) +{ + icl::erase(object, operand.first); + return icl::insert(object, operand); +} + +template +typename enable_if, Type>::type& +set_at(Type& object, const typename Type::element_type& operand) +{ + return icl::set_at(object, make_segment(operand)); +} + +//============================================================================== +//= Intersection +//============================================================================== +//------------------------------------------------------------------------------ +//- T& subtract(T&, c P&) T:{M} P:{b p} fragment_type +//------------------------------------------------------------------------------ +template +typename enable_if, void>::type +add_intersection(Type& section, const Type& object, + const typename Type::element_type& operand) +{ + typedef typename Type::segment_type segment_type; + object.add_intersection(section, make_segment(operand)); +} + +template +typename enable_if, void>::type +add_intersection(Type& section, const Type& object, + const typename Type::segment_type& operand) +{ + object.add_intersection(section, operand); +} + +//------------------------------------------------------------------------------ +//- T& subtract(T&, c P&) T:{M} P:{M'} map fragment_type total +//------------------------------------------------------------------------------ +template +typename enable_if +< + mpl::and_< is_total + , is_concept_compatible > + , void +>::type +add_intersection(Type& section, const Type& object, const MapT& operand) +{ + section += object; + section += operand; +} + +//------------------------------------------------------------------------------ +//- T& subtract(T&, c P&) T:{M} P:{M'} map fragment_type partial +//------------------------------------------------------------------------------ +template +typename enable_if +< + mpl::and_< mpl::not_ > + , is_concept_compatible > + , void +>::type +add_intersection(Type& section, const Type& object, const MapT& operand) +{ + typedef typename Type::segment_type segment_type; + typedef typename Type::interval_type interval_type; + typedef typename MapT::const_iterator const_iterator; + + if(operand.empty()) + return; + const_iterator common_lwb, common_upb; + if(!Set::common_range(common_lwb, common_upb, operand, object)) + return; + const_iterator it_ = common_lwb; + while(it_ != common_upb) + add_intersection(section, object, *it_++); +} + +//------------------------------------------------------------------------------ +//- T& subtract(T&, c P&) T:{M} P:{e i S} key_type +//------------------------------------------------------------------------------ +template +typename enable_if, void>::type +add_intersection(Type& section, const Type& object, + const typename Type::domain_type& key_value) +{ + typedef typename Type::interval_type interval_type; + typedef typename Type::segment_type segment_type; + typedef typename Type::const_iterator const_iterator; + + const_iterator it_ = object.find(key_value); + if(it_ != object.end()) + add(section, segment_type(interval_type(key_value),it_->second)); +} + +template +typename enable_if, void>::type +add_intersection(Type& section, const Type& object, + const typename Type::interval_type& inter_val) +{ + typedef typename Type::interval_type interval_type; + typedef typename Type::value_type value_type; + typedef typename Type::const_iterator const_iterator; + typedef typename Type::iterator iterator; + + if(icl::is_empty(inter_val)) + return; + + std::pair exterior + = object.equal_range(inter_val); + if(exterior.first == exterior.second) + return; + + iterator prior_ = section.end(); + for(const_iterator it_=exterior.first; it_ != exterior.second; it_++) + { + interval_type common_interval = it_->first & inter_val; + if(!icl::is_empty(common_interval)) + prior_ = add(section, prior_, + value_type(common_interval, it_->second) ); + } +} + +template +typename enable_if, void>::type +add_intersection(Type& section, const Type& object, const KeySetT& key_set) +{ + typedef typename KeySetT::const_iterator const_iterator; + + if(icl::is_empty(key_set)) + return; + + const_iterator common_lwb, common_upb; + if(!Set::common_range(common_lwb, common_upb, key_set, object)) + return; + + const_iterator it_ = common_lwb; + while(it_ != common_upb) + add_intersection(section, object, *it_++); +} + +//------------------------------------------------------------------------------ +//- intersects fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if + , is_total + , is_same > >, + bool>::type +intersects(const Type&, const OperandT&) +{ + return true; +} + +template +typename enable_if + , mpl::not_ > + , is_same > >, + bool>::type +intersects(const Type& object, const OperandT& operand) +{ + Type intersection; + icl::add_intersection(intersection, left, operand); + return !icl::is_empty(intersection); +} + +template +typename enable_if + , is_same > >, + bool>::type +intersects(const Type& object, const OperandT& operand) +{ + return icl::intersects(object, make_segment(operand)); +} + +//============================================================================== +//= Symmetric difference +//============================================================================== +//------------------------------------------------------------------------------ +//- T& flip(T&, c P&) T:{M} P:{b p} fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +flip(Type& object, const typename Type::segment_type& operand) +{ + return object.flip(operand); +} + +template +inline typename enable_if, Type>::type& +flip(Type& object, const typename Type::element_type& operand) +{ + return icl::flip(object, make_segment(operand)); +} + +//------------------------------------------------------------------------------ +//- T& flip(T&, c P&) T:{M} P:{M'} total absorber +//------------------------------------------------------------------------------ +template +typename enable_if< mpl::and_< is_total + , absorbs_identities + , is_concept_compatible + > + , Type>::type& +flip(Type& object, const OperandT&) +{ + object.clear(); + return object; +} + +//------------------------------------------------------------------------------ +//- T& flip(T&, c P&) T:{M} P:{M'} total enricher +//------------------------------------------------------------------------------ +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4127) // conditional expression is constant +#endif +template +typename enable_if< mpl::and_< is_total + , mpl::not_ > + , is_concept_compatible + > + , Type>::type& +flip(Type& object, const OperandT& operand) +{ + typedef typename Type::codomain_type codomain_type; + + object += operand; + ICL_FORALL(typename Type, it_, object) + it_->second = identity_element::value(); + + if(mpl::not_ >::value) + icl::join(object); + + return object; +} +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + + +//------------------------------------------------------------------------------ +//- T& flip(T&, c P&) T:{M} P:{M'} partial +//------------------------------------------------------------------------------ +template +typename enable_if< mpl::and_< mpl::not_ > + , is_concept_compatible + > + , Type>::type& +flip(Type& object, const OperandT& operand) +{ + typedef typename OperandT::const_iterator const_iterator; + typedef typename Type::codomain_type codomain_type; + + const_iterator common_lwb, common_upb; + + if(!Set::common_range(common_lwb, common_upb, operand, object)) + return object += operand; + + const_iterator it_ = operand.begin(); + + // All elements of operand left of the common range are added + while(it_ != common_lwb) + icl::add(object, *it_++); + // All elements of operand in the common range are symmetrically subtracted + while(it_ != common_upb) + icl::flip(object, *it_++); + // All elements of operand right of the common range are added + while(it_ != operand.end()) + icl::add(object, *it_++); + + return object; +} + +//============================================================================== +//= Set selection +//============================================================================== +template +typename enable_if, SetT>::type& +domain(SetT& result, const Type& object) +{ + typedef typename SetT::iterator set_iterator; + result.clear(); + set_iterator prior_ = result.end(); + ICL_const_FORALL(typename Type, it_, object) + prior_ = icl::insert(result, prior_, it_->first); + + return result; +} + +template +typename enable_if, SetT>::type& +between(SetT& in_between, const Type& object) +{ + typedef typename Type::const_iterator const_iterator; + typedef typename SetT::iterator set_iterator; + in_between.clear(); + const_iterator it_ = object.begin(), pred_; + set_iterator prior_ = in_between.end(); + + if(it_ != object.end()) + pred_ = it_++; + + while(it_ != object.end()) + prior_ = icl::insert(in_between, prior_, + between((*pred_++).first, (*it_++).first)); + + return in_between; +} + +//============================================================================== +//= Manipulation by predicates +//============================================================================== +template +typename enable_if, MapT>::type& +erase_if(const Predicate& pred, MapT& object) +{ + typename MapT::iterator it_ = object.begin(); + while(it_ != object.end()) + if(pred(*it_)) + object.erase(it_++); + else ++it_; + return object; +} + +template +inline typename enable_if, MapT>::type& +add_if(const Predicate& pred, MapT& object, const MapT& src) +{ + typename MapT::const_iterator it_ = src.begin(); + while(it_ != src.end()) + if(pred(*it_)) + icl::add(object, *it_++); + + return object; +} + +template +inline typename enable_if, MapT>::type& +assign_if(const Predicate& pred, MapT& object, const MapT& src) +{ + icl::clear(object); + return add_if(object, src, pred); +} + + +//============================================================================== +//= Morphisms +//============================================================================== +template +typename enable_if + , absorbs_identities >, Type>::type& +absorb_identities(Type& object) +{ + return object; +} + +template +typename enable_if + , mpl::not_ > >, Type>::type& +absorb_identities(Type& object) +{ + typedef typename Type::segment_type segment_type; + return icl::erase_if(content_is_identity_element(), object); +} + +//============================================================================== +//= Streaming +//============================================================================== +template +typename enable_if, + std::basic_ostream >::type& +operator << (std::basic_ostream& stream, const Type& object) +{ + stream << "{"; + ICL_const_FORALL(typename Type, it_, object) + stream << "(" << it_->first << "->" << it_->second << ")"; + + return stream << "}"; +} + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/concept/interval_set.hpp b/3party/boost/boost/icl/concept/interval_set.hpp new file mode 100644 index 0000000000..958145c5dd --- /dev/null +++ b/3party/boost/boost/icl/concept/interval_set.hpp @@ -0,0 +1,353 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_INTERVAL_SET_HPP_JOFA_100920 +#define BOOST_ICL_CONCEPT_INTERVAL_SET_HPP_JOFA_100920 + +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + +//============================================================================== +//= Containedness +//============================================================================== +//------------------------------------------------------------------------------ +//- bool contains(c T&, c P&) T:{S} P:{e i S} fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if, bool>::type +contains(const Type& super, const typename Type::element_type& element) +{ + return !(super.find(element) == super.end()); +} + +template +typename enable_if, bool>::type +contains(const Type& super, const typename Type::segment_type& inter_val) +{ + typedef typename Type::const_iterator const_iterator; + if(icl::is_empty(inter_val)) + return true; + + std::pair exterior + = super.equal_range(inter_val); + if(exterior.first == exterior.second) + return false; + + const_iterator last_overlap = cyclic_prior(super, exterior.second); + + return + icl::contains(hull(*(exterior.first), *last_overlap), inter_val) + && Interval_Set::is_joinable(super, exterior.first, last_overlap); +} + +template +typename enable_if, + bool>::type +contains(const Type& super, const OperandT& sub) +{ + return Interval_Set::contains(super, sub); +} + +//============================================================================== +//= Addition +//============================================================================== +//------------------------------------------------------------------------------ +//- T& add(T&, c P&) T:{S} P:{e i} fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +add(Type& object, const typename Type::segment_type& operand) +{ + return object.add(operand); +} + +template +inline typename enable_if, Type>::type& +add(Type& object, const typename Type::element_type& operand) +{ + typedef typename Type::segment_type segment_type; + return icl::add(object, icl::singleton(operand)); +} + +//------------------------------------------------------------------------------ +//- T& add(T&, J, c P&) T:{S} P:{i} interval_type +//------------------------------------------------------------------------------ +template +inline typename enable_if, typename Type::iterator>::type +add(Type& object, typename Type::iterator prior, + const typename Type::segment_type& operand) +{ + return object.add(prior, operand); +} + +//============================================================================== +//= Insertion +//============================================================================== +//------------------------------------------------------------------------------ +//- T& insert(T&, c P&) T:{S} P:{e i} fragment_types +//------------------------------------------------------------------------------ +template +inline typename enable_if, Type>::type& +insert(Type& object, const typename Type::segment_type& operand) +{ + return icl::add(object, operand); +} + +template +inline typename enable_if, Type>::type& +insert(Type& object, const typename Type::element_type& operand) +{ + return icl::add(object, operand); +} + +//------------------------------------------------------------------------------ +//- T& insert(T&, J, c P&) T:{S} P:{i} with hint +//------------------------------------------------------------------------------ +template +inline typename enable_if, typename Type::iterator>::type +insert(Type& object, typename Type::iterator prior, + const typename Type::segment_type& operand) +{ + return icl::add(object, prior, operand); +} + +//============================================================================== +//= Subtraction +//============================================================================== +//------------------------------------------------------------------------------ +//- T& subtract(T&, c P&) T:{S} P:{e i} fragment_type +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +subtract(Type& object, const typename Type::segment_type& operand) +{ + return object.subtract(operand); +} + +template +inline typename enable_if, Type>::type& +subtract(Type& object, const typename Type::element_type& operand) +{ + typedef typename Type::segment_type segment_type; + return icl::subtract(object, icl::singleton(operand)); +} + +//============================================================================== +//= Erasure +//============================================================================== +//------------------------------------------------------------------------------ +//- T& erase(T&, c P&) T:{S} P:{e i} fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +erase(Type& object, const typename Type::segment_type& minuend) +{ + return icl::subtract(object, minuend); +} + +template +typename enable_if, Type>::type& +erase(Type& object, const typename Type::element_type& minuend) +{ + return icl::subtract(object, minuend); +} + +//============================================================================== +//= Intersection +//============================================================================== +//------------------------------------------------------------------------------ +//- void add_intersection(T&, c T&, c P&) T:{S} P:{e i} fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if, void>::type +add_intersection(Type& section, const Type& object, + const typename Type::element_type& operand) +{ + typedef typename Type::const_iterator const_iterator; + const_iterator found = object.find(operand); + if(found != object.end()) + icl::add(section, operand); +} + + +template +typename enable_if, void>::type +add_intersection(Type& section, const Type& object, + const typename Type::segment_type& segment) +{ + typedef typename Type::const_iterator const_iterator; + typedef typename Type::iterator iterator; + typedef typename Type::interval_type interval_type; + + if(icl::is_empty(segment)) + return; + + std::pair exterior + = object.equal_range(segment); + if(exterior.first == exterior.second) + return; + + iterator prior_ = section.end(); + for(const_iterator it_=exterior.first; it_ != exterior.second; it_++) + { + interval_type common_interval = key_value(it_) & segment; + if(!icl::is_empty(common_interval)) + prior_ = section.insert(prior_, common_interval); + } +} + +//============================================================================== +//= Symmetric difference +//============================================================================== +//------------------------------------------------------------------------------ +//- T& flip(T&, c P&) T:{S} P:{e i S'} fragment_types +//------------------------------------------------------------------------------ +template +typename enable_if, Type>::type& +flip(Type& object, const typename Type::element_type& operand) +{ + if(icl::contains(object, operand)) + return object -= operand; + else + return object += operand; +} + +template +typename enable_if, Type>::type& +flip(Type& object, const typename Type::segment_type& segment) +{ + typedef typename Type::const_iterator const_iterator; + typedef typename Type::interval_type interval_type; + // That which is common shall be subtracted + // That which is not shall be added + // So x has to be 'complementary added' or flipped + interval_type span = segment; + std::pair exterior + = object.equal_range(span); + + const_iterator fst_ = exterior.first; + const_iterator end_ = exterior.second; + + interval_type covered, left_over; + const_iterator it_ = fst_; + while(it_ != end_) + { + covered = *it_++; + //[a ... : span + // [b ... : covered + //[a b) : left_over + left_over = right_subtract(span, covered); + icl::subtract(object, span & covered); //That which is common shall be subtracted + icl::add(object, left_over); //That which is not shall be added + + //... d) : span + //... c) : covered + // [c d) : span' + span = left_subtract(span, covered); + } + + //If span is not empty here, it_ is not in the set so it_ shall be added + icl::add(object, span); + return object; +} + + +template +typename enable_if, Type>::type& +flip(Type& object, const OperandT& operand) +{ + typedef typename OperandT::const_iterator const_iterator; + + if(operand.empty()) + return object; + + const_iterator common_lwb, common_upb; + + if(!Set::common_range(common_lwb, common_upb, operand, object)) + return object += operand; + + const_iterator it_ = operand.begin(); + + // All elements of operand left of the common range are added + while(it_ != common_lwb) + icl::add(object, *it_++); + // All elements of operand in the common range are symmertrically subtracted + while(it_ != common_upb) + icl::flip(object, *it_++); + // All elements of operand right of the common range are added + while(it_ != operand.end()) + icl::add(object, *it_++); + + return object; +} + +//============================================================================== +//= Set selection +//============================================================================== +template +typename enable_if, Type>::type& +domain(Type& dom, const Type& object) +{ + typedef typename Type::const_iterator const_iterator; + typedef typename Type::iterator iterator; + dom.clear(); + const_iterator it_ = object.begin(); + iterator prior_ = dom.end(); + + while(it_ != object.end()) + prior_ = icl::insert(dom, prior_, *it_++); + + return dom; +} + +template +typename enable_if, Type>::type& +between(Type& in_between, const Type& object) +{ + typedef typename Type::const_iterator const_iterator; + typedef typename Type::iterator iterator; + in_between.clear(); + const_iterator it_ = object.begin(), pred_; + iterator prior_ = in_between.end(); + + if(it_ != object.end()) + pred_ = it_++; + + while(it_ != object.end()) + prior_ = icl::insert(in_between, prior_, + icl::between(*pred_++, *it_++)); + + return in_between; +} + + +//============================================================================== +//= Streaming +//============================================================================== +template +typename enable_if, + std::basic_ostream >::type& +operator << (std::basic_ostream& stream, const Type& object) +{ + stream << "{"; + ICL_const_FORALL(typename Type, it_, object) + stream << (*it_); + + return stream << "}"; +} + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/concept/interval_set_value.hpp b/3party/boost/boost/icl/concept/interval_set_value.hpp new file mode 100644 index 0000000000..027616e961 --- /dev/null +++ b/3party/boost/boost/icl/concept/interval_set_value.hpp @@ -0,0 +1,33 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_INTERVAL_SET_VALUE_HPP_JOFA_100924 +#define BOOST_ICL_CONCEPT_INTERVAL_SET_VALUE_HPP_JOFA_100924 + +#include +#include +#include + +namespace boost{ namespace icl +{ + +//============================================================================== +//= AlgoUnifiers +//============================================================================== +template +inline typename enable_if, typename Type::codomain_type>::type +co_value(Iterator value_) +{ + typedef typename Type::codomain_type codomain_type; + return icl::is_empty(*value_)? codomain_type() : (*value_).lower(); +} + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/concept/joinable.hpp b/3party/boost/boost/icl/concept/joinable.hpp new file mode 100644 index 0000000000..afd8098fc7 --- /dev/null +++ b/3party/boost/boost/icl/concept/joinable.hpp @@ -0,0 +1,41 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_JOINABLE_HPP_JOFA_100920 +#define BOOST_ICL_CONCEPT_JOINABLE_HPP_JOFA_100920 + +#include +#include + +namespace boost{ namespace icl +{ + +namespace segmental +{ + template + typename enable_if, bool>::type + is_joinable(typename Type::iterator it_, typename Type::iterator next_, Type* = 0) + { + return touches(*it_, *next_); + } + + template + typename enable_if, bool>::type + is_joinable(typename Type::iterator it_, typename Type::iterator next_, Type* = 0) + { + return touches(it_->first, next_->first) + && it_->second == next_->second ; + } +} + + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/concept/map_value.hpp b/3party/boost/boost/icl/concept/map_value.hpp new file mode 100644 index 0000000000..969bcee412 --- /dev/null +++ b/3party/boost/boost/icl/concept/map_value.hpp @@ -0,0 +1,61 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_MAP_VALUE_HPP_JOFA_100924 +#define BOOST_ICL_CONCEPT_MAP_VALUE_HPP_JOFA_100924 + +#include +#include +#include + +namespace boost{ namespace icl +{ + +//============================================================================== +//= AlgoUnifiers +//============================================================================== +template +inline typename enable_if, const typename Type::key_type>::type& +key_value(Iterator it_) +{ + return it_->first; +} + +template +inline typename enable_if, const typename Type::codomain_type>::type& +co_value(Iterator it_) +{ + return it_->second; +} + +template +inline typename enable_if, typename Type::value_type>::type +make_value(const typename Type:: key_type& key_val, + const typename Type::codomain_type& co_val) +{ + return typename Type::value_type(key_val, co_val); +} + + +template +class content_is_identity_element: public property +{ +public: + bool operator() (const Type& value_pair)const + { + return value_pair.second + == identity_element::value(); + } +} ; + + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/concept/set_value.hpp b/3party/boost/boost/icl/concept/set_value.hpp new file mode 100644 index 0000000000..8b87318fef --- /dev/null +++ b/3party/boost/boost/icl/concept/set_value.hpp @@ -0,0 +1,40 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_SET_VALUE_HPP_JOFA_100924 +#define BOOST_ICL_CONCEPT_SET_VALUE_HPP_JOFA_100924 + +#include +#include + +namespace boost{ namespace icl +{ + +//============================================================================== +//= AlgoUnifiers +//============================================================================== +template +inline typename enable_if, const typename Type::key_type>::type& +key_value(Iterator it_) +{ + return *it_; +} + +template +inline typename enable_if, typename Type::value_type>::type +make_value(const typename Type::key_type& key_val, + const typename codomain_type_of::type& ) +{ + return typename Type::value_type(key_val); +} + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/continuous_interval.hpp b/3party/boost/boost/icl/continuous_interval.hpp new file mode 100644 index 0000000000..da53f05e93 --- /dev/null +++ b/3party/boost/boost/icl/continuous_interval.hpp @@ -0,0 +1,171 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONTINUOUS_INTERVAL_HPP_JOFA_100327 +#define BOOST_ICL_CONTINUOUS_INTERVAL_HPP_JOFA_100327 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +template +class continuous_interval +{ +public: + typedef continuous_interval type; + typedef DomainT domain_type; + typedef typename bounded_value::type bounded_domain_type; + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /** Default constructor; yields an empty interval [0,0). */ + continuous_interval() + : _lwb(identity_element::value()), _upb(identity_element::value()) + , _bounds(interval_bounds::right_open()) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + BOOST_STATIC_ASSERT((icl::is_continuous::value)); + } + + //NOTE: Compiler generated copy constructor is used + + /** Constructor for a closed singleton interval [val,val] */ + explicit continuous_interval(const DomainT& val) + : _lwb(val), _upb(val), _bounds(interval_bounds::closed()) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + BOOST_STATIC_ASSERT((icl::is_continuous::value)); + } + + /** Interval from low to up with bounds bounds */ + continuous_interval(const DomainT& low, const DomainT& up, + interval_bounds bounds = interval_bounds::right_open(), + continuous_interval* = 0) + : _lwb(low), _upb(up), _bounds(bounds) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + BOOST_STATIC_ASSERT((icl::is_continuous::value)); + } + + domain_type lower()const { return _lwb; } + domain_type upper()const { return _upb; } + interval_bounds bounds()const{ return _bounds; } + + static continuous_interval open (const DomainT& lo, const DomainT& up){ return continuous_interval(lo, up, interval_bounds::open()); } + static continuous_interval right_open(const DomainT& lo, const DomainT& up){ return continuous_interval(lo, up, interval_bounds::right_open());} + static continuous_interval left_open (const DomainT& lo, const DomainT& up){ return continuous_interval(lo, up, interval_bounds::left_open()); } + static continuous_interval closed (const DomainT& lo, const DomainT& up){ return continuous_interval(lo, up, interval_bounds::closed()); } + +private: + domain_type _lwb; + domain_type _upb; + interval_bounds _bounds; +}; + + +//============================================================================== +//=T continuous_interval -> concept interval +//============================================================================== +template +struct interval_traits< icl::continuous_interval > +{ + typedef interval_traits type; + typedef DomainT domain_type; + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + typedef icl::continuous_interval interval_type; + + static interval_type construct(const domain_type& lo, const domain_type& up) + { + return interval_type(lo, up); + } + + static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); }; + static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); }; +}; + + +//============================================================================== +//=T continuous_interval -> concept dynamic_interval +//============================================================================== +template +struct dynamic_interval_traits > +{ + typedef dynamic_interval_traits type; + typedef boost::icl::continuous_interval interval_type; + typedef DomainT domain_type; + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + + static interval_type construct(const domain_type lo, const domain_type up, interval_bounds bounds) + { + return icl::continuous_interval(lo, up, bounds, + static_cast* >(0) ); + } + + static interval_type construct_bounded(const bounded_value& lo, + const bounded_value& up) + { + return icl::continuous_interval + ( + lo.value(), up.value(), + lo.bound().left() | up.bound().right(), + static_cast* >(0) + ); + } +}; + +//============================================================================== +//= Type traits +//============================================================================== +template +struct interval_bound_type< continuous_interval > +{ + typedef interval_bound_type type; + BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::dynamic); +}; + +template +struct is_continuous_interval > +{ + typedef is_continuous_interval > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct type_to_string > +{ + static std::string apply() + { return "cI<"+ type_to_string::apply() +">"; } +}; + +template +struct value_size > +{ + static std::size_t apply(const icl::continuous_interval& value) + { return 2; } +}; + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/detail/associated_value.hpp b/3party/boost/boost/icl/detail/associated_value.hpp new file mode 100644 index 0000000000..895c7f9a38 --- /dev/null +++ b/3party/boost/boost/icl/detail/associated_value.hpp @@ -0,0 +1,43 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_DETAIL_ASSOCIATED_VALUE_HPP_JOFA_100829 +#define BOOST_ICL_DETAIL_ASSOCIATED_VALUE_HPP_JOFA_100829 + +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +template +typename enable_if< mpl::and_< is_key_compare_equal + , mpl::and_, is_map > >, + bool>::type +co_equal(typename Type::const_iterator left_, typename CoType::const_iterator right_, + const Type* = 0, const CoType* = 0) +{ + return co_value(left_) == co_value(right_); +} + +template +typename enable_if< mpl::and_< is_key_compare_equal + , mpl::not_, is_map > > >, + bool>::type +co_equal(typename Type::const_iterator, typename CoType::const_iterator, + const Type* = 0, const CoType* = 0) +{ + return true; +} + + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/detail/boost_config.hpp b/3party/boost/boost/icl/detail/boost_config.hpp new file mode 100644 index 0000000000..b8354e6abf --- /dev/null +++ b/3party/boost/boost/icl/detail/boost_config.hpp @@ -0,0 +1,26 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_DETAIL_BOOST_CONFIG_HPP_JOFA_101031 +#define BOOST_ICL_DETAIL_BOOST_CONFIG_HPP_JOFA_101031 + +// Since boost_1_44_0 boost/config.hpp can produce warnings too. +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4996) // Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' +#endif + +#include + +#ifdef _MSC_VER +#pragma warning(pop) +#endif + + +#endif + + diff --git a/3party/boost/boost/icl/detail/concept_check.hpp b/3party/boost/boost/icl/detail/concept_check.hpp new file mode 100644 index 0000000000..e8ebb40553 --- /dev/null +++ b/3party/boost/boost/icl/detail/concept_check.hpp @@ -0,0 +1,31 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2009-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_CONCEPT_CHECK_HPP_JOFA_090913 +#define BOOST_ICL_CONCEPT_CHECK_HPP_JOFA_090913 + +#include +#include + +namespace boost{ namespace icl +{ + + BOOST_concept(EqualComparable,(Type)) + { + BOOST_CONCEPT_USAGE(EqualComparable) { + require_boolean_expr(_left == _right); + } + private: + Type _left, _right; + }; + +}}// namespace boost icl + + +#endif + + diff --git a/3party/boost/boost/icl/detail/design_config.hpp b/3party/boost/boost/icl/detail/design_config.hpp new file mode 100644 index 0000000000..5bef824252 --- /dev/null +++ b/3party/boost/boost/icl/detail/design_config.hpp @@ -0,0 +1,107 @@ +/*-----------------------------------------------------------------------------+ +Author: Joachim Faulhaber +Copyright (c) 2009-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/*-----------------------------------------------------------------------------+ +Template parameters of major itl class templates can be designed as +template template parameters or +template type parameter +by setting defines in this file. ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_DESIGN_CONFIG_HPP_JOFA_090214 +#define BOOST_ICL_DESIGN_CONFIG_HPP_JOFA_090214 + +// If this macro is defined, right_open_interval with static interval borders +// will be used as default for all interval containers. +// BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS should be defined in the application +// before other includes from the ITL +//#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS +// If BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS is NOT defined, ITL uses intervals +// with dynamic borders as default. + + +//------------------------------------------------------------------------------ +// Auxiliary macros for denoting template signatures. +// Purpose: +// (1) Shorten the lenthy and redundant template signatures. +// (2) Name anonymous template types according to their meaning ... +// (3) Making easier to refactor by redefinitin of the macros +// (4) Being able to check template template parameter variants against +// template type parameter variants. + +#define ICL_USE_COMPARE_TEMPLATE_TEMPLATE +#define ICL_USE_COMBINE_TEMPLATE_TEMPLATE +#define ICL_USE_SECTION_TEMPLATE_TEMPLATE +// ICL_USE_INTERVAL_TEMPLATE_TYPE + +//------------------------------------------------------------------------------ +// template parameter Compare can not be a template type parameter as long as +// Compare >() is called in std::lexicographical_compare +// implementing operator< for interval_base_{set,map}. see NOTE DESIGN TTP +#ifdef ICL_USE_COMPARE_TEMPLATE_TEMPLATE +# define ICL_COMPARE templateclass +# define ICL_COMPARE_DOMAIN(itl_compare, domain_type) itl_compare +# define ICL_COMPARE_INSTANCE(compare_instance, domain_type) compare_instance +# define ICL_EXCLUSIVE_LESS(interval_type) exclusive_less_than +#else//ICL_USE_COMPARE_TEMPLATE_TYPE +# define ICL_COMPARE class +# define ICL_COMPARE_DOMAIN(itl_compare, domain_type) itl_compare +# define ICL_COMPARE_INSTANCE(compare_instance, domain_type) compare_instance +# define ICL_EXCLUSIVE_LESS(interval_type) exclusive_less_than +#endif + +//------------------------------------------------------------------------------ +// template parameter Combine could be a template type parameter. +#ifdef ICL_USE_COMBINE_TEMPLATE_TEMPLATE +# define ICL_COMBINE templateclass +# define ICL_COMBINE_CODOMAIN(itl_combine, codomain_type) itl_combine +# define ICL_COMBINE_INSTANCE(combine_instance,codomain_type) combine_instance +#else//ICL_USE_COMBINE_TEMPLATE_TYPE +# define ICL_COMBINE class +# define ICL_COMBINE_CODOMAIN(itl_combine, codomain_type) itl_combine +# define ICL_COMBINE_INSTANCE(combine_instance,codomain_type) combine_instance +#endif + +//------------------------------------------------------------------------------ +// template parameter Section could be a template type parameter. +#ifdef ICL_USE_SECTION_TEMPLATE_TEMPLATE +# define ICL_SECTION templateclass +# define ICL_SECTION_CODOMAIN(itl_intersect, codomain_type) itl_intersect +# define ICL_SECTION_INSTANCE(section_instance,codomain_type) section_instance +#else//ICL_USE_SECTION_TEMPLATE_TYPE +# define ICL_SECTION class +# define ICL_SECTION_CODOMAIN(itl_intersect, codomain_type) itl_intersect +# define ICL_SECTION_INSTANCE(section_instance,codomain_type) section_instance +#endif + + +//------------------------------------------------------------------------------ +// template parameter Interval could be a template type parameter. +#ifdef ICL_USE_INTERVAL_TEMPLATE_TEMPLATE +# define ICL_INTERVAL(itl_compare) templateclass +# define ICL_INTERVAL2(itl_compare) templateclass +# define ICL_INTERVAL_TYPE(itl_interval, domain_type, itl_compare) itl_interval +# define ICL_INTERVAL_INSTANCE(interval_instance,domain_type,itl_compare) interval_instance +#else//ICL_USE_INTERVAL_TEMPLATE_TYPE +# define ICL_INTERVAL(itl_compare) class +# define ICL_INTERVAL2(itl_compare) class +# define ICL_INTERVAL_TYPE(itl_interval, domain_type, itl_compare) itl_interval +# define ICL_INTERVAL_INSTANCE(interval_instance,domain_type,itl_compare) typename interval_instance::type +#endif + + +//------------------------------------------------------------------------------ +#define ICL_INTERVAL_DEFAULT boost::icl::interval_type_default + +//------------------------------------------------------------------------------ +#define ICL_ALLOC templateclass + +//------------------------------------------------------------------------------ + +#endif // BOOST_ICL_DESIGN_CONFIG_HPP_JOFA_090214 + + diff --git a/3party/boost/boost/icl/detail/element_comparer.hpp b/3party/boost/boost/icl/detail/element_comparer.hpp new file mode 100644 index 0000000000..56ae8c532a --- /dev/null +++ b/3party/boost/boost/icl/detail/element_comparer.hpp @@ -0,0 +1,210 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_ELEMENT_COMPARER_HPP_JOFA_090202 +#define BOOST_ICL_ELEMENT_COMPARER_HPP_JOFA_090202 + +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +namespace Interval_Set +{ + +template +class element_comparer +{ +public: + typedef typename LeftT::const_iterator LeftIterT; + typedef typename RightT::const_iterator RightIterT; + + BOOST_STATIC_CONSTANT(bool, + _compare_codomain = (mpl::and_, is_map >::value)); + + element_comparer(const LeftT& left, + const RightT& right, + const LeftIterT& left_end, + const RightIterT& right_end) + : _left(left), _right(right), + _left_end(left_end), _right_end(right_end), _result(equal) + {} + + enum{nextboth, nextleft, nextright, stop}; + + enum + { + less = comparison::less, + equal = comparison::equal, + greater = comparison::greater + }; + + int result()const{ return _result; } + + bool covalues_are_equal(LeftIterT& left, RightIterT& right) + { + if(co_value(left) < co_value(right)) + _result = less; + if(co_value(right) < co_value(left)) + _result = greater; + return _result == equal; + } + + int proceed(LeftIterT& left, RightIterT& right) + { + if(upper_less(key_value(left), key_value(right))) + { + _prior_left = left; + ++left; + return nextleft; + } + else if(upper_less(key_value(right), key_value(left))) + { + _prior_right = right; + ++right; + return nextright; + } + else + { + ++left; + ++right; + return nextboth; + } + } + + int next_both(LeftIterT& left, RightIterT& right) + { + if(left == _left_end) + { + _result = (right == _right_end) ? equal : less; + return stop; + } + + // left != _left_end + if(right == _right_end) + { + _result = greater; + return stop; + } + + // The starting intervals have to begin equally + if(lower_less(key_value(left), key_value(right))) + { // left: same A... = sameA... + // right:same B.. = sameB... + _result = less; + return stop; + } + + if(lower_less(key_value(right), key_value(left))) + { // left: same B.. = sameB... + // right:same A... = sameA... + _result = greater; + return stop; + } + + if(_compare_codomain && !covalues_are_equal(left, right)) + return stop; + + return proceed(left, right); + } + + int next_left(LeftIterT& left, RightIterT& right) + { + if(left == _left_end) + { // left: same + // right:sameA... + _result = less; + return stop; + } + + if(!key_value(_prior_left).touches(key_value(left))) + { // left: same B = sameB... + // right:sameA = sameA... + _result = greater; + return stop; + } + + if(_compare_codomain && !covalues_are_equal(left, right)) + return stop; + + return proceed(left, right); + } + + int next_right(LeftIterT& left, RightIterT& right) + { + if(right == _right_end) + { // left: sameA... + // right:same + _result = greater; + return stop; + } + + if(!key_value(_prior_right).touches(key_value(right))) + { + // left: sameA... = sameA... + // right:same B.. = sameB... + _result = less; + return stop; + } + + if(_compare_codomain && !covalues_are_equal(left, right)) + return stop; + + return proceed(left, right); + } + +private: + const LeftT& _left; + const RightT& _right; + LeftIterT _left_end; + RightIterT _right_end; + LeftIterT _prior_left; + RightIterT _prior_right; + int _result; +}; + + + +template +int element_compare +( + const LeftT& left, //sub + const RightT& right, //super + typename LeftT::const_iterator left_begin, + typename LeftT::const_iterator left_end, + typename RightT::const_iterator right_begin, + typename RightT::const_iterator right_end +) +{ + typedef element_comparer Step; + Step step(left, right, left_end, right_end); + + typename LeftT::const_iterator left_ = left_begin; + typename RightT::const_iterator right_ = right_begin; + + int state = Step::nextboth; + while(state != Step::stop) + { + switch(state){ + case Step::nextboth: state = step.next_both (left_, right_); break; + case Step::nextleft: state = step.next_left (left_, right_); break; + case Step::nextright: state = step.next_right(left_, right_); break; + } + } + return step.result(); +} + + +} // namespace Interval_Set + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/detail/element_iterator.hpp b/3party/boost/boost/icl/detail/element_iterator.hpp new file mode 100644 index 0000000000..111f209aad --- /dev/null +++ b/3party/boost/boost/icl/detail/element_iterator.hpp @@ -0,0 +1,335 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2009-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_DETAIL_ELEMENT_ITERATOR_HPP_JOFA_091104 +#define BOOST_ICL_DETAIL_ELEMENT_ITERATOR_HPP_JOFA_091104 + +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +//------------------------------------------------------------------------------ +template +struct is_std_pair +{ + typedef is_std_pair type; + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_std_pair > +{ + typedef is_std_pair > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + + +//------------------------------------------------------------------------------ +template +struct first_element +{ + typedef Type type; +}; + +template +struct first_element > +{ + typedef FirstT type; +}; + +//------------------------------------------------------------------------------ +template class element_iterator; + +template +struct is_reverse +{ + typedef is_reverse type; + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_reverse > +{ + typedef is_reverse > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct is_reverse > +{ + typedef is_reverse > type; + BOOST_STATIC_CONSTANT(bool, value = is_reverse::value); +}; + +//------------------------------------------------------------------------------ +template +struct elemental; + +#ifdef ICL_USE_INTERVAL_TEMPLATE_TEMPLATE + + template + struct elemental + { + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) segment_type; + typedef segment_type interval_type; + typedef DomainT type; + typedef DomainT domain_type; + typedef DomainT codomain_type; + typedef DomainT transit_type; + }; + + template< class DomainT, class CodomainT, + ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval > + struct elemental > + { + typedef std::pair segment_type; + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; + typedef std::pair type; + typedef DomainT domain_type; + typedef CodomainT codomain_type; + typedef mapped_reference transit_type; + }; + +#else //ICL_USE_INTERVAL_TEMPLATE_TYPE + + template + struct elemental + { + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) segment_type; + typedef segment_type interval_type; + typedef typename interval_traits::domain_type domain_type; + typedef domain_type type; + typedef domain_type codomain_type; + typedef domain_type transit_type; + }; + + template< class CodomainT, ICL_INTERVAL(ICL_COMPARE) Interval > + struct elemental > + { + typedef std::pair segment_type; + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; + typedef typename interval_traits::domain_type domain_type; + typedef CodomainT codomain_type; + typedef std::pair type; + typedef mapped_reference transit_type; + }; + +#endif //ICL_USE_INTERVAL_TEMPLATE_TEMPLATE + + +//------------------------------------------------------------------------------ +//- struct segment_adapter +//------------------------------------------------------------------------------ +template +struct segment_adapter; + +#ifdef ICL_USE_INTERVAL_TEMPLATE_TEMPLATE + +template +struct segment_adapter +{ + typedef segment_adapter type; + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) segment_type; + typedef segment_type interval_type; + typedef typename interval_type::difference_type domain_difference_type; + typedef DomainT domain_type; + typedef DomainT codomain_type; + typedef domain_type element_type; + typedef domain_type& transit_type; + + static domain_type first (const SegmentIteratorT& leaper){ return leaper->first(); } + static domain_type last (const SegmentIteratorT& leaper){ return leaper->last(); } + static domain_difference_type length(const SegmentIteratorT& leaper){ return leaper->length();} + + static transit_type transient_element(domain_type& inter_pos, const SegmentIteratorT& leaper, + const domain_difference_type& sneaker) + { + inter_pos = is_reverse::value ? leaper->last() - sneaker + : leaper->first() + sneaker; + return inter_pos; + } +}; + +template < class SegmentIteratorT, class DomainT, class CodomainT, + ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval > +struct segment_adapter > +{ + typedef segment_adapter type; + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; + typedef DomainT domain_type; + typedef std::pair element_type; + typedef CodomainT codomain_type; + typedef mapped_reference transit_type; + typedef typename difference_type_of >::type + domain_difference_type; + + static domain_type first (const SegmentIteratorT& leaper){ return leaper->first.first(); } + static domain_type last (const SegmentIteratorT& leaper){ return leaper->first.last(); } + static domain_difference_type length(const SegmentIteratorT& leaper){ return leaper->first.length();} + + static transit_type transient_element(domain_type& inter_pos, const SegmentIteratorT& leaper, + const domain_difference_type& sneaker) + { + inter_pos = is_reverse::value ? leaper->first.last() - sneaker + : leaper->first.first() + sneaker; + return transit_type(inter_pos, leaper->second); + } +}; + +#else // ICL_USE_INTERVAL_TEMPLATE_TYPE + +template +struct segment_adapter +{ + typedef segment_adapter type; + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) segment_type; + typedef segment_type interval_type; + typedef typename interval_traits::domain_type domain_type; + typedef domain_type codomain_type; + typedef domain_type element_type; + typedef domain_type& transit_type; + typedef typename difference_type_of >::type + domain_difference_type; + + static domain_type first (const SegmentIteratorT& leaper){ return leaper->first(); } + static domain_type last (const SegmentIteratorT& leaper){ return leaper->last(); } + static domain_difference_type length(const SegmentIteratorT& leaper){ return icl::length(*leaper);} + + static transit_type transient_element(domain_type& inter_pos, const SegmentIteratorT& leaper, + const domain_difference_type& sneaker) + { + inter_pos = is_reverse::value ? icl::last(*leaper) - sneaker + : icl::first(*leaper) + sneaker; + return inter_pos; + } +}; + +template < class SegmentIteratorT, class CodomainT, ICL_INTERVAL(ICL_COMPARE) Interval > +struct segment_adapter > +{ + typedef segment_adapter type; + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; + typedef typename interval_traits::domain_type domain_type; + typedef CodomainT codomain_type; + typedef std::pair element_type; + typedef mapped_reference transit_type; + typedef typename difference_type_of >::type + domain_difference_type; + + static domain_type first (const SegmentIteratorT& leaper){ return leaper->first.first(); } + static domain_type last (const SegmentIteratorT& leaper){ return leaper->first.last(); } + static domain_difference_type length(const SegmentIteratorT& leaper){ return icl::length(leaper->first);} + + static transit_type transient_element(domain_type& inter_pos, const SegmentIteratorT& leaper, + const domain_difference_type& sneaker) + { + inter_pos = is_reverse::value ? icl::last(leaper->first) - sneaker + : icl::first(leaper->first) + sneaker; + return transit_type(inter_pos, leaper->second); + } +}; + +#endif // ICL_USE_INTERVAL_TEMPLATE_TEMPLATE + +template +class element_iterator + : public boost::iterator_facade< + element_iterator + , typename elemental::transit_type + , boost::bidirectional_traversal_tag + , typename elemental::transit_type + > +{ +public: + typedef element_iterator type; + typedef SegmentIteratorT segment_iterator; + typedef typename SegmentIteratorT::value_type segment_type; + typedef typename first_element::type interval_type; + typedef typename elemental::type element_type; + typedef typename elemental::domain_type domain_type; + typedef typename elemental::codomain_type codomain_type; + typedef typename elemental::transit_type transit_type; + typedef transit_type value_type; + typedef typename difference_type_of >::type + domain_difference_type; + +private: + typedef typename segment_adapter::type adapt; + + struct enabler{}; + +public: + element_iterator() + : _saltator(identity_element::value()) + , _reptator(identity_element::value()){} + + explicit element_iterator(segment_iterator jumper) + : _saltator(jumper), _reptator(identity_element::value()) {} + + template + element_iterator + ( element_iterator const& other + , typename enable_if, enabler>::type = enabler()) + : _saltator(other._saltator), _reptator(other._reptator) {} + +private: + friend class boost::iterator_core_access; + template friend class element_iterator; + + template + bool equal(element_iterator const& other) const + { + return this->_saltator == other._saltator + && this->_reptator == other._reptator; + } + + void increment() + { + if(_reptator < icl::pred(adapt::length(_saltator))) + ++_reptator; + else + { + ++_saltator; + _reptator = identity_element::value(); + } + } + + void decrement() + { + if(identity_element::value() < _reptator) + --_reptator; + else + { + --_saltator; + _reptator = adapt::length(_saltator); + --_reptator; + } + } + + value_type dereference()const + { + return adapt::transient_element(_inter_pos, _saltator, _reptator); + } + +private: + segment_iterator _saltator; // satltare: to jump : the fast moving iterator + mutable domain_difference_type _reptator; // reptare: to sneak : the slow moving iterator 0 based + mutable domain_type _inter_pos; // inter position : Position within the current segment + // _saltator->first.first() <= _inter_pos <= _saltator->first.last() +}; + +}} // namespace icl boost + +#endif // BOOST_ICL_DETAIL_ELEMENT_ITERATOR_HPP_JOFA_091104 + + + diff --git a/3party/boost/boost/icl/detail/exclusive_less_than.hpp b/3party/boost/boost/icl/detail/exclusive_less_than.hpp new file mode 100644 index 0000000000..3a4aa6505a --- /dev/null +++ b/3party/boost/boost/icl/detail/exclusive_less_than.hpp @@ -0,0 +1,31 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_DETAIL_EXCLUSIVE_LESS_THAN_HPP_JOFA_100929 +#define BOOST_ICL_DETAIL_EXCLUSIVE_LESS_THAN_HPP_JOFA_100929 + +#include + +namespace boost{ namespace icl +{ + +/// Comparison functor on intervals implementing an overlap free less +template +struct exclusive_less_than +{ + /** Operator operator() implements a strict weak ordering on intervals. */ + bool operator()(const IntervalT& left, const IntervalT& right)const + { + return icl::non_empty::exclusive_less(left, right); + } +}; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/detail/interval_map_algo.hpp b/3party/boost/boost/icl/detail/interval_map_algo.hpp new file mode 100644 index 0000000000..2f1b8258fa --- /dev/null +++ b/3party/boost/boost/icl/detail/interval_map_algo.hpp @@ -0,0 +1,171 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_INTERVAL_MAP_ALGO_HPP_JOFA_100730 +#define BOOST_ICL_INTERVAL_MAP_ALGO_HPP_JOFA_100730 + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + + +namespace Interval_Map +{ +using namespace segmental; + +template +bool is_joinable(const IntervalMapT& container, + typename IntervalMapT::const_iterator first, + typename IntervalMapT::const_iterator past) +{ + if(first == container.end()) + return true; + + typename IntervalMapT::const_iterator it_ = first, next_ = first; + ++next_; + + const typename IntervalMapT::codomain_type& co_value + = icl::co_value(first); + while(it_ != past) + { + if(icl::co_value(next_) != co_value) + return false; + if(!icl::touches(key_value(it_++), + key_value(next_++))) + return false; + } + + return true; +} + +//------------------------------------------------------------------------------ +//- Containedness of key objects +//------------------------------------------------------------------------------ + +//- domain_type ---------------------------------------------------------------- +template +typename enable_if >, bool>::type +contains(const IntervalMapT& container, + const typename IntervalMapT::domain_type& key) +{ + return container.find(key) != container.end(); +} + +template +typename enable_if, bool>::type +contains(const IntervalMapT& container, + const typename IntervalMapT::domain_type& key) +{ + return true; +} + +//- interval_type -------------------------------------------------------------- +template +typename enable_if >, bool>::type +contains(const IntervalMapT& container, + const typename IntervalMapT::interval_type& sub_interval) +{ + typedef typename IntervalMapT::const_iterator const_iterator; + if(icl::is_empty(sub_interval)) + return true; + + std::pair exterior = container.equal_range(sub_interval); + if(exterior.first == exterior.second) + return false; + + const_iterator last_overlap = prior(exterior.second); + + return + icl::contains(hull(exterior.first->first, last_overlap->first), sub_interval) + && Interval_Set::is_joinable(container, exterior.first, last_overlap); +} + +template +typename enable_if, bool>::type +contains(const IntervalMapT& container, + const typename IntervalMapT::interval_type& sub_interval) +{ + return true; +} + +//- set_type ------------------------------------------------------------------- +template +typename enable_if > + ,is_interval_set >, bool>::type +contains(const IntervalMapT& super_map, const IntervalSetT& sub_set) +{ + return Interval_Set::within(sub_set, super_map); +} + +template +typename enable_if + ,is_interval_set >, bool>::type +contains(const IntervalMapT& super_map, const IntervalSetT& sub_set) +{ + return true; +} + + +//------------------------------------------------------------------------------ +//- Containedness of sub objects +//------------------------------------------------------------------------------ + +template +bool contains(const IntervalMapT& container, + const typename IntervalMapT::element_type& key_value_pair) +{ + typename IntervalMapT::const_iterator it_ = container.find(key_value_pair.key); + return it_ != container.end() && it_->second == key_value_pair.data; +} + +template +bool contains(const IntervalMapT& container, + const typename IntervalMapT::segment_type sub_segment) +{ + typedef typename IntervalMapT::const_iterator const_iterator; + typename IntervalMapT::interval_type sub_interval = sub_segment.first; + if(icl::is_empty(sub_interval)) + return true; + + std::pair exterior = container.equal_range(sub_interval); + if(exterior.first == exterior.second) + return false; + + const_iterator last_overlap = prior(exterior.second); + + if(!(sub_segment.second == exterior.first->second) ) + return false; + + return + icl::contains(hull(exterior.first->first, last_overlap->first), sub_interval) + && Interval_Map::is_joinable(container, exterior.first, last_overlap); +} + + +template +bool contains(const IntervalMapT& super, const IntervalMapT& sub) +{ + return Interval_Set::within(sub, super); +} + +} // namespace Interval_Map + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/detail/interval_morphism.hpp b/3party/boost/boost/icl/detail/interval_morphism.hpp new file mode 100644 index 0000000000..4c85d545f0 --- /dev/null +++ b/3party/boost/boost/icl/detail/interval_morphism.hpp @@ -0,0 +1,107 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_DETAIL_INTERVAL_MORPHISM_HPP_JOFA_080315 +#define BOOST_ICL_DETAIL_INTERVAL_MORPHISM_HPP_JOFA_080315 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + namespace segmental + { + template + void atomize(ElementContainerT& result, const IntervalContainerT& src) + { + ICL_const_FORALL(typename IntervalContainerT, itv_, src) + { + const typename IntervalContainerT::key_type& itv = icl::key_value(itv_); + typename IntervalContainerT::codomain_type coval = icl::co_value(itv_); + + for(typename IntervalContainerT::domain_type element = first(itv); element <= last(itv); ++element) + icl::insert(result, icl::make_value(element, coval)); + } + } + + template + void cluster(IntervalContainerT& result, const ElementContainerT& src) + { + typedef typename IntervalContainerT::key_type key_type; + ICL_const_FORALL(typename ElementContainerT, element_, src) + { + const typename ElementContainerT::key_type& key + = key_value(element_); + const typename codomain_type_of::type& coval + = co_value(element_); + + result += icl::make_value(key_type(key), coval); + } + } + + template + struct atomizer + { + void operator()(AtomizedType& atomized, const ClusteredType& clustered) + { + segmental::atomize(atomized, clustered); + } + }; + + template + struct clusterer + { + void operator()(ClusteredType& clustered, const AtomizedType& atomized) + { + segmental::cluster(clustered, atomized); + } + }; + + template + struct joiner + { + void operator()(JointType& joint, SplitType& split) + { + icl::join(split); + ICL_FORALL(typename SplitType, split_, split) + joint.insert(*split_); + } + }; + + template + struct identity_absorber + { + void operator()(AbsorberType& absorber, EnricherType& enricher) + { + icl::absorb_identities(enricher); + ICL_FORALL(typename EnricherType, enricher_, enricher) + absorber.insert(*enricher_); + } + }; + + } // namespace Interval + + + template<> + inline std::string binary_template_to_string::apply() { return "@"; } + template<> + inline std::string binary_template_to_string::apply() { return "&"; } + template<> + inline std::string binary_template_to_string::apply() { return "j"; } + template<> + inline std::string binary_template_to_string::apply() { return "a0"; } +}} // namespace boost icl + +#endif // BOOST_ICL_DETAIL_INTERVAL_MORPHISM_HPP_JOFA_080315 + + + diff --git a/3party/boost/boost/icl/detail/interval_set_algo.hpp b/3party/boost/boost/icl/detail/interval_set_algo.hpp new file mode 100644 index 0000000000..8d557c7da4 --- /dev/null +++ b/3party/boost/boost/icl/detail/interval_set_algo.hpp @@ -0,0 +1,648 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_INTERVAL_SET_ALGO_HPP_JOFA_081005 +#define BOOST_ICL_INTERVAL_SET_ALGO_HPP_JOFA_081005 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +namespace Interval_Set +{ + +//------------------------------------------------------------------------------ +// Lexicographical comparison on ranges of two interval container +//------------------------------------------------------------------------------ + +template +bool is_element_equal(const LeftT& left, const RightT& right) +{ + return subset_compare + ( + left, right, + left.begin(), left.end(), + right.begin(), right.end() + ) == inclusion::equal; +} + +template +bool is_element_less(const LeftT& left, const RightT& right) +{ + return element_compare + ( + left, right, + left.begin(), left.end(), + right.begin(), right.end() + ) == comparison::less; +} + +template +bool is_element_greater(const LeftT& left, const RightT& right) +{ + return element_compare + ( + left, right, + left.begin(), left.end(), + right.begin(), right.end() + ) == comparison::greater; +} + +//------------------------------------------------------------------------------ +// Subset/superset compare on ranges of two interval container +//------------------------------------------------------------------------------ + +template +bool is_joinable(const IntervalContainerT& container, + typename IntervalContainerT::const_iterator first, + typename IntervalContainerT::const_iterator past) +{ + if(first == container.end()) + return true; + + typename IntervalContainerT::const_iterator it_ = first, next_ = first; + ++next_; + + while(next_ != container.end() && it_ != past) + if(!icl::touches(key_value(it_++), + key_value(next_++))) + return false; + + return true; +} + + +template +bool is_inclusion_equal(const LeftT& left, const RightT& right) +{ + return subset_compare + ( + left, right, + left.begin(), left.end(), + right.begin(), right.end() + ) == inclusion::equal; +} + +template +typename enable_if, + is_total >, + bool>::type +within(const LeftT&, const RightT&) +{ + return true; +} + +template +typename enable_if, + mpl::not_ > >, + bool>::type +within(const LeftT& sub, const RightT& super) +{ + int result = + subset_compare + ( + sub, super, + sub.begin(), sub.end(), + super.begin(), super.end() + ); + return result == inclusion::subset || result == inclusion::equal; +} + + +template +typename enable_if, + bool>::type +within(const LeftT& sub, const RightT& super) +{ + int result = + subset_compare + ( + sub, super, + sub.begin(), sub.end(), + super.begin(), super.end() + ); + return result == inclusion::subset || result == inclusion::equal; +} + +template +typename enable_if, + bool>::type +within(const LeftT& sub, const RightT& super) +{ + int result = + subset_compare + ( + sub, super, + sub.begin(), sub.end(), + super.begin(), super.end() + ); + return result == inclusion::subset || result == inclusion::equal; +} + + + +template +typename enable_if, + is_total >, + bool>::type +contains(const LeftT&, const RightT&) +{ + return true; +} + +template +typename enable_if, + mpl::not_ > >, + bool>::type +contains(const LeftT& super, const RightT& sub) +{ + int result = + subset_compare + ( + super, sub, + super.begin(), super.end(), + sub.begin(), sub.end() + ); + return result == inclusion::superset || result == inclusion::equal; +} + +template +typename enable_if, + bool>::type +contains(const LeftT& super, const RightT& sub) +{ + int result = + subset_compare + ( + super, sub, + super.begin(), super.end(), + sub.begin(), sub.end() + ); + return result == inclusion::superset || result == inclusion::equal; +} + +template +bool is_dense(const IntervalContainerT& container, + typename IntervalContainerT::const_iterator first, + typename IntervalContainerT::const_iterator past) +{ + if(first == container.end()) + return true; + + typename IntervalContainerT::const_iterator it_ = first, next_ = first; + ++next_; + + while(next_ != container.end() && it_ != past) + if(!icl::touches(key_value(it_++), + key_value(next_++))) + return false; + + return true; +} + +} // namespace Interval_Set + +namespace segmental +{ + +template +inline bool joinable(const Type& _Type, typename Type::iterator& some, typename Type::iterator& next) +{ + // assert: next != end && some++ == next + return touches(key_value(some), key_value(next)) + && co_equal(some, next, &_Type, &_Type); +} + +template +inline void join_nodes(Type& object, typename Type::iterator& left_, + typename Type::iterator& right_) +{ + typedef typename Type::interval_type interval_type; + interval_type right_interval = key_value(right_); + object.erase(right_); + const_cast(key_value(left_)) + = hull(key_value(left_), right_interval); +} + +template +inline typename Type::iterator + join_on_left(Type& object, typename Type::iterator& left_, + typename Type::iterator& right_) +{ + typedef typename Type::interval_type interval_type; + // both left and right are in the set and they are neighbours + BOOST_ASSERT(exclusive_less(key_value(left_), key_value(right_))); + BOOST_ASSERT(joinable(object, left_, right_)); + + join_nodes(object, left_, right_); + return left_; +} + +template +inline typename Type::iterator + join_on_right(Type& object, typename Type::iterator& left_, + typename Type::iterator& right_) +{ + typedef typename Type::interval_type interval_type; + // both left and right are in the map and they are neighbours + BOOST_ASSERT(exclusive_less(key_value(left_), key_value(right_))); + BOOST_ASSERT(joinable(object, left_, right_)); + + join_nodes(object, left_, right_); + right_ = left_; + return right_; +} + +template +typename Type::iterator join_left(Type& object, typename Type::iterator& it_) +{ + typedef typename Type::iterator iterator; + + if(it_ == object.begin()) + return it_; + + // there is a predecessor + iterator pred_ = it_; + if(joinable(object, --pred_, it_)) + return join_on_right(object, pred_, it_); + + return it_; +} + +template +typename Type::iterator join_right(Type& object, typename Type::iterator& it_) +{ + typedef typename Type::iterator iterator; + + if(it_ == object.end()) + return it_; + + // there is a successor + iterator succ_ = it_; + + if(++succ_ != object.end() && joinable(object, it_, succ_)) + return join_on_left(object, it_, succ_); + + return it_; +} + +template +typename Type::iterator join_neighbours(Type& object, typename Type::iterator& it_) +{ + join_left (object, it_); + return join_right(object, it_); +} + +template +inline typename Type::iterator + join_under(Type& object, const typename Type::value_type& addend) +{ + //ASSERT: There is at least one interval in object that overlaps with addend + typedef typename Type::iterator iterator; + typedef typename Type::interval_type interval_type; + typedef typename Type::value_type value_type; + + std::pair overlap = object.equal_range(addend); + iterator first_ = overlap.first, + end_ = overlap.second, + last_ = end_; --last_; + + iterator second_= first_; ++second_; + + interval_type left_resid = right_subtract(key_value(first_), addend); + interval_type right_resid = left_subtract(key_value(last_) , addend); + + object.erase(second_, end_); + + const_cast(key_value(first_)) + = hull(hull(left_resid, addend), right_resid); + return first_; +} + +template +inline typename Type::iterator + join_under(Type& object, const typename Type::value_type& addend, + typename Type::iterator last_) +{ + //ASSERT: There is at least one interval in object that overlaps with addend + typedef typename Type::iterator iterator; + typedef typename Type::interval_type interval_type; + typedef typename Type::value_type value_type; + + iterator first_ = object.lower_bound(addend); + //BOOST_ASSERT(next(last_) == this->_set.upper_bound(inter_val)); + iterator second_= boost::next(first_), end_ = boost::next(last_); + + interval_type left_resid = right_subtract(key_value(first_), addend); + interval_type right_resid = left_subtract(key_value(last_) , addend); + + object.erase(second_, end_); + + const_cast(key_value(first_)) + = hull(hull(left_resid, addend), right_resid); + return first_; +} + +} // namespace segmental + +namespace Interval_Set +{ +using namespace segmental; + +template +struct on_style; + +template +struct on_style +{ + typedef on_style type; + typedef typename Type::interval_type interval_type; + typedef typename Type::iterator iterator; + + inline static iterator handle_inserted(Type& object, iterator inserted_) + { return join_neighbours(object, inserted_); } + + inline static iterator add_over + (Type& object, const interval_type& addend, iterator last_) + { + iterator joined_ = join_under(object, addend, last_); + return join_neighbours(object, joined_); + } + + inline static iterator add_over + (Type& object, const interval_type& addend) + { + iterator joined_ = join_under(object, addend); + return join_neighbours(object, joined_); + } +}; + +template +struct on_style +{ + typedef on_style type; + typedef typename Type::interval_type interval_type; + typedef typename Type::iterator iterator; + + inline static iterator handle_inserted(Type&, iterator inserted_) + { return inserted_; } + + inline static iterator add_over + (Type& object, const interval_type& addend, iterator last_) + { + return join_under(object, addend, last_); + } + + inline static iterator add_over + (Type& object, const interval_type& addend) + { + return join_under(object, addend); + } +}; + +template +struct on_style +{ + typedef on_style type; + typedef typename Type::interval_type interval_type; + typedef typename Type::iterator iterator; + + inline static iterator handle_inserted(Type&, iterator inserted_) + { return inserted_; } + + inline static iterator add_over + (Type& object, const interval_type& addend, iterator last_) + { + iterator first_ = object.lower_bound(addend); + //BOOST_ASSERT(next(last_) == this->_set.upper_bound(inter_val)); + + iterator it_ = first_; + interval_type rest_interval = addend; + + add_front(object, rest_interval, it_); + add_main (object, rest_interval, it_, last_); + add_rear (object, rest_interval, it_); + return it_; + } + + inline static iterator add_over + (Type& object, const interval_type& addend) + { + std::pair overlap = object.equal_range(addend); + iterator first_ = overlap.first, + end_ = overlap.second, + last_ = end_; --last_; + + iterator it_ = first_; + interval_type rest_interval = addend; + + add_front(object, rest_interval, it_); + add_main (object, rest_interval, it_, last_); + add_rear (object, rest_interval, it_); + + return it_; + } +}; + + +template +void add_front(Type& object, const typename Type::interval_type& inter_val, + typename Type::iterator& first_) +{ + typedef typename Type::interval_type interval_type; + typedef typename Type::iterator iterator; + // If the collision sequence has a left residual 'left_resid' it will + // be split, to provide a standardized start of algorithms: + // The addend interval 'inter_val' covers the beginning of the collision sequence. + + // only for the first there can be a left_resid: a part of *first_ left of inter_val + interval_type left_resid = right_subtract(key_value(first_), inter_val); + + if(!icl::is_empty(left_resid)) + { // [------------ . . . + // [left_resid---first_ --- . . . + iterator prior_ = cyclic_prior(object, first_); + const_cast(key_value(first_)) + = left_subtract(key_value(first_), left_resid); + //NOTE: Only splitting + object._insert(prior_, icl::make_value(left_resid, co_value(first_))); + } + + //POST: + // [----- inter_val ---- . . . + // ...[-- first_ --... +} + + +template +void add_segment(Type& object, const typename Type::interval_type& inter_val, + typename Type::iterator& it_ ) +{ + typedef typename Type::interval_type interval_type; + interval_type lead_gap = right_subtract(inter_val, *it_); + if(!icl::is_empty(lead_gap)) + // [lead_gap--- . . . + // [prior_) [-- it_ ... + object._insert(prior(it_), lead_gap); + + // . . . --------- . . . addend interval + // [-- it_ --) has a common part with the first overval + ++it_; +} + + +template +void add_main(Type& object, typename Type::interval_type& rest_interval, + typename Type::iterator& it_, + const typename Type::iterator& last_) +{ + typedef typename Type::interval_type interval_type; + interval_type cur_interval; + while(it_ != last_) + { + cur_interval = *it_ ; + add_segment(object, rest_interval, it_); + // shrink interval + rest_interval = left_subtract(rest_interval, cur_interval); + } +} + + +template +void add_rear(Type& object, const typename Type::interval_type& inter_val, + typename Type::iterator& it_ ) +{ + typedef typename Type::interval_type interval_type; + typedef typename Type::iterator iterator; + + iterator prior_ = cyclic_prior(object, it_); + interval_type cur_itv = *it_; + + interval_type lead_gap = right_subtract(inter_val, cur_itv); + if(!icl::is_empty(lead_gap)) + // [lead_gap--- . . . + // [prior_) [-- it_ ... + object._insert(prior_, lead_gap); + + interval_type end_gap = left_subtract(inter_val, cur_itv); + if(!icl::is_empty(end_gap)) + // [---------------end_gap) + // [-- it_ --) + it_ = object._insert(it_, end_gap); + else + { + // only for the last there can be a right_resid: a part of *it_ right of addend + interval_type right_resid = left_subtract(cur_itv, inter_val); + + if(!icl::is_empty(right_resid)) + { + // [--------------) + // [-- it_ --right_resid) + const_cast(*it_) = right_subtract(*it_, right_resid); + it_ = object._insert(it_, right_resid); + } + } +} + + +//============================================================================== +//= Addition +//============================================================================== +template +typename Type::iterator + add(Type& object, const typename Type::value_type& addend) +{ + typedef typename Type::interval_type interval_type; + typedef typename Type::iterator iterator; + typedef typename on_style::type on_style_; + + if(icl::is_empty(addend)) + return object.end(); + + std::pair insertion = object._insert(addend); + + if(insertion.second) + return on_style_::handle_inserted(object, insertion.first); + else + return on_style_::add_over(object, addend, insertion.first); +} + + +template +typename Type::iterator + add(Type& object, typename Type::iterator prior_, + const typename Type::value_type& addend) +{ + typedef typename Type::interval_type interval_type; + typedef typename Type::iterator iterator; + typedef typename on_style::type on_style_; + + if(icl::is_empty(addend)) + return prior_; + + iterator insertion = object._insert(prior_, addend); + + if(*insertion == addend) + return on_style_::handle_inserted(object, insertion); + else + return on_style_::add_over(object, addend); +} + + +//============================================================================== +//= Subtraction +//============================================================================== +template +void subtract(Type& object, const typename Type::value_type& minuend) +{ + typedef typename Type::iterator iterator; + typedef typename Type::interval_type interval_type; + typedef typename Type::value_type value_type; + + if(icl::is_empty(minuend)) return; + + std::pair exterior = object.equal_range(minuend); + if(exterior.first == exterior.second) return; + + iterator first_ = exterior.first; + iterator end_ = exterior.second; + iterator last_ = end_; --last_; + + interval_type leftResid = right_subtract(*first_, minuend); + interval_type rightResid; + if(first_ != end_ ) + rightResid = left_subtract(*last_ , minuend); + + object.erase(first_, end_); + + if(!icl::is_empty(leftResid)) + object._insert(leftResid); + + if(!icl::is_empty(rightResid)) + object._insert(rightResid); +} + + +} // namespace Interval_Set + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/detail/interval_subset_comparer.hpp b/3party/boost/boost/icl/detail/interval_subset_comparer.hpp new file mode 100644 index 0000000000..00ff116c28 --- /dev/null +++ b/3party/boost/boost/icl/detail/interval_subset_comparer.hpp @@ -0,0 +1,368 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_INTERVAL_SUBSET_COMPARER_HPP_JOFA_090827 +#define BOOST_ICL_INTERVAL_SUBSET_COMPARER_HPP_JOFA_090827 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4127) // conditional expression is constant +#endif + +namespace Interval_Set +{ + +//------------------------------------------------------------------------------ +template +struct settic_codomain_compare +{ + static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_) + { + return inclusion_compare( icl::co_value(left_), + icl::co_value(right_)); + } +}; + +template +struct atomic_codomain_compare +{ + static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_) + { + if(icl::co_value(left_) == icl::co_value(right_)) + return inclusion::equal; + else + return inclusion::unrelated; + } +}; + +template +struct empty_codomain_compare +{ + static int apply(typename LeftT::const_iterator&, typename RightT::const_iterator) + { + return inclusion::equal; + } +}; + +template +struct map_codomain_compare +{ + static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_) + { + using namespace boost::mpl; + typedef typename LeftT::codomain_type LeftCodomainT; + typedef typename RightT::codomain_type RightCodomainT; + + return + if_< + bool_::value>, + settic_codomain_compare, + atomic_codomain_compare + > + ::type::apply(left_, right_); + } +}; + + +//------------------------------------------------------------------------------ +template +class subset_comparer +{ +private: + subset_comparer& operator = (const subset_comparer&); +public: + typedef typename LeftT::const_iterator LeftIterT; + typedef typename RightT::const_iterator RightIterT; + + BOOST_STATIC_CONSTANT(bool, + _compare_codomain = (mpl::and_, is_map >::value)); + + + subset_comparer(const LeftT& left, + const RightT& right, + const LeftIterT& left_end, + const RightIterT& right_end) + : _left(left), _right(right), + _left_end(left_end), _right_end(right_end), _result(equal) + {} + + enum{nextboth, nextleft, nextright, stop}; + + enum + { + unrelated = inclusion::unrelated, + subset = inclusion::subset, // left is_subset_of right + superset = inclusion::superset, // left is_superset_of right + equal = inclusion::equal // equal = subset | superset + }; + + int result()const{ return _result; } + + + int co_compare(LeftIterT& left, RightIterT& right) + { + using namespace boost::mpl; + + return + if_< + bool_::value>, + map_codomain_compare, + empty_codomain_compare + > + ::type::apply(left,right); + } + + int restrict_result(int state) { return _result &= state; } + + int proceed(LeftIterT& left, RightIterT& right) + { + if(upper_less(key_value(left), key_value(right))) + { // left ..) + // right .....) + _prior_left = left; + ++left; + return nextleft; + } + else if(upper_less(key_value(right), key_value(left))) + { // left .....) + // right ..) + _prior_right = right; + ++right; + return nextright; + } + else//key_value(left).upper_equal(key_value(right)) + { // left ..) + // right ..) + ++left; + ++right; + return nextboth; + } + } + + int next_both(LeftIterT& left, RightIterT& right) + { + if(left == _left_end && right == _right_end) + return stop; + else if(left == _left_end) + { // left: ....end left could be subset + // right:....[.. + restrict_result(subset); + return stop; + } + else if(right == _right_end) + { // left: ....[.. left could be superset + // right:....end + restrict_result(superset); + return stop; + } + else if(exclusive_less(key_value(left), key_value(right))) + { // left: [..) . . .[---) left could be superset + // right: [..).... if [---) exists + restrict_result(superset); + if(unrelated == _result) + return stop; + else + { + LeftIterT joint_ = _left.lower_bound(key_value(right)); + if(joint_ == _left.end()) + { + _result = unrelated; + return stop; + } + else + { + left = joint_; + return nextboth; + } + } + } + else if(exclusive_less(key_value(right), key_value(left))) + { // left: [.. left could be subset + // right:....) . . .[---) if [---) exists + restrict_result(subset); + if(unrelated == _result) + return stop; + else + { + RightIterT joint_ = _right.lower_bound(key_value(left)); + if(joint_ == _right.end()) + { + _result = unrelated; + return stop; + } + else + { + right = joint_; + return nextboth; + } + } + } + + // left and right have intervals with nonempty intersection: + if(_compare_codomain) + if(unrelated == restrict_result(co_compare(left,right))) + return stop; + + // examine left borders only. Right borders are checked in proceed + if(lower_less(key_value(left), key_value(right))) + { // left: ....[... left could be superset + // right:.... [.. + if(unrelated == restrict_result(superset)) + return stop; + } + else if(lower_less(key_value(right), key_value(left))) + { // left: .... [.. left can be subset + // right:....[... + if(unrelated == restrict_result(subset)) + return stop; + } + //else key_value(right).lower_equal(key_value(left)) + // left: ....[.. both can be equal + // right:....[.. + // nothing to do: proceed + + return proceed(left, right); + } + + int next_left(LeftIterT& left, RightIterT& right) + { + if(left == _left_end) + { // left: ..)end left could be subset + // right:......) + restrict_result(subset); + return stop; + } + else if(!touches(key_value(_prior_left), key_value(left))) + { // left: ..) [.. + // right:.........) + if(lower_less(key_value(right), key_value(left))) + { // ..) [.. left could be subset + // ..........) + if(unrelated == restrict_result(subset)) + return stop; + } + //else ..) [... + // [.. + if(_compare_codomain && intersects(key_value(left),key_value(right)) ) + if(unrelated == restrict_result(co_compare(left,right))) + return stop; + } + else + { // left: ..)[.. left could be subset + // right:.......) + if(_compare_codomain && intersects(key_value(left), key_value(right)) ) + if(unrelated == restrict_result(co_compare(left,right))) + return stop; + } + + return proceed(left, right); + } + + + int next_right(LeftIterT& left, RightIterT& right) + { + if(right == _right_end) + { // left: ......) left could be superset + // right:..)end + restrict_result(superset); + return stop; + } + else if(!touches(key_value(_prior_right), key_value(right))) + { // left: .........) + // right:..) [.. + if(lower_less(key_value(left), key_value(right))) + { // [....) left could be superset + // ..) [.. + if(unrelated == restrict_result(superset)) + return stop; + } + //else [....) + // ..) [.. + if(_compare_codomain && intersects(key_value(left), key_value(right)) ) + if(unrelated == restrict_result(co_compare(left,right))) + return stop; + } + else + { + if(_compare_codomain && intersects(key_value(left), key_value(right)) ) + if(unrelated == restrict_result(co_compare(left,right))) + return stop; + } + + return proceed(left, right); + } + +private: + const LeftT& _left; + const RightT& _right; + LeftIterT _left_end; + RightIterT _right_end; + LeftIterT _prior_left; + RightIterT _prior_right; + int _result; +}; + + + + + +//------------------------------------------------------------------------------ +// Subset/superset comparison on ranges of two interval container +//------------------------------------------------------------------------------ +template +int subset_compare +( + const LeftT& left, //sub + const RightT& right, //super + typename LeftT::const_iterator left_begin, + typename LeftT::const_iterator left_end, + typename RightT::const_iterator right_begin, + typename RightT::const_iterator right_end +) +{ + typedef subset_comparer Step; + Step step(left, right, left_end, right_end); + + typename LeftT::const_iterator left_ = left_begin; + typename RightT::const_iterator right_ = right_begin; + + int state = Step::nextboth; + while(state != Step::stop) + { + switch(state){ + case Step::nextboth: state = step.next_both(left_, right_); break; + case Step::nextleft: state = step.next_left(left_, right_); break; + case Step::nextright: state = step.next_right(left_, right_); break; + } + } + return step.result(); +} + + +} // namespace Interval_Set + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/detail/map_algo.hpp b/3party/boost/boost/icl/detail/map_algo.hpp new file mode 100644 index 0000000000..9ac41dd5b4 --- /dev/null +++ b/3party/boost/boost/icl/detail/map_algo.hpp @@ -0,0 +1,90 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_MAPALGO_HPP_JOFA_080225 +#define BOOST_ICL_MAPALGO_HPP_JOFA_080225 + +#include +#include +#include +#include +#include + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4127) // conditional expression is constant +#endif + +namespace boost{namespace icl +{ +namespace Map +{ + +template +bool intersects(const ObjectT& left, const CoObjectT& right) +{ + typedef typename CoObjectT::const_iterator co_iterator; + co_iterator right_common_lower_, right_common_upper_; + if(!Set::common_range(right_common_lower_, right_common_upper_, right, left)) + return false; + + co_iterator right_ = right_common_lower_; + while(right_ != right_common_upper_) + if(!(left.find(key_value(right_++))==left.end())) + return true; + + return false; +} + + +template +typename MapT::const_iterator next_proton(typename MapT::const_iterator& iter_, const MapT& object) +{ + while( iter_ != object.end() + && iter_->second == identity_element::value()) + ++iter_; + + return iter_; +} + +/** Function template lexicographical_equal implements +lexicographical equality except for identity_elementic content values. */ +template +bool lexicographical_distinct_equal(const MapT& left, const MapT& right) +{ + if(&left == &right) + return true; + + typename MapT::const_iterator left_ = left.begin(); + typename MapT::const_iterator right_ = right.begin(); + + left_ = next_proton(left_, left); + right_ = next_proton(right_, right); + + while(left_ != left.end() && right_ != right.end()) + { + if(!(left_->first == right_->first && left_->second == right_->second)) + return false; + + ++left_; + ++right_; + left_ = next_proton(left_, left); + right_ = next_proton(right_, right); + } + + return left_ == left.end() && right_ == right.end(); +} + +} // namespace Map +}} // namespace boost icl + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#endif + diff --git a/3party/boost/boost/icl/detail/mapped_reference.hpp b/3party/boost/boost/icl/detail/mapped_reference.hpp new file mode 100644 index 0000000000..67f7d04137 --- /dev/null +++ b/3party/boost/boost/icl/detail/mapped_reference.hpp @@ -0,0 +1,192 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2009-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_DETAIL_MAPPED_REFERENCE_HPP_JOFA_091108 +#define BOOST_ICL_DETAIL_MAPPED_REFERENCE_HPP_JOFA_091108 + +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +template class mapped_reference; + +//------------------------------------------------------------------------------ +template +struct is_mapped_reference_combinable{ + typedef is_mapped_reference_combinable type; + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_mapped_reference_combinable > +{ + typedef is_mapped_reference_combinable > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct is_mapped_reference_combinable > +{ + typedef is_mapped_reference_combinable > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +//------------------------------------------------------------------------------ +template +struct is_mapped_reference_or_combinable{ + typedef is_mapped_reference_or_combinable type; + BOOST_STATIC_CONSTANT(bool, value = is_mapped_reference_combinable::value); +}; + +template +struct is_mapped_reference_or_combinable > +{ + typedef is_mapped_reference_or_combinable > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + + + +//------------------------------------------------------------------------------ +template +class mapped_reference +{ +private: + mapped_reference& operator = (const mapped_reference&); +public: + typedef FirstT first_type; + typedef SecondT second_type; + typedef mapped_reference type; + + typedef typename + mpl::if_, + second_type&, + const second_type&>::type second_reference_type; + + typedef std::pair< first_type, second_type> std_pair_type; + typedef std::pair key_std_pair_type; + + const first_type& first ; + second_reference_type second; + + mapped_reference(const FirstT& fst, second_reference_type snd) : first(fst), second(snd){} + + template + mapped_reference(const mapped_reference& source): + first(source.first), second(source.second){} + + template + operator std::pair(){ return std::pair(first, second); } + + template + typename enable_if, bool>::type + operator == (const Comparand& right)const + { return first == right.first && second == right.second; } + + template + typename enable_if, bool>::type + operator != (const Comparand& right)const + { return !(*this == right); } + + template + typename enable_if, bool>::type + operator < (const Comparand& right)const + { + return first < right.first + ||(!(right.first < first) && second < right.second); + } + + template + typename enable_if, bool>::type + operator > (const Comparand& right)const + { + return first > right.first + ||(!(right.first > first) && second > right.second); + } + + template + typename enable_if, bool>::type + operator <= (const Comparand& right)const + { + return !(*this > right); + } + + template + typename enable_if, bool>::type + operator >= (const Comparand& right)const + { + return !(*this < right); + } + +}; + +//------------------------------------------------------------------------------ +template +inline typename enable_if, bool>::type +operator == ( const StdPairT& left, + const mapped_reference& right) +{ + return right == left; +} + +template +inline typename enable_if, bool>::type +operator != ( const StdPairT& left, + const mapped_reference& right) +{ + return !(right == left); +} + +//------------------------------------------------------------------------------ +template +inline typename enable_if, bool>::type +operator < ( const StdPairT& left, + const mapped_reference& right) +{ + return right > left; +} + +//------------------------------------------------------------------------------ +template +inline typename enable_if, bool>::type +operator > ( const StdPairT& left, + const mapped_reference& right) +{ + return right < left; +} + +//------------------------------------------------------------------------------ +template +inline typename enable_if, bool>::type +operator <= ( const StdPairT& left, + const mapped_reference& right) +{ + return !(right < left); +} + +//------------------------------------------------------------------------------ +template +inline typename enable_if, bool>::type +operator >= ( const StdPairT& left, + const mapped_reference& right) +{ + return !(left < right); +} + +//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +template +inline mapped_reference make_mapped_reference(const FirstT& left, SecondT& right) +{ return mapped_reference(left, right); } + +}} // namespace icl boost + +#endif // BOOST_ICL_DETAIL_MAPPED_REFERENCE_HPP_JOFA_091108 diff --git a/3party/boost/boost/icl/detail/notate.hpp b/3party/boost/boost/icl/detail/notate.hpp new file mode 100644 index 0000000000..d06b6a3f2d --- /dev/null +++ b/3party/boost/boost/icl/detail/notate.hpp @@ -0,0 +1,35 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/*----------------------------------------------------------------------------- + Macro definitions for some useful notations e.g. iteration headers +-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_DETAIL_NOTATE_HPP_JOFA_990119 +#define BOOST_ICL_DETAIL_NOTATE_HPP_JOFA_990119 + + +// Iterations over stl or stl-compatible containers: +#define ICL_FORALL(type,iter,obj) for(type::iterator iter=(obj).begin(); (iter)!=(obj).end(); (iter)++) +#define ICL_const_FORALL(type,iter,obj) for(type::const_iterator iter=(obj).begin(); !((iter)==(obj).end()); (iter)++) + +#define ICL_FORALL_THIS(iter) for(iterator iter=begin(); (iter)!=end(); (iter)++) +#define ICL_const_FORALL_THIS(iter) for(const_iterator iter=this->begin(); (iter)!=this->end(); (iter)++) + +// Plain old array iteration (assuming member function VecT::size()!) +#define ICL_FORALL_VEC(idx, vec) for(int idx=0; idx +struct on_absorbtion; + +template +struct on_absorbtion +{ + typedef on_absorbtion type; + typedef typename Type::codomain_type codomain_type; + + static bool is_absorbable(const codomain_type&){ return false; } +}; + +template +struct on_absorbtion +{ + typedef on_absorbtion type; + typedef typename Type::codomain_type codomain_type; + typedef typename Type::codomain_combine codomain_combine; + + static bool is_absorbable(const codomain_type& co_value) + { + return co_value == Combiner::identity_element(); + } +}; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/detail/relation_state.hpp b/3party/boost/boost/icl/detail/relation_state.hpp new file mode 100644 index 0000000000..f0a0e04286 --- /dev/null +++ b/3party/boost/boost/icl/detail/relation_state.hpp @@ -0,0 +1,37 @@ +/*-----------------------------------------------------------------------------+ +Author: Joachim Faulhaber +Copyright (c) 2009-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +/*-----------------------------------------------------------------------------+ +States of comparison and inclusion relations as static constants ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_RELATION_STATE_HPP_JOFA_090214 +#define BOOST_ICL_RELATION_STATE_HPP_JOFA_090214 + +namespace boost{namespace icl +{ + namespace comparison + { + static const int less = -1; + static const int equal = 0; + static const int greater = 1; + } + + namespace inclusion + { + static const int unrelated = 0; + static const int subset = 1; + static const int superset = 2; + static const int equal = 3; + } + + +}} // namespace icl boost + +#endif // BOOST_ICL_RELATION_STATE_HPP_JOFA_090214 + + diff --git a/3party/boost/boost/icl/detail/set_algo.hpp b/3party/boost/boost/icl/detail/set_algo.hpp new file mode 100644 index 0000000000..7f74cd46ef --- /dev/null +++ b/3party/boost/boost/icl/detail/set_algo.hpp @@ -0,0 +1,134 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_SET_ALGO_HPP_JOFA_990225 +#define BOOST_ICL_SET_ALGO_HPP_JOFA_990225 + +#include + +#include +#include + +#include +#include +#include + + +namespace boost{namespace icl +{ + +namespace Set +{ + +template +bool common_range(IteratorT& lwb, IteratorT& upb, ObjectT& x1, const ConstObjectT& x2) +{ + // lwb and upb are iterators of x1 marking the lower and upper bound of + // the common range of x1 and x2. + typedef typename ConstObjectT::const_iterator ConstObject_iterator; + // ObjectT may be const or non const. + typedef typename remove_const::type PureObjectT; + + lwb = x1.end(); + upb = x1.end(); + + if(icl::is_empty(x1) || icl::is_empty(x2)) + return false; + + IteratorT x1_fst_ = x1.begin(); + IteratorT x1_lst_ = x1.end(); x1_lst_--; + + ConstObject_iterator x2_fst_ = x2.begin(); + ConstObject_iterator x2_lst_ = x2.end(); x2_lst_--; + + typename ObjectT::key_compare key_less; + if(key_less(icl::key_value< PureObjectT>(x1_lst_), + icl::key_value(x2_fst_))) // {x1} {x2} + return false; + if(key_less(icl::key_value(x2_lst_), + icl::key_value< PureObjectT>(x1_fst_))) // {x2} {x1} + return false; + + // We do have a common range + lwb = x1.lower_bound(icl::key_value(x2_fst_)); + upb = x1.upper_bound(icl::key_value(x2_lst_)); + + return true; +} + + +/** Function template contained_in implements the subset relation. +contained_in(sub, super) is true if sub is contained in super */ +template +inline bool within(const SetType& sub, const SetType& super) +{ + if(&super == &sub) return true; + if(icl::is_empty(sub)) return true; + if(icl::is_empty(super)) return false; + + typename SetType::const_iterator common_lwb_, common_upb_; + if(!common_range(common_lwb_, common_upb_, sub, super)) + return false; + + typename SetType::const_iterator sub_ = common_lwb_, super_; + while(sub_ != common_upb_) + { + super_ = super.find(*sub_++); + if(super_ == super.end()) + return false; + } + return true; +} + +template +bool intersects(const SetType& left, const SetType& right) +{ + typename SetType::const_iterator common_lwb_right_, common_upb_right_; + if(!common_range(common_lwb_right_, common_upb_right_, right, left)) + return false; + + typename SetType::const_iterator right_ = common_lwb_right_, found_; + while(right_ != common_upb_right_) + { + found_ = left.find(*right_++); + if(found_ != left.end()) + return true; // found a common element + } + // found no common element + return false; +} + + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4996) //'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' +#endif // I do guarantee here that I am using the parameters correctly :) + +/** Function template lexicographical_equal implements + lexicographical equality. */ +template +inline bool lexicographical_equal(const SetType& left, const SetType& right) +{ + if(&left == &right) + return true; + else return left.iterative_size() == right.iterative_size() + && std::equal(left.begin(), left.end(), right.begin()); +} + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + + +} // namespace Set + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/detail/std_set.hpp b/3party/boost/boost/icl/detail/std_set.hpp new file mode 100644 index 0000000000..da601a933d --- /dev/null +++ b/3party/boost/boost/icl/detail/std_set.hpp @@ -0,0 +1,38 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_DETAIL_STD_SET_HPP_JOFA_101007 +#define BOOST_ICL_DETAIL_STD_SET_HPP_JOFA_101007 + +#include +#include +#include +#include + + +namespace boost{namespace icl +{ + +template +struct is_set > +{ + typedef is_set > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + + +template +struct type_to_string > +{ + static std::string apply() + { return "set<"+ type_to_string::apply() +">"; } +}; + +}} // namespace icl boost + +#endif // BOOST_ICL_DETAIL_STD_SET_HPP_JOFA_101007 + diff --git a/3party/boost/boost/icl/detail/subset_comparer.hpp b/3party/boost/boost/icl/detail/subset_comparer.hpp new file mode 100644 index 0000000000..92b780411a --- /dev/null +++ b/3party/boost/boost/icl/detail/subset_comparer.hpp @@ -0,0 +1,259 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_SUBSET_COMPARER_HPP_JOFA_090202 +#define BOOST_ICL_SUBSET_COMPARER_HPP_JOFA_090202 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4127) // conditional expression is constant +#endif + +namespace Set +{ + +//------------------------------------------------------------------------------ +template +struct settic_codomain_compare +{ + static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_) + { + return inclusion_compare( co_value(left_), + co_value(right_)); + } +}; + +template +struct atomic_codomain_compare +{ + static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_) + { + if(co_value(left_) == co_value(right_)) + return inclusion::equal; + else + return inclusion::unrelated; + } +}; + +template +struct empty_codomain_compare +{ + static int apply(typename LeftT::const_iterator&, typename RightT::const_iterator&) + { + return inclusion::equal; + } +}; + +template +struct map_codomain_compare +{ + static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_) + { + using namespace boost::mpl; + typedef typename LeftT::codomain_type LeftCodomainT; + typedef typename RightT::codomain_type RightCodomainT; + + return + if_< + bool_::value>, + settic_codomain_compare, + atomic_codomain_compare + > + ::type::apply(left_, right_); + } +}; + + +//------------------------------------------------------------------------------ +template +class subset_comparer +{ +private: + subset_comparer& operator = (const subset_comparer&); +public: + typedef typename LeftT::const_iterator LeftIterT; + typedef typename RightT::const_iterator RightIterT; + + BOOST_STATIC_CONSTANT(bool, + _compare_codomain = (mpl::and_, is_map >::value)); + + subset_comparer(const LeftT& left, + const RightT& right, + const LeftIterT& left_end, + const RightIterT& right_end) + : _left(left), _right(right), + _left_end(left_end), _right_end(right_end), _result(equal) + {} + + enum{nextboth, stop}; + + enum + { + unrelated = inclusion::unrelated, + subset = inclusion::subset, // left is_subset_of right + superset = inclusion::superset, // left is_superset_of right + equal = inclusion::equal // equal = subset | superset + }; + + int result()const{ return _result; } + + int co_compare(LeftIterT& left, RightIterT& right) + { + using namespace boost::mpl; + typedef typename codomain_type_of::type LeftCodomainT; + typedef typename codomain_type_of::type RightCodomainT; + + return + if_< + bool_::value>, + map_codomain_compare, + empty_codomain_compare + > + ::type::apply(left,right); + } + + int restrict_result(int state) { return _result &= state; } + + int next_both(LeftIterT& left, RightIterT& right) + { + if(left == _left_end && right == _right_end) + return stop; + else if(left == _left_end) + { + restrict_result(subset); + return stop; + } + else if(right == _right_end) + { + restrict_result(superset); + return stop; + } + else if(typename LeftT::key_compare()(key_value(left), key_value(right))) + { // left: *left . . *joint_ left could be superset + // right: *right ... if joint_ exists + restrict_result(superset); + if(unrelated == _result) + return stop; + else + { + LeftIterT joint_ = _left.lower_bound(key_value(right)); + if( joint_ == _left.end() + || typename LeftT::key_compare()(key_value(right), key_value(joint_))) + { + _result = unrelated; + return stop; + } + else + left = joint_; + } + } + else if(typename LeftT::key_compare()(key_value(right), key_value(left))) + { // left: *left left could be subset + // right:*right . . .*joint_ if *joint_ exists + restrict_result(subset); + if(unrelated == _result) + return stop; + else + { + RightIterT joint_ = _right.lower_bound(key_value(left)); + if( joint_ == _right.end() + || typename LeftT::key_compare()(key_value(left), key_value(joint_))) + { + _result = unrelated; + return stop; + } + else + right = joint_; + } + } + + // left =key= right + if(_compare_codomain) + if(unrelated == restrict_result(co_compare(left,right))) + return stop; + + ++left; + ++right; + return nextboth; + } + +private: + const LeftT& _left; + const RightT& _right; + LeftIterT _left_end; + RightIterT _right_end; + int _result; +}; + + + + + +//------------------------------------------------------------------------------ +// Subset/superset comparison on ranges of two interval container +//------------------------------------------------------------------------------ +template +int subset_compare +( + const LeftT& left, //sub + const RightT& right, //super + typename LeftT::const_iterator left_begin, + typename LeftT::const_iterator left_end, + typename RightT::const_iterator right_begin, + typename RightT::const_iterator right_end +) +{ + typedef subset_comparer Step; + Step step(left, right, left_end, right_end); + + typename LeftT::const_iterator left_ = left_begin; + typename RightT::const_iterator right_ = right_begin; + + int state = Step::nextboth; + while(state != Step::stop) + state = step.next_both(left_, right_); + + return step.result(); +} + +template +int subset_compare(const LeftT& left, const RightT& right) +{ + return subset_compare + ( + left, right, + left.begin(), left.end(), + right.begin(), right.end() + ); +} + + +} // namespace Set + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/discrete_interval.hpp b/3party/boost/boost/icl/discrete_interval.hpp new file mode 100644 index 0000000000..d868141b4f --- /dev/null +++ b/3party/boost/boost/icl/discrete_interval.hpp @@ -0,0 +1,168 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_DISCRETE_INTERVAL_HPP_JOFA_100403 +#define BOOST_ICL_DISCRETE_INTERVAL_HPP_JOFA_100403 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +template +class discrete_interval +{ +public: + typedef discrete_interval type; + typedef DomainT domain_type; + typedef typename bounded_value::type bounded_domain_type; + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /** Default constructor; yields an empty interval [0,0). */ + discrete_interval() + : _lwb(identity_element::value()), _upb(identity_element::value()) + , _bounds(interval_bounds::right_open()) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + BOOST_STATIC_ASSERT((icl::is_discrete::value)); + } + + //NOTE: Compiler generated copy constructor is used + + /** Constructor for a closed singleton interval [val,val] */ + explicit discrete_interval(const DomainT& val) + : _lwb(val), _upb(val), _bounds(interval_bounds::closed()) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + BOOST_STATIC_ASSERT((icl::is_discrete::value)); + } + + /** Interval from low to up with bounds bounds */ + discrete_interval(const DomainT& low, const DomainT& up, + interval_bounds bounds = interval_bounds::right_open(), + discrete_interval* = 0) + : _lwb(low), _upb(up), _bounds(bounds) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + BOOST_STATIC_ASSERT((icl::is_discrete::value)); + } + + domain_type lower()const { return _lwb; } + domain_type upper()const { return _upb; } + interval_bounds bounds()const{ return _bounds; } + + static discrete_interval open (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::open()); } + static discrete_interval right_open(const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::right_open());} + static discrete_interval left_open (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::left_open()); } + static discrete_interval closed (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::closed()); } + +private: + domain_type _lwb; + domain_type _upb; + interval_bounds _bounds; +}; + +//============================================================================== +//=T discrete_interval -> concept intervals +//============================================================================== +template +struct interval_traits< icl::discrete_interval > +{ + typedef interval_traits type; + typedef DomainT domain_type; + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + typedef icl::discrete_interval interval_type; + + static interval_type construct(const domain_type& lo, const domain_type& up) + { + return interval_type(lo, up); + } + + static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); }; + static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); }; +}; + +//============================================================================== +//=T discrete_interval -> concept dynamic_interval_traits +//============================================================================== +template +struct dynamic_interval_traits > +{ + typedef dynamic_interval_traits type; + typedef boost::icl::discrete_interval interval_type; + typedef DomainT domain_type; + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + + static interval_type construct(const domain_type& lo, const domain_type& up, interval_bounds bounds) + { + return interval_type(lo, up, bounds, static_cast(0) ); + } + + static interval_type construct_bounded(const bounded_value& lo, + const bounded_value& up) + { + return interval_type + ( + lo.value(), up.value(), + lo.bound().left() | up.bound().right(), + static_cast(0) + ); + } +}; + +//============================================================================== +//= Type traits +//============================================================================== +template +struct interval_bound_type< discrete_interval > +{ + typedef interval_bound_type type; + BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::dynamic); +}; + +template +struct is_discrete_interval > +{ + typedef is_discrete_interval > type; + BOOST_STATIC_CONSTANT(bool, value = is_discrete::value); +}; + +template +struct type_to_string > +{ + static std::string apply() + { return "dI<"+ type_to_string::apply() +">"; } +}; + +template +struct value_size > +{ + static std::size_t apply(const icl::discrete_interval& value) + { return 2; } +}; + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/dynamic_interval_traits.hpp b/3party/boost/boost/icl/dynamic_interval_traits.hpp new file mode 100644 index 0000000000..52be023dfa --- /dev/null +++ b/3party/boost/boost/icl/dynamic_interval_traits.hpp @@ -0,0 +1,37 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_DYNAMIC_INTERVAL_TRAITS_HPP_JOFA_100926 +#define BOOST_ICL_DYNAMIC_INTERVAL_TRAITS_HPP_JOFA_100926 + +namespace boost{ namespace icl +{ + +class interval_bounds; +template class bounded_value; + + +//------------------------------------------------------------------------------ +//- Adapter class +//------------------------------------------------------------------------------ +template +struct dynamic_interval_traits +{ + typedef typename Type::domain_type domain_type; + typedef typename Type::domain_compare domain_compare; + + static Type construct(const domain_type& lo, const domain_type& up, interval_bounds bounds); + static Type construct_bounded(const bounded_value& lo, + const bounded_value& up); +}; + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/functors.hpp b/3party/boost/boost/icl/functors.hpp new file mode 100644 index 0000000000..d7e0b7f600 --- /dev/null +++ b/3party/boost/boost/icl/functors.hpp @@ -0,0 +1,473 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_FUNCTORS_HPP_JOFA_080315 +#define BOOST_ICL_FUNCTORS_HPP_JOFA_080315 + +#include +#include +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + // ------------------------------------------------------------------------ + template struct identity_based_inplace_combine + : public std::binary_function + { + static Type identity_element() { return boost::icl::identity_element::value(); } + }; + + // ------------------------------------------------------------------------ + template struct unit_element_based_inplace_combine + : public std::binary_function + { + static Type identity_element() { return boost::icl::unit_element::value(); } + }; + + // ------------------------------------------------------------------------ + template struct inplace_identity + : public identity_based_inplace_combine + { + typedef inplace_identity type; + void operator()(Type& object, const Type& operand)const{} + }; + + template<> + inline std::string unary_template_to_string::apply() + { return "i="; } + + // ------------------------------------------------------------------------ + template struct inplace_erasure + : public identity_based_inplace_combine + { + typedef inplace_erasure type; + + void operator()(Type& object, const Type& operand)const + { + if(object == operand) + object = Type(); + } + }; + + template<> + inline std::string unary_template_to_string::apply() + { return "0="; } + + // ------------------------------------------------------------------------ + template struct inplace_plus + : public identity_based_inplace_combine + { + typedef inplace_plus type; + + void operator()(Type& object, const Type& operand)const + { object += operand; } + + static void version(Type& object){} + }; + + template<> + inline std::string unary_template_to_string::apply() { return "+="; } + + // ------------------------------------------------------------------------ + template struct inplace_minus + : public identity_based_inplace_combine + { + typedef inplace_minus type; + + void operator()(Type& object, const Type& operand)const + { object -= operand; } + }; + + template<> + inline std::string unary_template_to_string::apply() { return "-="; } + + // ------------------------------------------------------------------------ + template struct inplace_bit_add + : public identity_based_inplace_combine + { + typedef inplace_bit_add type; + + void operator()(Type& object, const Type& operand)const + { object |= operand; } + + static void version(Type& object){} + }; + + template<> + inline std::string unary_template_to_string::apply() { return "b|="; } + + // ------------------------------------------------------------------------ + template struct inplace_bit_subtract + : public identity_based_inplace_combine + { + typedef inplace_bit_subtract type; + + void operator()(Type& object, const Type& operand)const + { object &= ~operand; } + + static Type identity_element() { return boost::icl::identity_element::value(); } + }; + + template<> + inline std::string unary_template_to_string::apply() { return "b-="; } + + // ------------------------------------------------------------------------ + template struct inplace_bit_and + : public identity_based_inplace_combine + { + typedef inplace_bit_and type; + + void operator()(Type& object, const Type& operand)const + { object &= operand; } + }; + + template<> + inline std::string unary_template_to_string::apply() { return "b&="; } + + // ------------------------------------------------------------------------ + template struct inplace_bit_xor + : public identity_based_inplace_combine + { + typedef inplace_bit_xor type; + + void operator()(Type& object, const Type& operand)const + { object ^= operand; } + + static Type identity_element() { return boost::icl::identity_element::value(); } + }; + + // ------------------------------------------------------------------------ + template struct inplace_et + : public identity_based_inplace_combine + { + typedef inplace_et type; + + void operator()(Type& object, const Type& operand)const + { object &= operand; } + }; + + template<> + inline std::string unary_template_to_string::apply() { return "&="; } + + // ------------------------------------------------------------------------ + template struct inplace_caret + : public identity_based_inplace_combine + { + typedef inplace_caret type; + + void operator()(Type& object, const Type& operand)const + { object ^= operand; } + + static Type identity_element() { return boost::icl::identity_element::value(); } + }; + + template<> + inline std::string unary_template_to_string::apply() { return "^="; } + + // ------------------------------------------------------------------------ + template struct inplace_insert + : public identity_based_inplace_combine + { + typedef inplace_insert type; + + void operator()(Type& object, const Type& operand)const + { insert(object,operand); } + + static Type identity_element() { return boost::icl::identity_element::value(); } + }; + + template<> + inline std::string unary_template_to_string::apply() { return "ins="; } + + // ------------------------------------------------------------------------ + template struct inplace_erase + : public identity_based_inplace_combine + { + typedef inplace_erase type; + + void operator()(Type& object, const Type& operand)const + { erase(object,operand); } + + static Type identity_element() { return boost::icl::identity_element::value(); } + }; + + template<> + inline std::string unary_template_to_string::apply() { return "ers="; } + + // ------------------------------------------------------------------------ + template struct inplace_star + : public identity_based_inplace_combine + { + typedef inplace_star type; + + void operator()(Type& object, const Type& operand)const + { object *= operand; } + + static Type identity_element() { return boost::icl::identity_element::value(); } + }; + + template<> + inline std::string unary_template_to_string::apply() { return "*="; } + + // ------------------------------------------------------------------------ + template struct inplace_slash + : public identity_based_inplace_combine + { + typedef inplace_slash type; + + void operator()(Type& object, const Type& operand)const + { object /= operand; } + + static Type identity_element() { return boost::icl::identity_element::value(); } + }; + + template<> + inline std::string unary_template_to_string::apply() { return "/="; } + + // ------------------------------------------------------------------------ + template struct inplace_max + : public identity_based_inplace_combine + { + typedef inplace_max type; + + void operator()(Type& object, const Type& operand)const + { + if(object < operand) + object = operand; + } + + static Type identity_element() { return boost::icl::identity_element::value(); } + }; + + template<> + inline std::string unary_template_to_string::apply() { return "max="; } + + // ------------------------------------------------------------------------ + template struct inplace_min + : public identity_based_inplace_combine + { + typedef inplace_min type; + + void operator()(Type& object, const Type& operand)const + { + if(object > operand) + object = operand; + } + + static Type identity_element() { return boost::icl::identity_element::value(); } + }; + + template<> + inline std::string unary_template_to_string::apply() { return "min="; } + + //-------------------------------------------------------------------------- + // Inter_section functor + //-------------------------------------------------------------------------- + template struct inter_section + : public identity_based_inplace_combine + { + typedef typename boost::mpl:: + if_, + icl::inplace_et, + icl::inplace_plus + >::type + type; + + void operator()(Type& object, const Type& operand)const + { + type()(object, operand); + } + }; + + //-------------------------------------------------------------------------- + // Inverse functor + //-------------------------------------------------------------------------- + template struct inverse; + + template + struct inverse > + { typedef icl::inplace_minus type; }; + + template + struct inverse > + { typedef icl::inplace_plus type; }; + + template + struct inverse > + { typedef icl::inplace_bit_subtract type; }; + + template + struct inverse > + { typedef icl::inplace_bit_add type; }; + + template + struct inverse > + { typedef icl::inplace_caret type; }; + + template + struct inverse > + { typedef icl::inplace_et type; }; + + template + struct inverse > + { typedef icl::inplace_bit_xor type; }; + + template + struct inverse > + { typedef icl::inplace_bit_and type; }; + + template + struct inverse > + { typedef icl::inplace_slash type; }; + + template + struct inverse > + { typedef icl::inplace_star type; }; + + template + struct inverse > + { typedef icl::inplace_min type; }; + + template + struct inverse > + { typedef icl::inplace_max type; }; + + + //-------------------------------------------------------------------------- + // Inverse inter_section functor + //-------------------------------------------------------------------------- + template + struct inverse > + : public identity_based_inplace_combine + { + typedef typename boost::mpl:: + if_, + icl::inplace_caret, + icl::inplace_minus + >::type + type; + + void operator()(Type& object, const Type& operand)const + { + type()(object, operand); + } + }; + + + //-------------------------------------------------------------------------- + // Positive or negative functor trait + //-------------------------------------------------------------------------- + + // A binary operation - is negative (or inverting) with respect to the + // neutral element iff it yields the inverse element if it is applied to the + // identity element: + // 0 - x = -x + // For a functor that wraps the inplace of op-assign version this is + // equivalent to + // + // T x = ..., y; + // y = Functor::identity_element(); + // Functor()(y, x); // y == inverse_of(x) + + template struct is_negative; + + template + struct is_negative + { + typedef is_negative type; + BOOST_STATIC_CONSTANT(bool, value = false); + }; + + template + struct is_negative > + { + typedef is_negative type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + template + struct is_negative > + { + typedef is_negative type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + //-------------------------------------------------------------------------- + // Pro- or in-version functor + //-------------------------------------------------------------------------- + template struct conversion; + + template + struct conversion + { + typedef conversion type; + typedef typename + remove_const< + typename remove_reference::type + >::type + argument_type; + // The proversion of an op-assign functor o= lets the value unchanged + // (0 o= x) == x; + // Example += : (0 += x) == x + static argument_type proversion(const argument_type& value) + { + return value; + } + + // The inversion of an op-assign functor o= inverts the value x + // to it's inverse element -x + // (0 o= x) == -x; + // Example -= : (0 -= x) == -x + static argument_type inversion(const argument_type& value) + { + argument_type inverse = Combiner::identity_element(); + Combiner()(inverse, value); + return inverse; + } + }; + + template struct version : public conversion + { + typedef version type; + typedef conversion base_type; + typedef typename base_type::argument_type argument_type; + + argument_type operator()(const argument_type& value) + { return base_type::proversion(value); } + }; + + template<>struct version >{short operator()(short val){return -val;}}; + template<>struct version >{int operator()(int val){return -val;}}; + template<>struct version >{long operator()(long val){return -val;}}; + template<>struct version >{long long operator()(long long val){return -val;}}; + template<>struct version >{float operator()(float val){return -val;}}; + template<>struct version >{double operator()(double val){return -val;}}; + template<>struct version >{long double operator()(long double val){return -val;}}; + + template + struct version > : public conversion > + { + typedef version > type; + typedef conversion > base_type; + typedef typename base_type::argument_type argument_type; + + Type operator()(const Type& value) + { + return base_type::inversion(value); + } + }; + +}} // namespace icl boost + +#endif + + diff --git a/3party/boost/boost/icl/gregorian.hpp b/3party/boost/boost/icl/gregorian.hpp new file mode 100644 index 0000000000..883299c610 --- /dev/null +++ b/3party/boost/boost/icl/gregorian.hpp @@ -0,0 +1,127 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_GREGORIAN_DATE_HPP_JOFA_080416 +#define BOOST_ICL_GREGORIAN_DATE_HPP_JOFA_080416 + +#include +#include + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4100) // unreferenced formal parameter +#pragma warning(disable:4127) // conditional expression is constant +#pragma warning(disable:4244) // 'argument' : conversion from 'int' to 'unsigned short', possible loss of data +#pragma warning(disable:4702) // boost\lexical_cast.hpp(1159) : warning C4702: unreachable code +#pragma warning(disable:4996) // Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' +#endif + +#include +#include +#include +#include +#include + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include +#include +#include +#include + +namespace boost{namespace icl +{ + template<> struct is_discrete + { + typedef is_discrete type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + template<> + inline boost::gregorian::date identity_element::value() + { + return boost::gregorian::date(boost::gregorian::min_date_time); + } + + template<> + struct identity_element + { + static boost::gregorian::date_duration value() + { + return boost::gregorian::date(boost::gregorian::min_date_time) + - boost::gregorian::date(boost::gregorian::min_date_time); + } + }; + + template<> + struct has_difference + { + typedef has_difference type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + template<> + struct difference_type_of + { typedef boost::gregorian::date_duration type; }; + + template<> + struct size_type_of + { typedef boost::gregorian::date_duration type; }; + + + + // ------------------------------------------------------------------------ + boost::gregorian::date operator ++(boost::gregorian::date& x) + { + return x += boost::gregorian::date::duration_type::unit(); + } + + boost::gregorian::date operator --(boost::gregorian::date& x) + { + return x -= boost::gregorian::date::duration_type::unit(); + } + + // ------------------------------------------------------------------------ + template<> struct is_discrete + { + typedef is_discrete type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + template<> + struct has_difference + { + typedef has_difference type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + template<> + struct size_type_of + { + typedef boost::gregorian::date_duration type; + }; + + boost::gregorian::date_duration operator ++(boost::gregorian::date_duration& x) + { + return x += boost::gregorian::date::duration_type::unit(); + } + + boost::gregorian::date_duration operator --(boost::gregorian::date_duration& x) + { + return x -= boost::gregorian::date::duration_type::unit(); + } + + // ------------------------------------------------------------------------ + + +}} // namespace icl boost + +#endif + + diff --git a/3party/boost/boost/icl/impl_config.hpp b/3party/boost/boost/icl/impl_config.hpp new file mode 100644 index 0000000000..5176360d0e --- /dev/null +++ b/3party/boost/boost/icl/impl_config.hpp @@ -0,0 +1,45 @@ +/*-----------------------------------------------------------------------------+ +Author: Joachim Faulhaber +Copyright (c) 2009-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_IMPL_CONFIG_HPP_JOFA_091225 +#define BOOST_ICL_IMPL_CONFIG_HPP_JOFA_091225 + +/*-----------------------------------------------------------------------------+ +You can choose an implementation for the basic set and map classes. +Select at most ONE of the following defines ++-----------------------------------------------------------------------------*/ + +//#define ICL_USE_STD_IMPLEMENTATION +//#define ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION +//#define ICL_USE_BOOST_MOVE_IMPLEMENTATION + +/*-----------------------------------------------------------------------------+ +NO define or ICL_USE_STD_IMPLEMENTATION: Choose std::set and std::map as + implementing containers (default). + +ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION: Choose set and map implementations + from boost::interprocess. + +ICL_USE_BOOST_MOVE_IMPLEMENTATION: Move aware containers from boost::container + (NEW) are used. Currently (January 2010) this is only experimental. + boost::move from the boost::sandbox has to be used. This is depreciated for + production code, as long as move aware containers are not officially + accepted into boost. ++-----------------------------------------------------------------------------*/ + +#if defined(ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION) +#define ICL_IMPL_SPACE boost::interprocess +#elif defined(ICL_USE_BOOST_MOVE_IMPLEMENTATION) +#define ICL_IMPL_SPACE boost::container +#else +#define ICL_IMPL_SPACE std +#endif + +#endif // BOOST_ICL_IMPL_CONFIG_HPP_JOFA_091225 + + diff --git a/3party/boost/boost/icl/interval.hpp b/3party/boost/boost/icl/interval.hpp new file mode 100644 index 0000000000..86f19fa23b --- /dev/null +++ b/3party/boost/boost/icl/interval.hpp @@ -0,0 +1,136 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_INTERVAL_HPP_JOFA_101014 +#define BOOST_ICL_INTERVAL_HPP_JOFA_101014 + + +#include + + +namespace boost{ namespace icl +{ + + template + struct static_interval; + + template + struct interval + { + typedef typename interval_type_default::type interval_type; + typedef interval_type type; + +#ifdef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS + + static inline interval_type open(const DomainT& low, const DomainT& up) + { + return + static_interval + < interval_type // if the domain_type is discrete ... + , is_discrete::domain_type>::value + , interval_bounds::static_open // 'pretended' bounds will be transformed to + , interval_bound_type::value // the represented bounds + > + ::construct(low, up); + } + + static inline interval_type left_open(const DomainT& low, const DomainT& up) + { + return + static_interval + < interval_type + , is_discrete::domain_type>::value + , interval_bounds::static_left_open + , interval_bound_type::value + > + ::construct(low, up); + } + + static inline interval_type right_open(const DomainT& low, const DomainT& up) + { + return + static_interval + < interval_type + , is_discrete::domain_type>::value + , interval_bounds::static_right_open + , interval_bound_type::value + > + ::construct(low, up); + } + + static inline interval_type closed(const DomainT& low, const DomainT& up) + { + return + static_interval + < interval_type + , is_discrete::domain_type>::value + , interval_bounds::static_closed + , interval_bound_type::value + > + ::construct(low, up); + } + + static inline interval_type construct(const DomainT& low, const DomainT& up) + { return icl::construct(low, up); } + +#else // ICL_USE_DYNAMIC_INTERVAL_BORDER_DEFAULTS + static inline interval_type right_open(const DomainT& low, const DomainT& up) + { return icl::construct(low, up, interval_bounds::right_open()); } + + static inline interval_type left_open(const DomainT& low, const DomainT& up) + { return icl::construct(low, up, interval_bounds::left_open()); } + + static inline interval_type open(const DomainT& low, const DomainT& up) + { return icl::construct(low, up, interval_bounds::open()); } + + static inline interval_type closed(const DomainT& low, const DomainT& up) + { return icl::construct(low, up, interval_bounds::closed()); } + + static inline interval_type construct(const DomainT& low, const DomainT& up) + { return icl::construct(low, up); } + +#endif + }; + + template + struct static_interval + {// is_discrete> + typedef typename interval_traits::domain_type domain_type; + + static inline IntervalT construct(const domain_type& low, const domain_type& up) + { + return icl::construct( + shift_lower(interval_bounds(PretendedBounds), interval_bounds(RepresentedBounds), low) + , shift_upper(interval_bounds(PretendedBounds), interval_bounds(RepresentedBounds), up ) + ); + } + }; + + template + struct static_interval + {// !is_discrete> + typedef typename interval_traits::domain_type domain_type; + + static inline IntervalT construct(const domain_type& low, const domain_type& up) + { + BOOST_STATIC_ASSERT((is_discrete::value || PretendedBounds==RepresentedBounds)); + // For domain_types that are not discrete, e.g. interval + // one of the following must hold: If you call + // interval::right_open(x,y) then interval::type must be static_right_open + // interval::left_open(x,y) then interval::type must be static_left_open + // interval::open(x,y) then interval::type must be static_open + // interval::closed(x,y) then interval::type must be static_closed + // Conversion between 'PretendedBounds' and 'RepresentedBounds' is only possible + // for discrete domain_types. + return icl::construct(low, up); + } + }; + +}} // namespace boost icl + +#endif // BOOST_ICL_INTERVAL_HPP_JOFA_101014 + diff --git a/3party/boost/boost/icl/interval_base_map.hpp b/3party/boost/boost/icl/interval_base_map.hpp new file mode 100644 index 0000000000..94f1855d59 --- /dev/null +++ b/3party/boost/boost/icl/interval_base_map.hpp @@ -0,0 +1,1357 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2010: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_INTERVAL_BASE_MAP_HPP_JOFA_990223 +#define BOOST_ICL_INTERVAL_BASE_MAP_HPP_JOFA_990223 + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include + +namespace boost{namespace icl +{ + +template +struct mapping_pair +{ + DomainT key; + CodomainT data; + + mapping_pair():key(), data(){} + + mapping_pair(const DomainT& key_value, const CodomainT& data_value) + :key(key_value), data(data_value){} + + mapping_pair(const std::pair& std_pair) + :key(std_pair.first), data(std_pair.second){} +}; + +/** \brief Implements a map as a map of intervals (base class) */ +template +< + class SubType, + typename DomainT, + typename CodomainT, + class Traits = icl::partial_absorber, + ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT), + ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, CodomainT), + ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, CodomainT), + ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), + ICL_ALLOC Alloc = std::allocator +> +class interval_base_map +{ +public: + //========================================================================== + //= Associated types + //========================================================================== + typedef interval_base_map + type; + + /// The designated \e derived or \e sub_type of this base class + typedef SubType sub_type; + + /// Auxilliary type for overloadresolution + typedef type overloadable_type; + + /// Traits of an itl map + typedef Traits traits; + + //-------------------------------------------------------------------------- + //- Associated types: Related types + //-------------------------------------------------------------------------- + /// The atomized type representing the corresponding container of elements + typedef typename icl::map atomized_type; + + //-------------------------------------------------------------------------- + //- Associated types: Data + //-------------------------------------------------------------------------- + /// Domain type (type of the keys) of the map + typedef DomainT domain_type; + typedef typename boost::call_traits::param_type domain_param; + /// Domain type (type of the keys) of the map + typedef CodomainT codomain_type; + /// Auxiliary type to help the compiler resolve ambiguities when using std::make_pair + typedef mapping_pair domain_mapping_type; + /// Conceptual is a map a set of elements of type \c element_type + typedef domain_mapping_type element_type; + /// The interval type of the map + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; + /// Auxiliary type for overload resolution + typedef std::pair interval_mapping_type; + /// Type of an interval containers segment, that is spanned by an interval + typedef std::pair segment_type; + + //-------------------------------------------------------------------------- + //- Associated types: Size + //-------------------------------------------------------------------------- + /// The difference type of an interval which is sometimes different form the domain_type + typedef typename difference_type_of::type difference_type; + /// The size type of an interval which is mostly std::size_t + typedef typename size_type_of::type size_type; + + //-------------------------------------------------------------------------- + //- Associated types: Functors + //-------------------------------------------------------------------------- + /// Comparison functor for domain values + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + typedef ICL_COMPARE_DOMAIN(Compare,segment_type) segment_compare; + /// Combine functor for codomain value aggregation + typedef ICL_COMBINE_CODOMAIN(Combine,CodomainT) codomain_combine; + /// Inverse Combine functor for codomain value aggregation + typedef typename inverse::type inverse_codomain_combine; + /// Intersection functor for codomain values + + typedef typename mpl::if_ + + , ICL_SECTION_CODOMAIN(Section,CodomainT) + , codomain_combine + >::type codomain_intersect; + + + /// Inverse Combine functor for codomain value intersection + typedef typename inverse::type inverse_codomain_intersect; + + /// Comparison functor for intervals which are keys as well + typedef exclusive_less_than interval_compare; + + /// Comparison functor for keys + typedef exclusive_less_than key_compare; + + //-------------------------------------------------------------------------- + //- Associated types: Implementation and stl related + //-------------------------------------------------------------------------- + /// The allocator type of the set + typedef Alloc > + allocator_type; + + /// Container type for the implementation + typedef ICL_IMPL_SPACE::map ImplMapT; + + /// key type of the implementing container + typedef typename ImplMapT::key_type key_type; + /// value type of the implementing container + typedef typename ImplMapT::value_type value_type; + /// data type of the implementing container + typedef typename ImplMapT::value_type::second_type data_type; + + /// pointer type + typedef typename ImplMapT::pointer pointer; + /// const pointer type + typedef typename ImplMapT::const_pointer const_pointer; + /// reference type + typedef typename ImplMapT::reference reference; + /// const reference type + typedef typename ImplMapT::const_reference const_reference; + + /// iterator for iteration over intervals + typedef typename ImplMapT::iterator iterator; + /// const_iterator for iteration over intervals + typedef typename ImplMapT::const_iterator const_iterator; + /// iterator for reverse iteration over intervals + typedef typename ImplMapT::reverse_iterator reverse_iterator; + /// const_iterator for iteration over intervals + typedef typename ImplMapT::const_reverse_iterator const_reverse_iterator; + + /// element iterator: Depreciated, see documentation. + typedef boost::icl::element_iterator element_iterator; + /// const element iterator: Depreciated, see documentation. + typedef boost::icl::element_iterator element_const_iterator; + /// element reverse iterator: Depreciated, see documentation. + typedef boost::icl::element_iterator element_reverse_iterator; + /// element const reverse iterator: Depreciated, see documentation. + typedef boost::icl::element_iterator element_const_reverse_iterator; + + typedef typename on_absorbtion::type on_codomain_absorbtion; + +public: + BOOST_STATIC_CONSTANT(bool, + is_total_invertible = ( Traits::is_total + && has_inverse::value)); + + BOOST_STATIC_CONSTANT(int, fineness = 0); + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /** Default constructor for the empty object */ + interval_base_map() + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((EqualComparableConcept)); + } + + /** Copy constructor */ + interval_base_map(const interval_base_map& src): _map(src._map) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((EqualComparableConcept)); + } + + /** Assignment operator */ + interval_base_map& operator = (const interval_base_map& src) + { + this->_map = src._map; + return *this; + } + + /** swap the content of containers */ + void swap(interval_base_map& object) { _map.swap(object._map); } + + //========================================================================== + //= Containedness + //========================================================================== + /** clear the map */ + void clear() { icl::clear(*that()); } + + /** is the map empty? */ + bool empty()const { return icl::is_empty(*that()); } + + //========================================================================== + //= Size + //========================================================================== + /** An interval map's size is it's cardinality */ + size_type size()const + { + return icl::cardinality(*that()); + } + + /** Size of the iteration over this container */ + std::size_t iterative_size()const + { + return _map.size(); + } + + //========================================================================== + //= Selection + //========================================================================== + + /** Find the interval value pair, that contains \c key */ + const_iterator find(const domain_type& key)const + { + return _map.find(interval_type(key)); + } + + const_iterator find(const interval_type& key)const + { + return _map.find(key); + } + + /** Total select function. */ + codomain_type operator()(const domain_type& key)const + { + const_iterator it_ = _map.find(interval_type(key)); + return it_==end() ? identity_element::value() + : it_->second; + } + + //========================================================================== + //= Addition + //========================================================================== + + /** Addition of a key value pair to the map */ + SubType& add(const element_type& key_value_pair) + { + return icl::add(*that(), key_value_pair); + } + + /** Addition of an interval value pair to the map. */ + SubType& add(const segment_type& interval_value_pair) + { + this->template _add(interval_value_pair); + return *that(); + } + + /** Addition of an interval value pair \c interval_value_pair to the map. + Iterator \c prior_ is a hint to the position \c interval_value_pair can be + inserted after. */ + iterator add(iterator prior_, const segment_type& interval_value_pair) + { + return this->template _add(prior_, interval_value_pair); + } + + //========================================================================== + //= Subtraction + //========================================================================== + /** Subtraction of a key value pair from the map */ + SubType& subtract(const element_type& key_value_pair) + { + return icl::subtract(*that(), key_value_pair); + } + + /** Subtraction of an interval value pair from the map. */ + SubType& subtract(const segment_type& interval_value_pair) + { + on_invertible + ::subtract(*that(), interval_value_pair); + return *that(); + } + + //========================================================================== + //= Insertion + //========================================================================== + /** Insertion of a \c key_value_pair into the map. */ + SubType& insert(const element_type& key_value_pair) + { + return icl::insert(*that(), key_value_pair); + } + + /** Insertion of an \c interval_value_pair into the map. */ + SubType& insert(const segment_type& interval_value_pair) + { + _insert(interval_value_pair); + return *that(); + } + + /** Insertion of an \c interval_value_pair into the map. Iterator \c prior_. + serves as a hint to insert after the element \c prior point to. */ + iterator insert(iterator prior, const segment_type& interval_value_pair) + { + return _insert(prior, interval_value_pair); + } + + /** With key_value_pair = (k,v) set value \c v for key \c k */ + SubType& set(const element_type& key_value_pair) + { + return icl::set_at(*that(), key_value_pair); + } + + /** With interval_value_pair = (I,v) set value \c v + for all keys in interval \c I in the map. */ + SubType& set(const segment_type& interval_value_pair) + { + return icl::set_at(*that(), interval_value_pair); + } + + //========================================================================== + //= Erasure + //========================================================================== + /** Erase a \c key_value_pair from the map. */ + SubType& erase(const element_type& key_value_pair) + { + icl::erase(*that(), key_value_pair); + return *that(); + } + + /** Erase an \c interval_value_pair from the map. */ + SubType& erase(const segment_type& interval_value_pair); + + /** Erase a key value pair for \c key. */ + SubType& erase(const domain_type& key) + { + return icl::erase(*that(), key); + } + + /** Erase all value pairs within the range of the + interval inter_val from the map. */ + SubType& erase(const interval_type& inter_val); + + + /** Erase all value pairs within the range of the interval that iterator + \c position points to. */ + void erase(iterator position){ this->_map.erase(position); } + + /** Erase all value pairs for a range of iterators [first,past). */ + void erase(iterator first, iterator past){ this->_map.erase(first, past); } + + //========================================================================== + //= Intersection + //========================================================================== + /** The intersection of \c interval_value_pair and \c *this map is added to \c section. */ + void add_intersection(SubType& section, const segment_type& interval_value_pair)const + { + on_definedness + ::add_intersection(section, *that(), interval_value_pair); + } + + //========================================================================== + //= Symmetric difference + //========================================================================== + /** If \c *this map contains \c key_value_pair it is erased, otherwise it is added. */ + SubType& flip(const element_type& key_value_pair) + { + return icl::flip(*that(), key_value_pair); + } + + /** If \c *this map contains \c interval_value_pair it is erased, otherwise it is added. */ + SubType& flip(const segment_type& interval_value_pair) + { + on_total_absorbable + ::flip(*that(), interval_value_pair); + return *that(); + } + + //========================================================================== + //= Iterator related + //========================================================================== + + iterator lower_bound(const key_type& interval) + { return _map.lower_bound(interval); } + + iterator upper_bound(const key_type& interval) + { return _map.upper_bound(interval); } + + const_iterator lower_bound(const key_type& interval)const + { return _map.lower_bound(interval); } + + const_iterator upper_bound(const key_type& interval)const + { return _map.upper_bound(interval); } + + std::pair equal_range(const key_type& interval) + { return _map.equal_range(interval); } + + std::pair equal_range(const key_type& interval)const + { return _map.equal_range(interval); } + + iterator begin() { return _map.begin(); } + iterator end() { return _map.end(); } + const_iterator begin()const { return _map.begin(); } + const_iterator end()const { return _map.end(); } + reverse_iterator rbegin() { return _map.rbegin(); } + reverse_iterator rend() { return _map.rend(); } + const_reverse_iterator rbegin()const { return _map.rbegin(); } + const_reverse_iterator rend()const { return _map.rend(); } + +private: + template + iterator _add(const segment_type& interval_value_pair); + + template + iterator _add(iterator prior_, const segment_type& interval_value_pair); + + template + void _subtract(const segment_type& interval_value_pair); + + iterator _insert(const segment_type& interval_value_pair); + iterator _insert(iterator prior_, const segment_type& interval_value_pair); + +private: + template + void add_segment(const interval_type& inter_val, const CodomainT& co_val, iterator& it_); + + template + void add_main(interval_type& inter_val, const CodomainT& co_val, + iterator& it_, const iterator& last_); + + template + void add_rear(const interval_type& inter_val, const CodomainT& co_val, iterator& it_); + + void add_front(const interval_type& inter_val, iterator& first_); + +private: + void subtract_front(const interval_type& inter_val, iterator& first_); + + template + void subtract_main(const CodomainT& co_val, iterator& it_, const iterator& last_); + + template + void subtract_rear(interval_type& inter_val, const CodomainT& co_val, iterator& it_); + +private: + void insert_main(const interval_type&, const CodomainT&, iterator&, const iterator&); + void erase_rest ( interval_type&, const CodomainT&, iterator&, const iterator&); + + template + void total_add_intersection(SubType& section, const FragmentT& fragment)const + { + section += *that(); + section.add(fragment); + } + + void partial_add_intersection(SubType& section, const segment_type& operand)const + { + interval_type inter_val = operand.first; + if(icl::is_empty(inter_val)) + return; + + std::pair exterior + = this->_map.equal_range(inter_val); + if(exterior.first == exterior.second) + return; + + for(const_iterator it_=exterior.first; it_ != exterior.second; it_++) + { + interval_type common_interval = it_->first & inter_val; + if(!icl::is_empty(common_interval)) + { + section.template _add (value_type(common_interval, it_->second) ); + section.template _add(value_type(common_interval, operand.second)); + } + } + } + + void partial_add_intersection(SubType& section, const element_type& operand)const + { + partial_add_intersection(section, make_segment(operand)); + } + + +protected: + + template + iterator gap_insert(iterator prior_, const interval_type& inter_val, + const codomain_type& co_val ) + { + // inter_val is not conained in this map. Insertion will be successful + BOOST_ASSERT(this->_map.find(inter_val) == this->_map.end()); + BOOST_ASSERT((!on_absorbtion::is_absorbable(co_val))); + return this->_map.insert(prior_, value_type(inter_val, version()(co_val))); + } + + template + std::pair + add_at(const iterator& prior_, const interval_type& inter_val, + const codomain_type& co_val ) + { + // Never try to insert an identity element into an identity element absorber here: + BOOST_ASSERT((!(on_absorbtion::is_absorbable(co_val)))); + + iterator inserted_ + = this->_map.insert(prior_, value_type(inter_val, Combiner::identity_element())); + + if(inserted_->first == inter_val && inserted_->second == Combiner::identity_element()) + { + Combiner()(inserted_->second, co_val); + return std::pair(inserted_, true); + } + else + return std::pair(inserted_, false); + } + + std::pair + insert_at(const iterator& prior_, const interval_type& inter_val, + const codomain_type& co_val ) + { + iterator inserted_ + = this->_map.insert(prior_, value_type(inter_val, co_val)); + + if(inserted_ == prior_) + return std::pair(inserted_, false); + else if(inserted_->first == inter_val) + return std::pair(inserted_, true); + else + return std::pair(inserted_, false); + } + + +protected: + sub_type* that() { return static_cast(this); } + const sub_type* that()const { return static_cast(this); } + +protected: + ImplMapT _map; + + +private: + //-------------------------------------------------------------------------- + template + struct on_invertible; + + template + struct on_invertible + { + typedef typename Type::segment_type segment_type; + typedef typename Type::inverse_codomain_combine inverse_codomain_combine; + + static void subtract(Type& object, const segment_type& operand) + { object.template _add(operand); } + }; + + template + struct on_invertible + { + typedef typename Type::segment_type segment_type; + typedef typename Type::inverse_codomain_combine inverse_codomain_combine; + + static void subtract(Type& object, const segment_type& operand) + { object.template _subtract(operand); } + }; + + friend struct on_invertible; + friend struct on_invertible; + //-------------------------------------------------------------------------- + + //-------------------------------------------------------------------------- + template + struct on_definedness; + + template + struct on_definedness + { + static void add_intersection(Type& section, const Type& object, + const segment_type& operand) + { object.total_add_intersection(section, operand); } + }; + + template + struct on_definedness + { + static void add_intersection(Type& section, const Type& object, + const segment_type& operand) + { object.partial_add_intersection(section, operand); } + }; + + friend struct on_definedness; + friend struct on_definedness; + //-------------------------------------------------------------------------- + + //-------------------------------------------------------------------------- + template + struct on_codomain_model; + + template + struct on_codomain_model + { + typedef typename Type::interval_type interval_type; + typedef typename Type::codomain_type codomain_type; + typedef typename Type::segment_type segment_type; + typedef typename Type::codomain_combine codomain_combine; + typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect; + + static void add(Type& intersection, interval_type& common_interval, + const codomain_type& flip_value, const codomain_type& co_value) + { + codomain_type common_value = flip_value; + inverse_codomain_intersect()(common_value, co_value); + intersection.template + _add(segment_type(common_interval, common_value)); + } + }; + + template + struct on_codomain_model + { + typedef typename Type::interval_type interval_type; + typedef typename Type::codomain_type codomain_type; + typedef typename Type::segment_type segment_type; + typedef typename Type::codomain_combine codomain_combine; + + static void add(Type& intersection, interval_type& common_interval, + const codomain_type&, const codomain_type&) + { + intersection.template + _add(segment_type(common_interval, + identity_element::value())); + } + }; + + friend struct on_codomain_model; + friend struct on_codomain_model; + //-------------------------------------------------------------------------- + + + //-------------------------------------------------------------------------- + template + struct on_total_absorbable; + + template + struct on_total_absorbable + { + static void flip(Type& object, const typename Type::segment_type&) + { icl::clear(object); } + }; + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4127) // conditional expression is constant +#endif + + template + struct on_total_absorbable + { + typedef typename Type::segment_type segment_type; + typedef typename Type::codomain_type codomain_type; + + static void flip(Type& object, const segment_type& operand) + { + object += operand; + ICL_FORALL(typename Type, it_, object) + it_->second = identity_element::value(); + + if(mpl::not_ >::value) + icl::join(object); + } + }; + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + + template + struct on_total_absorbable + { + typedef typename Type::segment_type segment_type; + typedef typename Type::codomain_type codomain_type; + typedef typename Type::interval_type interval_type; + typedef typename Type::value_type value_type; + typedef typename Type::const_iterator const_iterator; + typedef typename Type::set_type set_type; + typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect; + + static void flip(Type& object, const segment_type& interval_value_pair) + { + // That which is common shall be subtracted + // That which is not shall be added + // So interval_value_pair has to be 'complementary added' or flipped + interval_type span = interval_value_pair.first; + std::pair exterior + = object.equal_range(span); + + const_iterator first_ = exterior.first; + const_iterator end_ = exterior.second; + + interval_type covered, left_over, common_interval; + const codomain_type& x_value = interval_value_pair.second; + const_iterator it_ = first_; + + set_type eraser; + Type intersection; + + while(it_ != end_ ) + { + const codomain_type& co_value = it_->second; + covered = (*it_++).first; + //[a ... : span + // [b ... : covered + //[a b) : left_over + left_over = right_subtract(span, covered); + + //That which is common ... + common_interval = span & covered; + if(!icl::is_empty(common_interval)) + { + // ... shall be subtracted + icl::add(eraser, common_interval); + + on_codomain_model::value> + ::add(intersection, common_interval, x_value, co_value); + } + + icl::add(object, value_type(left_over, x_value)); //That which is not shall be added + // Because this is a collision free addition I don't have to distinguish codomain_types. + + //... d) : span + //... c) : covered + // [c d) : span' + span = left_subtract(span, covered); + } + + //If span is not empty here, it is not in the set so it shall be added + icl::add(object, value_type(span, x_value)); + + //finally rewrite the common segments + icl::erase(object, eraser); + object += intersection; + } + }; + //-------------------------------------------------------------------------- +} ; + + +//============================================================================== +//= Addition detail +//============================================================================== +template +inline void interval_base_map + ::add_front(const interval_type& inter_val, iterator& first_) +{ + // If the collision sequence has a left residual 'left_resid' it will + // be split, to provide a standardized start of algorithms: + // The addend interval 'inter_val' covers the beginning of the collision sequence. + + // only for the first there can be a left_resid: a part of *first_ left of inter_val + interval_type left_resid = right_subtract(first_->first, inter_val); + + if(!icl::is_empty(left_resid)) + { // [------------ . . . + // [left_resid---first_ --- . . . + iterator prior_ = cyclic_prior(*this, first_); + const_cast(first_->first) + = left_subtract(first_->first, left_resid); + //NOTE: Only splitting + this->_map.insert(prior_, segment_type(left_resid, first_->second)); + } + //POST: + // [----- inter_val ---- . . . + // ...[-- first_ --... +} + +template + template +inline void interval_base_map + ::add_segment(const interval_type& inter_val, const CodomainT& co_val, iterator& it_) +{ + interval_type lead_gap = right_subtract(inter_val, it_->first); + if(!icl::is_empty(lead_gap)) + { + // [lead_gap--- . . . + // [-- it_ ... + iterator prior_ = prior(it_); + iterator inserted_ = this->template gap_insert(prior_, lead_gap, co_val); + that()->handle_inserted(prior_, inserted_); + } + + // . . . --------- . . . addend interval + // [-- it_ --) has a common part with the first overval + Combiner()(it_->second, co_val); + that()->template handle_left_combined(it_++); +} + + +template + template +inline void interval_base_map + ::add_main(interval_type& inter_val, const CodomainT& co_val, + iterator& it_, const iterator& last_) +{ + interval_type cur_interval; + while(it_!=last_) + { + cur_interval = it_->first ; + add_segment(inter_val, co_val, it_); + // shrink interval + inter_val = left_subtract(inter_val, cur_interval); + } +} + +template + template +inline void interval_base_map + ::add_rear(const interval_type& inter_val, const CodomainT& co_val, iterator& it_) +{ + iterator prior_ = cyclic_prior(*that(), it_); + interval_type cur_itv = it_->first ; + + interval_type lead_gap = right_subtract(inter_val, cur_itv); + if(!icl::is_empty(lead_gap)) + { // [lead_gap--- . . . + // [prior) [-- it_ ... + iterator inserted_ = this->template gap_insert(prior_, lead_gap, co_val); + that()->handle_inserted(prior_, inserted_); + } + + interval_type end_gap = left_subtract(inter_val, cur_itv); + if(!icl::is_empty(end_gap)) + { + // [----------------end_gap) + // . . . -- it_ --) + Combiner()(it_->second, co_val); + that()->template gap_insert_at(it_, prior_, end_gap, co_val); + } + else + { + // only for the last there can be a right_resid: a part of *it_ right of x + interval_type right_resid = left_subtract(cur_itv, inter_val); + + if(icl::is_empty(right_resid)) + { + // [---------------) + // [-- it_ ---) + Combiner()(it_->second, co_val); + that()->template handle_preceeded_combined(prior_, it_); + } + else + { + // [--------------) + // [-- it_ --right_resid) + const_cast(it_->first) = right_subtract(it_->first, right_resid); + + //NOTE: This is NOT an insertion that has to take care for correct application of + // the Combiner functor. It only reestablished that state after splitting the + // 'it_' interval value pair. Using _map_insert does not work here. + iterator insertion_ = this->_map.insert(it_, value_type(right_resid, it_->second)); + that()->handle_reinserted(insertion_); + + Combiner()(it_->second, co_val); + that()->template handle_preceeded_combined(insertion_, it_); + } + } +} + + +//============================================================================== +//= Addition +//============================================================================== +template + template +inline typename interval_base_map::iterator + interval_base_map + ::_add(const segment_type& addend) +{ + typedef typename on_absorbtion::value>::type on_absorbtion_; + + const interval_type& inter_val = addend.first; + if(icl::is_empty(inter_val)) + return this->_map.end(); + + const codomain_type& co_val = addend.second; + if(on_absorbtion_::is_absorbable(co_val)) + return this->_map.end(); + + std::pair insertion + = this->_map.insert(value_type(inter_val, version()(co_val))); + + if(insertion.second) + return that()->handle_inserted(insertion.first); + else + { + // Detect the first and the end iterator of the collision sequence + iterator first_ = this->_map.lower_bound(inter_val), + last_ = insertion.first; + //assert(end_ == this->_map.upper_bound(inter_val)); + iterator it_ = first_; + interval_type rest_interval = inter_val; + + add_front (rest_interval, it_ ); + add_main(rest_interval, co_val, it_, last_); + add_rear(rest_interval, co_val, it_ ); + return it_; + } +} + +template + template +inline typename interval_base_map::iterator + interval_base_map + ::_add(iterator prior_, const segment_type& addend) +{ + typedef typename on_absorbtion::value>::type on_absorbtion_; + + const interval_type& inter_val = addend.first; + if(icl::is_empty(inter_val)) + return prior_; + + const codomain_type& co_val = addend.second; + if(on_absorbtion_::is_absorbable(co_val)) + return prior_; + + std::pair insertion + = add_at(prior_, inter_val, co_val); + + if(insertion.second) + return that()->handle_inserted(insertion.first); + else + { + // Detect the first and the end iterator of the collision sequence + std::pair overlap = this->_map.equal_range(inter_val); + iterator it_ = overlap.first, + last_ = prior(overlap.second); + interval_type rest_interval = inter_val; + + add_front (rest_interval, it_ ); + add_main(rest_interval, co_val, it_, last_); + add_rear(rest_interval, co_val, it_ ); + return it_; + } +} + +//============================================================================== +//= Subtraction detail +//============================================================================== + +template +inline void interval_base_map + ::subtract_front(const interval_type& inter_val, iterator& it_) +{ + interval_type left_resid = right_subtract(it_->first, inter_val); + + if(!icl::is_empty(left_resid)) // [--- inter_val ---) + { //[prior_) [left_resid)[--- it_ . . . + iterator prior_ = cyclic_prior(*this, it_); + const_cast(it_->first) = left_subtract(it_->first, left_resid); + this->_map.insert(prior_, value_type(left_resid, it_->second)); + // The segemnt *it_ is split at inter_val.first(), so as an invariant + // segment *it_ is always "under" inter_val and a left_resid is empty. + } +} + + +template + template +inline void interval_base_map + ::subtract_main(const CodomainT& co_val, iterator& it_, const iterator& last_) +{ + while(it_ != last_) + { + Combiner()(it_->second, co_val); + that()->template handle_left_combined(it_++); + } +} + +template + template +inline void interval_base_map + ::subtract_rear(interval_type& inter_val, const CodomainT& co_val, iterator& it_) +{ + interval_type right_resid = left_subtract(it_->first, inter_val); + + if(icl::is_empty(right_resid)) + { + Combiner()(it_->second, co_val); + that()->template handle_combined(it_); + } + else + { + const_cast(it_->first) = right_subtract(it_->first, right_resid); + iterator next_ = this->_map.insert(it_, value_type(right_resid, it_->second)); + Combiner()(it_->second, co_val); + that()->template handle_succeeded_combined(it_, next_); + } +} + +//============================================================================== +//= Subtraction +//============================================================================== +template + template +inline void interval_base_map + ::_subtract(const segment_type& minuend) +{ + interval_type inter_val = minuend.first; + if(icl::is_empty(inter_val)) + return; + + const codomain_type& co_val = minuend.second; + if(on_absorbtion::is_absorbable(co_val)) + return; + + std::pair exterior = this->_map.equal_range(inter_val); + if(exterior.first == exterior.second) + return; + + iterator last_ = prior(exterior.second); + iterator it_ = exterior.first; + subtract_front (inter_val, it_ ); + subtract_main ( co_val, it_, last_); + subtract_rear (inter_val, co_val, it_ ); +} + +//============================================================================== +//= Insertion +//============================================================================== +template +inline void interval_base_map + ::insert_main(const interval_type& inter_val, const CodomainT& co_val, + iterator& it_, const iterator& last_) +{ + iterator end_ = boost::next(last_); + iterator prior_ = it_, inserted_; + if(prior_ != this->_map.end()) + --prior_; + interval_type rest_interval = inter_val, left_gap, cur_itv; + interval_type last_interval = last_ ->first; + + while(it_ != end_ ) + { + cur_itv = it_->first ; + left_gap = right_subtract(rest_interval, cur_itv); + + if(!icl::is_empty(left_gap)) + { + inserted_ = this->_map.insert(prior_, value_type(left_gap, co_val)); + it_ = that()->handle_inserted(inserted_); + } + + // shrink interval + rest_interval = left_subtract(rest_interval, cur_itv); + prior_ = it_; + ++it_; + } + + //insert_rear(rest_interval, co_val, last_): + interval_type end_gap = left_subtract(rest_interval, last_interval); + if(!icl::is_empty(end_gap)) + { + inserted_ = this->_map.insert(prior_, value_type(end_gap, co_val)); + it_ = that()->handle_inserted(inserted_); + } + else + it_ = prior_; +} + + +template +inline typename interval_base_map::iterator + interval_base_map + ::_insert(const segment_type& addend) +{ + interval_type inter_val = addend.first; + if(icl::is_empty(inter_val)) + return this->_map.end(); + + const codomain_type& co_val = addend.second; + if(on_codomain_absorbtion::is_absorbable(co_val)) + return this->_map.end(); + + std::pair insertion = this->_map.insert(addend); + + if(insertion.second) + return that()->handle_inserted(insertion.first); + else + { + // Detect the first and the end iterator of the collision sequence + iterator first_ = this->_map.lower_bound(inter_val), + last_ = insertion.first; + //assert((++last_) == this->_map.upper_bound(inter_val)); + iterator it_ = first_; + insert_main(inter_val, co_val, it_, last_); + return it_; + } +} + + +template +inline typename interval_base_map::iterator + interval_base_map + ::_insert(iterator prior_, const segment_type& addend) +{ + interval_type inter_val = addend.first; + if(icl::is_empty(inter_val)) + return prior_; + + const codomain_type& co_val = addend.second; + if(on_codomain_absorbtion::is_absorbable(co_val)) + return prior_; + + std::pair insertion = insert_at(prior_, inter_val, co_val); + + if(insertion.second) + return that()->handle_inserted(insertion.first); + { + // Detect the first and the end iterator of the collision sequence + std::pair overlap = this->_map.equal_range(inter_val); + iterator it_ = overlap.first, + last_ = prior(overlap.second); + insert_main(inter_val, co_val, it_, last_); + return it_; + } +} + +//============================================================================== +//= Erasure segment_type +//============================================================================== +template +inline void interval_base_map + ::erase_rest(interval_type& inter_val, const CodomainT& co_val, + iterator& it_, const iterator& last_) +{ + // For all intervals within loop: it_->first are contained_in inter_val + while(it_ != last_) + if(it_->second == co_val) + this->_map.erase(it_++); + else it_++; + + //erase_rear: + if(it_->second == co_val) + { + interval_type right_resid = left_subtract(it_->first, inter_val); + if(icl::is_empty(right_resid)) + this->_map.erase(it_); + else + const_cast(it_->first) = right_resid; + } +} + +template +inline SubType& interval_base_map + ::erase(const segment_type& minuend) +{ + interval_type inter_val = minuend.first; + if(icl::is_empty(inter_val)) + return *that(); + + const codomain_type& co_val = minuend.second; + if(on_codomain_absorbtion::is_absorbable(co_val)) + return *that(); + + std::pair exterior = this->_map.equal_range(inter_val); + if(exterior.first == exterior.second) + return *that(); + + iterator first_ = exterior.first, end_ = exterior.second, + last_ = cyclic_prior(*this, end_); + iterator second_= first_; ++second_; + + if(first_ == last_) + { // [----inter_val----) + // .....first_==last_..... + // only for the last there can be a right_resid: a part of *it_ right of minuend + interval_type right_resid = left_subtract(first_->first, inter_val); + + if(first_->second == co_val) + { + interval_type left_resid = right_subtract(first_->first, inter_val); + if(!icl::is_empty(left_resid)) // [----inter_val----) + { // [left_resid)..first_==last_...... + const_cast(first_->first) = left_resid; + if(!icl::is_empty(right_resid)) + this->_map.insert(first_, value_type(right_resid, co_val)); + } + else if(!icl::is_empty(right_resid)) + const_cast(first_->first) = right_resid; + else + this->_map.erase(first_); + } + } + else + { + // first AND NOT last + if(first_->second == co_val) + { + interval_type left_resid = right_subtract(first_->first, inter_val); + if(icl::is_empty(left_resid)) + this->_map.erase(first_); + else + const_cast(first_->first) = left_resid; + } + + erase_rest(inter_val, co_val, second_, last_); + } + + return *that(); +} + +//============================================================================== +//= Erasure key_type +//============================================================================== +template +inline SubType& interval_base_map + ::erase(const interval_type& minuend) +{ + if(icl::is_empty(minuend)) + return *that(); + + std::pair exterior = this->_map.equal_range(minuend); + if(exterior.first == exterior.second) + return *that(); + + iterator first_ = exterior.first, + end_ = exterior.second, + last_ = prior(end_); + + interval_type left_resid = right_subtract(first_->first, minuend); + interval_type right_resid = left_subtract(last_ ->first, minuend); + + if(first_ == last_ ) + if(!icl::is_empty(left_resid)) + { + const_cast(first_->first) = left_resid; + if(!icl::is_empty(right_resid)) + this->_map.insert(first_, value_type(right_resid, first_->second)); + } + else if(!icl::is_empty(right_resid)) + const_cast(first_->first) = left_subtract(first_->first, minuend); + else + this->_map.erase(first_); + else + { // [-------- minuend ---------) + // [left_resid fst) . . . . [lst right_resid) + iterator second_= first_; ++second_; + + iterator start_ = icl::is_empty(left_resid)? first_: second_; + iterator stop_ = icl::is_empty(right_resid)? end_ : last_ ; + this->_map.erase(start_, stop_); //erase [start_, stop_) + + if(!icl::is_empty(left_resid)) + const_cast(first_->first) = left_resid; + + if(!icl::is_empty(right_resid)) + const_cast(last_ ->first) = right_resid; + } + + return *that(); +} + +//----------------------------------------------------------------------------- +// type traits +//----------------------------------------------------------------------------- +template +< + class SubType, + class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc +> +struct is_map > +{ + typedef is_map > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +< + class SubType, + class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc +> +struct has_inverse > +{ + typedef has_inverse > type; + BOOST_STATIC_CONSTANT(bool, value = (has_inverse::value)); +}; + +template +< + class SubType, + class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc +> +struct is_interval_container > +{ + typedef is_interval_container > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +< + class SubType, + class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc +> +struct absorbs_identities > +{ + typedef absorbs_identities > type; + BOOST_STATIC_CONSTANT(bool, value = (Traits::absorbs_identities)); +}; + +template +< + class SubType, + class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc +> +struct is_total > +{ + typedef is_total > type; + BOOST_STATIC_CONSTANT(bool, value = (Traits::is_total)); +}; + + + +}} // namespace icl boost + +#endif + + diff --git a/3party/boost/boost/icl/interval_base_set.hpp b/3party/boost/boost/icl/interval_base_set.hpp new file mode 100644 index 0000000000..e131b2e7a8 --- /dev/null +++ b/3party/boost/boost/icl/interval_base_set.hpp @@ -0,0 +1,551 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_INTERVAL_BASE_SET_H_JOFA_990223 +#define BOOST_ICL_INTERVAL_BASE_SET_H_JOFA_990223 + +#include + +#if defined(ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION) +#include +#elif defined(ICL_USE_BOOST_MOVE_IMPLEMENTATION) +#include +#else +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +/** \brief Implements a set as a set of intervals (base class) */ +template +< + typename SubType, + typename DomainT, + ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT), + ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), + ICL_ALLOC Alloc = std::allocator +> +class interval_base_set +{ +public: + //========================================================================== + //= Associated types + //========================================================================== + typedef interval_base_set type; + + /// The designated \e derived or \e sub_type of this base class + typedef SubType sub_type; + + /// Auxilliary type for overloadresolution + typedef type overloadable_type; + + //-------------------------------------------------------------------------- + //- Associated types: Data + //-------------------------------------------------------------------------- + /// The domain type of the set + typedef DomainT domain_type; + /// The codomaintype is the same as domain_type + typedef DomainT codomain_type; + + /// The element type of the set + typedef DomainT element_type; + + /// The interval type of the set + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; + /// The segment type of the set + typedef interval_type segment_type; + + //-------------------------------------------------------------------------- + //- Associated types: Size + //-------------------------------------------------------------------------- + /// The difference type of an interval which is sometimes different form the data_type + typedef typename difference_type_of::type difference_type; + + /// The size type of an interval which is mostly std::size_t + typedef typename size_type_of::type size_type; + + + //-------------------------------------------------------------------------- + //- Associated types: Order + //-------------------------------------------------------------------------- + /// Comparison functor for domain values + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + typedef ICL_COMPARE_DOMAIN(Compare,segment_type) segment_compare; + /// Comparison functor for intervals + typedef exclusive_less_than interval_compare; + + /// Comparison functor for keys + typedef exclusive_less_than key_compare; + + //-------------------------------------------------------------------------- + //- Associated types: Related types + //-------------------------------------------------------------------------- + /// The atomized type representing the corresponding container of elements + typedef typename ICL_IMPL_SPACE::set > atomized_type; + + //-------------------------------------------------------------------------- + //- Associated types: Implementation and stl related + //-------------------------------------------------------------------------- + /// The allocator type of the set + typedef Alloc allocator_type; + + /// allocator type of the corresponding element set + typedef Alloc domain_allocator_type; + + /// Container type for the implementation + typedef typename ICL_IMPL_SPACE::set ImplSetT; + + /// key type of the implementing container + typedef typename ImplSetT::key_type key_type; + /// data type of the implementing container + typedef typename ImplSetT::key_type data_type; + /// value type of the implementing container + typedef typename ImplSetT::value_type value_type; + + /// pointer type + typedef typename ImplSetT::pointer pointer; + /// const pointer type + typedef typename ImplSetT::const_pointer const_pointer; + /// reference type + typedef typename ImplSetT::reference reference; + /// const reference type + typedef typename ImplSetT::const_reference const_reference; + + /// iterator for iteration over intervals + typedef typename ImplSetT::iterator iterator; + /// const_iterator for iteration over intervals + typedef typename ImplSetT::const_iterator const_iterator; + /// iterator for reverse iteration over intervals + typedef typename ImplSetT::reverse_iterator reverse_iterator; + /// const_iterator for iteration over intervals + typedef typename ImplSetT::const_reverse_iterator const_reverse_iterator; + + /// element iterator: Depreciated, see documentation. + typedef boost::icl::element_iterator element_iterator; + /// element const iterator: Depreciated, see documentation. + typedef boost::icl::element_iterator element_const_iterator; + /// element reverse iterator: Depreciated, see documentation. + typedef boost::icl::element_iterator element_reverse_iterator; + /// element const reverse iterator: Depreciated, see documentation. + typedef boost::icl::element_iterator element_const_reverse_iterator; + + BOOST_STATIC_CONSTANT(int, fineness = 0); + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /** Default constructor for the empty object */ + interval_base_set(){} + + /** Copy constructor */ + interval_base_set(const interval_base_set& src): _set(src._set){} + + /** Assignment operator */ + interval_base_set& operator = (const interval_base_set& src) + { + this->_set = src._set; + return *this; + } + + /** swap the content of containers */ + void swap(interval_base_set& operand) { _set.swap(operand._set); } + + //========================================================================== + //= Containedness + //========================================================================== + /** sets the container empty */ + void clear() { icl::clear(*that()); } + /** is the container empty? */ + bool empty()const { return icl::is_empty(*that()); } + + //========================================================================== + //= Size + //========================================================================== + /** An interval set's size is it's cardinality */ + size_type size()const + { + return icl::cardinality(*that()); + } + + /** Size of the iteration over this container */ + std::size_t iterative_size()const + { + return _set.size(); + } + + //========================================================================== + //= Selection + //========================================================================== + + /** Find the interval value pair, that contains element \c key */ + const_iterator find(const element_type& key)const + { + return this->_set.find(icl::singleton(key)); + } + + const_iterator find(const segment_type& segment)const + { + return this->_set.find(segment); + } + + //========================================================================== + //= Addition + //========================================================================== + + /** Add a single element \c key to the set */ + SubType& add(const element_type& key) + { + return icl::add(*that(), key); + } + + /** Add an interval of elements \c inter_val to the set */ + SubType& add(const segment_type& inter_val) + { + _add(inter_val); + return *that(); + } + + /** Add an interval of elements \c inter_val to the set. Iterator + \c prior_ is a hint to the position \c inter_val can be + inserted after. */ + iterator add(iterator prior_, const segment_type& inter_val) + { + return _add(prior_, inter_val); + } + + //========================================================================== + //= Subtraction + //========================================================================== + + /** Subtract a single element \c key from the set */ + SubType& subtract(const element_type& key) + { + return icl::subtract(*that(), key); + } + + /** Subtract an interval of elements \c inter_val from the set */ + SubType& subtract(const segment_type& inter_val); + + //========================================================================== + //= Insertion + //========================================================================== + /** Insert an element \c key into the set */ + SubType& insert(const element_type& key) + { + return add(key); + } + + /** Insert an interval of elements \c inter_val to the set */ + SubType& insert(const segment_type& inter_val) + { + return add(inter_val); + } + + /** Insert an interval of elements \c inter_val to the set. Iterator + \c prior_ is a hint to the position \c inter_val can be + inserted after. */ + iterator insert(iterator prior_, const segment_type& inter_val) + { + return add(prior_, inter_val); + } + + + + //========================================================================== + //= Erasure + //========================================================================== + /** Erase an element \c key from the set */ + SubType& erase(const element_type& key) + { + return subtract(key); + } + + /** Erase an interval of elements \c inter_val from the set */ + SubType& erase(const segment_type& inter_val) + { + return subtract(inter_val); + } + + /** Erase the interval that iterator \c position points to. */ + void erase(iterator position) + { + _set.erase(position); + } + + /** Erase all intervals in the range [first,past) of iterators. */ + void erase(iterator first, iterator past) + { + _set.erase(first, past); + } + + //========================================================================== + //= Symmetric difference + //========================================================================== + /** If \c *this set contains \c key it is erased, otherwise it is added. */ + SubType& flip(const element_type& key) + { + return icl::flip(*that(), key); + } + + /** If \c *this set contains \c inter_val it is erased, otherwise it is added. */ + SubType& flip(const segment_type& inter_val) + { + return icl::flip(*that(), inter_val); + } + + //========================================================================== + //= Iterator related + //========================================================================== + + iterator begin() { return _set.begin(); } + iterator end() { return _set.end(); } + const_iterator begin()const { return _set.begin(); } + const_iterator end()const { return _set.end(); } + reverse_iterator rbegin() { return _set.rbegin(); } + reverse_iterator rend() { return _set.rend(); } + const_reverse_iterator rbegin()const { return _set.rbegin(); } + const_reverse_iterator rend()const { return _set.rend(); } + + iterator lower_bound(const value_type& interval) + { return _set.lower_bound(interval); } + + iterator upper_bound(const value_type& interval) + { return _set.upper_bound(interval); } + + const_iterator lower_bound(const value_type& interval)const + { return _set.lower_bound(interval); } + + const_iterator upper_bound(const value_type& interval)const + { return _set.upper_bound(interval); } + + std::pair equal_range(const key_type& interval) + { return _set.equal_range(interval); } + + std::pair equal_range(const key_type& interval)const + { return _set.equal_range(interval); } + +private: + iterator _add(const segment_type& addend); + iterator _add(iterator prior, const segment_type& addend); + +protected: + void add_front(const interval_type& inter_val, iterator& first_); + void add_main(interval_type& inter_val, iterator& it_, const iterator& last_); + void add_segment(const interval_type& inter_val, iterator& it_); + void add_rear(const interval_type& inter_val, iterator& it_); + +protected: + sub_type* that() { return static_cast(this); } + const sub_type* that()const { return static_cast(this); } + +protected: + ImplSetT _set; +} ; + + +template +inline void interval_base_set + ::add_front(const interval_type& inter_val, iterator& first_) +{ + // If the collision sequence has a left residual 'left_resid' it will + // be split, to provide a standardized start of algorithms: + // The addend interval 'inter_val' covers the beginning of the collision sequence. + + // only for the first there can be a left_resid: a part of *first_ left of inter_val + interval_type left_resid = right_subtract(*first_, inter_val); + + if(!icl::is_empty(left_resid)) + { // [------------ . . . + // [left_resid---first_ --- . . . + iterator prior_ = cyclic_prior(*this, first_); + const_cast(*first_) = left_subtract(*first_, left_resid); + //NOTE: Only splitting + this->_set.insert(prior_, left_resid); + } + + //POST: + // [----- inter_val ---- . . . + // ...[-- first_ --... +} + +template +inline void interval_base_set + ::add_segment(const interval_type& inter_val, iterator& it_) +{ + interval_type lead_gap = right_subtract(inter_val, *it_); + if(!icl::is_empty(lead_gap)) + // [lead_gap--- . . . + // [prior_) [-- it_ ... + this->_set.insert(prior(it_), lead_gap); + + // . . . --------- . . . addend interval + // [-- it_ --) has a common part with the first overval + ++it_; +} + +template +inline void interval_base_set + ::add_main(interval_type& rest_interval, iterator& it_, const iterator& last_) +{ + interval_type cur_interval; + while(it_ != last_) + { + cur_interval = *it_ ; + add_segment(rest_interval, it_); + // shrink interval + rest_interval = left_subtract(rest_interval, cur_interval); + } +} + +template +inline void interval_base_set + ::add_rear(const interval_type& inter_val, iterator& it_) +{ + iterator prior_ = cyclic_prior(*this, it_); + interval_type cur_itv = *it_; + + interval_type lead_gap = right_subtract(inter_val, cur_itv); + if(!icl::is_empty(lead_gap)) + // [lead_gap--- . . . + // [prior_) [-- it_ ... + this->_set.insert(prior_, lead_gap); + + interval_type end_gap = left_subtract(inter_val, cur_itv); + if(!icl::is_empty(end_gap)) + // [---------------end_gap) + // [-- it_ --) + it_ = this->_set.insert(it_, end_gap); + else + { + // only for the last there can be a right_resid: a part of *it_ right of addend + interval_type right_resid = left_subtract(cur_itv, inter_val); + + if(!icl::is_empty(right_resid)) + { + // [--------------) + // [-- it_ --right_resid) + const_cast(*it_) = right_subtract(*it_, right_resid); + it_ = this->_set.insert(it_, right_resid); + } + } +} + +//============================================================================== +//= Addition +//============================================================================== +template +inline typename interval_base_set::iterator + interval_base_set + ::_add(const segment_type& addend) +{ + if(icl::is_empty(addend)) + return this->_set.end(); + + std::pair insertion = this->_set.insert(addend); + + if(insertion.second) + return that()->handle_inserted(insertion.first); + else + return that()->add_over(addend, insertion.first); +} + +template +inline typename interval_base_set::iterator + interval_base_set + ::_add(iterator prior_, const segment_type& addend) +{ + if(icl::is_empty(addend)) + return prior_; + + iterator insertion = this->_set.insert(prior_, addend); + + if(*insertion == addend) + return that()->handle_inserted(insertion); + else + return that()->add_over(addend); +} + +//============================================================================== +//= Subtraction +//============================================================================== +template +inline SubType& interval_base_set + ::subtract(const segment_type& minuend) +{ + if(icl::is_empty(minuend)) + return *that(); + + std::pair exterior = this->_set.equal_range(minuend); + if(exterior.first == exterior.second) + return *that(); + + iterator first_ = exterior.first; + iterator end_ = exterior.second; + iterator last_ = prior(end_); + + interval_type left_resid = right_subtract(*first_, minuend); + interval_type right_resid; + if(first_ != end_) + right_resid = left_subtract(*last_ , minuend); + + this->_set.erase(first_, end_); + + if(!icl::is_empty(left_resid)) + this->_set.insert(left_resid); + + if(!icl::is_empty(right_resid)) + this->_set.insert(right_resid); + + return *that(); +} + +//----------------------------------------------------------------------------- +// type traits +//----------------------------------------------------------------------------- +template +struct is_set > +{ + typedef is_set > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct is_interval_container > +{ + typedef is_interval_container > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + + + +}} // namespace icl boost + +#endif + + diff --git a/3party/boost/boost/icl/interval_bounds.hpp b/3party/boost/boost/icl/interval_bounds.hpp new file mode 100644 index 0000000000..edf16d01ec --- /dev/null +++ b/3party/boost/boost/icl/interval_bounds.hpp @@ -0,0 +1,80 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_INTERVAL_BOUNDS_HPP_JOFA_100330 +#define BOOST_ICL_INTERVAL_BOUNDS_HPP_JOFA_100330 + +#include +#include + +namespace boost{namespace icl +{ + +typedef unsigned char bound_type; + +class interval_bounds +{ +public: + BOOST_STATIC_CONSTANT(bound_type, static_open = 0); + BOOST_STATIC_CONSTANT(bound_type, static_left_open = 1); + BOOST_STATIC_CONSTANT(bound_type, static_right_open = 2); + BOOST_STATIC_CONSTANT(bound_type, static_closed = 3); + BOOST_STATIC_CONSTANT(bound_type, dynamic = 4); + BOOST_STATIC_CONSTANT(bound_type, undefined = 5); + + BOOST_STATIC_CONSTANT(bound_type, _open = 0); + BOOST_STATIC_CONSTANT(bound_type, _left_open = 1); + BOOST_STATIC_CONSTANT(bound_type, _right_open = 2); + BOOST_STATIC_CONSTANT(bound_type, _closed = 3); + + BOOST_STATIC_CONSTANT(bound_type, _right = 1); + BOOST_STATIC_CONSTANT(bound_type, _left = 2); + BOOST_STATIC_CONSTANT(bound_type, _all = 3); + +public: + interval_bounds():_bits(){} + explicit interval_bounds(bound_type bounds): _bits(bounds){} + interval_bounds all ()const { return interval_bounds(_bits & _all ); } + interval_bounds left ()const { return interval_bounds(_bits & _left ); } + interval_bounds right()const { return interval_bounds(_bits & _right); } + interval_bounds reverse_left ()const { return interval_bounds((~_bits>>1) & _right); } + interval_bounds reverse_right()const { return interval_bounds((~_bits<<1) & _left ); } + + bound_type bits()const{ return _bits; } + + static interval_bounds open() { return interval_bounds(_open); } + static interval_bounds left_open() { return interval_bounds(_left_open); } + static interval_bounds right_open(){ return interval_bounds(_right_open);} + static interval_bounds closed() { return interval_bounds(_closed); } + +public: + bound_type _bits; +}; + + +template +class bounded_value +{ +public: + typedef DomainT domain_type; + typedef bounded_value type; +public: + bounded_value(const domain_type& value, interval_bounds bound) + : _value(value), _bound(bound) {} + + domain_type value()const { return _value; } + interval_bounds bound()const { return _bound; } + +private: + domain_type _value; + interval_bounds _bound; +}; + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/interval_combining_style.hpp b/3party/boost/boost/icl/interval_combining_style.hpp new file mode 100644 index 0000000000..aa5444c800 --- /dev/null +++ b/3party/boost/boost/icl/interval_combining_style.hpp @@ -0,0 +1,28 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_INTERVAL_COMBINING_STYLE_HPP_JOFA_100906 +#define BOOST_ICL_INTERVAL_COMBINING_STYLE_HPP_JOFA_100906 + +namespace boost{ namespace icl +{ + +namespace interval_combine +{ + BOOST_STATIC_CONSTANT(int, unknown = 0); + BOOST_STATIC_CONSTANT(int, joining = 1); + BOOST_STATIC_CONSTANT(int, separating = 2); + BOOST_STATIC_CONSTANT(int, splitting = 3); + BOOST_STATIC_CONSTANT(int, elemental = 4); + +} // namespace interval_combine + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/interval_map.hpp b/3party/boost/boost/icl/interval_map.hpp new file mode 100644 index 0000000000..be29963bcd --- /dev/null +++ b/3party/boost/boost/icl/interval_map.hpp @@ -0,0 +1,264 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_INTERVAL_MAP_HPP_JOFA_080705 +#define BOOST_ICL_INTERVAL_MAP_HPP_JOFA_080705 + +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +template +class split_interval_map; + +/** \brief implements a map as a map of intervals - on insertion + overlapping intervals are split and associated values are combined.*/ +template +< + typename DomainT, + typename CodomainT, + class Traits = icl::partial_absorber, + ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT), + ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, CodomainT), + ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, CodomainT), + ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), + ICL_ALLOC Alloc = std::allocator +> +class interval_map: + + public interval_base_map, + DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> +{ +public: + typedef Traits traits; + typedef interval_map type; + typedef split_interval_map split_type; + typedef type overloadable_type; + typedef type joint_type; + typedef interval_base_map base_type; + + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; + typedef typename base_type::iterator iterator; + typedef typename base_type::value_type value_type; + typedef typename base_type::element_type element_type; + typedef typename base_type::segment_type segment_type; + typedef typename base_type::domain_type domain_type; + typedef typename base_type::codomain_type codomain_type; + typedef typename base_type::domain_mapping_type domain_mapping_type; + typedef typename base_type::interval_mapping_type interval_mapping_type; + typedef typename base_type::ImplMapT ImplMapT; + + typedef typename base_type::size_type size_type; + typedef typename base_type::codomain_combine codomain_combine; + + typedef interval_set interval_set_type; + typedef interval_set_type set_type; + typedef set_type key_object_type; + + enum { fineness = 1 }; + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /// Default constructor for the empty object + interval_map(): base_type() {} + /// Copy constructor + interval_map(const interval_map& src): base_type(src) {} + + + /// Copy constructor for base_type + template + explicit interval_map + (const interval_base_map& src) + { this->assign(src); } + + explicit interval_map(domain_mapping_type& base_pair): base_type() + { this->add(base_pair); } + + explicit interval_map(const value_type& value_pair): base_type() + { this->add(value_pair); } + + /// Assignment operator + template + interval_map& operator = + (const interval_base_map& src) + { this->assign(src); return *this; } + + /// Assignment from a base interval_map. + template + void assign(const interval_base_map& src) + { + typedef interval_base_map base_map_type; + this->clear(); + // Can be implemented via _map.insert: Interval joining not necessary. + iterator prior_ = this->_map.end(); + ICL_const_FORALL(typename base_map_type, it_, src) + prior_ = this->add(prior_, *it_); + } + +private: + // Private functions that shall be accessible by the baseclass: + friend class + interval_base_map , + DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>; + + iterator handle_inserted(iterator it_) + { + return segmental::join_neighbours(*this, it_); + } + + void handle_inserted(iterator prior_, iterator it_) + { + if(prior_ != this->_map.end() && segmental::joinable(*this, prior_, it_)) + segmental::join_on_right(*this, prior_, it_); + } + + template + void handle_left_combined(iterator it_) + { + if(on_absorbtion::is_absorbable(it_->second)) + this->_map.erase(it_); + else + segmental::join_left(*this, it_); + } + + template + void handle_combined(iterator it_) + { + if(on_absorbtion::is_absorbable(it_->second)) + this->_map.erase(it_); + else + segmental::join_neighbours(*this, it_); + } + + template + void handle_preceeded_combined(iterator prior_, iterator& it_) + { + if(on_absorbtion::is_absorbable(it_->second)) + { + this->_map.erase(it_); + it_ = prior_; + } + else // After a new combination (e.g. combiner=max) joining neighbours may be possible + segmental::join_neighbours(*this, it_); + } + + template + void handle_succeeded_combined(iterator it_, iterator next_) + { + if(on_absorbtion::is_absorbable(it_->second)) + { + this->_map.erase(it_); + segmental::join_right(*this, next_); + } + else + { + segmental::join_left(*this, it_); + segmental::join_neighbours(*this, next_); + } + } + + + + void handle_reinserted(iterator insertion_) + { + segmental::join_right(*this, insertion_); + } + + + template + void gap_insert_at(iterator& it_, iterator prior_, + const interval_type& end_gap, const codomain_type& co_val) + { + if(on_absorbtion::is_absorbable(it_->second)) + { + this->_map.erase(it_); + it_ = this->template gap_insert(prior_, end_gap, co_val); + segmental::join_right(*this, it_); + } + else + { + segmental::join_left(*this, it_); + iterator inserted_ = this->template gap_insert(it_, end_gap, co_val); + it_ = segmental::join_neighbours(*this, inserted_); + } + } + +} ; + + +//----------------------------------------------------------------------------- +// type traits +//----------------------------------------------------------------------------- +template +struct is_map > +{ + typedef is_map > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct has_inverse > +{ + typedef has_inverse > type; + BOOST_STATIC_CONSTANT(bool, value = (has_inverse::value)); +}; + + +template +struct is_interval_container > +{ + typedef is_interval_container > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct absorbs_identities > +{ + typedef absorbs_identities > type; + BOOST_STATIC_CONSTANT(bool, value = (Traits::absorbs_identities)); +}; + +template +struct is_total > +{ + typedef is_total > type; + BOOST_STATIC_CONSTANT(bool, value = (Traits::is_total)); +}; + + +//----------------------------------------------------------------------------- +// type representation +//----------------------------------------------------------------------------- +template +struct type_to_string > +{ + static std::string apply() + { + return "itv_map<"+ type_to_string::apply() + "," + + type_to_string::apply() + "," + + type_to_string::apply() + ">"; + } +}; + +}} // namespace icl boost + +#endif + + diff --git a/3party/boost/boost/icl/interval_set.hpp b/3party/boost/boost/icl/interval_set.hpp new file mode 100644 index 0000000000..86758f52df --- /dev/null +++ b/3party/boost/boost/icl/interval_set.hpp @@ -0,0 +1,204 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2010: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_INTERVAL_SET_HPP_JOFA_990223 +#define BOOST_ICL_INTERVAL_SET_HPP_JOFA_990223 + +#include +#include +#include + +namespace boost{namespace icl +{ + +/** \brief Implements a set as a set of intervals - merging adjoining intervals */ +template +< + typename DomainT, + ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT), + ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), + ICL_ALLOC Alloc = std::allocator +> +class interval_set: + public interval_base_set, + DomainT,Compare,Interval,Alloc> +{ +public: + + typedef interval_set type; + + /// The base_type of this class + typedef interval_base_set base_type; + + typedef type overloadable_type; + + typedef type joint_type; + + typedef type key_object_type; + + /// The domain type of the set + typedef DomainT domain_type; + /// The codomaintype is the same as domain_type + typedef DomainT codomain_type; + + /// The element type of the set + typedef DomainT element_type; + /// The interval type of the set + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; + /// The segment type of the set + typedef interval_type segment_type; + + /// Comparison functor for domain values + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + /// Comparison functor for intervals + typedef exclusive_less_than interval_compare; + + /// Comparison functor for keys + typedef exclusive_less_than key_compare; + + /// The allocator type of the set + typedef Alloc allocator_type; + + /// allocator type of the corresponding element set + typedef Alloc domain_allocator_type; + + /// The corresponding atomized type representing this interval container of elements + typedef typename base_type::atomized_type atomized_type; + + /// Container type for the implementation + typedef typename base_type::ImplSetT ImplSetT; + + /// key type of the implementing container + typedef typename ImplSetT::key_type key_type; + /// data type of the implementing container + typedef typename ImplSetT::value_type data_type; + /// value type of the implementing container + typedef typename ImplSetT::value_type value_type; + + /// iterator for iteration over intervals + typedef typename ImplSetT::iterator iterator; + /// const_iterator for iteration over intervals + typedef typename ImplSetT::const_iterator const_iterator; + + enum { fineness = 1 }; + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /// Default constructor for the empty object + interval_set(): base_type() {} + /// Copy constructor + interval_set(const interval_set& src): base_type(src) {} + + /// Copy constructor for base_type + template + explicit interval_set + (const interval_base_set& src) + { + this->assign(src); + } + + /// Constructor for a single element + explicit interval_set(const domain_type& value): base_type() + { this->add(interval_type(value)); } + /// Constructor for a single interval + explicit interval_set(const interval_type& itv): base_type() + { + this->add(itv); + } + + /// Assignment operator + template + interval_set& operator = + (const interval_base_set& src) + { + this->assign(src); + return *this; + } + + + /// Assignment from a base interval_set. + template + void assign(const interval_base_set& src) + { + typedef interval_base_set base_set_type; + this->clear(); + // Has to be implemented via add. there might be touching borders to be joined + iterator prior_ = this->_set.end(); + ICL_const_FORALL(typename base_set_type, it_, src) + prior_ = this->add(prior_, *it_); + } + + +private: + // Private functions that shall be accessible by the baseclass: + friend class + interval_base_set , + DomainT,Compare,Interval,Alloc>; + + iterator handle_inserted(iterator it_) + { + return segmental::join_neighbours(*this, it_); + } + + iterator add_over(const interval_type& addend, iterator last_) + { + iterator joined_ = segmental::join_under(*this, addend, last_); + return segmental::join_neighbours(*this, joined_); + } + + iterator add_over(const interval_type& addend) + { + iterator joined_ = segmental::join_under(*this, addend); + return segmental::join_neighbours(*this, joined_); + } + +} ; + + +//----------------------------------------------------------------------------- +// type traits +//----------------------------------------------------------------------------- +template +struct is_set > +{ + typedef is_set > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct is_interval_container > +{ + typedef is_interval_container > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct is_interval_joiner > +{ + typedef is_interval_joiner > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + + +//----------------------------------------------------------------------------- +// type representation +//----------------------------------------------------------------------------- +template +struct type_to_string > +{ + static std::string apply() + { return "itv_set<"+ type_to_string::apply() +">"; } +}; + +}} // namespace icl boost + +#endif + + diff --git a/3party/boost/boost/icl/interval_traits.hpp b/3party/boost/boost/icl/interval_traits.hpp new file mode 100644 index 0000000000..6335d40cf0 --- /dev/null +++ b/3party/boost/boost/icl/interval_traits.hpp @@ -0,0 +1,58 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_INTERVAL_TRAITS_HPP_JOFA_100926 +#define BOOST_ICL_INTERVAL_TRAITS_HPP_JOFA_100926 + +#include +#include +#include + +namespace boost{ namespace icl +{ + +template struct interval_traits; + +template +struct domain_type_of > +{ + typedef typename interval_traits::domain_type type; +}; + +//------------------------------------------------------------------------------ +//- Adapter class +//------------------------------------------------------------------------------ +template struct interval_traits +{ + typedef interval_traits type; + typedef typename domain_type_of::type domain_type; + + static Type construct(const domain_type& lo, const domain_type& up); + + static domain_type upper(const Type& inter_val); + static domain_type lower(const Type& inter_val); +}; + +template +struct difference_type_of > +{ + typedef typename interval_traits::domain_type domain_type; + typedef typename difference_type_of::type type; +}; + +template +struct size_type_of > +{ + typedef typename interval_traits::domain_type domain_type; + typedef typename size_type_of::type type; +}; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/iterator.hpp b/3party/boost/boost/icl/iterator.hpp new file mode 100644 index 0000000000..240e8f88e4 --- /dev/null +++ b/3party/boost/boost/icl/iterator.hpp @@ -0,0 +1,103 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2009-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_ITERATOR_HPP_JOFA_091003 +#define BOOST_ICL_ITERATOR_HPP_JOFA_091003 + +#include +#include + +namespace boost{namespace icl +{ + +/** \brief Performes an addition using a container's memberfunction add, when operator= is called. */ +template class add_iterator + : public std::iterator +{ +public: + /// The container's type. + typedef ContainerT container_type; + typedef std::output_iterator_tag iterator_category; + + /** An add_iterator is constructed with a container and a position + that has to be maintained. */ + add_iterator(ContainerT& cont, typename ContainerT::iterator iter) + : _cont(&cont), _iter(iter) {} + + /** This assignment operator adds the \c value before the current position. + It maintains it's position by incrementing after addition. */ + add_iterator& operator=(typename ContainerT::const_reference value) + { + _iter = icl::add(*_cont, _iter, value); + if(_iter != _cont->end()) + ++_iter; + return *this; + } + + add_iterator& operator*() { return *this; } + add_iterator& operator++() { return *this; } + add_iterator& operator++(int){ return *this; } + +private: + ContainerT* _cont; + typename ContainerT::iterator _iter; +}; + + +/** Function adder creates and initializes an add_iterator */ +template +inline add_iterator adder(ContainerT& cont, IteratorT iter_) +{ + return add_iterator(cont, typename ContainerT::iterator(iter_)); +} + +/** \brief Performes an insertion using a container's memberfunction add, when operator= is called. */ +template class insert_iterator + : public std::iterator +{ +public: + /// The container's type. + typedef ContainerT container_type; + typedef std::output_iterator_tag iterator_category; + + /** An insert_iterator is constructed with a container and a position + that has to be maintained. */ + insert_iterator(ContainerT& cont, typename ContainerT::iterator iter) + : _cont(&cont), _iter(iter) {} + + /** This assignment operator adds the \c value before the current position. + It maintains it's position by incrementing after addition. */ + insert_iterator& operator=(typename ContainerT::const_reference value) + { + _iter = _cont->insert(_iter, value); + if(_iter != _cont->end()) + ++_iter; + return *this; + } + + insert_iterator& operator*() { return *this; } + insert_iterator& operator++() { return *this; } + insert_iterator& operator++(int){ return *this; } + +private: + ContainerT* _cont; + typename ContainerT::iterator _iter; +}; + + +/** Function inserter creates and initializes an insert_iterator */ +template +inline insert_iterator inserter(ContainerT& cont, IteratorT iter_) +{ + return insert_iterator(cont, typename ContainerT::iterator(iter_)); +} + +}} // namespace icl boost + +#endif // BOOST_ICL_ITERATOR_HPP_JOFA_091003 + + diff --git a/3party/boost/boost/icl/left_open_interval.hpp b/3party/boost/boost/icl/left_open_interval.hpp new file mode 100644 index 0000000000..418f998a6a --- /dev/null +++ b/3party/boost/boost/icl/left_open_interval.hpp @@ -0,0 +1,117 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_LEFT_OPEN_INTERVAL_HPP_JOFA_100930 +#define BOOST_ICL_LEFT_OPEN_INTERVAL_HPP_JOFA_100930 + +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +template +class left_open_interval +{ +public: + typedef left_open_interval type; + typedef DomainT domain_type; + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /** Default constructor; yields an empty interval (0,0]. */ + left_open_interval() + : _lwb(identity_element::value()), _upb(identity_element::value()) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + } + + //NOTE: Compiler generated copy constructor is used + + /** Constructor for a left-open singleton interval (val-1,val] */ + explicit left_open_interval(const DomainT& val) + : _lwb(icl::pred(val)), _upb(val) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + // Only for discrete types this ctor creates an interval containing + // a single element only. + BOOST_STATIC_ASSERT((icl::is_discrete::value)); + BOOST_ASSERT((numeric_minimum::value >::is_less_than(val) )); + } + + /** Interval from low to up with bounds bounds */ + left_open_interval(const DomainT& low, const DomainT& up) : + _lwb(low), _upb(up) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + } + + DomainT lower()const{ return _lwb; } + DomainT upper()const{ return _upb; } + +private: + DomainT _lwb; + DomainT _upb; +}; + +//============================================================================== +//=T left_open_interval -> concept intervals +//============================================================================== +template +struct interval_traits< icl::left_open_interval > +{ + typedef DomainT domain_type; + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + typedef icl::left_open_interval interval_type; + + static interval_type construct(const domain_type& lo, const domain_type& up) + { + return interval_type(lo, up); + } + + static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); }; + static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); }; +}; + + +//============================================================================== +//= Type traits +//============================================================================== +template +struct interval_bound_type< left_open_interval > +{ + typedef interval_bound_type type; + BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_left_open); +}; + +template +struct type_to_string > +{ + static std::string apply() + { return "(I]<"+ type_to_string::apply() +">"; } +}; + +template +struct value_size > +{ + static std::size_t apply(const icl::left_open_interval& value) + { return 2; } +}; + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/map.hpp b/3party/boost/boost/icl/map.hpp new file mode 100644 index 0000000000..7b815ff6be --- /dev/null +++ b/3party/boost/boost/icl/map.hpp @@ -0,0 +1,667 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_MAP_HPP_JOFA_070519 +#define BOOST_ICL_MAP_HPP_JOFA_070519 + +#include + +#if defined(ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION) +#include +#include +#elif defined(ICL_USE_BOOST_MOVE_IMPLEMENTATION) +#include +#include +#else +#include +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace boost{namespace icl +{ + +struct partial_absorber +{ + enum { absorbs_identities = true }; + enum { is_total = false }; +}; + +template<> +inline std::string type_to_string::apply() { return "@0"; } + +struct partial_enricher +{ + enum { absorbs_identities = false }; + enum { is_total = false }; +}; + +template<> +inline std::string type_to_string::apply() { return "e0"; } + +struct total_absorber +{ + enum { absorbs_identities = true }; + enum { is_total = true }; +}; + +template<> +inline std::string type_to_string::apply() { return "^0"; } + +struct total_enricher +{ + enum { absorbs_identities = false }; + enum { is_total = true }; +}; + +template<> +inline std::string type_to_string::apply() { return "e^0"; } + + + +/** \brief Addable, subractable and intersectable maps */ +template +< + typename DomainT, + typename CodomainT, + class Traits = icl::partial_absorber, + ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT), + ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, CodomainT), + ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, CodomainT), + ICL_ALLOC Alloc = std::allocator +> +class map: private ICL_IMPL_SPACE::map > > +{ +public: + typedef Alloc > allocator_type; + + typedef typename icl::map type; + typedef typename ICL_IMPL_SPACE::map base_type; + + typedef Traits traits; + +public: + typedef DomainT domain_type; + typedef typename boost::call_traits::param_type domain_param; + typedef DomainT key_type; + typedef CodomainT codomain_type; + typedef CodomainT mapped_type; + typedef CodomainT data_type; + typedef std::pair element_type; + typedef std::pair value_type; + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + typedef ICL_COMBINE_CODOMAIN(Combine,CodomainT) codomain_combine; + typedef domain_compare key_compare; + typedef ICL_COMPARE_DOMAIN(Compare,element_type) element_compare; + typedef typename inverse::type inverse_codomain_combine; + typedef typename mpl::if_ + + , ICL_SECTION_CODOMAIN(Section,CodomainT) + , codomain_combine + >::type codomain_intersect; + typedef typename inverse::type inverse_codomain_intersect; + typedef typename base_type::value_compare value_compare; + + typedef typename ICL_IMPL_SPACE::set > set_type; + typedef set_type key_object_type; + + + BOOST_STATIC_CONSTANT(bool, _total = (Traits::is_total)); + BOOST_STATIC_CONSTANT(bool, _absorbs = (Traits::absorbs_identities)); + BOOST_STATIC_CONSTANT(bool, + total_invertible = (mpl::and_, has_inverse >::value)); + + typedef on_absorbtion + on_identity_absorbtion; + +public: + typedef typename base_type::pointer pointer; + typedef typename base_type::const_pointer const_pointer; + typedef typename base_type::reference reference; + typedef typename base_type::const_reference const_reference; + typedef typename base_type::iterator iterator; + typedef typename base_type::const_iterator const_iterator; + typedef typename base_type::size_type size_type; + typedef typename base_type::difference_type difference_type; + typedef typename base_type::reverse_iterator reverse_iterator; + typedef typename base_type::const_reverse_iterator const_reverse_iterator; + +public: + BOOST_STATIC_CONSTANT(bool, + is_total_invertible = ( Traits::is_total + && has_inverse::value)); + + BOOST_STATIC_CONSTANT(int, fineness = 4); + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + map() + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((EqualComparableConcept)); + } + + map(const key_compare& comp): base_type(comp){} + + template + map(InputIterator first, InputIterator past) + : base_type(first,past){} + + template + map(InputIterator first, InputIterator past, const key_compare& comp) + : base_type(first,past,comp) + {} + + map(const map& src) + : base_type(src) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((EqualComparableConcept)); + } + + explicit map(const element_type& key_value_pair): base_type::map() + { + insert(key_value_pair); + } + + map& operator=(const map& src) { base_type::operator=(src); return *this; } + void swap(map& src) { base_type::swap(src); } + + //========================================================================== + using base_type::empty; + using base_type::clear; + + using base_type::begin; + using base_type::end; + using base_type::rbegin; + using base_type::rend; + + using base_type::size; + using base_type::max_size; + + using base_type::key_comp; + using base_type::value_comp; + + using base_type::erase; + using base_type::find; + using base_type::count; + + using base_type::lower_bound; + using base_type::upper_bound; + using base_type::equal_range; + + using base_type::operator[]; + +public: + //========================================================================== + //= Containedness + //========================================================================== + + template + bool contains(const SubObject& sub)const + { return icl::contains(*this, sub); } + + bool within(const map& super)const + { return icl::contains(super, *this); } + + //========================================================================== + //= Size + //========================================================================== + /** \c iterative_size() yields the number of elements that is visited + throu complete iteration. For interval sets \c iterative_size() is + different from \c size(). */ + std::size_t iterative_size()const { return base_type::size(); } + + //========================================================================== + //= Selection + //========================================================================== + + /** Total select function. */ + codomain_type operator()(const domain_type& key)const + { + const_iterator it = find(key); + return it==end() ? identity_element::value() + : it->second; + } + + //========================================================================== + //= Addition + //========================================================================== + /** \c add inserts \c value_pair into the map if it's key does + not exist in the map. + If \c value_pairs's key value exists in the map, it's data + value is added to the data value already found in the map. */ + map& add(const value_type& value_pair) + { + return _add(value_pair); + } + + /** \c add add \c value_pair into the map using \c prior as a hint to + insert \c value_pair after the position \c prior is pointing to. */ + iterator add(iterator prior, const value_type& value_pair) + { + return _add(prior, value_pair); + } + + //========================================================================== + //= Subtraction + //========================================================================== + /** If the \c value_pair's key value is in the map, it's data value is + subtraced from the data value stored in the map. */ + map& subtract(const element_type& value_pair) + { + on_invertible + ::subtract(*this, value_pair); + return *this; + } + + map& subtract(const domain_type& key) + { + icl::erase(*this, key); + return *this; + } + + //========================================================================== + //= Insertion, erasure + //========================================================================== + std::pair insert(const value_type& value_pair) + { + if(on_identity_absorbtion::is_absorbable(value_pair.second)) + return std::pair(end(),true); + else + return base_type::insert(value_pair); + } + + iterator insert(iterator prior, const value_type& value_pair) + { + if(on_identity_absorbtion::is_absorbable(value_pair.second)) + return end(); + else + return base_type::insert(prior, value_pair); + } + + /** With key_value_pair = (k,v) set value \c v for key \c k */ + map& set(const element_type& key_value_pair) + { + return icl::set_at(*this, key_value_pair); + } + + /** erase \c key_value_pair from the map. + Erase only if, the exact value content \c val is stored for the given key. */ + size_type erase(const element_type& key_value_pair) + { + return icl::erase(*this, key_value_pair); + } + + //========================================================================== + //= Intersection + //========================================================================== + /** The intersection of \c key_value_pair and \c *this map is added to \c section. */ + void add_intersection(map& section, const element_type& key_value_pair)const + { + on_definedness + ::add_intersection(section, *this, key_value_pair); + } + + //========================================================================== + //= Symmetric difference + //========================================================================== + + map& flip(const element_type& operand) + { + on_total_absorbable::flip(*this, operand); + return *this; + } + +private: + template + map& _add(const element_type& value_pair); + + template + iterator _add(iterator prior, const element_type& value_pair); + + template + map& _subtract(const element_type& value_pair); + + template + void total_add_intersection(type& section, const FragmentT& fragment)const + { + section += *this; + section.add(fragment); + } + + void partial_add_intersection(type& section, const element_type& operand)const + { + const_iterator it_ = find(operand.first); + if(it_ != end()) + { + section.template _add(*it_); + section.template _add(operand); + } + } + + +private: + //-------------------------------------------------------------------------- + template + struct on_invertible; + + template + struct on_invertible + { + typedef typename Type::element_type element_type; + typedef typename Type::inverse_codomain_combine inverse_codomain_combine; + + static void subtract(Type& object, const element_type& operand) + { object.template _add(operand); } + }; + + template + struct on_invertible + { + typedef typename Type::element_type element_type; + typedef typename Type::inverse_codomain_combine inverse_codomain_combine; + + static void subtract(Type& object, const element_type& operand) + { object.template _subtract(operand); } + }; + + friend struct on_invertible; + friend struct on_invertible; + //-------------------------------------------------------------------------- + + //-------------------------------------------------------------------------- + template + struct on_definedness; + + template + struct on_definedness + { + static void add_intersection(Type& section, const Type& object, + const element_type& operand) + { object.total_add_intersection(section, operand); } + }; + + template + struct on_definedness + { + static void add_intersection(Type& section, const Type& object, + const element_type& operand) + { object.partial_add_intersection(section, operand); } + }; + + friend struct on_definedness; + friend struct on_definedness; + //-------------------------------------------------------------------------- + + //-------------------------------------------------------------------------- + template + struct on_codomain_model; + + template + struct on_codomain_model + { // !codomain_is_set, !absorbs_identities + static void subtract(Type&, typename Type::iterator it_, + const typename Type::codomain_type& ) + { it_->second = identity_element::value(); } + }; + + template + struct on_codomain_model + { // !codomain_is_set, absorbs_identities + static void subtract(Type& object, typename Type::iterator it_, + const typename Type::codomain_type& ) + { object.erase(it_); } + }; + + template + struct on_codomain_model + { // !codomain_is_set, !absorbs_identities + typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect; + static void subtract(Type&, typename Type::iterator it_, + const typename Type::codomain_type& co_value) + { + inverse_codomain_intersect()(it_->second, co_value); + } + }; + + template + struct on_codomain_model + { // !codomain_is_set, absorbs_identities + typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect; + static void subtract(Type& object, typename Type::iterator it_, + const typename Type::codomain_type& co_value) + { + inverse_codomain_intersect()(it_->second, co_value); + if(it_->second == identity_element::value()) + object.erase(it_); + } + }; + //-------------------------------------------------------------------------- + + //-------------------------------------------------------------------------- + template + struct on_total_absorbable; + + template + struct on_total_absorbable + { + typedef typename Type::element_type element_type; + static void flip(Type& object, const typename Type::element_type&) + { icl::clear(object); } + }; + + template + struct on_total_absorbable + { + typedef typename Type::element_type element_type; + typedef typename Type::codomain_type codomain_type; + + static void flip(Type& object, const element_type& operand) + { + object.add(operand); + ICL_FORALL(typename Type, it_, object) + it_->second = identity_element::value(); + } + }; + + template + struct on_total_absorbable + { // !is_total, absorbs_identities + typedef typename Type::element_type element_type; + typedef typename Type::codomain_type codomain_type; + typedef typename Type::iterator iterator; + typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect; + + static void flip(Type& object, const element_type& operand) + { + std::pair insertion = object.insert(operand); + if(!insertion.second) + on_codomain_model::value, true> + ::subtract(object, insertion.first, operand.second); + } + }; + + template + struct on_total_absorbable + { // !is_total !absorbs_identities + typedef typename Type::element_type element_type; + typedef typename Type::codomain_type codomain_type; + typedef typename Type::iterator iterator; + typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect; + + static void flip(Type& object, const element_type& operand) + { + std::pair insertion = object.insert(operand); + if(!insertion.second) + on_codomain_model::value, false> + ::subtract(object, insertion.first, operand.second); + } + }; + + friend struct on_total_absorbable; + friend struct on_total_absorbable; + friend struct on_total_absorbable; + friend struct on_total_absorbable; + //-------------------------------------------------------------------------- +}; + + + +//============================================================================== +//= Addition +//============================================================================== +template + template +map& + map + ::_add(const element_type& addend) +{ + typedef typename on_absorbtion + ::value>::type on_absorbtion_; + + const codomain_type& co_val = addend.second; + if(on_absorbtion_::is_absorbable(co_val)) + return *this; + + std::pair insertion + = base_type::insert(value_type(addend.first, version()(co_val))); + + if(!insertion.second) + { + iterator it = insertion.first; + Combiner()((*it).second, co_val); + + if(on_absorbtion_::is_absorbable((*it).second)) + erase(it); + } + return *this; +} + + +template + template +typename map::iterator + map + ::_add(iterator prior_, const value_type& addend) +{ + typedef typename on_absorbtion + ::value>::type on_absorbtion_; + + const codomain_type& co_val = addend.second; + if(on_absorbtion_::is_absorbable(co_val)) + return end(); + + iterator inserted_ + = base_type::insert(prior_, + value_type(addend.first, Combiner::identity_element())); + Combiner()(inserted_->second, addend.second); + + if(on_absorbtion_::is_absorbable(inserted_->second)) + { + erase(inserted_); + return end(); + } + else + return inserted_; +} + + +//============================================================================== +//= Subtraction +//============================================================================== +template + template +map& + map::_subtract(const value_type& minuend) +{ + typedef typename on_absorbtion + ::value>::type on_absorbtion_; + + iterator it_ = find(minuend.first); + if(it_ != end()) + { + Combiner()(it_->second, minuend.second); + if(on_absorbtion_::is_absorbable(it_->second)) + erase(it_); + } + return *this; +} + + +//----------------------------------------------------------------------------- +// type traits +//----------------------------------------------------------------------------- +template +struct is_map > +{ + typedef is_map > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct has_inverse > +{ + typedef has_inverse > type; + BOOST_STATIC_CONSTANT(bool, value = (has_inverse::value)); +}; + +template +struct absorbs_identities > +{ + typedef absorbs_identities type; + BOOST_STATIC_CONSTANT(int, value = Traits::absorbs_identities); +}; + +template +struct is_total > +{ + typedef is_total type; + BOOST_STATIC_CONSTANT(int, value = Traits::is_total); +}; + +template +struct type_to_string > +{ + static std::string apply() + { + return "map<"+ type_to_string::apply() + "," + + type_to_string::apply() + "," + + type_to_string::apply() +">"; + } +}; + + + +}} // namespace icl boost + +#endif // BOOST_ICL_MAP_HPP_JOFA_070519 + diff --git a/3party/boost/boost/icl/open_interval.hpp b/3party/boost/boost/icl/open_interval.hpp new file mode 100644 index 0000000000..d2da9bbcc6 --- /dev/null +++ b/3party/boost/boost/icl/open_interval.hpp @@ -0,0 +1,117 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_OPEN_INTERVAL_HPP_JOFA_100930 +#define BOOST_ICL_OPEN_INTERVAL_HPP_JOFA_100930 + +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +template +class open_interval +{ +public: + typedef open_interval type; + typedef DomainT domain_type; + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /** Default constructor; yields an empty interval (0,0). */ + open_interval() + : _lwb(identity_element::value()), _upb(identity_element::value()) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + } + + //NOTE: Compiler generated copy constructor is used + + /** Constructor for an open singleton interval (val-1,val+1) */ + explicit open_interval(const DomainT& val) + : _lwb(pred(val)), _upb(succ(val)) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + // Only for discrete types this ctor creates an interval containing + // a single element only. + BOOST_STATIC_ASSERT((icl::is_discrete::value)); + BOOST_ASSERT((numeric_minimum::value >::is_less_than(val) )); + } + + /** Interval from low to up with bounds bounds */ + open_interval(const DomainT& low, const DomainT& up) : + _lwb(low), _upb(up) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + } + + DomainT lower()const{ return _lwb; } + DomainT upper()const{ return _upb; } + +private: + DomainT _lwb; + DomainT _upb; +}; + +//============================================================================== +//=T open_interval -> concept intervals +//============================================================================== +template +struct interval_traits< icl::open_interval > +{ + typedef DomainT domain_type; + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + typedef icl::open_interval interval_type; + + static interval_type construct(const domain_type& lo, const domain_type& up) + { + return interval_type(lo, up); + } + + static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); }; + static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); }; +}; + + +//============================================================================== +//= Type traits +//============================================================================== +template +struct interval_bound_type< open_interval > +{ + typedef interval_bound_type type; + BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_open); +}; + +template +struct type_to_string > +{ + static std::string apply() + { return "(I)<"+ type_to_string::apply() +">"; } +}; + +template +struct value_size > +{ + static std::size_t apply(const icl::open_interval& value) + { return 2; } +}; + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/predicates/distinct_equal.hpp b/3party/boost/boost/icl/predicates/distinct_equal.hpp new file mode 100644 index 0000000000..a74617534a --- /dev/null +++ b/3party/boost/boost/icl/predicates/distinct_equal.hpp @@ -0,0 +1,32 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_PREDICATES_DISTINCT_EQUAL_HPP_JOFA_101102 +#define BOOST_ICL_PREDICATES_DISTINCT_EQUAL_HPP_JOFA_101102 + +#include +#include + +namespace boost{namespace icl +{ + template + struct distinct_equal : public relation + { + bool operator()(const Type& lhs, const Type& rhs)const + { + return is_distinct_equal(lhs, rhs); + } + }; + + template<> + inline std::string unary_template_to_string::apply() + { return "==/0"; } + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/predicates/element_equal.hpp b/3party/boost/boost/icl/predicates/element_equal.hpp new file mode 100644 index 0000000000..c25b1935ed --- /dev/null +++ b/3party/boost/boost/icl/predicates/element_equal.hpp @@ -0,0 +1,32 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_PREDICATES_ELEMENT_EQUAL_HPP_JOFA_101102 +#define BOOST_ICL_PREDICATES_ELEMENT_EQUAL_HPP_JOFA_101102 + +#include +#include + +namespace boost{namespace icl +{ + template + struct element_equal : public relation + { + bool operator()(const Type& lhs, const Type& rhs)const + { + return is_element_equal(lhs, rhs); + } + }; + + template<> + inline std::string unary_template_to_string::apply() + { return "="; } + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/predicates/std_equal.hpp b/3party/boost/boost/icl/predicates/std_equal.hpp new file mode 100644 index 0000000000..cdce3e75db --- /dev/null +++ b/3party/boost/boost/icl/predicates/std_equal.hpp @@ -0,0 +1,33 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_PREDICATES_STD_EQUAL_HPP_JOFA_101102 +#define BOOST_ICL_PREDICATES_STD_EQUAL_HPP_JOFA_101102 + +#include +#include + +namespace boost{namespace icl +{ + template struct std_equal : public relation + { + bool operator()(const Type& lhs, const Type& rhs)const + { + return lhs == rhs; + } + }; + + //----------------------------------------------------------------------------- + + template<> + inline std::string unary_template_to_string::apply() + { return "=="; } + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/predicates/sub_super_set.hpp b/3party/boost/boost/icl/predicates/sub_super_set.hpp new file mode 100644 index 0000000000..e06da211bf --- /dev/null +++ b/3party/boost/boost/icl/predicates/sub_super_set.hpp @@ -0,0 +1,54 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_PREDICATES_SUB_SUPER_SET_HPP_JOFA_101102 +#define BOOST_ICL_PREDICATES_SUB_SUPER_SET_HPP_JOFA_101102 + +#include +#include + +namespace boost{namespace icl +{ + + /// Functor class template contained_in implements the subset relation. + template + struct sub_super_set : public relation + { + /// Apply the subset relation. + /** contained_in(sub, super) is true if sub + is contained in super */ + bool operator()(const Type& sub, const Type& super)const + { + return contains(super, sub); + } + }; + + template<> + inline std::string unary_template_to_string::apply() + { return "C="; } + + /// Functor class template contains implements the superset relation. + template + struct super_sub_set : public relation + { + /// Apply the superset relation. + /** contains(super, sub) is true if super containes + sub */ + bool operator()(const Type& super, const Type& sub)const + { + return contains(super, sub); + } + }; + + template<> + inline std::string unary_template_to_string::apply() + { return "D="; } + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/ptime.hpp b/3party/boost/boost/icl/ptime.hpp new file mode 100644 index 0000000000..455963f199 --- /dev/null +++ b/3party/boost/boost/icl/ptime.hpp @@ -0,0 +1,122 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ + +/*------------------------------------------------------------------------------ +itl_ptime provides adapter code for boost::posix_time::ptime. +It implements incrementation (++) decrementation (--) and a neutral element +w.r.t. addition (identity_element()). +------------------------------------------------------------------------------*/ + +#ifndef BOOST_ICL_PTIME_HPP_JOFA_080416 +#define BOOST_ICL_PTIME_HPP_JOFA_080416 + +#include +#include + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4100) // boost/date_time/time.hpp(80) : warning C4100: 'as_offset' : unreferenced formal parameter +#pragma warning(disable:4127) // conditional expression is constant +#pragma warning(disable:4244) // 'argument' : conversion from 'int' to 'unsigned short', possible loss of data +#pragma warning(disable:4702) // boost\lexical_cast.hpp(1159) : warning C4702: unreachable code +#pragma warning(disable:4996) // Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' +#endif + +#include +#include +#include +#include +#include + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include +#include +#include +#include + +namespace boost{namespace icl +{ + template<> struct is_discrete + { + typedef is_discrete type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + template<> + inline boost::posix_time::ptime identity_element::value() + { + return boost::posix_time::ptime(boost::posix_time::min_date_time); + } + + template<> + struct has_difference + { + typedef has_difference type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + template<> + struct difference_type_of + { + typedef boost::posix_time::time_duration type; + }; + + template<> + struct size_type_of + { + typedef boost::posix_time::time_duration type; + }; + + // ------------------------------------------------------------------------ + boost::posix_time::ptime operator ++(boost::posix_time::ptime& x) + { + return x += boost::posix_time::ptime::time_duration_type::unit(); + } + + boost::posix_time::ptime operator --(boost::posix_time::ptime& x) + { + return x -= boost::posix_time::ptime::time_duration_type::unit(); + } + + // ------------------------------------------------------------------------ + template<> struct is_discrete + { + typedef is_discrete type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + template<> + struct has_difference + { + typedef has_difference type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + template<> + struct size_type_of + { + typedef boost::posix_time::time_duration type; + }; + + boost::posix_time::time_duration operator ++(boost::posix_time::time_duration& x) + { + return x += boost::posix_time::ptime::time_duration_type::unit(); + } + + boost::posix_time::time_duration operator --(boost::posix_time::time_duration& x) + { + return x -= boost::posix_time::ptime::time_duration_type::unit(); + } +}} // namespace icl boost + +#endif + + diff --git a/3party/boost/boost/icl/rational.hpp b/3party/boost/boost/icl/rational.hpp new file mode 100644 index 0000000000..51151d0f82 --- /dev/null +++ b/3party/boost/boost/icl/rational.hpp @@ -0,0 +1,70 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ + +/*------------------------------------------------------------------------------ +itl_rational provides adapter code for boost::rational. +------------------------------------------------------------------------------*/ + +#ifndef BOOST_ICL_RATIONAL_HPP_JOFA_080913 +#define BOOST_ICL_RATIONAL_HPP_JOFA_080913 + +#include // For BOOST_MSVC and more + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4127) // conditional expression is constant +#pragma warning(disable:4512) // 'boost::detail::resetter' : assignment operator could not be generated +#pragma warning(disable:4800) // 'unsigned int' : forcing value to bool 'true' or 'false' (performance warning) +#endif + +#include + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include +#include +#include + +namespace boost{namespace icl +{ + template + struct is_numeric > + { + typedef is_numeric type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + template + struct is_continuous > + { + typedef is_continuous type; + BOOST_STATIC_CONSTANT(bool, value = true); + }; + + template + struct is_discrete > + { + typedef is_discrete type; + BOOST_STATIC_CONSTANT(bool, value = false); + }; + + template + struct has_inverse > + { + typedef has_inverse type; + BOOST_STATIC_CONSTANT(bool, value = (is_signed::value)); + }; + +}} // namespace icl boost + + +#endif + + diff --git a/3party/boost/boost/icl/right_open_interval.hpp b/3party/boost/boost/icl/right_open_interval.hpp new file mode 100644 index 0000000000..3cbb724620 --- /dev/null +++ b/3party/boost/boost/icl/right_open_interval.hpp @@ -0,0 +1,117 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_RIGHT_OPEN_INTERVAL_HPP_JOFA_100323 +#define BOOST_ICL_RIGHT_OPEN_INTERVAL_HPP_JOFA_100323 + +#include +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +template +class right_open_interval +{ +public: + typedef right_open_interval type; + typedef DomainT domain_type; + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /** Default constructor; yields an empty interval [0,0). */ + right_open_interval() + : _lwb(identity_element::value()), _upb(identity_element::value()) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + } + + //NOTE: Compiler generated copy constructor is used + + /** Constructor for a singleton interval [val,val+1) */ + explicit right_open_interval(const DomainT& val) + : _lwb(val), _upb(icl::succ(val)) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + // Only for discrete types this ctor creates an interval containing + // a single element only. + BOOST_STATIC_ASSERT((icl::is_discrete::value)); + } + + /** Interval from low to up with bounds bounds */ + right_open_interval(const DomainT& low, const DomainT& up) : + _lwb(low), _upb(up) + { + BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept)); + BOOST_CONCEPT_ASSERT((LessThanComparableConcept)); + } + + domain_type lower()const{ return _lwb; } + domain_type upper()const{ return _upb; } + +private: + domain_type _lwb; + domain_type _upb; +}; + +//============================================================================== +//=T right_open_interval -> concept intervals +//============================================================================== +template +struct interval_traits< icl::right_open_interval > +{ + typedef DomainT domain_type; + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + typedef icl::right_open_interval interval_type; + + static interval_type construct(const domain_type& lo, const domain_type& up) + { + return interval_type(lo, up); + } + + static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); }; + static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); }; +}; + + +//============================================================================== +//= Type traits +//============================================================================== +template +struct interval_bound_type< right_open_interval > +{ + typedef interval_bound_type type; + BOOST_STATIC_CONSTANT(bound_type, value = interval_bounds::static_right_open); +}; + +template +struct type_to_string > +{ + static std::string apply() + { return "[I)<"+ type_to_string::apply() +">"; } +}; + +template +struct value_size > +{ + static std::size_t apply(const icl::right_open_interval& value) + { return 2; } +}; + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/separate_interval_set.hpp b/3party/boost/boost/icl/separate_interval_set.hpp new file mode 100644 index 0000000000..9b69fd6d0c --- /dev/null +++ b/3party/boost/boost/icl/separate_interval_set.hpp @@ -0,0 +1,191 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_SEPARATE_INTERVAL_SET_HPP_JOFA_080608 +#define BOOST_ICL_SEPARATE_INTERVAL_SET_HPP_JOFA_080608 + +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +/** \brief Implements a set as a set of intervals - leaving adjoining intervals separate */ +template +< + typename DomainT, + ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT), + ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), + ICL_ALLOC Alloc = std::allocator +> +class separate_interval_set: + public interval_base_set, + DomainT,Compare,Interval,Alloc> +{ +public: + typedef separate_interval_set type; + + typedef interval_base_set base_type; + + typedef type overloadable_type; + typedef type key_object_type; + + typedef interval_set joint_type; + + /// The domain type of the set + typedef DomainT domain_type; + /// The codomaintype is the same as domain_type + typedef DomainT codomain_type; + + /// The element type of the set + typedef DomainT element_type; + /// The interval type of the set + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; + /// The segment type of the set + typedef interval_type segment_type; + + /// Comparison functor for domain values + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + /// Comparison functor for intervals + typedef exclusive_less_than interval_compare; + + /// Comparison functor for keys + typedef exclusive_less_than key_compare; + + /// The allocator type of the set + typedef Alloc allocator_type; + + /// allocator type of the corresponding element set + typedef Alloc domain_allocator_type; + + /// The corresponding atomized type representing this interval container of elements + typedef typename base_type::atomized_type atomized_type; + + /// Container type for the implementation + typedef typename base_type::ImplSetT ImplSetT; + + /// key type of the implementing container + typedef typename ImplSetT::key_type key_type; + /// data type of the implementing container + typedef typename ImplSetT::value_type data_type; + /// value type of the implementing container + typedef typename ImplSetT::value_type value_type; + + /// iterator for iteration over intervals + typedef typename ImplSetT::iterator iterator; + /// const_iterator for iteration over intervals + typedef typename ImplSetT::const_iterator const_iterator; + + + enum { fineness = 2 }; + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /// Default constructor for the empty object + separate_interval_set(): base_type() {} + /// Copy constructor + separate_interval_set(const separate_interval_set& src): base_type(src) {} + + /// Copy constructor for base_type + template + separate_interval_set + (const interval_base_set& src) + { + this->assign(src); + } + + /// Constructor for a single element + explicit separate_interval_set(const domain_type& elem): base_type() { this->add(elem); } + /// Constructor for a single interval + explicit separate_interval_set(const interval_type& itv): base_type() { this->add(itv); } + + /// Assignment operator + template + separate_interval_set& operator = + (const interval_base_set& src) + { + this->assign(src); + return *this; + } + + /// Assignment from a base interval_set. + template + void assign(const interval_base_set& src) + { + this->clear(); + this->_set.insert(src.begin(), src.end()); + } + + +private: + // Private functions that shall be accessible by the baseclass: + friend class + interval_base_set, + DomainT,Compare,Interval,Alloc>; + + iterator handle_inserted(iterator inserted_) + { + return inserted_; + } + + iterator add_over(const interval_type& addend, iterator last_) + { + return segmental::join_under(*this, addend, last_); + } + + iterator add_over(const interval_type& addend) + { + return segmental::join_under(*this, addend); + } + +} ; + + + +//----------------------------------------------------------------------------- +// type traits +//----------------------------------------------------------------------------- +template +struct is_set > +{ + typedef is_set > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct is_interval_container > +{ + typedef is_interval_container > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct is_interval_separator > +{ + typedef is_interval_separator > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +//----------------------------------------------------------------------------- +// type representation +//----------------------------------------------------------------------------- +template +struct type_to_string > +{ + static std::string apply() + { return "se_itv_set<"+ type_to_string::apply() +">"; } +}; + +}} // namespace icl boost + +#endif + + diff --git a/3party/boost/boost/icl/set.hpp b/3party/boost/boost/icl/set.hpp new file mode 100644 index 0000000000..9c03df58a5 --- /dev/null +++ b/3party/boost/boost/icl/set.hpp @@ -0,0 +1,27 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_SET_HPP_JOFA_070519 +#define BOOST_ICL_SET_HPP_JOFA_070519 + +#include + +#if defined(ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION) +#include +#elif defined(ICL_USE_BOOST_MOVE_IMPLEMENTATION) +#include +#else +#include +#endif + +#include + + +}} // namespace icl boost + +#endif // BOOST_ICL_SET_HPP_JOFA_070519 + diff --git a/3party/boost/boost/icl/split_interval_map.hpp b/3party/boost/boost/icl/split_interval_map.hpp new file mode 100644 index 0000000000..9b8508460c --- /dev/null +++ b/3party/boost/boost/icl/split_interval_map.hpp @@ -0,0 +1,213 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_SPLIT_INTERVAL_MAP_HPP_JOFA_000706 +#define BOOST_ICL_SPLIT_INTERVAL_MAP_HPP_JOFA_000706 + +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +/** \brief implements a map as a map of intervals - on insertion + overlapping intervals are split and associated values are combined. */ +template +< + typename DomainT, + typename CodomainT, + class Traits = icl::partial_absorber, + ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT), + ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, CodomainT), + ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, CodomainT), + ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), + ICL_ALLOC Alloc = std::allocator +> +class split_interval_map: + public interval_base_map, + DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> +{ +public: + typedef Traits traits; + typedef split_interval_map type; + typedef interval_map joint_type; + typedef type overloadable_type; + + typedef interval_base_map base_type; + + typedef DomainT domain_type; + typedef CodomainT codomain_type; + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; + typedef typename base_type::iterator iterator; + typedef typename base_type::value_type value_type; + typedef typename base_type::element_type element_type; + typedef typename base_type::segment_type segment_type; + typedef typename base_type::domain_mapping_type domain_mapping_type; + typedef typename base_type::interval_mapping_type interval_mapping_type; + typedef typename base_type::ImplMapT ImplMapT; + + typedef typename base_type::codomain_combine codomain_combine; + + typedef interval_set interval_set_type; + typedef interval_set_type set_type; + typedef set_type key_object_type; + + enum { fineness = 3 }; + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /// Default constructor for the empty object + split_interval_map(): base_type() {} + /// Copy constructor + split_interval_map(const split_interval_map& src): base_type(src) {} + + explicit split_interval_map(domain_mapping_type& base_pair): base_type() + { this->add(base_pair); } + + explicit split_interval_map(const value_type& value_pair): base_type() + { this->add(value_pair); } + + /// Assignment operator + template + split_interval_map& operator = + (const interval_base_map& src) + { this->assign(src); return *this; } + + /// Assignment from a base interval_map. + template + void assign(const interval_base_map& src) + { + this->clear(); + this->_map.insert(src.begin(), src.end()); + } + +private: + // Private functions that shall be accessible by the baseclass: + friend class + interval_base_map , + DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>; + + iterator handle_inserted(iterator it_)const { return it_; } + void handle_inserted(iterator, iterator)const{ } + + template + void handle_left_combined(iterator it_) + { + if(on_absorbtion::is_absorbable(it_->second)) + this->_map.erase(it_); + } + + template + void handle_combined(iterator it_) + { + if(on_absorbtion::is_absorbable(it_->second)) + this->_map.erase(it_); + } + + template + void handle_preceeded_combined(iterator prior_, iterator& it_) + { + if(on_absorbtion::is_absorbable(it_->second)) + { + this->_map.erase(it_); + it_ = prior_; + } + } + + template + void handle_succeeded_combined(iterator it_, iterator) + { + if(on_absorbtion::is_absorbable(it_->second)) + this->_map.erase(it_); + } + + void handle_reinserted(iterator){} + + template + void gap_insert_at(iterator& it_, iterator prior_, + const interval_type& end_gap, const codomain_type& co_val) + { + if(on_absorbtion::is_absorbable(it_->second)) + { + this->_map.erase(it_); + it_ = this->template gap_insert(prior_, end_gap, co_val); + } + else + it_ = this->template gap_insert(it_, end_gap, co_val); + } +} ; + +//----------------------------------------------------------------------------- +// type traits +//----------------------------------------------------------------------------- +template +struct is_map > +{ + typedef is_map > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct has_inverse > +{ + typedef has_inverse > type; + BOOST_STATIC_CONSTANT(bool, value = (has_inverse::value)); +}; + +template +struct is_interval_container > +{ + typedef is_interval_container > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct is_interval_splitter > +{ + typedef is_interval_splitter > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct absorbs_identities > +{ + typedef absorbs_identities > type; + BOOST_STATIC_CONSTANT(bool, value = (Traits::absorbs_identities)); +}; + +template +struct is_total > +{ + typedef is_total > type; + BOOST_STATIC_CONSTANT(bool, value = (Traits::is_total)); +}; + + +template +struct type_to_string > +{ + static std::string apply() + { + return "sp_itv_map<"+ type_to_string::apply() + "," + + type_to_string::apply() + "," + + type_to_string::apply() +">"; + } +}; + +}} // namespace icl boost + +#endif + + diff --git a/3party/boost/boost/icl/split_interval_set.hpp b/3party/boost/boost/icl/split_interval_set.hpp new file mode 100644 index 0000000000..946e9e2e32 --- /dev/null +++ b/3party/boost/boost/icl/split_interval_set.hpp @@ -0,0 +1,207 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2009: Joachim Faulhaber +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_SPLIT_INTERVAL_SET_HPP_JOFA_990223 +#define BOOST_ICL_SPLIT_INTERVAL_SET_HPP_JOFA_990223 + +#include +#include +#include + +namespace boost{namespace icl +{ + +/** \brief implements a set as a set of intervals - on insertion + overlapping intervals are split */ +template +< + typename DomainT, + ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT), + ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), + ICL_ALLOC Alloc = std::allocator +> +class split_interval_set: + public interval_base_set, + DomainT,Compare,Interval,Alloc> +{ +public: + typedef split_interval_set type; + typedef interval_base_set base_type; + + typedef interval_set joint_type; + typedef type overloadable_type; + typedef type key_object_type; + + /// The domain type of the set + typedef DomainT domain_type; + /// The codomaintype is the same as domain_type + typedef DomainT codomain_type; + + /// The element type of the set + typedef DomainT element_type; + /// The interval type of the set + typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; + /// The segment type of the set + typedef interval_type segment_type; + + /// Comparison functor for domain values + typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; + /// Comparison functor for intervals + typedef exclusive_less_than interval_compare; + + /// Comparison functor for keys + typedef exclusive_less_than key_compare; + + /// The allocator type of the set + typedef Alloc allocator_type; + + /// allocator type of the corresponding element set + typedef Alloc domain_allocator_type; + + /// The corresponding atomized type representing this interval container of elements + typedef typename base_type::atomized_type atomized_type; + + /// Container type for the implementation + typedef typename base_type::ImplSetT ImplSetT; + + /// key type of the implementing container + typedef typename ImplSetT::key_type key_type; + /// data type of the implementing container + typedef typename ImplSetT::value_type data_type; + /// value type of the implementing container + typedef typename ImplSetT::value_type value_type; + + /// iterator for iteration over intervals + typedef typename ImplSetT::iterator iterator; + /// const_iterator for iteration over intervals + typedef typename ImplSetT::const_iterator const_iterator; + + enum { fineness = 3 }; + +public: + //========================================================================== + //= Construct, copy, destruct + //========================================================================== + /// Default constructor for the empty object + split_interval_set(): base_type() {} + + /// Copy constructor + split_interval_set(const split_interval_set& src): base_type(src) {} + + /// Copy constructor for base_type + template + split_interval_set + (const interval_base_set& src) + { this->assign(src); } + + /// Constructor for a single element + explicit split_interval_set(const interval_type& elem): base_type() { this->add(elem); } + /// Constructor for a single interval + explicit split_interval_set(const domain_type& itv): base_type() { this->add(itv); } + + /// Assignment operator + template + split_interval_set& operator = + (const interval_base_set& src) + { this->assign(src); return *this; } + + /// Assignment from a base interval_set. + template + void assign(const interval_base_set& src) + { + this->clear(); + this->_set.insert(src.begin(), src.end()); + } + + +private: + // Private functions that shall be accessible by the baseclass: + friend class + interval_base_set, + DomainT,Compare,Interval,Alloc>; + + iterator handle_inserted(iterator inserted_) + { + return inserted_; + } + + iterator add_over(const interval_type& addend, iterator last_) + { + iterator first_ = this->_set.lower_bound(addend); + //BOOST_ASSERT(next(last_) == this->_set.upper_bound(inter_val)); + + iterator it_ = first_; + interval_type rest_interval = addend; + + this->add_front(rest_interval, it_); + this->add_main (rest_interval, it_, last_); + this->add_rear (rest_interval, it_); + return it_; + } + + iterator add_over(const interval_type& addend) + { + std::pair overlap = this->_set.equal_range(addend); + iterator first_ = overlap.first, + end_ = overlap.second, + last_ = end_; --last_; + + iterator it_ = first_; + interval_type rest_interval = addend; + + this->add_front(rest_interval, it_); + this->add_main (rest_interval, it_, last_); + this->add_rear (rest_interval, it_); + + return it_; + } + +} ; + + +//----------------------------------------------------------------------------- +// type traits +//----------------------------------------------------------------------------- +template +struct is_set > +{ + typedef is_set > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct is_interval_container > +{ + typedef is_interval_container > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct is_interval_splitter > +{ + typedef is_interval_splitter > type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +//----------------------------------------------------------------------------- +// type representation +//----------------------------------------------------------------------------- +template +struct type_to_string > +{ + static std::string apply() + { return "sp_itv_set<"+ type_to_string::apply() +">"; } +}; + + +}} // namespace icl boost + +#endif // BOOST_ICL_SPLIT_INTERVAL_SET_HPP_JOFA_990223 + + + diff --git a/3party/boost/boost/icl/type_traits/absorbs_identities.hpp b/3party/boost/boost/icl/type_traits/absorbs_identities.hpp new file mode 100644 index 0000000000..d1f6246e46 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/absorbs_identities.hpp @@ -0,0 +1,23 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_ABSORBS_IDENTITIES_HPP_JOFA_081004 +#define BOOST_ICL_TYPE_TRAITS_ABSORBS_IDENTITIES_HPP_JOFA_081004 + +namespace boost{ namespace icl +{ + template struct absorbs_identities + { + typedef absorbs_identities type; + BOOST_STATIC_CONSTANT(bool, value = false); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/adds_inversely.hpp b/3party/boost/boost/icl/type_traits/adds_inversely.hpp new file mode 100644 index 0000000000..29bfeda97b --- /dev/null +++ b/3party/boost/boost/icl/type_traits/adds_inversely.hpp @@ -0,0 +1,29 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_ADDS_INVERSELY_HPP_JOFA_100829 +#define BOOST_ICL_TYPE_TRAITS_ADDS_INVERSELY_HPP_JOFA_100829 + +#include +#include + +namespace boost{ namespace icl +{ + +template +struct adds_inversely +{ + typedef adds_inversely type; + BOOST_STATIC_CONSTANT(bool, + value = (mpl::and_, is_negative >::value)); +}; + +}} // namespace boost icl + +#endif // BOOST_ICL_TYPE_TRAITS_ADDS_INVERSELY_HPP_JOFA_100829 + + diff --git a/3party/boost/boost/icl/type_traits/codomain_type_of.hpp b/3party/boost/boost/icl/type_traits/codomain_type_of.hpp new file mode 100644 index 0000000000..885479429e --- /dev/null +++ b/3party/boost/boost/icl/type_traits/codomain_type_of.hpp @@ -0,0 +1,64 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_CODOMAIN_TYPE_OF_HPP_JOFA_100829 +#define BOOST_ICL_TYPE_TRAITS_CODOMAIN_TYPE_OF_HPP_JOFA_100829 + +#include +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + namespace detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(codomain_type) + } + + template + struct has_codomain_type + : mpl::bool_::value> + {}; + + template + struct get_codomain_type; + + template + struct get_codomain_type + { + typedef no_type type; + }; + + template + struct get_codomain_type + { + typedef typename Type::codomain_type type; + }; + + template + struct get_codomain_type + { + typedef typename Type::value_type type; + }; + + template + struct codomain_type_of + { + typedef typename + get_codomain_type< Type + , has_codomain_type::value + , is_std_set::value + >::type type; + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/difference.hpp b/3party/boost/boost/icl/type_traits/difference.hpp new file mode 100644 index 0000000000..ecb95bc62f --- /dev/null +++ b/3party/boost/boost/icl/type_traits/difference.hpp @@ -0,0 +1,19 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_DIFFERENCE_HPP_JOFA_080911 +#define BOOST_ICL_TYPE_TRAITS_DIFFERENCE_HPP_JOFA_080911 + +namespace boost{ namespace icl +{ + template struct difference{ typedef Type type; }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/difference_type_of.hpp b/3party/boost/boost/icl/type_traits/difference_type_of.hpp new file mode 100644 index 0000000000..9dd507979f --- /dev/null +++ b/3party/boost/boost/icl/type_traits/difference_type_of.hpp @@ -0,0 +1,64 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_DIFFERENCE_TYPE_OF_HPP_JOFA_080911 +#define BOOST_ICL_TYPE_TRAITS_DIFFERENCE_TYPE_OF_HPP_JOFA_080911 + +#include // For macro BOOST_STATIC_CONSTANT +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + //-------------------------------------------------------------------------- + template + struct has_difference + { + typedef has_difference type; + BOOST_STATIC_CONSTANT(bool, + value = (mpl::or_< is_numeric + , is_pointer >::value) + ); + }; + + //-------------------------------------------------------------------------- + template + struct get_difference_type; + + template + struct get_difference_type + { + typedef no_type type; + }; + + template + struct get_difference_type + { + typedef std::ptrdiff_t type; + }; + + template + struct get_difference_type + { + typedef Type type; + }; + + //-------------------------------------------------------------------------- + template + struct difference_type_of + { + typedef typename + get_difference_type::value>::type type; + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/domain_type_of.hpp b/3party/boost/boost/icl/type_traits/domain_type_of.hpp new file mode 100644 index 0000000000..cb2fa27146 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/domain_type_of.hpp @@ -0,0 +1,54 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_DOMAIN_TYPE_OF_HPP_JOFA_100902 +#define BOOST_ICL_TYPE_TRAITS_DOMAIN_TYPE_OF_HPP_JOFA_100902 + +#include +#include +#include + +namespace boost{ namespace icl +{ + namespace detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(domain_type) + } + + template + struct has_domain_type + : mpl::bool_::value> + {}; + + + template + struct get_domain_type; + + template + struct get_domain_type + { + typedef no_type type; + }; + + template + struct get_domain_type + { + typedef typename Type::domain_type type; + }; + + template + struct domain_type_of + { + typedef typename + get_domain_type::value>::type type; + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/element_type_of.hpp b/3party/boost/boost/icl/type_traits/element_type_of.hpp new file mode 100644 index 0000000000..5555bcec6e --- /dev/null +++ b/3party/boost/boost/icl/type_traits/element_type_of.hpp @@ -0,0 +1,112 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_ELEMENT_TYPE_OF_HPP_JOFA_100902 +#define BOOST_ICL_TYPE_TRAITS_ELEMENT_TYPE_OF_HPP_JOFA_100902 + +#include +#include +#include + +namespace boost{ namespace icl +{ + namespace detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(element_type) + BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type) + BOOST_MPL_HAS_XXX_TRAIT_DEF(key_type) + } + + //-------------------------------------------------------------------------- + template + struct has_element_type + : mpl::bool_::value> + {}; + + template + struct get_element_type; + + template + struct get_element_type + { + typedef no_type type; + }; + + template + struct get_element_type + { + typedef typename Type::element_type type; + }; + + template + struct element_type_of + { + typedef typename + get_element_type::value>::type type; + }; + + //-------------------------------------------------------------------------- + template + struct has_value_type + : mpl::bool_::value> + {}; + + template + struct get_value_type; + + template + struct get_value_type + { + typedef no_type type; + }; + + template + struct get_value_type + { + typedef typename Type::value_type type; + }; + + template + struct value_type_of + { + typedef typename + get_value_type::value>::type type; + }; + + //-------------------------------------------------------------------------- + template + struct has_key_type + : mpl::bool_::value> + {}; + + template + struct get_key_type; + + template + struct get_key_type + { + typedef no_type type; + }; + + template + struct get_key_type + { + typedef typename Type::key_type type; + }; + + template + struct key_type_of + { + typedef typename + get_key_type::value>::type type; + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/has_inverse.hpp b/3party/boost/boost/icl/type_traits/has_inverse.hpp new file mode 100644 index 0000000000..420e63861f --- /dev/null +++ b/3party/boost/boost/icl/type_traits/has_inverse.hpp @@ -0,0 +1,29 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_HAS_INVERSE_HPP_JOFA_090205 +#define BOOST_ICL_TYPE_TRAITS_HAS_INVERSE_HPP_JOFA_090205 + +#include +#include + +namespace boost{ namespace icl +{ + + template struct has_inverse + { + typedef has_inverse type; + BOOST_STATIC_CONSTANT(bool, + value = (type_traits::ice_or::value, + is_floating_point::value>::value)); + }; + +}} // namespace boost icl + +#endif // BOOST_ICL_TYPE_TRAITS_HAS_INVERSE_HPP_JOFA_090205 + + diff --git a/3party/boost/boost/icl/type_traits/has_set_semantics.hpp b/3party/boost/boost/icl/type_traits/has_set_semantics.hpp new file mode 100644 index 0000000000..3fdaaa74b5 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/has_set_semantics.hpp @@ -0,0 +1,35 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_HAS_SET_SEMANTICS_HPP_JOFA_100829 +#define BOOST_ICL_TYPE_TRAITS_HAS_SET_SEMANTICS_HPP_JOFA_100829 + +#include +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + template struct has_set_semantics + { + typedef has_set_semantics type; + BOOST_STATIC_CONSTANT(bool, + value = (mpl::or_< is_set + , mpl::and_< is_map + , has_set_semantics + ::type > + > + >::value)); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/identity_element.hpp b/3party/boost/boost/icl/type_traits/identity_element.hpp new file mode 100644 index 0000000000..13bb1f6146 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/identity_element.hpp @@ -0,0 +1,34 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IDENTITY_ELEMENT_HPP_JOFA_080912 +#define BOOST_ICL_TYPE_TRAITS_IDENTITY_ELEMENT_HPP_JOFA_080912 + +#include + +namespace boost{ namespace icl +{ + template struct identity_element + { + static Type value(); + Type operator()()const { return value(); } + }; + + template + inline Type identity_element::value() + { + return Type(); + } + + template<> + inline std::string unary_template_to_string::apply() { return "0"; } + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/infinity.hpp b/3party/boost/boost/icl/type_traits/infinity.hpp new file mode 100644 index 0000000000..7ef80abcc9 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/infinity.hpp @@ -0,0 +1,60 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_INFINITY_HPP_JOFA_100322 +#define BOOST_ICL_TYPE_TRAITS_INFINITY_HPP_JOFA_100322 + +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4127) // conditional expression is constant +#endif + + template struct numeric_infinity + { + typedef numeric_infinity type; + + static Type value() + { + BOOST_STATIC_ASSERT((is_numeric::value)); + if(std::numeric_limits::has_infinity) + return std::numeric_limits::infinity(); + else + return (std::numeric_limits::max)(); + } + }; + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + + + template struct infinity + { + typedef infinity type; + + static Type value() + { + return + mpl::if_, + numeric_infinity, + identity_element >::type::value(); + } + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/interval_type_default.hpp b/3party/boost/boost/icl/type_traits/interval_type_default.hpp new file mode 100644 index 0000000000..4f3aa094dc --- /dev/null +++ b/3party/boost/boost/icl/type_traits/interval_type_default.hpp @@ -0,0 +1,55 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_INTERVAL_TYPE_DEFAULT_HPP_JOFA_100403 +#define BOOST_ICL_TYPE_TRAITS_INTERVAL_TYPE_DEFAULT_HPP_JOFA_100403 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + + template + struct interval_type_default + { +#ifdef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS + typedef + typename mpl::if_< is_discrete +# ifdef BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT + , BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT +# else + , right_open_interval +# endif + +# ifdef BOOST_ICL_CONTINUOUS_STATIC_INTERVAL_DEFAULT + , BOOST_ICL_CONTINUOUS_STATIC_INTERVAL_DEFAULT +# else + , right_open_interval +# endif + >::type type; +#else + typedef + typename mpl::if_< is_discrete + , discrete_interval + , continuous_interval >::type type; +#endif + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/interval_type_of.hpp b/3party/boost/boost/icl/type_traits/interval_type_of.hpp new file mode 100644 index 0000000000..3e46fe7641 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/interval_type_of.hpp @@ -0,0 +1,53 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_INTERVAL_TYPE_OF_HPP_JOFA_100910 +#define BOOST_ICL_TYPE_TRAITS_INTERVAL_TYPE_OF_HPP_JOFA_100910 + +#include +#include +#include + +namespace boost{ namespace icl +{ + namespace detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(interval_type) + } + + template + struct has_interval_type + : mpl::bool_::value> + {}; + + template + struct get_interval_type; + + template + struct get_interval_type + { + typedef no_type type; + }; + + template + struct get_interval_type + { + typedef typename Type::interval_type type; + }; + + template + struct interval_type_of + { + typedef typename + get_interval_type::value>::type type; + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_associative_element_container.hpp b/3party/boost/boost/icl/type_traits/is_associative_element_container.hpp new file mode 100644 index 0000000000..004da9035b --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_associative_element_container.hpp @@ -0,0 +1,32 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_100831 +#define BOOST_ICL_TYPE_TRAITS_IS_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_100831 + +#include +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + template + struct is_associative_element_container + { + typedef is_associative_element_container type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_, is_element_map >::value)); + }; + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_asymmetric_interval.hpp b/3party/boost/boost/icl/type_traits/is_asymmetric_interval.hpp new file mode 100644 index 0000000000..bda6b8b389 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_asymmetric_interval.hpp @@ -0,0 +1,54 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_ASYMMETRIC_INTERVAL_HPP_JOFA_100327 +#define BOOST_ICL_TYPE_TRAITS_IS_ASYMMETRIC_INTERVAL_HPP_JOFA_100327 + +#include + +namespace boost{ namespace icl +{ + +template struct is_asymmetric_interval +{ + typedef is_asymmetric_interval type; + BOOST_STATIC_CONSTANT(bool, + value = (mpl::and_< + is_interval + , has_static_bounds + , has_asymmetric_bounds + >::value) + ); +}; + +template struct is_continuous_asymmetric +{ + typedef is_continuous_asymmetric type; + BOOST_STATIC_CONSTANT(bool, + value = (mpl::and_< + is_asymmetric_interval + , is_continuous >::type> + >::value) + ); +}; + +template struct is_discrete_asymmetric +{ + typedef is_discrete_asymmetric type; + BOOST_STATIC_CONSTANT(bool, + value = (mpl::and_< + is_asymmetric_interval + , mpl::not_ >::type> > + >::value) + ); +}; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_combinable.hpp b/3party/boost/boost/icl/type_traits/is_combinable.hpp new file mode 100644 index 0000000000..5d607246cb --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_combinable.hpp @@ -0,0 +1,568 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_IS_COMBINABLE_HPP_JOFA_090115 +#define BOOST_ICL_IS_COMBINABLE_HPP_JOFA_090115 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost{namespace icl +{ + +template +struct is_overloadable +{ + typedef is_overloadable type; + BOOST_STATIC_CONSTANT(bool, value = + (is_same::value) + ); +}; + + +//------------------------------------------------------------------------------ +template +struct is_codomain_equal +{ + typedef is_codomain_equal type; + BOOST_STATIC_CONSTANT(bool, value = + (is_same::value) + ); +}; + +//NOTE: Equality of compare order implies the equality of the domain_types +template +struct is_key_compare_equal +{ + typedef is_key_compare_equal type; + BOOST_STATIC_CONSTANT(bool, value = + (is_same::value) + ); +}; + +template +struct is_codomain_type_equal +{ + typedef is_codomain_type_equal type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_, + is_codomain_equal >::value) + ); +}; + + +// For equal containers concepts, domain order and codomain type must match. +templateclass IsConcept, class LeftT, class RightT> +struct is_concept_compatible +{ + typedef is_concept_compatible type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_< + IsConcept + , IsConcept + , is_codomain_type_equal + >::value) + ); +}; + +templateclass LeftConcept, + templateclass RightConcept, + class LeftT, class RightT> +struct is_concept_combinable +{ + typedef is_concept_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_< + LeftConcept + , RightConcept + , is_key_compare_equal + >::value) + ); +}; + +template +struct is_intra_combinable +{ + typedef is_intra_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_< + is_concept_compatible + , is_concept_compatible + >::value) + ); +}; + +//------------------------------------------------------------------------------ + + +//------------------------------------------------------------------------------ +template +struct is_cross_combinable +{ + typedef is_cross_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_< + is_concept_combinable + , is_concept_combinable + >::value) + ); +}; + +template +struct is_inter_combinable +{ + typedef is_inter_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_, + is_cross_combinable >::value) + ); +}; + +//------------------------------------------------------------------------------ +// is_fragment_of +//------------------------------------------------------------------------------ +template +struct is_fragment_of +{ + typedef is_fragment_of type; + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_fragment_of +{ + typedef is_fragment_of type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct is_fragment_of +{ + typedef is_fragment_of type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +//------------------------------------------------------------------------------ +// is_key_of +//------------------------------------------------------------------------------ +template +struct is_key_of +{ + typedef is_key_of type; + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_key_of +{ + typedef is_key_of type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +template +struct is_key_of +{ + typedef is_key_of type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +//------------------------------------------------------------------------------ +// is_interval_set_derivative +//------------------------------------------------------------------------------ +template +struct is_interval_set_derivative; + +template +struct is_interval_set_derivative +{ + typedef is_interval_set_derivative type; + BOOST_STATIC_CONSTANT(bool, value = (is_interval_container::value)); +}; + +template +struct is_interval_set_derivative +{ + typedef is_interval_set_derivative type; + BOOST_STATIC_CONSTANT(bool, value = (is_interval_container::value)); +}; + +template +struct is_interval_set_derivative +{ + typedef is_interval_set_derivative type; + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +//------------------------------------------------------------------------------ +// is_interval_map_derivative +//------------------------------------------------------------------------------ +template +struct is_interval_map_derivative; + +template +struct is_interval_map_derivative +{ + typedef is_interval_map_derivative type; + BOOST_STATIC_CONSTANT(bool, value = (is_interval_container::value)); +}; + +template +struct is_interval_map_derivative +{ + typedef is_interval_map_derivative type; + BOOST_STATIC_CONSTANT(bool, value = (is_interval_container::value)); +}; + +template +struct is_interval_map_derivative +{ + typedef is_interval_map_derivative type; + BOOST_STATIC_CONSTANT(bool, value = (is_interval_container::value)); +}; + +template +struct is_interval_map_derivative +{ + typedef is_interval_map_derivative type; + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +//------------------------------------------------------------------------------ +// is_intra_derivative +//------------------------------------------------------------------------------ +template +struct is_intra_derivative +{ + typedef is_intra_derivative type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_ + < + mpl::and_, + is_interval_set_derivative > + , mpl::and_, + is_interval_map_derivative > + >::value) + ); +}; + +template +struct is_cross_derivative +{ + typedef is_cross_derivative type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_< + is_interval_map + , is_interval_set_derivative + >::value) + ); +}; + +template +struct is_inter_derivative +{ + typedef is_inter_derivative type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_< + is_intra_derivative + , is_cross_derivative + >::value) + ); +}; + +//------------------------------------------------------------------------------ +//- right combinable +//------------------------------------------------------------------------------ + +template +struct is_interval_set_right_combinable +{ + typedef is_interval_set_right_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_ + < + is_interval_set + , mpl::or_ + < + is_interval_set_derivative + , is_concept_compatible + > + >::value) + ); +}; + +template +struct is_interval_map_right_intra_combinable //NOTE equivalent to is_fragment_type_of +{ + typedef is_interval_map_right_intra_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_ + < + is_interval_map + , mpl::or_ + < + is_interval_map_derivative + , is_concept_compatible + > + >::value) + ); +}; + +template +struct is_interval_map_right_cross_combinable //NOTE equivalent to key_type_of +{ + typedef is_interval_map_right_cross_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_ + < + is_interval_map + , mpl::or_ + < + is_cross_derivative + , is_concept_combinable + > + >::value) + ); +}; + +template +struct is_interval_map_right_inter_combinable +{ + typedef is_interval_map_right_inter_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_< + is_interval_map_right_intra_combinable + , is_interval_map_right_cross_combinable + >::value) + ); +}; + + +template +struct is_right_intra_combinable +{ + typedef is_right_intra_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_ + < + is_interval_set_right_combinable + , is_interval_map_right_intra_combinable + >::value) + ); +}; + +template +struct is_right_inter_combinable +{ + typedef is_right_inter_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_ + < + is_interval_set_right_combinable + , is_interval_map_right_inter_combinable + >::value) + ); +}; + +template +struct combines_right_to_interval_set +{ + typedef combines_right_to_interval_set type; + BOOST_STATIC_CONSTANT(bool, value = + (is_concept_combinable::value) + ); +}; + +template +struct combines_right_to_interval_map +{ + typedef combines_right_to_interval_map type; + BOOST_STATIC_CONSTANT(bool, value = + (is_concept_compatible::value) ); +}; + +template +struct combines_right_to_interval_container +{ + typedef combines_right_to_interval_container type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_, + combines_right_to_interval_map >::value) + ); +}; + + + +//------------------------------------------------------------------------------ +//- segmentational_fineness +//------------------------------------------------------------------------------ +template struct unknown_fineness +{ + typedef unknown_fineness type; + static const int value = 0; +}; + +template struct known_fineness +{ + typedef known_fineness type; + static const int value = Type::fineness; +}; + +templatestruct segmentational_fineness +{ + typedef segmentational_fineness type; + static const int value = + mpl::if_, + known_fineness, + unknown_fineness + >::type::value; +}; + + +//------------------------------------------------------------------------------ +// is_interval_set_companion +//------------------------------------------------------------------------------ + +// CompanionT is either an interval_set or a derivative of set level: +// element_type=domain_type, segment_type=interval_type +template struct is_interval_set_companion +{ + typedef is_interval_set_companion type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_ + < + combines_right_to_interval_set + , is_interval_set_derivative + >::value) + ); +}; + + +//------------------------------------------------------------------------------ +// is_interval_map_companion +//------------------------------------------------------------------------------ + +template struct is_interval_map_companion +{ + typedef is_interval_map_companion type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_ + < + combines_right_to_interval_map + , is_interval_map_derivative + >::value) + ); +}; + + +//------------------------------------------------------------------------------ +//- is_coarser_interval_{set,map}_companion +//------------------------------------------------------------------------------ +template +struct is_coarser_interval_set_companion +{ + typedef is_coarser_interval_set_companion type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_ + < + is_interval_set_companion + , mpl::bool_<( segmentational_fineness::value + > segmentational_fineness::value)> + >::value) + ); +}; + +template +struct is_coarser_interval_map_companion +{ + typedef is_coarser_interval_map_companion type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_ + < + is_interval_map_companion + , mpl::bool_<( segmentational_fineness::value + > segmentational_fineness::value)> + >::value) + ); +}; + +//------------------------------------------------------------------------------ +// is_binary_interval_{set,map}_combinable +//------------------------------------------------------------------------------ +template +struct is_binary_interval_set_combinable +{ + typedef is_binary_interval_set_combinable type; + static const int value = + mpl::and_< is_interval_set + , is_coarser_interval_set_companion + >::value; +}; + +template +struct is_binary_interval_map_combinable +{ + typedef is_binary_interval_map_combinable type; + static const int value = + mpl::and_< is_interval_map + , is_coarser_interval_map_companion + >::value; +}; + +template +struct is_binary_intra_combinable +{ + typedef is_binary_intra_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_, + is_binary_interval_map_combinable + >::value) + ); +}; + +template +struct is_binary_cross_combinable +{ + typedef is_binary_cross_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_ + < is_interval_map + , mpl::or_< is_coarser_interval_map_companion + , is_interval_set_companion > + >::value) + ); +}; + +template +struct is_binary_inter_combinable +{ + typedef is_binary_inter_combinable type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_ + < + mpl::and_, + is_binary_cross_combinable > + , mpl::and_, + is_binary_intra_combinable > + >::value) + ); +}; + + +}} // namespace icl boost + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_concept_equivalent.hpp b/3party/boost/boost/icl/type_traits/is_concept_equivalent.hpp new file mode 100644 index 0000000000..0cf61a7b70 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_concept_equivalent.hpp @@ -0,0 +1,38 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_CONCEPT_EQUIVALENT_HPP_JOFA_090830 +#define BOOST_ICL_TYPE_TRAITS_IS_CONCEPT_EQUIVALENT_HPP_JOFA_090830 + +#include + +namespace boost{ namespace icl +{ + + templateclass IsConcept, class LeftT, class RightT> + struct is_concept_equivalent + { + typedef is_concept_equivalent type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_, IsConcept >::value) + ); + }; + + templateclass IsConcept, class LeftT, class RightT> + struct has_same_concept + { + typedef has_same_concept type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_, is_concept_equivalent >::value) + ); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_container.hpp b/3party/boost/boost/icl/type_traits/is_container.hpp new file mode 100644 index 0000000000..6f08b70598 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_container.hpp @@ -0,0 +1,56 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_CONTAINER_HPP_JOFA_100828 +#define BOOST_ICL_TYPE_TRAITS_IS_CONTAINER_HPP_JOFA_100828 + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + namespace detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator) + BOOST_MPL_HAS_XXX_TRAIT_DEF(size_type) + BOOST_MPL_HAS_XXX_TRAIT_DEF(reference) + } + + template + struct is_container + : mpl::bool_< + detail::has_value_type::value && + detail::has_iterator::value && + detail::has_size_type::value && + detail::has_reference::value> + {}; + + template + struct is_std_set + { + typedef is_std_set type; + BOOST_STATIC_CONSTANT(bool, + value = (mpl::and_< is_container + , detail::has_key_type + , is_same< typename key_type_of::type + , typename value_type_of::type > + , mpl::not_ > + >::value ) + ); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_continuous.hpp b/3party/boost/boost/icl/type_traits/is_continuous.hpp new file mode 100644 index 0000000000..4341326aa8 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_continuous.hpp @@ -0,0 +1,28 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_CONTINUOUS_HPP_JOFA_080910 +#define BOOST_ICL_TYPE_TRAITS_IS_CONTINUOUS_HPP_JOFA_080910 + +#include +#include +#include + +namespace boost{ namespace icl +{ + template struct is_continuous + { + typedef is_continuous type; + BOOST_STATIC_CONSTANT(bool, + value = mpl::not_ >::value); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_continuous_interval.hpp b/3party/boost/boost/icl/type_traits/is_continuous_interval.hpp new file mode 100644 index 0000000000..9bb76b836a --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_continuous_interval.hpp @@ -0,0 +1,26 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_CONTINUOUS_INTERVAL_HPP_JOFA_100331 +#define BOOST_ICL_TYPE_TRAITS_IS_CONTINUOUS_INTERVAL_HPP_JOFA_100331 + +#include + +namespace boost{ namespace icl +{ + +template struct is_continuous_interval +{ + typedef is_continuous_interval type; + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_discrete.hpp b/3party/boost/boost/icl/type_traits/is_discrete.hpp new file mode 100644 index 0000000000..8c716e96b7 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_discrete.hpp @@ -0,0 +1,46 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_DISCRETE_HPP_JOFA_100410 +#define BOOST_ICL_TYPE_TRAITS_IS_DISCRETE_HPP_JOFA_100410 + +#include +#include // For macro BOOST_STATIC_CONSTANT +#include +#include + +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used +#endif + +#include + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include +#include + +namespace boost{ namespace icl +{ + template struct is_discrete + { + typedef is_discrete type; + BOOST_STATIC_CONSTANT(bool, + value = (mpl::and_< boost::detail::is_incrementable + , mpl::not_ > + >::value) + ); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_discrete_interval.hpp b/3party/boost/boost/icl/type_traits/is_discrete_interval.hpp new file mode 100644 index 0000000000..38c2ee9f26 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_discrete_interval.hpp @@ -0,0 +1,26 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_DISCRETE_INTERVAL_HPP_JOFA_100327 +#define BOOST_ICL_TYPE_TRAITS_IS_DISCRETE_INTERVAL_HPP_JOFA_100327 + +#include + +namespace boost{ namespace icl +{ + +template struct is_discrete_interval +{ + typedef is_discrete_interval type; + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_element_container.hpp b/3party/boost/boost/icl/type_traits/is_element_container.hpp new file mode 100644 index 0000000000..6ffbe9cf07 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_element_container.hpp @@ -0,0 +1,53 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_ELEMENT_CONTAINER_HPP_JOFA_090830 +#define BOOST_ICL_TYPE_TRAITS_IS_ELEMENT_CONTAINER_HPP_JOFA_090830 + +#include +#include +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + template + struct is_element_map + { + typedef is_element_map type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_, mpl::not_ > >::value) + ); + }; + + template + struct is_element_set + { + typedef is_element_set type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_< mpl::and_< is_set + , mpl::not_ > > + , is_std_set + >::value) + ); + }; + + template + struct is_element_container + { + typedef is_element_container type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_, is_element_map >::value) + ); + }; +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_icl_container.hpp b/3party/boost/boost/icl/type_traits/is_icl_container.hpp new file mode 100644 index 0000000000..1d66cde3d5 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_icl_container.hpp @@ -0,0 +1,33 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_ICL_CONTAINER_HPP_JOFA_100831 +#define BOOST_ICL_TYPE_TRAITS_IS_ICL_CONTAINER_HPP_JOFA_100831 + +#include +#include +#include +#include +#include +#include + +namespace boost{ namespace icl +{ + template + struct is_icl_container + { + typedef is_icl_container type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_< is_element_container + , is_interval_container >::value)); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_interval.hpp b/3party/boost/boost/icl/type_traits/is_interval.hpp new file mode 100644 index 0000000000..682c617be9 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_interval.hpp @@ -0,0 +1,171 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_HPP_JOFA_100327 +#define BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_HPP_JOFA_100327 + +#include +#include +#include + +namespace boost{ namespace icl +{ + +template +struct interval_bound_type +{ + typedef interval_bound_type type; + BOOST_STATIC_CONSTANT(bound_type, value = (interval_bounds::undefined)); +}; + +template struct is_interval +{ + typedef is_interval type; + BOOST_STATIC_CONSTANT(bool, + value = ((interval_bound_type::value) < interval_bounds::undefined)); +}; + + +template struct has_static_bounds +{ + typedef has_static_bounds type; + BOOST_STATIC_CONSTANT(bool, + value = ((interval_bound_type::value) < interval_bounds::dynamic)); +}; + +template struct has_dynamic_bounds +{ + typedef has_dynamic_bounds type; + BOOST_STATIC_CONSTANT(bool, + value = (interval_bound_type::value == interval_bounds::dynamic)); +}; + +template struct has_asymmetric_bounds +{ + typedef has_asymmetric_bounds type; + BOOST_STATIC_CONSTANT(bound_type, bounds = (interval_bound_type::value)); + BOOST_STATIC_CONSTANT(bool, + value = ( bounds == interval_bounds::static_left_open + || bounds == interval_bounds::static_right_open)); +}; + +template struct has_symmetric_bounds +{ + typedef has_symmetric_bounds type; + BOOST_STATIC_CONSTANT(bound_type, bounds = (interval_bound_type::value)); + BOOST_STATIC_CONSTANT(bool, + value = ( bounds == interval_bounds::static_closed + || bounds == interval_bounds::static_open)); +}; + +//------------------------------------------------------------------------------ +template struct is_discrete_static +{ + typedef is_discrete_static type; + typedef typename interval_traits::domain_type domain_type; + BOOST_STATIC_CONSTANT(bool, + value = (mpl::and_< has_static_bounds + , is_discrete >::value) ); +}; + +//------------------------------------------------------------------------------ +template struct is_continuous_static +{ + typedef is_continuous_static type; + typedef typename interval_traits::domain_type domain_type; + BOOST_STATIC_CONSTANT(bool, + value = (mpl::and_< has_static_bounds + , is_continuous + , has_asymmetric_bounds >::value) ); +}; + +//------------------------------------------------------------------------------ +template struct is_static_right_open +{ + typedef is_static_right_open type; + BOOST_STATIC_CONSTANT(bool, + value = (interval_bound_type::value == interval_bounds::static_right_open)); +}; + +template struct is_static_left_open +{ + typedef is_static_left_open type; + BOOST_STATIC_CONSTANT(bool, + value = (interval_bound_type::value == interval_bounds::static_left_open)); +}; + +template struct is_static_open +{ + typedef is_static_open type; + BOOST_STATIC_CONSTANT(bool, + value = (interval_bound_type::value == interval_bounds::static_open)); +}; + +template struct is_static_closed +{ + typedef is_static_closed type; + BOOST_STATIC_CONSTANT(bool, + value = (interval_bound_type::value == interval_bounds::static_closed)); +}; + +template struct is_discrete_static_closed +{ + typedef is_static_closed type; + typedef typename interval_traits::domain_type domain_type; + + BOOST_STATIC_CONSTANT( bool, + value = (mpl::and_< is_static_closed + , is_discrete >::value) ); +}; + +template struct is_discrete_static_open +{ + typedef is_static_closed type; + typedef typename interval_traits::domain_type domain_type; + + BOOST_STATIC_CONSTANT( bool, + value = (mpl::and_< is_static_open + , is_discrete >::value) ); +}; + +//------------------------------------------------------------------------------ +template struct is_continuous_right_open +{ + typedef is_continuous_right_open type; + typedef typename interval_traits::domain_type domain_type; + BOOST_STATIC_CONSTANT(bool, + value = (mpl::and_, is_continuous >::value)); +}; + +template struct is_continuous_left_open +{ + typedef is_continuous_left_open type; + typedef typename interval_traits::domain_type domain_type; + BOOST_STATIC_CONSTANT(bool, + value = (mpl::and_, is_continuous >::value)); +}; + +//------------------------------------------------------------------------------ + +template struct is_singelizable +{ + typedef is_singelizable type; + typedef typename interval_traits::domain_type domain_type; + + BOOST_STATIC_CONSTANT(bool, + value = + (mpl::or_< has_dynamic_bounds + , is_discrete + >::value) + ); +}; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_interval_container.hpp b/3party/boost/boost/icl/type_traits/is_interval_container.hpp new file mode 100644 index 0000000000..e612d63f60 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_interval_container.hpp @@ -0,0 +1,47 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_CONTAINER_HPP_JOFA_081004 +#define BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_CONTAINER_HPP_JOFA_081004 + +#include +#include +#include + +namespace boost{ namespace icl +{ + template struct is_interval_container + { + typedef is_interval_container type; + BOOST_STATIC_CONSTANT(bool, value = false); + }; + + template + struct is_interval_map + { + typedef is_interval_map type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_, is_map >::value) + ); + }; + + template + struct is_interval_set + { + typedef is_interval_set type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_< is_interval_container, + mpl::not_ > >::value) + ); + }; + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_interval_joiner.hpp b/3party/boost/boost/icl/type_traits/is_interval_joiner.hpp new file mode 100644 index 0000000000..747edbc23a --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_interval_joiner.hpp @@ -0,0 +1,25 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_JOINER_HPP_JOFA_100901 +#define BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_JOINER_HPP_JOFA_100901 + +#include + +namespace boost{ namespace icl +{ + template struct is_interval_joiner + { + typedef is_interval_joiner type; + BOOST_STATIC_CONSTANT(bool, value = false); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_interval_separator.hpp b/3party/boost/boost/icl/type_traits/is_interval_separator.hpp new file mode 100644 index 0000000000..dedd246c6f --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_interval_separator.hpp @@ -0,0 +1,23 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_SEPARATOR_HPP_JOFA_081004 +#define BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_SEPARATOR_HPP_JOFA_081004 + +namespace boost{ namespace icl +{ + template struct is_interval_separator + { + typedef is_interval_separator type; + BOOST_STATIC_CONSTANT(bool, value = false); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_interval_splitter.hpp b/3party/boost/boost/icl/type_traits/is_interval_splitter.hpp new file mode 100644 index 0000000000..77528ab093 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_interval_splitter.hpp @@ -0,0 +1,25 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_SPLITTER_HPP_JOFA_081004 +#define BOOST_ICL_TYPE_TRAITS_IS_INTERVAL_SPLITTER_HPP_JOFA_081004 + +#include + +namespace boost{ namespace icl +{ + template struct is_interval_splitter + { + typedef is_interval_splitter type; + BOOST_STATIC_CONSTANT(bool, value = false); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_key_container_of.hpp b/3party/boost/boost/icl/type_traits/is_key_container_of.hpp new file mode 100644 index 0000000000..a348eb25ad --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_key_container_of.hpp @@ -0,0 +1,88 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_KEY_CONTAINER_OF_HPP_JOFA_100829 +#define BOOST_ICL_TYPE_TRAITS_IS_KEY_CONTAINER_OF_HPP_JOFA_100829 + +#include +#include + +namespace boost{ namespace icl +{ + //-------------------------------------------------------------------------- + namespace detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(key_object_type) + } + + //-------------------------------------------------------------------------- + template + struct has_key_object_type + : mpl::bool_::value> + {}; + + template + struct get_key_object_type; + + template + struct get_key_object_type + { + typedef Type no_type; + }; + + template + struct get_key_object_type + { + typedef Type type; + }; + + template + struct get_key_object_type + { + typedef typename Type::key_object_type type; + }; + + template + struct key_container_type_of + { + typedef typename + get_key_object_type + < Type + , has_key_object_type::value + , mpl::or_, is_map >::value + >::type type; + }; + + //-------------------------------------------------------------------------- + template + struct is_strict_key_container_of // set is_strict_key_container_of map + { + typedef is_strict_key_container_of type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::and_< is_map + , is_same::type> >::value) + ); + }; + + template + struct is_key_container_of // set is_key_container_of (set or map) + { + typedef is_key_container_of type; + BOOST_STATIC_CONSTANT(bool, value = + (mpl::or_< is_strict_key_container_of + , mpl::and_< mpl::or_, is_map > + , is_same > >::value) + ); + }; + + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_map.hpp b/3party/boost/boost/icl/type_traits/is_map.hpp new file mode 100644 index 0000000000..49fe0f9e35 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_map.hpp @@ -0,0 +1,25 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_MAP_HPP_JOFA_081107 +#define BOOST_ICL_TYPE_TRAITS_IS_MAP_HPP_JOFA_081107 + +#include + +namespace boost{ namespace icl +{ + template struct is_map + { + typedef is_map type; + BOOST_STATIC_CONSTANT(bool, value = false); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_numeric.hpp b/3party/boost/boost/icl/type_traits/is_numeric.hpp new file mode 100644 index 0000000000..daa65df432 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_numeric.hpp @@ -0,0 +1,54 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_NUMERIC_HPP_JOFA_100322 +#define BOOST_ICL_TYPE_TRAITS_IS_NUMERIC_HPP_JOFA_100322 + +#include +#include + +namespace boost{ namespace icl +{ + +template struct is_numeric +{ + typedef is_numeric type; + BOOST_STATIC_CONSTANT(bool, value = (0 < std::numeric_limits::digits)); +}; + +template +struct is_numeric > +{ + typedef is_numeric type; + BOOST_STATIC_CONSTANT(bool, value = true); +}; + +//-------------------------------------------------------------------------- +template struct numeric_minimum; + +template +struct numeric_minimum +{ + static bool is_less_than(Type){ return true; } + static bool is_less_than_or(Type, bool){ return true; } +}; + +template +struct numeric_minimum +{ + static bool is_less_than(Type value) + { return (std::numeric_limits::min)() < value; } + + static bool is_less_than_or(Type value, bool cond) + { return cond || is_less_than(value); } +}; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_set.hpp b/3party/boost/boost/icl/type_traits/is_set.hpp new file mode 100644 index 0000000000..7347929a01 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_set.hpp @@ -0,0 +1,26 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_SET_HPP_JOFA_081004 +#define BOOST_ICL_TYPE_TRAITS_IS_SET_HPP_JOFA_081004 + +#include +#include + +namespace boost{ namespace icl +{ + template struct is_set + { + typedef is_set type; + BOOST_STATIC_CONSTANT(bool, value = is_std_set::value); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/is_total.hpp b/3party/boost/boost/icl/type_traits/is_total.hpp new file mode 100644 index 0000000000..bc9b2d6190 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/is_total.hpp @@ -0,0 +1,23 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_IS_TOTAL_HPP_JOFA_081004 +#define BOOST_ICL_TYPE_TRAITS_IS_TOTAL_HPP_JOFA_081004 + +namespace boost{ namespace icl +{ + template struct is_total + { + typedef is_total type; + BOOST_STATIC_CONSTANT(bool, value = false); + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/no_type.hpp b/3party/boost/boost/icl/type_traits/no_type.hpp new file mode 100644 index 0000000000..73e464f28b --- /dev/null +++ b/3party/boost/boost/icl/type_traits/no_type.hpp @@ -0,0 +1,19 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_NO_TYPE_HPP_JOFA_100902 +#define BOOST_ICL_TYPE_TRAITS_NO_TYPE_HPP_JOFA_100902 + +namespace boost{ namespace icl +{ + struct no_type{}; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/predicate.hpp b/3party/boost/boost/icl/type_traits/predicate.hpp new file mode 100644 index 0000000000..405c643363 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/predicate.hpp @@ -0,0 +1,44 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2010-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_PREDICATE_HPP_JOFA_101102 +#define BOOST_ICL_TYPE_TRAITS_PREDICATE_HPP_JOFA_101102 + +#include + +namespace boost{namespace icl +{ + // naming convention + // predicate: n-ary predicate + // property: unary predicate + // relation: binary predicate + + // Unary predicates + + template + class property : public std::unary_function{}; + + template + class member_property : public property + { + public: + member_property( bool(Type::* pred)()const ): property(), m_pred(pred){} + bool operator()(const Type& x)const { return (x.*m_pred)(); } + private: + bool(Type::* m_pred)()const; + } ; + + // Binary predicates: relations + + template + class relation : public std::binary_function{}; + + +}} // namespace icl boost + +#endif + diff --git a/3party/boost/boost/icl/type_traits/segment_type_of.hpp b/3party/boost/boost/icl/type_traits/segment_type_of.hpp new file mode 100644 index 0000000000..21438ae38a --- /dev/null +++ b/3party/boost/boost/icl/type_traits/segment_type_of.hpp @@ -0,0 +1,53 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_SEGMENT_TYPE_OF_HPP_JOFA_100902 +#define BOOST_ICL_TYPE_TRAITS_SEGMENT_TYPE_OF_HPP_JOFA_100902 + +#include +#include +#include + +namespace boost{ namespace icl +{ + namespace detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(segment_type) + } + + template + struct has_segment_type + : mpl::bool_::value> + {}; + + template + struct get_segment_type; + + template + struct get_segment_type + { + typedef no_type type; + }; + + template + struct get_segment_type + { + typedef typename Type::segment_type type; + }; + + template + struct segment_type_of + { + typedef typename + get_segment_type::value>::type type; + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/size.hpp b/3party/boost/boost/icl/type_traits/size.hpp new file mode 100644 index 0000000000..4fdc781745 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/size.hpp @@ -0,0 +1,18 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_SIZE_HPP_JOFA_080911 +#define BOOST_ICL_TYPE_TRAITS_SIZE_HPP_JOFA_080911 + +namespace boost{ namespace icl +{ + template struct size{ typedef std::size_t type; }; +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/size_type_of.hpp b/3party/boost/boost/icl/type_traits/size_type_of.hpp new file mode 100644 index 0000000000..06855bfb6e --- /dev/null +++ b/3party/boost/boost/icl/type_traits/size_type_of.hpp @@ -0,0 +1,18 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_SIZE_TYPE_OF_HPP_JOFA_080911 +#define BOOST_ICL_TYPE_TRAITS_SIZE_TYPE_OF_HPP_JOFA_080911 + +namespace boost{ namespace icl +{ + template struct size_type_of{ typedef std::size_t type; }; +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/succ_pred.hpp b/3party/boost/boost/icl/type_traits/succ_pred.hpp new file mode 100644 index 0000000000..b422244b79 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/succ_pred.hpp @@ -0,0 +1,23 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_SUCC_PRED_HPP_JOFA_080913 +#define BOOST_ICL_TYPE_TRAITS_SUCC_PRED_HPP_JOFA_080913 + +namespace boost{ namespace icl +{ + template + inline static IncrementableT succ(IncrementableT x) { return ++x; } + + template + inline static DecrementableT pred(DecrementableT x) { return --x; } + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/to_string.hpp b/3party/boost/boost/icl/type_traits/to_string.hpp new file mode 100644 index 0000000000..4548c56dee --- /dev/null +++ b/3party/boost/boost/icl/type_traits/to_string.hpp @@ -0,0 +1,43 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------- +Function-templates for discrete Datatypes like int, unsigned or + any class that provides a ++ operator c.f. iterators +-----------------------------------------------------------------------------*/ + +#ifndef BOOST_ICL_TO_STRING_HPP_JOFA_000712 +#define BOOST_ICL_TO_STRING_HPP_JOFA_000712 + +#include +#include +#include + +namespace boost{ namespace icl +{ + +/// Static class template for the string representation of values +template +struct to_string +{ + /** Converts all values of types to std::string that implement an operator << */ + static std::string apply(const Type& value) + { + std::stringstream repr; + repr << value; + return repr.str(); + } +}; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/type_to_string.hpp b/3party/boost/boost/icl/type_traits/type_to_string.hpp new file mode 100644 index 0000000000..80c473a4a1 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/type_to_string.hpp @@ -0,0 +1,85 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2007-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TO_STRING_HPP_JOFA_080416 +#define BOOST_ICL_TYPE_TO_STRING_HPP_JOFA_080416 + +#include +#include +#include + +#include +#include +#include + +namespace boost{ namespace icl +{ + //-------------------------------------------------------------------------- + template + struct type_to_string + { + /** Convert the type to it's typestring */ + static std::string apply(); + }; + + + //-------------------------------------------------------------------------- + template<>inline std::string type_to_string::apply() { return "bool"; } + template<>inline std::string type_to_string::apply() { return "char"; } + template<>inline std::string type_to_string::apply(){ return "short"; } + template<>inline std::string type_to_string::apply() { return "int"; } + template<>inline std::string type_to_string::apply() { return "long"; } + template<>inline std::string type_to_string::apply(){ return "Long"; } + + template<>inline std::string type_to_string::apply(){ return "char+"; } + template<>inline std::string type_to_string::apply(){ return "short+"; } + template<>inline std::string type_to_string::apply() { return "int+"; } + template<>inline std::string type_to_string::apply() { return "long+"; } + template<>inline std::string type_to_string::apply(){ return "Long+"; } + + template<>inline std::string type_to_string::apply() { return "flt"; } + template<>inline std::string type_to_string::apply() { return "dbl"; } + template<>inline std::string type_to_string::apply() { return "string"; } + + //------------------------------------------------------------------------- + template class Templ> + struct unary_template_to_string + { + static std::string apply(); + }; + + template class Unary, class Type> + struct type_to_string > + { + static std::string to_string() + { + return unary_template_to_string::apply()+"<"+type_to_string::apply()+">"; + } + }; + + // --------------------------------------------------------------------------- + templateclass Templ> + struct binary_template_to_string + { + static std::string apply(); + }; + + template class Binary, class Type1, class Type2> + struct type_to_string > + { + static std::string apply() + { + return binary_template_to_string::apply()+ + "<"+type_to_string::apply()+","+type_to_string::apply()+">"; + } + }; + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/unit_element.hpp b/3party/boost/boost/icl/type_traits/unit_element.hpp new file mode 100644 index 0000000000..da9fa7806e --- /dev/null +++ b/3party/boost/boost/icl/type_traits/unit_element.hpp @@ -0,0 +1,38 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2010: Joachim Faulhaber ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_TYPE_TRAITS_UNIT_ELEMENT_HPP_JOFA_080912 +#define BOOST_ICL_TYPE_TRAITS_UNIT_ELEMENT_HPP_JOFA_080912 + +#include +#include +#include + +namespace boost{ namespace icl +{ + template struct unit_element{ static Type value(); }; + + template<> inline bool unit_element::value() { return true;} + template<> inline float unit_element::value() { return 1.0; } + template<> inline double unit_element::value() { return 1.0; } + template<> inline long double unit_element::value() + { return 1.0; } + + // Smallest 'visible' string that is greater than the empty string. + template <> + inline std::string unit_element::value() + { return std::string(" "); } + + template + inline Type unit_element::value() + { return icl::succ(identity_element::value()); } + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/icl/type_traits/value_size.hpp b/3party/boost/boost/icl/type_traits/value_size.hpp new file mode 100644 index 0000000000..4a37f11261 --- /dev/null +++ b/3party/boost/boost/icl/type_traits/value_size.hpp @@ -0,0 +1,52 @@ +/*-----------------------------------------------------------------------------+ +Copyright (c) 2008-2009: Joachim Faulhaber ++------------------------------------------------------------------------------+ +Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin ++------------------------------------------------------------------------------+ + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENCE.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) ++-----------------------------------------------------------------------------*/ +#ifndef BOOST_ICL_VALUE_SIZE_HPP_JOFA_081004 +#define BOOST_ICL_VALUE_SIZE_HPP_JOFA_081004 + +namespace boost{ namespace icl +{ + +template +Type abs(Type val) { return val < 0 ? -val : val; } + +/// static class template for the size of a type's value +/** This function is needed to be able to order values according + to their size. This is used to e.g. prefer simple test + instances and to express this simplicity independent of the + type of the test case. + + @author Joachim Faulhaber +*/ +template +struct value_size +{ + /** The size of a value is used to be able to order values according to + their simplicity */ + static std::size_t apply(const Type& val); +}; + + +template<> inline std::size_t value_size::apply(const int& value) +{ return abs(value); } + +template<> inline std::size_t value_size::apply(const double& value) +{ return static_cast(abs(value)); } + +template +inline std::size_t value_size::apply(const Type& value) +{ return icl::iterative_size(value); } + + + +}} // namespace boost icl + +#endif + + diff --git a/3party/boost/boost/interprocess/containers/containers_fwd.hpp b/3party/boost/boost/interprocess/containers/containers_fwd.hpp index fb7d4ab637..9afa848b8c 100644 --- a/3party/boost/boost/interprocess/containers/containers_fwd.hpp +++ b/3party/boost/boost/interprocess/containers/containers_fwd.hpp @@ -35,4 +35,6 @@ using boost::container::ordered_unique_range; #include +/// @endcond + #endif // #ifndef BOOST_INTERPROCESS_CONTAINERS_CONTAINERS_FWD_HPP diff --git a/3party/boost/boost/interprocess/detail/file_wrapper.hpp b/3party/boost/boost/interprocess/detail/file_wrapper.hpp index 1196bb0827..10d9f62761 100644 --- a/3party/boost/boost/interprocess/detail/file_wrapper.hpp +++ b/3party/boost/boost/interprocess/detail/file_wrapper.hpp @@ -53,6 +53,7 @@ class file_wrapper //!After the call, "moved" does not represent any file. //!Does not throw file_wrapper(BOOST_INTERPROCESS_RV_REF(file_wrapper) moved) + : m_handle(file_handle_t(detail::invalid_file())) { this->swap(moved); } //!Moves the ownership of "moved"'s file to *this. diff --git a/3party/boost/boost/interprocess/detail/managed_open_or_create_impl.hpp b/3party/boost/boost/interprocess/detail/managed_open_or_create_impl.hpp index b3e885a648..24a8a48427 100644 --- a/3party/boost/boost/interprocess/detail/managed_open_or_create_impl.hpp +++ b/3party/boost/boost/interprocess/detail/managed_open_or_create_impl.hpp @@ -30,16 +30,66 @@ namespace interprocess { /// @cond namespace detail{ class interprocess_tester; } + + +template +struct managed_open_or_create_impl_device_id_t +{ + typedef const char *type; +}; + +#ifdef BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS + +class xsi_shared_memory_file_wrapper; +class xsi_key; + +template<> +struct managed_open_or_create_impl_device_id_t +{ + typedef xsi_key type; +}; + +#endif //BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS + /// @endcond namespace detail { -template + +template +class managed_open_or_create_impl_device_holder +{ + public: + DeviceAbstraction &get_device() + { static DeviceAbstraction dev; return dev; } + + const DeviceAbstraction &get_device() const + { static DeviceAbstraction dev; return dev; } +}; + +template +class managed_open_or_create_impl_device_holder +{ + public: + DeviceAbstraction &get_device() + { return dev; } + + const DeviceAbstraction &get_device() const + { return dev; } + + private: + DeviceAbstraction dev; +}; + +template class managed_open_or_create_impl + : public managed_open_or_create_impl_device_holder { //Non-copyable BOOST_INTERPROCESS_MOVABLE_BUT_NOT_COPYABLE(managed_open_or_create_impl) + typedef typename managed_open_or_create_impl_device_id_t::type device_id_t; + typedef managed_open_or_create_impl_device_holder DevHolder; enum { UninitializedSegment, @@ -59,15 +109,15 @@ class managed_open_or_create_impl {} managed_open_or_create_impl(create_only_t, - const char *name, + const device_id_t & id, std::size_t size, mode_t mode, const void *addr, const permissions &perm) { - m_name = name; priv_open_or_create ( detail::DoCreate + , id , size , mode , addr @@ -76,13 +126,13 @@ class managed_open_or_create_impl } managed_open_or_create_impl(open_only_t, - const char *name, + const device_id_t & id, mode_t mode, const void *addr) { - m_name = name; priv_open_or_create ( detail::DoOpen + , id , 0 , mode , addr @@ -92,15 +142,15 @@ class managed_open_or_create_impl managed_open_or_create_impl(open_or_create_t, - const char *name, + const device_id_t & id, std::size_t size, mode_t mode, const void *addr, const permissions &perm) { - m_name = name; priv_open_or_create ( detail::DoOpenOrCreate + , id , size , mode , addr @@ -110,16 +160,16 @@ class managed_open_or_create_impl template managed_open_or_create_impl(create_only_t, - const char *name, + const device_id_t & id, std::size_t size, mode_t mode, const void *addr, const ConstructFunc &construct_func, const permissions &perm) { - m_name = name; priv_open_or_create (detail::DoCreate + , id , size , mode , addr @@ -129,14 +179,14 @@ class managed_open_or_create_impl template managed_open_or_create_impl(open_only_t, - const char *name, + const device_id_t & id, mode_t mode, const void *addr, const ConstructFunc &construct_func) { - m_name = name; priv_open_or_create ( detail::DoOpen + , id , 0 , mode , addr @@ -146,16 +196,16 @@ class managed_open_or_create_impl template managed_open_or_create_impl(open_or_create_t, - const char *name, + const device_id_t & id, std::size_t size, mode_t mode, const void *addr, const ConstructFunc &construct_func, const permissions &perm) { - m_name = name; priv_open_or_create ( detail::DoOpenOrCreate + , id , size , mode , addr @@ -190,20 +240,22 @@ class managed_open_or_create_impl void swap(managed_open_or_create_impl &other) { - this->m_name.swap(other.m_name); this->m_mapped_region.swap(other.m_mapped_region); } - const char *get_name() const - { return m_name.c_str(); } - bool flush() { return m_mapped_region.flush(); } - const mapped_region &get_mapped_region() const { return m_mapped_region; } + + DeviceAbstraction &get_device() + { return this->DevHolder::get_device(); } + + const DeviceAbstraction &get_device() const + { return this->DevHolder::get_device(); } + private: //These are templatized to allow explicit instantiations @@ -217,22 +269,24 @@ class managed_open_or_create_impl //These are templatized to allow explicit instantiations template - static void create_device(DeviceAbstraction &dev, const char *name, std::size_t size, const permissions &perm, detail::false_) + static void create_device(DeviceAbstraction &dev, const device_id_t & id, std::size_t size, const permissions &perm, detail::false_) { - DeviceAbstraction tmp(create_only, name, read_write, size, perm); + DeviceAbstraction tmp(create_only, id, read_write, size, perm); tmp.swap(dev); } template - static void create_device(DeviceAbstraction &dev, const char *name, std::size_t, const permissions &perm, detail::true_) + static void create_device(DeviceAbstraction &dev, const device_id_t & id, std::size_t, const permissions &perm, detail::true_) { - DeviceAbstraction tmp(create_only, name, read_write, perm); + DeviceAbstraction tmp(create_only, id, read_write, perm); tmp.swap(dev); } template inline void priv_open_or_create - (detail::create_enum_t type, std::size_t size, + (detail::create_enum_t type, + const device_id_t & id, + std::size_t size, mode_t mode, const void *addr, const permissions &perm, ConstructFunc construct_func) @@ -250,24 +304,24 @@ class managed_open_or_create_impl } if(type == detail::DoOpen && mode == read_write){ - DeviceAbstraction tmp(open_only, m_name.c_str(), read_write); + DeviceAbstraction tmp(open_only, id, read_write); tmp.swap(dev); created = false; } else if(type == detail::DoOpen && mode == read_only){ - DeviceAbstraction tmp(open_only, m_name.c_str(), read_only); + DeviceAbstraction tmp(open_only, id, read_only); tmp.swap(dev); created = false; ronly = true; } else if(type == detail::DoOpen && mode == copy_on_write){ - DeviceAbstraction tmp(open_only, m_name.c_str(), read_only); + DeviceAbstraction tmp(open_only, id, read_only); tmp.swap(dev); created = false; cow = true; } else if(type == detail::DoCreate){ - create_device(dev, m_name.c_str(), size, perm, file_like_t()); + create_device(dev, id, size, perm, file_like_t()); created = true; } else if(type == detail::DoOpenOrCreate){ @@ -278,7 +332,7 @@ class managed_open_or_create_impl bool completed = false; while(!completed){ try{ - create_device(dev, m_name.c_str(), size, perm, file_like_t()); + create_device(dev, id, size, perm, file_like_t()); created = true; completed = true; } @@ -288,7 +342,7 @@ class managed_open_or_create_impl } else{ try{ - DeviceAbstraction tmp(open_only, m_name.c_str(), read_write); + DeviceAbstraction tmp(open_only, id, read_write); dev.swap(tmp); created = false; completed = true; @@ -376,6 +430,9 @@ class managed_open_or_create_impl //All ok, just move resources to the external mapped region m_mapped_region.swap(region); } + if(StoreDevice){ + this->DevHolder::get_device() = boost::interprocess::move(dev); + } } private: @@ -384,7 +441,6 @@ class managed_open_or_create_impl { detail::interprocess_tester::dont_close_on_destruction(m_mapped_region); } mapped_region m_mapped_region; - std::string m_name; }; template diff --git a/3party/boost/boost/interprocess/detail/os_file_functions.hpp b/3party/boost/boost/interprocess/detail/os_file_functions.hpp index 3c1b99bc69..3cc975535a 100644 --- a/3party/boost/boost/interprocess/detail/os_file_functions.hpp +++ b/3party/boost/boost/interprocess/detail/os_file_functions.hpp @@ -93,7 +93,7 @@ inline const char *get_temporary_path() inline file_handle_t create_new_file - (const char *name, mode_t mode, const permissions & perm, bool temporary = false) + (const char *name, mode_t mode, const permissions & perm = permissions(), bool temporary = false) { unsigned long attr = temporary ? winapi::file_attribute_temporary : 0; return winapi::create_file @@ -102,7 +102,7 @@ inline file_handle_t create_new_file } inline file_handle_t create_or_open_file - (const char *name, mode_t mode, const permissions & perm, bool temporary = false) + (const char *name, mode_t mode, const permissions & perm = permissions(), bool temporary = false) { unsigned long attr = temporary ? winapi::file_attribute_temporary : 0; return winapi::create_file @@ -395,7 +395,7 @@ inline const char *get_temporary_path() } inline file_handle_t create_new_file - (const char *name, mode_t mode, const permissions & perm, bool temporary = false) + (const char *name, mode_t mode, const permissions & perm = permissions(), bool temporary = false) { (void)temporary; int ret = ::open(name, ((int)mode) | O_EXCL | O_CREAT, perm.get_permissions()); @@ -406,12 +406,23 @@ inline file_handle_t create_new_file } inline file_handle_t create_or_open_file - (const char *name, mode_t mode, const permissions & perm, bool temporary = false) -{ + (const char *name, mode_t mode, const permissions & perm = permissions(), bool temporary = false) +{ (void)temporary; - int ret = ::open(name, ((int)mode) | O_CREAT, perm.get_permissions()); - if(ret >= 0){ - ::fchmod(ret, perm.get_permissions()); + int ret = -1; + //We need a loop to change permissions correctly using fchmod, since + //with "O_CREAT only" ::open we don't know if we've created or opened the file. + while(1){ + ret = ::open(name, ((int)mode) | O_EXCL | O_CREAT, perm.get_permissions()); + if(ret >= 0){ + ::fchmod(ret, perm.get_permissions()); + break; + } + else if(errno == EEXIST){ + if((ret = ::open(name, (int)mode)) >= 0 || errno != ENOENT){ + break; + } + } } return ret; } @@ -420,7 +431,7 @@ inline file_handle_t open_existing_file (const char *name, mode_t mode, bool temporary = false) { (void)temporary; - return ::open(name, (int)mode, 0666); + return ::open(name, (int)mode); } inline bool delete_file(const char *name) diff --git a/3party/boost/boost/interprocess/detail/win32_api.hpp b/3party/boost/boost/interprocess/detail/win32_api.hpp index cdcb00ef1c..6a4f1b72e6 100644 --- a/3party/boost/boost/interprocess/detail/win32_api.hpp +++ b/3party/boost/boost/interprocess/detail/win32_api.hpp @@ -154,6 +154,7 @@ static const long BootAndSystemstampLength = 16; static const long BootstampLength = 8; static const unsigned long MaxPath = 260; + //Keys static void * const hkey_local_machine = (void*)(unsigned long*)(long)(0x80000002); static unsigned long key_query_value = 0x0001; @@ -165,7 +166,10 @@ const long EOAC_NONE_IG = 0; const long CLSCTX_INPROC_SERVER_IG = 0x1; const long CLSCTX_LOCAL_SERVER_IG = 0x4; const long WBEM_FLAG_RETURN_IMMEDIATELY_IG = 0x10; -const long WBEM_INFINITE_IG = 0xffffffff; +const long WBEM_INFINITE_IG = 0xffffffffL; +const long RPC_E_TOO_LATE_IG = 0x80010119L; +const long S_OK_IG = 0L; +const long S_FALSE_IG = 1; } //namespace winapi { } //namespace interprocess { @@ -1448,33 +1452,54 @@ inline void get_registry_value(const char *folder, const char *value_key, std::v } } +struct co_uninitializer +{ ~co_uninitializer() { CoUninitialize(); } }; + +template +struct com_releaser +{ + Object *&object_; + com_releaser(Object *&object) : object_(object) {} + ~com_releaser() { object_->Release(); object_ = 0; } +}; + inline bool get_wmi_class_attribute( std::wstring& strValue, const wchar_t *wmi_class, const wchar_t *wmi_class_var) { - CoInitialize(0); - + //See example http://msdn.microsoft.com/en-us/library/aa390423%28v=VS.85%29.aspx + long co_init_ret = CoInitialize(0); + if(co_init_ret != S_OK_IG && co_init_ret != S_FALSE_IG) + return false; + co_uninitializer co_initialize_end; + bool bRet = false; - - if( 0 == CoInitializeSecurity( 0, -1, 0, 0, RPC_C_AUTHN_LEVEL_PKT_IG, RPC_C_IMP_LEVEL_IMPERSONATE_IG, 0, EOAC_NONE_IG, 0 ) ) + long sec_init_ret = CoInitializeSecurity + ( 0 //pVoid + ,-1 //cAuthSvc + , 0 //asAuthSvc + , 0 //pReserved1 + , RPC_C_AUTHN_LEVEL_PKT_IG //dwAuthnLevel + , RPC_C_IMP_LEVEL_IMPERSONATE_IG //dwImpLevel + , 0 //pAuthList + , EOAC_NONE_IG //dwCapabilities + , 0 //pReserved3 + ); + if( 0 == sec_init_ret || RPC_E_TOO_LATE_IG == sec_init_ret) { IWbemLocator_IG * pIWbemLocator = 0; - - IWbemServices_IG * pWbemServices = 0; - IEnumWbemClassObject_IG * pEnumObject = 0; - const wchar_t * bstrNamespace = L"root\\cimv2"; if( 0 != CoCreateInstance( CLSID_WbemAdministrativeLocator, 0, CLSCTX_INPROC_SERVER_IG | CLSCTX_LOCAL_SERVER_IG, - IID_IUnknown, - ( void ** )&pIWbemLocator - ) - ) - { + IID_IUnknown, (void **)&pIWbemLocator)){ return false; } + com_releaser IWbemLocator_releaser(pIWbemLocator); + + IWbemServices_IG *pWbemServices = 0; + if( 0 != pIWbemLocator->ConnectServer( bstrNamespace, // Namespace 0, // Userid @@ -1485,19 +1510,20 @@ inline bool get_wmi_class_attribute( std::wstring& strValue, const wchar_t *wmi_ 0, // Context &pWbemServices ) - ) - { - pIWbemLocator->Release(); - + ){ return false; } - + + com_releaser IWbemServices_releaser(pWbemServices); + strValue.clear(); strValue += L"Select "; strValue += wmi_class_var; strValue += L" from "; strValue += wmi_class; + IEnumWbemClassObject_IG * pEnumObject = 0; + if ( 0 != pWbemServices->ExecQuery( L"WQL", strValue.c_str(), @@ -1505,47 +1531,30 @@ inline bool get_wmi_class_attribute( std::wstring& strValue, const wchar_t *wmi_ 0, &pEnumObject ) - ) - { - pIWbemLocator->Release(); - pWbemServices->Release(); - + ){ return false; } - - unsigned long uCount = 1, uReturned; - IWbemClassObject_IG * pClassObject = 0; - - if ( 0 != pEnumObject->Reset() ) - { - pIWbemLocator->Release(); - pWbemServices->Release(); - pEnumObject->Release(); - + + com_releaser IEnumWbemClassObject_releaser(pEnumObject); + + if ( 0 != pEnumObject->Reset() ){ return false; } wchar_variant vwchar; - + unsigned long uCount = 1, uReturned; + IWbemClassObject_IG * pClassObject = 0; while( 0 == pEnumObject->Next( WBEM_INFINITE_IG, uCount, &pClassObject, &uReturned ) ) { - if ( 0 == pClassObject->Get( L"LastBootUpTime", 0, &vwchar, 0, 0 ) ) - { + com_releaser IWbemClassObject_releaser(pClassObject); + if ( 0 == pClassObject->Get( L"LastBootUpTime", 0, &vwchar, 0, 0 ) ){ bRet = true; - strValue = vwchar.value.pbstrVal; - VariantClear(&vwchar ); - break; + strValue = vwchar.value.pbstrVal; + VariantClear(&vwchar ); + break; } } - - pIWbemLocator->Release(); - pWbemServices->Release(); - pEnumObject->Release(); - pClassObject->Release(); } - - CoUninitialize(); - return bRet; } diff --git a/3party/boost/boost/interprocess/detail/xsi_shared_memory_device.hpp b/3party/boost/boost/interprocess/detail/xsi_shared_memory_device.hpp index b2014c4e0f..59ec2ca032 100644 --- a/3party/boost/boost/interprocess/detail/xsi_shared_memory_device.hpp +++ b/3party/boost/boost/interprocess/detail/xsi_shared_memory_device.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2009. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2009-2010. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include #include @@ -45,13 +45,10 @@ namespace interprocess { class xsi_shared_memory_device { /// @cond - //Non-copyable and non-assignable - xsi_shared_memory_device(xsi_shared_memory_device &); - xsi_shared_memory_device &operator=(xsi_shared_memory_device &); - /// @endcond + BOOST_INTERPROCESS_MOVABLE_BUT_NOT_COPYABLE(xsi_shared_memory_file_wrapper) + /// @endcond public: - BOOST_INTERPROCESS_ENABLE_MOVE_EMULATION(xsi_shared_memory_device) xsi_shared_memory_device(); diff --git a/3party/boost/boost/interprocess/detail/xsi_shared_memory_file_wrapper.hpp b/3party/boost/boost/interprocess/detail/xsi_shared_memory_file_wrapper.hpp new file mode 100644 index 0000000000..d09ca37c46 --- /dev/null +++ b/3party/boost/boost/interprocess/detail/xsi_shared_memory_file_wrapper.hpp @@ -0,0 +1,80 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2009-2010. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/interprocess for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTERPROCESS_XSI_SHARED_MEMORY_FILE_WRAPPER_HPP +#define BOOST_INTERPROCESS_XSI_SHARED_MEMORY_FILE_WRAPPER_HPP + +#include +#include +#include + +#if !defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) +#error "This header can't be used in operating systems without XSI (System V) shared memory support" +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include + +//!\file +//!Describes a class representing a pseudo-file implemented on top of xsi shared memory. + +namespace boost { +namespace interprocess { + +class xsi_shared_memory_file_wrapper + : public xsi_shared_memory +{ + /// @cond + BOOST_INTERPROCESS_MOVABLE_BUT_NOT_COPYABLE(xsi_shared_memory_file_wrapper) + /// @endcond + public: + + xsi_shared_memory_file_wrapper() : xsi_shared_memory() {} + + xsi_shared_memory_file_wrapper(create_only_t, const xsi_key &key, mode_t mode, std::size_t size, const permissions& perm = permissions()) + : xsi_shared_memory(create_only_t(), key, size, perm.get_permissions()) + {} + + xsi_shared_memory_file_wrapper(open_or_create_t, const xsi_key &key, mode_t mode, std::size_t size, const permissions& perm = permissions()) + : xsi_shared_memory(open_or_create_t(), key, size, perm.get_permissions()) + {} + + xsi_shared_memory_file_wrapper(open_only_t, const xsi_key &key, mode_t mode, const permissions& perm = permissions()) + : xsi_shared_memory(open_only_t(), key) + {} + + xsi_shared_memory_file_wrapper(BOOST_INTERPROCESS_RV_REF(xsi_shared_memory_file_wrapper) moved) + { this->swap(moved); } + + xsi_shared_memory_file_wrapper &operator=(BOOST_INTERPROCESS_RV_REF(xsi_shared_memory_file_wrapper) moved) + { + xsi_shared_memory_file_wrapper tmp(boost::interprocess::move(moved)); + this->swap(tmp); + return *this; + } + + //!Swaps two xsi_shared_memory_file_wrapper. Does not throw + void swap(xsi_shared_memory_file_wrapper &other) + { this->xsi_shared_memory::swap(other); } +}; + +} //namespace interprocess { +} //namespace boost { + +#include + +#endif //BOOST_INTERPROCESS_XSI_SHARED_MEMORY_FILE_WRAPPER_HPP diff --git a/3party/boost/boost/interprocess/interprocess_fwd.hpp b/3party/boost/boost/interprocess/interprocess_fwd.hpp index 917f750d1f..0d8d44e3e5 100644 --- a/3party/boost/boost/interprocess/interprocess_fwd.hpp +++ b/3party/boost/boost/interprocess/interprocess_fwd.hpp @@ -67,7 +67,7 @@ class permissions; class shared_memory_object; -#if defined (BOOST_INTERPROCESS_WINDOWS) +#if defined (BOOST_INTERPROCESS_WINDOWS) || defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) class windows_shared_memory; #endif //#if defined (BOOST_INTERPROCESS_WINDOWS) @@ -239,7 +239,7 @@ wmanaged_shared_memory; // Windows shared memory managed memory classes ////////////////////////////////////////////////////////////////////////////// -#if defined (BOOST_INTERPROCESS_WINDOWS) +#if defined (BOOST_INTERPROCESS_WINDOWS) || defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) template wmanaged_windows_shared_memory; -#else +#endif //#if defined (BOOST_INTERPROCESS_WINDOWS) + +#if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) || defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED) -#if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) template class IndexType> @@ -277,9 +278,8 @@ typedef basic_managed_xsi_shared_memory ,rbtree_best_fit ,iset_index> wmanaged_xsi_shared_memory; -#endif //#if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) -#endif //#if defined (BOOST_INTERPROCESS_WINDOWS) +#endif //#if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) ////////////////////////////////////////////////////////////////////////////// // Fixed address shared memory diff --git a/3party/boost/boost/interprocess/managed_xsi_shared_memory.hpp b/3party/boost/boost/interprocess/managed_xsi_shared_memory.hpp new file mode 100644 index 0000000000..9ff7f7f6c7 --- /dev/null +++ b/3party/boost/boost/interprocess/managed_xsi_shared_memory.hpp @@ -0,0 +1,189 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2008-2009. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/interprocess for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTERPROCESS_MANAGED_XSI_SHARED_MEMORY_HPP +#define BOOST_INTERPROCESS_MANAGED_XSI_SHARED_MEMORY_HPP + +#if (defined _MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif + +#include +#include + +#if !defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) +#error "This header can't be used in operating systems without XSI (System V) shared memory support" +#endif + +#include +#include +#include +#include + +namespace boost { + +namespace interprocess { + +//!A basic X/Open System Interface (XSI) shared memory named object creation class. Initializes the +//!shared memory segment. Inherits all basic functionality from +//!basic_managed_memory_impl*/ +template + < + class CharType, + class AllocationAlgorithm, + template class IndexType + > +class basic_managed_xsi_shared_memory + : public detail::basic_managed_memory_impl + ::ManagedOpenOrCreateUserOffset> + , private detail::managed_open_or_create_impl +{ + /// @cond + public: + typedef xsi_shared_memory_file_wrapper device_type; + + public: + typedef detail::managed_open_or_create_impl + base2_t; + typedef detail::basic_managed_memory_impl + base_t; + + typedef detail::create_open_func create_open_func_t; + + basic_managed_xsi_shared_memory *get_this_pointer() + { return this; } + + private: + typedef typename base_t::char_ptr_holder_t char_ptr_holder_t; + BOOST_INTERPROCESS_MOVABLE_BUT_NOT_COPYABLE(basic_managed_xsi_shared_memory) + /// @endcond + + public: //functions + + //!Destroys *this and indicates that the calling process is finished using + //!the resource. The destructor function will deallocate + //!any system resources allocated by the system for use by this process for + //!this resource. The resource can still be opened again calling + //!the open constructor overload. To erase the resource from the system + //!use remove(). + ~basic_managed_xsi_shared_memory() + {} + + //!Default constructor. Does nothing. + //!Useful in combination with move semantics + basic_managed_xsi_shared_memory() + {} + + //!Creates shared memory and creates and places the segment manager. + //!This can throw. + basic_managed_xsi_shared_memory(create_only_t create_only, const xsi_key &key, + std::size_t size, const void *addr = 0, const permissions& perm = permissions()) + : base_t() + , base2_t(create_only, key, size, read_write, addr, + create_open_func_t(get_this_pointer(), detail::DoCreate), perm) + {} + + //!Creates shared memory and creates and places the segment manager if + //!segment was not created. If segment was created it connects to the + //!segment. + //!This can throw. + basic_managed_xsi_shared_memory (open_or_create_t open_or_create, + const xsi_key &key, std::size_t size, + const void *addr = 0, const permissions& perm = permissions()) + : base_t() + , base2_t(open_or_create, key, size, read_write, addr, + create_open_func_t(get_this_pointer(), + detail::DoOpenOrCreate), perm) + {} + + //!Connects to a created shared memory and its segment manager. + //!in read-only mode. + //!This can throw. + basic_managed_xsi_shared_memory (open_read_only_t, const xsi_key &key, + const void *addr = 0) + : base_t() + , base2_t(open_only, key, read_only, addr, + create_open_func_t(get_this_pointer(), + detail::DoOpen)) + {} + + //!Connects to a created shared memory and its segment manager. + //!This can throw. + basic_managed_xsi_shared_memory (open_only_t open_only, const xsi_key &key, + const void *addr = 0) + : base_t() + , base2_t(open_only, key, read_write, addr, + create_open_func_t(get_this_pointer(), + detail::DoOpen)) + {} + + //!Moves the ownership of "moved"'s managed memory to *this. + //!Does not throw + basic_managed_xsi_shared_memory(BOOST_INTERPROCESS_RV_REF(basic_managed_xsi_shared_memory) moved) + { + basic_managed_xsi_shared_memory tmp; + this->swap(moved); + tmp.swap(moved); + } + + //!Moves the ownership of "moved"'s managed memory to *this. + //!Does not throw + basic_managed_xsi_shared_memory &operator=(BOOST_INTERPROCESS_RV_REF(basic_managed_xsi_shared_memory) moved) + { + basic_managed_xsi_shared_memory tmp(boost::interprocess::move(moved)); + this->swap(tmp); + return *this; + } + + //!Swaps the ownership of the managed shared memories managed by *this and other. + //!Never throws. + void swap(basic_managed_xsi_shared_memory &other) + { + base_t::swap(other); + base2_t::swap(other); + } + + //!Erases a XSI shared memory object identified by shmid + //!from the system. + //!Returns false on error. Never throws + static bool remove(int shmid) + { return device_type::remove(shmid); } + + int get_shmid() const + { return base2_t::get_device().get_shmid(); } + + /// @cond + + //!Tries to find a previous named allocation address. Returns a memory + //!buffer and the object count. If not found returned pointer is 0. + //!Never throws. + template + std::pair find (char_ptr_holder_t name) + { + if(base2_t::get_mapped_region().get_mode() == read_only){ + return base_t::template find_no_lock(name); + } + else{ + return base_t::template find(name); + } + } + + /// @endcond +}; + +} //namespace interprocess { +} //namespace boost { + +#include + +#endif //BOOST_INTERPROCESS_MANAGED_XSI_SHARED_MEMORY_HPP + diff --git a/3party/boost/boost/interprocess/permissions.hpp b/3party/boost/boost/interprocess/permissions.hpp index aa88d6145e..4db45b8fc1 100644 --- a/3party/boost/boost/interprocess/permissions.hpp +++ b/3party/boost/boost/interprocess/permissions.hpp @@ -11,7 +11,9 @@ #ifndef BOOST_INTERPROCESS_PERMISSIONS_HPP #define BOOST_INTERPROCESS_PERMISSIONS_HPP -#if (defined _MSC_VER) && (_MSC_VER >= 1200) +/// @cond + +#if defined (_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif @@ -25,12 +27,16 @@ #endif +/// @endcond + //!\file //!Describes permissions class namespace boost { namespace interprocess { +/// @cond + #if defined(BOOST_INTERPROCESS_WINDOWS) namespace detail { @@ -48,18 +54,22 @@ winapi::interprocess_all_access_security unrestricted_permissions_holder: #endif //defined BOOST_INTERPROCESS_WINDOWS +/// @endcond + //!The permissions class represents permissions to be set to shared memory or //!files, that can be constructed form usual permission representations: //!a SECURITY_ATTRIBUTES pointer in windows or ORed rwx chmod integer in UNIX. class permissions { /// @cond - #if defined (BOOST_INTERPROCESS_WINDOWS) + + #if defined(BOOST_INTERPROCESS_WINDOWS) typedef void* os_permissions_type; #else typedef int os_permissions_type; - #endif //#if (defined BOOST_INTERPROCESS_WINDOWS) + #endif os_permissions_type m_perm; + /// @endcond public: @@ -80,22 +90,26 @@ class permissions //!for UNIX. void set_default() { - #if (defined BOOST_INTERPROCESS_WINDOWS) + /// @cond + #if defined (BOOST_INTERPROCESS_WINDOWS) m_perm = 0; #else m_perm = 0644; #endif + /// @endcond } //!Sets permissions to unrestricted access: //!A null DACL for windows or 0666 for UNIX. void set_unrestricted() { - #if (defined BOOST_INTERPROCESS_WINDOWS) + /// @cond + #if defined (BOOST_INTERPROCESS_WINDOWS) m_perm = &detail::unrestricted_permissions_holder<0>::unrestricted; #else m_perm = 0666; #endif + /// @endcond } //!Sets permissions from a user provided os-dependent @@ -115,3 +129,4 @@ class permissions #include #endif //BOOST_INTERPROCESS_PERMISSIONS_HPP + diff --git a/3party/boost/boost/interprocess/shared_memory_object.hpp b/3party/boost/boost/interprocess/shared_memory_object.hpp index b7560e3e0c..98fa5c4297 100644 --- a/3party/boost/boost/interprocess/shared_memory_object.hpp +++ b/3party/boost/boost/interprocess/shared_memory_object.hpp @@ -298,29 +298,48 @@ inline bool shared_memory_object::priv_open_or_create error_info err(mode_error); throw interprocess_exception(err); } + int unix_perm = perm.get_permissions(); switch(type){ case detail::DoOpen: - //No addition + { + //No oflag addition + m_handle = shm_open(m_filename.c_str(), oflag, unix_perm); + } break; case detail::DoCreate: + { oflag |= (O_CREAT | O_EXCL); + m_handle = shm_open(m_filename.c_str(), oflag, unix_perm); + if(m_handle >= 0){ + ::fchmod(m_handle, unix_perm); + } + } break; case detail::DoOpenOrCreate: + { oflag |= O_CREAT; + //We need a loop to change permissions correctly using fchmod, since + //with "O_CREAT only" shm_open we don't know if we've created or opened the file. + while(1){ + m_handle = shm_open(m_filename.c_str(), oflag, unix_perm); + if(m_handle >= 0){ + ::fchmod(m_handle, unix_perm); + break; + } + else if(errno == EEXIST){ + if((m_handle = shm_open(m_filename.c_str(), oflag, unix_perm)) >= 0 || errno != ENOENT){ + break; + } + } + } + } break; default: - { - error_info err = other_error; - throw interprocess_exception(err); - } - } - - //Open file using POSIX API - m_handle = shm_open(m_filename.c_str(), oflag, perm.get_permissions()); - - if(m_handle >= 0){ - ::fchmod(m_handle, perm.get_permissions()); + { + error_info err = other_error; + throw interprocess_exception(err); + } } //Check for error diff --git a/3party/boost/boost/interprocess/xsi_key.hpp b/3party/boost/boost/interprocess/xsi_key.hpp new file mode 100644 index 0000000000..addeff9210 --- /dev/null +++ b/3party/boost/boost/interprocess/xsi_key.hpp @@ -0,0 +1,87 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2009. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/interprocess for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTERPROCESS_XSI_KEY_HPP +#define BOOST_INTERPROCESS_XSI_KEY_HPP + +#include +#include +#include + +#if !defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) +#error "This header can't be used in operating systems without XSI (System V) shared memory support" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//!\file +//!Describes a class representing a xsi key type. + +namespace boost { +namespace interprocess { + +//!A class that wraps XSI (System V) key_t type. +//!This type calculates key_t from path and id using ftok +//!or sets key to IPC_PRIVATE using the default constructor. +class xsi_key +{ + public: + + //!Default constructor. + //!Represents a private xsi_key. + xsi_key() + : m_key(IPC_PRIVATE) + {} + + //!Creates a new XSI shared memory with a key obtained from a call to ftok (with path + //!"path" and id "id"), of size "size" and permissions "perm". + //!If the shared memory previously exists, throws an error. + xsi_key(const char *path, boost::uint8_t id) + { + key_t key; + if(path){ + key = ::ftok(path, id); + if(((key_t)-1) == key){ + error_info err = system_error_code(); + throw interprocess_exception(err); + } + } + else{ + key = IPC_PRIVATE; + } + m_key = key; + } + + //!Returns the internal key_t value + key_t get_key() const + { return m_key; } + + /// @cond + private: + key_t m_key; + /// @endcond +}; + +} //namespace interprocess { +} //namespace boost { + +#include + +#endif //BOOST_INTERPROCESS_XSI_KEY_HPP diff --git a/3party/boost/boost/interprocess/xsi_shared_memory.hpp b/3party/boost/boost/interprocess/xsi_shared_memory.hpp new file mode 100644 index 0000000000..1d248d6dc9 --- /dev/null +++ b/3party/boost/boost/interprocess/xsi_shared_memory.hpp @@ -0,0 +1,201 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2009. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/interprocess for documentation. +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_INTERPROCESS_XSI_SHARED_MEMORY_HPP +#define BOOST_INTERPROCESS_XSI_SHARED_MEMORY_HPP + +#include +#include +#include + +#if !defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) +#error "This header can't be used in operating systems without XSI (System V) shared memory support" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//!\file +//!Describes a class representing a native xsi shared memory. + +namespace boost { +namespace interprocess { + +//!A class that wraps XSI (System V) shared memory. +//!Unlike shared_memory_object, xsi_shared_memory needs a valid +//!xsi_key to identify a shared memory object. +//! +//!Warning: XSI shared memory and interprocess portable +//!shared memory (boost::interprocess::shared_memory_object) +//!can't communicate between them. +class xsi_shared_memory +{ + /// @cond + //Non-copyable and non-assignable + BOOST_INTERPROCESS_MOVABLE_BUT_NOT_COPYABLE(xsi_shared_memory) + /// @endcond + + public: + //!Default constructor. + //!Represents an empty xsi_shared_memory. + xsi_shared_memory(); + + //!Initializes *this with a shmid previously obtained (possibly from another process) + //!This lower-level initializer allows shared memory mapping without having a key. + xsi_shared_memory(open_only_t, int shmid) + : m_shmid (shmid) + {} + + //!Creates a new XSI shared memory from 'key', with size "size" and permissions "perm". + //!If the shared memory previously exists, throws an error. + xsi_shared_memory(create_only_t, const xsi_key &key, std::size_t size, const permissions& perm = permissions()) + { this->priv_open_or_create(detail::DoCreate, key, perm, size); } + + //!Opens an existing shared memory with identifier 'key' or creates a new XSI shared memory from + //!identifier 'key', with size "size" and permissions "perm". + xsi_shared_memory(open_or_create_t, const xsi_key &key, std::size_t size, const permissions& perm = permissions()) + { this->priv_open_or_create(detail::DoOpenOrCreate, key, perm, size); } + + //!Tries to open a XSI shared memory with identifier 'key' + //!If the shared memory does not previously exist, it throws an error. + xsi_shared_memory(open_only_t, const xsi_key &key) + { this->priv_open_or_create(detail::DoOpen, key, permissions(), 0); } + + //!Moves the ownership of "moved"'s shared memory object to *this. + //!After the call, "moved" does not represent any shared memory object. + //!Does not throw + xsi_shared_memory(BOOST_INTERPROCESS_RV_REF(xsi_shared_memory) moved) + : m_shmid(-1) + { this->swap(moved); } + + //!Moves the ownership of "moved"'s shared memory to *this. + //!After the call, "moved" does not represent any shared memory. + //!Does not throw + xsi_shared_memory &operator=(BOOST_INTERPROCESS_RV_REF(xsi_shared_memory) moved) + { + xsi_shared_memory tmp(boost::interprocess::move(moved)); + this->swap(tmp); + return *this; + } + + //!Swaps two xsi_shared_memorys. Does not throw + void swap(xsi_shared_memory &other); + + //!Destroys *this. The shared memory won't be destroyed, just + //!this connection to it. Use remove() to destroy the shared memory. + ~xsi_shared_memory(); + + //!Returns the shared memory ID that + //!identifies the shared memory + int get_shmid() const; + + //!Returns the mapping handle. + //!Never throws + mapping_handle_t get_mapping_handle() const; + + //!Erases the XSI shared memory object identified by shmid + //!from the system. + //!Returns false on error. Never throws + static bool remove(int shmid); + + /// @cond + private: + + //!Closes a previously opened file mapping. Never throws. + bool priv_open_or_create( detail::create_enum_t type + , const xsi_key &key + , const permissions& perm + , std::size_t size); + int m_shmid; + /// @endcond +}; + +/// @cond + +inline xsi_shared_memory::xsi_shared_memory() + : m_shmid(-1) +{} + +inline xsi_shared_memory::~xsi_shared_memory() +{} + +inline int xsi_shared_memory::get_shmid() const +{ return m_shmid; } + +inline void xsi_shared_memory::swap(xsi_shared_memory &other) +{ + std::swap(m_shmid, other.m_shmid); +} + +inline mapping_handle_t xsi_shared_memory::get_mapping_handle() const +{ mapping_handle_t mhnd = { m_shmid, true}; return mhnd; } + +inline bool xsi_shared_memory::priv_open_or_create + (detail::create_enum_t type, const xsi_key &key, const permissions& permissions, std::size_t size) +{ + int perm = permissions.get_permissions(); + perm &= 0x01FF; + int shmflg = perm; + + switch(type){ + case detail::DoOpen: + shmflg |= 0; + break; + case detail::DoCreate: + shmflg |= IPC_CREAT | IPC_EXCL; + break; + case detail::DoOpenOrCreate: + shmflg |= IPC_CREAT; + break; + default: + { + error_info err = other_error; + throw interprocess_exception(err); + } + } + + int ret = ::shmget(key.get_key(), size, shmflg); + int shmid = ret; + if((type == detail::DoOpen) && (-1 != ret)){ + //Now get the size + ::shmid_ds xsi_ds; + ret = ::shmctl(ret, IPC_STAT, &xsi_ds); + size = xsi_ds.shm_segsz; + } + if(-1 == ret){ + error_info err = system_error_code(); + throw interprocess_exception(err); + } + + m_shmid = shmid; + return true; +} + +inline bool xsi_shared_memory::remove(int shmid) +{ return -1 != ::shmctl(shmid, IPC_RMID, 0); } + +///@endcond + +} //namespace interprocess { +} //namespace boost { + +#include + +#endif //BOOST_INTERPROCESS_XSI_SHARED_MEMORY_HPP diff --git a/3party/boost/boost/intrusive/avltree.hpp b/3party/boost/boost/intrusive/avltree.hpp index 4b6e0899ed..e294d58088 100644 --- a/3party/boost/boost/intrusive/avltree.hpp +++ b/3party/boost/boost/intrusive/avltree.hpp @@ -465,9 +465,10 @@ class avltree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); - return iterator(node_algorithms::insert_equal_upper_bound + iterator ret(node_algorithms::insert_equal_upper_bound (node_ptr(&priv_header()), to_insert, key_node_comp), this); + this->priv_size_traits().increment(); + return ret; } //! Requires: value must be an lvalue, and "hint" must be @@ -491,9 +492,10 @@ class avltree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); - return iterator(node_algorithms::insert_equal + iterator ret(node_algorithms::insert_equal (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp), this); + this->priv_size_traits().increment(); + return ret; } //! Requires: Dereferencing iterator must yield an lvalue @@ -698,9 +700,9 @@ class avltree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); node_algorithms::insert_unique_commit (node_ptr(&priv_header()), to_insert, commit_data); + this->priv_size_traits().increment(); return iterator(to_insert, this); } @@ -723,9 +725,10 @@ class avltree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); - return iterator(node_algorithms::insert_before + iterator ret(node_algorithms::insert_before (node_ptr(&priv_header()), pos.pointed_node(), to_insert), this); + this->priv_size_traits().increment(); + return ret; } //! Requires: value must be an lvalue, and it must be no less @@ -747,8 +750,8 @@ class avltree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); node_algorithms::push_back(node_ptr(&priv_header()), to_insert); + this->priv_size_traits().increment(); } //! Requires: value must be an lvalue, and it must be no greater @@ -770,8 +773,8 @@ class avltree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); node_algorithms::push_front(node_ptr(&priv_header()), to_insert); + this->priv_size_traits().increment(); } //! Effects: Erases the element pointed to by pos. diff --git a/3party/boost/boost/intrusive/detail/tree_node.hpp b/3party/boost/boost/intrusive/detail/tree_node.hpp index f6a678dc43..00993bcdb4 100644 --- a/3party/boost/boost/intrusive/detail/tree_node.hpp +++ b/3party/boost/boost/intrusive/detail/tree_node.hpp @@ -96,7 +96,7 @@ class tree_iterator tree_iterator() - : members_ (0, 0) + : members_ (node_ptr(0), (const void *)0) {} explicit tree_iterator(node_ptr nodeptr, const Container *cont_ptr) diff --git a/3party/boost/boost/intrusive/rbtree.hpp b/3party/boost/boost/intrusive/rbtree.hpp index c8e8ab5001..d2b5fe8828 100644 --- a/3party/boost/boost/intrusive/rbtree.hpp +++ b/3party/boost/boost/intrusive/rbtree.hpp @@ -478,9 +478,10 @@ class rbtree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); - return iterator(node_algorithms::insert_equal_upper_bound + iterator ret(node_algorithms::insert_equal_upper_bound (node_ptr(&priv_header()), to_insert, key_node_comp), this); + this->priv_size_traits().increment(); + return ret; } //! Requires: value must be an lvalue, and "hint" must be @@ -504,9 +505,10 @@ class rbtree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); - return iterator(node_algorithms::insert_equal + iterator ret(node_algorithms::insert_equal (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp), this); + this->priv_size_traits().increment(); + return ret; } //! Requires: Dereferencing iterator must yield an lvalue @@ -711,9 +713,9 @@ class rbtree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); node_algorithms::insert_unique_commit (node_ptr(&priv_header()), to_insert, commit_data); + this->priv_size_traits().increment(); return iterator(to_insert, this); } diff --git a/3party/boost/boost/intrusive/sgtree.hpp b/3party/boost/boost/intrusive/sgtree.hpp index 5cc361ab60..2018d0ac95 100644 --- a/3party/boost/boost/intrusive/sgtree.hpp +++ b/3party/boost/boost/intrusive/sgtree.hpp @@ -621,11 +621,11 @@ class sgtree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); std::size_t max_tree_size = (std::size_t)data_.max_tree_size_; node_ptr p = node_algorithms::insert_equal_upper_bound (node_ptr(&priv_header()), to_insert, key_node_comp , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size); + this->priv_size_traits().increment(); data_.max_tree_size_ = (size_type)max_tree_size; return iterator(p, this); } @@ -651,11 +651,11 @@ class sgtree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); std::size_t max_tree_size = (std::size_t)data_.max_tree_size_; node_ptr p = node_algorithms::insert_equal (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp , (std::size_t)this->size(), this->get_h_alpha_func(), max_tree_size); + this->priv_size_traits().increment(); data_.max_tree_size_ = (size_type)max_tree_size; return iterator(p, this); } @@ -862,11 +862,11 @@ class sgtree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); std::size_t max_tree_size = (std::size_t)data_.max_tree_size_; node_algorithms::insert_unique_commit ( node_ptr(&priv_header()), to_insert, commit_data , (std::size_t)this->size(), this->get_h_alpha_func(), max_tree_size); + this->priv_size_traits().increment(); data_.max_tree_size_ = (size_type)max_tree_size; return iterator(to_insert, this); } @@ -890,11 +890,11 @@ class sgtree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); std::size_t max_tree_size = (std::size_t)data_.max_tree_size_; node_ptr p = node_algorithms::insert_before ( node_ptr(&priv_header()), pos.pointed_node(), to_insert , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size); + this->priv_size_traits().increment(); data_.max_tree_size_ = (size_type)max_tree_size; return iterator(p, this); } @@ -918,11 +918,11 @@ class sgtree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); std::size_t max_tree_size = (std::size_t)data_.max_tree_size_; node_algorithms::push_back ( node_ptr(&priv_header()), to_insert , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size); + this->priv_size_traits().increment(); data_.max_tree_size_ = (size_type)max_tree_size; } @@ -945,11 +945,11 @@ class sgtree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); std::size_t max_tree_size = (std::size_t)data_.max_tree_size_; node_algorithms::push_front ( node_ptr(&priv_header()), to_insert , (size_type)this->size(), this->get_h_alpha_func(), max_tree_size); + this->priv_size_traits().increment(); data_.max_tree_size_ = (size_type)max_tree_size; } diff --git a/3party/boost/boost/intrusive/splaytree.hpp b/3party/boost/boost/intrusive/splaytree.hpp index 1cb2a2a797..244cb0e99d 100644 --- a/3party/boost/boost/intrusive/splaytree.hpp +++ b/3party/boost/boost/intrusive/splaytree.hpp @@ -466,9 +466,10 @@ class splaytree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); - return iterator(node_algorithms::insert_equal_lower_bound + iterator ret (node_algorithms::insert_equal_lower_bound (node_ptr(&priv_header()), to_insert, key_node_comp), this); + this->priv_size_traits().increment(); + return ret; } //! Requires: value must be an lvalue, and "hint" must be @@ -492,9 +493,10 @@ class splaytree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); - return iterator(node_algorithms::insert_equal + iterator ret(node_algorithms::insert_equal (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp), this); + this->priv_size_traits().increment(); + return ret; } //! Requires: Dereferencing iterator must yield an lvalue @@ -693,9 +695,9 @@ class splaytree_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); node_algorithms::insert_unique_commit (node_ptr(&priv_header()), to_insert, commit_data); + this->priv_size_traits().increment(); return iterator(to_insert, this); } diff --git a/3party/boost/boost/intrusive/treap.hpp b/3party/boost/boost/intrusive/treap.hpp index 86bdd0145a..9330b35f1c 100644 --- a/3party/boost/boost/intrusive/treap.hpp +++ b/3party/boost/boost/intrusive/treap.hpp @@ -549,9 +549,10 @@ class treap_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); - return iterator(node_algorithms::insert_equal_upper_bound + iterator ret(node_algorithms::insert_equal_upper_bound (node_ptr(&priv_header()), to_insert, key_node_comp, key_node_pcomp), this); + this->priv_size_traits().increment(); + return ret; } //! Requires: value must be an lvalue, and "hint" must be @@ -577,9 +578,10 @@ class treap_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); - return iterator(node_algorithms::insert_equal + iterator ret (node_algorithms::insert_equal (node_ptr(&priv_header()), hint.pointed_node(), to_insert, key_node_comp, key_node_pcomp), this); + this->priv_size_traits().increment(); + return ret; } //! Requires: Dereferencing iterator must yield an lvalue @@ -801,8 +803,8 @@ class treap_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); node_algorithms::insert_unique_commit(node_ptr(&priv_header()), to_insert, commit_data); + this->priv_size_traits().increment(); return iterator(to_insert, this); } @@ -825,11 +827,12 @@ class treap_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); detail::key_nodeptr_comp pcomp(priv_pcomp(), this); - return iterator(node_algorithms::insert_before + iterator ret (node_algorithms::insert_before (node_ptr(&priv_header()), pos.pointed_node(), to_insert, pcomp), this); + this->priv_size_traits().increment(); + return ret; } //! Requires: value must be an lvalue, and it must be no less @@ -851,10 +854,10 @@ class treap_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); detail::key_nodeptr_comp pcomp(priv_pcomp(), this); node_algorithms::push_back(node_ptr(&priv_header()), to_insert, pcomp); + this->priv_size_traits().increment(); } //! Requires: value must be an lvalue, and it must be no greater @@ -876,10 +879,10 @@ class treap_impl node_ptr to_insert(get_real_value_traits().to_node_ptr(value)); if(safemode_or_autounlink) BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(node_algorithms::unique(to_insert)); - this->priv_size_traits().increment(); detail::key_nodeptr_comp pcomp(priv_pcomp(), this); node_algorithms::push_front(node_ptr(&priv_header()), to_insert, pcomp); + this->priv_size_traits().increment(); } //! Effects: Erases the element pointed to by pos. diff --git a/3party/boost/boost/io/detail/quoted_manip.hpp b/3party/boost/boost/io/detail/quoted_manip.hpp index 13cfc3537a..502f422aa1 100644 --- a/3party/boost/boost/io/detail/quoted_manip.hpp +++ b/3party/boost/boost/io/detail/quoted_manip.hpp @@ -125,15 +125,15 @@ namespace boost std::basic_istream& operator>>(std::basic_istream& is, const quoted_proxy&, Char>& proxy) { + proxy.string.clear(); Char c; is >> c; if (c != proxy.delim) { - proxy.string = c; + is.unget(); is >> proxy.string; return is; } - proxy.string.clear(); { boost::io::ios_flags_saver ifs(is); is >> std::noskipws; diff --git a/3party/boost/boost/iostreams/chain.hpp b/3party/boost/boost/iostreams/chain.hpp index 90fd18410d..3cb8056fe2 100644 --- a/3party/boost/boost/iostreams/chain.hpp +++ b/3party/boost/boost/iostreams/chain.hpp @@ -12,7 +12,7 @@ # pragma once #endif -#include +#include #include #include // unary_function. #include // advance. @@ -573,7 +573,7 @@ bool chain_base::strict_sync() template void chain_base::pop() { - assert(!empty()); + BOOST_ASSERT(!empty()); if (auto_close()) pimpl_->close(); streambuf_type* buf = 0; diff --git a/3party/boost/boost/iostreams/close.hpp b/3party/boost/boost/iostreams/close.hpp index 9c544a35bb..3bb63e76e5 100644 --- a/3party/boost/boost/iostreams/close.hpp +++ b/3party/boost/boost/iostreams/close.hpp @@ -97,7 +97,7 @@ template void close(T& t, BOOST_IOS::openmode which) { #ifdef BOOST_IOSTREAMS_STRICT - assert(which == BOOST_IOS::in || which == BOOST_IOS::out); + BOOST_ASSERT(which == BOOST_IOS::in || which == BOOST_IOS::out); #else if (which == (BOOST_IOS::in | BOOST_IOS::out)) { detail::close_all(t); @@ -111,7 +111,7 @@ template void close(T& t, Sink& snk, BOOST_IOS::openmode which) { #ifdef BOOST_IOSTREAMS_STRICT - assert(which == BOOST_IOS::in || which == BOOST_IOS::out); + BOOST_ASSERT(which == BOOST_IOS::in || which == BOOST_IOS::out); #else if (which == (BOOST_IOS::in | BOOST_IOS::out)) { detail::close_all(t, snk); diff --git a/3party/boost/boost/iostreams/detail/adapter/concept_adapter.hpp b/3party/boost/boost/iostreams/detail/adapter/concept_adapter.hpp index b6d35660e4..05b5ff4ca7 100644 --- a/3party/boost/boost/iostreams/detail/adapter/concept_adapter.hpp +++ b/3party/boost/boost/iostreams/detail/adapter/concept_adapter.hpp @@ -106,7 +106,10 @@ public: template bool flush( Device* dev ) { - return any_impl::flush(t_, dev); + bool result = any_impl::flush(t_, dev); + if (dev && dev->BOOST_IOSTREAMS_PUBSYNC() == -1) + result = false; + return result; } template // Avoid dependency on diff --git a/3party/boost/boost/iostreams/detail/adapter/range_adapter.hpp b/3party/boost/boost/iostreams/detail/adapter/range_adapter.hpp index d2b9bc55fd..1eb65c3bc3 100644 --- a/3party/boost/boost/iostreams/detail/adapter/range_adapter.hpp +++ b/3party/boost/boost/iostreams/detail/adapter/range_adapter.hpp @@ -13,7 +13,7 @@ #endif #include // min. -#include +#include #include // ptrdiff_t. #include // streamsize, streamoff. #include // boost::iterator_traits. @@ -175,7 +175,7 @@ struct range_adapter_impl { cur = last + off; break; default: - assert(0); + BOOST_ASSERT(0); } } }; diff --git a/3party/boost/boost/iostreams/detail/optional.hpp b/3party/boost/boost/iostreams/detail/optional.hpp index ee9ac3f3ea..dbb25f0040 100644 --- a/3party/boost/boost/iostreams/detail/optional.hpp +++ b/3party/boost/boost/iostreams/detail/optional.hpp @@ -18,7 +18,7 @@ # pragma once #endif -#include +#include #include #include #include @@ -52,32 +52,32 @@ public: ~optional() { reset(); } T& operator*() { - assert(initialized_); + BOOST_ASSERT(initialized_); return *static_cast(address()); } const T& operator*() const { - assert(initialized_); + BOOST_ASSERT(initialized_); return *static_cast(address()); } T* operator->() { - assert(initialized_); + BOOST_ASSERT(initialized_); return static_cast(address()); } const T* operator->() const { - assert(initialized_); + BOOST_ASSERT(initialized_); return static_cast(address()); } T* get() { - assert(initialized_); + BOOST_ASSERT(initialized_); return static_cast(address()); } const T* get() const { - assert(initialized_); + BOOST_ASSERT(initialized_); return static_cast(address()); } void reset() diff --git a/3party/boost/boost/iostreams/detail/streambuf/direct_streambuf.hpp b/3party/boost/boost/iostreams/detail/streambuf/direct_streambuf.hpp index 979f6d7b4a..46e5444b28 100644 --- a/3party/boost/boost/iostreams/detail/streambuf/direct_streambuf.hpp +++ b/3party/boost/boost/iostreams/detail/streambuf/direct_streambuf.hpp @@ -12,7 +12,7 @@ # pragma once #endif -#include +#include #include #include #include // pair. @@ -234,7 +234,7 @@ typename direct_streambuf::pos_type direct_streambuf::seek_impl case BOOST_IOS::beg: next = off; break; case BOOST_IOS::cur: next = (gptr() - ibeg_) + off; break; case BOOST_IOS::end: next = (iend_ - ibeg_) + off; break; - default: assert(0); + default: BOOST_ASSERT(0); } if (next < 0 || next > (iend_ - ibeg_)) boost::throw_exception(bad_seek()); @@ -248,7 +248,7 @@ typename direct_streambuf::pos_type direct_streambuf::seek_impl case BOOST_IOS::beg: next = off; break; case BOOST_IOS::cur: next = (pptr() - obeg_) + off; break; case BOOST_IOS::end: next = (oend_ - obeg_) + off; break; - default: assert(0); + default: BOOST_ASSERT(0); } if (next < 0 || next > (oend_ - obeg_)) boost::throw_exception(bad_seek()); diff --git a/3party/boost/boost/iostreams/filter/aggregate.hpp b/3party/boost/boost/iostreams/filter/aggregate.hpp index afac8e0cf4..d37e734507 100644 --- a/3party/boost/boost/iostreams/filter/aggregate.hpp +++ b/3party/boost/boost/iostreams/filter/aggregate.hpp @@ -13,7 +13,7 @@ #endif #include // copy, min. -#include +#include #include // back_inserter #include #include // default_device_buffer_size @@ -58,7 +58,7 @@ public: std::streamsize read(Source& src, char_type* s, std::streamsize n) { using namespace std; - assert(!(state_ & f_write)); + BOOST_ASSERT(!(state_ & f_write)); state_ |= f_read; if (!(state_ & f_eof)) do_read(src); @@ -74,7 +74,7 @@ public: template std::streamsize write(Sink&, const char_type* s, std::streamsize n) { - assert(!(state_ & f_read)); + BOOST_ASSERT(!(state_ & f_read)); state_ |= f_write; data_.insert(data_.end(), s, s + n); return n; diff --git a/3party/boost/boost/iostreams/filter/gzip.hpp b/3party/boost/boost/iostreams/filter/gzip.hpp index b4982c24ac..0f483b4463 100644 --- a/3party/boost/boost/iostreams/filter/gzip.hpp +++ b/3party/boost/boost/iostreams/filter/gzip.hpp @@ -19,7 +19,7 @@ #include // STATIC_CONSTANT, STDC_NAMESPACE, // DINKUMWARE_STDLIB, __STL_CONFIG_H. #include // min. -#include +#include #include // EOF. #include // size_t. #include // std::time_t. @@ -548,7 +548,7 @@ public: else if(footer_.crc() != this->crc()) boost::throw_exception(gzip_error(gzip::bad_crc)); } else { - assert(!"Bad state"); + BOOST_ASSERT(!"Bad state"); } } state_ = s_start; diff --git a/3party/boost/boost/iostreams/filter/line.hpp b/3party/boost/boost/iostreams/filter/line.hpp index 081747e451..9cdf7f7ee2 100644 --- a/3party/boost/boost/iostreams/filter/line.hpp +++ b/3party/boost/boost/iostreams/filter/line.hpp @@ -13,7 +13,7 @@ #endif #include // min. -#include +#include #include // allocator. #include #include // BOOST_STATIC_CONSTANT. @@ -73,7 +73,7 @@ public: std::streamsize read(Source& src, char_type* s, std::streamsize n) { using namespace std; - assert(!(flags_ & f_write)); + BOOST_ASSERT(!(flags_ & f_write)); flags_ |= f_read; // Handle unfinished business. @@ -98,7 +98,7 @@ public: std::streamsize write(Sink& snk, const char_type* s, std::streamsize n) { using namespace std; - assert(!(flags_ & f_read)); + BOOST_ASSERT(!(flags_ & f_read)); flags_ |= f_write; // Handle unfinished business. diff --git a/3party/boost/boost/iostreams/filter/newline.hpp b/3party/boost/boost/iostreams/filter/newline.hpp index 279fb9a831..ac064b716f 100644 --- a/3party/boost/boost/iostreams/filter/newline.hpp +++ b/3party/boost/boost/iostreams/filter/newline.hpp @@ -15,7 +15,7 @@ # pragma once #endif -#include +#include #include #include // logic_error. #include // BOOST_STATIC_CONSTANT. @@ -34,7 +34,7 @@ #include #define BOOST_IOSTREAMS_ASSERT_UNREACHABLE(val) \ - (assert("unreachable code" == 0), val) \ + (BOOST_ASSERT("unreachable code" == 0), val) \ /**/ namespace boost { namespace iostreams { @@ -135,7 +135,7 @@ public: using iostreams::newline::CR; using iostreams::newline::LF; - assert((flags_ & f_write) == 0); + BOOST_ASSERT((flags_ & f_write) == 0); flags_ |= f_read; if (flags_ & (f_has_LF | f_has_EOF)) { @@ -187,7 +187,7 @@ public: using iostreams::newline::CR; using iostreams::newline::LF; - assert((flags_ & f_read) == 0); + BOOST_ASSERT((flags_ & f_read) == 0); flags_ |= f_write; if ((flags_ & f_has_LF) != 0) diff --git a/3party/boost/boost/iostreams/filter/symmetric.hpp b/3party/boost/boost/iostreams/filter/symmetric.hpp index f4e8eac145..cc92b0cfa8 100644 --- a/3party/boost/boost/iostreams/filter/symmetric.hpp +++ b/3party/boost/boost/iostreams/filter/symmetric.hpp @@ -41,7 +41,7 @@ # pragma once #endif -#include +#include #include // allocator, auto_ptr. #include // BOOST_DEDUCED_TYPENAME. #include @@ -89,7 +89,7 @@ public: BOOST_PP_ENUM_BINARY_PARAMS(n, const T, &t) ) \ : pimpl_(new impl(buffer_size BOOST_PP_COMMA_IF(n) \ BOOST_PP_ENUM_PARAMS(n, t))) \ - { assert(buffer_size > 0); } \ + { BOOST_ASSERT(buffer_size > 0); } \ /**/ #define BOOST_PP_LOCAL_LIMITS (0, BOOST_IOSTREAMS_MAX_FORWARDING_ARITY) #include BOOST_PP_LOCAL_ITERATE() @@ -275,7 +275,7 @@ BOOST_IOSTREAMS_PIPABLE(symmetric_filter, 2) template void symmetric_filter::begin_read() { - assert(!(state() & f_write)); + BOOST_ASSERT(!(state() & f_write)); state() |= f_read; buf().set(0, 0); } @@ -283,7 +283,7 @@ void symmetric_filter::begin_read() template void symmetric_filter::begin_write() { - assert(!(state() & f_read)); + BOOST_ASSERT(!(state() & f_read)); state() |= f_write; buf().set(0, buf().size()); } diff --git a/3party/boost/boost/iostreams/invert.hpp b/3party/boost/boost/iostreams/invert.hpp index 7c3620351e..d88bf4c2ca 100644 --- a/3party/boost/boost/iostreams/invert.hpp +++ b/3party/boost/boost/iostreams/invert.hpp @@ -13,7 +13,7 @@ #endif #include // copy, min. -#include +#include #include // BOOST_DEDUCED_TYPENAME. #include // default_filter_buffer_size. #include @@ -78,7 +78,7 @@ public: typedef detail::counted_array_sink array_sink; typedef composite filtered_array_sink; - assert((flags() & f_write) == 0); + BOOST_ASSERT((flags() & f_write) == 0); if (flags() == 0) { flags() = f_read; buf().set(0, 0); @@ -106,7 +106,7 @@ public: typedef detail::counted_array_source array_source; typedef composite filtered_array_source; - assert((flags() & f_read) == 0); + BOOST_ASSERT((flags() & f_read) == 0); if (flags() == 0) { flags() = f_write; buf().set(0, 0); diff --git a/3party/boost/boost/iostreams/tee.hpp b/3party/boost/boost/iostreams/tee.hpp index 3638456334..bcb60a862a 100644 --- a/3party/boost/boost/iostreams/tee.hpp +++ b/3party/boost/boost/iostreams/tee.hpp @@ -12,7 +12,7 @@ # pragma once #endif -#include +#include #include // BOOST_DEDUCE_TYPENAME. #include #include @@ -66,7 +66,7 @@ public: if (result != -1) { std::streamsize result2 = iostreams::write(this->component(), s, result); (void) result2; // Suppress 'unused variable' warning. - assert(result == result2); + BOOST_ASSERT(result == result2); } return result; } @@ -77,7 +77,7 @@ public: std::streamsize result = iostreams::write(snk, s, n); std::streamsize result2 = iostreams::write(this->component(), s, result); (void) result2; // Suppress 'unused variable' warning. - assert(result == result2); + BOOST_ASSERT(result == result2); return result; } @@ -158,7 +158,7 @@ public: std::streamsize result2 = iostreams::write(sink_, s, result1); (void) result1; // Suppress 'unused variable' warning. (void) result2; - assert(result1 == result2); + BOOST_ASSERT(result1 == result2); } return result1; } @@ -173,7 +173,7 @@ public: std::streamsize result2 = iostreams::write(sink_, s, n); (void) result1; // Suppress 'unused variable' warning. (void) result2; - assert(result1 == n && result2 == n); + BOOST_ASSERT(result1 == n && result2 == n); return n; } void close() diff --git a/3party/boost/boost/iterator/iterator_facade.hpp b/3party/boost/boost/iterator/iterator_facade.hpp index 967d60f2ba..5ee73b5aa4 100644 --- a/3party/boost/boost/iterator/iterator_facade.hpp +++ b/3party/boost/boost/iterator/iterator_facade.hpp @@ -105,6 +105,7 @@ namespace boost typedef typename remove_const::type value_type; + // Not the real associated pointer type typedef typename mpl::eval_if< boost::detail::iterator_writability_disabled , add_pointer @@ -323,7 +324,7 @@ namespace boost static type make(Reference x) { - return implicit_cast(&x); + return boost::implicit_cast(&x); } }; @@ -617,6 +618,12 @@ namespace boost Value, CategoryOrTraversal, Reference, Difference > associated_types; + typedef boost::detail::operator_arrow_result< + typename associated_types::value_type + , Reference + , typename associated_types::pointer + > pointer_; + protected: // For use by derived classes typedef iterator_facade iterator_facade_; @@ -626,7 +633,9 @@ namespace boost typedef typename associated_types::value_type value_type; typedef Reference reference; typedef Difference difference_type; - typedef typename associated_types::pointer pointer; + + typedef typename pointer_::type pointer; + typedef typename associated_types::iterator_category iterator_category; reference operator*() const @@ -634,18 +643,9 @@ namespace boost return iterator_core_access::dereference(this->derived()); } - typename boost::detail::operator_arrow_result< - value_type - , reference - , pointer - >::type - operator->() const + pointer operator->() const { - return boost::detail::operator_arrow_result< - value_type - , reference - , pointer - >::make(*this->derived()); + return pointer_::make(*this->derived()); } typename boost::detail::operator_brackets_result::type diff --git a/3party/boost/boost/math/bindings/mpfr.hpp b/3party/boost/boost/math/bindings/mpfr.hpp index 25336cadc1..5b773e7983 100644 --- a/3party/boost/boost/math/bindings/mpfr.hpp +++ b/3party/boost/boost/math/bindings/mpfr.hpp @@ -11,7 +11,23 @@ #ifndef BOOST_MATH_MPLFR_BINDINGS_HPP #define BOOST_MATH_MPLFR_BINDINGS_HPP +#include + +#ifdef BOOST_MSVC +// +// We get a lot of warnings from the gmp, mpfr and gmpfrxx headers, +// disable them here, so we only see warnings from *our* code: +// +#pragma warning(push) +#pragma warning(disable: 4127 4800 4512) +#endif + #include + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + #include #include #include diff --git a/3party/boost/boost/math/bindings/mpreal.hpp b/3party/boost/boost/math/bindings/mpreal.hpp new file mode 100644 index 0000000000..7eb06a88f9 --- /dev/null +++ b/3party/boost/boost/math/bindings/mpreal.hpp @@ -0,0 +1,896 @@ +// Copyright John Maddock 2008. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// Wrapper that works with mpfr::mpreal defined in gmpfrxx.h +// See http://math.berkeley.edu/~wilken/code/gmpfrxx/ +// Also requires the gmp and mpfr libraries. +// + +#ifndef BOOST_MATH_MPREAL_BINDINGS_HPP +#define BOOST_MATH_MPREAL_BINDINGS_HPP + +#include + +#ifdef BOOST_MSVC +// +// We get a lot of warnings from the gmp, mpfr and gmpfrxx headers, +// disable them here, so we only see warnings from *our* code: +// +#pragma warning(push) +#pragma warning(disable: 4127 4800 4512) +#endif + +#include + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include +#include +#include +#include +#include +#include +#include + +namespace mpfr{ + +template +inline mpreal operator + (const mpreal& r, const T& t){ return r + mpreal(t); } +template +inline mpreal operator - (const mpreal& r, const T& t){ return r - mpreal(t); } +template +inline mpreal operator * (const mpreal& r, const T& t){ return r * mpreal(t); } +template +inline mpreal operator / (const mpreal& r, const T& t){ return r / mpreal(t); } + +template +inline mpreal operator + (const T& t, const mpreal& r){ return mpreal(t) + r; } +template +inline mpreal operator - (const T& t, const mpreal& r){ return mpreal(t) - r; } +template +inline mpreal operator * (const T& t, const mpreal& r){ return mpreal(t) * r; } +template +inline mpreal operator / (const T& t, const mpreal& r){ return mpreal(t) / r; } + +template +inline bool operator == (const mpreal& r, const T& t){ return r == mpreal(t); } +template +inline bool operator != (const mpreal& r, const T& t){ return r != mpreal(t); } +template +inline bool operator <= (const mpreal& r, const T& t){ return r <= mpreal(t); } +template +inline bool operator >= (const mpreal& r, const T& t){ return r >= mpreal(t); } +template +inline bool operator < (const mpreal& r, const T& t){ return r < mpreal(t); } +template +inline bool operator > (const mpreal& r, const T& t){ return r > mpreal(t); } + +template +inline bool operator == (const T& t, const mpreal& r){ return mpreal(t) == r; } +template +inline bool operator != (const T& t, const mpreal& r){ return mpreal(t) != r; } +template +inline bool operator <= (const T& t, const mpreal& r){ return mpreal(t) <= r; } +template +inline bool operator >= (const T& t, const mpreal& r){ return mpreal(t) >= r; } +template +inline bool operator < (const T& t, const mpreal& r){ return mpreal(t) < r; } +template +inline bool operator > (const T& t, const mpreal& r){ return mpreal(t) > r; } + +/* +inline mpfr::mpreal fabs(const mpfr::mpreal& v) +{ + return abs(v); +} +inline mpfr::mpreal pow(const mpfr::mpreal& b, const mpfr::mpreal e) +{ + mpfr::mpreal result; + mpfr_pow(result.__get_mp(), b.__get_mp(), e.__get_mp(), GMP_RNDN); + return result; +} +*/ +inline mpfr::mpreal ldexp(const mpfr::mpreal& v, int e) +{ + return mpfr::ldexp(v, static_cast(e)); +} + +inline mpfr::mpreal frexp(const mpfr::mpreal& v, int* expon) +{ + mp_exp_t e; + mpfr::mpreal r = mpfr::frexp(v, &e); + *expon = e; + return r; +} + +#if (MPFR_VERSION < MPFR_VERSION_NUM(2,4,0)) +mpfr::mpreal fmod(const mpfr::mpreal& v1, const mpfr::mpreal& v2) +{ + mpfr::mpreal n; + if(v1 < 0) + n = ceil(v1 / v2); + else + n = floor(v1 / v2); + return v1 - n * v2; +} +#endif + +template +inline mpfr::mpreal modf(const mpfr::mpreal& v, long long* ipart, const Policy& pol) +{ + *ipart = lltrunc(v, pol); + return v - boost::math::tools::real_cast(*ipart); +} +template +inline int iround(mpfr::mpreal const& x, const Policy& pol) +{ + return boost::math::tools::real_cast(boost::math::round(x, pol)); +} + +template +inline long lround(mpfr::mpreal const& x, const Policy& pol) +{ + return boost::math::tools::real_cast(boost::math::round(x, pol)); +} + +template +inline long long llround(mpfr::mpreal const& x, const Policy& pol) +{ + return boost::math::tools::real_cast(boost::math::round(x, pol)); +} + +template +inline int itrunc(mpfr::mpreal const& x, const Policy& pol) +{ + return boost::math::tools::real_cast(boost::math::trunc(x, pol)); +} + +template +inline long ltrunc(mpfr::mpreal const& x, const Policy& pol) +{ + return boost::math::tools::real_cast(boost::math::trunc(x, pol)); +} + +template +inline long long lltrunc(mpfr::mpreal const& x, const Policy& pol) +{ + return boost::math::tools::real_cast(boost::math::trunc(x, pol)); +} + +} + +namespace boost{ namespace math{ + +#if defined(__GNUC__) && (__GNUC__ < 4) + using ::iround; + using ::lround; + using ::llround; + using ::itrunc; + using ::ltrunc; + using ::lltrunc; + using ::modf; +#endif + +namespace lanczos{ + +struct mpreal_lanczos +{ + static mpfr::mpreal lanczos_sum(const mpfr::mpreal& z) + { + unsigned long p = z.get_default_prec(); + if(p <= 72) + return lanczos13UDT::lanczos_sum(z); + else if(p <= 120) + return lanczos22UDT::lanczos_sum(z); + else if(p <= 170) + return lanczos31UDT::lanczos_sum(z); + else //if(p <= 370) approx 100 digit precision: + return lanczos61UDT::lanczos_sum(z); + } + static mpfr::mpreal lanczos_sum_expG_scaled(const mpfr::mpreal& z) + { + unsigned long p = z.get_default_prec(); + if(p <= 72) + return lanczos13UDT::lanczos_sum_expG_scaled(z); + else if(p <= 120) + return lanczos22UDT::lanczos_sum_expG_scaled(z); + else if(p <= 170) + return lanczos31UDT::lanczos_sum_expG_scaled(z); + else //if(p <= 370) approx 100 digit precision: + return lanczos61UDT::lanczos_sum_expG_scaled(z); + } + static mpfr::mpreal lanczos_sum_near_1(const mpfr::mpreal& z) + { + unsigned long p = z.get_default_prec(); + if(p <= 72) + return lanczos13UDT::lanczos_sum_near_1(z); + else if(p <= 120) + return lanczos22UDT::lanczos_sum_near_1(z); + else if(p <= 170) + return lanczos31UDT::lanczos_sum_near_1(z); + else //if(p <= 370) approx 100 digit precision: + return lanczos61UDT::lanczos_sum_near_1(z); + } + static mpfr::mpreal lanczos_sum_near_2(const mpfr::mpreal& z) + { + unsigned long p = z.get_default_prec(); + if(p <= 72) + return lanczos13UDT::lanczos_sum_near_2(z); + else if(p <= 120) + return lanczos22UDT::lanczos_sum_near_2(z); + else if(p <= 170) + return lanczos31UDT::lanczos_sum_near_2(z); + else //if(p <= 370) approx 100 digit precision: + return lanczos61UDT::lanczos_sum_near_2(z); + } + static mpfr::mpreal g() + { + unsigned long p = mpfr::mpreal::get_default_prec(); + if(p <= 72) + return lanczos13UDT::g(); + else if(p <= 120) + return lanczos22UDT::g(); + else if(p <= 170) + return lanczos31UDT::g(); + else //if(p <= 370) approx 100 digit precision: + return lanczos61UDT::g(); + } +}; + +template +struct lanczos +{ + typedef mpreal_lanczos type; +}; + +} // namespace lanczos + +namespace tools +{ + +template<> +inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpfr::mpreal)) +{ + return mpfr::mpreal::get_default_prec(); +} + +namespace detail{ + +template +void convert_to_long_result(mpfr::mpreal const& r, I& result) +{ + result = 0; + I last_result(0); + mpfr::mpreal t(r); + double term; + do + { + term = real_cast(t); + last_result = result; + result += static_cast(term); + t -= term; + }while(result != last_result); +} + +} + +template <> +inline mpfr::mpreal real_cast(long long t) +{ + mpfr::mpreal result; + int expon = 0; + int sign = 1; + if(t < 0) + { + sign = -1; + t = -t; + } + while(t) + { + result += ldexp((double)(t & 0xffffL), expon); + expon += 32; + t >>= 32; + } + return result * sign; +} +/* +template <> +inline unsigned real_cast(mpfr::mpreal t) +{ + return t.get_ui(); +} +template <> +inline int real_cast(mpfr::mpreal t) +{ + return t.get_si(); +} +template <> +inline double real_cast(mpfr::mpreal t) +{ + return t.get_d(); +} +template <> +inline float real_cast(mpfr::mpreal t) +{ + return static_cast(t.get_d()); +} +template <> +inline long real_cast(mpfr::mpreal t) +{ + long result; + detail::convert_to_long_result(t, result); + return result; +} +*/ +template <> +inline long long real_cast(mpfr::mpreal t) +{ + long long result; + detail::convert_to_long_result(t, result); + return result; +} + +template <> +inline mpfr::mpreal max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpfr::mpreal)) +{ + static bool has_init = false; + static mpfr::mpreal val(0.5); + if(!has_init) + { + val = ldexp(val, mpfr_get_emax()); + has_init = true; + } + return val; +} + +template <> +inline mpfr::mpreal min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpfr::mpreal)) +{ + static bool has_init = false; + static mpfr::mpreal val(0.5); + if(!has_init) + { + val = ldexp(val, mpfr_get_emin()); + has_init = true; + } + return val; +} + +template <> +inline mpfr::mpreal log_max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpfr::mpreal)) +{ + static bool has_init = false; + static mpfr::mpreal val = max_value(); + if(!has_init) + { + val = log(val); + has_init = true; + } + return val; +} + +template <> +inline mpfr::mpreal log_min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpfr::mpreal)) +{ + static bool has_init = false; + static mpfr::mpreal val = max_value(); + if(!has_init) + { + val = log(val); + has_init = true; + } + return val; +} + +template <> +inline mpfr::mpreal epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpfr::mpreal)) +{ + return ldexp(mpfr::mpreal(1), 1-boost::math::policies::digits >()); +} + +} // namespace tools + +template +inline mpfr::mpreal skewness(const extreme_value_distribution& /*dist*/) +{ + // + // This is 12 * sqrt(6) * zeta(3) / pi^3: + // See http://mathworld.wolfram.com/ExtremeValueDistribution.html + // + return boost::lexical_cast("1.1395470994046486574927930193898461120875997958366"); +} + +template +inline mpfr::mpreal skewness(const rayleigh_distribution& /*dist*/) +{ + // using namespace boost::math::constants; + return boost::lexical_cast("0.63111065781893713819189935154422777984404221106391"); + // Computed using NTL at 150 bit, about 50 decimal digits. + // return 2 * root_pi() * pi_minus_three() / pow23_four_minus_pi(); +} + +template +inline mpfr::mpreal kurtosis(const rayleigh_distribution& /*dist*/) +{ + // using namespace boost::math::constants; + return boost::lexical_cast("3.2450893006876380628486604106197544154170667057995"); + // Computed using NTL at 150 bit, about 50 decimal digits. + // return 3 - (6 * pi() * pi() - 24 * pi() + 16) / + // (four_minus_pi() * four_minus_pi()); +} + +template +inline mpfr::mpreal kurtosis_excess(const rayleigh_distribution& /*dist*/) +{ + //using namespace boost::math::constants; + // Computed using NTL at 150 bit, about 50 decimal digits. + return boost::lexical_cast("0.2450893006876380628486604106197544154170667057995"); + // return -(6 * pi() * pi() - 24 * pi() + 16) / + // (four_minus_pi() * four_minus_pi()); +} // kurtosis + +namespace detail{ + +// +// Version of Digamma accurate to ~100 decimal digits. +// +template +mpfr::mpreal digamma_imp(mpfr::mpreal x, const mpl::int_<0>* , const Policy& pol) +{ + // + // This handles reflection of negative arguments, and all our + // empfr_classor handling, then forwards to the T-specific approximation. + // + BOOST_MATH_STD_USING // ADL of std functions. + + mpfr::mpreal result = 0; + // + // Check for negative arguments and use reflection: + // + if(x < 0) + { + // Reflect: + x = 1 - x; + // Argument reduction for tan: + mpfr::mpreal remainder = x - floor(x); + // Shift to negative if > 0.5: + if(remainder > 0.5) + { + remainder -= 1; + } + // + // check for evaluation at a negative pole: + // + if(remainder == 0) + { + return policies::raise_pole_error("boost::math::digamma<%1%>(%1%)", 0, (1-x), pol); + } + result = constants::pi() / tan(constants::pi() * remainder); + } + result += big_digamma(x); + return result; +} +// +// Specialisations of this function provides the initial +// starting guess for Halley iteration: +// +template +mpfr::mpreal erf_inv_imp(const mpfr::mpreal& p, const mpfr::mpreal& q, const Policy&, const boost::mpl::int_<64>*) +{ + BOOST_MATH_STD_USING // for ADL of std names. + + mpfr::mpreal result = 0; + + if(p <= 0.5) + { + // + // Evaluate inverse erf using the rational approximation: + // + // x = p(p+10)(Y+R(p)) + // + // Where Y is a constant, and R(p) is optimised for a low + // absolute empfr_classor compared to |Y|. + // + // double: Max empfr_classor found: 2.001849e-18 + // long double: Max empfr_classor found: 1.017064e-20 + // Maximum Deviation Found (actual empfr_classor term at infinite precision) 8.030e-21 + // + static const float Y = 0.0891314744949340820313f; + static const mpfr::mpreal P[] = { + -0.000508781949658280665617, + -0.00836874819741736770379, + 0.0334806625409744615033, + -0.0126926147662974029034, + -0.0365637971411762664006, + 0.0219878681111168899165, + 0.00822687874676915743155, + -0.00538772965071242932965 + }; + static const mpfr::mpreal Q[] = { + 1, + -0.970005043303290640362, + -1.56574558234175846809, + 1.56221558398423026363, + 0.662328840472002992063, + -0.71228902341542847553, + -0.0527396382340099713954, + 0.0795283687341571680018, + -0.00233393759374190016776, + 0.000886216390456424707504 + }; + mpfr::mpreal g = p * (p + 10); + mpfr::mpreal r = tools::evaluate_polynomial(P, p) / tools::evaluate_polynomial(Q, p); + result = g * Y + g * r; + } + else if(q >= 0.25) + { + // + // Rational approximation for 0.5 > q >= 0.25 + // + // x = sqrt(-2*log(q)) / (Y + R(q)) + // + // Where Y is a constant, and R(q) is optimised for a low + // absolute empfr_classor compared to Y. + // + // double : Max empfr_classor found: 7.403372e-17 + // long double : Max empfr_classor found: 6.084616e-20 + // Maximum Deviation Found (empfr_classor term) 4.811e-20 + // + static const float Y = 2.249481201171875f; + static const mpfr::mpreal P[] = { + -0.202433508355938759655, + 0.105264680699391713268, + 8.37050328343119927838, + 17.6447298408374015486, + -18.8510648058714251895, + -44.6382324441786960818, + 17.445385985570866523, + 21.1294655448340526258, + -3.67192254707729348546 + }; + static const mpfr::mpreal Q[] = { + 1, + 6.24264124854247537712, + 3.9713437953343869095, + -28.6608180499800029974, + -20.1432634680485188801, + 48.5609213108739935468, + 10.8268667355460159008, + -22.6436933413139721736, + 1.72114765761200282724 + }; + mpfr::mpreal g = sqrt(-2 * log(q)); + mpfr::mpreal xs = q - 0.25; + mpfr::mpreal r = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = g / (Y + r); + } + else + { + // + // For q < 0.25 we have a series of rational approximations all + // of the general form: + // + // let: x = sqrt(-log(q)) + // + // Then the result is given by: + // + // x(Y+R(x-B)) + // + // where Y is a constant, B is the lowest value of x for which + // the approximation is valid, and R(x-B) is optimised for a low + // absolute empfr_classor compared to Y. + // + // Note that almost all code will really go through the first + // or maybe second approximation. After than we're dealing with very + // small input values indeed: 80 and 128 bit long double's go all the + // way down to ~ 1e-5000 so the "tail" is rather long... + // + mpfr::mpreal x = sqrt(-log(q)); + if(x < 3) + { + // Max empfr_classor found: 1.089051e-20 + static const float Y = 0.807220458984375f; + static const mpfr::mpreal P[] = { + -0.131102781679951906451, + -0.163794047193317060787, + 0.117030156341995252019, + 0.387079738972604337464, + 0.337785538912035898924, + 0.142869534408157156766, + 0.0290157910005329060432, + 0.00214558995388805277169, + -0.679465575181126350155e-6, + 0.285225331782217055858e-7, + -0.681149956853776992068e-9 + }; + static const mpfr::mpreal Q[] = { + 1, + 3.46625407242567245975, + 5.38168345707006855425, + 4.77846592945843778382, + 2.59301921623620271374, + 0.848854343457902036425, + 0.152264338295331783612, + 0.01105924229346489121 + }; + mpfr::mpreal xs = x - 1.125; + mpfr::mpreal R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else if(x < 6) + { + // Max empfr_classor found: 8.389174e-21 + static const float Y = 0.93995571136474609375f; + static const mpfr::mpreal P[] = { + -0.0350353787183177984712, + -0.00222426529213447927281, + 0.0185573306514231072324, + 0.00950804701325919603619, + 0.00187123492819559223345, + 0.000157544617424960554631, + 0.460469890584317994083e-5, + -0.230404776911882601748e-9, + 0.266339227425782031962e-11 + }; + static const mpfr::mpreal Q[] = { + 1, + 1.3653349817554063097, + 0.762059164553623404043, + 0.220091105764131249824, + 0.0341589143670947727934, + 0.00263861676657015992959, + 0.764675292302794483503e-4 + }; + mpfr::mpreal xs = x - 3; + mpfr::mpreal R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else if(x < 18) + { + // Max empfr_classor found: 1.481312e-19 + static const float Y = 0.98362827301025390625f; + static const mpfr::mpreal P[] = { + -0.0167431005076633737133, + -0.00112951438745580278863, + 0.00105628862152492910091, + 0.000209386317487588078668, + 0.149624783758342370182e-4, + 0.449696789927706453732e-6, + 0.462596163522878599135e-8, + -0.281128735628831791805e-13, + 0.99055709973310326855e-16 + }; + static const mpfr::mpreal Q[] = { + 1, + 0.591429344886417493481, + 0.138151865749083321638, + 0.0160746087093676504695, + 0.000964011807005165528527, + 0.275335474764726041141e-4, + 0.282243172016108031869e-6 + }; + mpfr::mpreal xs = x - 6; + mpfr::mpreal R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else if(x < 44) + { + // Max empfr_classor found: 5.697761e-20 + static const float Y = 0.99714565277099609375f; + static const mpfr::mpreal P[] = { + -0.0024978212791898131227, + -0.779190719229053954292e-5, + 0.254723037413027451751e-4, + 0.162397777342510920873e-5, + 0.396341011304801168516e-7, + 0.411632831190944208473e-9, + 0.145596286718675035587e-11, + -0.116765012397184275695e-17 + }; + static const mpfr::mpreal Q[] = { + 1, + 0.207123112214422517181, + 0.0169410838120975906478, + 0.000690538265622684595676, + 0.145007359818232637924e-4, + 0.144437756628144157666e-6, + 0.509761276599778486139e-9 + }; + mpfr::mpreal xs = x - 18; + mpfr::mpreal R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + else + { + // Max empfr_classor found: 1.279746e-20 + static const float Y = 0.99941349029541015625f; + static const mpfr::mpreal P[] = { + -0.000539042911019078575891, + -0.28398759004727721098e-6, + 0.899465114892291446442e-6, + 0.229345859265920864296e-7, + 0.225561444863500149219e-9, + 0.947846627503022684216e-12, + 0.135880130108924861008e-14, + -0.348890393399948882918e-21 + }; + static const mpfr::mpreal Q[] = { + 1, + 0.0845746234001899436914, + 0.00282092984726264681981, + 0.468292921940894236786e-4, + 0.399968812193862100054e-6, + 0.161809290887904476097e-8, + 0.231558608310259605225e-11 + }; + mpfr::mpreal xs = x - 44; + mpfr::mpreal R = tools::evaluate_polynomial(P, xs) / tools::evaluate_polynomial(Q, xs); + result = Y * x + R * x; + } + } + return result; +} + +mpfr::mpreal bessel_i0(mpfr::mpreal x) +{ + static const mpfr::mpreal P1[] = { + boost::lexical_cast("-2.2335582639474375249e+15"), + boost::lexical_cast("-5.5050369673018427753e+14"), + boost::lexical_cast("-3.2940087627407749166e+13"), + boost::lexical_cast("-8.4925101247114157499e+11"), + boost::lexical_cast("-1.1912746104985237192e+10"), + boost::lexical_cast("-1.0313066708737980747e+08"), + boost::lexical_cast("-5.9545626019847898221e+05"), + boost::lexical_cast("-2.4125195876041896775e+03"), + boost::lexical_cast("-7.0935347449210549190e+00"), + boost::lexical_cast("-1.5453977791786851041e-02"), + boost::lexical_cast("-2.5172644670688975051e-05"), + boost::lexical_cast("-3.0517226450451067446e-08"), + boost::lexical_cast("-2.6843448573468483278e-11"), + boost::lexical_cast("-1.5982226675653184646e-14"), + boost::lexical_cast("-5.2487866627945699800e-18"), + }; + static const mpfr::mpreal Q1[] = { + boost::lexical_cast("-2.2335582639474375245e+15"), + boost::lexical_cast("7.8858692566751002988e+12"), + boost::lexical_cast("-1.2207067397808979846e+10"), + boost::lexical_cast("1.0377081058062166144e+07"), + boost::lexical_cast("-4.8527560179962773045e+03"), + boost::lexical_cast("1.0"), + }; + static const mpfr::mpreal P2[] = { + boost::lexical_cast("-2.2210262233306573296e-04"), + boost::lexical_cast("1.3067392038106924055e-02"), + boost::lexical_cast("-4.4700805721174453923e-01"), + boost::lexical_cast("5.5674518371240761397e+00"), + boost::lexical_cast("-2.3517945679239481621e+01"), + boost::lexical_cast("3.1611322818701131207e+01"), + boost::lexical_cast("-9.6090021968656180000e+00"), + }; + static const mpfr::mpreal Q2[] = { + boost::lexical_cast("-5.5194330231005480228e-04"), + boost::lexical_cast("3.2547697594819615062e-02"), + boost::lexical_cast("-1.1151759188741312645e+00"), + boost::lexical_cast("1.3982595353892851542e+01"), + boost::lexical_cast("-6.0228002066743340583e+01"), + boost::lexical_cast("8.5539563258012929600e+01"), + boost::lexical_cast("-3.1446690275135491500e+01"), + boost::lexical_cast("1.0"), + }; + mpfr::mpreal value, factor, r; + + BOOST_MATH_STD_USING + using namespace boost::math::tools; + + if (x < 0) + { + x = -x; // even function + } + if (x == 0) + { + return static_cast(1); + } + if (x <= 15) // x in (0, 15] + { + mpfr::mpreal y = x * x; + value = evaluate_polynomial(P1, y) / evaluate_polynomial(Q1, y); + } + else // x in (15, \infty) + { + mpfr::mpreal y = 1 / x - 1 / 15; + r = evaluate_polynomial(P2, y) / evaluate_polynomial(Q2, y); + factor = exp(x) / sqrt(x); + value = factor * r; + } + + return value; +} + +mpfr::mpreal bessel_i1(mpfr::mpreal x) +{ + static const mpfr::mpreal P1[] = { + static_cast("-1.4577180278143463643e+15"), + static_cast("-1.7732037840791591320e+14"), + static_cast("-6.9876779648010090070e+12"), + static_cast("-1.3357437682275493024e+11"), + static_cast("-1.4828267606612366099e+09"), + static_cast("-1.0588550724769347106e+07"), + static_cast("-5.1894091982308017540e+04"), + static_cast("-1.8225946631657315931e+02"), + static_cast("-4.7207090827310162436e-01"), + static_cast("-9.1746443287817501309e-04"), + static_cast("-1.3466829827635152875e-06"), + static_cast("-1.4831904935994647675e-09"), + static_cast("-1.1928788903603238754e-12"), + static_cast("-6.5245515583151902910e-16"), + static_cast("-1.9705291802535139930e-19"), + }; + static const mpfr::mpreal Q1[] = { + static_cast("-2.9154360556286927285e+15"), + static_cast("9.7887501377547640438e+12"), + static_cast("-1.4386907088588283434e+10"), + static_cast("1.1594225856856884006e+07"), + static_cast("-5.1326864679904189920e+03"), + static_cast("1.0"), + }; + static const mpfr::mpreal P2[] = { + static_cast("1.4582087408985668208e-05"), + static_cast("-8.9359825138577646443e-04"), + static_cast("2.9204895411257790122e-02"), + static_cast("-3.4198728018058047439e-01"), + static_cast("1.3960118277609544334e+00"), + static_cast("-1.9746376087200685843e+00"), + static_cast("8.5591872901933459000e-01"), + static_cast("-6.0437159056137599999e-02"), + }; + static const mpfr::mpreal Q2[] = { + static_cast("3.7510433111922824643e-05"), + static_cast("-2.2835624489492512649e-03"), + static_cast("7.4212010813186530069e-02"), + static_cast("-8.5017476463217924408e-01"), + static_cast("3.2593714889036996297e+00"), + static_cast("-3.8806586721556593450e+00"), + static_cast("1.0"), + }; + mpfr::mpreal value, factor, r, w; + + BOOST_MATH_STD_USING + using namespace boost::math::tools; + + w = abs(x); + if (x == 0) + { + return static_cast(0); + } + if (w <= 15) // w in (0, 15] + { + mpfr::mpreal y = x * x; + r = evaluate_polynomial(P1, y) / evaluate_polynomial(Q1, y); + factor = w; + value = factor * r; + } + else // w in (15, \infty) + { + mpfr::mpreal y = 1 / w - mpfr::mpreal(1) / 15; + r = evaluate_polynomial(P2, y) / evaluate_polynomial(Q2, y); + factor = exp(w) / sqrt(w); + value = factor * r; + } + + if (x < 0) + { + value *= -value; // odd function + } + return value; +} + +} // namespace detail + +}} + +#endif // BOOST_MATH_MPLFR_BINDINGS_HPP + diff --git a/3party/boost/boost/math/concepts/distributions.hpp b/3party/boost/boost/math/concepts/distributions.hpp index 7e656990cb..5758e1429f 100644 --- a/3party/boost/boost/math/concepts/distributions.hpp +++ b/3party/boost/boost/math/concepts/distributions.hpp @@ -12,11 +12,13 @@ #define BOOST_MATH_DISTRIBUTION_CONCEPT_HPP #include +#include #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4100) #pragma warning(disable: 4510) #pragma warning(disable: 4610) +#pragma warning(disable: 4189) // local variable is initialized but not referenced. #endif #include #ifdef BOOST_MSVC @@ -115,13 +117,13 @@ std::pair support(const distribution_archetype& di template struct DistributionConcept { + typedef typename Distribution::value_type value_type; + void constraints() { function_requires >(); function_requires >(); - typedef typename Distribution::value_type value_type; - const Distribution& dist = DistributionConcept::get_object(); value_type x = 0; @@ -188,6 +190,232 @@ struct DistributionConcept v = quantile(complement(dist, li)); v = hazard(dist, li); v = chf(dist, li); + test_extra_members(dist); + } + template + static void test_extra_members(const D&) + {} + template + static void test_extra_members(const boost::math::bernoulli_distribution& d) + { + value_type r = d.success_fraction(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::beta_distribution& d) + { + value_type r1 = d.alpha(); + value_type r2 = d.beta(); + r1 = boost::math::beta_distribution::find_alpha(r1, r2); + r1 = boost::math::beta_distribution::find_beta(r1, r2); + r1 = boost::math::beta_distribution::find_alpha(r1, r2, r1); + r1 = boost::math::beta_distribution::find_beta(r1, r2, r1); + (void)r1; // warning suppression + (void)r2; // warning suppression + } + template + static void test_extra_members(const boost::math::binomial_distribution& d) + { + value_type r = d.success_fraction(); + r = d.trials(); + r = Distribution::find_lower_bound_on_p(r, r, r); + r = Distribution::find_lower_bound_on_p(r, r, r, Distribution::clopper_pearson_exact_interval); + r = Distribution::find_lower_bound_on_p(r, r, r, Distribution::jeffreys_prior_interval); + r = Distribution::find_upper_bound_on_p(r, r, r); + r = Distribution::find_upper_bound_on_p(r, r, r, Distribution::clopper_pearson_exact_interval); + r = Distribution::find_upper_bound_on_p(r, r, r, Distribution::jeffreys_prior_interval); + r = Distribution::find_minimum_number_of_trials(r, r, r); + r = Distribution::find_maximum_number_of_trials(r, r, r); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::cauchy_distribution& d) + { + value_type r = d.location(); + r = d.scale(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::chi_squared_distribution& d) + { + value_type r = d.degrees_of_freedom(); + r = Distribution::find_degrees_of_freedom(r, r, r, r); + r = Distribution::find_degrees_of_freedom(r, r, r, r, r); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::exponential_distribution& d) + { + value_type r = d.lambda(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::extreme_value_distribution& d) + { + value_type r = d.scale(); + r = d.location(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::fisher_f_distribution& d) + { + value_type r = d.degrees_of_freedom1(); + r = d.degrees_of_freedom2(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::gamma_distribution& d) + { + value_type r = d.scale(); + r = d.shape(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::inverse_chi_squared_distribution& d) + { + value_type r = d.scale(); + r = d.degrees_of_freedom(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::inverse_gamma_distribution& d) + { + value_type r = d.scale(); + r = d.shape(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::hypergeometric_distribution& d) + { + unsigned u = d.defective(); + u = d.sample_count(); + u = d.total(); + (void)u; // warning suppression + } + template + static void test_extra_members(const boost::math::laplace_distribution& d) + { + value_type r = d.scale(); + r = d.location(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::logistic_distribution& d) + { + value_type r = d.scale(); + r = d.location(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::lognormal_distribution& d) + { + value_type r = d.scale(); + r = d.location(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::negative_binomial_distribution& d) + { + value_type r = d.success_fraction(); + r = d.successes(); + r = Distribution::find_lower_bound_on_p(r, r, r); + r = Distribution::find_upper_bound_on_p(r, r, r); + r = Distribution::find_minimum_number_of_trials(r, r, r); + r = Distribution::find_maximum_number_of_trials(r, r, r); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::non_central_beta_distribution& d) + { + value_type r1 = d.alpha(); + value_type r2 = d.beta(); + r1 = d.non_centrality(); + (void)r1; // warning suppression + (void)r2; // warning suppression + } + template + static void test_extra_members(const boost::math::non_central_chi_squared_distribution& d) + { + value_type r = d.degrees_of_freedom(); + r = d.non_centrality(); + r = Distribution::find_degrees_of_freedom(r, r, r); + r = Distribution::find_degrees_of_freedom(boost::math::complement(r, r, r)); + r = Distribution::find_non_centrality(r, r, r); + r = Distribution::find_non_centrality(boost::math::complement(r, r, r)); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::non_central_f_distribution& d) + { + value_type r = d.degrees_of_freedom1(); + r = d.degrees_of_freedom2(); + r = d.non_centrality(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::non_central_t_distribution& d) + { + value_type r = d.degrees_of_freedom(); + r = d.non_centrality(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::normal_distribution& d) + { + value_type r = d.scale(); + r = d.location(); + r = d.mean(); + r = d.standard_deviation(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::pareto_distribution& d) + { + value_type r = d.scale(); + r = d.shape(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::poisson_distribution& d) + { + value_type r = d.mean(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::rayleigh_distribution& d) + { + value_type r = d.sigma(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::students_t_distribution& d) + { + value_type r = d.degrees_of_freedom(); + r = d.find_degrees_of_freedom(r, r, r, r); + r = d.find_degrees_of_freedom(r, r, r, r, r); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::triangular_distribution& d) + { + value_type r = d.lower(); + r = d.mode(); + r = d.upper(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::weibull_distribution& d) + { + value_type r = d.scale(); + r = d.shape(); + (void)r; // warning suppression + } + template + static void test_extra_members(const boost::math::uniform_distribution& d) + { + value_type r = d.lower(); + r = d.upper(); + (void)r; // warning suppression } private: static Distribution& get_object() diff --git a/3party/boost/boost/math/constants/constants.hpp b/3party/boost/boost/math/constants/constants.hpp index 7fb6a786dd..416c2c9884 100644 --- a/3party/boost/boost/math/constants/constants.hpp +++ b/3party/boost/boost/math/constants/constants.hpp @@ -1,5 +1,5 @@ // Copyright John Maddock 2005-2006. -// Copyright Paul A. Bristow 2006-7. +// Copyright Paul A. Bristow 2006-2010. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -50,6 +50,8 @@ namespace boost{ namespace math { return BOOST_JOIN(BOOST_JOIN(x, BOOST_JOIN(e, exp)), L); } BOOST_DEFINE_MATH_CONSTANT(pi, 3.141592653589793238462643383279502884197169399375105820974944, 59230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196, 0) + BOOST_DEFINE_MATH_CONSTANT(two_pi, 6.2831853071795864769252867665590057683943388015061, 0, 0) + BOOST_DEFINE_MATH_CONSTANT(one_div_two_pi, 0.70710678118654752440084436210484903928483593756084, 0, 0) BOOST_DEFINE_MATH_CONSTANT(root_pi, 1.7724538509055160272981674833411451827975, 0, 0) BOOST_DEFINE_MATH_CONSTANT(root_half_pi, 1.253314137315500251207882642405522626503, 0, 0) BOOST_DEFINE_MATH_CONSTANT(root_two_pi, 2.506628274631000502415765284811045253007, 0, 0) @@ -58,6 +60,7 @@ namespace boost{ namespace math BOOST_DEFINE_MATH_CONSTANT(half, 0.5, 0, 0) BOOST_DEFINE_MATH_CONSTANT(euler, 0.577215664901532860606512090082402431042159335939923598805, 76723488486, 0) BOOST_DEFINE_MATH_CONSTANT(root_two, 1.414213562373095048801688724209698078569671875376948073, 17667973799073247846210703885038753432764157273501384623091229702492483605585073721264412149709993583141322266592750559275579995050115278206, 0) + BOOST_DEFINE_MATH_CONSTANT(half_root_two, 0.70710678118654752440084436210484903928483593756084, 0, 0) BOOST_DEFINE_MATH_CONSTANT(ln_two, 0.693147180559945309417232121458176568075500134360255254, 120680009493393621969694715605863326996418687, 0) BOOST_DEFINE_MATH_CONSTANT(ln_ln_two, -0.36651292058166432701243915823266946945426344783710526305367771367056, 16153193527385494558228566989083583025230453648347655663425171940646634, 0) BOOST_DEFINE_MATH_CONSTANT(third, 0.3333333333333333333333333333333333333333333333333333333333333333333333, 3333333333333333333333333333333333333333333333333333333333333333333333333, 0) @@ -66,6 +69,8 @@ namespace boost{ namespace math BOOST_DEFINE_MATH_CONSTANT(four_minus_pi, 0.85840734641020676153735661672049711580283060062489417902505540769218359, 0, 0) BOOST_DEFINE_MATH_CONSTANT(pow23_four_minus_pi, 0.79531676737159754434839533505680658072763917332771320544530223438582161, 0, 0) BOOST_DEFINE_MATH_CONSTANT(exp_minus_half, 0.6065306597126334236037995349911804534419181354871869556828921587350565194137, 484239986476115079894560, 0) + BOOST_DEFINE_MATH_CONSTANT(one_div_root_two, 0.70710678118654752440084436210484903928483593756084, 0, 0) + BOOST_DEFINE_MATH_CONSTANT(one_div_root_two_pi, 0.39894228040143267793994605993438186847585863095671, 0, 0) } // namespace constants diff --git a/3party/boost/boost/math/distributions.hpp b/3party/boost/boost/math/distributions.hpp index 1624cb8b3f..37cf027a80 100644 --- a/3party/boost/boost/math/distributions.hpp +++ b/3party/boost/boost/math/distributions.hpp @@ -22,9 +22,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include diff --git a/3party/boost/boost/math/distributions/detail/common_error_handling.hpp b/3party/boost/boost/math/distributions/detail/common_error_handling.hpp index dad572a936..46ded33cde 100644 --- a/3party/boost/boost/math/distributions/detail/common_error_handling.hpp +++ b/3party/boost/boost/math/distributions/detail/common_error_handling.hpp @@ -94,7 +94,28 @@ inline bool check_x( // Note that this test catches both infinity and NaN. // Some special cases permit x to be infinite, so these must be tested 1st, // leaving this test to catch any NaNs. see Normal and cauchy for example. -} +} // bool check_x + +template +inline bool check_x_gt0( + const char* function, + RealType x, + RealType* result, + const Policy& pol) +{ + if(x <= 0) + { + *result = policies::raise_domain_error( + function, + "Random variate x is %1%, but must be > 0!", x, pol); + return false; + } + + return true; + // Note that this test catches both infinity and NaN. + // Some special cases permit x to be infinite, so these must be tested 1st, + // leaving this test to catch any NaNs. See Normal and cauchy for example. +} // bool check_x_gt0 template inline bool check_positive_x( diff --git a/3party/boost/boost/math/distributions/detail/hypergeometric_pdf.hpp b/3party/boost/boost/math/distributions/detail/hypergeometric_pdf.hpp index 384c3de851..895a2f1c94 100644 --- a/3party/boost/boost/math/distributions/detail/hypergeometric_pdf.hpp +++ b/3party/boost/boost/math/distributions/detail/hypergeometric_pdf.hpp @@ -16,6 +16,10 @@ #include #include +#ifdef BOOST_MATH_INSTRUMENT +#include +#endif + namespace boost{ namespace math{ namespace detail{ template @@ -49,6 +53,13 @@ T hypergeometric_pdf_lanczos_imp(T /*dummy*/, unsigned x, unsigned r, unsigned n { BOOST_MATH_STD_USING + BOOST_MATH_INSTRUMENT_FPU + BOOST_MATH_INSTRUMENT_VARIABLE(x); + BOOST_MATH_INSTRUMENT_VARIABLE(r); + BOOST_MATH_INSTRUMENT_VARIABLE(n); + BOOST_MATH_INSTRUMENT_VARIABLE(N); + BOOST_MATH_INSTRUMENT_VARIABLE(typeid(Lanczos).name()); + T bases[9] = { T(n) + Lanczos::g() + 0.5f, T(r) + Lanczos::g() + 0.5f, @@ -61,15 +72,15 @@ T hypergeometric_pdf_lanczos_imp(T /*dummy*/, unsigned x, unsigned r, unsigned n 1 / (T(N - n - r + x) + Lanczos::g() + 0.5f) }; T exponents[9] = { - n + 0.5f, - r + 0.5f, - N - n + 0.5f, - N - r + 0.5f, - N + 0.5f, - x + 0.5f, - n - x + 0.5f, - r - x + 0.5f, - N - n - r + x + 0.5f + n + T(0.5f), + r + T(0.5f), + N - n + T(0.5f), + N - r + T(0.5f), + N + T(0.5f), + x + T(0.5f), + n - x + T(0.5f), + r - x + T(0.5f), + N - n - r + x + T(0.5f) }; int base_e_factors[9] = { -1, -1, -1, -1, 1, 1, 1, 1, 1 @@ -77,7 +88,29 @@ T hypergeometric_pdf_lanczos_imp(T /*dummy*/, unsigned x, unsigned r, unsigned n int sorted_indexes[9] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; +#ifdef BOOST_MATH_INSTRUMENT + BOOST_MATH_INSTRUMENT_FPU + for(unsigned i = 0; i < 9; ++i) + { + BOOST_MATH_INSTRUMENT_VARIABLE(i); + BOOST_MATH_INSTRUMENT_VARIABLE(bases[i]); + BOOST_MATH_INSTRUMENT_VARIABLE(exponents[i]); + BOOST_MATH_INSTRUMENT_VARIABLE(base_e_factors[i]); + BOOST_MATH_INSTRUMENT_VARIABLE(sorted_indexes[i]); + } +#endif std::sort(sorted_indexes, sorted_indexes + 9, sort_functor(exponents)); +#ifdef BOOST_MATH_INSTRUMENT + BOOST_MATH_INSTRUMENT_FPU + for(unsigned i = 0; i < 9; ++i) + { + BOOST_MATH_INSTRUMENT_VARIABLE(i); + BOOST_MATH_INSTRUMENT_VARIABLE(bases[i]); + BOOST_MATH_INSTRUMENT_VARIABLE(exponents[i]); + BOOST_MATH_INSTRUMENT_VARIABLE(base_e_factors[i]); + BOOST_MATH_INSTRUMENT_VARIABLE(sorted_indexes[i]); + } +#endif do{ exponents[sorted_indexes[0]] -= exponents[sorted_indexes[1]]; @@ -88,6 +121,17 @@ T hypergeometric_pdf_lanczos_imp(T /*dummy*/, unsigned x, unsigned r, unsigned n } base_e_factors[sorted_indexes[1]] += base_e_factors[sorted_indexes[0]]; bubble_down_one(sorted_indexes, sorted_indexes + 9, sort_functor(exponents)); + +#ifdef BOOST_MATH_INSTRUMENT + for(unsigned i = 0; i < 9; ++i) + { + BOOST_MATH_INSTRUMENT_VARIABLE(i); + BOOST_MATH_INSTRUMENT_VARIABLE(bases[i]); + BOOST_MATH_INSTRUMENT_VARIABLE(exponents[i]); + BOOST_MATH_INSTRUMENT_VARIABLE(base_e_factors[i]); + BOOST_MATH_INSTRUMENT_VARIABLE(sorted_indexes[i]); + } +#endif }while(exponents[sorted_indexes[1]] > 1); // @@ -106,6 +150,18 @@ T hypergeometric_pdf_lanczos_imp(T /*dummy*/, unsigned x, unsigned r, unsigned n --j; } --j; + +#ifdef BOOST_MATH_INSTRUMENT + BOOST_MATH_INSTRUMENT_VARIABLE(j); + for(unsigned i = 0; i < 9; ++i) + { + BOOST_MATH_INSTRUMENT_VARIABLE(i); + BOOST_MATH_INSTRUMENT_VARIABLE(bases[i]); + BOOST_MATH_INSTRUMENT_VARIABLE(exponents[i]); + BOOST_MATH_INSTRUMENT_VARIABLE(base_e_factors[i]); + BOOST_MATH_INSTRUMENT_VARIABLE(sorted_indexes[i]); + } +#endif } #ifdef BOOST_MATH_INSTRUMENT diff --git a/3party/boost/boost/math/distributions/fwd.hpp b/3party/boost/boost/math/distributions/fwd.hpp index d5d4958daa..35ccc8cbaa 100644 --- a/3party/boost/boost/math/distributions/fwd.hpp +++ b/3party/boost/boost/math/distributions/fwd.hpp @@ -40,6 +40,9 @@ class fisher_f_distribution; template class gamma_distribution; +template +class geometric_distribution; + template class hypergeometric_distribution; @@ -49,6 +52,12 @@ class inverse_chi_squared_distribution; template class inverse_gamma_distribution; +template +class inverse_gaussian_distribution; + +template +class inverse_uniform_distribution; + template class laplace_distribution; @@ -126,5 +135,10 @@ class weibull_distribution; typedef boost::math::non_central_f_distribution non_central_f;\ typedef boost::math::non_central_t_distribution non_central_t;\ typedef boost::math::hypergeometric_distribution hypergeometric;\ + typedef boost::math::inverse_uniform_distribution inverse_uniform;\ + typedef boost::math::geometric_distribution geometric;\ + typedef boost::math::inverse_chi_squared_distribution inverse_chi_squared;\ + typedef boost::math::inverse_gamma_distribution inverse_gamma;\ + typedef boost::math::inverse_gaussian_distribution inverse_gaussian;\ #endif // BOOST_MATH_DISTRIBUTIONS_FWD_HPP diff --git a/3party/boost/boost/math/distributions/geometric.hpp b/3party/boost/boost/math/distributions/geometric.hpp new file mode 100644 index 0000000000..5c6dbb6bb6 --- /dev/null +++ b/3party/boost/boost/math/distributions/geometric.hpp @@ -0,0 +1,516 @@ +// boost\math\distributions\geometric.hpp + +// Copyright John Maddock 2010. +// Copyright Paul A. Bristow 2010. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt +// or copy at http://www.boost.org/LICENSE_1_0.txt) + +// geometric distribution is a discrete probability distribution. +// It expresses the probability distribution of the number (k) of +// events, occurrences, failures or arrivals before the first success. +// supported on the set {0, 1, 2, 3...} + +// Note that the set includes zero (unlike some definitions that start at one). + +// The random variate k is the number of events, occurrences or arrivals. +// k argument may be integral, signed, or unsigned, or floating point. +// If necessary, it has already been promoted from an integral type. + +// Note that the geometric distribution +// (like others including the binomial, geometric & Bernoulli) +// is strictly defined as a discrete function: +// only integral values of k are envisaged. +// However because the method of calculation uses a continuous gamma function, +// it is convenient to treat it as if a continous function, +// and permit non-integral values of k. +// To enforce the strict mathematical model, users should use floor or ceil functions +// on k outside this function to ensure that k is integral. + +// See http://en.wikipedia.org/wiki/geometric_distribution +// http://documents.wolfram.com/v5/Add-onsLinks/StandardPackages/Statistics/DiscreteDistributions.html +// http://mathworld.wolfram.com/GeometricDistribution.html + +#ifndef BOOST_MATH_SPECIAL_GEOMETRIC_HPP +#define BOOST_MATH_SPECIAL_GEOMETRIC_HPP + +#include +#include // for ibeta(a, b, x) == Ix(a, b). +#include // complement. +#include // error checks domain_error & logic_error. +#include // isnan. +#include // for root finding. +#include + +#include +#include +#include +#include + +#include // using std::numeric_limits; +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +// This believed not now necessary, so commented out. +//# pragma warning(disable: 4702) // unreachable code. +// in domain_error_imp in error_handling. +#endif + +namespace boost +{ + namespace math + { + namespace geometric_detail + { + // Common error checking routines for geometric distribution function: + template + inline bool check_success_fraction(const char* function, const RealType& p, RealType* result, const Policy& pol) + { + if( !(boost::math::isfinite)(p) || (p < 0) || (p > 1) ) + { + *result = policies::raise_domain_error( + function, + "Success fraction argument is %1%, but must be >= 0 and <= 1 !", p, pol); + return false; + } + return true; + } + + template + inline bool check_dist(const char* function, const RealType& p, RealType* result, const Policy& pol) + { + return check_success_fraction(function, p, result, pol); + } + + template + inline bool check_dist_and_k(const char* function, const RealType& p, RealType k, RealType* result, const Policy& pol) + { + if(check_dist(function, p, result, pol) == false) + { + return false; + } + if( !(boost::math::isfinite)(k) || (k < 0) ) + { // Check k failures. + *result = policies::raise_domain_error( + function, + "Number of failures argument is %1%, but must be >= 0 !", k, pol); + return false; + } + return true; + } // Check_dist_and_k + + template + inline bool check_dist_and_prob(const char* function, RealType p, RealType prob, RealType* result, const Policy& pol) + { + if(check_dist(function, p, result, pol) && detail::check_probability(function, prob, result, pol) == false) + { + return false; + } + return true; + } // check_dist_and_prob + } // namespace geometric_detail + + template > + class geometric_distribution + { + public: + typedef RealType value_type; + typedef Policy policy_type; + + geometric_distribution(RealType p) : m_p(p) + { // Constructor stores success_fraction p. + RealType result; + geometric_detail::check_dist( + "geometric_distribution<%1%>::geometric_distribution", + m_p, // Check success_fraction 0 <= p <= 1. + &result, Policy()); + } // geometric_distribution constructor. + + // Private data getter class member functions. + RealType success_fraction() const + { // Probability of success as fraction in range 0 to 1. + return m_p; + } + RealType successes() const + { // Total number of successes r = 1 (for compatibility with negative binomial?). + return 1; + } + + // Parameter estimation. + // (These are copies of negative_binomial distribution with successes = 1). + static RealType find_lower_bound_on_p( + RealType trials, + RealType alpha) // alpha 0.05 equivalent to 95% for one-sided test. + { + static const char* function = "boost::math::geometric<%1%>::find_lower_bound_on_p"; + RealType result; // of error checks. + RealType successes = 1; + RealType failures = trials - successes; + if(false == detail::check_probability(function, alpha, &result, Policy()) + && geometric_detail::check_dist_and_k( + function, RealType(0), failures, &result, Policy())) + { + return result; + } + // Use complement ibeta_inv function for lower bound. + // This is adapted from the corresponding binomial formula + // here: http://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm + // This is a Clopper-Pearson interval, and may be overly conservative, + // see also "A Simple Improved Inferential Method for Some + // Discrete Distributions" Yong CAI and K. KRISHNAMOORTHY + // http://www.ucs.louisiana.edu/~kxk4695/Discrete_new.pdf + // + return ibeta_inv(successes, failures + 1, alpha, static_cast(0), Policy()); + } // find_lower_bound_on_p + + static RealType find_upper_bound_on_p( + RealType trials, + RealType alpha) // alpha 0.05 equivalent to 95% for one-sided test. + { + static const char* function = "boost::math::geometric<%1%>::find_upper_bound_on_p"; + RealType result; // of error checks. + RealType successes = 1; + RealType failures = trials - successes; + if(false == geometric_detail::check_dist_and_k( + function, RealType(0), failures, &result, Policy()) + && detail::check_probability(function, alpha, &result, Policy())) + { + return result; + } + if(failures == 0) + { + return 1; + }// Use complement ibetac_inv function for upper bound. + // Note adjusted failures value: *not* failures+1 as usual. + // This is adapted from the corresponding binomial formula + // here: http://www.itl.nist.gov/div898/handbook/prc/section2/prc241.htm + // This is a Clopper-Pearson interval, and may be overly conservative, + // see also "A Simple Improved Inferential Method for Some + // Discrete Distributions" Yong CAI and K. Krishnamoorthy + // http://www.ucs.louisiana.edu/~kxk4695/Discrete_new.pdf + // + return ibetac_inv(successes, failures, alpha, static_cast(0), Policy()); + } // find_upper_bound_on_p + + // Estimate number of trials : + // "How many trials do I need to be P% sure of seeing k or fewer failures?" + + static RealType find_minimum_number_of_trials( + RealType k, // number of failures (k >= 0). + RealType p, // success fraction 0 <= p <= 1. + RealType alpha) // risk level threshold 0 <= alpha <= 1. + { + static const char* function = "boost::math::geometric<%1%>::find_minimum_number_of_trials"; + // Error checks: + RealType result; + if(false == geometric_detail::check_dist_and_k( + function, p, k, &result, Policy()) + && detail::check_probability(function, alpha, &result, Policy())) + { + return result; + } + result = ibeta_inva(k + 1, p, alpha, Policy()); // returns n - k + return result + k; + } // RealType find_number_of_failures + + static RealType find_maximum_number_of_trials( + RealType k, // number of failures (k >= 0). + RealType p, // success fraction 0 <= p <= 1. + RealType alpha) // risk level threshold 0 <= alpha <= 1. + { + static const char* function = "boost::math::geometric<%1%>::find_maximum_number_of_trials"; + // Error checks: + RealType result; + if(false == geometric_detail::check_dist_and_k( + function, p, k, &result, Policy()) + && detail::check_probability(function, alpha, &result, Policy())) + { + return result; + } + result = ibetac_inva(k + 1, p, alpha, Policy()); // returns n - k + return result + k; + } // RealType find_number_of_trials complemented + + private: + //RealType m_r; // successes fixed at unity. + RealType m_p; // success_fraction + }; // template class geometric_distribution + + typedef geometric_distribution geometric; // Reserved name of type double. + + template + inline const std::pair range(const geometric_distribution& /* dist */) + { // Range of permissible values for random variable k. + using boost::math::tools::max_value; + return std::pair(static_cast(0), max_value()); // max_integer? + } + + template + inline const std::pair support(const geometric_distribution& /* dist */) + { // Range of supported values for random variable k. + // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero. + using boost::math::tools::max_value; + return std::pair(static_cast(0), max_value()); // max_integer? + } + + template + inline RealType mean(const geometric_distribution& dist) + { // Mean of geometric distribution = (1-p)/p. + return (1 - dist.success_fraction() ) / dist.success_fraction(); + } // mean + + // median implemented via quantile(half) in derived accessors. + + template + inline RealType mode(const geometric_distribution&) + { // Mode of geometric distribution = zero. + BOOST_MATH_STD_USING // ADL of std functions. + return 0; + } // mode + + template + inline RealType variance(const geometric_distribution& dist) + { // Variance of Binomial distribution = (1-p) / p^2. + return (1 - dist.success_fraction()) + / (dist.success_fraction() * dist.success_fraction()); + } // variance + + template + inline RealType skewness(const geometric_distribution& dist) + { // skewness of geometric distribution = 2-p / (sqrt(r(1-p)) + BOOST_MATH_STD_USING // ADL of std functions. + RealType p = dist.success_fraction(); + return (2 - p) / sqrt(1 - p); + } // skewness + + template + inline RealType kurtosis(const geometric_distribution& dist) + { // kurtosis of geometric distribution + // http://en.wikipedia.org/wiki/geometric is kurtosis_excess so add 3 + RealType p = dist.success_fraction(); + return 3 + (p*p - 6*p + 6) / (1 - p); + } // kurtosis + + template + inline RealType kurtosis_excess(const geometric_distribution& dist) + { // kurtosis excess of geometric distribution + // http://mathworld.wolfram.com/Kurtosis.html table of kurtosis_excess + RealType p = dist.success_fraction(); + return (p*p - 6*p + 6) / (1 - p); + } // kurtosis_excess + + // RealType standard_deviation(const geometric_distribution& dist) + // standard_deviation provided by derived accessors. + // RealType hazard(const geometric_distribution& dist) + // hazard of geometric distribution provided by derived accessors. + // RealType chf(const geometric_distribution& dist) + // chf of geometric distribution provided by derived accessors. + + template + inline RealType pdf(const geometric_distribution& dist, const RealType& k) + { // Probability Density/Mass Function. + BOOST_FPU_EXCEPTION_GUARD + BOOST_MATH_STD_USING // For ADL of math functions. + static const char* function = "boost::math::pdf(const geometric_distribution<%1%>&, %1%)"; + + RealType p = dist.success_fraction(); + RealType result; + if(false == geometric_detail::check_dist_and_k( + function, + p, + k, + &result, Policy())) + { + return result; + } + if (k == 0) + { + return p; // success_fraction + } + RealType q = 1 - p; // Inaccurate for small p? + // So try to avoid inaccuracy for large or small p. + // but has little effect > last significant bit. + //cout << "p * pow(q, k) " << result << endl; // seems best whatever p + //cout << "exp(p * k * log1p(-p)) " << p * exp(k * log1p(-p)) << endl; + //if (p < 0.5) + //{ + // result = p * pow(q, k); + //} + //else + //{ + // result = p * exp(k * log1p(-p)); + //} + result = p * pow(q, k); + return result; + } // geometric_pdf + + template + inline RealType cdf(const geometric_distribution& dist, const RealType& k) + { // Cumulative Distribution Function of geometric. + static const char* function = "boost::math::cdf(const geometric_distribution<%1%>&, %1%)"; + + // k argument may be integral, signed, or unsigned, or floating point. + // If necessary, it has already been promoted from an integral type. + RealType p = dist.success_fraction(); + // Error check: + RealType result; + if(false == geometric_detail::check_dist_and_k( + function, + p, + k, + &result, Policy())) + { + return result; + } + if(k == 0) + { + return p; // success_fraction + } + //RealType q = 1 - p; // Bad for small p + //RealType probability = 1 - std::pow(q, k+1); + + RealType z = boost::math::log1p(-p) * (k+1); + RealType probability = -boost::math::expm1(z); + + return probability; + } // cdf Cumulative Distribution Function geometric. + + template + inline RealType cdf(const complemented2_type, RealType>& c) + { // Complemented Cumulative Distribution Function geometric. + BOOST_MATH_STD_USING + static const char* function = "boost::math::cdf(const geometric_distribution<%1%>&, %1%)"; + // k argument may be integral, signed, or unsigned, or floating point. + // If necessary, it has already been promoted from an integral type. + RealType const& k = c.param; + geometric_distribution const& dist = c.dist; + RealType p = dist.success_fraction(); + // Error check: + RealType result; + if(false == geometric_detail::check_dist_and_k( + function, + p, + k, + &result, Policy())) + { + return result; + } + RealType z = boost::math::log1p(-p) * (k+1); + RealType probability = exp(z); + return probability; + } // cdf Complemented Cumulative Distribution Function geometric. + + template + inline RealType quantile(const geometric_distribution& dist, const RealType& x) + { // Quantile, percentile/100 or Percent Point geometric function. + // Return the number of expected failures k for a given probability p. + + // Inverse cumulative Distribution Function or Quantile (percentile / 100) of geometric Probability. + // k argument may be integral, signed, or unsigned, or floating point. + + static const char* function = "boost::math::quantile(const geometric_distribution<%1%>&, %1%)"; + BOOST_MATH_STD_USING // ADL of std functions. + + RealType success_fraction = dist.success_fraction(); + // Check dist and x. + RealType result; + if(false == geometric_detail::check_dist_and_prob + (function, success_fraction, x, &result, Policy())) + { + return result; + } + + // Special cases. + if (x == 1) + { // Would need +infinity failures for total confidence. + result = policies::raise_overflow_error( + function, + "Probability argument is 1, which implies infinite failures !", Policy()); + return result; + // usually means return +std::numeric_limits::infinity(); + // unless #define BOOST_MATH_THROW_ON_OVERFLOW_ERROR + } + if (x == 0) + { // No failures are expected if P = 0. + return 0; // Total trials will be just dist.successes. + } + // if (P <= pow(dist.success_fraction(), 1)) + if (x <= success_fraction) + { // p <= pdf(dist, 0) == cdf(dist, 0) + return 0; + } + if (x == 1) + { + return 0; + } + + // log(1-x) /log(1-success_fraction) -1; but use log1p in case success_fraction is small + result = boost::math::log1p(-x) / boost::math::log1p(-success_fraction) -1; + // Subtract a few epsilons here too? + // to make sure it doesn't slip over, so ceil would be one too many. + return result; + } // RealType quantile(const geometric_distribution dist, p) + + template + inline RealType quantile(const complemented2_type, RealType>& c) + { // Quantile or Percent Point Binomial function. + // Return the number of expected failures k for a given + // complement of the probability Q = 1 - P. + static const char* function = "boost::math::quantile(const geometric_distribution<%1%>&, %1%)"; + BOOST_MATH_STD_USING + // Error checks: + RealType x = c.param; + const geometric_distribution& dist = c.dist; + RealType success_fraction = dist.success_fraction(); + RealType result; + if(false == geometric_detail::check_dist_and_prob( + function, + success_fraction, + x, + &result, Policy())) + { + return result; + } + + // Special cases: + if(x == 1) + { // There may actually be no answer to this question, + // since the probability of zero failures may be non-zero, + return 0; // but zero is the best we can do: + } + if (-x <= boost::math::powm1(dist.success_fraction(), dist.successes(), Policy())) + { // q <= cdf(complement(dist, 0)) == pdf(dist, 0) + return 0; // + } + if(x == 0) + { // Probability 1 - Q == 1 so infinite failures to achieve certainty. + // Would need +infinity failures for total confidence. + result = policies::raise_overflow_error( + function, + "Probability argument complement is 0, which implies infinite failures !", Policy()); + return result; + // usually means return +std::numeric_limits::infinity(); + // unless #define BOOST_MATH_THROW_ON_OVERFLOW_ERROR + } + // log(x) /log(1-success_fraction) -1; but use log1p in case success_fraction is small + result = log(x) / boost::math::log1p(-success_fraction) -1; + return result; + + } // quantile complement + + } // namespace math +} // namespace boost + +// This include must be at the end, *after* the accessors +// for this distribution have been defined, in order to +// keep compilers that support two-phase lookup happy. +#include + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif // BOOST_MATH_SPECIAL_GEOMETRIC_HPP diff --git a/3party/boost/boost/math/distributions/inverse_chi_squared.hpp b/3party/boost/boost/math/distributions/inverse_chi_squared.hpp index 3df6093ec4..8fc13e39e7 100644 --- a/3party/boost/boost/math/distributions/inverse_chi_squared.hpp +++ b/3party/boost/boost/math/distributions/inverse_chi_squared.hpp @@ -146,7 +146,7 @@ RealType pdf(const inverse_chi_squared_distribution& dist, con if(result < tools::min_value()) return 0; // Random variable is near enough infinite. result = gamma_p_derivative(df/2, result, Policy()) * df * scale/2; - if(result != 0) // prevent 0 / 0: + if(result != 0) // prevent 0 / 0, gamma_p_derivative -> 0 faster than x^2 result /= (x * x); return result; } // pdf @@ -298,7 +298,7 @@ inline RealType variance(const inverse_chi_squared_distribution( function, "inverse Chi-Squared distribution only has a variance for degrees of freedom > 4, but got degrees of freedom = %1%.", - df, Policy()); return 2 * dist.degrees_of_freedom(); + df, Policy()); } return 2 * df * df * scale * scale / ((df - 2)*(df - 2) * (df - 4)); } // variance diff --git a/3party/boost/boost/math/distributions/inverse_gamma.hpp b/3party/boost/boost/math/distributions/inverse_gamma.hpp index 4f274d9cf6..4a2c3eaafd 100644 --- a/3party/boost/boost/math/distributions/inverse_gamma.hpp +++ b/3party/boost/boost/math/distributions/inverse_gamma.hpp @@ -128,7 +128,7 @@ template inline const std::pair range(const inverse_gamma_distribution& /* dist */) { // Range of permissible values for random variable x. using boost::math::tools::max_value; - return std::pair(0, max_value()); + return std::pair(static_cast(0), max_value()); } template @@ -137,7 +137,7 @@ inline const std::pair support(const inverse_gamma_distribut // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero. using boost::math::tools::max_value; using boost::math::tools::min_value; - return std::pair(0, max_value()); + return std::pair(static_cast(0), max_value()); } template diff --git a/3party/boost/boost/math/distributions/inverse_gaussian.hpp b/3party/boost/boost/math/distributions/inverse_gaussian.hpp new file mode 100644 index 0000000000..6803273bcf --- /dev/null +++ b/3party/boost/boost/math/distributions/inverse_gaussian.hpp @@ -0,0 +1,512 @@ +// Copyright John Maddock 2010. +// Copyright Paul A. Bristow 2010. + +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_STATS_INVERSE_GAUSSIAN_HPP +#define BOOST_STATS_INVERSE_GAUSSIAN_HPP + +#ifdef _MSC_VER +#pragma warning(disable: 4512) // assignment operator could not be generated +#endif + +// http://en.wikipedia.org/wiki/Normal-inverse_Gaussian_distribution +// http://mathworld.wolfram.com/InverseGaussianDistribution.html + +// The normal-inverse Gaussian distribution +// also called the Wald distribution (some sources limit this to when mean = 1). + +// It is the continuous probability distribution +// that is defined as the normal variance-mean mixture where the mixing density is the +// inverse Gaussian distribution. The tails of the distribution decrease more slowly +// than the normal distribution. It is therefore suitable to model phenomena +// where numerically large values are more probable than is the case for the normal distribution. + +// The Inverse Gaussian distribution was first studied in relationship to Brownian motion. +// In 1956 M.C.K. Tweedie used the name 'Inverse Gaussian' because there is an inverse +// relationship between the time to cover a unit distance and distance covered in unit time. + +// Examples are returns from financial assets and turbulent wind speeds. +// The normal-inverse Gaussian distributions form +// a subclass of the generalised hyperbolic distributions. + +// See also + +// http://en.wikipedia.org/wiki/Normal_distribution +// http://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm +// Also: +// Weisstein, Eric W. "Normal Distribution." +// From MathWorld--A Wolfram Web Resource. +// http://mathworld.wolfram.com/NormalDistribution.html + +// http://www.jstatsoft.org/v26/i04/paper General class of inverse Gaussian distributions. +// ig package - withdrawn but at http://cran.r-project.org/src/contrib/Archive/ig/ + +// http://www.stat.ucl.ac.be/ISdidactique/Rhelp/library/SuppDists/html/inverse_gaussian.html +// R package for dinverse_gaussian, ... + +// http://www.statsci.org/s/inverse_gaussian.s and http://www.statsci.org/s/inverse_gaussian.html + +//#include +#include // for erf/erfc. +#include +#include +#include +#include // for gamma function +// using boost::math::gamma_p; + +#include +//using std::tr1::tuple; +//using std::tr1::make_tuple; +#include +//using boost::math::tools::newton_raphson_iterate; + +#include + +namespace boost{ namespace math{ + +template > +class inverse_gaussian_distribution +{ +public: + typedef RealType value_type; + typedef Policy policy_type; + + inverse_gaussian_distribution(RealType mean = 1, RealType scale = 1) + : m_mean(mean), m_scale(scale) + { // Default is a 1,1 inverse_gaussian distribution. + static const char* function = "boost::math::inverse_gaussian_distribution<%1%>::inverse_gaussian_distribution"; + + RealType result; + detail::check_scale(function, scale, &result, Policy()); + detail::check_location(function, mean, &result, Policy()); + } + + RealType mean()const + { // alias for location. + return m_mean; // aka mu + } + + // Synonyms, provided to allow generic use of find_location and find_scale. + RealType location()const + { // location, aka mu. + return m_mean; + } + RealType scale()const + { // scale, aka lambda. + return m_scale; + } + + RealType shape()const + { // shape, aka phi = lambda/mu. + return m_scale / m_mean; + } + +private: + // + // Data members: + // + RealType m_mean; // distribution mean or location, aka mu. + RealType m_scale; // distribution standard deviation or scale, aka lambda. +}; // class normal_distribution + +typedef inverse_gaussian_distribution inverse_gaussian; + +template +inline const std::pair range(const inverse_gaussian_distribution& /*dist*/) +{ // Range of permissible values for random variable x, zero to max. + using boost::math::tools::max_value; + return std::pair(static_cast(0.), max_value()); // - to + max value. +} + +template +inline const std::pair support(const inverse_gaussian_distribution& /*dist*/) +{ // Range of supported values for random variable x, zero to max. + // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero. + using boost::math::tools::max_value; + return std::pair(static_cast(0.), max_value()); // - to + max value. +} + +template +inline RealType pdf(const inverse_gaussian_distribution& dist, const RealType& x) +{ // Probability Density Function + BOOST_MATH_STD_USING // for ADL of std functions + + RealType scale = dist.scale(); + RealType mean = dist.mean(); + RealType result; + static const char* function = "boost::math::pdf(const inverse_gaussian_distribution<%1%>&, %1%)"; + if(false == detail::check_scale(function, scale, &result, Policy())) + { + return result; + } + if(false == detail::check_location(function, mean, &result, Policy())) + { + return result; + } + if(false == detail::check_positive_x(function, x, &result, Policy())) + { + return result; + } + + if (x == 0) + { + return 0; // Convenient, even if not defined mathematically. + } + + result = + sqrt(scale / (constants::two_pi() * x * x * x)) + * exp(-scale * (x - mean) * (x - mean) / (2 * x * mean * mean)); + return result; +} // pdf + +template +inline RealType cdf(const inverse_gaussian_distribution& dist, const RealType& x) +{ // Cumulative Density Function. + BOOST_MATH_STD_USING // for ADL of std functions. + + RealType scale = dist.scale(); + RealType mean = dist.mean(); + static const char* function = "boost::math::cdf(const inverse_gaussian_distribution<%1%>&, %1%)"; + RealType result; + if(false == detail::check_scale(function, scale, &result, Policy())) + { + return result; + } + if(false == detail::check_location(function, mean, &result, Policy())) + { + return result; + } + if(false == detail::check_positive_x(function, x, &result, Policy())) + { + return result; + } + if (x == 0) + { + return 0; // Convenient, even if not defined mathematically. + } + // Problem with this formula for large scale > 1000 or small x, + //result = 0.5 * (erf(sqrt(scale / x) * ((x / mean) - 1) / constants::root_two(), Policy()) + 1) + // + exp(2 * scale / mean) / 2 + // * (1 - erf(sqrt(scale / x) * (x / mean + 1) / constants::root_two(), Policy())); + // so use normal distribution version: + // Wikipedia CDF equation http://en.wikipedia.org/wiki/Inverse_Gaussian_distribution. + + normal_distribution n01; + + RealType n0 = sqrt(scale / x); + n0 *= ((x / mean) -1); + RealType n1 = cdf(n01, n0); + RealType expfactor = exp(2 * scale / mean); + RealType n3 = - sqrt(scale / x); + n3 *= (x / mean) + 1; + RealType n4 = cdf(n01, n3); + result = n1 + expfactor * n4; + return result; +} // cdf + +template +struct inverse_gaussian_quantile_functor +{ + + inverse_gaussian_quantile_functor(const boost::math::inverse_gaussian_distribution dist, RealType const& p) + : distribution(dist), prob(p) + { + } + boost::math::tuple operator()(RealType const& x) + { + RealType c = cdf(distribution, x); + RealType fx = c - prob; // Difference cdf - value - to minimize. + RealType dx = pdf(distribution, x); // pdf is 1st derivative. + // return both function evaluation difference f(x) and 1st derivative f'(x). + return boost::math::make_tuple(fx, dx); + } + private: + const boost::math::inverse_gaussian_distribution distribution; + RealType prob; +}; + +template +struct inverse_gaussian_quantile_complement_functor +{ + inverse_gaussian_quantile_complement_functor(const boost::math::inverse_gaussian_distribution dist, RealType const& p) + : distribution(dist), prob(p) + { + } + boost::math::tuple operator()(RealType const& x) + { + RealType c = cdf(complement(distribution, x)); + RealType fx = c - prob; // Difference cdf - value - to minimize. + RealType dx = -pdf(distribution, x); // pdf is 1st derivative. + // return both function evaluation difference f(x) and 1st derivative f'(x). + //return std::tr1::make_tuple(fx, dx); if available. + return boost::math::make_tuple(fx, dx); + } + private: + const boost::math::inverse_gaussian_distribution distribution; + RealType prob; +}; + +namespace detail +{ + template + inline RealType guess_ig(RealType p, RealType mu = 1, RealType lambda = 1) + { // guess at random variate value x for inverse gaussian quantile. + BOOST_MATH_STD_USING + using boost::math::policies::policy; + // Error type. + using boost::math::policies::overflow_error; + // Action. + using boost::math::policies::ignore_error; + + typedef policy< + overflow_error // Ignore overflow (return infinity) + > no_overthrow_policy; + + RealType x; // result is guess at random variate value x. + RealType phi = lambda / mu; + if (phi > 2.) + { // Big phi, so starting to look like normal Gaussian distribution. + // x=(qnorm(p,0,1,true,false) - 0.5 * sqrt(mu/lambda)) / sqrt(lambda/mu); + // Whitmore, G.A. and Yalovsky, M. + // A normalising logarithmic transformation for inverse Gaussian random variables, + // Technometrics 20-2, 207-208 (1978), but using expression from + // V Seshadri, Inverse Gaussian distribution (1998) ISBN 0387 98618 9, page 6. + + normal_distribution n01; + x = mu * exp(quantile(n01, p) / sqrt(phi) - 1/(2 * phi)); + } + else + { // phi < 2 so much less symmetrical with long tail, + // so use gamma distribution as an approximation. + using boost::math::gamma_distribution; + + // Define the distribution, using gamma_nooverflow: + typedef gamma_distribution gamma_nooverflow; + + gamma_distribution g(static_cast(0.5), static_cast(1.)); + + // gamma_nooverflow g(static_cast(0.5), static_cast(1.)); + // R qgamma(0.2, 0.5, 1) 0.0320923 + RealType qg = quantile(complement(g, p)); + //RealType qg1 = qgamma(1.- p, 0.5, 1.0, true, false); + x = lambda / (qg * 2); + // + if (x > mu/2) // x > mu /2? + { // x too large for the gamma approximation to work well. + //x = qgamma(p, 0.5, 1.0); // qgamma(0.270614, 0.5, 1) = 0.05983807 + RealType q = quantile(g, p); + // x = mu * exp(q * static_cast(0.1)); // Said to improve at high p + // x = mu * x; // Improves at high p? + x = mu * exp(q / sqrt(phi) - 1/(2 * phi)); + } + } + return x; + } // guess_ig +} // namespace detail + +template +inline RealType quantile(const inverse_gaussian_distribution& dist, const RealType& p) +{ + BOOST_MATH_STD_USING // for ADL of std functions. + // No closed form exists so guess and use Newton Raphson iteration. + + RealType mean = dist.mean(); + RealType scale = dist.scale(); + static const char* function = "boost::math::quantile(const inverse_gaussian_distribution<%1%>&, %1%)"; + + RealType result; + if(false == detail::check_scale(function, scale, &result, Policy())) + return result; + if(false == detail::check_location(function, mean, &result, Policy())) + return result; + if(false == detail::check_probability(function, p, &result, Policy())) + return result; + if (p == 0) + { + return 0; // Convenient, even if not defined mathematically? + } + if (p == 1) + { // overflow + result = policies::raise_overflow_error(function, + "probability parameter is 1, but must be < 1!", Policy()); + return result; // std::numeric_limits::infinity(); + } + + RealType guess = detail::guess_ig(p, dist.mean(), dist.scale()); + using boost::math::tools::max_value; + + RealType min = 0.; // Minimum possible value is bottom of range of distribution. + RealType max = max_value();// Maximum possible value is top of range. + // int digits = std::numeric_limits::digits; // Maximum possible binary digits accuracy for type T. + // digits used to control how accurate to try to make the result. + // To allow user to control accuracy versus speed, + int get_digits = policies::digits();// get digits from policy, + boost::uintmax_t m = policies::get_max_root_iterations(); // and max iterations. + using boost::math::tools::newton_raphson_iterate; + result = + newton_raphson_iterate(inverse_gaussian_quantile_functor(dist, p), guess, min, max, get_digits, m); + return result; +} // quantile + +template +inline RealType cdf(const complemented2_type, RealType>& c) +{ + BOOST_MATH_STD_USING // for ADL of std functions. + + RealType scale = c.dist.scale(); + RealType mean = c.dist.mean(); + RealType x = c.param; + static const char* function = "boost::math::cdf(const complement(inverse_gaussian_distribution<%1%>&), %1%)"; + // infinite arguments not supported. + //if((boost::math::isinf)(x)) + //{ + // if(x < 0) return 1; // cdf complement -infinity is unity. + // return 0; // cdf complement +infinity is zero + //} + // These produce MSVC 4127 warnings, so the above used instead. + //if(std::numeric_limits::has_infinity && x == std::numeric_limits::infinity()) + //{ // cdf complement +infinity is zero. + // return 0; + //} + //if(std::numeric_limits::has_infinity && x == -std::numeric_limits::infinity()) + //{ // cdf complement -infinity is unity. + // return 1; + //} + RealType result; + if(false == detail::check_scale(function, scale, &result, Policy())) + return result; + if(false == detail::check_location(function, mean, &result, Policy())) + return result; + if(false == detail::check_x(function, x, &result, Policy())) + return result; + + normal_distribution n01; + RealType n0 = sqrt(scale / x); + n0 *= ((x / mean) -1); + RealType cdf_1 = cdf(complement(n01, n0)); + + RealType expfactor = exp(2 * scale / mean); + RealType n3 = - sqrt(scale / x); + n3 *= (x / mean) + 1; + + //RealType n5 = +sqrt(scale/x) * ((x /mean) + 1); // note now positive sign. + RealType n6 = cdf(complement(n01, +sqrt(scale/x) * ((x /mean) + 1))); + // RealType n4 = cdf(n01, n3); // = + result = cdf_1 - expfactor * n6; + return result; +} // cdf complement + +template +inline RealType quantile(const complemented2_type, RealType>& c) +{ + BOOST_MATH_STD_USING // for ADL of std functions + + RealType scale = c.dist.scale(); + RealType mean = c.dist.mean(); + static const char* function = "boost::math::quantile(const complement(inverse_gaussian_distribution<%1%>&), %1%)"; + RealType result; + if(false == detail::check_scale(function, scale, &result, Policy())) + return result; + if(false == detail::check_location(function, mean, &result, Policy())) + return result; + RealType q = c.param; + if(false == detail::check_probability(function, q, &result, Policy())) + return result; + + RealType guess = detail::guess_ig(q, mean, scale); + // Complement. + using boost::math::tools::max_value; + + RealType min = 0.; // Minimum possible value is bottom of range of distribution. + RealType max = max_value();// Maximum possible value is top of range. + // int digits = std::numeric_limits::digits; // Maximum possible binary digits accuracy for type T. + // digits used to control how accurate to try to make the result. + int get_digits = policies::digits(); + boost::uintmax_t m = policies::get_max_root_iterations(); + using boost::math::tools::newton_raphson_iterate; + result = + newton_raphson_iterate(inverse_gaussian_quantile_complement_functor(c.dist, q), guess, min, max, get_digits, m); + return result; +} // quantile + +template +inline RealType mean(const inverse_gaussian_distribution& dist) +{ // aka mu + return dist.mean(); +} + +template +inline RealType scale(const inverse_gaussian_distribution& dist) +{ // aka lambda + return dist.scale(); +} + +template +inline RealType shape(const inverse_gaussian_distribution& dist) +{ // aka phi + return dist.shape(); +} + +template +inline RealType standard_deviation(const inverse_gaussian_distribution& dist) +{ + BOOST_MATH_STD_USING + RealType scale = dist.scale(); + RealType mean = dist.mean(); + RealType result = sqrt(mean * mean * mean / scale); + return result; +} + +template +inline RealType mode(const inverse_gaussian_distribution& dist) +{ + BOOST_MATH_STD_USING + RealType scale = dist.scale(); + RealType mean = dist.mean(); + RealType result = mean * (sqrt(1 + (9 * mean * mean)/(4 * scale * scale)) + - 3 * mean / (2 * scale)); + return result; +} + +template +inline RealType skewness(const inverse_gaussian_distribution& dist) +{ + BOOST_MATH_STD_USING + RealType scale = dist.scale(); + RealType mean = dist.mean(); + RealType result = 3 * sqrt(mean/scale); + return result; +} + +template +inline RealType kurtosis(const inverse_gaussian_distribution& dist) +{ + RealType scale = dist.scale(); + RealType mean = dist.mean(); + RealType result = 15 * mean / scale -3; + return result; +} + +template +inline RealType kurtosis_excess(const inverse_gaussian_distribution& dist) +{ + RealType scale = dist.scale(); + RealType mean = dist.mean(); + RealType result = 15 * mean / scale; + return result; +} + +} // namespace math +} // namespace boost + +// This include must be at the end, *after* the accessors +// for this distribution have been defined, in order to +// keep compilers that support two-phase lookup happy. +#include + +#endif // BOOST_STATS_INVERSE_GAUSSIAN_HPP + + diff --git a/3party/boost/boost/math/distributions/laplace.hpp b/3party/boost/boost/math/distributions/laplace.hpp index 87e0a8db2d..7e06dd73c3 100644 --- a/3party/boost/boost/math/distributions/laplace.hpp +++ b/3party/boost/boost/math/distributions/laplace.hpp @@ -66,23 +66,17 @@ public: return true; } - private: RealType m_location; RealType m_scale; - }; // class laplace_distribution - - -// -// Convenient type synonym // +// Convenient type synonym for double typedef laplace_distribution laplace; // // Non member functions -// template inline const std::pair range(const laplace_distribution&) { @@ -137,7 +131,7 @@ inline RealType cdf(const laplace_distribution& dist, const Re if (false == dist.check_parameters(function, &result)) return result; if (false == detail::check_x(function, x, &result, Policy())) return result; - // Special cdf values + // Special cdf values: if((boost::math::isinf)(x)) { if(x < 0) return 0; // -infinity @@ -160,7 +154,7 @@ inline RealType cdf(const laplace_distribution& dist, const Re template inline RealType quantile(const laplace_distribution& dist, const RealType& p) { - BOOST_MATH_STD_USING // for ADL of std functions + BOOST_MATH_STD_USING // for ADL of std functions. // Checking function argument RealType result; @@ -168,10 +162,20 @@ inline RealType quantile(const laplace_distribution& dist, con if (false == dist.check_parameters(function, &result)) return result; if(false == detail::check_probability(function, p, &result, Policy())) return result; - // extreme values - if(p == 0) return -std::numeric_limits::infinity(); - if(p == 1) return std::numeric_limits::infinity(); - + // Extreme values of p: + if(p == 0) + { + result = policies::raise_overflow_error(function, + "probability parameter is 0, but must be > 0!", Policy()); + return -result; // -std::numeric_limits::infinity(); + } + + if(p == 1) + { + result = policies::raise_overflow_error(function, + "probability parameter is 1, but must be < 1!", Policy()); + return result; // std::numeric_limits::infinity(); + } // Calculate Quantile RealType scale( dist.scale() ); RealType location( dist.location() ); diff --git a/3party/boost/boost/math/distributions/non_central_beta.hpp b/3party/boost/boost/math/distributions/non_central_beta.hpp index fa218c25d3..7ab3421d1e 100644 --- a/3party/boost/boost/math/distributions/non_central_beta.hpp +++ b/3party/boost/boost/math/distributions/non_central_beta.hpp @@ -18,6 +18,7 @@ #include // error checks #include // isnan. #include // for root finding. +#include namespace boost { @@ -42,13 +43,25 @@ namespace boost T l2 = lam / 2; // // k is the starting point for iteration, and is the - // maximum of the poisson weighting term: + // maximum of the poisson weighting term, + // note that unlike other similar code, we do not set + // k to zero, when l2 is small, as forward iteration + // is unstable: // int k = itrunc(l2); if(k == 0) k = 1; - // Starting Poisson weight: - T pois = gamma_p_derivative(T(k+1), l2, pol); + T pois; + if(k == 0) + { + // Starting Poisson weight: + pois = exp(-l2); + } + else + { + // Starting Poisson weight: + pois = gamma_p_derivative(T(k+1), l2, pol); + } if(pois == 0) return init_val; // recurance term: @@ -123,10 +136,27 @@ namespace boost // maximum of the poisson weighting term: // int k = itrunc(l2); + T pois; + if(k <= 30) + { + // + // Might as well start at 0 since we'll likely have this number of terms anyway: + // + if(a + b > 1) + k = 0; + else if(k == 0) + k = 1; + } if(k == 0) - k = 1; - // Starting Poisson weight: - T pois = gamma_p_derivative(T(k+1), l2, pol); + { + // Starting Poisson weight: + pois = exp(-l2); + } + else + { + // Starting Poisson weight: + pois = gamma_p_derivative(T(k+1), l2, pol); + } if(pois == 0) return init_val; // recurance term: @@ -598,6 +628,46 @@ namespace boost "function"); } + template + struct hypergeometric_2F2_sum + { + typedef T result_type; + hypergeometric_2F2_sum(T a1_, T a2_, T b1_, T b2_, T z_) : a1(a1_), a2(a2_), b1(b1_), b2(b2_), z(z_), term(1), k(0) {} + T operator()() + { + T result = term; + term *= a1 * a2 / (b1 * b2); + a1 += 1; + a2 += 1; + b1 += 1; + b2 += 1; + k += 1; + term /= k; + term *= z; + return result; + } + T a1, a2, b1, b2, z, term, k; + }; + + template + T hypergeometric_2F2(T a1, T a2, T b1, T b2, T z, const Policy& pol) + { + typedef typename policies::evaluation::type value_type; + + const char* function = "boost::math::detail::hypergeometric_2F2<%1%>(%1%,%1%,%1%,%1%,%1%)"; + + hypergeometric_2F2_sum s(a1, a2, b1, b2, z); + boost::uintmax_t max_iter = policies::get_max_series_iterations(); +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + value_type zero = 0; + value_type result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter, zero); +#else + value_type result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon(), max_iter); +#endif + policies::check_series_iterations(function, max_iter, pol); + return policies::checked_narrowing_cast(result, function); + } + } // namespace detail template > @@ -693,7 +763,6 @@ namespace boost function); } -#if 0 // // We don't have the necessary information to implement // these at present. These are just disabled for now, @@ -703,35 +772,58 @@ namespace boost template inline RealType mean(const non_central_beta_distribution& dist) { - // TODO - return 0; + BOOST_MATH_STD_USING + RealType a = dist.alpha(); + RealType b = dist.beta(); + RealType d = dist.non_centrality(); + RealType apb = a + b; + return exp(-d / 2) * a * detail::hypergeometric_2F2(1 + a, apb, a, 1 + apb, d / 2, Policy()) / apb; } // mean template inline RealType variance(const non_central_beta_distribution& dist) - { // variance. - const char* function = "boost::math::non_central_beta_distribution<%1%>::variance()"; - // TODO - return 0; + { + // + // Relative error of this function may be arbitarily large... absolute + // error will be small however... that's the best we can do for now. + // + BOOST_MATH_STD_USING + RealType a = dist.alpha(); + RealType b = dist.beta(); + RealType d = dist.non_centrality(); + RealType apb = a + b; + RealType result = detail::hypergeometric_2F2(RealType(1 + a), apb, a, RealType(1 + apb), RealType(d / 2), Policy()); + result *= result * -exp(-d) * a * a / (apb * apb); + result += exp(-d / 2) * a * (1 + a) * detail::hypergeometric_2F2(RealType(2 + a), apb, a, RealType(2 + apb), RealType(d / 2), Policy()) / (apb * (1 + apb)); + return result; } // RealType standard_deviation(const non_central_beta_distribution& dist) // standard_deviation provided by derived accessors. - template - inline RealType skewness(const non_central_beta_distribution& dist) + inline RealType skewness(const non_central_beta_distribution& /*dist*/) { // skewness = sqrt(l). const char* function = "boost::math::non_central_beta_distribution<%1%>::skewness()"; - // TODO - return 0; + typedef typename Policy::assert_undefined_type assert_type; + BOOST_STATIC_ASSERT(assert_type::value == 0); + + return policies::raise_evaluation_error( + function, + "This function is not yet implemented, the only sensible result is %1%.", + std::numeric_limits::quiet_NaN(), Policy()); // infinity? } template - inline RealType kurtosis_excess(const non_central_beta_distribution& dist) + inline RealType kurtosis_excess(const non_central_beta_distribution& /*dist*/) { const char* function = "boost::math::non_central_beta_distribution<%1%>::kurtosis_excess()"; - // TODO - return 0; + typedef typename Policy::assert_undefined_type assert_type; + BOOST_STATIC_ASSERT(assert_type::value == 0); + + return policies::raise_evaluation_error( + function, + "This function is not yet implemented, the only sensible result is %1%.", + std::numeric_limits::quiet_NaN(), Policy()); // infinity? } // kurtosis_excess template @@ -739,7 +831,7 @@ namespace boost { return kurtosis_excess(dist) + 3; } -#endif + template inline RealType pdf(const non_central_beta_distribution& dist, const RealType& x) { // Probability Density/Mass Function. diff --git a/3party/boost/boost/math/distributions/non_central_t.hpp b/3party/boost/boost/math/distributions/non_central_t.hpp index ba44e09dc8..f28ab33084 100644 --- a/3party/boost/boost/math/distributions/non_central_t.hpp +++ b/3party/boost/boost/math/distributions/non_central_t.hpp @@ -41,20 +41,40 @@ namespace boost // maximum of the poisson weighting term: // int k = boost::math::itrunc(d2); - // Starting Poisson weight: - T pois = gamma_p_derivative(T(k+1), d2, pol) - * tgamma_delta_ratio(T(k + 1), T(0.5f)) - * delta / constants::root_two(); + T pois; + if(k < 15) + { + // Since we'll likely need 30-40 terms anyway, start from zero + // since this simplifies the arithmetic, don't go too overboard though + // as this is the *unstable* direction: + k = 0; + // Starting Poisson weight: + pois = exp(-d2) * 2 / constants::root_pi(); + pois *= delta / constants::root_two(); + } + else + { + // Starting Poisson weight: + pois = gamma_p_derivative(T(k+1), d2, pol) + * tgamma_delta_ratio(T(k + 1), T(0.5f)) + * delta / constants::root_two(); + } if(pois == 0) return init_val; - // Recurance term: - T xterm; - // Starting beta term: - T beta = x < y - ? detail::ibeta_imp(T(k + 1), T(n / 2), x, pol, false, true, &xterm) - : detail::ibeta_imp(T(n / 2), T(k + 1), y, pol, true, true, &xterm); - - xterm *= y / (n / 2 + k); + T xterm, beta; + // Recurrance & starting beta terms: + if(k == 0) + { + beta = -boost::math::powm1(y, n / 2, pol); + xterm = beta > 0.5f ? T(pow(y, n / 2)) : T(1 - beta); + } + else + { + beta = x < y + ? detail::ibeta_imp(T(k + 1), T(n / 2), x, pol, false, true, &xterm) + : detail::ibeta_imp(T(n / 2), T(k + 1), y, pol, true, true, &xterm); + xterm *= y / (n / 2 + k); + } T poisf(pois), betaf(beta), xtermf(xterm); T sum = init_val; if((xterm == 0) && (beta == 0)) @@ -111,36 +131,79 @@ namespace boost // maximum of the poisson weighting term: // int k = boost::math::itrunc(d2); + if(k < 30) + { + // We typically need around 40 terms so may as well start at 0 + // and gain faster computation of starting conditions: + k = 0; + } // Starting Poisson weight: - T pois = gamma_p_derivative(T(k+1), d2, pol) - * tgamma_delta_ratio(T(k + 1), T(0.5f)) - * delta / constants::root_two(); + T pois; + if(k == 0) + { + pois = exp(-d2) * 2 / constants::root_pi(); + pois *= delta / constants::root_two(); + } + else if((k < (int)(max_factorial::value)) && (d2 < tools::log_max_value()) && (log(d2) * k < tools::log_max_value())) + { + // + // For small k we can optimise this calculation by using + // a simpler reduced formula: + // + pois = exp(-d2); + pois *= pow(d2, static_cast(k)); + pois /= boost::math::tgamma(T(k + 1 + 0.5), pol); + pois *= delta / constants::root_two(); + } + else + { + pois = gamma_p_derivative(T(k+1), d2, pol) + * tgamma_delta_ratio(T(k + 1), T(0.5f)) + * delta / constants::root_two(); + } if(pois == 0) return init_val; // Recurance term: T xterm; + T beta; // Starting beta term: - T beta = x < y - ? detail::ibeta_imp(T(k + 1), T(n / 2), x, pol, true, true, &xterm) - : detail::ibeta_imp(T(n / 2), T(k + 1), y, pol, false, true, &xterm); + if(k != 0) + { + beta = x < y + ? detail::ibeta_imp(T(k + 1), T(n / 2), x, pol, true, true, &xterm) + : detail::ibeta_imp(T(n / 2), T(k + 1), y, pol, false, true, &xterm); - xterm *= y / (n / 2 + k); + xterm *= y / (n / 2 + k); + } + else + { + beta = pow(y, n / 2); + xterm = beta; + } T poisf(pois), betaf(beta), xtermf(xterm); T sum = init_val; if((xterm == 0) && (beta == 0)) return init_val; // - // Forward recursion first, this is the stable direction: + // Fused forward and backwards recursion: // boost::uintmax_t count = 0; - for(int i = k + 1; ; ++i) + for(int i = k + 1, j = k; ; ++i, --j) { poisf *= d2 / (i + 0.5f); xtermf *= (x * (n / 2 + i - 1)) / (i); betaf += xtermf; - T term = poisf * betaf; + + if(j >= 0) + { + term += beta * pois; + pois *= (j + 0.5f) / d2; + beta -= xterm; + xterm *= (j) / (x * (n / 2 + j - 1)); + } + sum += term; if(fabs(term/sum) < errtol) break; @@ -152,26 +215,6 @@ namespace boost } ++count; } - // - // Backwards recursion: - // - for(int i = k; i >= 0; --i) - { - T term = beta * pois; - sum += term; - if(fabs(term/sum) < errtol) - break; - pois *= (i + 0.5f) / d2; - beta -= xterm; - xterm *= (i) / (x * (n / 2 + i - 1)); - ++count; - if(count > max_iter) - { - return policies::raise_evaluation_error( - "cdf(non_central_t_distribution<%1%>, %1%)", - "Series did not converge, closest value was %1%", sum, pol); - } - } return sum; } @@ -326,14 +369,32 @@ namespace boost // maximum of the poisson weighting term: // int k = boost::math::itrunc(d2); - // Starting Poisson weight: - T pois = gamma_p_derivative(T(k+1), d2, pol) - * tgamma_delta_ratio(T(k + 1), T(0.5f)) - * delta / constants::root_two(); - // Starting beta term: - T xterm = x < y - ? ibeta_derivative(T(k + 1), n / 2, x, pol) - : ibeta_derivative(n / 2, T(k + 1), y, pol); + T pois, xterm; + if(k < 30) + { + // + // Since we'll need at least 30-40 terms anyway, start from 0 + // since this simplifies the starting arithmetic: + // + k = 0; + // Starting Poisson weight: + pois = exp(-d2) + * (2 / constants::root_pi()) + * delta / constants::root_two(); + // Starting beta term: + xterm = pow(y, n / 2 - 1) * n / 2; + } + else + { + // Starting Poisson weight: + pois = gamma_p_derivative(T(k+1), d2, pol) + * tgamma_delta_ratio(T(k + 1), T(0.5f)) + * delta / constants::root_two(); + // Starting beta term: + xterm = x < y + ? ibeta_derivative(T(k + 1), n / 2, x, pol) + : ibeta_derivative(n / 2, T(k + 1), y, pol); + } T poisf(pois), xtermf(xterm); T sum = init_val; if((pois == 0) || (xterm == 0)) diff --git a/3party/boost/boost/math/policies/error_handling.hpp b/3party/boost/boost/math/policies/error_handling.hpp index 6285e1e9f2..198cd020b0 100644 --- a/3party/boost/boost/math/policies/error_handling.hpp +++ b/3party/boost/boost/math/policies/error_handling.hpp @@ -60,8 +60,8 @@ template T user_denorm_error(const char* function, const char* message, const T& val); template T user_evaluation_error(const char* function, const char* message, const T& val); -template -T user_rounding_error(const char* function, const char* message, const T& val); +template +T user_rounding_error(const char* function, const char* message, const T& val, const TargetType& t); template T user_indeterminate_result_error(const char* function, const char* message, const T& val); @@ -381,11 +381,12 @@ inline T raise_evaluation_error( return user_evaluation_error(function, message, val); } -template +template inline T raise_rounding_error( const char* function, const char* message, const T& val, + const TargetType&, const ::boost::math::policies::rounding_error< ::boost::math::policies::throw_on_error>&) { raise_error(function, message, val); @@ -393,39 +394,42 @@ inline T raise_rounding_error( return T(0); } -template +template inline T raise_rounding_error( const char* , const char* , const T& val, + const TargetType&, const ::boost::math::policies::rounding_error< ::boost::math::policies::ignore_error>&) { // This may or may not do the right thing, but the user asked for the error // to be ignored so here we go anyway: - return val; + return std::numeric_limits::is_specialized ? (val > 0 ? (std::numeric_limits::max)() : -(std::numeric_limits::max)()): val; } -template +template inline T raise_rounding_error( const char* , const char* , const T& val, + const TargetType&, const ::boost::math::policies::rounding_error< ::boost::math::policies::errno_on_error>&) { errno = ERANGE; // This may or may not do the right thing, but the user asked for the error // to be silent so here we go anyway: - return val; + return std::numeric_limits::is_specialized ? (val > 0 ? (std::numeric_limits::max)() : -(std::numeric_limits::max)()): val; } -template +template inline T raise_rounding_error( const char* function, const char* message, const T& val, + const TargetType& t, const ::boost::math::policies::rounding_error< ::boost::math::policies::user_error>&) { - return user_rounding_error(function, message, val); + return user_rounding_error(function, message, val, t); } template @@ -536,13 +540,13 @@ inline T raise_evaluation_error(const char* function, const char* message, const val, policy_type()); } -template -inline T raise_rounding_error(const char* function, const char* message, const T& val, const Policy&) +template +inline T raise_rounding_error(const char* function, const char* message, const T& val, const TargetType& t, const Policy&) { typedef typename Policy::rounding_error_type policy_type; return detail::raise_rounding_error( function, message ? message : "Value %1% can not be represented in the target integer type.", - val, policy_type()); + val, t, policy_type()); } template diff --git a/3party/boost/boost/math/special_functions/detail/ibeta_inverse.hpp b/3party/boost/boost/math/special_functions/detail/ibeta_inverse.hpp index deaa924d11..d745b664dd 100644 --- a/3party/boost/boost/math/special_functions/detail/ibeta_inverse.hpp +++ b/3party/boost/boost/math/special_functions/detail/ibeta_inverse.hpp @@ -454,6 +454,24 @@ T ibeta_inv_imp(T a, T b, T p, T q, const Policy& pol, T* py) { BOOST_MATH_STD_USING // For ADL of math functions. + // + // Handle trivial cases first: + // + if(q == 0) + { + if(py) *py = 0; + return 1; + } + else if(p == 0) + { + if(py) *py = 1; + return 0; + } + else if((a == 1) && (b == 1)) + { + if(py) *py = 1 - p; + return p; + } // // The flag invert is set to true if we swap a for b and p for q, // in which case the result has to be subtracted from 1: @@ -477,31 +495,16 @@ T ibeta_inv_imp(T a, T b, T p, T q, const Policy& pol, T* py) // Student's T with b = 0.5 gets handled as a special case, swap // around if the arguments are in the "wrong" order: // - if(a == 0.5f) + if((a == 0.5f) && (b >= 0.5f)) { std::swap(a, b); std::swap(p, q); invert = !invert; } // - // Handle trivial cases first: + // Select calculation method for the initial estimate: // - if(q == 0) - { - if(py) *py = 0; - return 1; - } - else if(p == 0) - { - if(py) *py = 1; - return 0; - } - else if((a == 1) && (b == 1)) - { - if(py) *py = 1 - p; - return p; - } - else if((b == 0.5f) && (a >= 0.5f)) + if((b == 0.5f) && (a >= 0.5f)) { // // We have a Student's T distribution: @@ -541,7 +544,7 @@ T ibeta_inv_imp(T a, T b, T p, T q, const Policy& pol, T* py) T r = a + b; T theta = asin(sqrt(a / r)); T lambda = minv / r; - if((lambda >= 0.2) && (lambda <= 0.8) && (lambda >= 10)) + if((lambda >= 0.2) && (lambda <= 0.8) && (r >= 10)) { // // The second error function case is the next cheapest @@ -620,7 +623,7 @@ T ibeta_inv_imp(T a, T b, T p, T q, const Policy& pol, T* py) { std::swap(a, b); std::swap(p, q); - invert = true; + invert = !invert; xs = 1 - xs; } T xg = pow(a * p * boost::math::beta(a, b, pol), 1/a); @@ -652,7 +655,7 @@ T ibeta_inv_imp(T a, T b, T p, T q, const Policy& pol, T* py) std::swap(a, b); std::swap(p, q); std::swap(xs, xs2); - invert = true; + invert = !invert; } // // Estimate x and y, using expm1 to get a good estimate @@ -716,7 +719,7 @@ T ibeta_inv_imp(T a, T b, T p, T q, const Policy& pol, T* py) { std::swap(a, b); std::swap(p, q); - invert = true; + invert = !invert; } if(pow(p, 1/a) < 0.5) { diff --git a/3party/boost/boost/math/special_functions/detail/unchecked_factorial.hpp b/3party/boost/boost/math/special_functions/detail/unchecked_factorial.hpp index 7783e161c4..35b196896b 100644 --- a/3party/boost/boost/math/special_functions/detail/unchecked_factorial.hpp +++ b/3party/boost/boost/math/special_functions/detail/unchecked_factorial.hpp @@ -28,7 +28,7 @@ namespace boost { namespace math template struct max_factorial; -// efinitions: +// Definitions: template <> inline float unchecked_factorial(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(float)) { @@ -282,6 +282,14 @@ struct max_factorial template inline T unchecked_factorial(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) { + BOOST_STATIC_ASSERT(!boost::is_integral::value); + // factorial(n) is not implemented + // because it would overflow integral type T for too small n + // to be useful. Use instead a floating-point type, + // and convert to an unsigned type if essential, for example: + // unsigned int nfac = static_cast(factorial(n)); + // See factorial documentation for more detail. + static const boost::array factorials = {{ boost::lexical_cast("1"), boost::lexical_cast("1"), diff --git a/3party/boost/boost/math/special_functions/factorials.hpp b/3party/boost/boost/math/special_functions/factorials.hpp index 0d0a98a5d4..f57147ebfa 100644 --- a/3party/boost/boost/math/special_functions/factorials.hpp +++ b/3party/boost/boost/math/special_functions/factorials.hpp @@ -1,4 +1,4 @@ -// Copyright John Maddock 2006. +// Copyright John Maddock 2006, 2010. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -31,6 +31,13 @@ template inline T factorial(unsigned i, const Policy& pol) { BOOST_STATIC_ASSERT(!boost::is_integral::value); + // factorial(n) is not implemented + // because it would overflow integral type T for too small n + // to be useful. Use instead a floating-point type, + // and convert to an unsigned type if essential, for example: + // unsigned int nfac = static_cast(factorial(n)); + // See factorial documentation for more detail. + BOOST_MATH_STD_USING // Aid ADL for floor. if(i <= max_factorial::value) @@ -78,12 +85,12 @@ T double_factorial(unsigned i, const Policy& pol) return ceil(unchecked_factorial(i) / (ldexp(T(1), (int)n) * unchecked_factorial(n)) - 0.5f); } // - // Fallthrough: i is too large to use table lookup, try the + // Fallthrough: i is too large to use table lookup, try the // gamma function instead. // T result = boost::math::tgamma(static_cast(i) / 2 + 1, pol) / sqrt(constants::pi()); if(ldexp(tools::max_value(), -static_cast(i+1) / 2) > result) - return ceil(result * ldexp(T(1), (i+1) / 2) - 0.5f); + return ceil(result * ldexp(T(1), static_cast(i+1) / 2) - 0.5f); } else { @@ -181,7 +188,7 @@ inline T falling_factorial_imp(T x, unsigned n, const Policy& pol) // // Simple case: just the ratio of two // (positive argument) gamma functions. - // Note that we don't optimise this for small n, + // Note that we don't optimise this for small n, // because tgamma_delta_ratio is alreay optimised // for that use case: // @@ -191,7 +198,7 @@ inline T falling_factorial_imp(T x, unsigned n, const Policy& pol) } // namespace detail template -inline typename tools::promote_args::type +inline typename tools::promote_args::type falling_factorial(RT x, unsigned n) { typedef typename tools::promote_args::type result_type; @@ -200,7 +207,7 @@ inline typename tools::promote_args::type } template -inline typename tools::promote_args::type +inline typename tools::promote_args::type falling_factorial(RT x, unsigned n, const Policy& pol) { typedef typename tools::promote_args::type result_type; @@ -209,7 +216,7 @@ inline typename tools::promote_args::type } template -inline typename tools::promote_args::type +inline typename tools::promote_args::type rising_factorial(RT x, int n) { typedef typename tools::promote_args::type result_type; @@ -218,7 +225,7 @@ inline typename tools::promote_args::type } template -inline typename tools::promote_args::type +inline typename tools::promote_args::type rising_factorial(RT x, int n, const Policy& pol) { typedef typename tools::promote_args::type result_type; diff --git a/3party/boost/boost/math/special_functions/legendre.hpp b/3party/boost/boost/math/special_functions/legendre.hpp index 074383ddb9..79e9756763 100644 --- a/3party/boost/boost/math/special_functions/legendre.hpp +++ b/3party/boost/boost/math/special_functions/legendre.hpp @@ -164,7 +164,7 @@ inline T legendre_p_imp(int l, int m, T x, const Policy& pol) { BOOST_MATH_STD_USING // TODO: we really could use that mythical "pow1p" function here: - return legendre_p_imp(l, m, x, pow(1 - x*x, T(abs(m))/2), pol); + return legendre_p_imp(l, m, x, static_cast(pow(1 - x*x, T(abs(m))/2)), pol); } } diff --git a/3party/boost/boost/math/special_functions/round.hpp b/3party/boost/boost/math/special_functions/round.hpp index 519abdd80c..4ea2eaa088 100644 --- a/3party/boost/boost/math/special_functions/round.hpp +++ b/3party/boost/boost/math/special_functions/round.hpp @@ -21,7 +21,7 @@ inline T round(const T& v, const Policy& pol) { BOOST_MATH_STD_USING if(!(boost::math::isfinite)(v)) - return policies::raise_rounding_error("boost::math::round<%1%>(%1%)", 0, v, pol); + return policies::raise_rounding_error("boost::math::round<%1%>(%1%)", 0, v, v, pol); return v < 0 ? static_cast(ceil(v - 0.5f)) : static_cast(floor(v + 0.5f)); } template @@ -44,7 +44,7 @@ inline int iround(const T& v, const Policy& pol) BOOST_MATH_STD_USING T r = boost::math::round(v, pol); if(fabs(r) > (std::numeric_limits::max)()) - return static_cast(policies::raise_rounding_error("boost::math::iround<%1%>(%1%)", 0, v, pol)); + return static_cast(policies::raise_rounding_error("boost::math::iround<%1%>(%1%)", 0, v, 0, pol)); return static_cast(r); } template @@ -59,7 +59,7 @@ inline long lround(const T& v, const Policy& pol) BOOST_MATH_STD_USING T r = boost::math::round(v, pol); if(fabs(r) > (std::numeric_limits::max)()) - return static_cast(policies::raise_rounding_error("boost::math::lround<%1%>(%1%)", 0, v, pol)); + return static_cast(policies::raise_rounding_error("boost::math::lround<%1%>(%1%)", 0, v, 0L, pol)); return static_cast(r); } template @@ -76,7 +76,7 @@ inline boost::long_long_type llround(const T& v, const Policy& pol) BOOST_MATH_STD_USING T r = boost::math::round(v, pol); if(fabs(r) > (std::numeric_limits::max)()) - return static_cast(policies::raise_rounding_error("boost::math::llround<%1%>(%1%)", 0, v, pol)); + return static_cast(policies::raise_rounding_error("boost::math::llround<%1%>(%1%)", 0, v, 0LL, pol)); return static_cast(r); } template diff --git a/3party/boost/boost/math/special_functions/trunc.hpp b/3party/boost/boost/math/special_functions/trunc.hpp index 49f933b34a..4ccec3aac7 100644 --- a/3party/boost/boost/math/special_functions/trunc.hpp +++ b/3party/boost/boost/math/special_functions/trunc.hpp @@ -21,7 +21,7 @@ inline T trunc(const T& v, const Policy& pol) { BOOST_MATH_STD_USING if(!(boost::math::isfinite)(v)) - return policies::raise_rounding_error("boost::math::trunc<%1%>(%1%)", 0, v, pol); + return policies::raise_rounding_error("boost::math::trunc<%1%>(%1%)", 0, v, v, pol); return (v >= 0) ? static_cast(floor(v)) : static_cast(ceil(v)); } template @@ -44,7 +44,7 @@ inline int itrunc(const T& v, const Policy& pol) BOOST_MATH_STD_USING T r = boost::math::trunc(v, pol); if(fabs(r) > (std::numeric_limits::max)()) - return static_cast(policies::raise_rounding_error("boost::math::itrunc<%1%>(%1%)", 0, v, pol)); + return static_cast(policies::raise_rounding_error("boost::math::itrunc<%1%>(%1%)", 0, 0, v, pol)); return static_cast(r); } template @@ -59,7 +59,7 @@ inline long ltrunc(const T& v, const Policy& pol) BOOST_MATH_STD_USING T r = boost::math::trunc(v, pol); if(fabs(r) > (std::numeric_limits::max)()) - return static_cast(policies::raise_rounding_error("boost::math::ltrunc<%1%>(%1%)", 0, v, pol)); + return static_cast(policies::raise_rounding_error("boost::math::ltrunc<%1%>(%1%)", 0, 0L, v, pol)); return static_cast(r); } template @@ -76,7 +76,7 @@ inline boost::long_long_type lltrunc(const T& v, const Policy& pol) BOOST_MATH_STD_USING T r = boost::math::trunc(v, pol); if(fabs(r) > (std::numeric_limits::max)()) - return static_cast(policies::raise_rounding_error("boost::math::lltrunc<%1%>(%1%)", 0, v, pol)); + return static_cast(policies::raise_rounding_error("boost::math::lltrunc<%1%>(%1%)", 0, v, 0LL, pol)); return static_cast(r); } template diff --git a/3party/boost/boost/math/tools/config.hpp b/3party/boost/boost/math/tools/config.hpp index f11a0a94bb..e2429133f5 100644 --- a/3party/boost/boost/math/tools/config.hpp +++ b/3party/boost/boost/math/tools/config.hpp @@ -257,7 +257,7 @@ inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d) #if (defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__) - #include + #include namespace boost{ namespace math{ namespace detail diff --git a/3party/boost/boost/math/tools/promotion.hpp b/3party/boost/boost/math/tools/promotion.hpp index 83772f52e2..728aaf1209 100644 --- a/3party/boost/boost/math/tools/promotion.hpp +++ b/3party/boost/boost/math/tools/promotion.hpp @@ -33,6 +33,7 @@ #include // for boost::mpl::if_c. #include // for boost::mpl::if_c. #include // for boost::mpl::if_c. +#include // for boost::mpl::if_c. #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #include @@ -93,7 +94,7 @@ namespace boost >::type >::type, // else one or the other is a user-defined type: - typename mpl::if_< ::boost::is_convertible, T2P, T1P>::type>::type type; + typename mpl::if_< typename mpl::and_ >, ::boost::is_convertible >, T2P, T1P>::type>::type type; }; // promote_arg2 // These full specialisations reduce mpl::if_ usage and speed up // compilation: diff --git a/3party/boost/boost/msm/back/default_compile_policy.hpp b/3party/boost/boost/msm/back/default_compile_policy.hpp index 8c328d834c..8fc3ab7304 100644 --- a/3party/boost/boost/msm/back/default_compile_policy.hpp +++ b/3party/boost/boost/msm/back/default_compile_policy.hpp @@ -17,6 +17,7 @@ namespace boost { namespace msm { namespace back { struct favor_runtime_speed { + typedef int compile_policy; typedef ::boost::mpl::true_ add_forwarding_rows; }; diff --git a/3party/boost/boost/msm/back/favor_compile_time.hpp b/3party/boost/boost/msm/back/favor_compile_time.hpp index a76e082a38..88464d2b34 100644 --- a/3party/boost/boost/msm/back/favor_compile_time.hpp +++ b/3party/boost/boost/msm/back/favor_compile_time.hpp @@ -63,6 +63,7 @@ private: struct favor_compile_time { + typedef int compile_policy; typedef ::boost::mpl::false_ add_forwarding_rows; }; diff --git a/3party/boost/boost/msm/back/history_policies.hpp b/3party/boost/boost/msm/back/history_policies.hpp index cf507b52eb..4dfa021378 100644 --- a/3party/boost/boost/msm/back/history_policies.hpp +++ b/3party/boost/boost/msm/back/history_policies.hpp @@ -152,6 +152,7 @@ private: struct NoHistory { + typedef int history_policy; template struct apply { @@ -160,6 +161,7 @@ struct NoHistory }; struct AlwaysHistory { + typedef int history_policy; template struct apply { @@ -169,6 +171,7 @@ struct AlwaysHistory template struct ShallowHistory { + typedef int history_policy; template struct apply { diff --git a/3party/boost/boost/msm/back/metafunctions.hpp b/3party/boost/boost/msm/back/metafunctions.hpp index f150cc42b6..66a051f9f9 100644 --- a/3party/boost/boost/msm/back/metafunctions.hpp +++ b/3party/boost/boost/msm/back/metafunctions.hpp @@ -38,10 +38,18 @@ #include #include #include +#include +#include +#include +#include #include #include +// mpl_graph graph implementation and depth first search +#include +#include + BOOST_MPL_HAS_XXX_TRAIT_DEF(explicit_creation) BOOST_MPL_HAS_XXX_TRAIT_DEF(pseudo_entry) BOOST_MPL_HAS_XXX_TRAIT_DEF(pseudo_exit) @@ -58,6 +66,14 @@ BOOST_MPL_HAS_XXX_TRAIT_DEF(wrapped_entry) namespace boost { namespace msm { namespace back { +template +struct set_insert_range +{ + typedef typename ::boost::mpl::fold< + Range,Sequence, + ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2 > + >::type type; +}; // returns the current state type of a transition template @@ -168,6 +184,7 @@ struct get_number_of_regions }; // builds a mpl::vector of initial states +//TODO remove duplicate from get_initial_states template struct get_regions_as_sequence { @@ -314,7 +331,7 @@ struct is_pseudo_exit ::boost::mpl::bool_, ::boost::mpl::bool_ >::type type; }; -// says if a state is an exit pseudo state +// says if a state is an entry pseudo state or an explicit entry template struct is_direct_entry { @@ -374,7 +391,7 @@ struct create_stt ::boost::mpl::if_< ::boost::mpl::has_key, ::boost::mpl::placeholders::_1, - ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::end, + ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::end< ::boost::mpl::placeholders::_1>, not_a_row< get_wrapped_state< ::boost::mpl::placeholders::_2> > > > >::type with_init; @@ -629,6 +646,187 @@ struct get_initial_event { typedef typename StateType::initial_event type; }; + +template +struct build_one_orthogonal_region +{ + template + struct row_to_incidence : + ::boost::mpl::vector< + ::boost::mpl::pair< + typename Row::next_state_type, + typename Row::transition_event>, + typename Row::current_state_type, + typename Row::next_state_type + > {}; + + template + struct transition_incidence_list_helper + { + typedef typename ::boost::mpl::push_back< Seq, row_to_incidence< Elt > >::type type; + }; + + typedef typename ::boost::mpl::fold< + TransitionTable, + ::boost::mpl::vector<>, + transition_incidence_list_helper< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2> + >::type transition_incidence_list; + + typedef ::boost::msm::mpl_graph::incidence_list_graph + transition_graph; + + struct preordering_dfs_visitor : + ::boost::msm::mpl_graph::dfs_default_visitor_operations + { + template + struct discover_vertex : + ::boost::mpl::insert + {}; + }; + + typedef typename mpl::first< + typename ::boost::msm::mpl_graph::depth_first_search< + transition_graph, + preordering_dfs_visitor, + ::boost::mpl::set<>, + InitState + >::type + >::type type; +}; + +template +struct find_entry_states +{ + typedef typename ::boost::mpl::copy< + typename Fsm::substate_list, + ::boost::mpl::inserter< + ::boost::mpl::set0<>, + ::boost::mpl::if_< + has_explicit_entry_state< ::boost::mpl::placeholders::_2 >, + ::boost::mpl::insert< ::boost::mpl::placeholders::_1, ::boost::mpl::placeholders::_2>, + ::boost::mpl::placeholders::_1 + > + > + >::type type; +}; + +template +struct is_common_element +{ + typedef typename ::boost::mpl::fold< + Set1, ::boost::mpl::false_, + ::boost::mpl::if_< + ::boost::mpl::has_key< + Set2, + ::boost::mpl::placeholders::_2 + >, + ::boost::mpl::true_, + ::boost::mpl::placeholders::_1 + > + >::type type; +}; + +template +struct add_entry_region +{ + typedef typename ::boost::mpl::transform< + AllRegions, + ::boost::mpl::if_< + is_common_element, + set_insert_range< ::boost::mpl::placeholders::_1, EntryRegion>, + ::boost::mpl::placeholders::_1 + > + >::type type; +}; + +// build a vector of regions states (as a set) +// one set of states for every region +template +struct build_orthogonal_regions +{ + typedef typename + ::boost::mpl::fold< + InitStates, ::boost::mpl::vector0<>, + ::boost::mpl::push_back< + ::boost::mpl::placeholders::_1, + build_one_orthogonal_region< typename Fsm::stt, ::boost::mpl::placeholders::_2 > > + >::type without_entries; + + typedef typename + ::boost::mpl::fold< + typename find_entry_states::type, ::boost::mpl::vector0<>, + ::boost::mpl::push_back< + ::boost::mpl::placeholders::_1, + build_one_orthogonal_region< typename Fsm::stt, ::boost::mpl::placeholders::_2 > > + >::type only_entries; + + typedef typename ::boost::mpl::fold< + only_entries , without_entries, + add_entry_region< ::boost::mpl::placeholders::_2, ::boost::mpl::placeholders::_1> + >::type type; +}; + +template +struct find_region_index +{ + typedef typename + ::boost::mpl::fold< + GraphAsSeqOfSets, ::boost::mpl::pair< ::boost::mpl::int_< -1 > /*res*/, ::boost::mpl::int_<0> /*counter*/ >, + ::boost::mpl::if_< + ::boost::mpl::has_key< ::boost::mpl::placeholders::_2, StateType >, + ::boost::mpl::pair< + ::boost::mpl::second< ::boost::mpl::placeholders::_1 >, + ::boost::mpl::next< ::boost::mpl::second< ::boost::mpl::placeholders::_1 > > + >, + ::boost::mpl::pair< + ::boost::mpl::first< ::boost::mpl::placeholders::_1 >, + ::boost::mpl::next< ::boost::mpl::second< ::boost::mpl::placeholders::_1 > > + > + > + >::type result_pair; + typedef typename ::boost::mpl::first::type type; + enum {value = type::value}; +}; + +template +struct check_regions_orthogonality +{ + typedef typename build_orthogonal_regions< Fsm,typename Fsm::initial_states>::type regions; + + typedef typename ::boost::mpl::fold< + regions, ::boost::mpl::int_<0>, + ::boost::mpl::plus< ::boost::mpl::placeholders::_1 , ::boost::mpl::size< ::boost::mpl::placeholders::_2> > + >::type number_of_states_in_regions; + + typedef typename ::boost::mpl::fold< + regions,mpl::set0<>, + set_insert_range< + ::boost::mpl::placeholders::_1, + ::boost::mpl::placeholders::_2 > + >::type one_big_states_set; + + enum {states_in_regions_raw = number_of_states_in_regions::value}; + enum {cumulated_states_in_regions_raw = ::boost::mpl::size::value}; +}; + +template +struct check_no_unreachable_state +{ + typedef typename check_regions_orthogonality::one_big_states_set states_in_regions; + + typedef typename set_insert_range< + states_in_regions, + typename ::boost::mpl::eval_if< + typename has_explicit_creation::type, + get_explicit_creation, + ::boost::mpl::vector0<> + >::type + >::type with_explicit_creation; + + enum {states_in_fsm = ::boost::mpl::size< typename Fsm::substate_list >::value}; + enum {cumulated_states_in_regions = ::boost::mpl::size< with_explicit_creation >::value}; +}; + // helper to find out if a SM has an active exit state and is therefore waiting for exiting template inline diff --git a/3party/boost/boost/msm/back/mpl_graph_fsm_check.hpp b/3party/boost/boost/msm/back/mpl_graph_fsm_check.hpp new file mode 100644 index 0000000000..86a36b408f --- /dev/null +++ b/3party/boost/boost/msm/back/mpl_graph_fsm_check.hpp @@ -0,0 +1,48 @@ +// Copyright 2008 Christophe Henry +// henry UNDERSCORE christophe AT hotmail DOT com +// This is an extended version of the state machine available in the boost::mpl library +// Distributed under the same license as the original. +// Copyright for the original version: +// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed +// under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_BACK_MPL_GRAPH_FSM_CHECK_H +#define BOOST_MSM_BACK_MPL_GRAPH_FSM_CHECK_H + +#include + +#include + +namespace boost { namespace msm { namespace back +{ + struct mpl_graph_fsm_check + { + typedef int fsm_check; + // checks that regions are truly orthogonal (one state belongs to 1 region) + // using the mpl_graph library (part of metagraph) + template + static void check_orthogonality() + { + BOOST_MPL_ASSERT_RELATION( ::boost::msm::back::check_regions_orthogonality::states_in_regions_raw, + ==, + ::boost::msm::back::check_regions_orthogonality::cumulated_states_in_regions_raw ); + + } + // checks that all states are reachable or created using the explicit_creation typedef + // using the mpl_graph library (part of metagraph) + template + static void check_unreachable_states() + { + BOOST_MPL_ASSERT_RELATION( ::boost::msm::back::check_no_unreachable_state::states_in_fsm, + ==, + ::boost::msm::back::check_no_unreachable_state::cumulated_states_in_regions ); + + } + }; + +} } }//boost::msm::back + + +#endif //BOOST_MSM_BACK_MPL_GRAPH_FSM_CHECK_H diff --git a/3party/boost/boost/msm/back/no_fsm_check.hpp b/3party/boost/boost/msm/back/no_fsm_check.hpp new file mode 100644 index 0000000000..1f989de08d --- /dev/null +++ b/3party/boost/boost/msm/back/no_fsm_check.hpp @@ -0,0 +1,37 @@ +// Copyright 2008 Christophe Henry +// henry UNDERSCORE christophe AT hotmail DOT com +// This is an extended version of the state machine available in the boost::mpl library +// Distributed under the same license as the original. +// Copyright for the original version: +// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed +// under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_BACK_NO_FSM_CHECK_H +#define BOOST_MSM_BACK_NO_FSM_CHECK_H + +#include + +#include + +namespace boost { namespace msm { namespace back +{ + struct no_fsm_check + { + typedef int fsm_check; + // no fsm structure checking + template + static void check_orthogonality() + { + } + template + static void check_unreachable_states() + { + } + }; + +} } }//boost::msm::back + + +#endif //BOOST_MSM_BACK_NO_FSM_CHECK_H diff --git a/3party/boost/boost/msm/back/queue_container_circular.hpp b/3party/boost/boost/msm/back/queue_container_circular.hpp new file mode 100644 index 0000000000..8ad3fa5d15 --- /dev/null +++ b/3party/boost/boost/msm/back/queue_container_circular.hpp @@ -0,0 +1,32 @@ +// Copyright 2008 Christophe Henry +// henry UNDERSCORE christophe AT hotmail DOT com +// This is an extended version of the state machine available in the boost::mpl library +// Distributed under the same license as the original. +// Copyright for the original version: +// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed +// under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_BACK_QUEUE_CONTAINER_CIRCULAR_H +#define BOOST_MSM_BACK_QUEUE_CONTAINER_CIRCULAR_H + +#include + +namespace boost { namespace msm { namespace back +{ + struct queue_container_circular + { + typedef int queue_container_policy; + + template + struct In + { + typedef typename boost::circular_buffer type; + }; + }; + +} } }//boost::msm::back + + +#endif //BOOST_MSM_BACK_QUEUE_CONTAINER_CIRCULAR_H diff --git a/3party/boost/boost/msm/back/queue_container_deque.hpp b/3party/boost/boost/msm/back/queue_container_deque.hpp new file mode 100644 index 0000000000..b257635be2 --- /dev/null +++ b/3party/boost/boost/msm/back/queue_container_deque.hpp @@ -0,0 +1,32 @@ +// Copyright 2008 Christophe Henry +// henry UNDERSCORE christophe AT hotmail DOT com +// This is an extended version of the state machine available in the boost::mpl library +// Distributed under the same license as the original. +// Copyright for the original version: +// Copyright 2005 David Abrahams and Aleksey Gurtovoy. Distributed +// under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_BACK_QUEUE_CONTAINER_DEQUE_H +#define BOOST_MSM_BACK_QUEUE_CONTAINER_DEQUE_H + +#include + +namespace boost { namespace msm { namespace back +{ + struct queue_container_deque + { + typedef int queue_container_policy; + + template + struct In + { + typedef typename std::deque type; + }; + }; + +} } }//boost::msm::back + + +#endif //BOOST_MSM_BACK_QUEUE_CONTAINER_DEQUE_H diff --git a/3party/boost/boost/msm/back/state_machine.hpp b/3party/boost/boost/msm/back/state_machine.hpp index 1210bd17a8..0682290201 100644 --- a/3party/boost/boost/msm/back/state_machine.hpp +++ b/3party/boost/boost/msm/back/state_machine.hpp @@ -13,7 +13,6 @@ #include #include -#include #include #include #include @@ -22,6 +21,7 @@ #include #include +#include #include #include @@ -50,6 +50,8 @@ #include +#include + #include #include #include @@ -59,6 +61,8 @@ #include #include #include +#include +#include BOOST_MPL_HAS_XXX_TRAIT_DEF(accept_sig) BOOST_MPL_HAS_XXX_TRAIT_DEF(no_automatic_create) @@ -66,6 +70,10 @@ BOOST_MPL_HAS_XXX_TRAIT_DEF(non_forwarding_flag) BOOST_MPL_HAS_XXX_TRAIT_DEF(direct_entry) BOOST_MPL_HAS_XXX_TRAIT_DEF(initial_event) BOOST_MPL_HAS_XXX_TRAIT_DEF(do_serialize) +BOOST_MPL_HAS_XXX_TRAIT_DEF(history_policy) +BOOST_MPL_HAS_XXX_TRAIT_DEF(fsm_check) +BOOST_MPL_HAS_XXX_TRAIT_DEF(compile_policy) +BOOST_MPL_HAS_XXX_TRAIT_DEF(queue_container_policy) #ifndef BOOST_MSM_CONSTRUCTOR_ARG_SIZE #define BOOST_MSM_CONSTRUCTOR_ARG_SIZE 5 // default max number of arguments for constructors @@ -89,26 +97,87 @@ template const boost::msm::back::dispatch_table dispatch_table::instance; +BOOST_PARAMETER_TEMPLATE_KEYWORD(front_end) +BOOST_PARAMETER_TEMPLATE_KEYWORD(history_policy) +BOOST_PARAMETER_TEMPLATE_KEYWORD(compile_policy) +BOOST_PARAMETER_TEMPLATE_KEYWORD(fsm_check_policy) +BOOST_PARAMETER_TEMPLATE_KEYWORD(queue_container_policy) + +typedef ::boost::parameter::parameters< + ::boost::parameter::required< ::boost::msm::back::tag::front_end > + , ::boost::parameter::optional< + ::boost::parameter::deduced< ::boost::msm::back::tag::history_policy>, has_history_policy< ::boost::mpl::_ > + > + , ::boost::parameter::optional< + ::boost::parameter::deduced< ::boost::msm::back::tag::compile_policy>, has_compile_policy< ::boost::mpl::_ > + > + , ::boost::parameter::optional< + ::boost::parameter::deduced< ::boost::msm::back::tag::fsm_check_policy>, has_fsm_check< ::boost::mpl::_ > + > + , ::boost::parameter::optional< + ::boost::parameter::deduced< ::boost::msm::back::tag::queue_container_policy>, + has_queue_container_policy< ::boost::mpl::_ > + > +> state_machine_signature; + + // library-containing class for state machines. Pass the actual FSM class as // the Concrete parameter. -template -class state_machine : public Derived +// A0=Derived,A1=NoHistory,A2=CompilePolicy,A3=FsmCheckPolicy > +template < + class A0 + , class A1 = parameter::void_ + , class A2 = parameter::void_ + , class A3 = parameter::void_ + , class A4 = parameter::void_ +> +class state_machine : //public Derived + public ::boost::parameter::binding< + typename state_machine_signature::bind::type, ::boost::msm::back::tag::front_end + >::type { +public: + // Create ArgumentPack + typedef typename + state_machine_signature::bind::type + state_machine_args; + + // Extract first logical parameter. + typedef typename ::boost::parameter::binding< + state_machine_args, ::boost::msm::back::tag::front_end>::type Derived; + + typedef typename ::boost::parameter::binding< + state_machine_args, ::boost::msm::back::tag::history_policy, NoHistory >::type HistoryPolicy; + + typedef typename ::boost::parameter::binding< + state_machine_args, ::boost::msm::back::tag::compile_policy, favor_runtime_speed >::type CompilePolicy; + + typedef typename ::boost::parameter::binding< + state_machine_args, ::boost::msm::back::tag::fsm_check_policy, no_fsm_check >::type FsmCheckPolicy; + + typedef typename ::boost::parameter::binding< + state_machine_args, ::boost::msm::back::tag::queue_container_policy, + queue_container_deque >::type QueueContainerPolicy; + private: - typedef boost::msm::back::state_machine library_sm; + + typedef boost::msm::back::state_machine< + A0,A1,A2,A3,A4> library_sm; typedef ::boost::function< execute_return ()> transition_fct; typedef ::boost::function< execute_return () > deferred_fct; - typedef std::deque deferred_events_queue_t; - typedef std::queue events_queue_t; - typedef bool (*flag_handler)(library_sm&); + typedef typename QueueContainerPolicy:: + template In::type deferred_events_queue_t; + typedef typename QueueContainerPolicy:: + template In::type events_queue_t; + + typedef bool (*flag_handler)(library_sm const&); // all state machines are friend with each other to allow embedding any of them in another fsm - template friend class boost::msm::back::state_machine; // helper to add, if needed, visitors to all states @@ -168,14 +237,14 @@ private: visitors m_state_visitors; }; - template + template struct deferred_msg_queue_helper { }; template struct deferred_msg_queue_helper::type >::type> + typename ::boost::msm::back::has_fsm_deferred_events::type,int >::type> { public: deferred_msg_queue_helper():m_deferred_events_queue(){} @@ -351,7 +420,7 @@ private: (::boost::fusion::at_key(fsm.m_substate_list),evt,fsm); // then call the action method - ROW::action_call(fsm,evt, + HandledEnum res = ROW::action_call(fsm,evt, ::boost::fusion::at_key(fsm.m_substate_list), ::boost::fusion::at_key(fsm.m_substate_list), fsm.m_substate_list); @@ -360,7 +429,7 @@ private: convert_event_and_execute_entry (::boost::fusion::at_key(fsm.m_substate_list),evt,fsm); fsm.m_states[region_index]=next_state; - return HANDLED_TRUE; + return res; } }; @@ -483,7 +552,7 @@ private: (::boost::fusion::at_key(fsm.m_substate_list),evt,fsm); // then call the action method - ROW::action_call(fsm,evt, + HandledEnum res = ROW::action_call(fsm,evt, ::boost::fusion::at_key(fsm.m_substate_list), ::boost::fusion::at_key(fsm.m_substate_list), fsm.m_substate_list); @@ -493,7 +562,7 @@ private: (::boost::fusion::at_key(fsm.m_substate_list),evt,fsm); fsm.m_states[region_index]=next_state; - return HANDLED_TRUE; + return res; } }; @@ -587,11 +656,11 @@ private: } // call the action method - ROW::action_call(fsm,evt, + HandledEnum res = ROW::action_call(fsm,evt, ::boost::fusion::at_key(fsm.m_substate_list), ::boost::fusion::at_key(fsm.m_substate_list), fsm.m_substate_list); - return HANDLED_TRUE; + return res; } }; @@ -645,18 +714,18 @@ private: typedef T2 next_state_type; // Take the transition action and return the next state. - static HandledEnum execute(library_sm& fsm, int region_index, int state, transition_event const& evt) + static HandledEnum execute(library_sm& fsm, int , int state, transition_event const& evt) { BOOST_STATIC_CONSTANT(int, current_state = (get_state_id::type::value)); BOOST_ASSERT(state == (current_state)); // call the action method - ROW::action_call(fsm,evt, + HandledEnum res = ROW::action_call(fsm,evt, ::boost::fusion::at_key(fsm.m_substate_list), ::boost::fusion::at_key(fsm.m_substate_list), fsm.m_substate_list); - return HANDLED_TRUE; + return res; } }; // row simply ignoring the event @@ -701,7 +770,7 @@ private: return false; } // Take the transition action and return the next state. - static HandledEnum execute(library_sm& fsm, int region_index, int state, transition_event const& evt) + static HandledEnum execute(library_sm& fsm, int , int state, transition_event const& evt) { if (!check_guard(fsm,evt)) { @@ -710,11 +779,11 @@ private: } // then call the action method - ROW::action_call(fsm,evt, + HandledEnum res = ROW::action_call(fsm,evt, ::boost::fusion::at_key(fsm.m_substate_list), ::boost::fusion::at_key(fsm.m_substate_list), fsm.m_substate_list); - return HANDLED_TRUE; + return res; } }; template< @@ -728,14 +797,14 @@ private: typedef typename ROW::Evt transition_event; // Take the transition action and return the next state. - static HandledEnum execute(library_sm& fsm, int region_index, int state, transition_event const& evt) + static HandledEnum execute(library_sm& fsm, int, int, transition_event const& evt) { // then call the action method - ROW::action_call(fsm,evt, + HandledEnum res = ROW::action_call(fsm,evt, ::boost::fusion::at_key(fsm.m_substate_list), ::boost::fusion::at_key(fsm.m_substate_list), fsm.m_substate_list); - return HANDLED_TRUE; + return res; } }; template< @@ -759,7 +828,7 @@ private: return false; } // Take the transition action and return the next state. - static HandledEnum execute(library_sm& fsm, int region_index, int state, transition_event const& evt) + static HandledEnum execute(library_sm& fsm, int, int, transition_event const& evt) { if (!check_guard(fsm,evt)) { @@ -1001,7 +1070,7 @@ private: ret_handled = HANDLED_TRUE; } - // process completion transitions BEFORE any other event in the pool (UML Standard 2.3 §15.3.14) + // process completion transitions BEFORE any other event in the pool (UML Standard 2.3 §15.3.14) handle_eventless_transitions_helper eventless_helper(this,(handled == HANDLED_TRUE)); eventless_helper.process_completion_event(); @@ -1016,6 +1085,73 @@ private: } } + template + void enqueue_event_helper(EventType const& evt, ::boost::mpl::false_ const &) + { + execute_return (library_sm::*pf) (EventType const& evt) = + &library_sm::process_event; + + transition_fct f = ::boost::bind(pf,this,evt); + m_events_queue.m_events_queue.push_back(f); + } + template + void enqueue_event_helper(EventType const& evt, ::boost::mpl::true_ const &) + { + // no queue + } + + void execute_queued_events_helper(::boost::mpl::false_ const &) + { + transition_fct to_call = m_events_queue.m_events_queue.front(); + m_events_queue.m_events_queue.pop_front(); + to_call(); + } + void execute_queued_events_helper(::boost::mpl::true_ const &) + { + // no queue required + } + + // enqueues an event in the message queue + // call execute_queued_events to process all queued events. + // Be careful if you do this during event processing, the event will be processed immediately + // and not kept in the queue + template + void enqueue_event(EventType const& evt) + { + enqueue_event_helper(evt, typename is_no_message_queue::type()); + } + + // empty the queue and process events + void execute_queued_events() + { + execute_queued_events_helper(typename is_no_message_queue::type()); + } + + typename events_queue_t::size_type get_message_queue_size() const + { + return m_events_queue.m_events_queue.size(); + } + + events_queue_t& get_message_queue() + { + return m_events_queue.m_events_queue; + } + + const events_queue_t& get_message_queue() const + { + return m_events_queue.m_events_queue; + } + + deferred_events_queue_t& get_deferred_queue() + { + return m_deferred_events_queue; + } + + const deferred_events_queue_t& get_deferred_queue() const + { + return m_deferred_events_queue; + } + // Getter that returns the current state of the FSM const int* current_state() const { @@ -1092,11 +1228,18 @@ private: // return the state whose id is passed or 0 if not found // caution if you need this, you probably need polymorphic states // complexity: O(number of states) - const BaseState* get_state_by_id(int id) const + BaseState* get_state_by_id(int id) { const BaseState* result_state=0; ::boost::mpl::for_each > (get_state_id_helper(id,&result_state,this)); + return const_cast(result_state); + } + const BaseState* get_state_by_id(int id) const + { + const BaseState* result_state=0; + ::boost::mpl::for_each > (get_state_id_helper(id,&result_state,this)); return result_state; } // true if the sm is used in another sm @@ -1104,6 +1247,15 @@ private: { return m_is_included; } + // get the history policy class + concrete_history& get_history() + { + return m_history; + } + concrete_history const& get_history() const + { + return m_history; + } // get a state // as a pointer template @@ -1123,7 +1275,7 @@ private: // checks if a flag is active using the BinaryOp as folding function template - bool is_flag_active() + bool is_flag_active() const { flag_handler* flags_entries = get_entries_for_flag(); @@ -1134,11 +1286,11 @@ private: ::boost::bind(::boost::msm::back::deref(), ::boost::bind(::boost::msm::back::plus2(), flags_entries, _2)), - ::boost::ref(*this)), _1)); + ::boost::cref(*this)), _1)); } // checks if a flag is active using no binary op if 1 region, or OR if > 1 regions template - bool is_flag_active() + bool is_flag_active() const { return FlagHelper1)>::helper(*this,get_entries_for_flag()); } @@ -1213,7 +1365,7 @@ private: } // Construct with the default initial states - state_machine() + state_machine() :Derived() ,m_events_queue() ,m_deferred_events_queue() @@ -1231,8 +1383,8 @@ private: fill_states(this); } template - state_machine - (Expr const& expr,typename ::boost::enable_if::type >::type* dummy=0) + state_machine + (Expr const& expr,typename ::boost::enable_if::type >::type* =0) :Derived() ,m_events_queue() ,m_deferred_events_queue() @@ -1259,9 +1411,9 @@ private: #define MSM_CONSTRUCTOR_HELPER_EXECUTE_SUB(z, n, unused) ARG ## n t ## n #define MSM_CONSTRUCTOR_HELPER_EXECUTE(z, n, unused) \ template \ - state_machine(BOOST_PP_ENUM(n, MSM_CONSTRUCTOR_HELPER_EXECUTE_SUB, ~ ), \ - typename ::boost::disable_if::type >::type* dummy=0 ) \ + typename ::boost::disable_if::type >::type* =0 ) \ :Derived(BOOST_PP_ENUM_PARAMS(n,t)) \ ,m_events_queue() \ ,m_deferred_events_queue() \ @@ -1277,9 +1429,9 @@ private: fill_states(this); \ } \ template \ - state_machine(Expr const& expr,BOOST_PP_ENUM(n, MSM_CONSTRUCTOR_HELPER_EXECUTE_SUB, ~ ), \ - typename ::boost::enable_if::type >::type* dummy=0 ) \ + typename ::boost::enable_if::type >::type* =0 ) \ :Derived(BOOST_PP_ENUM_PARAMS(n,t)) \ ,m_events_queue() \ ,m_deferred_events_queue() \ @@ -1318,7 +1470,7 @@ private: } return *this; } - state_machine + state_machine (library_sm const& rhs) : Derived(rhs) { @@ -1369,7 +1521,7 @@ private: { // event has to be put into the queue transition_fct f = ::boost::bind(pf,this,evt); - m_events_queue.m_events_queue.push(f); + m_events_queue.m_events_queue.push_back(f); return false; } // event can be handled, processing @@ -1407,7 +1559,7 @@ private: } // handling of deferred events // if none is found in the SM, take the following empty main version - template + template struct handle_defer_helper { handle_defer_helper(deferred_msg_queue_helper& ){} @@ -1422,7 +1574,7 @@ private: // otherwise the standard version handling the deferred events template struct handle_defer_helper - ::type >::type> + ::type,int >::type> { handle_defer_helper(deferred_msg_queue_helper& a_queue): events_queue(a_queue),next_deferred_event(){} @@ -1622,7 +1774,7 @@ private: template struct FlagHelper { - static bool helper(library_sm& sm,flag_handler* ) + static bool helper(library_sm const& sm,flag_handler* ) { // by default we use OR to accumulate the flags return sm.is_flag_active(); @@ -1631,7 +1783,7 @@ private: template struct FlagHelper { - static bool helper(library_sm& sm,flag_handler* flags_entries) + static bool helper(library_sm const& sm,flag_handler* flags_entries) { // just one active state, so we can call operator[] with 0 return flags_entries[sm.current_state()[0]](sm); @@ -1642,15 +1794,15 @@ private: template struct FlagHandler { - static bool flag_true(library_sm& ) + static bool flag_true(library_sm const& ) { return true; } - static bool flag_false(library_sm& ) + static bool flag_false(library_sm const& ) { return false; } - static bool forward(library_sm& fsm) + static bool forward(library_sm const& fsm) { return ::boost::fusion::at_key(fsm.m_substate_list).template is_flag_active(); } @@ -1708,7 +1860,7 @@ private: }; // maintains for every flag a static array containing the flag value for every state template - flag_handler* get_entries_for_flag() + flag_handler* get_entries_for_flag() const { BOOST_STATIC_CONSTANT(int, max_state = (mpl::size::value)); @@ -1882,7 +2034,7 @@ BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXE } template typename ::boost::disable_if::type,void >::type - visitor_helper(int id) const + visitor_helper(int) const { // nothing to do } @@ -1990,8 +2142,31 @@ BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXE void start(Event const& incomingEvent) { region_start_helper< ::boost::mpl::int_<0> >::do_start(this,incomingEvent); + // give a chance to handle an anonymous (eventless) transition + handle_eventless_transitions_helper eventless_helper(this,true); + eventless_helper.process_completion_event(); } + template + struct find_region_id + { + template + struct In + { + enum {region_index=region}; + }; + // if the user provides no region, find it! + template + struct In<-1,Dummy> + { + typedef typename build_orthogonal_regions< + library_sm, + typename Derived::initial_state + >::type all_regions; + enum {region_index= find_region_index::value }; + }; + enum {region_index = In::region_index }; + }; // helper used to set the correct state as active state upon entry into a fsm struct direct_event_start_helper { @@ -2020,10 +2195,10 @@ BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXE { (static_cast(self))->on_entry(evt,fsm); int state_id = get_state_id::value; - BOOST_STATIC_ASSERT(EventType::active_state::zone_index >= 0); - BOOST_STATIC_ASSERT(EventType::active_state::zone_index <= nr_regions::value); + BOOST_STATIC_ASSERT(find_region_id::region_index >= 0); + BOOST_STATIC_ASSERT(find_region_id::region_index <= nr_regions::value); // just set the correct zone, the others will be default/history initialized - self->m_states[EventType::active_state::zone_index] = state_id; + self->m_states[find_region_id::region_index] = state_id; self->start(evt.m_event); } @@ -2059,7 +2234,7 @@ BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXE (static_cast(self))->on_entry(evt,fsm); int state_id = get_state_id::value; // given region starts with the entry pseudo state as active state - self->m_states[EventType::active_state::zone_index] = state_id; + self->m_states[find_region_id::region_index] = state_id; self->start(evt.m_event); // and we process the transition in the zone of the newly active state // (entry pseudo states are, according to UML, a state connecting 1 transition outside to 1 inside @@ -2077,9 +2252,9 @@ BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXE void operator()( ::boost::msm::wrap const& ) { int state_id = get_state_id::value; - BOOST_STATIC_ASSERT(StateType::zone_index >= 0); - BOOST_STATIC_ASSERT(StateType::zone_index <= nr_regions::value); - helper_self->m_states[StateType::zone_index] = state_id; + BOOST_STATIC_ASSERT(find_region_id::region_index >= 0); + BOOST_STATIC_ASSERT(find_region_id::region_index <= nr_regions::value); + helper_self->m_states[find_region_id::region_index] = state_id; } private: library_sm* helper_self; @@ -2183,7 +2358,7 @@ BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXE if (!m_events_queue.m_events_queue.empty()) { transition_fct to_call = m_events_queue.m_events_queue.front(); - m_events_queue.m_events_queue.pop(); + m_events_queue.m_events_queue.pop_front(); to_call(); } } @@ -2268,6 +2443,11 @@ BOOST_PP_REPEAT(BOOST_PP_ADD(BOOST_MSM_VISITOR_ARG_SIZE,1), MSM_VISITOR_ARGS_EXE template void fill_states(ContainingSM* containing_sm=0) { + // checks that regions are truly orthogonal + FsmCheckPolicy::template check_orthogonality(); + // checks that all states are reachable + FsmCheckPolicy::template check_unreachable_states(); + BOOST_STATIC_CONSTANT(int, max_state = (mpl::size::value)); // allocate the place without reallocation m_visitors.fill_visitors(max_state); diff --git a/3party/boost/boost/msm/front/euml/common.hpp b/3party/boost/boost/msm/front/euml/common.hpp index c611287341..4cc6aef878 100644 --- a/3party/boost/boost/msm/front/euml/common.hpp +++ b/3party/boost/boost/msm/front/euml/common.hpp @@ -351,7 +351,7 @@ struct NoAction : euml_action return true; } template - bool operator()(EVT const& evt ,FSM& ,SourceState& ,TargetState&)const + bool operator()(EVT const& ,FSM& ,SourceState& ,TargetState&)const { // does nothing return true; diff --git a/3party/boost/boost/msm/front/euml/state_grammar.hpp b/3party/boost/boost/msm/front/euml/state_grammar.hpp index 2d49ed9fbd..51503d94cd 100644 --- a/3party/boost/boost/msm/front/euml/state_grammar.hpp +++ b/3party/boost/boost/msm/front/euml/state_grammar.hpp @@ -18,6 +18,7 @@ #include #include +#include #include #include diff --git a/3party/boost/boost/msm/front/functor_row.hpp b/3party/boost/boost/msm/front/functor_row.hpp index f65c23f75f..825eca67a1 100644 --- a/3party/boost/boost/msm/front/functor_row.hpp +++ b/3party/boost/boost/msm/front/functor_row.hpp @@ -15,17 +15,36 @@ #include #include +#include #include +#include #include #include #include #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() +BOOST_MPL_HAS_XXX_TRAIT_DEF(deferring_action) + namespace boost { namespace msm { namespace front { + template + struct get_functor_return_value + { + static const ::boost::msm::back::HandledEnum value = ::boost::msm::back::HANDLED_TRUE; + }; + template + struct get_functor_return_value::type + >::type + > + { + static const ::boost::msm::back::HandledEnum value = ::boost::msm::back::HANDLED_DEFERRED; + }; + template struct Row { @@ -37,10 +56,11 @@ namespace boost { namespace msm { namespace front // action plus guard typedef row_tag row_type_tag; template - static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) { // create functor, call it Action()(evt,fsm,src,tgt); + return get_functor_return_value::value; } template static bool guard_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt,AllStates&) @@ -72,10 +92,11 @@ namespace boost { namespace msm { namespace front // no guard typedef a_row_tag row_type_tag; template - static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) { // create functor, call it Action()(evt,fsm,src,tgt); + return get_functor_return_value::value; } }; template @@ -107,10 +128,11 @@ namespace boost { namespace msm { namespace front // no guard typedef a_irow_tag row_type_tag; template - static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) { // create functor, call it Action()(evt,fsm,src,tgt); + return get_functor_return_value::value; } }; template @@ -141,10 +163,11 @@ namespace boost { namespace msm { namespace front // action + guard typedef irow_tag row_type_tag; template - static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) { // create functor, call it Action()(evt,fsm,src,tgt); + return get_functor_return_value::value; } template static bool guard_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) @@ -179,10 +202,11 @@ namespace boost { namespace msm { namespace front // action plus guard typedef sm_i_row_tag row_type_tag; template - static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) { // create functor, call it Action()(evt,fsm,src,tgt); + return get_functor_return_value::value; } template static bool guard_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) @@ -201,10 +225,11 @@ namespace boost { namespace msm { namespace front // no guard typedef sm_a_i_row_tag row_type_tag; template - static void action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,EVT const& evt,SourceState& src,TargetState& tgt, AllStates&) { // create functor, call it Action()(evt,fsm,src,tgt); + return get_functor_return_value::value; } }; template @@ -304,6 +329,8 @@ namespace boost { namespace msm { namespace front // functor pre-defined for basic functionality struct Defer { + // mark as deferring to avoid stack overflows in certain conditions + typedef int deferring_action; template void operator()(EVT const& evt,FSM& fsm,SourceState& ,TargetState& ) const { diff --git a/3party/boost/boost/msm/front/internal_row.hpp b/3party/boost/boost/msm/front/internal_row.hpp index 4165008673..947bbfdf80 100644 --- a/3party/boost/boost/msm/front/internal_row.hpp +++ b/3party/boost/boost/msm/front/internal_row.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -29,13 +30,14 @@ namespace boost { namespace msm { namespace front typedef sm_a_i_row_tag row_type_tag; typedef Event Evt; template - static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) { // in this front-end, we don't need to know source and target states ::boost::msm::front::detail::row2_action_helper::call_helper (fsm,evt,src,tgt,all_states, ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); + return ::boost::msm::back::HANDLED_TRUE; } }; @@ -51,13 +53,14 @@ namespace boost { namespace msm { namespace front typedef sm_i_row_tag row_type_tag; typedef Event Evt; template - static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) { // in this front-end, we don't need to know source and target states ::boost::msm::front::detail::row2_action_helper::call_helper (fsm,evt,src,tgt,all_states, ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); + return ::boost::msm::back::HANDLED_TRUE; } template static bool guard_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, diff --git a/3party/boost/boost/msm/front/row2.hpp b/3party/boost/boost/msm/front/row2.hpp index d87b7134f5..46465858e9 100644 --- a/3party/boost/boost/msm/front/row2.hpp +++ b/3party/boost/boost/msm/front/row2.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -46,13 +47,14 @@ namespace boost { namespace msm { namespace front typedef T2 Target; typedef Event Evt; template - static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) { // in this front-end, we don't need to know source and target states ::boost::msm::front::detail::row2_action_helper::template call_helper (fsm,evt,src,tgt,all_states, ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); + return ::boost::msm::back::HANDLED_TRUE; } }; @@ -72,13 +74,14 @@ namespace boost { namespace msm { namespace front typedef T2 Target; typedef Event Evt; template - static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) { // in this front-end, we don't need to know source and target states ::boost::msm::front::detail::row2_action_helper::call_helper (fsm,evt,src,tgt,all_states, ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); + return ::boost::msm::back::HANDLED_TRUE; } template static bool guard_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, @@ -127,13 +130,14 @@ namespace boost { namespace msm { namespace front typedef T1 Target; typedef Event Evt; template - static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) { // in this front-end, we don't need to know source and target states ::boost::msm::front::detail::row2_action_helper::call_helper (fsm,evt,src,tgt,all_states, ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); + return ::boost::msm::back::HANDLED_TRUE; } }; @@ -152,13 +156,14 @@ namespace boost { namespace msm { namespace front typedef T1 Target; typedef Event Evt; template - static void action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, AllStates& all_states) { // in this front-end, we don't need to know source and target states ::boost::msm::front::detail::row2_action_helper::call_helper (fsm,evt,src,tgt,all_states, ::boost::mpl::bool_< ::boost::is_base_of::type::value>()); + return ::boost::msm::back::HANDLED_TRUE; } template static bool guard_call(FSM& fsm,Event const& evt,SourceState& src,TargetState& tgt, diff --git a/3party/boost/boost/msm/front/state_machine_def.hpp b/3party/boost/boost/msm/front/state_machine_def.hpp index 33c14b014c..fb221e79dd 100644 --- a/3party/boost/boost/msm/front/state_machine_def.hpp +++ b/3party/boost/boost/msm/front/state_machine_def.hpp @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -51,10 +52,11 @@ struct state_machine_def : public boost::msm::front::detail::state_base - static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&, AllStates&) + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&, AllStates&) { // in this front-end, we don't need to know source and target states (fsm.*action)(evt); + return ::boost::msm::back::HANDLED_TRUE; } }; @@ -85,10 +87,11 @@ struct state_machine_def : public boost::msm::front::detail::state_base - static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) { // in this front-end, we don't need to know source and target states (fsm.*action)(evt); + return ::boost::msm::back::HANDLED_TRUE; } template static bool guard_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) @@ -129,10 +132,11 @@ struct state_machine_def : public boost::msm::front::detail::state_base - static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) { // in this front-end, we don't need to know source and target states (fsm.*action)(evt); + return ::boost::msm::back::HANDLED_TRUE; } }; @@ -149,10 +153,11 @@ struct state_machine_def : public boost::msm::front::detail::state_base - static void action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) + static ::boost::msm::back::HandledEnum action_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) { // in this front-end, we don't need to know source and target states (fsm.*action)(evt); + return ::boost::msm::back::HANDLED_TRUE; } template static bool guard_call(FSM& fsm,Event const& evt,SourceState&,TargetState&,AllStates&) diff --git a/3party/boost/boost/msm/mpl_graph/adjacency_list_graph.hpp b/3party/boost/boost/msm/mpl_graph/adjacency_list_graph.hpp new file mode 100644 index 0000000000..668e023262 --- /dev/null +++ b/3party/boost/boost/msm/mpl_graph/adjacency_list_graph.hpp @@ -0,0 +1,35 @@ +// Copyright 2008-2010 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_MPL_GRAPH_ADJACENCY_LIST_GRAPH_HPP_INCLUDED +#define BOOST_MSM_MPL_GRAPH_ADJACENCY_LIST_GRAPH_HPP_INCLUDED + +// graph implementation based on an adjacency list +// sequence< pair< source_vertex, sequence< pair > > > + +// adjacency_list_graph labels such a sequence as manipulable by the metafunctions +// in the corresponding implementation header detail/adjacency_list_graph.ipp +// to produce the metadata structures needed by mpl_graph.hpp + +// the public interface +#include + +// the implementation +#include + +namespace boost { +namespace msm { +namespace mpl_graph { + +template +struct adjacency_list_graph { + typedef detail::adjacency_list_tag representation; + typedef AdjacencyList data; +}; + +} +} +} + +#endif // BOOST_MSM_MPL_GRAPH_ADJACENCY_LIST_GRAPH_HPP_INCLUDED diff --git a/3party/boost/boost/msm/mpl_graph/breadth_first_search.hpp b/3party/boost/boost/msm/mpl_graph/breadth_first_search.hpp new file mode 100644 index 0000000000..f80a037de9 --- /dev/null +++ b/3party/boost/boost/msm/mpl_graph/breadth_first_search.hpp @@ -0,0 +1,167 @@ +// Copyright 2008-2010 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_MPL_GRAPH_BREADTH_FIRST_SEARCH_HPP_INCLUDED +#define BOOST_MSM_MPL_GRAPH_BREADTH_FIRST_SEARCH_HPP_INCLUDED + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "search_colors.hpp" + +namespace boost { +namespace msm { +namespace mpl_graph { + +// bfs takes a visitor which has all the bgl-like metafunctions encapsulated in an +// "operations" member class, and also a state. the operations are expected to return a new state +struct bfs_default_visitor_operations { + template + struct initialize_vertex { + typedef State type; + }; + + template + struct discover_vertex { + typedef State type; + }; + + template + struct examine_vertex { + typedef State type; + }; + + template + struct examine_edge { + typedef State type; + }; + + template + struct tree_edge { + typedef State type; + }; + + template + struct non_tree_edge { + typedef State type; + }; + + template + struct gray_target { + typedef State type; + }; + + template + struct black_target { + typedef State type; + }; + + template + struct finish_vertex { + typedef State type; + }; +}; + +namespace detail { + +template +struct bfs_run_queue_examine_edge { + typedef typename VisitorOps::template examine_edge::type>::type visitor_state; + typedef typename mpl::at_c::type color_state; + typedef typename mpl::at_c::type vertex_queue; + + typedef typename mpl::if_::type, color_state>::type, search_colors::White>::type, + // unseen target: tree edge, discover target, paint it gray, and enqueue + mpl::vector::type, Graph, + typename VisitorOps::template tree_edge::type>::type, + typename search_color_map_ops::template set_color::type, search_colors::Gray, color_state>::type, + typename mpl::push_back::type >::type >, + // seen + mpl::vector, color_state>, + search_colors::Gray>::type, + typename VisitorOps::template gray_target::type, + typename VisitorOps::template black_target::type>::type, + color_state, + vertex_queue> + >::type type; +}; + +// runs bfs on a queue, passing the new queue forward on recursion +// returns pair +template +struct bfs_run_queue { + // enter vertex + typedef typename mpl::front::type Vertex; + typedef typename mpl::pop_front::type Tail; + typedef typename VisitorOps::template examine_vertex::type examined_state; + + // loop over out edges + typedef typename mpl::template + fold::type, + mpl::vector, + bfs_run_queue_examine_edge + >::type did_edges; + + typedef typename VisitorOps::template + finish_vertex::type>::type + finished_vertex; + // does map insert always overwrite? i seem to remember this not working on msvc once + typedef typename search_color_map_ops::template + set_color::type>::type + colored_vertex; + typedef typename mpl::at_c::type queued_targets; + + typedef typename + mpl::if_::type, + mpl::pair, + bfs_run_queue >::type::type type; +}; + +} // namespace detail + +template +struct breadth_first_search { + typedef typename VisitorOps::template + discover_vertex::type + discovered_state; + typedef typename search_color_map_ops::template + set_color::type + discovered_colors; + typedef typename detail:: + bfs_run_queue, + VisitorOps, discovered_state, + discovered_colors>::type type; +}; + +template::type>::type, + typename ColorMap = create_search_color_map::type> +struct breadth_first_search_all : // visit "first" first, then visit any still white + mpl::fold::type, + typename breadth_first_search::type, + mpl::if_ >, + search_colors::White>, + breadth_first_search, + mpl::_2, mpl::second >, + mpl::_1> > +{}; + +} // namespace mpl_graph +} // namespace msm +} // namespace boost + + +#endif // BOOST_MSM_MPL_GRAPH_BREADTH_FIRST_SEARCH_HPP_INCLUDED diff --git a/3party/boost/boost/msm/mpl_graph/depth_first_search.hpp b/3party/boost/boost/msm/mpl_graph/depth_first_search.hpp new file mode 100644 index 0000000000..05bff9bee3 --- /dev/null +++ b/3party/boost/boost/msm/mpl_graph/depth_first_search.hpp @@ -0,0 +1,122 @@ +// Copyright 2008-2010 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_MPL_GRAPH_DEPTH_FIRST_SEARCH_HPP_INCLUDED +#define BOOST_MSM_MPL_GRAPH_DEPTH_FIRST_SEARCH_HPP_INCLUDED + +#include + +#include +#include +#include +#include +#include + +#include "search_colors.hpp" + +namespace boost { +namespace msm { +namespace mpl_graph { + +// dfs takes a visitor which has all the bgl-like metafunctions encapsulated in an +// "operations" member class, and also a state. the operations are expected to return a new state +// in addition, the visitor operations are expected to update the colors of vertices +// and need to support a new metafunction get_color + +struct dfs_default_visitor_operations { + template + struct initialize_vertex { + typedef State type; + }; + + template + struct discover_vertex { + typedef State type; + }; + + template + struct finish_vertex { + typedef State type; + }; + + template + struct tree_edge { + typedef State type; + }; + + template + struct back_edge { + typedef State type; + }; + + template + struct forward_or_cross_edge { + typedef State type; + }; +}; + +// requires IncidenceGraph +// returns pair +template +struct depth_first_search { + // enter vertex + typedef typename VisitorOps::template + discover_vertex::type + discovered_state; + typedef typename search_color_map_ops::template + set_color::type + discovered_colors; + + // loop over out edges + typedef typename + mpl::fold::type, + mpl::pair, + mpl::if_, mpl::second >, + search_colors::White>, + // unseen target: recurse + depth_first_search >, + mpl_graph::target, + mpl::second >, + // seen: back or forward edge + mpl::pair, mpl::second >, + search_colors::Gray>, + typename VisitorOps::template back_edge >, + typename VisitorOps::template forward_or_cross_edge > >, // Black + mpl::second > > + >::type after_outedges; + + // leave vertex, and done! + typedef mpl::pair::type >::type, + typename search_color_map_ops::template set_color::type>::type> type; +}; + +// requires IncidenceGraph, VertexListGraph +template::type>::type, + typename ColorState = create_search_color_map::type> +struct depth_first_search_all : // visit first then rest + mpl::fold::type, + typename depth_first_search::type, + mpl::if_ >, + search_colors::White>, // visit any yet unvisited + depth_first_search, + mpl::_2, + mpl::second >, + mpl::_1> > +{}; + +} // namespace mpl_graph +} // namespace msm +} // namespace boost + + +#endif // BOOST_MSM_MPL_GRAPH_DEPTH_FIRST_SEARCH_HPP_INCLUDED diff --git a/3party/boost/boost/msm/mpl_graph/detail/adjacency_list_graph.ipp b/3party/boost/boost/msm/mpl_graph/detail/adjacency_list_graph.ipp new file mode 100644 index 0000000000..0ad785b8ad --- /dev/null +++ b/3party/boost/boost/msm/mpl_graph/detail/adjacency_list_graph.ipp @@ -0,0 +1,128 @@ +// Copyright 2008-2010 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_MPL_GRAPH_DETAIL_ADJACENCY_LIST_GRAPH_IPP_INCLUDED +#define BOOST_MSM_MPL_GRAPH_DETAIL_ADJACENCY_LIST_GRAPH_IPP_INCLUDED + +// implementation of a graph declared in adjacency list format +// sequence< pair< source_vertex, sequence< pair > > > + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace msm { +namespace mpl_graph { +namespace detail { + +// tag identifying graph implementation as adjacency list (not defined) +struct adjacency_list_tag; + +// outs map is really just the same data with the sequences turned into maps +// it might make sense to make another adjacency_map implementation for that case +template +struct produce_al_outs_map : + mpl::reverse_fold, + mpl::insert, mpl_utils::as_map > > > > +{}; + +// Edge->Target map for a Source for out_*, degree +template +struct produce_out_map : + mpl::at::type, Source> +{}; + +template +struct produce_in_adjacencies : + mpl::reverse_fold, + mpl::insert, mpl::map<> >, + mpl::pair, Source> > > > > +{}; + +template +struct produce_al_ins_map : + mpl::reverse_fold, + produce_in_adjacencies, mpl::second > > +{}; + +// Edge->Source map for a Target for in_*, degree +template +struct produce_in_map : + mpl::at::type, Target> +{}; + +// for everything else to do with edges, +// just produce an incidence list and forward to that graph implementation +// (produce_out_map could, and produce_in_map probably should, be implemented this way too) +template +struct produce_adjacencies_incidences : // adjacencies' + mpl::reverse_fold, Source, mpl::second > > > +{}; + +template +struct produce_incidence_list_from_adjacency_list : + mpl::reverse_fold, + produce_adjacencies_incidences, mpl::second > > +{}; + + +// Edge->pair map for source, target +template +struct produce_edge_st_map : + produce_edge_st_map::type> +{}; + + +// adjacency list supports zero-degree vertices, which incidence list does not +template +struct insert_adjacencies_targets : // adjacencies' + mpl::reverse_fold > > +{}; + +template +struct produce_vertex_set : + mpl::reverse_fold, + insert_adjacencies_targets >, + mpl::second > > +{}; + + +// Edge set for EdgeListGraph +template +struct produce_edge_set : + produce_edge_set::type> +{}; + + +} // namespaces +} +} +} + +#endif // BOOST_MSM_MPL_GRAPH_DETAIL_ADJACENCY_LIST_GRAPH_IPP_INCLUDED + diff --git a/3party/boost/boost/msm/mpl_graph/detail/as_mpl_map.hpp b/3party/boost/boost/msm/mpl_graph/detail/as_mpl_map.hpp new file mode 100644 index 0000000000..dd241af831 --- /dev/null +++ b/3party/boost/boost/msm/mpl_graph/detail/as_mpl_map.hpp @@ -0,0 +1,100 @@ +// Copyright 2008-2010 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// this is an experiment at implementing a metafunction that's +// present in fusion but not in mpl +// based on fusion/container/map/detail/as_map.hpp +/*============================================================================= + Copyright (c) 2001-2006 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef BOOST_PP_IS_ITERATING +#if !defined(AS_MPL_MAP_HPP) +#define AS_MPL_MAP_HPP + +#define AS_MPL_MAP_SIZE 20 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + + namespace detail { + template + struct as_map; + + } + template + struct as_map : detail::as_map::value>::template + apply::type> {}; + + namespace detail +{ + template + struct as_map; + + template <> + struct as_map<0> + { + template + struct apply + { + typedef map<> type; + }; + + }; + +#define BOOST_AS_MPL_MAP_NEXT_ITERATOR(z, n, data) \ + typedef typename mpl::next::type \ + BOOST_PP_CAT(I, BOOST_PP_INC(n)); + +#define BOOST_AS_MPL_MAP_DEREF_ITERATOR(z, n, data) \ + typedef typename mpl::deref::type \ + BOOST_PP_CAT(T, n); + +#define BOOST_PP_FILENAME_1 +#define BOOST_PP_ITERATION_LIMITS (1, AS_MPL_MAP_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_AS_MPL_MAP_NEXT_ITERATOR +#undef BOOST_AS_MPL_MAP_DEREF_ITERATOR + +}}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + template <> + struct as_map + { + template + struct apply + { + BOOST_PP_REPEAT(N, BOOST_AS_MPL_MAP_NEXT_ITERATOR, _) + BOOST_PP_REPEAT(N, BOOST_AS_MPL_MAP_DEREF_ITERATOR, _) + typedef map type; + }; + + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/3party/boost/boost/msm/mpl_graph/detail/graph_implementation_interface.ipp b/3party/boost/boost/msm/mpl_graph/detail/graph_implementation_interface.ipp new file mode 100644 index 0000000000..e657fd55d7 --- /dev/null +++ b/3party/boost/boost/msm/mpl_graph/detail/graph_implementation_interface.ipp @@ -0,0 +1,42 @@ +// Copyright 2008-2010 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_MPL_GRAPH_DETAIL_GRAPH_IMPLEMENTATION_INTERFACE_IPP_INCLUDED +#define BOOST_MSM_MPL_GRAPH_DETAIL_GRAPH_IMPLEMENTATION_INTERFACE_IPP_INCLUDED + +// forward definitions of the producer metafunctions that need to be specialized for +// each graph representation + +namespace boost { +namespace msm { +namespace mpl_graph { +namespace detail { + + // Edge->Target map for a Source for out_*, degree + template + struct produce_out_map; + + // Edge->Source map for a Target for in_*, degree + template + struct produce_in_map; + + // Edge->pair map for source, target + template + struct produce_edge_st_map; + + // Vertex set for VertexListGraph + template + struct produce_vertex_set; + + // Edge set for EdgeListGraph + template + struct produce_edge_set; + +} // namespaces +} +} +} + +#endif // BOOST_MSM_MPL_GRAPH_DETAIL_GRAPH_IMPLEMENTATION_INTERFACE_IPP_INCLUDED + diff --git a/3party/boost/boost/msm/mpl_graph/detail/incidence_list_graph.ipp b/3party/boost/boost/msm/mpl_graph/detail/incidence_list_graph.ipp new file mode 100644 index 0000000000..30bfffc910 --- /dev/null +++ b/3party/boost/boost/msm/mpl_graph/detail/incidence_list_graph.ipp @@ -0,0 +1,106 @@ +// Copyright 2008-2010 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_MPL_GRAPH_DETAIL_INCIDENCE_LIST_GRAPH_IPP_INCLUDED + +#define BOOST_MSM_MPL_GRAPH_DETAIL_INCIDENCE_LIST_GRAPH_IPP_INCLUDED + +// these metafunctions provide the metadata structures needed by the public interface +// in mpl_graph.hpp + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace boost { +namespace msm { +namespace mpl_graph { +namespace detail { + +// tag to identify this graph implementation (not defined) +struct incidence_list_tag; + +// clarifiers +template struct fetch_edge : + mpl::front {}; +template struct fetch_source : + mpl::deref::type>::type> {}; +template struct fetch_target : + mpl::back {}; + +// Edge->Target map for an Source for out_*, adjacent_vertices +template +struct produce_out_map : + mpl::fold,Source> >::type, + mpl::map<>, + mpl::insert,fetch_target > > > +{}; + +// Edge->Source map for a Target for in_*, degree +template +struct produce_in_map : + mpl::fold,Target> >::type, + mpl::map<>, + mpl::insert,fetch_source > > > + +{}; +// Edge->pair map for source, target +template +struct produce_edge_st_map : + mpl::fold, + mpl::insert, + mpl::pair, + fetch_target > > > > +{}; +// Vertex set for VertexListGraph +template +struct produce_vertex_set : + mpl::fold, + mpl::insert > + >::type, + mpl::insert > > +{}; +// Edge set for EdgeListGraph +template +struct produce_edge_set : + mpl::fold, + mpl::insert > > +{}; +} +} +} +} + +#endif // BOOST_MSM_MPL_GRAPH_DETAIL_INCIDENCE_LIST_GRAPH_IPP_INCLUDED diff --git a/3party/boost/boost/msm/mpl_graph/incidence_list_graph.hpp b/3party/boost/boost/msm/mpl_graph/incidence_list_graph.hpp new file mode 100644 index 0000000000..2e3c250e75 --- /dev/null +++ b/3party/boost/boost/msm/mpl_graph/incidence_list_graph.hpp @@ -0,0 +1,34 @@ +// Copyright 2008-2010 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_MPL_GRAPH_INCIDENCE_LIST_GRAPH_HPP_INCLUDED +#define BOOST_MSM_MPL_GRAPH_INCIDENCE_LIST_GRAPH_HPP_INCLUDED + +// graph implementation based on a an mpl sequence of sequences + +// incidence_list_graph labels such a sequence as manipulable by the metafunctions +// in the corresponding implementation header detail/incidence_list_graph.ipp +// to produce the metadata structures needed by mpl_graph.hpp + +// the public interface +#include + +// the implementation +#include + +namespace boost { +namespace msm { +namespace mpl_graph { + +template +struct incidence_list_graph { + typedef detail::incidence_list_tag representation; + typedef EdgeSequence data; +}; + +} +} +} + +#endif // BOOST_MSM_MPL_GRAPH_INCIDENCE_LIST_GRAPH_HPP_INCLUDED diff --git a/3party/boost/boost/msm/mpl_graph/mpl_graph.hpp b/3party/boost/boost/msm/mpl_graph/mpl_graph.hpp new file mode 100755 index 0000000000..ec2db14c74 --- /dev/null +++ b/3party/boost/boost/msm/mpl_graph/mpl_graph.hpp @@ -0,0 +1,114 @@ +// Copyright 2008-2010 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// mpl_graph - defines a metadata implementation of the BGL immutable graph concepts + +// (c) 2008 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSEmpl::_1_0.txt or copy at +// http://www.boost.org/LICENSEmpl::_1_0.txt) + +#ifndef BOOST_MSM_MPL_GRAPH_MPL_GRAPH_HPP_INCLUDED +#define BOOST_MSM_MPL_GRAPH_MPL_GRAPH_HPP_INCLUDED + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace msm { +namespace mpl_graph { + +// Boost Graph concepts, MPL style + +// The metafunctions of the public interface rely +// metafunctions in the graph implementation to transform the input +// into the maps which are required to deliver results. Since the +// maps are produced lazily and are memoized, all of the graph +// concepts can be supported with no cost until they are actually +// used. + +// Each of these dispatch to the correct producer metafunctions based +// on the representation inner type tag + + + +// IncidenceGraph +template +struct source : + mpl::first::type,Edge>::type> +{}; +template +struct target : + mpl::second::type,Edge>::type> +{}; +template +struct out_edges : + mpl::fold::type, + mpl::vector<>, + mpl::push_back > > +{}; +template +struct out_degree : + mpl::size::type> +{}; + +// BidirectionalGraph +template +struct in_edges : + mpl::fold::type, + mpl::vector<>, + mpl::push_back > > +{}; +template +struct in_degree : + mpl::size::type> +{}; +template +struct degree : + mpl::plus::type,typename in_degree::type> +{}; + +// AdjacencyGraph +template +struct adjacent_vertices : + mpl::transform::type, + mpl::second, + mpl::back_inserter > > +{}; + +// VertexListGraph +template +struct vertices : + detail::produce_vertex_set +{}; +template +struct num_vertices : + mpl::size::type> +{}; + +// EdgeListGraph +template +struct edges : + detail::produce_edge_set +{}; +template +struct num_edges : + mpl::size::type> +{}; +// source and target are defined in IncidenceGraph + +} // mpl_graph +} // msm +} // boost + +#endif // BOOST_MSM_MPL_GRAPH_MPL_GRAPH_HPP_INCLUDED diff --git a/3party/boost/boost/msm/mpl_graph/mpl_utils.hpp b/3party/boost/boost/msm/mpl_graph/mpl_utils.hpp new file mode 100644 index 0000000000..97687b21f0 --- /dev/null +++ b/3party/boost/boost/msm/mpl_graph/mpl_utils.hpp @@ -0,0 +1,62 @@ +// Copyright 2008-2010 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_MPL_GRAPH_MPL_UTILS_HPP_INCLUDED +#define BOOST_MSM_MPL_GRAPH_MPL_UTILS_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { +namespace msm { +namespace mpl_graph { +namespace mpl_utils { + +// This is a grab bag of little metafunctions I expect already +// exist under some name I haven't looked for + +// I figure there are probably better ways to do all of these things, +// but for now I'll just write some utilities to isolate my ignorance + +template +struct as_map : + mpl::fold, + mpl::insert > +{}; +template +struct as_set : + mpl::fold, + mpl::insert > +{}; + +template +struct at_or_default : + mpl::if_::type, + typename mpl::at::type, + Default> +{}; + +template +struct set_equal : + mpl::fold::type, + mpl::_2 > > > +{}; + +} +} +} +} + +#endif // BOOST_MSM_MPL_GRAPH_MPL_UTILS_HPP_INCLUDED diff --git a/3party/boost/boost/msm/mpl_graph/search_colors.hpp b/3party/boost/boost/msm/mpl_graph/search_colors.hpp new file mode 100644 index 0000000000..3b1dfe6c95 --- /dev/null +++ b/3party/boost/boost/msm/mpl_graph/search_colors.hpp @@ -0,0 +1,39 @@ +// Copyright 2008-2010 Gordon Woodhull +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MSM_MPL_GRAPH_SEARCH_COLORS_HPP_INCLUDED +#define BOOST_MSM_MPL_GRAPH_SEARCH_COLORS_HPP_INCLUDED + +namespace boost { +namespace msm { +namespace mpl_graph { + +namespace search_colors { + struct White {}; + struct Gray {}; + struct Black {}; +} + +struct create_search_color_map : mpl::map<> {}; + +struct search_color_map_ops { + template + struct set_color : + mpl::insert > + {}; + template + struct get_color : + mpl::if_, + mpl::at, + search_colors::White> + {}; +}; + + +} // namespace mpl_graph +} // namespace msm +} // namespace boost + + +#endif // BOOST_MSM_MPL_GRAPH_SEARCH_COLORS_HPP_INCLUDED diff --git a/3party/boost/boost/numeric/interval/arith2.hpp b/3party/boost/boost/numeric/interval/arith2.hpp index ba7ffbd719..5501929e4b 100644 --- a/3party/boost/boost/numeric/interval/arith2.hpp +++ b/3party/boost/boost/numeric/interval/arith2.hpp @@ -185,7 +185,7 @@ interval pow(const interval& x, int pwr) return I(yl, yu, true); } else if (interval_lib::user::is_neg(x.lower())) { // [-1,1] if (pwr & 1) { // [-1,1]^1 - return I(-pow_up(-x.lower(), pwr, rnd), pow_up(x.upper(), pwr, rnd), true); + return I(-pow_up(static_cast(-x.lower()), pwr, rnd), pow_up(x.upper(), pwr, rnd), true); } else { // [-1,1]^2 return I(static_cast(0), pow_up(max BOOST_PREVENT_MACRO_SUBSTITUTION(static_cast(-x.lower()), x.upper()), pwr, rnd), true); } diff --git a/3party/boost/boost/numeric/interval/detail/c99_rounding_control.hpp b/3party/boost/boost/numeric/interval/detail/c99_rounding_control.hpp index 181d286662..71d13e787a 100644 --- a/3party/boost/boost/numeric/interval/detail/c99_rounding_control.hpp +++ b/3party/boost/boost/numeric/interval/detail/c99_rounding_control.hpp @@ -16,27 +16,30 @@ namespace boost { namespace numeric { namespace interval_lib { -namespace detail { - -struct c99_rounding_control: c99_rounding -{ - template - static T force_rounding(const T& r) { volatile T r_ = r; return r_; } -}; - -} // namespace detail template<> struct rounding_control: - detail::c99_rounding_control { }; + detail::c99_rounding_control +{ + static float force_rounding(float const &r) + { volatile float r_ = r; return r_; } +}; template<> struct rounding_control: - detail::c99_rounding_control { }; + detail::c99_rounding_control +{ + static double force_rounding(double const &r) + { volatile double r_ = r; return r_; } +}; template<> struct rounding_control: - detail::c99_rounding_control { }; + detail::c99_rounding_control +{ + static long double force_rounding(long double const &r) + { volatile long double r_ = r; return r_; } +}; } // namespace interval_lib } // namespace numeric diff --git a/3party/boost/boost/numeric/interval/detail/c99sub_rounding_control.hpp b/3party/boost/boost/numeric/interval/detail/c99sub_rounding_control.hpp index 571c51fcc7..7ddae196c1 100644 --- a/3party/boost/boost/numeric/interval/detail/c99sub_rounding_control.hpp +++ b/3party/boost/boost/numeric/interval/detail/c99sub_rounding_control.hpp @@ -20,11 +20,11 @@ namespace detail { extern "C" { double rint(double); } -struct c99_rounding +struct c99_rounding_control { typedef int rounding_mode; - static void set_rounding_mode(const rounding_mode mode) { fesetround(mode); } + static void set_rounding_mode(rounding_mode mode) { fesetround(mode); } static void get_rounding_mode(rounding_mode &mode) { mode = fegetround(); } static void downward() { set_rounding_mode(FE_DOWNWARD); } static void upward() { set_rounding_mode(FE_UPWARD); } diff --git a/3party/boost/boost/numeric/interval/detail/msvc_rounding_control.hpp b/3party/boost/boost/numeric/interval/detail/msvc_rounding_control.hpp index f7d143a8d0..95c790fe72 100644 --- a/3party/boost/boost/numeric/interval/detail/msvc_rounding_control.hpp +++ b/3party/boost/boost/numeric/interval/detail/msvc_rounding_control.hpp @@ -25,7 +25,16 @@ namespace numeric { namespace interval_lib { namespace detail { +#if BOOST_MSVC < 1400 || defined(WIN64) extern "C" { double rint(double); } +#else +inline double rint(double x) +{ +_asm FLD [x] ; +_asm FRNDINT ; +//_asm RET ; +} +#endif struct x86_rounding { diff --git a/3party/boost/boost/numeric/interval/detail/x86_rounding_control.hpp b/3party/boost/boost/numeric/interval/detail/x86_rounding_control.hpp index 3eebdbac58..c35f16d914 100644 --- a/3party/boost/boost/numeric/interval/detail/x86_rounding_control.hpp +++ b/3party/boost/boost/numeric/interval/detail/x86_rounding_control.hpp @@ -17,7 +17,7 @@ # include #elif defined(_MSC_VER) # include -#elif defined(__MWERKS__) || defined(__ICC) +#elif defined(__MWERKS__) || defined(__ICC) || defined (__SUNPRO_CC) # define BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM # include #else @@ -31,7 +31,7 @@ namespace interval_lib { namespace detail { #ifdef BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM -typedef c99_rounding x86_rounding_control; +typedef c99_rounding_control x86_rounding_control; #undef BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM #else struct fpu_rounding_modes diff --git a/3party/boost/boost/numeric/interval/transc.hpp b/3party/boost/boost/numeric/interval/transc.hpp index 88aebd6b36..8d7a7a1acd 100644 --- a/3party/boost/boost/numeric/interval/transc.hpp +++ b/3party/boost/boost/numeric/interval/transc.hpp @@ -176,7 +176,7 @@ interval cosh(const interval& x) else if (!interval_lib::user::is_neg(x.lower())) return I(rnd.cosh_down(x.lower()), rnd.cosh_up(x.upper()), true); else - return I(static_cast(0), rnd.cosh_up(-x.lower() > x.upper() ? x.lower() : x.upper()), true); + return I(static_cast(1), rnd.cosh_up(-x.lower() > x.upper() ? x.lower() : x.upper()), true); } template inline diff --git a/3party/boost/boost/numeric/interval/utility.hpp b/3party/boost/boost/numeric/interval/utility.hpp index b1052b1945..c89cdb1e93 100644 --- a/3party/boost/boost/numeric/interval/utility.hpp +++ b/3party/boost/boost/numeric/interval/utility.hpp @@ -144,8 +144,8 @@ bool overlap(const interval& x, const interval& y) { if (interval_lib::detail::test_input(x, y)) return false; - return x.lower() <= y.lower() && y.lower() <= x.upper() || - y.lower() <= x.lower() && x.lower() <= y.upper(); + return (x.lower() <= y.lower() && y.lower() <= x.upper()) || + (y.lower() <= x.lower() && x.lower() <= y.upper()); } template inline diff --git a/3party/boost/boost/optional/optional.hpp b/3party/boost/boost/optional/optional.hpp index 88041d1441..ec9006eef9 100644 --- a/3party/boost/boost/optional/optional.hpp +++ b/3party/boost/boost/optional/optional.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -9,27 +9,34 @@ // You are welcome to contact the author at: // fernando_cacciola@hotmail.com // +// Revisions: +// 27 Apr 2008 (improved swap) Fernando Cacciola, Niels Dekker, Thorsten Ottosen +// #ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP #define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP -#include -#include +#include +#include -#include "boost/config.hpp" -#include "boost/assert.hpp" -#include "boost/type.hpp" -#include "boost/type_traits/alignment_of.hpp" -#include "boost/type_traits/type_with_alignment.hpp" -#include "boost/type_traits/remove_reference.hpp" -#include "boost/type_traits/is_reference.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/not.hpp" -#include "boost/detail/reference_content.hpp" -#include "boost/none.hpp" -#include "boost/utility/compare_pointees.hpp" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include "boost/optional/optional_fwd.hpp" +#include #if BOOST_WORKAROUND(BOOST_MSVC, == 1200) // VC6.0 has the following bug: @@ -76,6 +83,15 @@ #define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION #endif +#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 302 \ + && !defined(__INTEL_COMPILER) +// GCC since 3.3 has may_alias attribute that helps to alleviate optimizer issues with +// regard to violation of the strict aliasing rules. The optional< T > storage type is marked +// with this attribute in order to let the compiler know that it will alias objects of type T +// and silence compilation warnings. +#define BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS +#endif + // Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<> // member template of a factory as used in the optional<> implementation. // He proposed this simple fix which is to move the call to apply<> outside @@ -83,7 +99,7 @@ namespace boost_optional_detail { template - void construct(Factory const& factory, void* address) + inline void construct(Factory const& factory, void* address) { factory.BOOST_NESTED_TEMPLATE apply(address); } @@ -95,6 +111,9 @@ namespace boost { class in_place_factory_base ; class typed_in_place_factory_base ; +// This forward is needed to refer to namespace scope swap from the member swap +template void swap ( optional& x, optional& y ); + namespace optional_detail { // This local class is used instead of that in "aligned_storage.hpp" @@ -105,7 +124,12 @@ template class aligned_storage { // Borland ICEs if unnamed unions are used for this! - union dummy_u + union + // This works around GCC warnings about breaking strict aliasing rules when casting storage address to T* +#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS) + __attribute__((may_alias)) +#endif + dummy_u { char data[ sizeof(T) ]; BOOST_DEDUCED_TYPENAME type_with_alignment< @@ -114,8 +138,13 @@ class aligned_storage public: - void const* address() const { return &dummy_.data[0]; } - void * address() { return &dummy_.data[0]; } +#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS) + void const* address() const { return &dummy_; } + void * address() { return &dummy_; } +#else + void const* address() const { return dummy_.data; } + void * address() { return dummy_.data; } +#endif } ; template @@ -149,7 +178,7 @@ class optional_base : public optional_tag typedef #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) BOOST_DEDUCED_TYPENAME -#endif +#endif ::boost::detail::make_reference_content::type internal_type ; typedef aligned_storage storage_type ; @@ -200,7 +229,7 @@ class optional_base : public optional_tag { construct(val); } - + // Creates an optional initialized with 'val' IFF cond is true, otherwise creates an uninitialzed optional. // Can throw if T::T(T const&) does optional_base ( bool cond, argument_type val ) @@ -421,8 +450,22 @@ class optional_base : public optional_tag private : // internal_type can be either T or reference_content +#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS) + // This workaround is supposed to silence GCC warnings about broken strict aliasing rules + internal_type const* get_object() const + { + union { void const* ap_pvoid; internal_type const* as_ptype; } caster = { m_storage.address() }; + return caster.as_ptype; + } + internal_type * get_object() + { + union { void* ap_pvoid; internal_type* as_ptype; } caster = { m_storage.address() }; + return caster.as_ptype; + } +#else internal_type const* get_object() const { return static_cast(m_storage.address()); } internal_type * get_object() { return static_cast (m_storage.address()); } +#endif // reference_content lacks an implicit conversion to T&, so the following is needed to obtain a proper reference. reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; } @@ -513,12 +556,12 @@ class optional : public optional_detail::optional_base // Depending on the above some T ctor is called. // Can throw is the resolved T ctor throws. template - explicit optional ( Expr const& expr ) : base(expr,&expr) {} + explicit optional ( Expr const& expr ) : base(expr,boost::addressof(expr)) {} #endif // Creates a deep copy of another optional // Can throw if T::T(T const&) does - optional ( optional const& rhs ) : base(rhs) {} + optional ( optional const& rhs ) : base( static_cast(rhs) ) {} // No-throw (assuming T::~T() doesn't) ~optional() {} @@ -527,9 +570,9 @@ class optional : public optional_detail::optional_base // Assigns from an expression. See corresponding constructor. // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED template - optional& operator= ( Expr expr ) + optional& operator= ( Expr const& expr ) { - this->assign_expr(expr,&expr); + this->assign_expr(expr,boost::addressof(expr)); return *this ; } #endif @@ -552,7 +595,7 @@ class optional : public optional_detail::optional_base // (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw) optional& operator= ( optional const& rhs ) { - this->assign( rhs ) ; + this->assign( static_cast(rhs) ) ; return *this ; } @@ -573,6 +616,14 @@ class optional : public optional_detail::optional_base return *this ; } + void swap( optional & arg ) + { + // allow for Koenig lookup + using boost::swap; + swap(*this, arg); + } + + // Returns a reference to the value if this is initialized, otherwise, // the behaviour is UNDEFINED // No-throw @@ -582,7 +633,7 @@ class optional : public optional_detail::optional_base // Returns a copy of the value if this is initialized, 'v' otherwise reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; } reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; } - + // Returns a pointer to the value if this is initialized, otherwise, // the behaviour is UNDEFINED // No-throw @@ -599,22 +650,22 @@ class optional : public optional_detail::optional_base // No-throw operator unspecified_bool_type() const { return this->safe_bool() ; } - // This is provided for those compilers which don't like the conversion to bool - // on some contexts. - bool operator!() const { return !this->is_initialized() ; } + // This is provided for those compilers which don't like the conversion to bool + // on some contexts. + bool operator!() const { return !this->is_initialized() ; } } ; // Returns optional(v) -template -inline +template +inline optional make_optional ( T const& v ) { return optional(v); } // Returns optional(cond,v) -template -inline +template +inline optional make_optional ( bool cond, T const& v ) { return optional(cond,v); @@ -867,58 +918,74 @@ inline bool operator >= ( none_t x, optional const& y ) { return !( x < y ) ; } -// -// The following swap implementation follows the GCC workaround as found in -// "boost/detail/compressed_pair.hpp" -// namespace optional_detail { -// GCC < 3.2 gets the using declaration at namespace scope (FLC, DWA) -#if BOOST_WORKAROUND(__GNUC__, < 3) \ - || BOOST_WORKAROUND(__GNUC__, == 3) && __GNUC_MINOR__ <= 2 - using std::swap; -#define BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE -#endif +template struct swap_selector; -// optional's swap: -// If both are initialized, calls swap(T&, T&). If this swap throws, both will remain initialized but their values are now unspecified. -// If only one is initialized, calls U.reset(*I), THEN I.reset(). -// If U.reset(*I) throws, both are left UNCHANGED (U is kept uinitialized and I is never reset) -// If both are uninitialized, do nothing (no-throw) -template -inline -void optional_swap ( optional& x, optional& y ) +template<> +struct swap_selector { - if ( !x && !!y ) - { - x.reset(*y); - y.reset(); - } - else if ( !!x && !y ) - { - y.reset(*x); - x.reset(); - } - else if ( !!x && !!y ) - { -// GCC > 3.2 and all other compilers have the using declaration at function scope (FLC) -#ifndef BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE - // allow for Koenig lookup - using std::swap ; -#endif - swap(*x,*y); - } -} + template + static void optional_swap ( optional& x, optional& y ) + { + const bool hasX = !!x; + const bool hasY = !!y; + + if ( !hasX && !hasY ) + return; + + if( !hasX ) + x = boost::in_place(); + else if ( !hasY ) + y = boost::in_place(); + + // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers + boost::swap(x.get(),y.get()); + + if( !hasX ) + y = boost::none ; + else if( !hasY ) + x = boost::none ; + } +}; + +template<> +struct swap_selector +{ + template + static void optional_swap ( optional& x, optional& y ) + { + const bool hasX = !!x; + const bool hasY = !!y; + + if ( !hasX && hasY ) + { + x = y.get(); + y = boost::none ; + } + else if ( hasX && !hasY ) + { + y = x.get(); + x = boost::none ; + } + else if ( hasX && hasY ) + { + // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers + boost::swap(x.get(),y.get()); + } + } +}; } // namespace optional_detail +template +struct optional_swap_should_use_default_constructor : has_nothrow_default_constructor {} ; + template inline void swap ( optional& x, optional& y ) { - optional_detail::optional_swap(x,y); + optional_detail::swap_selector::value>::optional_swap(x, y); } - } // namespace boost #endif - diff --git a/3party/boost/boost/optional/optional_io.hpp b/3party/boost/boost/optional/optional_io.hpp index 85a18575d0..9e0c807d3e 100644 --- a/3party/boost/boost/optional/optional_io.hpp +++ b/3party/boost/boost/optional/optional_io.hpp @@ -13,19 +13,20 @@ #define BOOST_OPTIONAL_OPTIONAL_IO_FLC_19NOV2002_HPP #if defined __GNUC__ -# if (__GNUC__ == 2 && __GNUC_MINOR__ <= 97) +# if (__GNUC__ == 2 && __GNUC_MINOR__ <= 97) # define BOOST_OPTIONAL_NO_TEMPLATED_STREAMS # endif #endif // __GNUC__ #if defined BOOST_OPTIONAL_NO_TEMPLATED_STREAMS # include -#else +#else # include # include -#endif - +#endif +#include +#include #include "boost/optional/optional.hpp" #include "boost/utility/value_init.hpp" @@ -62,17 +63,30 @@ std::basic_istream& operator>>(std::basic_istream& in, optional& v) #endif { - if ( in.good() ) + if (in.good()) { int d = in.get(); - if ( d == ' ' ) + if (d == ' ') { - T x ; + T x; in >> x; - v = x ; + v = x; } else - v = optional() ; + { + if (d == '-') + { + d = in.get(); + + if (d == '-') + { + v = none; + return in; + } + } + + in.setstate( std::ios::failbit ); + } } return in; diff --git a/3party/boost/boost/polygon/isotropy.hpp b/3party/boost/boost/polygon/isotropy.hpp index 1db7967328..055707c3e8 100755 --- a/3party/boost/boost/polygon/isotropy.hpp +++ b/3party/boost/boost/polygon/isotropy.hpp @@ -48,7 +48,7 @@ typedef boost::ulong_long_type polygon_ulong_long_type; #include #else -#ifdef WIN32 +#ifdef _WIN32 #define BOOST_POLYGON_MSVC #endif #ifdef __ICC @@ -290,7 +290,7 @@ namespace boost { namespace polygon{ template struct gtl_if { -#ifdef WIN32 +#ifdef BOOST_POLYGON_MSVC typedef gtl_no type; #endif }; diff --git a/3party/boost/boost/polygon/polygon_traits.hpp b/3party/boost/boost/polygon/polygon_traits.hpp index caa186939b..e9edc3402a 100755 --- a/3party/boost/boost/polygon/polygon_traits.hpp +++ b/3party/boost/boost/polygon/polygon_traits.hpp @@ -1170,7 +1170,7 @@ namespace boost { namespace polygon{ //odd count implies boundary condition if(counts[0] % 2 || counts[1] % 2) return consider_touch; //an odd number of edges to the left implies interior pt - return counts[0] % 4 != 0; + return counts[winding(polygon) == COUNTERCLOCKWISE ? 0 : 1] % 4 != 0; } //TODO: refactor to expose as user APIs diff --git a/3party/boost/boost/pool/detail/pool_construct.inc b/3party/boost/boost/pool/detail/pool_construct.inc index 4cabcea6cf..81107b0412 100644 --- a/3party/boost/boost/pool/detail/pool_construct.inc +++ b/3party/boost/boost/pool/detail/pool_construct.inc @@ -1,853 +1,852 @@ // Copyright (C) 2000 Stephen Cleary // -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// Distributed under the Boost Software License, Version 1.0. (See accompany- +// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org for updates, documentation, and revision history. -// This file was AUTOMATICALLY GENERATED from "pool_c~1.m4" +// This file was AUTOMATICALLY GENERATED from "stdin" // Do NOT include directly! // Do NOT edit! template element_type * construct(T0 & a0) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, const T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, const T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, const T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, const T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, volatile T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, volatile T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, volatile T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, volatile T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, const volatile T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, const volatile T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, const volatile T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, const volatile T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, const T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, const T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, const T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, const T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, volatile T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, volatile T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, volatile T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, volatile T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, const volatile T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, const volatile T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, const volatile T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, const volatile T1 & a1, T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, const T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, const T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, const T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, const T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, volatile T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, volatile T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, volatile T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, volatile T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, const volatile T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, const volatile T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, const volatile T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, const volatile T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, const T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, const T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, const T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, const T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, volatile T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, volatile T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, volatile T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, volatile T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, const volatile T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, const volatile T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, const volatile T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, const volatile T1 & a1, volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, const T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, const T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, const T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, const T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, volatile T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, volatile T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, volatile T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, volatile T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(T0 & a0, const volatile T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, const volatile T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(volatile T0 & a0, const volatile T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const volatile T0 & a0, const volatile T1 & a1, const volatile T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } diff --git a/3party/boost/boost/pool/detail/pool_construct.m4 b/3party/boost/boost/pool/detail/pool_construct.m4 index 91671b4ab9..3ae6b78c43 100644 --- a/3party/boost/boost/pool/detail/pool_construct.m4 +++ b/3party/boost/boost/pool/detail/pool_construct.m4 @@ -74,11 +74,11 @@ BOOST_M4_FOR(N, 1, NumberOfArguments + 1, element_type * construct(BOOST_M4_FOR(i, 0, N, `cv_qual(m4_eval((cv >> (i * 2)) % 4))T`'i & a`'i', `, ')) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(BOOST_M4_FOR(i, 0, N, `a`'i', `, ')); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } ')') diff --git a/3party/boost/boost/pool/detail/pool_construct_simple.inc b/3party/boost/boost/pool/detail/pool_construct_simple.inc index 0760863c68..2627640aa8 100644 --- a/3party/boost/boost/pool/detail/pool_construct_simple.inc +++ b/3party/boost/boost/pool/detail/pool_construct_simple.inc @@ -13,31 +13,31 @@ template element_type * construct(const T0 & a0) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, const T1 & a1) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } template element_type * construct(const T0 & a0, const T1 & a1, const T2 & a2) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(a0, a1, a2); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } diff --git a/3party/boost/boost/pool/detail/pool_construct_simple.m4 b/3party/boost/boost/pool/detail/pool_construct_simple.m4 index 11a27e719c..9d598ef3fc 100644 --- a/3party/boost/boost/pool/detail/pool_construct_simple.m4 +++ b/3party/boost/boost/pool/detail/pool_construct_simple.m4 @@ -40,10 +40,9 @@ m4_dnl Begin the generated file. m4_dnl // Copyright (C) 2000 Stephen Cleary // -// This file can be redistributed and/or modified under the terms found -// in "copyright.html" -// This software and its documentation is provided "as is" without express or -// implied warranty, and with no claim as to its suitability for any purpose. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org for updates, documentation, and revision history. @@ -63,11 +62,11 @@ BOOST_M4_FOR(N, 1, NumberOfArguments + 1, element_type * construct(BOOST_M4_FOR(i, 0, N, `const T`'i & a`'i', `, ')) { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(BOOST_M4_FOR(i, 0, N, `a`'i', `, ')); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } ') diff --git a/3party/boost/boost/pool/object_pool.hpp b/3party/boost/boost/pool/object_pool.hpp index 4beaf35150..e7f4bba8ac 100644 --- a/3party/boost/boost/pool/object_pool.hpp +++ b/3party/boost/boost/pool/object_pool.hpp @@ -53,26 +53,26 @@ class object_pool: protected pool public: // This constructor parameter is an extension! - explicit object_pool(const size_type next_size = 32) - :pool(sizeof(T), next_size) { } + explicit object_pool(const size_type next_size = 32, const size_type max_size = 0) + :pool(sizeof(T), next_size, max_size) { } ~object_pool(); // Returns 0 if out-of-memory - element_type * malloc() + element_type * malloc BOOST_PREVENT_MACRO_SUBSTITUTION() { return static_cast(store().ordered_malloc()); } - void free(element_type * const chunk) + void free BOOST_PREVENT_MACRO_SUBSTITUTION(element_type * const chunk) { store().ordered_free(chunk); } bool is_from(element_type * const chunk) const { return store().is_from(chunk); } element_type * construct() { - element_type * const ret = malloc(); + element_type * const ret = (malloc)(); if (ret == 0) return ret; try { new (ret) element_type(); } - catch (...) { free(ret); throw; } + catch (...) { (free)(ret); throw; } return ret; } @@ -87,7 +87,7 @@ class object_pool: protected pool void destroy(element_type * const chunk) { chunk->~T(); - free(chunk); + (free)(chunk); } // These functions are extensions! @@ -136,7 +136,7 @@ object_pool::~object_pool() } // free storage - UserAllocator::free(iter.begin()); + (UserAllocator::free)(iter.begin()); // increment iter iter = next; diff --git a/3party/boost/boost/pool/pool.hpp b/3party/boost/boost/pool/pool.hpp index 139822d32d..13c9875737 100644 --- a/3party/boost/boost/pool/pool.hpp +++ b/3party/boost/boost/pool/pool.hpp @@ -51,9 +51,9 @@ struct default_user_allocator_new_delete typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; - static char * malloc(const size_type bytes) + static char * malloc BOOST_PREVENT_MACRO_SUBSTITUTION(const size_type bytes) { return new (std::nothrow) char[bytes]; } - static void free(char * const block) + static void free BOOST_PREVENT_MACRO_SUBSTITUTION(char * const block) { delete [] block; } }; @@ -62,9 +62,9 @@ struct default_user_allocator_malloc_free typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; - static char * malloc(const size_type bytes) - { return reinterpret_cast(std::malloc(bytes)); } - static void free(char * const block) + static char * malloc BOOST_PREVENT_MACRO_SUBSTITUTION(const size_type bytes) + { return static_cast(std::malloc(bytes)); } + static void free BOOST_PREVENT_MACRO_SUBSTITUTION(char * const block) { std::free(block); } }; @@ -113,9 +113,11 @@ class PODptr } size_type & next_size() const - { return *(reinterpret_cast(ptr_next_size())); } + { + return *(static_cast(static_cast((ptr_next_size())))); + } char * & next_ptr() const - { return *(reinterpret_cast(ptr_next_ptr())); } + { return *(static_cast(static_cast(ptr_next_ptr()))); } PODptr next() const { return PODptr(next_ptr(), next_size()); } @@ -154,6 +156,7 @@ class pool: protected simple_segregated_storage< const size_type requested_size; size_type next_size; size_type start_size; + size_type max_size; // finds which POD in the list 'chunk' was allocated from details::PODptr find_POD(void * const chunk) const; @@ -192,8 +195,9 @@ class pool: protected simple_segregated_storage< // The second parameter here is an extension! // pre: npartition_size != 0 && nnext_size != 0 explicit pool(const size_type nrequested_size, - const size_type nnext_size = 32) - :list(0, 0), requested_size(nrequested_size), next_size(nnext_size), start_size(nnext_size) + const size_type nnext_size = 32, + const size_type nmax_size = 0) + :list(0, 0), requested_size(nrequested_size), next_size(nnext_size), start_size(nnext_size),max_size(nmax_size) { } ~pool() { purge_memory(); } @@ -210,17 +214,19 @@ class pool: protected simple_segregated_storage< // These functions are extensions! size_type get_next_size() const { return next_size; } void set_next_size(const size_type nnext_size) { next_size = start_size = nnext_size; } + size_type get_max_size() const { return max_size; } + void set_max_size(const size_type nmax_size) { max_size = nmax_size; } size_type get_requested_size() const { return requested_size; } // Both malloc and ordered_malloc do a quick inlined check first for any // free chunks. Only if we need to get another memory block do we call // the non-inlined *_need_resize() functions. // Returns 0 if out-of-memory - void * malloc() + void * malloc BOOST_PREVENT_MACRO_SUBSTITUTION() { // Look for a non-empty storage if (!store().empty()) - return store().malloc(); + return (store().malloc)(); return malloc_need_resize(); } @@ -228,7 +234,7 @@ class pool: protected simple_segregated_storage< { // Look for a non-empty storage if (!store().empty()) - return store().malloc(); + return (store().malloc)(); return ordered_malloc_need_resize(); } @@ -238,8 +244,8 @@ class pool: protected simple_segregated_storage< // pre: 'chunk' must have been previously // returned by *this.malloc(). - void free(void * const chunk) - { store().free(chunk); } + void free BOOST_PREVENT_MACRO_SUBSTITUTION(void * const chunk) + { (store().free)(chunk); } // pre: 'chunk' must have been previously // returned by *this.malloc(). @@ -248,7 +254,7 @@ class pool: protected simple_segregated_storage< // pre: 'chunk' must have been previously // returned by *this.malloc(n). - void free(void * const chunks, const size_type n) + void free BOOST_PREVENT_MACRO_SUBSTITUTION(void * const chunks, const size_type n) { const size_type partition_size = alloc_size(); const size_type total_req_size = n * requested_size; @@ -388,7 +394,7 @@ bool pool::release_memory() this->first = free_p; // And release memory - UserAllocator::free(ptr.begin()); + (UserAllocator::free)(ptr.begin()); ret = true; } @@ -414,7 +420,7 @@ bool pool::purge_memory() const details::PODptr next = iter.next(); // delete the storage - UserAllocator::free(iter.begin()); + (UserAllocator::free)(iter.begin()); // increment iter iter = next; @@ -434,11 +440,16 @@ void * pool::malloc_need_resize() const size_type partition_size = alloc_size(); const size_type POD_size = next_size * partition_size + details::pool::ct_lcm::value + sizeof(size_type); - char * const ptr = UserAllocator::malloc(POD_size); + char * const ptr = (UserAllocator::malloc)(POD_size); if (ptr == 0) return 0; const details::PODptr node(ptr, POD_size); - next_size <<= 1; + + BOOST_USING_STD_MIN(); + if(!max_size) + next_size <<= 1; + else if( next_size*partition_size/requested_size < max_size) + next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); // initialize it, store().add_block(node.begin(), node.element_size(), partition_size); @@ -448,7 +459,7 @@ void * pool::malloc_need_resize() list = node; // and return a chunk from it. - return store().malloc(); + return (store().malloc)(); } template @@ -458,17 +469,22 @@ void * pool::ordered_malloc_need_resize() const size_type partition_size = alloc_size(); const size_type POD_size = next_size * partition_size + details::pool::ct_lcm::value + sizeof(size_type); - char * const ptr = UserAllocator::malloc(POD_size); + char * const ptr = (UserAllocator::malloc)(POD_size); if (ptr == 0) return 0; const details::PODptr node(ptr, POD_size); - next_size <<= 1; + + BOOST_USING_STD_MIN(); + if(!max_size) + next_size <<= 1; + else if( next_size*partition_size/requested_size < max_size) + next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); // initialize it, // (we can use "add_block" here because we know that // the free list is empty, so we don't have to use // the slower ordered version) - store().add_block(node.begin(), node.element_size(), partition_size); + store().add_ordered_block(node.begin(), node.element_size(), partition_size); // insert it into the list, // handle border case @@ -497,7 +513,7 @@ void * pool::ordered_malloc_need_resize() } // and return a chunk from it. - return store().malloc(); + return (store().malloc)(); } template @@ -518,7 +534,7 @@ void * pool::ordered_malloc(const size_type n) next_size = max BOOST_PREVENT_MACRO_SUBSTITUTION(next_size, num_chunks); const size_type POD_size = next_size * partition_size + details::pool::ct_lcm::value + sizeof(size_type); - char * const ptr = UserAllocator::malloc(POD_size); + char * const ptr = (UserAllocator::malloc)(POD_size); if (ptr == 0) return 0; const details::PODptr node(ptr, POD_size); @@ -528,10 +544,14 @@ void * pool::ordered_malloc(const size_type n) // the free list is empty, so we don't have to use // the slower ordered version) if (next_size > num_chunks) - store().add_block(node.begin() + num_chunks * partition_size, + store().add_ordered_block(node.begin() + num_chunks * partition_size, node.element_size() - num_chunks * partition_size, partition_size); - next_size <<= 1; + BOOST_USING_STD_MIN(); + if(!max_size) + next_size <<= 1; + else if( next_size*partition_size/requested_size < max_size) + next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); // insert it into the list, // handle border case diff --git a/3party/boost/boost/pool/pool_alloc.hpp b/3party/boost/boost/pool/pool_alloc.hpp index e5f442c448..7d6a2a3fa4 100644 --- a/3party/boost/boost/pool/pool_alloc.hpp +++ b/3party/boost/boost/pool/pool_alloc.hpp @@ -35,7 +35,8 @@ struct pool_allocator_tag { }; template + unsigned NextSize, + unsigned MaxSize> class pool_allocator { public: @@ -54,7 +55,7 @@ class pool_allocator template struct rebind { - typedef pool_allocator other; + typedef pool_allocator other; }; public: @@ -65,7 +66,7 @@ class pool_allocator // initialization. See ticket #2359 for a complete explaination // ( http://svn.boost.org/trac/boost/ticket/2359 ) singleton_pool::is_from(0); + NextSize, MaxSize>::is_from(0); } // default copy constructor @@ -74,14 +75,14 @@ class pool_allocator // not explicit, mimicking std::allocator [20.4.1] template - pool_allocator(const pool_allocator &) + pool_allocator(const pool_allocator &) { // Required to ensure construction of singleton_pool IFF an // instace of this allocator is constructed during global // initialization. See ticket #2359 for a complete explaination // ( http://svn.boost.org/trac/boost/ticket/2359 ) singleton_pool::is_from(0); + NextSize, MaxSize>::is_from(0); } // default destructor @@ -109,7 +110,7 @@ class pool_allocator { const pointer ret = static_cast( singleton_pool::ordered_malloc(n) ); + NextSize, MaxSize>::ordered_malloc(n) ); if (ret == 0) boost::throw_exception(std::bad_alloc()); return ret; @@ -123,22 +124,23 @@ class pool_allocator return; #endif singleton_pool::ordered_free(ptr, n); + NextSize, MaxSize>::ordered_free(ptr, n); } }; template< typename UserAllocator, typename Mutex, - unsigned NextSize> -class pool_allocator + unsigned NextSize, + unsigned MaxSize> +class pool_allocator { public: typedef void* pointer; typedef const void* const_pointer; typedef void value_type; template struct rebind { - typedef pool_allocator other; + typedef pool_allocator other; }; }; @@ -147,7 +149,8 @@ struct fast_pool_allocator_tag { }; template + unsigned NextSize, + unsigned MaxSize> class fast_pool_allocator { public: @@ -166,7 +169,7 @@ class fast_pool_allocator template struct rebind { - typedef fast_pool_allocator other; + typedef fast_pool_allocator other; }; public: @@ -177,7 +180,7 @@ class fast_pool_allocator // initialization. See ticket #2359 for a complete explaination // ( http://svn.boost.org/trac/boost/ticket/2359 ) singleton_pool::is_from(0); + UserAllocator, Mutex, NextSize, MaxSize>::is_from(0); } // default copy constructor @@ -187,14 +190,14 @@ class fast_pool_allocator // not explicit, mimicking std::allocator [20.4.1] template fast_pool_allocator( - const fast_pool_allocator &) + const fast_pool_allocator &) { // Required to ensure construction of singleton_pool IFF an // instace of this allocator is constructed during global // initialization. See ticket #2359 for a complete explaination // ( http://svn.boost.org/trac/boost/ticket/2359 ) singleton_pool::is_from(0); + UserAllocator, Mutex, NextSize, MaxSize>::is_from(0); } // default destructor @@ -222,11 +225,11 @@ class fast_pool_allocator { const pointer ret = (n == 1) ? static_cast( - singleton_pool::malloc() ) : + (singleton_pool::malloc)() ) : static_cast( singleton_pool::ordered_malloc(n) ); + UserAllocator, Mutex, NextSize, MaxSize>::ordered_malloc(n) ); if (ret == 0) boost::throw_exception(std::bad_alloc()); return ret; @@ -236,8 +239,8 @@ class fast_pool_allocator static pointer allocate() { const pointer ret = static_cast( - singleton_pool::malloc() ); + (singleton_pool::malloc)() ); if (ret == 0) boost::throw_exception(std::bad_alloc()); return ret; @@ -249,31 +252,32 @@ class fast_pool_allocator return; #endif if (n == 1) - singleton_pool::free(ptr); + (singleton_pool::free)(ptr); else - singleton_pool::free(ptr, n); + (singleton_pool::free)(ptr, n); } static void deallocate(const pointer ptr) { - singleton_pool::free(ptr); + (singleton_pool::free)(ptr); } }; template< typename UserAllocator, typename Mutex, - unsigned NextSize> -class fast_pool_allocator + unsigned NextSize, + unsigned MaxSize> +class fast_pool_allocator { public: typedef void* pointer; typedef const void* const_pointer; typedef void value_type; template struct rebind { - typedef fast_pool_allocator other; + typedef fast_pool_allocator other; }; }; diff --git a/3party/boost/boost/pool/poolfwd.hpp b/3party/boost/boost/pool/poolfwd.hpp index 89b3dd3760..b3bbafc0ad 100644 --- a/3party/boost/boost/pool/poolfwd.hpp +++ b/3party/boost/boost/pool/poolfwd.hpp @@ -46,7 +46,8 @@ class object_pool; template + unsigned NextSize = 32, + unsigned MaxSize = 0> struct singleton_pool; // @@ -57,7 +58,8 @@ struct pool_allocator_tag; template + unsigned NextSize = 32, + unsigned MaxSize = 0> class pool_allocator; struct fast_pool_allocator_tag; @@ -65,7 +67,8 @@ struct fast_pool_allocator_tag; template + unsigned NextSize = 32, + unsigned MaxSize = 0> class fast_pool_allocator; } // namespace boost diff --git a/3party/boost/boost/pool/simple_segregated_storage.hpp b/3party/boost/boost/pool/simple_segregated_storage.hpp index 20c16dc5cb..b71c115716 100644 --- a/3party/boost/boost/pool/simple_segregated_storage.hpp +++ b/3party/boost/boost/pool/simple_segregated_storage.hpp @@ -96,7 +96,7 @@ class simple_segregated_storage bool empty() const { return (first == 0); } // pre: !empty() - void * malloc() + void * malloc BOOST_PREVENT_MACRO_SUBSTITUTION() { void * const ret = first; @@ -108,7 +108,7 @@ class simple_segregated_storage // pre: chunk was previously returned from a malloc() referring to the // same free list // post: !empty() - void free(void * const chunk) + void free BOOST_PREVENT_MACRO_SUBSTITUTION(void * const chunk) { nextof(chunk) = first; first = chunk; @@ -127,7 +127,7 @@ class simple_segregated_storage // Place either at beginning or in middle/end if (loc == 0) - free(chunk); + (free)(chunk); else { nextof(chunk) = nextof(loc); @@ -147,7 +147,8 @@ class simple_segregated_storage void free_n(void * const chunks, const size_type n, const size_type partition_size) { - add_block(chunks, n * partition_size, partition_size); + if(n != 0) + add_block(chunks, n * partition_size, partition_size); } // pre: chunks was previously allocated from *this with the same @@ -156,7 +157,8 @@ class simple_segregated_storage void ordered_free_n(void * const chunks, const size_type n, const size_type partition_size) { - add_ordered_block(chunks, n * partition_size, partition_size); + if(n != 0) + add_ordered_block(chunks, n * partition_size, partition_size); } }; @@ -247,6 +249,8 @@ template void * simple_segregated_storage::malloc_n(const size_type n, const size_type partition_size) { + if(n == 0) + return 0; void * start = &first; void * iter; do diff --git a/3party/boost/boost/pool/singleton_pool.hpp b/3party/boost/boost/pool/singleton_pool.hpp index 7290992c70..03d5aff9da 100644 --- a/3party/boost/boost/pool/singleton_pool.hpp +++ b/3party/boost/boost/pool/singleton_pool.hpp @@ -27,7 +27,8 @@ namespace boost { template + unsigned NextSize, + unsigned MaxSize> struct singleton_pool { public: @@ -52,11 +53,11 @@ struct singleton_pool singleton_pool(); public: - static void * malloc() + static void * malloc BOOST_PREVENT_MACRO_SUBSTITUTION() { pool_type & p = singleton::instance(); details::pool::guard g(p); - return p.p.malloc(); + return (p.p.malloc)(); } static void * ordered_malloc() { @@ -76,11 +77,11 @@ struct singleton_pool details::pool::guard g(p); return p.p.is_from(ptr); } - static void free(void * const ptr) + static void free BOOST_PREVENT_MACRO_SUBSTITUTION(void * const ptr) { pool_type & p = singleton::instance(); details::pool::guard g(p); - p.p.free(ptr); + (p.p.free)(ptr); } static void ordered_free(void * const ptr) { @@ -88,11 +89,11 @@ struct singleton_pool details::pool::guard g(p); p.p.ordered_free(ptr); } - static void free(void * const ptr, const size_type n) + static void free BOOST_PREVENT_MACRO_SUBSTITUTION(void * const ptr, const size_type n) { pool_type & p = singleton::instance(); details::pool::guard g(p); - p.p.free(ptr, n); + (p.p.free)(ptr, n); } static void ordered_free(void * const ptr, const size_type n) { diff --git a/3party/boost/boost/program_options/detail/parsers.hpp b/3party/boost/boost/program_options/detail/parsers.hpp index 506cb352af..a1124b277f 100644 --- a/3party/boost/boost/program_options/detail/parsers.hpp +++ b/3party/boost/boost/program_options/detail/parsers.hpp @@ -36,11 +36,11 @@ namespace boost { namespace program_options { template basic_command_line_parser:: - basic_command_line_parser(int argc, charT* argv[]) + basic_command_line_parser(int argc, const charT* const argv[]) : detail::cmdline( // Explicit template arguments are required by gcc 3.3.1 // (at least mingw version), and do no harm on other compilers. - to_internal(detail::make_vector(argv+1, argv+argc+!argc))) + to_internal(detail::make_vector(argv+1, argv+argc+!argc))) {} @@ -111,7 +111,7 @@ namespace boost { namespace program_options { template basic_parsed_options - parse_command_line(int argc, charT* argv[], + parse_command_line(int argc, const charT* const argv[], const options_description& desc, int style, function1, diff --git a/3party/boost/boost/program_options/parsers.hpp b/3party/boost/boost/program_options/parsers.hpp index 49fb19c91e..c57b971575 100644 --- a/3party/boost/boost/program_options/parsers.hpp +++ b/3party/boost/boost/program_options/parsers.hpp @@ -100,7 +100,7 @@ namespace boost { namespace program_options { /** Creates a command line parser for the specified arguments list. The parameters should be the same as passed to 'main'. */ - basic_command_line_parser(int argc, charT* argv[]); + basic_command_line_parser(int argc, const charT* const argv[]); /** Sets options descriptions to use. */ basic_command_line_parser& options(const options_description& desc); @@ -144,7 +144,7 @@ namespace boost { namespace program_options { */ template basic_parsed_options - parse_command_line(int argc, charT* argv[], + parse_command_line(int argc, const charT* const argv[], const options_description&, int style = 0, function1, diff --git a/3party/boost/boost/property_map/parallel/distributed_property_map.hpp b/3party/boost/boost/property_map/parallel/distributed_property_map.hpp index feef4322d1..c34e073e12 100644 --- a/3party/boost/boost/property_map/parallel/distributed_property_map.hpp +++ b/3party/boost/boost/property_map/parallel/distributed_property_map.hpp @@ -21,6 +21,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif +#include #include #include #include @@ -83,7 +84,7 @@ namespace detail { template static inline void do_put(PropertyMap, const Key&, const Value&) - { assert(false); } + { BOOST_ASSERT(false); } }; template<> @@ -134,7 +135,7 @@ namespace detail { template inline void maybe_put_impl(PropertyMap, const Key&, const Value&, ...) - { assert(false); } + { BOOST_ASSERT(false); } template inline void diff --git a/3party/boost/boost/property_map/parallel/impl/distributed_property_map.ipp b/3party/boost/boost/property_map/parallel/impl/distributed_property_map.ipp index 0d8f946189..fa95a5bd43 100644 --- a/3party/boost/boost/property_map/parallel/impl/distributed_property_map.ipp +++ b/3party/boost/boost/property_map/parallel/impl/distributed_property_map.ipp @@ -7,6 +7,7 @@ // Authors: Douglas Gregor // Nick Edmonds // Andrew Lumsdaine +#include #include #include #include @@ -46,7 +47,7 @@ PBGL_DISTRIB_PMAP::set_reduce(const Reduce& reduce) typedef handle_message Handler; data->process_group.replace_handler(Handler(data, reduce)); Handler* handler = data->process_group.template get_receiver(); - assert(handler); + BOOST_ASSERT(handler); handler->setup_triggers(data->process_group); data->get_default_value = reduce; data->has_default_resolver = Reduce::non_default_resolver; @@ -121,7 +122,7 @@ void PBGL_DISTRIB_PMAP ::handle_message::operator()(process_id_type source, int tag) { - assert(false); + BOOST_ASSERT(false); } template @@ -136,7 +137,7 @@ handle_put(int /*source*/, int /*tag*/, shared_ptr data(data_ptr); owner_local_pair p = get(data->global, req.first); - assert(p.first == process_id(data->process_group)); + BOOST_ASSERT(p.first == process_id(data->process_group)); detail::maybe_put(data->storage, p.second, reduce(req.first, @@ -154,7 +155,7 @@ handle_get(int source, int /*tag*/, const key_type& key, using boost::get; shared_ptr data(data_ptr); - assert(data); + BOOST_ASSERT(data); owner_local_pair p = get(data->global, key); return get(data->storage, p.second); @@ -168,7 +169,7 @@ handle_multiget(int source, int tag, const std::vector& keys, trigger_receive_context) { shared_ptr data(data_ptr); - assert(data); + BOOST_ASSERT(data); typedef boost::parallel::detail::untracked_pair key_value; std::vector results; @@ -194,7 +195,7 @@ handle_multiget_reply trigger_receive_context) { shared_ptr data(data_ptr); - assert(data); + BOOST_ASSERT(data); // Index by key ghost_cells_key_index_type const& key_index @@ -223,7 +224,7 @@ handle_multiput using boost::get; shared_ptr data(data_ptr); - assert(data); + BOOST_ASSERT(data); std::size_t n = values.size(); for (std::size_t i = 0; i < n; ++i) { @@ -261,7 +262,7 @@ PBGL_DISTRIB_PMAP { int stage=0; // we only get called at the start now shared_ptr data(data_ptr); - assert(data); + BOOST_ASSERT(data); // Determine in which stage backward consistency messages should be sent. int backward_stage = -1; @@ -422,7 +423,7 @@ template void PBGL_DISTRIB_PMAP::data_t::do_reset() { Resolver* resolver = get_default_value.template target(); - assert(resolver); + BOOST_ASSERT(resolver); for (iterator i = ghost_cells->begin(); i != ghost_cells->end(); ++i) const_cast(i->second) = (*resolver)(i->first); diff --git a/3party/boost/boost/property_map/parallel/local_property_map.hpp b/3party/boost/boost/property_map/parallel/local_property_map.hpp index 85e4274773..a0e08dcd7b 100644 --- a/3party/boost/boost/property_map/parallel/local_property_map.hpp +++ b/3party/boost/boost/property_map/parallel/local_property_map.hpp @@ -20,7 +20,7 @@ #error "Parallel BGL files should not be included unless has been included" #endif -#include +#include namespace boost { /** Property map that accesses an underlying, local property map @@ -47,7 +47,7 @@ namespace boost { reference operator[](const key_type& key) { owner_local_pair p = get(global_, key); - assert(p.first == process_id(process_group_)); + BOOST_ASSERT(p.first == process_id(process_group_)); return storage[p.second]; } @@ -84,7 +84,7 @@ namespace boost { ::value_type const& v) { typename property_traits::value_type p = get(pm.global(), key); - assert(p.first == process_id(pm.process_group())); + BOOST_ASSERT(p.first == process_id(pm.process_group())); put(pm.base(), p.second, v); } } // end namespace boost diff --git a/3party/boost/boost/property_map/property_map.hpp b/3party/boost/boost/property_map/property_map.hpp index d64d6e2799..01f961767a 100644 --- a/3party/boost/boost/property_map/property_map.hpp +++ b/3party/boost/boost/property_map/property_map.hpp @@ -11,7 +11,7 @@ #ifndef BOOST_PROPERTY_MAP_HPP #define BOOST_PROPERTY_MAP_HPP -#include +#include #include #include #include @@ -444,7 +444,7 @@ namespace boost { : iter(first), n(n_), index(_id) { } inline safe_iterator_property_map() { } inline R operator[](key_type v) const { - assert(get(index, v) < n); + BOOST_ASSERT(get(index, v) < n); return *(iter + get(index, v)) ; } typename property_traits::value_type size() const { return n; } diff --git a/3party/boost/boost/proto/args.hpp b/3party/boost/boost/proto/args.hpp index 652e6c3d5b..b5d07ca3fc 100644 --- a/3party/boost/boost/proto/args.hpp +++ b/3party/boost/boost/proto/args.hpp @@ -11,7 +11,6 @@ #ifndef BOOST_PROTO_ARGS_HPP_EAN_04_01_2005 #define BOOST_PROTO_ARGS_HPP_EAN_04_01_2005 - #include #include #include #include @@ -22,7 +21,6 @@ #include #include #include - #include #include #include #include @@ -32,13 +30,38 @@ { namespace detail { + // All classes derived from std::ios_base have these public nested types, + // and are non-copyable. This is an imperfect test, but it's the best we + // we can do. + template + yes_type check_is_iostream( + typename T::failure * + , typename T::Init * + , typename T::fmtflags * + , typename T::iostate * + , typename T::openmode * + , typename T::seekdir * + ); + + template + no_type check_is_iostream(...); + + template + struct is_iostream + { + static bool const value = sizeof(yes_type) == sizeof(check_is_iostream(0,0,0,0,0,0)); + typedef mpl::bool_ type; + }; + /// INTERNAL ONLY + // This should be a customization point. And it serves the same purpose + // as the is_noncopyable trait in Boost.Foreach. template struct ref_only : mpl::or_< is_function , is_abstract - , is_base_of + , is_iostream > {}; diff --git a/3party/boost/boost/proto/context/callable.hpp b/3party/boost/boost/proto/context/callable.hpp index ed1839dddd..67578ca05d 100644 --- a/3party/boost/boost/proto/context/callable.hpp +++ b/3party/boost/boost/proto/context/callable.hpp @@ -115,7 +115,7 @@ typedef typename proto::result_of::value::type value_type; typedef - typename boost::tr1_result_of< + typename BOOST_PROTO_RESULT_OF< Context(typename Expr::proto_tag, value_type) >::type result_type; @@ -294,7 +294,7 @@ BOOST_PP_REPEAT(N, BOOST_PROTO_CHILD_N_TYPE, Expr) typedef - typename boost::tr1_result_of< + typename BOOST_PROTO_RESULT_OF< Context( typename Expr::proto_tag BOOST_PP_ENUM_TRAILING_PARAMS(N, child) diff --git a/3party/boost/boost/proto/context/default.hpp b/3party/boost/boost/proto/context/default.hpp index b7a8da5ced..fa13506d73 100644 --- a/3party/boost/boost/proto/context/default.hpp +++ b/3party/boost/boost/proto/context/default.hpp @@ -322,7 +322,7 @@ function_type; typedef - typename boost::tr1_result_of::type + typename BOOST_PROTO_RESULT_OF::type result_type; result_type operator ()(Expr &expr, Context &context) const @@ -423,7 +423,7 @@ function_type; typedef - typename boost::tr1_result_of< + typename BOOST_PROTO_RESULT_OF< function_type(BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_DEFAULT_EVAL_TYPE, Expr)) >::type result_type; diff --git a/3party/boost/boost/proto/debug.hpp b/3party/boost/boost/proto/debug.hpp index 4fd8638618..61a9677e21 100644 --- a/3party/boost/boost/proto/debug.hpp +++ b/3party/boost/boost/proto/debug.hpp @@ -9,9 +9,7 @@ #ifndef BOOST_PROTO_DEBUG_HPP_EAN_12_31_2006 #define BOOST_PROTO_DEBUG_HPP_EAN_12_31_2006 -#include #include -#include #include #include #include @@ -94,10 +92,19 @@ namespace boost { namespace proto std::ostream &sout_; }; - template - std::ostream &operator <<(ostream_wrapper sout_wrap, Tag const &) + struct named_any { - return sout_wrap.sout_ << BOOST_SP_TYPEID(Tag).name(); + template + named_any(T const &) + : name_(BOOST_SP_TYPEID(T).name()) + {} + + char const *name_; + }; + + inline std::ostream &operator <<(ostream_wrapper sout_wrap, named_any t) + { + return sout_wrap.sout_ << t.name_; } } @@ -142,7 +149,8 @@ namespace boost { namespace proto { using namespace hidden_detail_; typedef typename tag_of::type tag; - this->sout_ << std::setw(this->depth_) << (this->first_? "" : ", "); + this->sout_.width(this->depth_); + this->sout_ << (this->first_? "" : ", "); this->sout_ << tag() << "(" << proto::value(expr) << ")\n"; this->first_ = false; } @@ -152,11 +160,13 @@ namespace boost { namespace proto { using namespace hidden_detail_; typedef typename tag_of::type tag; - this->sout_ << std::setw(this->depth_) << (this->first_? "" : ", "); + this->sout_.width(this->depth_); + this->sout_ << (this->first_? "" : ", "); this->sout_ << tag() << "(\n"; display_expr display(this->sout_, this->depth_ + 4); fusion::for_each(expr, display); - this->sout_ << std::setw(this->depth_) << "" << ")\n"; + this->sout_.width(this->depth_); + this->sout_ << "" << ")\n"; this->first_ = false; } diff --git a/3party/boost/boost/proto/detail/decltype.hpp b/3party/boost/boost/proto/detail/decltype.hpp index d047c095b5..b8ad6d4812 100644 --- a/3party/boost/boost/proto/detail/decltype.hpp +++ b/3party/boost/boost/proto/detail/decltype.hpp @@ -336,7 +336,7 @@ namespace boost { namespace proto // member object pointers. template struct result_of_ - : boost::tr1_result_of + : BOOST_PROTO_RESULT_OF {}; template @@ -486,7 +486,7 @@ namespace boost { namespace proto { typedef typename uncvref::type pmf_type; typedef typename classtypeof::type V; - typedef typename boost::tr1_result_of::type result_type; + typedef typename BOOST_PROTO_RESULT_OF::type result_type; memfun(T t, PMF p) : obj(t) diff --git a/3party/boost/boost/proto/detail/poly_function.hpp b/3party/boost/boost/proto/detail/poly_function.hpp index 4f300cd56c..346bc1401b 100644 --- a/3party/boost/boost/proto/detail/poly_function.hpp +++ b/3party/boost/boost/proto/detail/poly_function.hpp @@ -15,6 +15,7 @@ #include #include #include + #include #include #include #include @@ -185,7 +186,7 @@ template unknown_function_t test_poly_function(T *, ...); //////////////////////////////////////////////////////////////////////////////////////////////// - template(0,0))> + template(0,0))> > struct poly_function_traits { typedef typename Fun::template result::type result_type; @@ -194,7 +195,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////// template - struct poly_function_traits + struct poly_function_traits > { typedef typename Fun::result_type result_type; typedef Fun function_type; @@ -265,7 +266,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////// template - struct poly_function_traits + struct poly_function_traits > { typedef typename PolyFun::template impl function_type; typedef typename function_type::result_type result_type; diff --git a/3party/boost/boost/proto/domain.hpp b/3party/boost/boost/proto/domain.hpp index f9bdc903e6..29626aa0e4 100644 --- a/3party/boost/boost/proto/domain.hpp +++ b/3party/boost/boost/proto/domain.hpp @@ -292,6 +292,28 @@ namespace boost { namespace proto typedef typename domain_of::type type; }; + /// A metafunction that returns \c mpl::true_ + /// if the type \c SubDomain is a sub-domain of + /// \c SuperDomain; \c mpl::false_ otherwise. + template + struct is_sub_domain_of + : is_sub_domain_of + {}; + + /// INTERNAL ONLY + /// + template + struct is_sub_domain_of + : mpl::false_ + {}; + + /// INTERNAL ONLY + /// + template + struct is_sub_domain_of + : mpl::true_ + {}; + }} #endif diff --git a/3party/boost/boost/proto/extends.hpp b/3party/boost/boost/proto/extends.hpp index b63d001677..1f7f497ab1 100644 --- a/3party/boost/boost/proto/extends.hpp +++ b/3party/boost/boost/proto/extends.hpp @@ -74,7 +74,7 @@ namespace boost { namespace proto /// #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::tr1_result_of< \ + typename BOOST_PROTO_RESULT_OF< \ proto_generator( \ typename boost::proto::result_of::BOOST_PP_CAT(funop, N)< \ proto_derived_expr Const() \ @@ -103,7 +103,7 @@ namespace boost { namespace proto /// #define BOOST_PROTO_DEFINE_FUN_OP_VARIADIC_IMPL_(Const) \ template \ - typename boost::tr1_result_of< \ + typename BOOST_PROTO_RESULT_OF< \ proto_generator( \ typename boost::proto::result_of::funop< \ proto_derived_expr Const()(A const &...) \ @@ -202,9 +202,9 @@ namespace boost { namespace proto #define BOOST_PROTO_EXTENDS_COPY_ASSIGN_IMPL_(This, Const, Typename) \ BOOST_PROTO_DISABLE_MSVC_C4522 \ - Typename() boost::tr1_result_of< \ + Typename() BOOST_PROTO_RESULT_OF< \ Typename() This::proto_generator( \ - Typename() boost::proto::base_expr< \ + Typename() boost::proto::base_expr< \ Typename() This::proto_domain \ , boost::proto::tag::assign \ , boost::proto::list2< \ @@ -217,7 +217,7 @@ namespace boost { namespace proto operator =(This Const() &a) \ { \ typedef \ - Typename() boost::proto::base_expr< \ + Typename() boost::proto::base_expr< \ Typename() This::proto_domain \ , boost::proto::tag::assign \ , boost::proto::list2< \ @@ -251,9 +251,9 @@ namespace boost { namespace proto /// #define BOOST_PROTO_EXTENDS_ASSIGN_IMPL_(ThisConst, ThatConst) \ template \ - typename boost::tr1_result_of< \ + typename BOOST_PROTO_RESULT_OF< \ proto_generator( \ - typename boost::proto::base_expr< \ + typename boost::proto::base_expr< \ proto_domain \ , boost::proto::tag::assign \ , boost::proto::list2< \ @@ -266,7 +266,7 @@ namespace boost { namespace proto operator =(A ThatConst() &a) ThisConst() \ { \ typedef \ - typename boost::proto::base_expr< \ + typename boost::proto::base_expr< \ proto_domain \ , boost::proto::tag::assign \ , boost::proto::list2< \ @@ -274,12 +274,12 @@ namespace boost { namespace proto , typename boost::proto::result_of::as_child::type \ > \ >::type \ - that_type; \ + that_type; \ that_type const that = { \ *static_cast(this) \ , boost::proto::as_child(a) \ }; \ - return proto_generator()(that); \ + return proto_generator()(that); \ } \ /**/ @@ -317,9 +317,9 @@ namespace boost { namespace proto /// #define BOOST_PROTO_EXTENDS_SUBSCRIPT_IMPL_(ThisConst, ThatConst) \ template \ - typename boost::tr1_result_of< \ + typename BOOST_PROTO_RESULT_OF< \ proto_generator( \ - typename boost::proto::base_expr< \ + typename boost::proto::base_expr< \ proto_domain \ , boost::proto::tag::subscript \ , boost::proto::list2< \ @@ -332,7 +332,7 @@ namespace boost { namespace proto operator [](A ThatConst() &a) ThisConst() \ { \ typedef \ - typename boost::proto::base_expr< \ + typename boost::proto::base_expr< \ proto_domain \ , boost::proto::tag::subscript \ , boost::proto::list2< \ @@ -371,7 +371,7 @@ namespace boost { namespace proto struct result \ { \ typedef \ - typename boost::tr1_result_of< \ + typename BOOST_PROTO_RESULT_OF< \ proto_generator( \ typename boost::proto::result_of::funop< \ Sig \ diff --git a/3party/boost/boost/proto/functional.hpp b/3party/boost/boost/proto/functional.hpp new file mode 100644 index 0000000000..e3c868c4f8 --- /dev/null +++ b/3party/boost/boost/proto/functional.hpp @@ -0,0 +1,15 @@ +/////////////////////////////////////////////////////////////////////////////// +/// \file functional.hpp +/// Proto callables for various things +// +// Copyright 2010 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) + +#ifndef BOOST_PROTO_FUNCTIONAL_HPP_EAN_11_27_2010 +#define BOOST_PROTO_FUNCTIONAL_HPP_EAN_11_27_2010 + +#include +#include + +#endif diff --git a/3party/boost/boost/proto/functional/fusion.hpp b/3party/boost/boost/proto/functional/fusion.hpp new file mode 100644 index 0000000000..8aaf4ea06a --- /dev/null +++ b/3party/boost/boost/proto/functional/fusion.hpp @@ -0,0 +1,19 @@ +/////////////////////////////////////////////////////////////////////////////// +/// \file fusion.hpp +/// Proto callables for things found in the Fusion library +// +// Copyright 2010 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) + +#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_HPP_EAN_11_27_2010 +#define BOOST_PROTO_FUNCTIONAL_FUSION_HPP_EAN_11_27_2010 + +#include +#include +#include +#include +#include +#include + +#endif diff --git a/3party/boost/boost/proto/functional/fusion/at.hpp b/3party/boost/boost/proto/functional/fusion/at.hpp new file mode 100644 index 0000000000..328ac1383d --- /dev/null +++ b/3party/boost/boost/proto/functional/fusion/at.hpp @@ -0,0 +1,56 @@ +/////////////////////////////////////////////////////////////////////////////// +/// \file at.hpp +/// Proto callables Fusion at +// +// Copyright 2010 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) + +#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_AT_HPP_EAN_11_27_2010 +#define BOOST_PROTO_FUNCTIONAL_FUSION_AT_HPP_EAN_11_27_2010 + +#include +#include +#include +#include +#include + +namespace boost { namespace proto { namespace functional +{ + /// \brief A PolymorphicFunctionObject type that invokes the + /// \c fusion::at() accessor on its argument. + /// + /// A PolymorphicFunctionObject type that invokes the + /// \c fusion::at() accessor on its argument. + struct at + { + BOOST_PROTO_CALLABLE() + + template + struct result; + + template + struct result + : fusion::result_of::at< + typename boost::remove_reference::type + , typename boost::remove_const::type>::type + > + {}; + + template + typename fusion::result_of::at::type + operator ()(Seq &seq, N const & BOOST_PROTO_DISABLE_IF_IS_CONST(Seq)) const + { + return fusion::at(seq); + } + + template + typename fusion::result_of::at::type + operator ()(Seq const &seq, N const &) const + { + return fusion::at(seq); + } + }; +}}} + +#endif diff --git a/3party/boost/boost/proto/functional/fusion/pop_back.hpp b/3party/boost/boost/proto/functional/fusion/pop_back.hpp new file mode 100644 index 0000000000..f3ebeb8032 --- /dev/null +++ b/3party/boost/boost/proto/functional/fusion/pop_back.hpp @@ -0,0 +1,60 @@ +/////////////////////////////////////////////////////////////////////////////// +/// \file pop_back.hpp +/// Proto callables Fusion pop_back +// +// Copyright 2010 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) + +#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_POP_BACK_HPP_EAN_11_27_2010 +#define BOOST_PROTO_FUNCTIONAL_FUSION_POP_BACK_HPP_EAN_11_27_2010 + +#include +#include +#include +#include +#include + +namespace boost { namespace proto { namespace functional +{ + /// \brief A PolymorphicFunctionObject type that invokes the + /// \c fusion::pop_back() algorithm on its argument. + /// + /// A PolymorphicFunctionObject type that invokes the + /// \c fusion::pop_back() algorithm on its argument. + struct pop_back + { + BOOST_PROTO_CALLABLE() + + template + struct result; + + template + struct result + : result + {}; + + template + struct result + : fusion::result_of::pop_back + {}; + + template + typename fusion::result_of::pop_back::type + operator ()(Seq &seq) const + { + // Work around a const-correctness issue in Fusion + typedef typename fusion::result_of::pop_back::type result_type; + return result_type(fusion::begin(seq), fusion::prior(fusion::end(seq))); + } + + template + typename fusion::result_of::pop_back::type + operator ()(Seq const &seq) const + { + return fusion::pop_back(seq); + } + }; +}}} + +#endif diff --git a/3party/boost/boost/proto/functional/fusion/pop_front.hpp b/3party/boost/boost/proto/functional/fusion/pop_front.hpp new file mode 100644 index 0000000000..9586f4d79f --- /dev/null +++ b/3party/boost/boost/proto/functional/fusion/pop_front.hpp @@ -0,0 +1,65 @@ +/////////////////////////////////////////////////////////////////////////////// +/// \file pop_front.hpp +/// Proto callables Fusion pop_front +// +// Copyright 2010 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) + +#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_POP_FRONT_HPP_EAN_11_27_2010 +#define BOOST_PROTO_FUNCTIONAL_FUSION_POP_FRONT_HPP_EAN_11_27_2010 + +#include +#include +#include +#include +#include + +namespace boost { namespace proto { namespace functional +{ + /// \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::fold\<\> transform; that is, fold all but + /// the first child. + struct pop_front + { + BOOST_PROTO_CALLABLE() + + template + struct result; + + template + struct result + : result + {}; + + template + struct result + : fusion::result_of::pop_front + {}; + + template + typename fusion::result_of::pop_front::type + operator ()(Seq &seq) const + { + // Work around a const-correctness issue in Fusion + typedef typename fusion::result_of::pop_front::type result_type; + return result_type(fusion::next(fusion::begin(seq)), fusion::end(seq)); + } + + template + typename fusion::result_of::pop_front::type + operator ()(Seq const &seq) const + { + return fusion::pop_front(seq); + } + }; +}}} + +#endif diff --git a/3party/boost/boost/proto/functional/fusion/push_back.hpp b/3party/boost/boost/proto/functional/fusion/push_back.hpp new file mode 100644 index 0000000000..8a427ae250 --- /dev/null +++ b/3party/boost/boost/proto/functional/fusion/push_back.hpp @@ -0,0 +1,49 @@ +/////////////////////////////////////////////////////////////////////////////// +/// \file push_back.hpp +/// Proto callables Fusion push_back +// +// Copyright 2010 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) + +#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_PUSH_BACK_HPP_EAN_11_27_2010 +#define BOOST_PROTO_FUNCTIONAL_FUSION_PUSH_BACK_HPP_EAN_11_27_2010 + +#include +#include +#include +#include +#include + +namespace boost { namespace proto { namespace functional +{ + /// \brief A PolymorphicFunctionObject type that invokes the + /// \c fusion::push_back() algorithm on its argument. + /// + /// A PolymorphicFunctionObject type that invokes the + /// \c fusion::push_back() algorithm on its argument. + struct push_back + { + BOOST_PROTO_CALLABLE() + + template + struct result; + + template + struct result + : fusion::result_of::push_back< + typename boost::add_const::type>::type + , typename boost::remove_const::type>::type + > + {}; + + template + typename fusion::result_of::push_back::type + operator ()(Seq const &seq, T const &t) const + { + return fusion::push_back(seq, t); + } + }; +}}} + +#endif diff --git a/3party/boost/boost/proto/functional/fusion/push_front.hpp b/3party/boost/boost/proto/functional/fusion/push_front.hpp new file mode 100644 index 0000000000..d17f509522 --- /dev/null +++ b/3party/boost/boost/proto/functional/fusion/push_front.hpp @@ -0,0 +1,49 @@ +/////////////////////////////////////////////////////////////////////////////// +/// \file push_front.hpp +/// Proto callables Fusion push_front +// +// Copyright 2010 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) + +#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_PUSH_FRONT_HPP_EAN_11_27_2010 +#define BOOST_PROTO_FUNCTIONAL_FUSION_PUSH_FRONT_HPP_EAN_11_27_2010 + +#include +#include +#include +#include +#include + +namespace boost { namespace proto { namespace functional +{ + /// \brief A PolymorphicFunctionObject type that invokes the + /// \c fusion::push_front() algorithm on its argument. + /// + /// A PolymorphicFunctionObject type that invokes the + /// \c fusion::push_front() algorithm on its argument. + struct push_front + { + BOOST_PROTO_CALLABLE() + + template + struct result; + + template + struct result + : fusion::result_of::push_front< + typename boost::add_const::type>::type + , typename boost::remove_const::type>::type + > + {}; + + template + typename fusion::result_of::push_front::type + operator ()(Seq const &seq, T const &t) const + { + return fusion::push_front(seq, t); + } + }; +}}} + +#endif diff --git a/3party/boost/boost/proto/functional/fusion/reverse.hpp b/3party/boost/boost/proto/functional/fusion/reverse.hpp new file mode 100644 index 0000000000..3ed154ba6d --- /dev/null +++ b/3party/boost/boost/proto/functional/fusion/reverse.hpp @@ -0,0 +1,60 @@ +/////////////////////////////////////////////////////////////////////////////// +/// \file reverse.hpp +/// Proto callables Fusion reverse +// +// Copyright 2010 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) + +#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_REVERSE_HPP_EAN_11_27_2010 +#define BOOST_PROTO_FUNCTIONAL_FUSION_REVERSE_HPP_EAN_11_27_2010 + +#include +#include + +namespace boost { namespace proto { namespace functional +{ + /// \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 + struct result; + + template + struct result + : result + {}; + + template + struct result + : fusion::result_of::reverse + {}; + + template + typename fusion::result_of::reverse::type + operator ()(Seq &seq) const + { + // Work around a const-correctness issue in Fusion + typedef typename fusion::result_of::reverse::type result_type; + return result_type(seq); + } + + template + typename fusion::result_of::reverse::type + operator ()(Seq const &seq) const + { + return fusion::reverse(seq); + } + }; +}}} + +#endif diff --git a/3party/boost/boost/proto/functional/std.hpp b/3party/boost/boost/proto/functional/std.hpp new file mode 100644 index 0000000000..2f997ef78a --- /dev/null +++ b/3party/boost/boost/proto/functional/std.hpp @@ -0,0 +1,14 @@ +/////////////////////////////////////////////////////////////////////////////// +/// \file std.hpp +/// Proto callables for things found in the std library +// +// Copyright 2010 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) + +#ifndef BOOST_PROTO_FUNCTIONAL_STD_HPP_EAN_11_27_2010 +#define BOOST_PROTO_FUNCTIONAL_STD_HPP_EAN_11_27_2010 + +#include + +#endif diff --git a/3party/boost/boost/proto/functional/std/utility.hpp b/3party/boost/boost/proto/functional/std/utility.hpp new file mode 100644 index 0000000000..c1270d3c89 --- /dev/null +++ b/3party/boost/boost/proto/functional/std/utility.hpp @@ -0,0 +1,137 @@ +/////////////////////////////////////////////////////////////////////////////// +/// \file utility.hpp +/// Proto callables for things found in the std \ header +// +// Copyright 2010 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) + +#ifndef BOOST_PROTO_FUNCTIONAL_STD_UTILITY_HPP_EAN_11_27_2010 +#define BOOST_PROTO_FUNCTIONAL_STD_UTILITY_HPP_EAN_11_27_2010 + +#include +#include +#include +#include + +namespace boost { namespace proto { namespace functional +{ + /// \brief A PolymorphicFunctionObject type that invokes the + /// \c std::make_pair() algorithm on its arguments. + /// + /// A PolymorphicFunctionObject type that invokes the + /// \c std::make_pair() algorithm on its arguments. + struct make_pair + { + BOOST_PROTO_CALLABLE() + + template + struct result; + + template + struct result + { + typedef + std::pair< + typename remove_const::type>::type + , typename remove_const::type>::type + > + type; + }; + + template + std::pair operator()(First const &first, Second const &second) const + { + return std::make_pair(first, second); + } + }; + + /// \brief A PolymorphicFunctionObject type that returns + /// the first element of a std::pair. + /// + /// A PolymorphicFunctionObject type that returns + /// the first element of a std::pair.. + struct first + { + BOOST_PROTO_CALLABLE() + + template + struct result; + + template + struct result + { + typedef typename Pair::first_type type; + }; + + template + struct result + { + typedef typename Pair::first_type &type; + }; + + template + struct result + { + typedef typename Pair::first_type const &type; + }; + + template + typename Pair::first_type &operator()(Pair &pair) const + { + return pair.first; + } + + template + typename Pair::first_type const &operator()(Pair const &pair) const + { + return pair.first; + } + }; + + /// \brief A PolymorphicFunctionObject type that returns + /// the second element of a std::pair. + /// + /// A PolymorphicFunctionObject type that returns + /// the second element of a std::pair.. + struct second + { + BOOST_PROTO_CALLABLE() + + template + struct result; + + template + struct result + { + typedef typename Pair::second_type type; + }; + + template + struct result + { + typedef typename Pair::second_type &type; + }; + + template + struct result + { + typedef typename Pair::second_type const &type; + }; + + template + typename Pair::second_type &operator()(Pair &pair) const + { + return pair.second; + } + + template + typename Pair::second_type const &operator()(Pair const &pair) const + { + return pair.second; + } + }; + +}}} + +#endif diff --git a/3party/boost/boost/proto/fusion.hpp b/3party/boost/boost/proto/fusion.hpp index d702071c05..cf50038dcf 100644 --- a/3party/boost/boost/proto/fusion.hpp +++ b/3party/boost/boost/proto/fusion.hpp @@ -11,26 +11,27 @@ #include #include +#include #include #include +#include #include #include #include #include #include -#include -#include #include #include #include #include #include +#include #include #include #include #include -#if BOOST_MSVC +#ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable : 4510) // default constructor could not be generated #pragma warning(disable : 4512) // assignment operator could not be generated @@ -39,10 +40,8 @@ namespace boost { namespace proto { - namespace detail { - template struct expr_iterator : fusion::iterator_base > @@ -171,92 +170,6 @@ namespace boost { namespace proto return proto::detail::flat_view(e); } }; - - /// \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::fold\<\> transform; that is, fold all but - /// the first child. - struct pop_front - { - BOOST_PROTO_CALLABLE() - - template - struct result; - - template - struct result - : result - {}; - - template - struct result - : fusion::result_of::pop_front - {}; - - template - typename fusion::result_of::pop_front::type - operator ()(Expr &e) const - { - // Work around a const-correctness issue in Fusion - typedef typename fusion::result_of::pop_front::type result_type; - return result_type(fusion::next(fusion::begin(e)), fusion::end(e)); - } - - template - typename fusion::result_of::pop_front::type - operator ()(Expr const &e) const - { - return fusion::pop_front(e); - } - }; - - /// \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 - struct result; - - template - struct result - : result - {}; - - template - struct result - : fusion::result_of::reverse - {}; - - template - typename fusion::result_of::reverse::type - operator ()(Expr &e) const - { - // Work around a const-correctness issue in Fusion - typedef typename fusion::result_of::reverse::type result_type; - return result_type(e); - } - - template - typename fusion::result_of::reverse::type - operator ()(Expr const &e) const - { - return fusion::reverse(e); - } - }; } /// \brief A function that returns a "flattened" @@ -286,31 +199,11 @@ namespace boost { namespace proto return proto::detail::flat_view(e); } - /// INTERNAL ONLY - /// - template<> - struct is_callable - : mpl::true_ - {}; - - /// INTERNAL ONLY - /// - template<> - struct is_callable - : mpl::true_ - {}; - - /// INTERNAL ONLY - /// - template<> - struct is_callable - : mpl::true_ - {}; - /// INTERNAL ONLY /// template struct eval_fun + : proto::callable { explicit eval_fun(Context &ctx) : ctx_(ctx) @@ -346,12 +239,39 @@ namespace boost { namespace proto private: Context &ctx_; }; + + /// INTERNAL ONLY + /// + template + struct is_callable > + : mpl::true_ + {}; }} namespace boost { namespace fusion { namespace extension { + template + struct is_sequence_impl; + + template<> + struct is_sequence_impl + { + template + struct apply + : mpl::true_ + {}; + }; + + template<> + struct is_sequence_impl + { + template + struct apply + : mpl::true_ + {}; + }; template struct is_view_impl; @@ -719,6 +639,37 @@ namespace boost { namespace fusion } + namespace traits + { + template + struct enable_equality< + Seq1 + , Seq2 + , typename enable_if_c< + mpl::or_< + proto::is_expr + , proto::is_expr + >::value + >::type + > + : mpl::false_ + {}; + + template + struct enable_comparison< + Seq1 + , Seq2 + , typename enable_if_c< + mpl::or_< + proto::is_expr + , proto::is_expr + >::value + >::type + > + : mpl::false_ + {}; + } + }} namespace boost { namespace mpl @@ -736,7 +687,7 @@ namespace boost { namespace mpl }; }} -#if BOOST_MSVC +#ifdef BOOST_MSVC #pragma warning(pop) #endif diff --git a/3party/boost/boost/proto/generate.hpp b/3party/boost/boost/proto/generate.hpp index 820b369a79..5009ccaa5e 100644 --- a/3party/boost/boost/proto/generate.hpp +++ b/3party/boost/boost/proto/generate.hpp @@ -12,6 +12,7 @@ #define BOOST_PROTO_GENERATE_HPP_EAN_02_13_2007 #include + #include #include #include #include @@ -369,7 +370,8 @@ }} - // Specialization of boost::result_of to eliminate some unnecessary template instantiations + // Specializations of boost::result_of and boost::tr1_result_of to eliminate + // some unnecessary template instantiations namespace boost { template @@ -383,6 +385,20 @@ { typedef Expr type; }; + + #if BOOST_VERSION >= 104400 + template + struct tr1_result_of + { + typedef Expr type; + }; + + template + struct tr1_result_of + { + typedef Expr type; + }; + #endif } #endif // BOOST_PROTO_GENERATE_HPP_EAN_02_13_2007 diff --git a/3party/boost/boost/proto/make_expr.hpp b/3party/boost/boost/proto/make_expr.hpp index 80e4b6dde4..75b42ba812 100644 --- a/3party/boost/boost/proto/make_expr.hpp +++ b/3party/boost/boost/proto/make_expr.hpp @@ -33,7 +33,6 @@ #include #include #include - #include #include #include #include @@ -53,19 +52,6 @@ # pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored #endif - namespace boost - { - /// INTERNAL ONLY - /// - namespace fusion - { - /// INTERNAL ONLY - /// - template - class unfused_generic; - } - } - namespace boost { namespace proto { /// INTERNAL ONLY @@ -481,8 +467,7 @@ BOOST_PROTO_CALLABLE() template - struct result - {}; + struct result; template struct result @@ -514,50 +499,6 @@ } }; - /// INTERNAL ONLY - /// - template - struct unfused_expr_fun - { - BOOST_PROTO_CALLABLE() - - template - struct result; - - template - struct result - { - typedef - typename result_of::unpack_expr< - Tag - , Domain - , typename remove_reference::type - >::type - type; - }; - - template - typename proto::result_of::unpack_expr::type const - operator ()(Sequence const &sequence) const - { - return proto::detail::unpack_expr_< - Tag - , Domain - , Sequence const - , fusion::result_of::size::type::value - >::call(sequence); - } - }; - - /// INTERNAL ONLY - /// - template - struct unfused_expr - : fusion::unfused_generic > - { - BOOST_PROTO_CALLABLE() - }; - } // namespace functional /// \brief Construct an expression of the requested tag type @@ -693,13 +634,6 @@ : mpl::true_ {}; - /// INTERNAL ONLY - /// - template - struct is_callable > - : mpl::true_ - {}; - }} #ifdef _MSC_VER diff --git a/3party/boost/boost/proto/matches.hpp b/3party/boost/boost/proto/matches.hpp index 9088c41479..d4075b68f7 100644 --- a/3party/boost/boost/proto/matches.hpp +++ b/3party/boost/boost/proto/matches.hpp @@ -67,7 +67,7 @@ namespace detail { - template + template struct matches_; template @@ -138,24 +138,26 @@ struct vararg_matches_impl; // vararg_matches - template + template struct vararg_matches : mpl::false_ {}; - template - struct vararg_matches + template + struct vararg_matches : matches_< - proto::basic_expr + Expr + , proto::basic_expr , proto::basic_expr > {}; - template - struct vararg_matches + template + struct vararg_matches : and_2< matches_< - proto::basic_expr + Expr + , proto::basic_expr , proto::basic_expr >::value , vararg_matches_impl @@ -297,66 +299,70 @@ {}; // matches_ - template + template struct matches_ : mpl::false_ {}; - template - struct matches_< Expr, proto::_ > + template + struct matches_< Expr, BasicExpr, proto::_ > : mpl::true_ {}; - template - struct matches_< proto::basic_expr, proto::basic_expr > - : vararg_matches< Args1, Args2, typename Args2::back_, (N1+2 > N2), (N2 > N1) > + template + struct matches_< Expr, proto::basic_expr, proto::basic_expr > + : vararg_matches< Expr, Args1, Args2, typename Args2::back_, (N1+2 > N2), (N2 > N1) > {}; - template - struct matches_< proto::basic_expr, proto::basic_expr > - : vararg_matches< Args1, Args2, typename Args2::back_, (N1+2 > N2), (N2 > N1) > + template + struct matches_< Expr, proto::basic_expr, proto::basic_expr > + : vararg_matches< Expr, Args1, Args2, typename Args2::back_, (N1+2 > N2), (N2 > N1) > {}; - template - struct matches_< proto::basic_expr, proto::basic_expr > + template + struct matches_< Expr, proto::basic_expr, proto::basic_expr > : terminal_matches {}; - template - struct matches_< proto::basic_expr, proto::basic_expr > + template + struct matches_< Expr, proto::basic_expr, proto::basic_expr > : mpl::false_ {}; - template - struct matches_< proto::basic_expr, proto::basic_expr > + template + struct matches_< Expr, proto::basic_expr, proto::basic_expr > : terminal_matches {}; - template - struct matches_< proto::basic_expr, proto::basic_expr > + template + struct matches_< Expr, proto::basic_expr, proto::basic_expr > : matches_< - typename detail::expr_traits::value_type::proto_grammar - , typename Args2::child0::proto_grammar - > + typename detail::expr_traits::value_type::proto_derived_expr + , typename detail::expr_traits::value_type::proto_grammar + , typename Args2::child0::proto_grammar + > {}; - template - struct matches_< proto::basic_expr, proto::basic_expr > + template + struct matches_< Expr, proto::basic_expr, proto::basic_expr > : matches_< - typename detail::expr_traits::value_type::proto_grammar - , typename Args2::child0::proto_grammar - > + typename detail::expr_traits::value_type::proto_derived_expr + , typename detail::expr_traits::value_type::proto_grammar + , typename Args2::child0::proto_grammar + > {}; #define BOOST_PROTO_MATCHES_N_FUN(Z, N, DATA) \ matches_< \ - typename detail::expr_traits::value_type::proto_grammar\ + typename detail::expr_traits::value_type::proto_derived_expr \ + , typename detail::expr_traits::value_type::proto_grammar \ , typename Args2::BOOST_PP_CAT(child, N)::proto_grammar \ > #define BOOST_PROTO_DEFINE_MATCHES(Z, N, DATA) \ matches_< \ Expr \ + , BasicExpr \ , typename BOOST_PP_CAT(G, N)::proto_grammar \ > @@ -381,66 +387,70 @@ #undef BOOST_PROTO_DEFINE_LAMBDA_MATCHES // handle proto::if_ - template - struct matches_, proto::if_ > + template + struct matches_, proto::if_ > : mpl::eval_if_c< remove_reference< - typename when<_, If>:: - template impl, int, int>::result_type + typename when<_, If>::template impl::result_type >::type::value - , matches_, typename Then::proto_grammar> - , matches_, typename Else::proto_grammar> + , matches_, typename Then::proto_grammar> + , matches_, typename Else::proto_grammar> >::type - {}; - - template - struct matches_, proto::if_ > - : detail::uncvref< - typename when<_, If>:: - template impl, int, int>::result_type - >::type - {}; + { + typedef + typename mpl::if_c< + remove_reference< + typename when<_, If>::template impl::result_type + >::type::value + , Then + , Else + >::type + which; + }; // handle degenerate cases of proto::or_ - template - struct matches_ > + template + struct matches_ > : mpl::false_ { typedef not_<_> which; }; - template - struct matches_ > - : matches_ + template + struct matches_ > + : matches_ { typedef G0 which; }; // handle degenerate cases of proto::and_ - template - struct matches_ > + template + struct matches_ > : mpl::true_ {}; - template - struct matches_ > - : matches_ + template + struct matches_ > + : matches_ {}; // handle proto::not_ - template - struct matches_ > - : mpl::not_ > + template + struct matches_ > + : mpl::not_ > {}; // handle proto::switch_ - template - struct matches_, switch_ > + template + struct matches_, switch_ > : matches_< - proto::basic_expr + Expr + , proto::basic_expr , typename Cases::template case_::proto_grammar > - {}; + { + typedef typename Cases::template case_ which; + }; } /// \brief A Boolean metafunction that evaluates whether a given @@ -508,7 +518,8 @@ template struct matches : detail::matches_< - typename Expr::proto_grammar + typename Expr::proto_derived_expr + , typename Expr::proto_grammar , typename Grammar::proto_grammar > {}; @@ -518,7 +529,8 @@ template struct matches : detail::matches_< - typename Expr::proto_grammar + typename Expr::proto_derived_expr + , typename Expr::proto_grammar , typename Grammar::proto_grammar > {}; @@ -757,14 +769,20 @@ template struct impl - : detail::matches_ - ::which::template impl + : detail::matches_< + typename Expr::proto_derived_expr + , typename Expr::proto_grammar + , or_ + >::which::template impl {}; template struct impl - : detail::matches_ - ::which::template impl + : detail::matches_< + typename Expr::proto_derived_expr + , typename Expr::proto_grammar + , or_ + >::which::template impl {}; }; @@ -785,7 +803,7 @@ template struct impl - : detail::_and_impl + : detail::_and_impl {}; }; @@ -819,12 +837,12 @@ template struct impl - : Cases::template case_::template impl + : Cases::template case_::template impl {}; template struct impl - : Cases::template case_::template impl + : Cases::template case_::template impl {}; }; @@ -920,6 +938,13 @@ : mpl::true_ {}; + /// INTERNAL ONLY + /// + template + struct is_callable > + : mpl::true_ + {}; + }} #if defined(_MSC_VER) && (_MSC_VER >= 1020) @@ -965,6 +990,7 @@ BOOST_PP_CAT(Gimpl, N); \ /**/ BOOST_PP_REPEAT(N, M0, ~) + #undef M0 typedef typename BOOST_PP_CAT(Gimpl, BOOST_PP_DEC(N))::result_type result_type; @@ -974,47 +1000,51 @@ , typename _and_impl::data_param d ) const { - // expands to (G0()(e,s,d),G1()(e,s,d),...); - return (BOOST_PP_ENUM_BINARY_PARAMS(N, Gimpl, ()(e,s,d) BOOST_PP_INTERCEPT)); + // Fix: jfalcou - 12/29/2010 + // Avoid the use of comma operator here so as not to find Proto's + // by accident. + // expands to G0()(e,s,d); G1()(e,s,d); ... G{N-1}()(e,s,d); + #define M0(Z,N,DATA) BOOST_PP_CAT(Gimpl,N)()(e,s,d); + BOOST_PP_REPEAT(BOOST_PP_DEC(N),M0,~) + return BOOST_PP_CAT(Gimpl,BOOST_PP_DEC(N))()(e,s,d); + #undef M0 } - - #undef M0 }; - template + template struct BOOST_PP_CAT(or_, N) #if 2 == N - : mpl::bool_::value> + : mpl::bool_::value> { typedef G1 which; }; #else : BOOST_PP_CAT(or_, BOOST_PP_DEC(N))< - matches_::value - , Expr, BOOST_PP_ENUM_SHIFTED_PARAMS(N, G) + matches_::value + , Expr, BasicExpr, BOOST_PP_ENUM_SHIFTED_PARAMS(N, G) > {}; #endif - template - struct BOOST_PP_CAT(or_, N) + template + struct BOOST_PP_CAT(or_, N) : mpl::true_ { typedef G0 which; }; // handle proto::or_ - template - struct matches_ > + template + struct matches_ > : BOOST_PP_CAT(or_, N)< - matches_::value, - Expr, BOOST_PP_ENUM_PARAMS(N, G) + matches_::value, + Expr, BasicExpr BOOST_PP_ENUM_TRAILING_PARAMS(N, G) > {}; // handle proto::and_ - template - struct matches_ > + template + struct matches_ > : detail::BOOST_PP_CAT(and_, N)< BOOST_PROTO_DEFINE_MATCHES(~, 0, ~)::value, BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_DEFINE_MATCHES, ~) @@ -1032,9 +1062,10 @@ struct vararg_matches_impl : and_2< matches_< - typename detail::expr_traits::value_type::proto_grammar - , Back - >::value + typename detail::expr_traits::value_type::proto_derived_expr + , typename detail::expr_traits::value_type::proto_grammar + , Back + >::value , vararg_matches_impl > {}; @@ -1042,9 +1073,10 @@ template struct vararg_matches_impl : matches_< - typename detail::expr_traits::value_type::proto_grammar - , Back - > + typename detail::expr_traits::value_type::proto_derived_expr + , typename detail::expr_traits::value_type::proto_grammar + , Back + > {}; template< @@ -1053,26 +1085,26 @@ BOOST_PP_ENUM_TRAILING_PARAMS(N, typename Grammar) > struct lambda_matches< - T - , T - BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(N) - > + T + , T + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(N) + > : BOOST_PP_CAT(and_, N)< BOOST_PROTO_DEFINE_LAMBDA_MATCHES(~, 0, ~)::value, BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_DEFINE_LAMBDA_MATCHES, ~) > {}; - template - struct matches_< proto::basic_expr, proto::basic_expr > + template + struct matches_< Expr, proto::basic_expr, proto::basic_expr > : BOOST_PP_CAT(and_, N)< BOOST_PROTO_MATCHES_N_FUN(~, 0, ~)::value, BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_MATCHES_N_FUN, ~) > {}; - template - struct matches_< proto::basic_expr, proto::basic_expr > + template + struct matches_< Expr, proto::basic_expr, proto::basic_expr > : BOOST_PP_CAT(and_, N)< BOOST_PROTO_MATCHES_N_FUN(~, 0, ~)::value, BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_MATCHES_N_FUN, ~) diff --git a/3party/boost/boost/proto/operators.hpp b/3party/boost/boost/proto/operators.hpp index b752db0d2f..17d6c499dd 100644 --- a/3party/boost/boost/proto/operators.hpp +++ b/3party/boost/boost/proto/operators.hpp @@ -34,7 +34,7 @@ namespace boost { namespace proto : boost::lazy_enable_if_c< boost::mpl::and_< Trait - , lazy_matches, Grammar> + , lazy_matches, Grammar> >::value , result_of::make_expr > @@ -64,9 +64,7 @@ namespace boost { namespace proto : boost::lazy_enable_if_c< boost::mpl::and_< Trait - , lazy_matches, Grammar> - , lazy_matches, Grammar> - , lazy_matches, Grammar> + , lazy_matches, Grammar> >::value , result_of::make_expr > diff --git a/3party/boost/boost/proto/proto.hpp b/3party/boost/boost/proto/proto.hpp index 3d1e52e0c5..ad2f1bb52a 100644 --- a/3party/boost/boost/proto/proto.hpp +++ b/3party/boost/boost/proto/proto.hpp @@ -13,5 +13,6 @@ #include #include #include +#include #endif diff --git a/3party/boost/boost/proto/proto_fwd.hpp b/3party/boost/boost/proto/proto_fwd.hpp index ef874b7657..f8d1f8f548 100644 --- a/3party/boost/boost/proto/proto_fwd.hpp +++ b/3party/boost/boost/proto/proto_fwd.hpp @@ -83,6 +83,12 @@ # endif #endif +#ifdef BOOST_PROTO_USE_NORMAL_RESULT_OF +# define BOOST_PROTO_RESULT_OF boost::result_of +#else +# define BOOST_PROTO_RESULT_OF boost::tr1_result_of +#endif + namespace boost { namespace proto { namespace detail @@ -154,8 +160,8 @@ namespace boost { namespace proto /// INTERNAL ONLY /// #define BOOST_PROTO_UNCVREF(X) \ - typename boost::proto::detail::uncvref::type \ - /**/ + typename boost::proto::detail::uncvref::type \ + /**/ struct _default; @@ -424,6 +430,9 @@ namespace boost { namespace proto template struct is_domain; + template + struct is_sub_domain_of; + template struct tag_of; @@ -525,12 +534,6 @@ namespace boost { namespace proto template struct unpack_expr; - template - struct unfused_expr_fun; - - template - struct unfused_expr; - typedef make_expr make_terminal; typedef make_expr make_unary_plus; typedef make_expr make_negate; @@ -578,12 +581,26 @@ namespace boost { namespace proto typedef make_expr make_function; struct flatten; + struct make_pair; + struct first; + struct second; + struct at; struct pop_front; + struct push_front; + struct pop_back; + struct push_back; struct reverse; } typedef functional::flatten _flatten; + typedef functional::make_pair _make_pair; + typedef functional::first _first; + typedef functional::second _second; + typedef functional::pop_front _at; typedef functional::pop_front _pop_front; + typedef functional::push_front _push_front; + typedef functional::pop_back _pop_back; + typedef functional::push_back _push_back; typedef functional::reverse _reverse; typedef functional::eval _eval; struct _deep_copy; @@ -638,10 +655,10 @@ namespace boost { namespace proto struct is_callable; template - struct is_aggregate; + struct is_transform; template - struct is_transform; + struct is_aggregate; #define BOOST_PROTO_UNEXPR() typedef int proto_is_expr_; #define BOOST_PROTO_CALLABLE() typedef void proto_is_callable_; @@ -653,7 +670,9 @@ namespace boost { namespace proto BOOST_PROTO_CALLABLE() }; - template + struct external_transform; + + template struct transform; template @@ -733,7 +752,7 @@ namespace boost { namespace proto //namespace exops //{} - namespace exops = exprns_; + namespace exops = exprns_; }} // namespace boost::proto diff --git a/3party/boost/boost/proto/traits.hpp b/3party/boost/boost/proto/traits.hpp index f2dffadc16..007df45685 100644 --- a/3party/boost/boost/proto/traits.hpp +++ b/3party/boost/boost/proto/traits.hpp @@ -66,6 +66,7 @@ struct is_callable_ : is_callable2_ {}; + } /// \brief Boolean metafunction which detects whether a type is @@ -107,6 +108,13 @@ : mpl::false_ {}; + /// INTERNAL ONLY + /// + template + struct is_callable > + : mpl::false_ + {}; + #if BOOST_WORKAROUND(__GNUC__, == 3) || (__GNUC__ == 4 && __GNUC_MINOR__ == 0) // work around GCC bug template @@ -121,6 +129,31 @@ {}; #endif + /// \brief Boolean metafunction which detects whether a type is + /// a PrimitiveTransform type or not. + /// + /// is_transform\<\> is used by the call\<\> transform + /// to determine whether the function types R(), R(A1), + /// and R(A1, A2) should be passed the expression, state and data + /// parameters (as needed). + /// + /// Unless specialized for a type \c T, is_transform\::value + /// is computed as follows: + /// + /// \li If \c T has a nested type \c proto_is_transform_ that is a typedef + /// for \c void, is_transform\::value is \c true. (Note: this is + /// the case for any type that derives from an instantiation of \c proto::transform.) + /// \li Otherwise, is_transform\::value is \c false. + template + struct is_transform + : mpl::false_ + {}; + + template + struct is_transform + : mpl::true_ + {}; + /// \brief A Boolean metafunction that indicates whether a type requires /// aggregate initialization. /// @@ -153,17 +186,6 @@ : mpl::true_ {}; - /// TODO document me! - template - struct is_transform - : mpl::false_ - {}; - - template - struct is_transform - : mpl::true_ - {}; - /// \brief A Boolean metafunction that indicates whether a given /// type \c T is a Proto expression type. /// diff --git a/3party/boost/boost/proto/transform/call.hpp b/3party/boost/boost/proto/transform/call.hpp index a12aeb4780..12ac4548eb 100644 --- a/3party/boost/boost/proto/transform/call.hpp +++ b/3party/boost/boost/proto/transform/call.hpp @@ -91,7 +91,7 @@ struct impl2 : transform_impl { - typedef typename boost::tr1_result_of::type result_type; + typedef typename BOOST_PROTO_RESULT_OF::type result_type; result_type operator()( typename impl2::expr_param diff --git a/3party/boost/boost/proto/transform/default.hpp b/3party/boost/boost/proto/transform/default.hpp index 3266d68749..ec4a61ff2b 100644 --- a/3party/boost/boost/proto/transform/default.hpp +++ b/3party/boost/boost/proto/transform/default.hpp @@ -81,7 +81,7 @@ \ template \ struct default_case \ - : when, BOOST_PP_CAT(default_, TAG) > \ + : when, BOOST_PP_CAT(default_, TAG) > \ {}; \ /**/ @@ -480,7 +480,7 @@ function_type; typedef - typename boost::tr1_result_of::type + typename BOOST_PROTO_RESULT_OF::type result_type; result_type operator ()( @@ -613,7 +613,7 @@ function_type; typedef - typename boost::tr1_result_of< + typename BOOST_PROTO_RESULT_OF< function_type(BOOST_PP_ENUM_SHIFTED_PARAMS(N, r)) >::type result_type; diff --git a/3party/boost/boost/proto/transform/fold.hpp b/3party/boost/boost/proto/transform/fold.hpp index 2e3bd0ba56..b459bc6e61 100644 --- a/3party/boost/boost/proto/transform/fold.hpp +++ b/3party/boost/boost/proto/transform/fold.hpp @@ -19,6 +19,7 @@ #include #include #include + #include #include #include #include diff --git a/3party/boost/boost/proto/transform/fold_tree.hpp b/3party/boost/boost/proto/transform/fold_tree.hpp index 6b058a58d0..ace2c21693 100644 --- a/3party/boost/boost/proto/transform/fold_tree.hpp +++ b/3party/boost/boost/proto/transform/fold_tree.hpp @@ -176,6 +176,7 @@ namespace boost { namespace proto struct is_callable > : mpl::true_ {}; + }} #endif diff --git a/3party/boost/boost/proto/transform/make.hpp b/3party/boost/boost/proto/transform/make.hpp index c37c0d4166..964886c39d 100644 --- a/3party/boost/boost/proto/transform/make.hpp +++ b/3party/boost/boost/proto/transform/make.hpp @@ -22,6 +22,7 @@ #include #include #include + #include #include #include #include @@ -37,11 +38,10 @@ { namespace detail { - template - struct typelist - { - typedef void type; - }; + template + struct is_applyable + : mpl::and_, is_transform > + {}; template::value> struct nested_type @@ -55,39 +55,54 @@ typedef T type; }; - template + template struct nested_type_if + { + typedef T type; + static bool const applied = false; + }; + + template + struct nested_type_if : nested_type - {}; + { + static bool const applied = true; + }; - template::value - > - struct make_if_; - - template::value) > struct make_ { typedef R type; - typedef void not_applied_; + static bool const applied = false; }; - template - struct make_if_ + template< + typename R + , typename Expr, typename State, typename Data + , bool IsApplyable = is_applyable::value + > + struct make_if_ : make_ {}; + template + struct make_if_ + : uncvref::template impl::result_type> + { + static bool const applied = true; + }; + #if BOOST_WORKAROUND(__GNUC__, == 3) || (__GNUC__ == 4 && __GNUC_MINOR__ == 0) // work around GCC bug template struct make_if_, Expr, State, Data, false> { typedef proto::expr type; - typedef void not_applied_; + static bool const applied = false; }; // work around GCC bug @@ -95,16 +110,10 @@ struct make_if_, Expr, State, Data, false> { typedef proto::basic_expr type; - typedef void not_applied_; + static bool const applied = false; }; #endif - // TODO could optimize this if R is a transform - template - struct make_if_ - : uncvref::result_type> - {}; - template::value> struct construct_ { @@ -272,6 +281,7 @@ struct is_callable > : mpl::true_ {}; + }} #endif @@ -283,34 +293,21 @@ namespace detail { #if N > 0 - template - struct nested_type_if< - T - , typelist - , typename typelist< - BOOST_PP_ENUM_BINARY_PARAMS(N, typename A, ::not_applied_ BOOST_PP_INTERCEPT) - >::type - > - { - typedef T type; - typedef void not_applied_; - }; - #define TMP0(Z, M, DATA) make_if_ #define TMP1(Z, M, DATA) typename TMP0(Z, M, DATA) ::type + #define TMP2(Z, M, DATA) TMP0(Z, M, DATA) ::applied || template< template class R BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A) , typename Expr, typename State, typename Data > - struct make_, Expr, State, Data + struct make_< + R + , Expr, State, Data BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(N) > - : nested_type_if< - R - , typelist - > + : nested_type_if, (BOOST_PP_REPEAT(N, TMP2, ~) false)> {}; template< @@ -318,46 +315,30 @@ BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A) , typename Expr, typename State, typename Data > - struct make_ >, Expr, State, Data - BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(N) + struct make_< + noinvoke > + , Expr, State, Data + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(1) > { typedef R type; + static bool const applied = true; }; #undef TMP0 #undef TMP1 + #undef TMP2 #endif - template< - typename R - BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A) - , typename Expr, typename State, typename Data - > - struct make_if_ - { - typedef - typename uncvref< - typename when<_, R(BOOST_PP_ENUM_PARAMS(N, A))> - ::template impl::result_type - >::type - type; - }; + template + struct is_applyable + : mpl::true_ + {}; - template< - typename R - BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A) - , typename Expr, typename State, typename Data - > - struct make_if_ - { - typedef - typename uncvref< - typename when<_, R(BOOST_PP_ENUM_PARAMS(N, A))> - ::template impl::result_type - >::type - type; - }; + template + struct is_applyable + : mpl::true_ + {}; template struct construct_, true> @@ -397,7 +378,6 @@ { /// \brief boost::result_of\(Expr, State, Data)\>::type typedef typename detail::make_if_::type result_type; - //typedef typename detail::make_::type result_type; /// Let \c ax be when\<_, Ax\>()(e, s, d) /// for each \c x in [0,N]. @@ -419,7 +399,7 @@ #define TMP(Z, M, DATA) \ detail::as_lvalue( \ typename when<_, BOOST_PP_CAT(A, M)> \ - ::template impl()(e, s, d) \ + ::template impl()(e, s, d) \ ) BOOST_PP_ENUM(N, TMP, DATA) #undef TMP @@ -449,7 +429,7 @@ #define TMP(Z, M, DATA) \ detail::as_lvalue( \ typename when<_, BOOST_PP_CAT(A, M)> \ - ::template impl()(e, s, d) \ + ::template impl()(e, s, d) \ ) BOOST_PP_ENUM(N, TMP, DATA) #undef TMP diff --git a/3party/boost/boost/proto/transform/pass_through.hpp b/3party/boost/boost/proto/transform/pass_through.hpp index 5a1e269ae4..1ce3a21b36 100644 --- a/3party/boost/boost/proto/transform/pass_through.hpp +++ b/3party/boost/boost/proto/transform/pass_through.hpp @@ -178,7 +178,7 @@ expr_type; typedef typename unref_expr::proto_generator proto_generator; - typedef typename boost::tr1_result_of::type result_type; + typedef typename BOOST_PROTO_RESULT_OF::type result_type; result_type const operator ()( typename pass_through_impl::expr_param e diff --git a/3party/boost/boost/proto/transform/when.hpp b/3party/boost/boost/proto/transform/when.hpp index 24239b4c36..fc776caaf5 100644 --- a/3party/boost/boost/proto/transform/when.hpp +++ b/3party/boost/boost/proto/transform/when.hpp @@ -14,7 +14,9 @@ #include #include #include + #include #include + #include #include #include #include @@ -55,6 +57,8 @@ struct when : PrimitiveTransform { + typedef Grammar first; + typedef PrimitiveTransform second; typedef typename Grammar::proto_grammar proto_grammar; }; @@ -97,9 +101,98 @@ : when<_, Fun> {}; + /// \brief This specialization uses the Data parameter as a collection + /// of transforms that can be indexed by the specified rule. + /// + /// Use when\ in your code when you would like + /// to define a grammar once and use it to evaluate expressions with + /// many different sets of transforms. The transforms are found by + /// using the Data parameter as a map from rules to transforms. + /// + /// See \c action_map for an example. + template + struct when + : proto::transform > + { + typedef Grammar first; + typedef external_transform second; + typedef typename Grammar::proto_grammar proto_grammar; + + template + struct impl + : Data::template when::template impl + {}; + + template + struct impl + : Data::template when::template impl + {}; + }; + + /// \brief For defining a map of Rule/Transform pairs for use with + /// when\ to make transforms external to the grammar + /// + /// The following code defines a grammar with a couple of external transforms. + /// It also defines an action_map that maps from rules to transforms. It then + /// passes that transforms map at the Data parameter to the grammar. In this way, + /// the behavior of the grammar can be modified post-hoc by passing a different + /// action_map. + /// + /// \code + /// struct int_terminal + /// : proto::terminal + /// {}; + /// + /// struct char_terminal + /// : proto::terminal + /// {}; + /// + /// struct my_grammar + /// : proto::or_< + /// proto::when< int_terminal, proto::external_transform > + /// , proto::when< char_terminal, proto::external_transform > + /// , proto::when< + /// proto::plus< my_grammar, my_grammar > + /// , proto::fold< _, int(), my_grammar > + /// > + /// > + /// {}; + /// + /// struct my_transforms + /// : proto::external_transforms< + /// proto::when + /// , proto::when + /// > + /// {}; + /// + /// proto::literal i(1); + /// proto::literal c('a'); + /// my_transforms trx; + /// + /// // Evaluate "i+c" using my_grammar with the specified transforms: + /// my_grammar()(i + c, 0, trx); + /// \endcode + template + struct external_transforms + { + typedef mpl::map map_type; + + template + struct when + : proto::when<_, typename mpl::at::type> + {}; + }; + #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PROTO_MAX_ARITY, )) #include BOOST_PP_ITERATE() + /// INTERNAL ONLY + /// + template + struct is_callable > + : mpl::true_ + {}; + }} // namespace boost::proto #endif @@ -138,6 +231,8 @@ struct when : transform > { + typedef Grammar first; + typedef R second(BOOST_PP_ENUM_PARAMS(N, A)); typedef typename Grammar::proto_grammar proto_grammar; // Note: do not evaluate is_callable in this scope. diff --git a/3party/boost/boost/python/converter/builtin_converters.hpp b/3party/boost/boost/python/converter/builtin_converters.hpp index 978f4f1f23..c2e01c03d3 100644 --- a/3party/boost/boost/python/converter/builtin_converters.hpp +++ b/3party/boost/boost/python/converter/builtin_converters.hpp @@ -122,7 +122,7 @@ BOOST_PYTHON_TO_INT(short) BOOST_PYTHON_TO_INT(int) BOOST_PYTHON_TO_INT(long) -# if defined(_MSC_VER) && defined(_WIN64) +# if defined(_MSC_VER) && defined(_WIN64) && PY_VERSION_HEX < 0x03000000 /* Under 64-bit Windows std::size_t is "unsigned long long". To avoid getting a Python long for each std::size_t the value is checked before the conversion. A std::size_t is converted to a simple Python int diff --git a/3party/boost/boost/python/module_init.hpp b/3party/boost/boost/python/module_init.hpp index e06aa7940b..54d87e4b41 100644 --- a/3party/boost/boost/python/module_init.hpp +++ b/3party/boost/boost/python/module_init.hpp @@ -13,27 +13,54 @@ namespace boost { namespace python { namespace detail { +# if PY_VERSION_HEX >= 0x03000000 + +BOOST_PYTHON_DECL PyObject* init_module(PyModuleDef&, void(*)()); + +#else + BOOST_PYTHON_DECL PyObject* init_module(char const* name, void(*)()); +#endif + }}} # if PY_VERSION_HEX >= 0x03000000 -# define _BOOST_PYTHON_MODULE_INIT(name) \ - PyObject* BOOST_PP_CAT (PyInit_,name)() \ -{ \ - return boost::python::detail::init_module( \ - BOOST_PP_STRINGIZE(name),&BOOST_PP_CAT(init_module_,name)); \ -} \ - void BOOST_PP_CAT(init_module_,name)() +# define _BOOST_PYTHON_MODULE_INIT(name) \ + PyObject* BOOST_PP_CAT(PyInit_, name)() \ + { \ + static PyModuleDef_Base initial_m_base = { \ + PyObject_HEAD_INIT(NULL) \ + 0, /* m_init */ \ + 0, /* m_index */ \ + 0 /* m_copy */ }; \ + static PyMethodDef initial_methods[] = { { 0, 0, 0, 0 } }; \ + \ + static struct PyModuleDef moduledef = { \ + initial_m_base, \ + BOOST_PP_STRINGIZE(name), \ + 0, /* m_doc */ \ + -1, /* m_size */ \ + initial_methods, \ + 0, /* m_reload */ \ + 0, /* m_traverse */ \ + 0, /* m_clear */ \ + 0, /* m_free */ \ + }; \ + \ + return boost::python::detail::init_module( \ + moduledef, BOOST_PP_CAT(init_module_, name) ); \ + } \ + void BOOST_PP_CAT(init_module_, name)() # else # define _BOOST_PYTHON_MODULE_INIT(name) \ - void BOOST_PP_CAT(init,name)() \ + void BOOST_PP_CAT(init,name)() \ { \ boost::python::detail::init_module( \ - BOOST_PP_STRINGIZE(name),&BOOST_PP_CAT(init_module_,name)); \ + BOOST_PP_STRINGIZE(name),&BOOST_PP_CAT(init_module_,name)); \ } \ void BOOST_PP_CAT(init_module_,name)() @@ -42,23 +69,23 @@ BOOST_PYTHON_DECL PyObject* init_module(char const* name, void(*)()); # if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(BOOST_PYTHON_STATIC_MODULE) # define BOOST_PYTHON_MODULE_INIT(name) \ - void BOOST_PP_CAT(init_module_,name)(); \ + void BOOST_PP_CAT(init_module_,name)(); \ extern "C" __declspec(dllexport) _BOOST_PYTHON_MODULE_INIT(name) # elif BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY # define BOOST_PYTHON_MODULE_INIT(name) \ - void BOOST_PP_CAT(init_module_,name)(); \ + void BOOST_PP_CAT(init_module_,name)(); \ extern "C" __attribute__ ((visibility("default"))) _BOOST_PYTHON_MODULE_INIT(name) # else # define BOOST_PYTHON_MODULE_INIT(name) \ - void BOOST_PP_CAT(init_module_,name)(); \ + void BOOST_PP_CAT(init_module_,name)(); \ extern "C" _BOOST_PYTHON_MODULE_INIT(name) # endif -# endif +# endif #endif // MODULE_INIT_DWA20020722_HPP diff --git a/3party/boost/boost/range/adaptor/adjacent_filtered.hpp b/3party/boost/boost/range/adaptor/adjacent_filtered.hpp index f63a599768..edc1dff172 100644 --- a/3party/boost/boost/range/adaptor/adjacent_filtered.hpp +++ b/3party/boost/boost/range/adaptor/adjacent_filtered.hpp @@ -116,7 +116,7 @@ namespace boost }; template< class P, class R, bool default_pass > - struct adjacent_filter_range + struct adjacent_filtered_range : iterator_range< skip_iterator< BOOST_DEDUCED_TYPENAME range_iterator::type, P, @@ -138,7 +138,7 @@ namespace boost typedef BOOST_DEDUCED_TYPENAME range_iterator::type raw_iterator; public: - adjacent_filter_range( const P& p, R& r ) + adjacent_filtered_range( const P& p, R& r ) : base_range(skip_iter(boost::begin(r), boost::end(r), p), skip_iter(boost::end(r), boost::end(r), p)) { @@ -164,37 +164,37 @@ namespace boost }; template< class ForwardRng, class BinPredicate > - inline adjacent_filter_range + inline adjacent_filtered_range operator|( ForwardRng& r, const adjacent_holder& f ) { - return adjacent_filter_range( f.val, r ); + return adjacent_filtered_range( f.val, r ); } template< class ForwardRng, class BinPredicate > - inline adjacent_filter_range + inline adjacent_filtered_range operator|( const ForwardRng& r, const adjacent_holder& f ) { - return adjacent_filter_range( f.val, r ); + return adjacent_filtered_range( f.val, r ); } template< class ForwardRng, class BinPredicate > - inline adjacent_filter_range + inline adjacent_filtered_range operator|( ForwardRng& r, const adjacent_excl_holder& f ) { - return adjacent_filter_range( f.val, r ); + return adjacent_filtered_range( f.val, r ); } template< class ForwardRng, class BinPredicate > - inline adjacent_filter_range + inline adjacent_filtered_range operator|( const ForwardRng& r, const adjacent_excl_holder& f ) { - return adjacent_filter_range( f.val, r ); + return adjacent_filtered_range( f.val, r ); } } // 'range_detail' @@ -202,7 +202,7 @@ namespace boost // Bring adjacent_filter_range into the boost namespace so that users of // this library may specify the return type of the '|' operator and // adjacent_filter() - using range_detail::adjacent_filter_range; + using range_detail::adjacent_filtered_range; namespace adaptors { @@ -218,17 +218,17 @@ namespace boost } template - inline adjacent_filter_range + inline adjacent_filtered_range adjacent_filter(ForwardRng& rng, BinPredicate filter_pred) { - return adjacent_filter_range(filter_pred, rng); + return adjacent_filtered_range(filter_pred, rng); } template - inline adjacent_filter_range + inline adjacent_filtered_range adjacent_filter(const ForwardRng& rng, BinPredicate filter_pred) { - return adjacent_filter_range(filter_pred, rng); + return adjacent_filtered_range(filter_pred, rng); } } // 'adaptors' diff --git a/3party/boost/boost/range/adaptor/define_adaptor.hpp b/3party/boost/boost/range/adaptor/define_adaptor.hpp index d68c64e175..26f401654a 100644 --- a/3party/boost/boost/range/adaptor/define_adaptor.hpp +++ b/3party/boost/boost/range/adaptor/define_adaptor.hpp @@ -1,3 +1,13 @@ +// Boost.Range library +// +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + #ifndef BOOST_RANGE_DEFINE_ADAPTOR_HPP_INCLUDED #define BOOST_RANGE_DEFINE_ADAPTOR_HPP_INCLUDED diff --git a/3party/boost/boost/range/adaptor/filtered.hpp b/3party/boost/boost/range/adaptor/filtered.hpp index 62888e7627..d9315bd221 100755 --- a/3party/boost/boost/range/adaptor/filtered.hpp +++ b/3party/boost/boost/range/adaptor/filtered.hpp @@ -20,7 +20,7 @@ namespace boost namespace range_detail { template< class P, class R > - struct filter_range : + struct filtered_range : boost::iterator_range< boost::filter_iterator< P, BOOST_DEDUCED_TYPENAME range_iterator::type @@ -34,7 +34,7 @@ namespace boost > > base; public: - filter_range( P p, R& r ) + filtered_range( P p, R& r ) : base( make_filter_iterator( p, boost::begin(r), boost::end(r) ), make_filter_iterator( p, boost::end(r), boost::end(r) ) ) { } @@ -48,19 +48,19 @@ namespace boost }; template< class InputRng, class Predicate > - inline filter_range + inline filtered_range operator|( InputRng& r, const filter_holder& f ) { - return filter_range( f.val, r ); + return filtered_range( f.val, r ); } template< class InputRng, class Predicate > - inline filter_range + inline filtered_range operator|( const InputRng& r, const filter_holder& f ) { - return filter_range( f.val, r ); + return filtered_range( f.val, r ); } } // 'range_detail' @@ -70,7 +70,7 @@ namespace boost // argument dependent lookup. // filter_range logically needs to be in the boost namespace to allow user of // the library to define the return type for filter() - using range_detail::filter_range; + using range_detail::filtered_range; namespace adaptors { @@ -82,17 +82,17 @@ namespace boost } template - inline filter_range + inline filtered_range filter(InputRange& rng, Predicate filter_pred) { - return range_detail::filter_range( filter_pred, rng ); + return range_detail::filtered_range( filter_pred, rng ); } template - inline filter_range + inline filtered_range filter(const InputRange& rng, Predicate filter_pred) { - return range_detail::filter_range( filter_pred, rng ); + return range_detail::filtered_range( filter_pred, rng ); } } // 'adaptors' diff --git a/3party/boost/boost/range/adaptor/indirected.hpp b/3party/boost/boost/range/adaptor/indirected.hpp index 4abb3ec9bf..d7edc18f27 100644 --- a/3party/boost/boost/range/adaptor/indirected.hpp +++ b/3party/boost/boost/range/adaptor/indirected.hpp @@ -19,7 +19,7 @@ namespace boost namespace range_detail { template< class R > - struct indirect_range : + struct indirected_range : public boost::iterator_range< boost::indirect_iterator< BOOST_DEDUCED_TYPENAME range_iterator::type @@ -35,7 +35,7 @@ namespace boost base; public: - explicit indirect_range( R& r ) + explicit indirected_range( R& r ) : base( r ) { } }; @@ -43,22 +43,22 @@ namespace boost struct indirect_forwarder {}; template< class InputRng > - inline indirect_range + inline indirected_range operator|( InputRng& r, indirect_forwarder ) { - return indirect_range( r ); + return indirected_range( r ); } template< class InputRng > - inline indirect_range + inline indirected_range operator|( const InputRng& r, indirect_forwarder ) { - return indirect_range( r ); + return indirected_range( r ); } } // 'range_detail' - using range_detail::indirect_range; + using range_detail::indirected_range; namespace adaptors { @@ -69,17 +69,17 @@ namespace boost } template - inline indirect_range + inline indirected_range indirect(InputRange& rng) { - return indirect_range(rng); + return indirected_range(rng); } template - inline indirect_range + inline indirected_range indirect(const InputRange& rng) { - return indirect_range(rng); + return indirected_range(rng); } } // 'adaptors' diff --git a/3party/boost/boost/range/adaptor/map.hpp b/3party/boost/boost/range/adaptor/map.hpp index 6d08ea72ce..ff8b97ec05 100755 --- a/3party/boost/boost/range/adaptor/map.hpp +++ b/3party/boost/boost/range/adaptor/map.hpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace boost { @@ -25,11 +26,10 @@ namespace boost template< class Map > struct select_first { - typedef BOOST_DEDUCED_TYPENAME range_value::type pair_t; - typedef const BOOST_DEDUCED_TYPENAME pair_t::first_type& - result_type; + typedef BOOST_DEDUCED_TYPENAME range_reference::type argument_type; + typedef const BOOST_DEDUCED_TYPENAME range_value::type::first_type& result_type; - result_type operator()( const pair_t& r ) const + result_type operator()( argument_type r ) const { return r.first; } @@ -38,10 +38,10 @@ namespace boost template< class Map > struct select_second_mutable { - typedef BOOST_DEDUCED_TYPENAME range_value::type pair_t; - typedef BOOST_DEDUCED_TYPENAME pair_t::second_type& result_type; + typedef BOOST_DEDUCED_TYPENAME range_reference::type argument_type; + typedef BOOST_DEDUCED_TYPENAME range_value::type::second_type& result_type; - result_type operator()( pair_t& r ) const + result_type operator()( argument_type r ) const { return r.second; } @@ -50,11 +50,10 @@ namespace boost template< class Map > struct select_second_const { - typedef BOOST_DEDUCED_TYPENAME range_value::type pair_t; - typedef const BOOST_DEDUCED_TYPENAME pair_t::second_type& - result_type; + typedef BOOST_DEDUCED_TYPENAME range_reference::type argument_type; + typedef const BOOST_DEDUCED_TYPENAME range_value::type::second_type& result_type; - result_type operator()( const pair_t& r ) const + result_type operator()( argument_type r ) const { return r.second; } @@ -62,11 +61,11 @@ namespace boost template class select_first_range - : public transform_range< + : public transformed_range< select_first, const StdPairRng> { - typedef transform_range, const StdPairRng> base; + typedef transformed_range, const StdPairRng> base; public: typedef select_first transform_fn_type; typedef const StdPairRng source_range_type; @@ -81,11 +80,11 @@ namespace boost template class select_second_mutable_range - : public transform_range< + : public transformed_range< select_second_mutable, StdPairRng> { - typedef transform_range, StdPairRng> base; + typedef transformed_range, StdPairRng> base; public: typedef select_second_mutable transform_fn_type; typedef StdPairRng source_range_type; @@ -100,11 +99,11 @@ namespace boost template class select_second_const_range - : public transform_range< + : public transformed_range< select_second_const, const StdPairRng> { - typedef transform_range, const StdPairRng> base; + typedef transformed_range, const StdPairRng> base; public: typedef select_second_const transform_fn_type; typedef const StdPairRng source_range_type; @@ -122,7 +121,7 @@ namespace boost operator|( const StdPairRng& r, map_keys_forwarder ) { return operator|( r, - boost::adaptors::transformed( select_first() ) ); + boost::adaptors::transformed( select_first() ) ); } template< class StdPairRng > @@ -130,7 +129,7 @@ namespace boost operator|( StdPairRng& r, map_values_forwarder ) { return operator|( r, - boost::adaptors::transformed( select_second_mutable() ) ); + boost::adaptors::transformed( select_second_mutable() ) ); } template< class StdPairRng > @@ -138,7 +137,7 @@ namespace boost operator|( const StdPairRng& r, map_values_forwarder ) { return operator|( r, - boost::adaptors::transformed( select_second_const() ) ); + boost::adaptors::transformed( select_second_const() ) ); } } // 'range_detail' diff --git a/3party/boost/boost/range/adaptor/replaced_if.hpp b/3party/boost/boost/range/adaptor/replaced_if.hpp index 9353abddfd..b514354fd1 100644 --- a/3party/boost/boost/range/adaptor/replaced_if.hpp +++ b/3party/boost/boost/range/adaptor/replaced_if.hpp @@ -47,7 +47,7 @@ namespace boost }; template< class Pred, class R > - class replace_if_range : + class replaced_if_range : public boost::iterator_range< boost::transform_iterator< replace_value_if< Pred, BOOST_DEDUCED_TYPENAME range_value::type >, @@ -64,7 +64,7 @@ namespace boost public: typedef BOOST_DEDUCED_TYPENAME range_value::type value_type; - replace_if_range( R& r, const Pred& pred, value_type to ) + replaced_if_range( R& r, const Pred& pred, value_type to ) : base_t( make_transform_iterator( boost::begin(r), Fn(pred, to) ), make_transform_iterator( boost::end(r), Fn(pred, to) ) ) { } @@ -87,23 +87,23 @@ namespace boost }; template< class Pred, class InputRng > - inline replace_if_range + inline replaced_if_range operator|( InputRng& r, const replace_if_holder::type>& f ) { - return replace_if_range(r, f.pred(), f.to()); + return replaced_if_range(r, f.pred(), f.to()); } template< class Pred, class InputRng > - inline replace_if_range + inline replaced_if_range operator|( const InputRng& r, const replace_if_holder::type>& f ) { - return replace_if_range(r, f.pred(), f.to()); + return replaced_if_range(r, f.pred(), f.to()); } } // 'range_detail' - using range_detail::replace_if_range; + using range_detail::replaced_if_range; namespace adaptors { @@ -115,19 +115,19 @@ namespace boost } template - inline replace_if_range + inline replaced_if_range replace_if(InputRange& rng, Pred pred, BOOST_DEDUCED_TYPENAME range_value::type to) { - return range_detail::replace_if_range(rng, pred, to); + return range_detail::replaced_if_range(rng, pred, to); } template - inline replace_if_range + inline replaced_if_range replace_if(const InputRange& rng, Pred pred, BOOST_DEDUCED_TYPENAME range_value::type to) { - return range_detail::replace_if_range(rng, pred, to); + return range_detail::replaced_if_range(rng, pred, to); } } // 'adaptors' diff --git a/3party/boost/boost/range/adaptor/reversed.hpp b/3party/boost/boost/range/adaptor/reversed.hpp index 229702b136..c85eda8697 100755 --- a/3party/boost/boost/range/adaptor/reversed.hpp +++ b/3party/boost/boost/range/adaptor/reversed.hpp @@ -19,7 +19,7 @@ namespace boost namespace range_detail { template< class R > - struct reverse_range : + struct reversed_range : public boost::iterator_range< boost::reverse_iterator< BOOST_DEDUCED_TYPENAME range_iterator::type @@ -37,7 +37,7 @@ namespace boost public: typedef boost::reverse_iterator::type> iterator; - reverse_range( R& r ) + explicit reversed_range( R& r ) : base( iterator(boost::end(r)), iterator(boost::begin(r)) ) { } }; @@ -45,22 +45,22 @@ namespace boost struct reverse_forwarder {}; template< class BidirectionalRng > - inline reverse_range + inline reversed_range operator|( BidirectionalRng& r, reverse_forwarder ) { - return reverse_range( r ); + return reversed_range( r ); } template< class BidirectionalRng > - inline reverse_range + inline reversed_range operator|( const BidirectionalRng& r, reverse_forwarder ) { - return reverse_range( r ); + return reversed_range( r ); } } // 'range_detail' - using range_detail::reverse_range; + using range_detail::reversed_range; namespace adaptors { @@ -71,17 +71,17 @@ namespace boost } template - inline reverse_range + inline reversed_range reverse(BidirectionalRange& rng) { - return reverse_range(rng); + return reversed_range(rng); } template - inline reverse_range + inline reversed_range reverse(const BidirectionalRange& rng) { - return reverse_range(rng); + return reversed_range(rng); } } // 'adaptors' diff --git a/3party/boost/boost/range/adaptor/sliced.hpp b/3party/boost/boost/range/adaptor/sliced.hpp index 03c6894214..14ad98672a 100755 --- a/3party/boost/boost/range/adaptor/sliced.hpp +++ b/3party/boost/boost/range/adaptor/sliced.hpp @@ -27,55 +27,56 @@ namespace boost std::size_t u; }; - template< class RandomAccessRange > - class sliced_range : public boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > - { - typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > base_t; - public: - template - sliced_range(Rng& rng, T t, U u) - : base_t(boost::make_iterator_range(rng, t, u - boost::size(rng))) - { - } - }; + template< class RandomAccessRange > + class sliced_range : public boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + { + typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > base_t; + public: + template + sliced_range(Rng& rng, T t, U u) + : base_t(boost::make_iterator_range(rng, t, u - boost::size(rng))) + { + } + }; - template< class RandomAccessRange > - inline sliced_range - slice( RandomAccessRange& rng, std::size_t t, std::size_t u ) - { - BOOST_ASSERT( t <= u && "error in slice indices" ); + template< class RandomAccessRange > + inline sliced_range + slice( RandomAccessRange& rng, std::size_t t, std::size_t u ) + { + BOOST_ASSERT( t <= u && "error in slice indices" ); BOOST_ASSERT( static_cast(boost::size(rng)) >= u && - "second slice index out of bounds" ); + "second slice index out of bounds" ); - return sliced_range(rng, t, u); - } + return sliced_range(rng, t, u); + } - template< class RandomAccessRange > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > - slice( const RandomAccessRange& rng, std::size_t t, std::size_t u ) - { - BOOST_ASSERT( t <= u && "error in slice indices" ); - BOOST_ASSERT( static_cast(boost::size(rng)) >= u && - "second slice index out of bounds" ); + template< class RandomAccessRange > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + slice( const RandomAccessRange& rng, std::size_t t, std::size_t u ) + { + BOOST_ASSERT( t <= u && "error in slice indices" ); + BOOST_ASSERT( static_cast(boost::size(rng)) >= u && + "second slice index out of bounds" ); return sliced_range(rng, t, u); - } + } - template< class RandomAccessRange > - inline sliced_range - operator|( RandomAccessRange& r, const sliced& f ) - { - return sliced_range( r, f.t, f.u ); - } + template< class RandomAccessRange > + inline sliced_range + operator|( RandomAccessRange& r, const sliced& f ) + { + return sliced_range( r, f.t, f.u ); + } - template< class RandomAccessRange > - inline sliced_range - operator|( const RandomAccessRange& r, const sliced& f ) - { - return sliced_range( r, f.t, f.u ); - } + template< class RandomAccessRange > + inline sliced_range + operator|( const RandomAccessRange& r, const sliced& f ) + { + return sliced_range( r, f.t, f.u ); + } } // namespace adaptors + using adaptors::sliced_range; } // namespace boost #endif diff --git a/3party/boost/boost/range/adaptor/strided.hpp b/3party/boost/boost/range/adaptor/strided.hpp index 5f4c4fa19c..abfad5e624 100755 --- a/3party/boost/boost/range/adaptor/strided.hpp +++ b/3party/boost/boost/range/adaptor/strided.hpp @@ -20,78 +20,282 @@ namespace boost { namespace range_detail { - - template + // strided_iterator for wrapping a forward traversal iterator + template class strided_iterator : public iterator_adaptor< - strided_iterator, - BaseIterator> + strided_iterator + , BaseIterator + , use_default + , boost::forward_traversal_tag + > { - friend class iterator_core_access; + friend class ::boost::iterator_core_access; + + typedef iterator_adaptor< + strided_iterator + , BaseIterator + , use_default + , boost::forward_traversal_tag + > super_t; - typedef iterator_adaptor, BaseIterator> super_t; - public: - typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::difference_type difference_type; - - strided_iterator() : m_stride() { } - - strided_iterator(const strided_iterator& other) - : super_t(other), m_stride(other.m_stride) { } - - explicit strided_iterator(BaseIterator base_it, difference_type stride) - : super_t(base_it), m_stride(stride) { } - - strided_iterator& - operator=(const strided_iterator& other) + typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::difference_type difference_type; + typedef BaseIterator base_iterator; + + strided_iterator() + : m_last() + , m_stride() { - super_t::operator=(other); - - // Is the interoperation of the stride safe? - m_stride = other.m_stride; - return *this; - } - - void increment() { std::advance(this->base_reference(), m_stride); } - - void decrement() { std::advance(this->base_reference(), -m_stride); } - - void advance(difference_type n) { std::advance(this->base_reference(), n * m_stride); } - - difference_type - distance_to(const strided_iterator& other) const - { - return std::distance(this->base_reference(), other.base_reference()) / m_stride; } - // Using the compiler generated copy constructor and - // and assignment operator - + strided_iterator(base_iterator first, base_iterator it, base_iterator last, difference_type stride) + : super_t(it) + , m_last(last) + , m_stride(stride) + { + } + + template + strided_iterator(const strided_iterator& other, + BOOST_DEDUCED_TYPENAME enable_if_convertible::type* = 0) + : super_t(other) + , m_last(other.base_end()) + , m_stride(other.get_stride()) + { + } + + base_iterator base_end() const { return m_last; } + difference_type get_stride() const { return m_stride; } + private: + void increment() + { + base_iterator& it = this->base_reference(); + for (difference_type i = 0; (it != m_last) && (i < m_stride); ++i) + ++it; + } + + base_iterator m_last; difference_type m_stride; }; - - template inline - strided_iterator - make_strided_iterator( - const BaseIterator& first, - BOOST_DEDUCED_TYPENAME std::iterator_traits::difference_type stride) + + // strided_iterator for wrapping a bidirectional iterator + template + class strided_iterator + : public iterator_adaptor< + strided_iterator + , BaseIterator + , use_default + , bidirectional_traversal_tag + > { - return strided_iterator(first, stride); + friend class ::boost::iterator_core_access; + + typedef iterator_adaptor< + strided_iterator + , BaseIterator + , use_default + , bidirectional_traversal_tag + > super_t; + public: + typedef BOOST_DEDUCED_TYPENAME std::iterator_traits::difference_type difference_type; + typedef BaseIterator base_iterator; + + strided_iterator() + : m_first() + , m_last() + , m_stride() + { + } + + strided_iterator(base_iterator first, base_iterator it, base_iterator last, difference_type stride) + : super_t(it) + , m_first(first) + , m_last(last) + , m_stride(stride) + { + } + + template + strided_iterator(const strided_iterator& other, + BOOST_DEDUCED_TYPENAME enable_if_convertible::type* = 0) + : super_t(other.base()) + , m_first(other.base_begin()) + , m_last(other.base_end()) + , m_stride(other.get_stride()) + { + } + + base_iterator base_begin() const { return m_first; } + base_iterator base_end() const { return m_last; } + difference_type get_stride() const { return m_stride; } + + private: + void increment() + { + base_iterator& it = this->base_reference(); + for (difference_type i = 0; (it != m_last) && (i < m_stride); ++i) + ++it; + } + + void decrement() + { + base_iterator& it = this->base_reference(); + for (difference_type i = 0; (it != m_first) && (i < m_stride); ++i) + --it; + } + + base_iterator m_first; + base_iterator m_last; + difference_type m_stride; + }; + + // strided_iterator implementation for wrapping a random access iterator + template + class strided_iterator + : public iterator_adaptor< + strided_iterator + , BaseIterator + , use_default + , random_access_traversal_tag + > + { + friend class ::boost::iterator_core_access; + + typedef iterator_adaptor< + strided_iterator + , BaseIterator + , use_default + , random_access_traversal_tag + > super_t; + public: + typedef BOOST_DEDUCED_TYPENAME super_t::difference_type difference_type; + typedef BaseIterator base_iterator; + + strided_iterator() + : m_first() + , m_last() + , m_stride() + { + } + + strided_iterator(BaseIterator first, BaseIterator it, BaseIterator last, difference_type stride) + : super_t(it) + , m_first(first) + , m_last(last) + , m_stride(stride) + { + } + + template + strided_iterator(const strided_iterator& other, + BOOST_DEDUCED_TYPENAME enable_if_convertible::type* = 0) + : super_t(other.base()) + , m_first(other.base_begin()) + , m_last(other.base_end()) + , m_stride(other.get_stride()) + { + } + + base_iterator base_begin() const { return m_first; } + base_iterator base_end() const { return m_last; } + difference_type get_stride() const { return m_stride; } + + private: + void increment() + { + base_iterator& it = this->base_reference(); + if ((m_last - it) > m_stride) + it += m_stride; + else + it = m_last; + } + + void decrement() + { + base_iterator& it = this->base_reference(); + if ((it - m_first) > m_stride) + it -= m_stride; + else + it = m_first; + } + + void advance(difference_type offset) + { + base_iterator& it = this->base_reference(); + offset *= m_stride; + if (offset >= 0) + { + if ((m_last - it) > offset) + it += offset; + else + it = m_last; + } + else + { + if ((m_first - it) > offset) + it += offset; + else + it = m_first; + } + } + + template + difference_type distance_to(const strided_iterator& other, + BOOST_DEDUCED_TYPENAME enable_if_convertible::type* = 0) const + { + if (other.base() >= this->base()) + return (other.base() - this->base() + (m_stride - 1)) / m_stride; + return (other.base() - this->base() - (m_stride - 1)) / m_stride; + } + + bool equal(const strided_iterator& other) const + { + return other.base() == this->base(); + } + + private: + base_iterator m_first; + base_iterator m_last; + difference_type m_stride; + }; + + template inline + strided_iterator::type> + make_strided_iterator(BaseIterator first, BaseIterator it, + BaseIterator last, Difference stride) + { + BOOST_ASSERT( stride >= 0 ); + typedef BOOST_DEDUCED_TYPENAME iterator_traversal::type traversal_tag; + return strided_iterator(first, it, last, stride); } - template< class Rng > + template< class Rng + , class Category = BOOST_DEDUCED_TYPENAME iterator_traversal< + BOOST_DEDUCED_TYPENAME range_iterator::type + >::type + > class strided_range - : public iterator_range::type> > + : public iterator_range< + range_detail::strided_iterator< + BOOST_DEDUCED_TYPENAME range_iterator::type, + Category + > + > { - typedef range_detail::strided_iterator::type> iter_type; + typedef range_detail::strided_iterator< + BOOST_DEDUCED_TYPENAME range_iterator::type, + Category + > iter_type; typedef iterator_range super_t; public: - template< typename Difference > + template strided_range(Difference stride, Rng& rng) - : super_t(make_strided_iterator(boost::begin(rng), stride), - make_strided_iterator(boost::end(rng), stride)) + : super_t(make_strided_iterator(boost::begin(rng), boost::begin(rng), boost::end(rng), stride), + make_strided_iterator(boost::begin(rng), boost::end(rng), boost::end(rng), stride)) { + BOOST_ASSERT( stride >= 0 ); } }; @@ -99,7 +303,7 @@ namespace boost class strided_holder : public holder { public: - strided_holder(Difference value) : holder(value) {} + explicit strided_holder(Difference value) : holder(value) {} }; template @@ -117,32 +321,32 @@ namespace boost } } // namespace range_detail - + using range_detail::strided_range; namespace adaptors { - + namespace { const range_detail::forwarder strided = range_detail::forwarder(); } - + template inline strided_range stride(Range& rng, Difference step) { return strided_range(step, rng); } - + template inline strided_range stride(const Range& rng, Difference step) { return strided_range(step, rng); } - + } // namespace 'adaptors' } // namespace 'boost' diff --git a/3party/boost/boost/range/adaptor/tokenized.hpp b/3party/boost/boost/range/adaptor/tokenized.hpp index 6b6a6fa6de..8a7402a223 100755 --- a/3party/boost/boost/range/adaptor/tokenized.hpp +++ b/3party/boost/boost/range/adaptor/tokenized.hpp @@ -20,7 +20,7 @@ namespace boost { template< class R > - struct token_range : + struct tokenized_range : public boost::iterator_range< boost::regex_token_iterator< BOOST_DEDUCED_TYPENAME range_iterator::type @@ -42,7 +42,7 @@ namespace boost public: template< class Regex, class Submatch, class Flag > - token_range( R& r, const Regex& re, const Submatch& sub, Flag f ) + tokenized_range( R& r, const Regex& re, const Submatch& sub, Flag f ) : base( regex_iter( boost::begin(r), boost::end(r), regex_type(re), sub, f ), regex_iter() ) @@ -90,24 +90,24 @@ namespace boost }; template< class BidirectionalRng, class R, class S, class F > - inline token_range + inline tokenized_range operator|( BidirectionalRng& r, const regex_holder& f ) { - return token_range( r, f.re, f.sub, f.f ); + return tokenized_range( r, f.re, f.sub, f.f ); } template< class BidirectionalRng, class R, class S, class F > - inline token_range + inline tokenized_range operator|( const BidirectionalRng& r, const regex_holder& f ) { - return token_range( r, f.re, f.sub, f.f ); + return tokenized_range( r, f.re, f.sub, f.f ); } } // 'range_detail' - using range_detail::token_range; + using range_detail::tokenized_range; namespace adaptors { @@ -118,17 +118,17 @@ namespace boost } template - inline token_range + inline tokenized_range tokenize(BidirectionalRange& rng, const Regex& reg, const Submatch& sub, Flag f) { - return token_range(rng, reg, sub, f); + return tokenized_range(rng, reg, sub, f); } template - inline token_range + inline tokenized_range tokenize(const BidirectionalRange& rng, const Regex& reg, const Submatch& sub, Flag f) { - return token_range(rng, reg, sub, f); + return tokenized_range(rng, reg, sub, f); } } // 'adaptors' diff --git a/3party/boost/boost/range/adaptor/transformed.hpp b/3party/boost/boost/range/adaptor/transformed.hpp index 00297ca612..ee4ab34388 100755 --- a/3party/boost/boost/range/adaptor/transformed.hpp +++ b/3party/boost/boost/range/adaptor/transformed.hpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace boost { @@ -21,17 +22,17 @@ namespace boost { template< class F, class R > - struct transform_range : - public boost::iterator_range< + struct transformed_range : + public boost::iterator_range< boost::transform_iterator< F, - BOOST_DEDUCED_TYPENAME range_iterator::type + BOOST_DEDUCED_TYPENAME range_iterator::type > > { private: - typedef boost::iterator_range< + typedef boost::iterator_range< boost::transform_iterator< F, - BOOST_DEDUCED_TYPENAME range_iterator::type + BOOST_DEDUCED_TYPENAME range_iterator::type > > base; @@ -39,11 +40,11 @@ namespace boost public: typedef F transform_fn_type; typedef R source_range_type; - - transform_range( F f, R& r ) + + transformed_range( F f, R& r ) : base( make_transform_iterator( boost::begin(r), f ), - make_transform_iterator( boost::end(r), f ) ) - + make_transform_iterator( boost::end(r), f ) ) + { } }; @@ -53,51 +54,51 @@ namespace boost transform_holder( T r ) : holder(r) { } }; - + template< class InputRng, class UnaryFunction > - inline transform_range - operator|( InputRng& r, + inline transformed_range + operator|( InputRng& r, const transform_holder& f ) { - return transform_range( f.val, r ); + return transformed_range( f.val, r ); } - + template< class InputRng, class UnaryFunction > - inline transform_range - operator|( const InputRng& r, + inline transformed_range + operator|( const InputRng& r, const transform_holder& f ) { - return transform_range( f.val, r ); + return transformed_range( f.val, r ); } - + } // 'range_detail' - using range_detail::transform_range; - + using range_detail::transformed_range; + namespace adaptors - { + { namespace { - const range_detail::forwarder - transformed = + const range_detail::forwarder + transformed = range_detail::forwarder(); } - + template - inline transform_range + inline transformed_range transform(InputRange& rng, UnaryFunction fn) { - return transform_range(fn, rng); + return transformed_range(fn, rng); } - + template - inline transform_range + inline transformed_range transform(const InputRange& rng, UnaryFunction fn) { - return transform_range(fn, rng); + return transformed_range(fn, rng); } } // 'adaptors' - + } #endif diff --git a/3party/boost/boost/range/adaptor/type_erased.hpp b/3party/boost/boost/range/adaptor/type_erased.hpp new file mode 100644 index 0000000000..80bc7120a2 --- /dev/null +++ b/3party/boost/boost/range/adaptor/type_erased.hpp @@ -0,0 +1,184 @@ +// Boost.Range library +// +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_ADAPTOR_TYPE_ERASED_HPP_INCLUDED +#define BOOST_RANGE_ADAPTOR_TYPE_ERASED_HPP_INCLUDED + +#include +#include +#include +#include +#include + +namespace boost +{ + namespace adaptors + { + template< + class Value = use_default + , class Traversal = use_default + , class Reference = use_default + , class Difference = use_default + , class Buffer = use_default + > + struct type_erased + { + }; + + template< + class SinglePassRange + , class Value + , class Traversal + , class Reference + , class Difference + , class Buffer + > + typename any_range_type_generator< + SinglePassRange + , Value + , Traversal + , Reference + , Difference + , Buffer + >::type + operator|(SinglePassRange& rng, + type_erased< + Value + , Traversal + , Reference + , Difference + , Buffer + >) + { + typedef typename any_range_type_generator< + SinglePassRange + , Value + , Traversal + , Reference + , Difference + , Buffer + >::type range_type; + return range_type(boost::begin(rng), boost::end(rng)); + } + + template< + class SinglePassRange + , class Value + , class Traversal + , class Reference + , class Difference + , class Buffer + > + typename any_range_type_generator< + const SinglePassRange + , Value + , Traversal + , Reference + , Difference + , Buffer + >::type + operator|(const SinglePassRange& rng, + type_erased< + Value + , Traversal + , Reference + , Difference + , Buffer + >) + { + typedef typename any_range_type_generator< + const SinglePassRange + , Value + , Traversal + , Reference + , Difference + , Buffer + >::type range_type; + return range_type(boost::begin(rng), boost::end(rng)); + } + + template< + class SinglePassRange + , class Value + , class Traversal + , class Reference + , class Difference + , class Buffer + > + typename any_range_type_generator< + SinglePassRange + , Value + , Traversal + , Reference + , Difference + , Buffer + >::type + type_erase(SinglePassRange& rng + , type_erased< + Value + , Traversal + , Reference + , Difference + , Buffer + > = type_erased<>() + ) + { + typedef typename any_range_type_generator< + SinglePassRange + , Value + , Traversal + , Reference + , Difference + , Buffer + >::type range_type; + + return range_type(boost::begin(rng), boost::end(rng)); + } + + template< + class SinglePassRange + , class Value + , class Traversal + , class Reference + , class Difference + , class Buffer + > + typename any_range_type_generator< + const SinglePassRange + , Value + , Traversal + , Reference + , Difference + , Buffer + >::type + type_erase(const SinglePassRange& rng + , type_erased< + Value + , Traversal + , Reference + , Difference + , Buffer + > = type_erased<>() + ) + { + typedef typename any_range_type_generator< + const SinglePassRange + , Value + , Traversal + , Reference + , Difference + , Buffer + >::type range_type; + + return range_type(boost::begin(rng), boost::end(rng)); + } + } +} // namespace boost + +#endif // include guard diff --git a/3party/boost/boost/range/adaptor/uniqued.hpp b/3party/boost/boost/range/adaptor/uniqued.hpp index ad6f7f4ad4..40c82491c0 100755 --- a/3party/boost/boost/range/adaptor/uniqued.hpp +++ b/3party/boost/boost/range/adaptor/uniqued.hpp @@ -32,35 +32,35 @@ namespace boost }; template - class unique_range : public adjacent_filter_range + class uniqued_range : public adjacent_filtered_range { - typedef adjacent_filter_range base; + typedef adjacent_filtered_range base; public: - explicit unique_range(ForwardRng& rng) + explicit uniqued_range(ForwardRng& rng) : base(unique_not_equal_to(), rng) { } }; template< class ForwardRng > - inline unique_range + inline uniqued_range operator|( ForwardRng& r, unique_forwarder ) { - return unique_range(r); + return uniqued_range(r); } template< class ForwardRng > - inline unique_range + inline uniqued_range operator|( const ForwardRng& r, unique_forwarder ) { - return unique_range(r); + return uniqued_range(r); } } // 'range_detail' - using range_detail::unique_range; + using range_detail::uniqued_range; namespace adaptors { @@ -71,17 +71,17 @@ namespace boost } template - inline unique_range + inline uniqued_range unique(ForwardRange& rng) { - return unique_range(rng); + return uniqued_range(rng); } template - inline unique_range + inline uniqued_range unique(const ForwardRange& rng) { - return unique_range(rng); + return uniqued_range(rng); } } // 'adaptors' diff --git a/3party/boost/boost/range/algorithm/search_n.hpp b/3party/boost/boost/range/algorithm/search_n.hpp index b69bc6d83d..ca2b6ef735 100755 --- a/3party/boost/boost/range/algorithm/search_n.hpp +++ b/3party/boost/boost/range/algorithm/search_n.hpp @@ -15,6 +15,7 @@ #include #include #include +#include #include namespace boost @@ -22,6 +23,218 @@ namespace boost namespace range { +namespace range_detail +{ + // Rationale: search_n is implemented rather than delegate to + // the standard library implementation because some standard + // library implementations are broken eg. MSVC. + + // search_n forward iterator version + template + inline ForwardIterator + search_n_impl(ForwardIterator first, ForwardIterator last, Integer count, + const Value& value, std::forward_iterator_tag) + { + first = std::find(first, last, value); + while (first != last) + { + typename std::iterator_traits::difference_type n = count; + ForwardIterator i = first; + ++i; + while (i != last && n != 1 && *i==value) + { + ++i; + --n; + } + if (n == 1) + return first; + if (i == last) + return last; + first = std::find(++i, last, value); + } + return last; + } + + // search_n random-access iterator version + template + inline RandomAccessIterator + search_n_impl(RandomAccessIterator first, RandomAccessIterator last, + Integer count, const Value& value, + std::random_access_iterator_tag) + { + typedef typename std::iterator_traits::difference_type difference_t; + + difference_t tail_size = last - first; + const difference_t pattern_size = count; + + if (tail_size < pattern_size) + return last; + + const difference_t skip_offset = pattern_size - 1; + RandomAccessIterator look_ahead = first + skip_offset; + tail_size -= pattern_size; + + while (1) + { + // look_ahead here is pointing to the last element of the + // next possible match + while (!(*look_ahead == value)) // skip loop... + { + if (tail_size < pattern_size) + return last; // no match + look_ahead += pattern_size; + tail_size -= pattern_size; + } + difference_t remainder = skip_offset; + for (RandomAccessIterator back_track = look_ahead - 1; + *back_track == value; --back_track) + { + if (--remainder == 0) + { + return look_ahead - skip_offset; // matched + } + } + if (remainder > tail_size) + return last; // no match + look_ahead += remainder; + tail_size -= remainder; + } + + return last; + } + + // search_n for forward iterators using a binary predicate + // to determine a match + template + inline ForwardIterator + search_n_pred_impl(ForwardIterator first, ForwardIterator last, + Integer count, const Value& value, + BinaryPredicate pred, std::forward_iterator_tag) + { + typedef typename std::iterator_traits::difference_type difference_t; + + while (first != last && !static_cast(pred(*first, value))) + ++first; + + while (first != last) + { + difference_t n = count; + ForwardIterator i = first; + ++i; + while (i != last && n != 1 && static_cast(pred(*i, value))) + { + ++i; + --n; + } + if (n == 1) + return first; + if (i == last) + return last; + first = ++i; + while (first != last && !static_cast(pred(*first, value))) + ++first; + } + return last; + } + + // search_n for random-access iterators using a binary predicate + // to determine a match + template + inline RandomAccessIterator + search_n_pred_impl(RandomAccessIterator first, RandomAccessIterator last, + Integer count, const Value& value, + BinaryPredicate pred, std::random_access_iterator_tag) + { + typedef typename std::iterator_traits::difference_type difference_t; + + difference_t tail_size = last - first; + const difference_t pattern_size = count; + + if (tail_size < pattern_size) + return last; + + const difference_t skip_offset = pattern_size - 1; + RandomAccessIterator look_ahead = first + skip_offset; + tail_size -= pattern_size; + + while (1) + { + // look_ahead points to the last element of the next + // possible match + while (!static_cast(pred(*look_ahead, value))) // skip loop + { + if (tail_size < pattern_size) + return last; // no match + look_ahead += pattern_size; + tail_size -= pattern_size; + } + difference_t remainder = skip_offset; + for (RandomAccessIterator back_track = look_ahead - 1; + pred(*back_track, value); --back_track) + { + if (--remainder == 0) + return look_ahead -= skip_offset; // success + } + if (remainder > tail_size) + { + return last; // no match + } + look_ahead += remainder; + tail_size -= remainder; + } + } + + template + inline ForwardIterator + search_n_impl(ForwardIterator first, ForwardIterator last, + Integer count, const Value& value) + { + BOOST_RANGE_CONCEPT_ASSERT((ForwardIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT((EqualityComparableConcept)); + BOOST_RANGE_CONCEPT_ASSERT((EqualityComparableConcept::value_type>)); + //BOOST_RANGE_CONCEPT_ASSERT((EqualityComparableConcept2::value_type, Value>)); + + typedef typename std::iterator_traits::iterator_category cat_t; + + if (count <= 0) + return first; + if (count == 1) + return std::find(first, last, value); + return range_detail::search_n_impl(first, last, count, value, cat_t()); + } + + template + inline ForwardIterator + search_n_pred_impl(ForwardIterator first, ForwardIterator last, + Integer count, const Value& value, + BinaryPredicate pred) + { + BOOST_RANGE_CONCEPT_ASSERT((ForwardIteratorConcept)); + BOOST_RANGE_CONCEPT_ASSERT(( + BinaryPredicateConcept< + BinaryPredicate, + typename std::iterator_traits::value_type, + Value> + )); + + typedef typename std::iterator_traits::iterator_category cat_t; + + if (count <= 0) + return first; + if (count == 1) + { + while (first != last && !static_cast(pred(*first, value))) + ++first; + return first; + } + return range_detail::search_n_pred_impl(first, last, count, + value, pred, cat_t()); + } +} // namespace range_detail + /// \brief template function search /// /// range-based version of the search std algorithm @@ -36,7 +249,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator::type search_n(ForwardRange& rng, Integer count, const Value& value) { BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept)); - return std::search_n(boost::begin(rng),boost::end(rng), count, value); + return range_detail::search_n_impl(boost::begin(rng),boost::end(rng), count, value); } /// \overload @@ -45,7 +258,7 @@ inline BOOST_DEDUCED_TYPENAME range_iterator::type search_n(const ForwardRange& rng, Integer count, const Value& value) { BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept)); - return std::search_n(boost::begin(rng), boost::end(rng), count, value); + return range_detail::search_n_impl(boost::begin(rng), boost::end(rng), count, value); } /// \overload @@ -58,7 +271,7 @@ search_n(ForwardRange& rng, Integer count, const Value& value, BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept)); BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept::type, const Value&>)); - return std::search_n(boost::begin(rng), boost::end(rng), + return range_detail::search_n_pred_impl(boost::begin(rng), boost::end(rng), count, value, binary_pred); } @@ -72,7 +285,7 @@ search_n(const ForwardRange& rng, Integer count, const Value& value, BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept)); BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept::type, const Value&>)); - return std::search_n(boost::begin(rng), boost::end(rng), + return range_detail::search_n_pred_impl(boost::begin(rng), boost::end(rng), count, value, binary_pred); } @@ -86,7 +299,7 @@ search_n(ForwardRange& rng, Integer count, const Value& value) { BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept)); return range_return:: - pack(std::search_n(boost::begin(rng),boost::end(rng), + pack(range_detail::search_n_impl(boost::begin(rng),boost::end(rng), count, value), rng); } @@ -99,7 +312,7 @@ search_n(const ForwardRange& rng, Integer count, const Value& value) { BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept)); return range_return:: - pack(std::search_n(boost::begin(rng), boost::end(rng), + pack(range_detail::search_n_impl(boost::begin(rng), boost::end(rng), count, value), rng); } @@ -116,7 +329,8 @@ search_n(ForwardRange& rng, Integer count, const Value& value, BOOST_DEDUCED_TYPENAME range_value::type, const Value&>)); return range_return:: - pack(std::search_n(boost::begin(rng), boost::end(rng), + pack(range_detail::search_n_pred_impl(boost::begin(rng), + boost::end(rng), count, value, pred), rng); } @@ -133,7 +347,8 @@ search_n(const ForwardRange& rng, Integer count, const Value& value, BOOST_DEDUCED_TYPENAME range_value::type, const Value&>)); return range_return:: - pack(std::search_n(boost::begin(rng), boost::end(rng), + pack(range_detail::search_n_pred_impl(boost::begin(rng), + boost::end(rng), count, value, pred), rng); } diff --git a/3party/boost/boost/range/algorithm/transform.hpp b/3party/boost/boost/range/algorithm/transform.hpp index 28f423dc5e..fb03441709 100755 --- a/3party/boost/boost/range/algorithm/transform.hpp +++ b/3party/boost/boost/range/algorithm/transform.hpp @@ -84,7 +84,7 @@ namespace boost { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); - return range_detail::transform_impl( + return boost::range_detail::transform_impl( boost::begin(rng1), boost::end(rng1), boost::begin(rng2), boost::end(rng2), out, fun); diff --git a/3party/boost/boost/range/any_range.hpp b/3party/boost/boost/range/any_range.hpp new file mode 100644 index 0000000000..2155b2c17b --- /dev/null +++ b/3party/boost/boost/range/any_range.hpp @@ -0,0 +1,204 @@ +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_ANY_RANGE_HPP_INCLUDED +#define BOOST_RANGE_ANY_RANGE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + // If T is use_default, return the result of Default, otherwise + // return T. + // + // This is an implementation artifact used to pick intelligent default + // values when the user specified boost::use_default as a template + // parameter. + template< + class T, + class Default + > + struct any_range_default_help + : mpl::eval_if< + is_same + , Default + , mpl::identity + > + { + }; + + template< + class WrappedRange + , class Value + , class Reference + > + struct any_range_value_type + { +# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY + typedef typename any_range_default_help< + Value + , mpl::eval_if< + is_same + , range_value< + typename remove_const + ::type> + , remove_reference + > + >::type type; +# else + typedef typename any_range_default_help< + Value + , range_value< + typename remove_const + ::type> + >::type type; +# endif + }; + + template< + class Value + , class Traversal + , class Reference + , class Difference + , class Buffer = use_default + > + class any_range + : public iterator_range< + any_iterator< + Value + , Traversal + , Reference + , Difference + , typename any_range_default_help< + Buffer + , mpl::identity + >::type + > + > + { + typedef iterator_range< + any_iterator< + Value + , Traversal + , Reference + , Difference + , typename any_range_default_help< + Buffer + , mpl::identity + >::type + > + > base_type; + + struct enabler {}; + struct disabler {}; + public: + any_range() + { + } + + any_range(const any_range& other) + : base_type(other) + { + } + + template + any_range(WrappedRange& wrapped_range) + : base_type(boost::begin(wrapped_range), + boost::end(wrapped_range)) + { + } + + template + any_range(const WrappedRange& wrapped_range) + : base_type(boost::begin(wrapped_range), + boost::end(wrapped_range)) + { + } + + template< + class OtherValue + , class OtherTraversal + , class OtherReference + , class OtherDifference + > + any_range(const any_range< + OtherValue + , OtherTraversal + , OtherReference + , OtherDifference + , Buffer + >& other) + : base_type(boost::begin(other), boost::end(other)) + { + } + + template + any_range(Iterator first, Iterator last) + : base_type(first, last) + { + } + }; + + template< + class WrappedRange + , class Value = use_default + , class Traversal = use_default + , class Reference = use_default + , class Difference = use_default + , class Buffer = use_default + > + struct any_range_type_generator + { + BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); + typedef any_range< + typename any_range_value_type< + WrappedRange + , Value + , typename any_range_default_help< + Reference + , range_reference + >::type + >::type + , typename any_range_default_help< + Traversal + , iterator_traversal< + typename range_iterator::type + > + >::type + , typename any_range_default_help< + Reference + , range_reference + >::type + , typename any_range_default_help< + Difference + , range_difference + >::type + , typename any_range_default_help< + Buffer + , mpl::identity + >::type + > type; + }; + } // namespace range_detail + + using range_detail::any_range; + using range_detail::any_range_type_generator; +} // namespace boost + +#endif // include guard diff --git a/3party/boost/boost/range/begin.hpp b/3party/boost/boost/range/begin.hpp index a4a5e10fe0..c6684887f5 100644 --- a/3party/boost/boost/range/begin.hpp +++ b/3party/boost/boost/range/begin.hpp @@ -91,6 +91,11 @@ namespace range_detail } // namespace 'range_detail' #endif +// Use a ADL namespace barrier to avoid ambiguity with other unqualified +// calls. This is particularly important with C++0x encouraging +// unqualified calls to begin/end. +namespace range_adl_barrier +{ template< class T > inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( T& r ) @@ -114,19 +119,25 @@ inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( const T& r ) return range_begin( r ); } + } // namespace range_adl_barrier } // namespace boost #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING namespace boost { - template< class T > - inline BOOST_DEDUCED_TYPENAME range_iterator::type - const_begin( const T& r ) + namespace range_adl_barrier { - return boost::begin( r ); - } -} + template< class T > + inline BOOST_DEDUCED_TYPENAME range_iterator::type + const_begin( const T& r ) + { + return boost::range_adl_barrier::begin( r ); + } + } // namespace range_adl_barrier + + using namespace range_adl_barrier; +} // namespace boost #endif diff --git a/3party/boost/boost/range/combine.hpp b/3party/boost/boost/range/combine.hpp index 8b1be0057f..999bbc362e 100755 --- a/3party/boost/boost/range/combine.hpp +++ b/3party/boost/boost/range/combine.hpp @@ -1,3 +1,11 @@ +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +// For more information, see http://www.boost.org/libs/range/ +// #ifndef BOOST_RANGE_COMBINE_HPP #define BOOST_RANGE_COMBINE_HPP diff --git a/3party/boost/boost/range/concepts.hpp b/3party/boost/boost/range/concepts.hpp index 8e4d2cfd57..5965293a3e 100644 --- a/3party/boost/boost/range/concepts.hpp +++ b/3party/boost/boost/range/concepts.hpp @@ -98,8 +98,9 @@ namespace boost { // classes: // // The Range algorithms often do not require that the iterators are - // Assignable, but the correct standard conformant iterators - // do require the iterators to be a model of the Assignable concept. + // Assignable or default constructable, but the correct standard + // conformant iterators do require the iterators to be a model of the + // Assignable concept. // Iterators that contains a functor that is not assignable therefore // are not correct models of the standard iterator concepts, // despite being adequate for most algorithms. An example of this @@ -141,6 +142,26 @@ namespace boost { BOOST_DEDUCED_TYPENAME SinglePassIteratorConcept::traversal_category, single_pass_traversal_tag >)); + + BOOST_CONCEPT_USAGE(SinglePassIteratorConcept) + { + Iterator i2(++i); + boost::ignore_unused_variable_warning(i2); + + // deliberately we are loose with the postfix version for the single pass + // iterator due to the commonly poor adherence to the specification means that + // many algorithms would be unusable, whereas actually without the check they + // work + (void)(i++); + + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r1(*i); + boost::ignore_unused_variable_warning(r1); + + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r2(*(++i)); + boost::ignore_unused_variable_warning(r2); + } + private: + Iterator i; #endif }; @@ -160,6 +181,20 @@ namespace boost { BOOST_DEDUCED_TYPENAME ForwardIteratorConcept::traversal_category, forward_traversal_tag >)); + + BOOST_CONCEPT_USAGE(ForwardIteratorConcept) + { + // See the above note in the SinglePassIteratorConcept about the handling of the + // postfix increment. Since with forward and better iterators there is no need + // for a proxy, we can sensibly require that the dereference result + // is convertible to reference. + Iterator i2(i++); + boost::ignore_unused_variable_warning(i2); + BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r(*(i++)); + boost::ignore_unused_variable_warning(r); + } + private: + Iterator i; #endif }; diff --git a/3party/boost/boost/range/counting_range.hpp b/3party/boost/boost/range/counting_range.hpp index bf22f7ca94..72733a2c54 100755 --- a/3party/boost/boost/range/counting_range.hpp +++ b/3party/boost/boost/range/counting_range.hpp @@ -1,13 +1,11 @@ -// Boost.Range library +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // -// Copyright Neil Groves 2008. Use, modification and -// distribution is subject to the Boost Software Licence, Version -// 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt // -// For more information, see http://www.boost.org/libs/range +// For more information, see http://www.boost.org/libs/range/ // - #ifndef BOOST_RANGE_COUNTING_RANGE_HPP_INCLUDED #define BOOST_RANGE_COUNTING_RANGE_HPP_INCLUDED diff --git a/3party/boost/boost/range/detail/any_iterator.hpp b/3party/boost/boost/range/detail/any_iterator.hpp new file mode 100644 index 0000000000..107dfd6c54 --- /dev/null +++ b/3party/boost/boost/range/detail/any_iterator.hpp @@ -0,0 +1,587 @@ +// Boost.Range library +// +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_DETAIL_ANY_ITERATOR_HPP_INCLUDED +#define BOOST_RANGE_DETAIL_ANY_ITERATOR_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + // metafunction to determine if T is a const reference + template + struct is_const_reference + { + typedef typename mpl::and_< + typename is_reference::type, + typename is_const< + typename remove_reference::type + >::type + >::type type; + }; + + // metafunction to determine if T is a mutable reference + template + struct is_mutable_reference + { + typedef typename mpl::and_< + typename is_reference::type, + typename mpl::not_< + typename is_const< + typename remove_reference::type + >::type + >::type + >::type type; + }; + + // metafunction to evaluate if a source 'reference' can be + // converted to a target 'reference' as a value. + // + // This is true, when the target reference type is actually + // not a reference, and the source reference is convertible + // to the target type. + template + struct is_convertible_to_value_as_reference + { + typedef typename mpl::and_< + typename mpl::not_< + typename is_reference::type + >::type + , typename is_convertible< + SourceReference + , TargetReference + >::type + >::type type; + }; + + template< + class Value + , class Traversal + , class Reference + , class Difference + , class Buffer = any_iterator_default_buffer + > + class any_iterator; + + // metafunction to determine if SomeIterator is an + // any_iterator. + // + // This is the general implementation which evaluates to false. + template + struct is_any_iterator + : mpl::bool_ + { + }; + + // specialization of is_any_iterator to return true for + // any_iterator classes regardless of template parameters. + template< + class Value + , class Traversal + , class Reference + , class Difference + , class Buffer + > + struct is_any_iterator< + any_iterator< + Value + , Traversal + , Reference + , Difference + , Buffer + > + > + : mpl::bool_ + { + }; + } // namespace range_detail + + namespace detail + { + // Rationale: + // These are specialized since the iterator_facade versions lack + // the requisite typedefs to allow wrapping to determine the types + // if a user copy constructs from a postfix increment. + + template< + class Value + , class Traversal + , class Reference + , class Difference + , class Buffer + > + class postfix_increment_proxy< + range_detail::any_iterator< + Value + , Traversal + , Reference + , Difference + , Buffer + > + > + { + typedef range_detail::any_iterator< + Value + , Traversal + , Reference + , Difference + , Buffer + > any_iterator_type; + + public: + typedef Value value_type; + typedef typename std::iterator_traits::iterator_category iterator_category; + typedef Difference difference_type; + typedef typename iterator_pointer::type pointer; + typedef Reference reference; + + explicit postfix_increment_proxy(any_iterator_type const& x) + : stored_value(*x) + {} + + value_type& + operator*() const + { + return this->stored_value; + } + private: + mutable value_type stored_value; + }; + + template< + class Value + , class Traversal + , class Reference + , class Difference + , class Buffer + > + class writable_postfix_increment_proxy< + range_detail::any_iterator< + Value + , Traversal + , Reference + , Difference + , Buffer + > + > + { + typedef range_detail::any_iterator< + Value + , Traversal + , Reference + , Difference + , Buffer + > any_iterator_type; + public: + typedef Value value_type; + typedef typename std::iterator_traits::iterator_category iterator_category; + typedef Difference difference_type; + typedef typename iterator_pointer::type pointer; + typedef Reference reference; + + explicit writable_postfix_increment_proxy(any_iterator_type const& x) + : stored_value(*x) + , stored_iterator(x) + {} + + // Dereferencing must return a proxy so that both *r++ = o and + // value_type(*r++) can work. In this case, *r is the same as + // *r++, and the conversion operator below is used to ensure + // readability. + writable_postfix_increment_proxy const& + operator*() const + { + return *this; + } + + // Provides readability of *r++ + operator value_type&() const + { + return stored_value; + } + + // Provides writability of *r++ + template + T const& operator=(T const& x) const + { + *this->stored_iterator = x; + return x; + } + + // This overload just in case only non-const objects are writable + template + T& operator=(T& x) const + { + *this->stored_iterator = x; + return x; + } + + // Provides X(r++) + operator any_iterator_type const&() const + { + return stored_iterator; + } + + private: + mutable value_type stored_value; + any_iterator_type stored_iterator; + }; + + + } + + namespace range_detail + { + template< + class Value + , class Traversal + , class Reference + , class Difference + , class Buffer + > + class any_iterator + : public iterator_facade< + any_iterator< + Value + , Traversal + , Reference + , Difference + , Buffer + > + , Value + , Traversal + , Reference + , Difference + > + { + template< + class OtherValue + , class OtherTraversal + , class OtherReference + , class OtherDifference + , class OtherBuffer + > + friend class any_iterator; + + struct enabler {}; + struct disabler {}; + + typedef typename any_iterator_interface_type_generator< + Traversal + , Reference + , Difference + , Buffer + >::type abstract_base_type; + + typedef iterator_facade< + any_iterator< + Value + , Traversal + , Reference + , Difference + , Buffer + > + , Value + , Traversal + , Reference + , Difference + > base_type; + + typedef Buffer buffer_type; + + public: + typedef typename base_type::value_type value_type; + typedef typename base_type::reference reference; + typedef typename base_type::difference_type difference_type; + + // Default constructor + any_iterator() + : m_impl(0) {} + + // Simple copy construction without conversion + any_iterator(const any_iterator& other) + : base_type(other) + , m_impl(other.m_impl + ? other.m_impl->clone(m_buffer) + : 0) + { + } + + // Simple assignment operator without conversion + any_iterator& operator=(const any_iterator& other) + { + if (this != &other) + { + if (m_impl) + m_impl->~abstract_base_type(); + m_buffer.deallocate(); + m_impl = 0; + if (other.m_impl) + m_impl = other.m_impl->clone(m_buffer); + } + return *this; + } + + // Implicit conversion from another any_iterator where the + // conversion is from a non-const reference to a const reference + template< + class OtherValue + , class OtherTraversal + , class OtherReference + , class OtherDifference + > + any_iterator(const any_iterator< + OtherValue, + OtherTraversal, + OtherReference, + OtherDifference, + Buffer + >& other, + typename enable_if< + typename mpl::and_< + typename is_mutable_reference::type, + typename is_const_reference::type + >::type, + enabler + >::type* = 0 + ) + : m_impl(other.m_impl + ? other.m_impl->clone_const_ref(m_buffer) + : 0 + ) + { + } + + // Implicit conversion from another any_iterator where the + // reference types of the source and the target are references + // that are either both const, or both non-const. + template< + class OtherValue + , class OtherTraversal + , class OtherReference + , class OtherDifference + > + any_iterator(const any_iterator< + OtherValue + , OtherTraversal + , OtherReference + , OtherDifference + , Buffer + >& other, + typename enable_if< + typename mpl::or_< + typename mpl::and_< + typename is_mutable_reference::type, + typename is_mutable_reference::type + >::type, + typename mpl::and_< + typename is_const_reference::type, + typename is_const_reference::type + >::type + >::type, + enabler + >::type* = 0 + ) + : m_impl(other.m_impl + ? other.m_impl->clone(m_buffer) + : 0 + ) + { + } + + // Implicit conversion to an any_iterator that uses a value for + // the reference type. + template< + class OtherValue + , class OtherTraversal + , class OtherReference + , class OtherDifference + > + any_iterator(const any_iterator< + OtherValue + , OtherTraversal + , OtherReference + , OtherDifference + , Buffer + >& other, + typename enable_if< + typename is_convertible_to_value_as_reference< + OtherReference + , Reference + >::type, + enabler + >::type* = 0 + ) + : m_impl(other.m_impl + ? other.m_impl->clone_reference_as_value(m_buffer) + : 0 + ) + { + } + + any_iterator clone() const + { + any_iterator result; + if (m_impl) + result.m_impl = m_impl->clone(result.m_buffer); + return result; + } + + any_iterator< + Value + , Traversal + , typename abstract_base_type::const_reference + , Difference + , Buffer + > + clone_const_ref() const + { + typedef any_iterator< + Value + , Traversal + , typename abstract_base_type::const_reference + , Difference + , Buffer + > result_type; + + result_type result; + + if (m_impl) + result.m_impl = m_impl->clone_const_ref(result.m_buffer); + + return result; + } + + // implicit conversion and construction from type-erasure-compatible + // iterators + template + explicit any_iterator( + const WrappedIterator& wrapped_iterator, + typename disable_if< + typename is_any_iterator::type + , disabler + >::type* = 0 + ) + { + typedef typename any_iterator_wrapper_type_generator< + WrappedIterator + , Traversal + , Reference + , Difference + , Buffer + >::type wrapper_type; + + void* ptr = m_buffer.allocate(sizeof(wrapper_type)); + m_impl = new(ptr) wrapper_type(wrapped_iterator); + } + + ~any_iterator() + { + // manually run the destructor, the deallocation is automatically + // handled by the any_iterator_small_buffer base class. + if (m_impl) + m_impl->~abstract_base_type(); + } + + private: + friend class ::boost::iterator_core_access; + + Reference dereference() const + { + BOOST_ASSERT( m_impl ); + return m_impl->dereference(); + } + + bool equal(const any_iterator& other) const + { + return (m_impl == other.m_impl) + || (m_impl && other.m_impl && m_impl->equal(*other.m_impl)); + } + + void increment() + { + BOOST_ASSERT( m_impl ); + m_impl->increment(); + } + + void decrement() + { + BOOST_ASSERT( m_impl ); + m_impl->decrement(); + } + + Difference distance_to(const any_iterator& other) const + { + return m_impl && other.m_impl + ? m_impl->distance_to(*other.m_impl) + : 0; + } + + void advance(Difference offset) + { + BOOST_ASSERT( m_impl ); + m_impl->advance(offset); + } + + any_iterator& swap(any_iterator& other) + { + BOOST_ASSERT( this != &other ); + // grab a temporary copy of the other iterator + any_iterator tmp(other); + + // deallocate the other iterator, taking care to obey the + // class-invariants in-case of exceptions later + if (other.m_impl) + { + other.m_impl->~abstract_base_type(); + other.m_buffer.deallocate(); + other.m_impl = 0; + } + + // If this is a non-null iterator then we need to put + // a clone of this iterators impementation into the other + // iterator. + // We can't just swap because of the small buffer optimization. + if (m_impl) + { + other.m_impl = m_impl->clone(other.m_buffer); + m_impl->~abstract_base_type(); + m_buffer.deallocate(); + m_impl = 0; + } + + // assign to this instance a clone of the temporarily held + // tmp which represents the input other parameter at the + // start of execution of this function. + if (tmp.m_impl) + m_impl = tmp.m_impl->clone(m_buffer); + + return *this; + } + + buffer_type m_buffer; + abstract_base_type* m_impl; + }; + + } // namespace range_detail +} // namespace boost + +#endif // include guard diff --git a/3party/boost/boost/range/detail/any_iterator_buffer.hpp b/3party/boost/boost/range/detail/any_iterator_buffer.hpp new file mode 100644 index 0000000000..26c14206e9 --- /dev/null +++ b/3party/boost/boost/range/detail/any_iterator_buffer.hpp @@ -0,0 +1,117 @@ +// Boost.Range library +// +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_DETAIL_ANY_ITERATOR_BUFFER_HPP_INCLUDED +#define BOOST_RANGE_DETAIL_ANY_ITERATOR_BUFFER_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost +{ + template + class any_iterator_buffer + : noncopyable + { + BOOST_STATIC_ASSERT(( StackBufferSize > 0 )); + public: + any_iterator_buffer() + : m_ptr() + { + } + + ~any_iterator_buffer() + { + delete [] m_ptr; + } + + void* allocate(std::size_t bytes) + { + BOOST_ASSERT( !m_ptr ); + if (bytes <= StackBufferSize) + return m_buffer.data(); + + m_ptr = new char[bytes]; + return m_ptr; + } + + void deallocate() + { + delete [] m_ptr; + m_ptr = 0; + } + + private: + // Rationale: + // Do not use inheritance from noncopyable because this causes + // the concepts to erroneous detect the derived any_iterator + // as noncopyable. + any_iterator_buffer(const any_iterator_buffer&); + void operator=(const any_iterator_buffer&); + + char* m_ptr; + boost::array m_buffer; + }; + + class any_iterator_heap_only_buffer + : noncopyable + { + public: + any_iterator_heap_only_buffer() + : m_ptr() + { + } + + ~any_iterator_heap_only_buffer() + { + delete [] m_ptr; + } + + void* allocate(std::size_t bytes) + { + BOOST_ASSERT( !m_ptr ); + m_ptr = new char[bytes]; + return m_ptr; + } + + void deallocate() + { + delete [] m_ptr; + m_ptr = 0; + } + + private: + char* m_ptr; + }; + + template + class any_iterator_stack_only_buffer + { + BOOST_STATIC_ASSERT(( StackBufferSize > 0 )); + public: + void* allocate(std::size_t bytes) + { + BOOST_ASSERT( bytes <= m_buffer.size() ); + return m_buffer.data(); + } + + void deallocate() + { + } + + private: + boost::array m_buffer; + }; + + typedef any_iterator_buffer<64> any_iterator_default_buffer; +} // namespace boost + +#endif // include guard diff --git a/3party/boost/boost/range/detail/any_iterator_interface.hpp b/3party/boost/boost/range/detail/any_iterator_interface.hpp new file mode 100644 index 0000000000..d8f4de73ae --- /dev/null +++ b/3party/boost/boost/range/detail/any_iterator_interface.hpp @@ -0,0 +1,258 @@ +// Boost.Range library +// +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_DETAIL_ANY_ITERATOR_INTERFACE_HPP_INCLUDED +#define BOOST_RANGE_DETAIL_ANY_ITERATOR_INTERFACE_HPP_INCLUDED + +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + template + struct const_reference_type_generator + { + typedef typename mpl::if_< + typename is_reference::type, + typename add_reference< + typename add_const< + typename remove_reference::type + >::type + >::type, + T + >::type type; + }; + + template< + class Reference + , class Buffer + > + struct any_incrementable_iterator_interface + { + typedef Reference reference; + typedef typename const_reference_type_generator< + Reference + >::type const_reference; + typedef typename remove_const< + typename remove_reference::type + >::type reference_as_value_type; + + typedef Buffer buffer_type; + + virtual ~any_incrementable_iterator_interface() {} + + virtual any_incrementable_iterator_interface* + clone(buffer_type& buffer) const = 0; + + virtual any_incrementable_iterator_interface* + clone_const_ref(buffer_type& buffer) const = 0; + + virtual any_incrementable_iterator_interface* + clone_reference_as_value(buffer_type& buffer) const = 0; + + virtual void increment() = 0; + }; + + template< + class Reference + , class Buffer + > + struct any_single_pass_iterator_interface + : any_incrementable_iterator_interface + { + typedef typename any_incrementable_iterator_interface::reference reference; + typedef typename any_incrementable_iterator_interface::const_reference const_reference; + typedef typename any_incrementable_iterator_interface::buffer_type buffer_type; + typedef typename any_incrementable_iterator_interface::reference_as_value_type reference_as_value_type; + + virtual any_single_pass_iterator_interface* + clone(buffer_type& buffer) const = 0; + + virtual any_single_pass_iterator_interface* + clone_const_ref(buffer_type& buffer) const = 0; + + virtual any_single_pass_iterator_interface* + clone_reference_as_value(buffer_type& buffer) const = 0; + + virtual Reference dereference() const = 0; + + virtual bool equal(const any_single_pass_iterator_interface& other) const = 0; + }; + + template< + class Reference + , class Buffer + > + struct any_forward_iterator_interface + : any_single_pass_iterator_interface + { + typedef typename any_single_pass_iterator_interface::reference reference; + typedef typename any_single_pass_iterator_interface::const_reference const_reference; + typedef typename any_single_pass_iterator_interface::buffer_type buffer_type; + typedef typename any_single_pass_iterator_interface::reference_as_value_type reference_as_value_type; + + virtual any_forward_iterator_interface* + clone(buffer_type& buffer) const = 0; + + virtual any_forward_iterator_interface* + clone_const_ref(buffer_type& buffer) const = 0; + + virtual any_forward_iterator_interface* + clone_reference_as_value(buffer_type& buffer) const = 0; + }; + + template< + class Reference + , class Buffer + > + struct any_bidirectional_iterator_interface + : any_forward_iterator_interface + { + typedef typename any_forward_iterator_interface::reference reference; + typedef typename any_forward_iterator_interface::const_reference const_reference; + typedef typename any_forward_iterator_interface::buffer_type buffer_type; + typedef typename any_forward_iterator_interface::reference_as_value_type reference_as_value_type; + + virtual any_bidirectional_iterator_interface* + clone(buffer_type& buffer) const = 0; + + virtual any_bidirectional_iterator_interface* + clone_const_ref(buffer_type& buffer) const = 0; + + virtual any_bidirectional_iterator_interface* + clone_reference_as_value(buffer_type& buffer) const = 0; + + virtual void decrement() = 0; + }; + + template< + class Reference + , class Difference + , class Buffer + > + struct any_random_access_iterator_interface + : any_bidirectional_iterator_interface< + Reference + , Buffer + > + { + typedef typename any_bidirectional_iterator_interface::reference reference; + typedef typename any_bidirectional_iterator_interface::const_reference const_reference; + typedef typename any_bidirectional_iterator_interface::buffer_type buffer_type; + typedef typename any_bidirectional_iterator_interface::reference_as_value_type reference_as_value_type; + typedef Difference difference_type; + + virtual any_random_access_iterator_interface* + clone(buffer_type& buffer) const = 0; + + virtual any_random_access_iterator_interface* + clone_const_ref(buffer_type& buffer) const = 0; + + virtual any_random_access_iterator_interface* + clone_reference_as_value(buffer_type& buffer) const = 0; + + virtual void advance(Difference offset) = 0; + + virtual Difference distance_to(const any_random_access_iterator_interface& other) const = 0; + }; + + template< + class Traversal + , class Reference + , class Difference + , class Buffer + > + struct any_iterator_interface_type_generator; + + template< + class Reference + , class Difference + , class Buffer + > + struct any_iterator_interface_type_generator< + incrementable_traversal_tag + , Reference + , Difference + , Buffer + > + { + typedef any_incrementable_iterator_interface type; + }; + + template< + class Reference + , class Difference + , class Buffer + > + struct any_iterator_interface_type_generator< + single_pass_traversal_tag + , Reference + , Difference + , Buffer + > + { + typedef any_single_pass_iterator_interface type; + }; + + template< + class Reference + , class Difference + , class Buffer + > + struct any_iterator_interface_type_generator< + forward_traversal_tag + , Reference + , Difference + , Buffer + > + { + typedef any_forward_iterator_interface type; + }; + + template< + class Reference + , class Difference + , class Buffer + > + struct any_iterator_interface_type_generator< + bidirectional_traversal_tag + , Reference + , Difference + , Buffer + > + { + typedef any_bidirectional_iterator_interface type; + }; + + template< + class Reference + , class Difference + , class Buffer + > + struct any_iterator_interface_type_generator< + random_access_traversal_tag + , Reference + , Difference + , Buffer + > + { + typedef any_random_access_iterator_interface< + Reference + , Difference + , Buffer + > type; + }; + + } // namespace range_detail +} // namespace boost + +#endif // include guard diff --git a/3party/boost/boost/range/detail/any_iterator_wrapper.hpp b/3party/boost/boost/range/detail/any_iterator_wrapper.hpp new file mode 100644 index 0000000000..b5313a7f73 --- /dev/null +++ b/3party/boost/boost/range/detail/any_iterator_wrapper.hpp @@ -0,0 +1,590 @@ +// Boost.Range library +// +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_DETAIL_ANY_ITERATOR_WRAPPER_HPP_INCLUDED +#define BOOST_RANGE_DETAIL_ANY_ITERATOR_WRAPPER_HPP_INCLUDED + +#include +#include + +namespace boost +{ + namespace range_detail + { + template< + class WrappedIterator + , class Reference + , class Buffer + > + class any_incrementable_iterator_wrapper + : public any_incrementable_iterator_interface< + Reference + , Buffer + > + { + BOOST_RANGE_CONCEPT_ASSERT(( IncrementableIteratorConcept )); + public: + typedef WrappedIterator wrapped_type; + + BOOST_STATIC_ASSERT(( is_convertible< + typename iterator_reference::type + , Reference + >::value )); + + any_incrementable_iterator_wrapper() + : m_it() + {} + + explicit any_incrementable_iterator_wrapper(wrapped_type it) + : m_it(it) + {} + + // any_incrementable_iterator implementation + virtual any_incrementable_iterator_wrapper* clone( + typename any_incrementable_iterator_wrapper::buffer_type& buffer + ) const + { + return new (buffer.allocate(sizeof(*this))) + any_incrementable_iterator_wrapper(m_it); + } + + virtual any_incrementable_iterator_wrapper< + WrappedIterator + , typename any_incrementable_iterator_wrapper::const_reference + , Buffer + >* clone_const_ref( + typename any_incrementable_iterator_wrapper::buffer_type& buffer + ) const + { + typedef any_incrementable_iterator_wrapper< + WrappedIterator + , typename any_incrementable_iterator_wrapper::const_reference + , Buffer + > result_type; + + return new (buffer.allocate(sizeof(result_type))) + result_type(m_it); + } + + virtual any_incrementable_iterator_wrapper< + WrappedIterator + , typename any_incrementable_iterator_wrapper::reference_as_value_type + , Buffer + >* clone_reference_as_value( + typename any_incrementable_iterator_wrapper::buffer_type& buffer + ) const + { + typedef any_incrementable_iterator_wrapper< + WrappedIterator + , typename any_incrementable_iterator_wrapper::reference_as_value_type + , Buffer + > result_type; + + return new (buffer.allocate(sizeof(result_type))) + result_type(m_it); + } + + virtual void increment() + { + ++m_it; + } + + private: + wrapped_type m_it; + }; + + template< + class WrappedIterator + , class Reference + , class Buffer + > + class any_single_pass_iterator_wrapper + : public any_single_pass_iterator_interface< + Reference + , Buffer + > + { + struct disabler {}; + BOOST_RANGE_CONCEPT_ASSERT(( SinglePassIteratorConcept )); + public: + + any_single_pass_iterator_wrapper() + : m_it() + {} + + explicit any_single_pass_iterator_wrapper(const WrappedIterator& it) + : m_it(it) + {} + // any_single_pass_iterator_interface implementation + virtual any_single_pass_iterator_wrapper* clone( + typename any_single_pass_iterator_wrapper::buffer_type& buffer + ) const + { + return new (buffer.allocate(sizeof(*this))) + any_single_pass_iterator_wrapper(m_it); + } + + virtual any_single_pass_iterator_wrapper< + WrappedIterator + , typename any_single_pass_iterator_wrapper::const_reference + , Buffer + >* clone_const_ref( + typename any_single_pass_iterator_wrapper::buffer_type& buffer + ) const + { + typedef any_single_pass_iterator_wrapper< + WrappedIterator + , typename any_single_pass_iterator_wrapper::const_reference + , Buffer + > result_type; + + return new (buffer.allocate(sizeof(result_type))) + result_type(m_it); + } + + virtual any_single_pass_iterator_wrapper< + WrappedIterator + , typename any_single_pass_iterator_wrapper::reference_as_value_type + , Buffer + >* clone_reference_as_value( + typename any_single_pass_iterator_wrapper::buffer_type& buffer + ) const + { + typedef any_single_pass_iterator_wrapper< + WrappedIterator + , typename any_single_pass_iterator_wrapper::reference_as_value_type + , Buffer + > result_type; + + return new (buffer.allocate(sizeof(result_type))) + result_type(m_it); + } + + virtual void increment() + { + ++m_it; + } + + virtual bool equal(const any_single_pass_iterator_interface& other) const + { + return m_it == boost::polymorphic_downcast(&other)->m_it; + } + + virtual Reference dereference() const + { + return *m_it; + } + + private: + WrappedIterator m_it; + }; + + template< + class WrappedIterator + , class Reference + , class Buffer + > + class any_forward_iterator_wrapper + : public any_forward_iterator_interface< + Reference + , Buffer + > + { + BOOST_RANGE_CONCEPT_ASSERT(( ForwardIteratorConcept )); + public: + any_forward_iterator_wrapper() + : m_it() + {} + + explicit any_forward_iterator_wrapper(const WrappedIterator& it) + : m_it(it) + {} + + // any_forward_iterator_interface implementation + virtual any_forward_iterator_wrapper* clone( + typename any_forward_iterator_wrapper::buffer_type& buffer + ) const + { + return new (buffer.allocate(sizeof(*this))) + any_forward_iterator_wrapper(m_it); + } + + virtual any_forward_iterator_wrapper< + WrappedIterator + , typename any_forward_iterator_wrapper::const_reference + , Buffer + >* clone_const_ref( + typename any_forward_iterator_wrapper::buffer_type& buffer + ) const + { + typedef any_forward_iterator_wrapper< + WrappedIterator + , typename any_forward_iterator_wrapper::const_reference + , Buffer + > result_type; + + return new (buffer.allocate(sizeof(result_type))) + result_type(m_it); + } + + virtual any_forward_iterator_wrapper< + WrappedIterator + , typename any_forward_iterator_wrapper::reference_as_value_type + , Buffer + >* clone_reference_as_value( + typename any_forward_iterator_wrapper::buffer_type& buffer + ) const + { + typedef any_forward_iterator_wrapper< + WrappedIterator + , typename any_forward_iterator_wrapper::reference_as_value_type + , Buffer + > result_type; + + return new (buffer.allocate(sizeof(result_type))) + result_type(m_it); + } + + virtual void increment() + { + ++m_it; + } + + virtual bool equal(const any_single_pass_iterator_interface& other) const + { + return m_it == boost::polymorphic_downcast(&other)->m_it; + } + + virtual Reference dereference() const + { + return *m_it; + } + private: + WrappedIterator m_it; + }; + + template< + class WrappedIterator + , class Reference + , class Buffer + > + class any_bidirectional_iterator_wrapper + : public any_bidirectional_iterator_interface< + Reference + , Buffer + > + { + BOOST_RANGE_CONCEPT_ASSERT(( BidirectionalIteratorConcept )); + public: + any_bidirectional_iterator_wrapper() + : m_it() + { + } + + explicit any_bidirectional_iterator_wrapper(const WrappedIterator& it) + : m_it(it) + { + } + + virtual any_bidirectional_iterator_wrapper* clone( + typename any_bidirectional_iterator_wrapper::buffer_type& buffer + ) const + { + return new (buffer.allocate(sizeof(*this))) + any_bidirectional_iterator_wrapper(*this); + } + + virtual any_bidirectional_iterator_wrapper< + WrappedIterator + , typename any_bidirectional_iterator_wrapper::const_reference + , Buffer + >* clone_const_ref( + typename any_bidirectional_iterator_wrapper::buffer_type& buffer + ) const + { + typedef any_bidirectional_iterator_wrapper< + WrappedIterator + , typename any_bidirectional_iterator_wrapper::const_reference + , Buffer + > result_type; + + return new (buffer.allocate(sizeof(result_type))) + result_type(m_it); + } + + virtual any_bidirectional_iterator_wrapper< + WrappedIterator + , typename any_bidirectional_iterator_wrapper::reference_as_value_type + , Buffer + >* clone_reference_as_value( + typename any_bidirectional_iterator_wrapper::buffer_type& buffer + ) const + { + typedef any_bidirectional_iterator_wrapper< + WrappedIterator + , typename any_bidirectional_iterator_wrapper::reference_as_value_type + , Buffer + > result_type; + + return new (buffer.allocate(sizeof(result_type))) + result_type(m_it); + } + + virtual void increment() + { + ++m_it; + } + + virtual void decrement() + { + --m_it; + } + + virtual bool equal(const any_single_pass_iterator_interface& other) const + { + return m_it == boost::polymorphic_downcast(&other)->m_it; + } + + virtual Reference dereference() const + { + return *m_it; + } + + private: + WrappedIterator m_it; + }; + + template< + class WrappedIterator + , class Reference + , class Difference + , class Buffer + > + class any_random_access_iterator_wrapper + : public any_random_access_iterator_interface< + Reference + , Difference + , Buffer + > + { + BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessIteratorConcept )); + public: + typedef Difference difference_type; + + any_random_access_iterator_wrapper() + : m_it() + { + } + + explicit any_random_access_iterator_wrapper(const WrappedIterator& other) + : m_it(other) + { + } + + virtual any_random_access_iterator_wrapper* clone( + typename any_random_access_iterator_wrapper::buffer_type& buffer + ) const + { + return new (buffer.allocate(sizeof(*this))) + any_random_access_iterator_wrapper(*this); + } + + virtual any_random_access_iterator_wrapper< + WrappedIterator + , typename any_random_access_iterator_wrapper::const_reference + , Difference + , Buffer + >* clone_const_ref( + typename any_random_access_iterator_wrapper::buffer_type& buffer + ) const + { + typedef any_random_access_iterator_wrapper< + WrappedIterator + , typename any_random_access_iterator_wrapper::const_reference + , Difference + , Buffer + > result_type; + + return new (buffer.allocate(sizeof(result_type))) + result_type(m_it); + } + + virtual any_random_access_iterator_wrapper< + WrappedIterator + , typename any_random_access_iterator_wrapper::reference_as_value_type + , Difference + , Buffer + >* clone_reference_as_value( + typename any_random_access_iterator_wrapper::buffer_type& buffer + ) const + { + typedef any_random_access_iterator_wrapper< + WrappedIterator + , typename any_random_access_iterator_wrapper::reference_as_value_type + , Difference + , Buffer + > result_type; + + return new (buffer.allocate(sizeof(result_type))) + result_type(m_it); + } + + virtual void increment() + { + ++m_it; + } + + virtual bool equal(const any_single_pass_iterator_interface& other) const + { + return m_it == boost::polymorphic_downcast(&other)->m_it; + } + + virtual void decrement() + { + --m_it; + } + + virtual void advance(Difference offset) + { + m_it += offset; + } + + virtual Reference dereference() const + { + return *m_it; + } + + virtual Difference distance_to(const any_random_access_iterator_interface& other) const + { + return boost::polymorphic_downcast(&other)->m_it - m_it; + } + + private: + WrappedIterator m_it; + }; + + template< + class WrappedIterator + , class Traversal + , class Reference + , class Difference + , class Buffer + > + struct any_iterator_wrapper_type_generator; + + template< + class WrappedIterator + , class Reference + , class Difference + , class Buffer + > + struct any_iterator_wrapper_type_generator< + WrappedIterator + , incrementable_traversal_tag + , Reference + , Difference + , Buffer + > + { + typedef any_incrementable_iterator_wrapper< + WrappedIterator + , Reference + , Buffer + > type; + }; + + template< + class WrappedIterator + , class Reference + , class Difference + , class Buffer + > + struct any_iterator_wrapper_type_generator< + WrappedIterator + , single_pass_traversal_tag + , Reference + , Difference + , Buffer + > + { + typedef any_single_pass_iterator_wrapper< + WrappedIterator + , Reference + , Buffer + > type; + }; + + template< + class WrappedIterator + , class Reference + , class Difference + , class Buffer + > + struct any_iterator_wrapper_type_generator< + WrappedIterator + , forward_traversal_tag + , Reference + , Difference + , Buffer + > + { + typedef any_forward_iterator_wrapper< + WrappedIterator + , Reference + , Buffer + > type; + }; + + template< + class WrappedIterator + , class Reference + , class Difference + , class Buffer + > + struct any_iterator_wrapper_type_generator< + WrappedIterator + , bidirectional_traversal_tag + , Reference + , Difference + , Buffer + > + { + typedef any_bidirectional_iterator_wrapper< + WrappedIterator + , Reference + , Buffer + > type; + }; + + template< + class WrappedIterator + , class Reference + , class Difference + , class Buffer + > + struct any_iterator_wrapper_type_generator< + WrappedIterator + , random_access_traversal_tag + , Reference + , Difference + , Buffer + > + { + typedef any_random_access_iterator_wrapper< + WrappedIterator + , Reference + , Difference + , Buffer + > type; + }; + + } // namespace range_detail +} // namespace boost + +#endif // include guard diff --git a/3party/boost/boost/range/detail/begin.hpp b/3party/boost/boost/range/detail/begin.hpp index 06c25610ba..f3da7323a4 100644 --- a/3party/boost/boost/range/detail/begin.hpp +++ b/3party/boost/boost/range/detail/begin.hpp @@ -19,9 +19,9 @@ # include #endif -namespace boost +namespace boost { - + namespace range_detail { template< typename T > @@ -30,7 +30,7 @@ namespace boost ////////////////////////////////////////////////////////////////////// // default ////////////////////////////////////////////////////////////////////// - + template<> struct range_begin { @@ -40,11 +40,11 @@ namespace boost return c.begin(); }; }; - + ////////////////////////////////////////////////////////////////////// // pair ////////////////////////////////////////////////////////////////////// - + template<> struct range_begin { @@ -54,11 +54,11 @@ namespace boost return p.first; } }; - + ////////////////////////////////////////////////////////////////////// // array ////////////////////////////////////////////////////////////////////// - + template<> struct range_begin { @@ -78,14 +78,16 @@ namespace boost }; } // namespace 'range_detail' - - template< typename C > - inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type - begin( C& c ) + + namespace range_adl_barrier { - return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); + template< typename C > + inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type + begin( C& c ) + { + return range_detail::range_begin< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); + } } - } // namespace 'boost' diff --git a/3party/boost/boost/range/detail/end.hpp b/3party/boost/boost/range/detail/end.hpp index d6a736853c..8b5f35d80b 100644 --- a/3party/boost/boost/range/detail/end.hpp +++ b/3party/boost/boost/range/detail/end.hpp @@ -24,7 +24,7 @@ # include # endif -namespace boost +namespace boost { namespace range_detail { @@ -34,39 +34,39 @@ namespace boost ////////////////////////////////////////////////////////////////////// // default ////////////////////////////////////////////////////////////////////// - + template<> struct range_end { template< typename C > - static BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type + static BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type fun( C& c ) { return c.end(); }; }; - + ////////////////////////////////////////////////////////////////////// // pair ////////////////////////////////////////////////////////////////////// - + template<> struct range_end { template< typename P > - static BOOST_RANGE_DEDUCED_TYPENAME range_iterator

::type + static BOOST_RANGE_DEDUCED_TYPENAME range_iterator

::type fun( const P& p ) { return p.second; } }; - + ////////////////////////////////////////////////////////////////////// // array ////////////////////////////////////////////////////////////////////// - + template<> - struct range_end + struct range_end { #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) template< typename T, std::size_t sz > @@ -82,16 +82,19 @@ namespace boost } #endif }; - + } // namespace 'range_detail' - - template< typename C > - inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type - end( C& c ) + + namespace range_adl_barrier { - return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); - } - + template< typename C > + inline BOOST_RANGE_DEDUCED_TYPENAME range_iterator::type + end( C& c ) + { + return range_detail::range_end< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range::type >::fun( c ); + } + } // namespace range_adl_barrier + } // namespace 'boost' # endif // VC6 diff --git a/3party/boost/boost/range/detail/safe_bool.hpp b/3party/boost/boost/range/detail/safe_bool.hpp new file mode 100644 index 0000000000..182e510484 --- /dev/null +++ b/3party/boost/boost/range/detail/safe_bool.hpp @@ -0,0 +1,72 @@ +// This header intentionally has no include guards. +// +// Copyright (c) 2010 Neil Groves +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// This code utilises the experience gained during the evolution of +// +#ifndef BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP +#define BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP + +#include +#include + +namespace boost +{ + namespace range_detail + { + +template +class safe_bool +{ +public: + typedef safe_bool this_type; + +#if (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570)) || defined(__CINT_) + typedef bool unspecified_bool_type; + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr) + { + return x; + } +#elif defined(_MANAGED) + static void unspecified_bool(this_type***) + { + } + typedef void(*unspecified_bool_type)(this_type***); + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr) + { + return x ? unspecified_bool : 0; + } +#elif \ + ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \ + ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \ + ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) ) + + typedef bool (this_type::*unspecified_bool_type)() const; + + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr) + { + return x ? &this_type::detail_safe_bool_member_fn : 0; + } +private: + bool detail_safe_bool_member_fn() const { return false; } +#else + typedef DataMemberPtr unspecified_bool_type; + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr p) + { + return x ? p : 0; + } +#endif +private: + safe_bool(); + safe_bool(const safe_bool&); + void operator=(const safe_bool&); + ~safe_bool(); +}; + + } // namespace range_detail +} // namespace boost + +#endif // include guard diff --git a/3party/boost/boost/range/end.hpp b/3party/boost/boost/range/end.hpp index 3063c02c65..d5e6526fde 100644 --- a/3party/boost/boost/range/end.hpp +++ b/3party/boost/boost/range/end.hpp @@ -88,6 +88,9 @@ namespace range_detail } // namespace 'range_detail' #endif +namespace range_adl_barrier +{ + template< class T > inline BOOST_DEDUCED_TYPENAME range_iterator::type end( T& r ) { @@ -110,22 +113,24 @@ inline BOOST_DEDUCED_TYPENAME range_iterator::type end( const T& r ) return range_end( r ); } + } // namespace range_adl_barrier } // namespace 'boost' - - #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - namespace boost { - template< class T > - inline BOOST_DEDUCED_TYPENAME range_iterator::type - const_end( const T& r ) + namespace range_adl_barrier { - return boost::end( r ); - } -} + template< class T > + inline BOOST_DEDUCED_TYPENAME range_iterator::type + const_end( const T& r ) + { + return boost::range_adl_barrier::end( r ); + } + } // namespace range_adl_barrier + using namespace range_adl_barrier; +} // namespace boost #endif diff --git a/3party/boost/boost/range/has_range_iterator.hpp b/3party/boost/boost/range/has_range_iterator.hpp new file mode 100644 index 0000000000..b2bca39a37 --- /dev/null +++ b/3party/boost/boost/range/has_range_iterator.hpp @@ -0,0 +1,62 @@ +// Boost.Range library +// +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// +#ifndef BOOST_RANGE_HAS_ITERATOR_HPP_INCLUDED +#define BOOST_RANGE_HAS_ITERATOR_HPP_INCLUDED + +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(type); + + template + struct has_range_iterator_impl + : boost::mpl::false_ + { + }; + + template + struct has_range_iterator_impl > >::type> + : boost::mpl::true_ + { + }; + + template + struct has_range_const_iterator_impl + : boost::mpl::false_ + { + }; + + template + struct has_range_const_iterator_impl > >::type> + : boost::mpl::true_ + { + }; + + } // namespace range_detail + + template + struct has_range_iterator + : range_detail::has_range_iterator_impl + {}; + + template + struct has_range_const_iterator + : range_detail::has_range_const_iterator_impl + {}; +} // namespace boost + +#endif // include guard + diff --git a/3party/boost/boost/range/istream_range.hpp b/3party/boost/boost/range/istream_range.hpp index f0e9ef40a8..c3f2248f8f 100755 --- a/3party/boost/boost/range/istream_range.hpp +++ b/3party/boost/boost/range/istream_range.hpp @@ -1,13 +1,11 @@ -// Boost.Range library +// Copyright Neil Groves 2010. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) // -// Copyright Neil Groves 2008. Use, modification and -// distribution is subject to the Boost Software Licence, Version -// 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt // -// For more information, see http://www.boost.org/libs/range +// For more information, see http://www.boost.org/libs/range/ // - #ifndef BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED #define BOOST_RANGE_ISTREAM_RANGE_HPP_INCLUDED diff --git a/3party/boost/boost/range/iterator_range_core.hpp b/3party/boost/boost/range/iterator_range_core.hpp index 497b1e3860..7ef7523fde 100755 --- a/3party/boost/boost/range/iterator_range_core.hpp +++ b/3party/boost/boost/range/iterator_range_core.hpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -81,7 +82,6 @@ namespace boost struct range_tag { }; struct const_range_tag { }; - } // iterator range template class -----------------------------------------// @@ -106,13 +106,14 @@ namespace boost template class iterator_range { + typedef range_detail::safe_bool< IteratorT iterator_range::* > safe_bool_t; protected: // Used by sub_range //! implementation class typedef iterator_range_detail::iterator_range_impl impl; public: - //! this type typedef iterator_range type; + typedef BOOST_DEDUCED_TYPENAME safe_bool_t::unspecified_bool_type unspecified_bool_type; //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type); //! Encapsulated value type @@ -230,7 +231,7 @@ namespace boost difference_type size() const { - return m_End - m_Begin; + return m_End - m_Begin; } bool empty() const @@ -238,18 +239,15 @@ namespace boost return m_Begin == m_End; } -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - operator bool() const - { - return !empty(); - } -#else - typedef iterator (iterator_range::*unspecified_bool_type) () const; operator unspecified_bool_type() const { - return empty() ? 0: &iterator_range::end; + return safe_bool_t::to_unspecified_bool(m_Begin != m_End, &iterator_range::m_Begin); + } + + bool operator!() const + { + return empty(); } -#endif bool equal( const iterator_range& r ) const { @@ -290,6 +288,20 @@ namespace boost return *--last; } + // pop_front() - added to model the SinglePassRangePrimitiveConcept + void pop_front() + { + BOOST_ASSERT( !empty() ); + ++m_Begin; + } + + // pop_back() - added to model the BidirectionalRangePrimitiveConcept + void pop_back() + { + BOOST_ASSERT( !empty() ); + --m_End; + } + reference operator[]( difference_type at ) const { BOOST_ASSERT( at >= 0 && at < size() ); diff --git a/3party/boost/boost/range/metafunctions.hpp b/3party/boost/boost/range/metafunctions.hpp index 5b25a8feed..469d9ae17b 100644 --- a/3party/boost/boost/range/metafunctions.hpp +++ b/3party/boost/boost/range/metafunctions.hpp @@ -16,6 +16,7 @@ #endif #include +#include #include #include #include diff --git a/3party/boost/boost/range/size.hpp b/3party/boost/boost/range/size.hpp index 2b572d41e7..4b4eebebd9 100644 --- a/3party/boost/boost/range/size.hpp +++ b/3party/boost/boost/range/size.hpp @@ -15,6 +15,7 @@ # pragma once #endif +#include #include #include #include @@ -22,13 +23,28 @@ namespace boost { - - template< class T > - inline BOOST_DEDUCED_TYPENAME range_difference::type size( const T& r ) + namespace range_detail { - BOOST_ASSERT( (boost::end( r ) - boost::begin( r )) >= 0 && - "reachability invariant broken!" ); - return boost::end( r ) - boost::begin( r ); + template + inline BOOST_DEDUCED_TYPENAME range_difference::type + range_calculate_size(const SinglePassRange& rng) + { + BOOST_ASSERT( (boost::end(rng) - boost::begin(rng)) >= 0 && + "reachability invariant broken!" ); + return boost::end(rng) - boost::begin(rng); + } + } + + template + inline BOOST_DEDUCED_TYPENAME range_difference::type + size(const SinglePassRange& rng) + { +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ + !BOOST_WORKAROUND(__GNUC__, < 3) \ + /**/ + using namespace range_detail; +#endif + return range_calculate_size(rng); } } // namespace 'boost' diff --git a/3party/boost/boost/serialization/binary_object.hpp b/3party/boost/boost/serialization/binary_object.hpp index 0d8d027cd0..cbc19f46f8 100644 --- a/3party/boost/boost/serialization/binary_object.hpp +++ b/3party/boost/boost/serialization/binary_object.hpp @@ -16,7 +16,7 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include // std::size_t #include diff --git a/3party/boost/boost/serialization/collections_load_imp.hpp b/3party/boost/boost/serialization/collections_load_imp.hpp index 1ad80f6089..11b00cdb8b 100644 --- a/3party/boost/boost/serialization/collections_load_imp.hpp +++ b/3party/boost/boost/serialization/collections_load_imp.hpp @@ -22,7 +22,7 @@ // helper function templates for serialization of collections -#include +#include #include // size_t #include // msvc 6.0 needs this for warning suppression #if defined(BOOST_NO_STDC_NAMESPACE) diff --git a/3party/boost/boost/serialization/extended_type_info.hpp b/3party/boost/boost/serialization/extended_type_info.hpp index f47109a3f6..b6540660ce 100644 --- a/3party/boost/boost/serialization/extended_type_info.hpp +++ b/3party/boost/boost/serialization/extended_type_info.hpp @@ -19,7 +19,7 @@ // for now, extended type info is part of the serialization libraries // this could change in the future. #include -#include +#include #include // NULL #include #include diff --git a/3party/boost/boost/serialization/extended_type_info_no_rtti.hpp b/3party/boost/boost/serialization/extended_type_info_no_rtti.hpp index fd19ad66e3..0f0b275a49 100644 --- a/3party/boost/boost/serialization/extended_type_info_no_rtti.hpp +++ b/3party/boost/boost/serialization/extended_type_info_no_rtti.hpp @@ -17,7 +17,7 @@ // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for updates, documentation, and revision history. -#include +#include #include #include @@ -115,7 +115,7 @@ public: // function. So if the is not a polymporphic type it's likely an error BOOST_STATIC_WARNING(boost::is_polymorphic< T >::value); const char * derived_key = t.get_key(); - assert(NULL != derived_key); + BOOST_ASSERT(NULL != derived_key); return boost::serialization::extended_type_info::find(derived_key); } const char * get_key() const{ @@ -140,7 +140,7 @@ public: case 4: return factory::type, 4>(ap); default: - assert(false); // too many arguments + BOOST_ASSERT(false); // too many arguments // throw exception here? return NULL; } diff --git a/3party/boost/boost/serialization/extended_type_info_typeid.hpp b/3party/boost/boost/serialization/extended_type_info_typeid.hpp index c8674d97df..d60c369fde 100644 --- a/3party/boost/boost/serialization/extended_type_info_typeid.hpp +++ b/3party/boost/boost/serialization/extended_type_info_typeid.hpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include @@ -124,7 +124,7 @@ public: case 4: return factory::type, 4>(ap); default: - assert(false); // too many arguments + BOOST_ASSERT(false); // too many arguments // throw exception here? return NULL; } diff --git a/3party/boost/boost/serialization/factory.hpp b/3party/boost/boost/serialization/factory.hpp index 9039a32c7a..73f660416f 100644 --- a/3party/boost/boost/serialization/factory.hpp +++ b/3party/boost/boost/serialization/factory.hpp @@ -35,7 +35,7 @@ namespace serialization { // default implementation does nothing. template T * factory(std::va_list){ - assert(false); + BOOST_ASSERT(false); // throw exception here? return NULL; } diff --git a/3party/boost/boost/serialization/item_version_type.hpp b/3party/boost/boost/serialization/item_version_type.hpp index 838c33ac4a..f3e5adac6f 100644 --- a/3party/boost/boost/serialization/item_version_type.hpp +++ b/3party/boost/boost/serialization/item_version_type.hpp @@ -12,7 +12,7 @@ #include // fixes broken example build on x86_64-linux-gnu-gcc-4.6.0 -#include +#include namespace boost { namespace serialization { @@ -30,7 +30,7 @@ public: // should be private - but MPI fails if it's not!!! item_version_type(): t(0) {}; explicit item_version_type(const unsigned int t_) : t(t_){ - assert(t_ <= boost::integer_traits::const_max); + BOOST_ASSERT(t_ <= boost::integer_traits::const_max); } item_version_type(const item_version_type & t_) : t(t_.t) diff --git a/3party/boost/boost/serialization/singleton.hpp b/3party/boost/boost/serialization/singleton.hpp index d7f7265f01..f521590e1a 100644 --- a/3party/boost/boost/serialization/singleton.hpp +++ b/3party/boost/boost/serialization/singleton.hpp @@ -34,7 +34,7 @@ # pragma once #endif -#include +#include #include #include #include @@ -128,13 +128,13 @@ private: static detail::singleton_wrapper< T > t; // refer to instance, causing it to be instantiated (and // initialized at startup on working compilers) - assert(! detail::singleton_wrapper< T >::m_is_destroyed); + BOOST_ASSERT(! detail::singleton_wrapper< T >::m_is_destroyed); use(instance); return static_cast(t); } public: BOOST_DLLEXPORT static T & get_mutable_instance(){ - assert(! is_locked()); + BOOST_ASSERT(! is_locked()); return get_instance(); } BOOST_DLLEXPORT static const T & get_const_instance(){ diff --git a/3party/boost/boost/signals/detail/named_slot_map.hpp b/3party/boost/boost/signals/detail/named_slot_map.hpp index 0528c617e0..763013fde1 100644 --- a/3party/boost/boost/signals/detail/named_slot_map.hpp +++ b/3party/boost/boost/signals/detail/named_slot_map.hpp @@ -32,10 +32,10 @@ class stored_group public: enum storage_kind { sk_empty, sk_front, sk_back, sk_group }; - stored_group(storage_kind kind = sk_empty) : kind(kind), group() { } + stored_group(storage_kind p_kind = sk_empty) : kind(p_kind), group() { } template - stored_group(const T& group) : kind(sk_group), group(new T(group)) { } + stored_group(const T& p_group) : kind(sk_group), group(new T(p_group)) { } bool is_front() const { return kind == sk_front; } bool is_back() const { return kind == sk_back; } @@ -133,12 +133,12 @@ public: #endif private: - named_slot_map_iterator(group_iterator group, group_iterator last) : - group(group), last_group(last), slot_assigned(false) + named_slot_map_iterator(group_iterator giter, group_iterator last) : + group(giter), last_group(last), slot_assigned(false) { init_next_group(); } - named_slot_map_iterator(group_iterator group, group_iterator last, + named_slot_map_iterator(group_iterator giter, group_iterator last, slot_pair_iterator slot) : - group(group), last_group(last), slot_(slot), slot_assigned(true) + group(giter), last_group(last), slot_(slot), slot_assigned(true) { } void init_next_group() diff --git a/3party/boost/boost/signals/detail/slot_call_iterator.hpp b/3party/boost/boost/signals/detail/slot_call_iterator.hpp index c6706bef8c..0d6afd91d1 100644 --- a/3party/boost/boost/signals/detail/slot_call_iterator.hpp +++ b/3party/boost/boost/signals/detail/slot_call_iterator.hpp @@ -47,9 +47,9 @@ namespace boost { friend class iterator_core_access; public: - slot_call_iterator(Iterator iter_in, Iterator end_in, Function f, + slot_call_iterator(Iterator iter_in, Iterator end_in, Function func, optional &c) - : iter(iter_in), end(end_in), f(f), cache(&c) + : iter(iter_in), end(end_in), f(func), cache(&c) { iter = std::find_if(iter, end, is_callable()); } diff --git a/3party/boost/boost/signals/signal_template.hpp b/3party/boost/boost/signals/signal_template.hpp index a8420b6914..6b0b91a8e6 100644 --- a/3party/boost/boost/signals/signal_template.hpp +++ b/3party/boost/boost/signals/signal_template.hpp @@ -345,8 +345,8 @@ namespace boost { #endif // BOOST_SIGNALS_NUM_ARGS > 0 call_bound_slot f(&args); - typedef typename call_bound_slot::result_type result_type; - optional cache; + typedef typename call_bound_slot::result_type call_result_type; + optional cache; // Let the combiner call the slots via a pair of input iterators return combiner()(slot_call_iterator(notification.impl->slots_.begin(), impl->slots_.end(), f, cache), @@ -386,8 +386,8 @@ namespace boost { call_bound_slot f(&args); - typedef typename call_bound_slot::result_type result_type; - optional cache; + typedef typename call_bound_slot::result_type call_result_type; + optional cache; // Let the combiner call the slots via a pair of input iterators return combiner()(slot_call_iterator(notification.impl->slots_.begin(), diff --git a/3party/boost/boost/signals2/connection.hpp b/3party/boost/boost/signals2/connection.hpp index 614fda6836..0271a3c1f1 100644 --- a/3party/boost/boost/signals2/connection.hpp +++ b/3party/boost/boost/signals2/connection.hpp @@ -40,7 +40,7 @@ namespace boost virtual ~connection_body_base() {} void disconnect() { - unique_lock lock(*this); + unique_lock local_lock(*this); nolock_disconnect(); } void nolock_disconnect() @@ -50,7 +50,7 @@ namespace boost virtual bool connected() const = 0; shared_ptr get_blocker() { - unique_lock lock(*this); + unique_lock local_lock(*this); shared_ptr blocker = _weak_blocker.lock(); if(blocker == shared_ptr()) { @@ -90,7 +90,7 @@ namespace boost virtual ~connection_body() {} virtual bool connected() const { - unique_lock lock(_mutex); + unique_lock local_lock(_mutex); nolock_grab_tracked_objects(detail::null_output_iterator()); return nolock_nograb_connected(); } diff --git a/3party/boost/boost/signals2/deconstruct.hpp b/3party/boost/boost/signals2/deconstruct.hpp index ec4ae627e5..dec0dd4c44 100644 --- a/3party/boost/boost/signals2/deconstruct.hpp +++ b/3party/boost/boost/signals2/deconstruct.hpp @@ -43,14 +43,6 @@ namespace signals2 namespace detail { - -#if !defined(BOOST_NO_RVALUE_REFERENCES) - template< class T > T&& forward( T & t ) - { - return static_cast< T&& >( t ); - } -#endif - inline void adl_predestruct(...) {} } // namespace detail @@ -78,7 +70,7 @@ public: if(!_postconstructed) { adl_postconstruct(_sp, const_cast::type *>(_sp.get()), - detail::forward(args)...); + std::forward(args)...); _postconstructed = true; } return _sp; @@ -305,7 +297,7 @@ public: void * pv = pd->address(); - new( pv ) T( detail::forward( args )... ); + new( pv ) T( std::forward( args )... ); pd->set_initialized(); boost::shared_ptr< T > retval( pt, static_cast< T* >( pv ) ); @@ -486,7 +478,7 @@ template< class T > postconstructor_invoker deconstruct() template< class T, class... Args > postconstructor_invoker< T > deconstruct( Args && ... args ) { - return deconstruct_access::deconstruct( detail::forward( args )... ); + return deconstruct_access::deconstruct( std::forward( args )... ); } #else diff --git a/3party/boost/boost/signals2/detail/auto_buffer.hpp b/3party/boost/boost/signals2/detail/auto_buffer.hpp index 37023ba8d5..e319320431 100644 --- a/3party/boost/boost/signals2/detail/auto_buffer.hpp +++ b/3party/boost/boost/signals2/detail/auto_buffer.hpp @@ -158,19 +158,19 @@ namespace detail optimized_const_reference; private: - pointer allocate( size_type capacity ) + pointer allocate( size_type capacity_arg ) { - if( capacity > N ) - return &*get_allocator().allocate( capacity ); + if( capacity_arg > N ) + return &*get_allocator().allocate( capacity_arg ); else return static_cast( members_.address() ); } - void deallocate( pointer where, size_type capacity ) + void deallocate( pointer where, size_type capacity_arg ) { - if( capacity <= N ) + if( capacity_arg <= N ) return; - get_allocator().deallocate( allocator_pointer(where), capacity ); + get_allocator().deallocate( allocator_pointer(where), capacity_arg ); } template< class I > @@ -368,12 +368,12 @@ namespace detail } template< class I > - void insert_impl( const_iterator before, I begin, I end, + void insert_impl( const_iterator before, I begin_arg, I end_arg, std::input_iterator_tag ) { - for( ; begin != end; ++begin ) + for( ; begin_arg != end_arg; ++begin_arg ) { - before = insert( before, *begin ); + before = insert( before, *begin_arg ); ++before; } } @@ -411,10 +411,10 @@ namespace detail } template< class I > - void insert_impl( const_iterator before, I begin, I end, + void insert_impl( const_iterator before, I begin_arg, I end_arg, std::forward_iterator_tag ) { - difference_type n = std::distance(begin,end); + difference_type n = std::distance(begin_arg, end_arg); if( size_ + n <= members_.capacity_ ) { @@ -424,11 +424,11 @@ namespace detail grow_back( n ); iterator where = const_cast(before); std::copy( before, cend() - n, where + n ); - assign_impl( begin, end, where ); + assign_impl( begin_arg, end_arg, where ); } else { - unchecked_push_back( begin, end ); + unchecked_push_back( begin_arg, end_arg ); } BOOST_ASSERT( is_valid() ); return; @@ -436,7 +436,7 @@ namespace detail auto_buffer temp( new_capacity_impl( size_ + n ) ); temp.unchecked_push_back( cbegin(), before ); - temp.unchecked_push_back( begin, end ); + temp.unchecked_push_back( begin_arg, end_arg ); temp.unchecked_push_back( before, cend() ); one_sided_swap( temp ); BOOST_ASSERT( is_valid() ); @@ -528,53 +528,53 @@ namespace detail return *this; } - explicit auto_buffer( size_type capacity ) - : members_( (std::max)(capacity,size_type(N)) ), + explicit auto_buffer( size_type capacity_arg ) + : members_( (std::max)(capacity_arg, size_type(N)) ), buffer_( allocate(members_.capacity_) ), size_( 0 ) { BOOST_ASSERT( is_valid() ); } - auto_buffer( size_type size, optimized_const_reference init_value ) - : members_( (std::max)(size,size_type(N)) ), + auto_buffer( size_type size_arg, optimized_const_reference init_value ) + : members_( (std::max)(size_arg, size_type(N)) ), buffer_( allocate(members_.capacity_) ), size_( 0 ) { - std::uninitialized_fill( buffer_, buffer_ + size, init_value ); - size_ = size; + std::uninitialized_fill( buffer_, buffer_ + size_arg, init_value ); + size_ = size_arg; BOOST_ASSERT( is_valid() ); } - auto_buffer( size_type capacity, const allocator_type& a ) + auto_buffer( size_type capacity_arg, const allocator_type& a ) : allocator_type( a ), - members_( (std::max)(capacity,size_type(N)) ), + members_( (std::max)(capacity_arg, size_type(N)) ), buffer_( allocate(members_.capacity_) ), size_( 0 ) { BOOST_ASSERT( is_valid() ); } - auto_buffer( size_type size, optimized_const_reference init_value, + auto_buffer( size_type size_arg, optimized_const_reference init_value, const allocator_type& a ) : allocator_type( a ), - members_( (std::max)(size,size_type(N)) ), + members_( (std::max)(size_arg, size_type(N)) ), buffer_( allocate(members_.capacity_) ), size_( 0 ) { std::uninitialized_fill( buffer_, buffer_ + size, init_value ); - size_ = size; + size_ = size_arg; BOOST_ASSERT( is_valid() ); } template< class ForwardIterator > - auto_buffer( ForwardIterator begin, ForwardIterator end ) + auto_buffer( ForwardIterator begin_arg, ForwardIterator end_arg ) : - members_( std::distance(begin,end) ), + members_( std::distance(begin_arg, end_arg) ), buffer_( allocate(members_.capacity_) ), size_( 0 ) { - copy_impl( begin, end, buffer_ ); + copy_impl( begin_arg, end_arg, buffer_ ); size_ = members_.capacity_; if( members_.capacity_ < N ) members_.capacity_ = N; @@ -582,14 +582,14 @@ namespace detail } template< class ForwardIterator > - auto_buffer( ForwardIterator begin, ForwardIterator end, + auto_buffer( ForwardIterator begin_arg, ForwardIterator end_arg, const allocator_type& a ) : allocator_type( a ), - members_( std::distance(begin,end) ), + members_( std::distance(begin_arg, end_arg) ), buffer_( allocate(members_.capacity_) ), size_( 0 ) { - copy_impl( begin, end, buffer_ ); + copy_impl( begin_arg, end_arg, buffer_ ); size_ = members_.capacity_; if( members_.capacity_ < N ) members_.capacity_ = N; @@ -766,12 +766,12 @@ namespace detail } template< class ForwardIterator > - void unchecked_push_back( ForwardIterator begin, - ForwardIterator end ) // non-growing + void unchecked_push_back( ForwardIterator begin_arg, + ForwardIterator end_arg ) // non-growing { - BOOST_ASSERT( size_ + std::distance(begin,end) <= members_.capacity_ ); - copy_impl( begin, end, buffer_ + size_ ); - size_ += std::distance(begin,end); + BOOST_ASSERT( size_ + std::distance(begin_arg, end_arg) <= members_.capacity_ ); + copy_impl( begin_arg, end_arg, buffer_ + size_ ); + size_ += std::distance(begin_arg, end_arg); } void reserve_precisely( size_type n ) @@ -822,12 +822,12 @@ namespace detail } template< class ForwardIterator > - void push_back( ForwardIterator begin, ForwardIterator end ) + void push_back( ForwardIterator begin_arg, ForwardIterator end_arg ) { - difference_type diff = std::distance(begin,end); + difference_type diff = std::distance(begin_arg, end_arg); if( size_ + diff > members_.capacity_ ) reserve( size_ + diff ); - unchecked_push_back( begin, end ); + unchecked_push_back( begin_arg, end_arg ); } iterator insert( const_iterator before, optimized_const_reference x ) // basic @@ -887,11 +887,11 @@ namespace detail template< class ForwardIterator > void insert( const_iterator before, - ForwardIterator begin, ForwardIterator end ) // basic + ForwardIterator begin_arg, ForwardIterator end_arg ) // basic { typedef typename std::iterator_traits ::iterator_category category; - insert_impl( before, begin, end, category() ); + insert_impl( before, begin_arg, end_arg, category() ); } void pop_back() diff --git a/3party/boost/boost/signals2/detail/signal_template.hpp b/3party/boost/boost/signals2/detail/signal_template.hpp index d90ffa2419..7b8a4b8674 100644 --- a/3party/boost/boost/signals2/detail/signal_template.hpp +++ b/3party/boost/boost/signals2/detail/signal_template.hpp @@ -151,9 +151,9 @@ namespace boost typedef typename detail::slot_call_iterator_t > slot_call_iterator; - BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)(const combiner_type &combiner, + BOOST_SIGNALS2_SIGNAL_IMPL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)(const combiner_type &combiner_arg, const group_compare_type &group_compare): - _shared_state(new invocation_state(connection_list_type(group_compare), combiner)), + _shared_state(new invocation_state(connection_list_type(group_compare), combiner_arg)), _garbage_collector_it(_shared_state->connection_bodies().end()) {} // connect slot @@ -299,13 +299,13 @@ namespace boost unique_lock lock(_mutex); return _shared_state->combiner(); } - void set_combiner(const combiner_type &combiner) + void set_combiner(const combiner_type &combiner_arg) { unique_lock lock(_mutex); if(_shared_state.unique()) - _shared_state->combiner() = combiner; + _shared_state->combiner() = combiner_arg; else - _shared_state.reset(new invocation_state(*_shared_state, combiner)); + _shared_state.reset(new invocation_state(*_shared_state, combiner_arg)); } private: typedef Mutex mutex_type; @@ -316,9 +316,12 @@ namespace boost { public: typedef nonvoid_slot_result_type result_type; +// typename add_reference::type +#define BOOST_SIGNALS2_ADD_REF_TYPE(z, n, data) \ + typename add_reference::type // typename add_reference::type argn #define BOOST_SIGNALS2_ADD_REF_ARG(z, n, data) \ - typename add_reference::type \ + BOOST_SIGNALS2_ADD_REF_TYPE(~, n, ~) \ BOOST_SIGNALS2_SIGNATURE_ARG_NAME(~, n, ~) // typename add_reference::type arg1, typename add_reference::type arg2, ..., typename add_reference::type argn #define BOOST_SIGNALS2_ADD_REF_ARGS(arity) \ @@ -326,11 +329,13 @@ namespace boost slot_invoker(BOOST_SIGNALS2_ADD_REF_ARGS(BOOST_SIGNALS2_NUM_ARGS)) BOOST_PP_IF(BOOST_SIGNALS2_NUM_ARGS, :, ) #undef BOOST_SIGNALS2_ADD_REF_ARGS -// argn ( argn ) , +// m_argn +#define BOOST_SIGNALS2_M_ARG_NAME(z, n, data) BOOST_PP_CAT(m_arg, BOOST_PP_INC(n)) +// m_argn ( argn ) #define BOOST_SIGNALS2_MISC_STATEMENT(z, n, data) \ - BOOST_PP_CAT(arg, n) ( BOOST_PP_CAT(arg, n) ) -// arg1(arg1), arg2(arg2), ..., argn(argn) - BOOST_PP_ENUM_SHIFTED(BOOST_PP_INC(BOOST_SIGNALS2_NUM_ARGS), BOOST_SIGNALS2_MISC_STATEMENT, ~) + BOOST_SIGNALS2_M_ARG_NAME(~, n, ~) ( BOOST_SIGNALS2_SIGNATURE_ARG_NAME(~, n, ~) ) +// m_arg1(arg1), m_arg2(arg2), ..., m_argn(argn) + BOOST_PP_ENUM(BOOST_SIGNALS2_NUM_ARGS, BOOST_SIGNALS2_MISC_STATEMENT, ~) #undef BOOST_SIGNALS2_MISC_STATEMENT {} result_type operator ()(const connection_body_type &connectionBody) const @@ -340,22 +345,29 @@ namespace boost resolver); } private: -#define BOOST_SIGNALS2_ADD_REF_ARG_STATEMENT(z, n, data) \ - BOOST_SIGNALS2_ADD_REF_ARG(z, n, data) ; - BOOST_PP_REPEAT(BOOST_SIGNALS2_NUM_ARGS, BOOST_SIGNALS2_ADD_REF_ARG_STATEMENT, ~) -#undef BOOST_SIGNALS2_ADD_REF_ARG_STATEMENT +#define BOOST_SIGNALS2_ADD_REF_M_ARG_STATEMENT(z, n, data) \ + BOOST_SIGNALS2_ADD_REF_TYPE(~, n, ~) BOOST_SIGNALS2_M_ARG_NAME(~, n, ~) ; + BOOST_PP_REPEAT(BOOST_SIGNALS2_NUM_ARGS, BOOST_SIGNALS2_ADD_REF_M_ARG_STATEMENT, ~) +#undef BOOST_SIGNALS2_ADD_REF_M_ARG_STATEMENT #undef BOOST_SIGNALS2_ADD_REF_ARG +#undef BOOST_SIGNALS2_ADD_REF_TYPE + +// m_arg1, m_arg2, ..., m_argn +#define BOOST_SIGNALS2_M_ARG_NAMES(arity) BOOST_PP_ENUM(arity, BOOST_SIGNALS2_M_ARG_NAME, ~) result_type m_invoke(const connection_body_type &connectionBody, const void_type *) const { - connectionBody->slot.slot_function()(BOOST_SIGNALS2_SIGNATURE_ARG_NAMES(BOOST_SIGNALS2_NUM_ARGS)); + connectionBody->slot.slot_function()(BOOST_SIGNALS2_M_ARG_NAMES(BOOST_SIGNALS2_NUM_ARGS)); return void_type(); } result_type m_invoke(const connection_body_type &connectionBody, ...) const { - return connectionBody->slot.slot_function()(BOOST_SIGNALS2_SIGNATURE_ARG_NAMES(BOOST_SIGNALS2_NUM_ARGS)); + return connectionBody->slot.slot_function()(BOOST_SIGNALS2_M_ARG_NAMES(BOOST_SIGNALS2_NUM_ARGS)); } }; +#undef BOOST_SIGNALS2_M_ARG_NAMES +#undef BOOST_SIGNALS2_M_ARG_NAME + #endif // BOOST_NO_VARIADIC_TEMPLATES // a struct used to optimize (minimize) the number of shared_ptrs that need to be created // inside operator() @@ -636,9 +648,9 @@ namespace boost #endif // BOOST_NO_VARIADIC_TEMPLATES - BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)(const combiner_type &combiner = combiner_type(), + BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)(const combiner_type &combiner_arg = combiner_type(), const group_compare_type &group_compare = group_compare_type()): - _pimpl(new impl_class(combiner, group_compare)) + _pimpl(new impl_class(combiner_arg, group_compare)) {}; virtual ~BOOST_SIGNALS2_SIGNAL_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)() { @@ -695,9 +707,9 @@ namespace boost { return (*_pimpl).combiner(); } - void set_combiner(const combiner_type &combiner) + void set_combiner(const combiner_type &combiner_arg) { - return (*_pimpl).set_combiner(combiner); + return (*_pimpl).set_combiner(combiner_arg); } protected: virtual shared_ptr lock_pimpl() const diff --git a/3party/boost/boost/signals2/detail/slot_call_iterator.hpp b/3party/boost/boost/signals2/detail/slot_call_iterator.hpp index 14cce506c7..99eec1d7bb 100644 --- a/3party/boost/boost/signals2/detail/slot_call_iterator.hpp +++ b/3party/boost/boost/signals2/detail/slot_call_iterator.hpp @@ -30,8 +30,8 @@ namespace boost { class slot_call_iterator_cache { public: - slot_call_iterator_cache(const Function &f): - f(f), + slot_call_iterator_cache(const Function &f_arg): + f(f_arg), connected_slot_count(0), disconnected_slot_count(0) {} diff --git a/3party/boost/boost/signals2/preprocessed_signal.hpp b/3party/boost/boost/signals2/preprocessed_signal.hpp index 7471a40ff3..0cf31c6aca 100644 --- a/3party/boost/boost/signals2/preprocessed_signal.hpp +++ b/3party/boost/boost/signals2/preprocessed_signal.hpp @@ -44,8 +44,8 @@ namespace boost typedef typename detail::signalN::arity, Signature, Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex>::type base_type; public: - signal(const Combiner &combiner = Combiner(), const GroupCompare &group_compare = GroupCompare()): - base_type(combiner, group_compare) + signal(const Combiner &combiner_arg = Combiner(), const GroupCompare &group_compare = GroupCompare()): + base_type(combiner_arg, group_compare) {} }; } diff --git a/3party/boost/boost/spirit/home/classic/core/assert.hpp b/3party/boost/boost/spirit/home/classic/core/assert.hpp index 1de06dd555..47b1b39909 100644 --- a/3party/boost/boost/spirit/home/classic/core/assert.hpp +++ b/3party/boost/boost/spirit/home/classic/core/assert.hpp @@ -17,7 +17,7 @@ // BOOST_SPIRIT_ASSERT is used throughout the framework. It can be // overridden by the user. If BOOST_SPIRIT_ASSERT_EXCEPTION is defined, // then that will be thrown, otherwise, BOOST_SPIRIT_ASSERT simply turns -// into a plain assert() +// into a plain BOOST_ASSERT() // /////////////////////////////////////////////////////////////////////////////// #if !defined(BOOST_SPIRIT_ASSERT) @@ -30,8 +30,8 @@ BOOST_SPIRIT_ASSERT_EXCEPTION(f "(" #l "): " #x)); } while(0) #define BOOST_SPIRIT_ASSERT(x) BOOST_SPIRIT_ASSERT_AUX(__FILE__, __LINE__, x) #else - #include - #define BOOST_SPIRIT_ASSERT(x) assert(x) + #include + #define BOOST_SPIRIT_ASSERT(x) BOOST_ASSERT(x) #endif #endif // !defined(BOOST_SPIRIT_ASSERT) diff --git a/3party/boost/boost/spirit/home/classic/core/composite/directives.hpp b/3party/boost/boost/spirit/home/classic/core/composite/directives.hpp index 3c03de49e2..a66efa281f 100644 --- a/3party/boost/boost/spirit/home/classic/core/composite/directives.hpp +++ b/3party/boost/boost/spirit/home/classic/core/composite/directives.hpp @@ -364,7 +364,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN if (l || r) { - if (l.length() < r.length() && l || !r) + if ((l.length() < r.length() && l) || !r) { scan.first = save; return l; diff --git a/3party/boost/boost/spirit/home/classic/dynamic/rule_alias.hpp b/3party/boost/boost/spirit/home/classic/dynamic/rule_alias.hpp index 83c294b6ec..de291c916d 100644 --- a/3party/boost/boost/spirit/home/classic/dynamic/rule_alias.hpp +++ b/3party/boost/boost/spirit/home/classic/dynamic/rule_alias.hpp @@ -60,7 +60,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN ParserT const& get() const { - assert(ptr != 0); + BOOST_ASSERT(ptr != 0); return *ptr; } diff --git a/3party/boost/boost/spirit/home/classic/phoenix/closures.hpp b/3party/boost/boost/spirit/home/classic/phoenix/closures.hpp index 4513497c7d..6493e387a3 100644 --- a/3party/boost/boost/spirit/home/classic/phoenix/closures.hpp +++ b/3party/boost/boost/spirit/home/classic/phoenix/closures.hpp @@ -11,7 +11,7 @@ /////////////////////////////////////////////////////////////////////////////// #include -#include +#include #ifdef PHOENIX_THREADSAFE #include @@ -270,7 +270,7 @@ public: eval(TupleT const& /*args*/) const { using namespace std; - assert(frame.get() != 0); + BOOST_ASSERT(frame.get() != 0); return (*frame.get())[tuple_index()]; } diff --git a/3party/boost/boost/spirit/home/classic/tree/common.hpp b/3party/boost/boost/spirit/home/classic/tree/common.hpp index ffb4211e6a..f25d4915ef 100644 --- a/3party/boost/boost/spirit/home/classic/tree/common.hpp +++ b/3party/boost/boost/spirit/home/classic/tree/common.hpp @@ -27,6 +27,7 @@ #include #include #include // for boost::detail::iterator_traits +#include #if defined(BOOST_SPIRIT_DEBUG) && \ (BOOST_SPIRIT_DEBUG_FLAGS & BOOST_SPIRIT_DEBUG_FLAGS_NODES) @@ -462,7 +463,7 @@ public: { // See docs: reduced_node_d cannot be used with a // rule inside the []. - assert(i->children.size() == 0); + BOOST_ASSERT(i->children.size() == 0); c.insert(c.end(), i->value.begin(), i->value.end()); } return node_t(c.begin(), c.end()); @@ -504,7 +505,7 @@ public: for (typename ContainerT::const_iterator i = nodes.begin(); i != i_end; ++i) { - assert(i->children.size() == 0); + BOOST_ASSERT(i->children.size() == 0); c.insert(c.end(), i->value.begin(), i->value.end()); } return node_t(c.begin(), c.end()); diff --git a/3party/boost/boost/spirit/home/karma.hpp b/3party/boost/boost/spirit/home/karma.hpp index 63bd90dcc0..90bb3fd393 100644 --- a/3party/boost/boost/spirit/home/karma.hpp +++ b/3party/boost/boost/spirit/home/karma.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/action.hpp b/3party/boost/boost/spirit/home/karma/action.hpp index 20f45db258..dd6208e8cc 100644 --- a/3party/boost/boost/spirit/home/karma/action.hpp +++ b/3party/boost/boost/spirit/home/karma/action.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/action/action.hpp b/3party/boost/boost/spirit/home/karma/action/action.hpp index 6350fb6a64..23d621a138 100644 --- a/3party/boost/boost/spirit/home/karma/action/action.hpp +++ b/3party/boost/boost/spirit/home/karma/action/action.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include #include #include @@ -119,9 +121,17 @@ namespace boost { namespace spirit namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/auto.hpp b/3party/boost/boost/spirit/home/karma/auto.hpp index c06268992f..0996306bdf 100644 --- a/3party/boost/boost/spirit/home/karma/auto.hpp +++ b/3party/boost/boost/spirit/home/karma/auto.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/auto/auto.hpp b/3party/boost/boost/spirit/home/karma/auto/auto.hpp index b558e94334..f10778fc18 100644 --- a/3party/boost/boost/spirit/home/karma/auto/auto.hpp +++ b/3party/boost/boost/spirit/home/karma/auto/auto.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/auto/create_generator.hpp b/3party/boost/boost/spirit/home/karma/auto/create_generator.hpp index 8543db007e..7c2551b1be 100644 --- a/3party/boost/boost/spirit/home/karma/auto/create_generator.hpp +++ b/3party/boost/boost/spirit/home/karma/auto/create_generator.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/auto/meta_create.hpp b/3party/boost/boost/spirit/home/karma/auto/meta_create.hpp index 0fad4dfaa5..36adb45f01 100644 --- a/3party/boost/boost/spirit/home/karma/auto/meta_create.hpp +++ b/3party/boost/boost/spirit/home/karma/auto/meta_create.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -154,8 +154,9 @@ namespace boost { namespace spirit { namespace karma : meta_create_string {}; template - struct meta_create_impl >::type> + struct meta_create_impl + >::type> : meta_create_sequence {}; template diff --git a/3party/boost/boost/spirit/home/karma/auxiliary.hpp b/3party/boost/boost/spirit/home/karma/auxiliary.hpp index cf1dd40c65..da116c5457 100644 --- a/3party/boost/boost/spirit/home/karma/auxiliary.hpp +++ b/3party/boost/boost/spirit/home/karma/auxiliary.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/auxiliary/attr_cast.hpp b/3party/boost/boost/spirit/home/karma/auxiliary/attr_cast.hpp index a26bb84b74..9df226bd0a 100644 --- a/3party/boost/boost/spirit/home/karma/auxiliary/attr_cast.hpp +++ b/3party/boost/boost/spirit/home/karma/auxiliary/attr_cast.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/auxiliary/eol.hpp b/3party/boost/boost/spirit/home/karma/auxiliary/eol.hpp index c0d6063729..6ab7cb65a6 100644 --- a/3party/boost/boost/spirit/home/karma/auxiliary/eol.hpp +++ b/3party/boost/boost/spirit/home/karma/auxiliary/eol.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/auxiliary/eps.hpp b/3party/boost/boost/spirit/home/karma/auxiliary/eps.hpp index e492693c65..9be2a8ae2f 100644 --- a/3party/boost/boost/spirit/home/karma/auxiliary/eps.hpp +++ b/3party/boost/boost/spirit/home/karma/auxiliary/eps.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/auxiliary/lazy.hpp b/3party/boost/boost/spirit/home/karma/auxiliary/lazy.hpp index c8aea6c35a..31523f02ca 100644 --- a/3party/boost/boost/spirit/home/karma/auxiliary/lazy.hpp +++ b/3party/boost/boost/spirit/home/karma/auxiliary/lazy.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/binary.hpp b/3party/boost/boost/spirit/home/karma/binary.hpp index 053d1b6a37..50b8e70fec 100644 --- a/3party/boost/boost/spirit/home/karma/binary.hpp +++ b/3party/boost/boost/spirit/home/karma/binary.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/binary/binary.hpp b/3party/boost/boost/spirit/home/karma/binary/binary.hpp index 80d2721319..8eae4745b4 100644 --- a/3party/boost/boost/spirit/home/karma/binary/binary.hpp +++ b/3party/boost/boost/spirit/home/karma/binary/binary.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/binary/padding.hpp b/3party/boost/boost/spirit/home/karma/binary/padding.hpp index 75849ed123..fdc1917e88 100644 --- a/3party/boost/boost/spirit/home/karma/binary/padding.hpp +++ b/3party/boost/boost/spirit/home/karma/binary/padding.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/char.hpp b/3party/boost/boost/spirit/home/karma/char.hpp index ad62044dd5..dd82b7f319 100644 --- a/3party/boost/boost/spirit/home/karma/char.hpp +++ b/3party/boost/boost/spirit/home/karma/char.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/char/char.hpp b/3party/boost/boost/spirit/home/karma/char/char.hpp index 154654dbfe..bd1eced61f 100644 --- a/3party/boost/boost/spirit/home/karma/char/char.hpp +++ b/3party/boost/boost/spirit/home/karma/char/char.hpp @@ -1,4 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2010 Bryce Lelbach // // Distributed under the 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,12 +24,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include /////////////////////////////////////////////////////////////////////////////// @@ -50,6 +53,12 @@ namespace boost { namespace spirit > > : mpl::true_ {}; + template + struct use_terminal > // enables lit('x') + , typename enable_if >::type> + : mpl::true_ {}; + template struct use_terminal struct use_terminal // enables L"x" : mpl::true_ {}; - }} /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { namespace karma { using spirit::lit; // lit('x') is equivalent to 'x' + using spirit::lit_type; /////////////////////////////////////////////////////////////////////////// // @@ -242,13 +251,19 @@ namespace boost { namespace spirit { namespace karma /////////////////////////////////////////////////////////////////////////// // character set generator - template + template struct char_set - : char_generator, CharEncoding, Tag> + : char_generator + , CharEncoding, Tag> { typedef typename CharEncoding::char_type char_type; typedef CharEncoding char_encoding; + template + struct attribute + : mpl::if_c + {}; + template char_set(String const& str) { @@ -390,45 +405,65 @@ namespace boost { namespace spirit { namespace karma } }; - // char_(...) + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + template + struct make_char_direct + { + static bool const lower = + has_modifier >::value; + static bool const upper = + has_modifier >::value; + + typedef typename spirit::detail::get_encoding_with_case< + Modifiers, CharEncoding, lower || upper>::type encoding; + typedef typename detail::get_casetag< + Modifiers, lower || upper>::type tag; + + typedef typename mpl::if_< + traits::is_string + , char_set + , literal_char + >::type result_type; + + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; + } + + // char_(...), lit(...) template struct make_primitive< - terminal_ex< - tag::char_code - , fusion::vector1 - > - , Modifiers> - { - static bool const lower = - has_modifier >::value; - static bool const upper = - has_modifier >::value; + terminal_ex< + tag::char_code + , fusion::vector1 > + , Modifiers> + : detail::make_char_direct + {}; - typedef typename spirit::detail::get_encoding_with_case< - Modifiers, CharEncoding, lower || upper>::type encoding; - typedef typename detail::get_casetag< - Modifiers, lower || upper>::type tag; - - typedef typename mpl::if_< - traits::is_string - , char_set - , literal_char - >::type result_type; - - template - result_type operator()(Terminal const& term, unused_type) const - { - return result_type(fusion::at_c<0>(term.args)); - } - }; + template + struct make_primitive< + terminal_ex > + , Modifiers + , typename enable_if >::type> + : detail::make_char_direct< + typename traits::char_encoding_from_char< + typename traits::char_type_of::type>::type + , Modifiers, A0, true> + {}; + /////////////////////////////////////////////////////////////////////////// // char_("x") template struct make_primitive< terminal_ex< tag::char_code - , fusion::vector1 // For single char strings - > + , fusion::vector1 > // For single char strings , Modifiers> { static bool const lower = @@ -450,6 +485,7 @@ namespace boost { namespace spirit { namespace karma } }; + /////////////////////////////////////////////////////////////////////////// // char_('a', 'z') template struct make_primitive< diff --git a/3party/boost/boost/spirit/home/karma/char/char_class.hpp b/3party/boost/boost/spirit/home/karma/char/char_class.hpp index f8f1a79e61..ac6ab994bb 100644 --- a/3party/boost/boost/spirit/home/karma/char/char_class.hpp +++ b/3party/boost/boost/spirit/home/karma/char/char_class.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/char/char_generator.hpp b/3party/boost/boost/spirit/home/karma/char/char_generator.hpp index c46da85b26..cabd9f939d 100644 --- a/3party/boost/boost/spirit/home/karma/char/char_generator.hpp +++ b/3party/boost/boost/spirit/home/karma/char/char_generator.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/delimit_flag.hpp b/3party/boost/boost/spirit/home/karma/delimit_flag.hpp index 76c10185e5..ccaf688bc5 100644 --- a/3party/boost/boost/spirit/home/karma/delimit_flag.hpp +++ b/3party/boost/boost/spirit/home/karma/delimit_flag.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/delimit_out.hpp b/3party/boost/boost/spirit/home/karma/delimit_out.hpp index 608de0bad4..e72e219456 100644 --- a/3party/boost/boost/spirit/home/karma/delimit_out.hpp +++ b/3party/boost/boost/spirit/home/karma/delimit_out.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/alternative_function.hpp b/3party/boost/boost/spirit/home/karma/detail/alternative_function.hpp index eb4be4290e..26b153060d 100644 --- a/3party/boost/boost/spirit/home/karma/detail/alternative_function.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/alternative_function.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/as.hpp b/3party/boost/boost/spirit/home/karma/detail/as.hpp new file mode 100644 index 0000000000..e9dbd8e78b --- /dev/null +++ b/3party/boost/boost/spirit/home/karma/detail/as.hpp @@ -0,0 +1,74 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_SPIRIT_KARMA_AS_STRING_DEC_18_0644PM) +#define BOOST_SPIRIT_KARMA_AS_STRING_DEC_18_0644PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include +#include + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + // This file contains the attribute to string conversion utility. The + // utility provided also accept spirit's unused_type; all no-ops. Compiler + // optimization will easily strip these away. + /////////////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////////////// + template + inline typename spirit::result_of::attribute_as::type + as(Attribute const& attr) + { + return attribute_as::call(attr); + } + + template + inline unused_type as(unused_type) + { + return unused; + } + + /////////////////////////////////////////////////////////////////////////// + template + inline bool valid_as(Attribute const& attr) + { + return attribute_as::is_valid(attr); + } + + template + inline bool valid_as(unused_type) + { + return true; + } +}}} + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace result_of +{ + template + struct attribute_as + : traits::attribute_as + {}; + + template + struct attribute_as + { + typedef unused_type type; + }; + + template + struct attribute_as + { + typedef unused_type type; + }; +}}} + +#endif diff --git a/3party/boost/boost/spirit/home/karma/detail/attributes.hpp b/3party/boost/boost/spirit/home/karma/detail/attributes.hpp index 6889950413..b4c2526683 100644 --- a/3party/boost/boost/spirit/home/karma/detail/attributes.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/attributes.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/default_width.hpp b/3party/boost/boost/spirit/home/karma/detail/default_width.hpp index 9003884d52..52f5583d6f 100644 --- a/3party/boost/boost/spirit/home/karma/detail/default_width.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/default_width.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/enable_lit.hpp b/3party/boost/boost/spirit/home/karma/detail/enable_lit.hpp new file mode 100644 index 0000000000..2153582dce --- /dev/null +++ b/3party/boost/boost/spirit/home/karma/detail/enable_lit.hpp @@ -0,0 +1,30 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_SPIRIT_KARMA_DETAIL_ENABLE_LIT_JAN_06_2011_1009PM) +#define BOOST_SPIRIT_KARMA_DETAIL_ENABLE_LIT_JAN_06_2011_1009PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace spirit +{ + // enables lazy lit(...) for karma + template <> + struct use_lazy_terminal + : mpl::true_ {}; +}} + +#endif + diff --git a/3party/boost/boost/spirit/home/karma/detail/extract_from.hpp b/3party/boost/boost/spirit/home/karma/detail/extract_from.hpp index 610995ccbc..a3c245673d 100644 --- a/3party/boost/boost/spirit/home/karma/detail/extract_from.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/extract_from.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/fail_function.hpp b/3party/boost/boost/spirit/home/karma/detail/fail_function.hpp index 970277ce18..5310d54329 100644 --- a/3party/boost/boost/spirit/home/karma/detail/fail_function.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/fail_function.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/generate.hpp b/3party/boost/boost/spirit/home/karma/detail/generate.hpp index 4a0bf09e5e..7c8b9f4d7b 100644 --- a/3party/boost/boost/spirit/home/karma/detail/generate.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/generate.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/generate_auto.hpp b/3party/boost/boost/spirit/home/karma/detail/generate_auto.hpp index c4a7bb5e8e..c11803f7d7 100644 --- a/3party/boost/boost/spirit/home/karma/detail/generate_auto.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/generate_auto.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/generate_to.hpp b/3party/boost/boost/spirit/home/karma/detail/generate_to.hpp index a52fcf3cf2..05c715713b 100644 --- a/3party/boost/boost/spirit/home/karma/detail/generate_to.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/generate_to.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/get_casetag.hpp b/3party/boost/boost/spirit/home/karma/detail/get_casetag.hpp index 1000141d9b..1d5a464fa4 100644 --- a/3party/boost/boost/spirit/home/karma/detail/get_casetag.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/get_casetag.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/get_stricttag.hpp b/3party/boost/boost/spirit/home/karma/detail/get_stricttag.hpp index 1cd4a54472..5f03c210a6 100644 --- a/3party/boost/boost/spirit/home/karma/detail/get_stricttag.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/get_stricttag.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/output_iterator.hpp b/3party/boost/boost/spirit/home/karma/detail/output_iterator.hpp index 09ab885172..34008f6b40 100644 --- a/3party/boost/boost/spirit/home/karma/detail/output_iterator.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/output_iterator.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/pass_container.hpp b/3party/boost/boost/spirit/home/karma/detail/pass_container.hpp index 7eff6d023e..be3e2d4108 100644 --- a/3party/boost/boost/spirit/home/karma/detail/pass_container.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/pass_container.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -88,9 +89,9 @@ namespace boost { namespace spirit { namespace karma { namespace detail return true; } - // this is for the case when the current element expects an attribute + // This is for the case when the current element expects an attribute // which is a container itself, this element will get the rest of the - // attribute container + // attribute container. template bool dispatch_attribute_element(Component const& component, mpl::true_) const { @@ -107,9 +108,14 @@ namespace boost { namespace spirit { namespace karma { namespace detail typedef typename traits::attribute_of< Component, context_type>::type attribute_type; +// typedef mpl::and_< +// traits::is_container +// , is_convertible > predicate; + typedef mpl::and_< traits::is_container - , is_convertible > predicate; + , traits::handles_container + > predicate; return dispatch_attribute_element(component, predicate()); } @@ -157,9 +163,13 @@ namespace boost { namespace spirit { namespace karma { namespace detail typedef typename traits::attribute_of< Component, context_type>::type lhs_attribute; + typedef mpl::and_< + has_same_elements + , traits::handles_container + > predicate; + // false means everything went ok - return dispatch_main(component - , has_same_elements()); + return dispatch_main(component, predicate()); } F f; diff --git a/3party/boost/boost/spirit/home/karma/detail/string_compare.hpp b/3party/boost/boost/spirit/home/karma/detail/string_compare.hpp index bfe19bd7a6..313ad11157 100644 --- a/3party/boost/boost/spirit/home/karma/detail/string_compare.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/string_compare.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -32,7 +32,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail ch_lit = *++lit; } - return true; + return !ch_lit && !ch_attr; } template @@ -62,7 +62,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail ch_lit = spirit::char_class::convert::to(Tag(), *++lit); } - return true; + return !ch_lit && !ch_attr; } template diff --git a/3party/boost/boost/spirit/home/karma/detail/string_generate.hpp b/3party/boost/boost/spirit/home/karma/detail/string_generate.hpp index 3916a599f0..d0f8a73fee 100644 --- a/3party/boost/boost/spirit/home/karma/detail/string_generate.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/string_generate.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/detail/unused_delimiter.hpp b/3party/boost/boost/spirit/home/karma/detail/unused_delimiter.hpp index 09d0ba0b75..793c8f0f67 100644 --- a/3party/boost/boost/spirit/home/karma/detail/unused_delimiter.hpp +++ b/3party/boost/boost/spirit/home/karma/detail/unused_delimiter.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/directive.hpp b/3party/boost/boost/spirit/home/karma/directive.hpp index 3e1fe02545..56ef87ce0f 100644 --- a/3party/boost/boost/spirit/home/karma/directive.hpp +++ b/3party/boost/boost/spirit/home/karma/directive.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -66,4 +66,10 @@ /////////////////////////////////////////////////////////////////////////////// #include +/////////////////////////////////////////////////////////////////////////////// +// as_string and as_wstring directives +// as_string[...], as_wstring[...] +/////////////////////////////////////////////////////////////////////////////// +#include + #endif diff --git a/3party/boost/boost/spirit/home/karma/directive/as.hpp b/3party/boost/boost/spirit/home/karma/directive/as.hpp new file mode 100644 index 0000000000..95343ae09d --- /dev/null +++ b/3party/boost/boost/spirit/home/karma/directive/as.hpp @@ -0,0 +1,163 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2010 Bryce Lelbach +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(SPIRIT_KARMA_AS_DEC_18_0510PM) +#define SPIRIT_KARMA_AS_DEC_18_0510PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace spirit { namespace karma +{ + template + struct as + : stateful_tag_type + { + BOOST_SPIRIT_ASSERT_MSG( + (traits::is_container::type::value), + error_type_must_be_a_container, + (T)); + }; +}}} + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // Enablers + /////////////////////////////////////////////////////////////////////////// + // enables as_string[...] + template <> + struct use_directive + : mpl::true_ {}; + + // enables as_wstring[...] + template <> + struct use_directive + : mpl::true_ {}; + + // enables as[...] + template + struct use_directive > + : mpl::true_ + {}; +}} + +namespace boost { namespace spirit { namespace karma +{ + using spirit::as_string; + using spirit::as_string_type; + using spirit::as_wstring; + using spirit::as_wstring_type; + + /////////////////////////////////////////////////////////////////////////// + // as_directive allows to hook custom conversions to string into the + // output generation process + /////////////////////////////////////////////////////////////////////////// + template + struct as_directive + : unary_generator > + { + typedef Subject subject_type; + typedef typename subject_type::properties properties; + + as_directive(Subject const& subject) + : subject(subject) {} + + template + struct attribute + { + typedef T type; + }; + + template + bool generate(OutputIterator& sink, Context& ctx, Delimiter const& d + , Attribute const& attr) const + { + if (!traits::valid_as(attr)) + return false; + + return subject.generate(sink, ctx, d, traits::as(attr)) && + karma::delimit_out(sink, d); // always do post-delimiting + } + + template + info what(Context& context) const + { + return info("as", subject.what(context)); + } + + Subject subject; + }; + + /////////////////////////////////////////////////////////////////////////// + // Generator generators: make_xxx function (objects) + /////////////////////////////////////////////////////////////////////////// + template + struct make_directive + { + typedef as_directive result_type; + result_type operator()(unused_type, Subject const& subject + , unused_type) const + { + return result_type(subject); + } + }; + + template + struct make_directive + { + typedef as_directive result_type; + result_type operator()(unused_type, Subject const& subject + , unused_type) const + { + return result_type(subject); + } + }; + + template + struct make_directive, Subject, Modifiers> + { + typedef as_directive result_type; + result_type operator()(unused_type, Subject const& subject + , unused_type) const + { + return result_type(subject); + } + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template + struct has_semantic_action > + : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : mpl::false_ {}; // always dereference attribute if used in sequences +}}} + +#endif diff --git a/3party/boost/boost/spirit/home/karma/directive/buffer.hpp b/3party/boost/boost/spirit/home/karma/directive/buffer.hpp index f6943ddf66..b8c74ccd50 100644 --- a/3party/boost/boost/spirit/home/karma/directive/buffer.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/buffer.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include namespace boost { namespace spirit @@ -36,8 +38,8 @@ namespace boost { namespace spirit { namespace karma using spirit::buffer_type; /////////////////////////////////////////////////////////////////////////// - // omit_directive consumes the attribute of subject generator without - // generating anything + // buffer_directive buffers all generated output of the embedded generator + // and flushes it only if the whole embedded generator succeeds /////////////////////////////////////////////////////////////////////////// template struct buffer_directive : unary_generator > @@ -112,10 +114,17 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/directive/center_alignment.hpp b/3party/boost/boost/spirit/home/karma/directive/center_alignment.hpp index d244a30c55..df9247777b 100644 --- a/3party/boost/boost/spirit/home/karma/directive/center_alignment.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/center_alignment.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #include #include @@ -300,6 +302,7 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; @@ -309,6 +312,20 @@ namespace boost { namespace spirit { namespace traits karma::padding_center_alignment > : unary_has_semantic_action {}; + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container< + karma::simple_center_alignment, Attribute + , Context, Iterator> + : unary_handles_container {}; + + template + struct handles_container< + karma::padding_center_alignment + , Attribute, Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/directive/columns.hpp b/3party/boost/boost/spirit/home/karma/directive/columns.hpp index 5f51e71729..177a286601 100644 --- a/3party/boost/boost/spirit/home/karma/directive/columns.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/columns.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #include #include @@ -265,9 +267,18 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container< + karma::columns_generator, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/directive/delimit.hpp b/3party/boost/boost/spirit/home/karma/directive/delimit.hpp index 2205385746..e192d74611 100644 --- a/3party/boost/boost/spirit/home/karma/directive/delimit.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/delimit.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include #include #include @@ -170,6 +172,7 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; @@ -178,6 +181,18 @@ namespace boost { namespace spirit { namespace traits struct has_semantic_action > : unary_has_semantic_action {}; + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; + + template + struct handles_container + , Attribute, Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/directive/duplicate.hpp b/3party/boost/boost/spirit/home/karma/directive/duplicate.hpp index 866aa11004..559ff45143 100644 --- a/3party/boost/boost/spirit/home/karma/directive/duplicate.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/duplicate.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include #include #include @@ -209,9 +211,17 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/directive/encoding.hpp b/3party/boost/boost/spirit/home/karma/directive/encoding.hpp index 36f624c2fb..987f7ec62a 100644 --- a/3party/boost/boost/spirit/home/karma/directive/encoding.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/encoding.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Joel de Guzman -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/directive/left_alignment.hpp b/3party/boost/boost/spirit/home/karma/directive/left_alignment.hpp index 5926ab1e84..c8416f6c75 100644 --- a/3party/boost/boost/spirit/home/karma/directive/left_alignment.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/left_alignment.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include #include #include @@ -283,6 +285,7 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; @@ -292,6 +295,20 @@ namespace boost { namespace spirit { namespace traits karma::padding_left_alignment > : unary_has_semantic_action {}; + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container< + karma::simple_left_alignment, Attribute + , Context, Iterator> + : unary_handles_container {}; + + template + struct handles_container< + karma::padding_left_alignment + , Attribute, Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/directive/maxwidth.hpp b/3party/boost/boost/spirit/home/karma/directive/maxwidth.hpp index a888c4fac4..465671b7cb 100644 --- a/3party/boost/boost/spirit/home/karma/directive/maxwidth.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/maxwidth.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #include #include @@ -224,10 +226,17 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/directive/no_delimit.hpp b/3party/boost/boost/spirit/home/karma/directive/no_delimit.hpp index 6757a2ba0f..6ab35bfe5a 100644 --- a/3party/boost/boost/spirit/home/karma/directive/no_delimit.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/no_delimit.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include #include @@ -96,9 +98,17 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/directive/omit.hpp b/3party/boost/boost/spirit/home/karma/directive/omit.hpp index 74bb0d2e41..510ec65622 100644 --- a/3party/boost/boost/spirit/home/karma/directive/omit.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/omit.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include namespace boost { namespace spirit @@ -115,9 +117,17 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/directive/repeat.hpp b/3party/boost/boost/spirit/home/karma/directive/repeat.hpp index 90fecdc832..89035305af 100644 --- a/3party/boost/boost/spirit/home/karma/directive/repeat.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/repeat.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #include #include @@ -349,6 +351,7 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; @@ -356,6 +359,21 @@ namespace boost { namespace spirit { namespace traits template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container< + karma::repeat_generator, Attribute + , Context, Iterator> + : mpl::true_ {}; + + template + struct handles_container< + karma::strict_repeat_generator, Attribute + , Context, Iterator> + : mpl::true_ {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/directive/right_alignment.hpp b/3party/boost/boost/spirit/home/karma/directive/right_alignment.hpp index 018b99f714..7f4e454b0c 100644 --- a/3party/boost/boost/spirit/home/karma/directive/right_alignment.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/right_alignment.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #include #include @@ -293,6 +295,7 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; @@ -302,8 +305,21 @@ namespace boost { namespace spirit { namespace traits karma::padding_right_alignment > : unary_has_semantic_action {}; + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container< + karma::simple_right_alignment + , Attribute, Context, Iterator> + : unary_handles_container {}; + + template + struct handles_container< + karma::padding_right_alignment + , Attribute, Context, Iterator> + : unary_handles_container {}; }}} #endif - diff --git a/3party/boost/boost/spirit/home/karma/directive/strict_relaxed.hpp b/3party/boost/boost/spirit/home/karma/directive/strict_relaxed.hpp index 7a4fc87381..192071407f 100644 --- a/3party/boost/boost/spirit/home/karma/directive/strict_relaxed.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/strict_relaxed.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/directive/upper_lower_case.hpp b/3party/boost/boost/spirit/home/karma/directive/upper_lower_case.hpp index f86754e6ac..684fa5f918 100644 --- a/3party/boost/boost/spirit/home/karma/directive/upper_lower_case.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/upper_lower_case.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -80,7 +80,6 @@ namespace boost { namespace spirit tag::char_code const&) : Current(current) {} }; - }} #endif diff --git a/3party/boost/boost/spirit/home/karma/directive/verbatim.hpp b/3party/boost/boost/spirit/home/karma/directive/verbatim.hpp index 206d7acd0e..97695488ea 100644 --- a/3party/boost/boost/spirit/home/karma/directive/verbatim.hpp +++ b/3party/boost/boost/spirit/home/karma/directive/verbatim.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include #include @@ -94,10 +96,17 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/domain.hpp b/3party/boost/boost/spirit/home/karma/domain.hpp index a03a242731..06272e0225 100644 --- a/3party/boost/boost/spirit/home/karma/domain.hpp +++ b/3party/boost/boost/spirit/home/karma/domain.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/format.hpp b/3party/boost/boost/spirit/home/karma/format.hpp index 96f56a525f..a6aaa3fe8c 100644 --- a/3party/boost/boost/spirit/home/karma/format.hpp +++ b/3party/boost/boost/spirit/home/karma/format.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/format_auto.hpp b/3party/boost/boost/spirit/home/karma/format_auto.hpp index 1641404ed8..183ea7ed48 100644 --- a/3party/boost/boost/spirit/home/karma/format_auto.hpp +++ b/3party/boost/boost/spirit/home/karma/format_auto.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/generate.hpp b/3party/boost/boost/spirit/home/karma/generate.hpp index 9592f9d292..e29beff1bf 100644 --- a/3party/boost/boost/spirit/home/karma/generate.hpp +++ b/3party/boost/boost/spirit/home/karma/generate.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/generate_attr.hpp b/3party/boost/boost/spirit/home/karma/generate_attr.hpp index 15904c73c7..e2b6e18cdc 100644 --- a/3party/boost/boost/spirit/home/karma/generate_attr.hpp +++ b/3party/boost/boost/spirit/home/karma/generate_attr.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/generator.hpp b/3party/boost/boost/spirit/home/karma/generator.hpp index 7d2f3ccb63..a8f06c616e 100644 --- a/3party/boost/boost/spirit/home/karma/generator.hpp +++ b/3party/boost/boost/spirit/home/karma/generator.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/meta_compiler.hpp b/3party/boost/boost/spirit/home/karma/meta_compiler.hpp index 517eca81fc..9928579e7c 100644 --- a/3party/boost/boost/spirit/home/karma/meta_compiler.hpp +++ b/3party/boost/boost/spirit/home/karma/meta_compiler.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/nonterminal.hpp b/3party/boost/boost/spirit/home/karma/nonterminal.hpp index 5e62493c3c..3425bf37d5 100644 --- a/3party/boost/boost/spirit/home/karma/nonterminal.hpp +++ b/3party/boost/boost/spirit/home/karma/nonterminal.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/nonterminal/debug_handler.hpp b/3party/boost/boost/spirit/home/karma/nonterminal/debug_handler.hpp index d85e8b5e54..07d5a3e2a0 100644 --- a/3party/boost/boost/spirit/home/karma/nonterminal/debug_handler.hpp +++ b/3party/boost/boost/spirit/home/karma/nonterminal/debug_handler.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/nonterminal/debug_handler_state.hpp b/3party/boost/boost/spirit/home/karma/nonterminal/debug_handler_state.hpp index 1f2f51f785..cffe9d1ffa 100644 --- a/3party/boost/boost/spirit/home/karma/nonterminal/debug_handler_state.hpp +++ b/3party/boost/boost/spirit/home/karma/nonterminal/debug_handler_state.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/nonterminal/detail/fcall.hpp b/3party/boost/boost/spirit/home/karma/nonterminal/detail/fcall.hpp index cff3c762aa..8a5cf173ee 100644 --- a/3party/boost/boost/spirit/home/karma/nonterminal/detail/fcall.hpp +++ b/3party/boost/boost/spirit/home/karma/nonterminal/detail/fcall.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Joel de Guzman -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/nonterminal/detail/generator_binder.hpp b/3party/boost/boost/spirit/home/karma/nonterminal/detail/generator_binder.hpp index 3f53d4bd83..ea9516f2ac 100644 --- a/3party/boost/boost/spirit/home/karma/nonterminal/detail/generator_binder.hpp +++ b/3party/boost/boost/spirit/home/karma/nonterminal/detail/generator_binder.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Joel de Guzman -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/nonterminal/detail/parameterized.hpp b/3party/boost/boost/spirit/home/karma/nonterminal/detail/parameterized.hpp index 952e562ac3..a0f5957bb1 100644 --- a/3party/boost/boost/spirit/home/karma/nonterminal/detail/parameterized.hpp +++ b/3party/boost/boost/spirit/home/karma/nonterminal/detail/parameterized.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Joel de Guzman -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser // Copyright (c) 2009 Francois Barel // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/karma/nonterminal/grammar.hpp b/3party/boost/boost/spirit/home/karma/nonterminal/grammar.hpp index b07d2ff42f..d69b429df7 100644 --- a/3party/boost/boost/spirit/home/karma/nonterminal/grammar.hpp +++ b/3party/boost/boost/spirit/home/karma/nonterminal/grammar.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Joel de Guzman -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -23,12 +24,8 @@ namespace boost { namespace spirit { namespace karma { template < - typename OutputIterator - , typename T1 = unused_type - , typename T2 = unused_type - , typename T3 = unused_type - , typename T4 = unused_type - > + typename OutputIterator, typename T1, typename T2, typename T3 + , typename T4> struct grammar : proto::extends< typename proto::terminal< @@ -115,7 +112,23 @@ namespace boost { namespace spirit { namespace karma std::string name_; }; +}}} +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template < + typename IteratorA, typename IteratorB, typename Attribute + , typename Context, typename T1, typename T2, typename T3, typename T4> + struct handles_container< + karma::grammar, Attribute, Context + , IteratorB> + : detail::nonterminal_handles_container< + typename attribute_of< + karma::grammar + , Context, IteratorB + >::type, Attribute> + {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/nonterminal/nonterminal_fwd.hpp b/3party/boost/boost/spirit/home/karma/nonterminal/nonterminal_fwd.hpp new file mode 100644 index 0000000000..bc974f2e0f --- /dev/null +++ b/3party/boost/boost/spirit/home/karma/nonterminal/nonterminal_fwd.hpp @@ -0,0 +1,31 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_SPIRIT_KARMA_NONTERMINAL_FWD_DEC_18_2010_0913PM) +#define BOOST_SPIRIT_KARMA_NONTERMINAL_FWD_DEC_18_2010_0913PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include + +namespace boost { namespace spirit { namespace karma +{ + // forward declaration only + template < + typename OutputIterator, typename T1 = unused_type + , typename T2 = unused_type, typename T3 = unused_type + , typename T4 = unused_type> + struct rule; + + template < + typename OutputIterator, typename T1 = unused_type + , typename T2 = unused_type, typename T3 = unused_type + , typename T4 = unused_type> + struct grammar; +}}} + +#endif diff --git a/3party/boost/boost/spirit/home/karma/nonterminal/rule.hpp b/3party/boost/boost/spirit/home/karma/nonterminal/rule.hpp index 4ddebf06b3..af91d705c8 100644 --- a/3party/boost/boost/spirit/home/karma/nonterminal/rule.hpp +++ b/3party/boost/boost/spirit/home/karma/nonterminal/rule.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Joel de Guzman -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -64,12 +65,8 @@ namespace boost { namespace spirit { namespace karma using spirit::locals; template < - typename OutputIterator - , typename T1 = unused_type - , typename T2 = unused_type - , typename T3 = unused_type - , typename T4 = unused_type - > + typename OutputIterator, typename T1, typename T2, typename T3 + , typename T4> struct rule : proto::extends< typename proto::terminal< @@ -181,7 +178,7 @@ namespace boost { namespace spirit { namespace karma // from an uninitialized one. Did you mean to refer to the right // hand side rule instead of assigning from it? In this case you // should write lhs = rhs.alias(); - BOOST_ASSERT(rhs.f); + BOOST_ASSERT(rhs.f && "Did you mean rhs.alias() instead of rhs?"); f = rhs.f; name_ = rhs.name_; @@ -389,6 +386,33 @@ namespace boost { namespace spirit { namespace karma #endif }}} +namespace boost { namespace spirit { namespace traits +{ + namespace detail + { + template + struct nonterminal_handles_container + : mpl::and_< + traits::is_container + , is_convertible > + {}; + } + + /////////////////////////////////////////////////////////////////////////// + template < + typename IteratorA, typename IteratorB, typename Attribute + , typename Context, typename T1, typename T2, typename T3, typename T4> + struct handles_container< + karma::rule, Attribute, Context + , IteratorB> + : detail::nonterminal_handles_container< + typename attribute_of< + karma::rule + , Context, IteratorB + >::type, Attribute> + {}; +}}} + #if defined(BOOST_MSVC) # pragma warning(pop) #endif diff --git a/3party/boost/boost/spirit/home/karma/nonterminal/simple_trace.hpp b/3party/boost/boost/spirit/home/karma/nonterminal/simple_trace.hpp index bd248a3911..cd5b3ed6ea 100644 --- a/3party/boost/boost/spirit/home/karma/nonterminal/simple_trace.hpp +++ b/3party/boost/boost/spirit/home/karma/nonterminal/simple_trace.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/numeric.hpp b/3party/boost/boost/spirit/home/karma/numeric.hpp index ebe3661929..474fe8edcb 100644 --- a/3party/boost/boost/spirit/home/karma/numeric.hpp +++ b/3party/boost/boost/spirit/home/karma/numeric.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/numeric/bool.hpp b/3party/boost/boost/spirit/home/karma/numeric/bool.hpp index 924720e341..b6469e1472 100644 --- a/3party/boost/boost/spirit/home/karma/numeric/bool.hpp +++ b/3party/boost/boost/spirit/home/karma/numeric/bool.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -11,9 +11,12 @@ #endif #include +#include +#include #include #include +#include #include #include #include @@ -21,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -36,8 +40,8 @@ namespace boost { namespace spirit struct bool_policies; /////////////////////////////////////////////////////////////////////// - // This one is the class that the user can instantiate directly in - // order to create a customized int generator + // This is the class that the user can instantiate directly in + // order to create a customized bool generator template > struct bool_generator : spirit::terminal > @@ -98,6 +102,12 @@ namespace boost { namespace spirit , tag::stateful_tag, 1> : mpl::true_ {}; + // enables lit(bool) + template + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; }} /////////////////////////////////////////////////////////////////////////////// @@ -111,6 +121,7 @@ namespace boost { namespace spirit { namespace karma using spirit::false__type; using spirit::lit; // lit(true) is equivalent to true + using spirit::lit_type; /////////////////////////////////////////////////////////////////////////// // This specialization is used for bool generators not having a direct @@ -337,7 +348,7 @@ namespace boost { namespace spirit { namespace karma /////////////////////////////////////////////////////////////////////////// template struct make_primitive< - terminal_ex >, Modifiers> + terminal_ex >, Modifiers> : detail::make_bool_direct {}; template @@ -378,6 +389,32 @@ namespace boost { namespace spirit { namespace karma struct make_primitive : detail::basic_bool_literal {}; + template + struct make_primitive< + terminal_ex > + , Modifiers + , typename enable_if >::type> + : detail::basic_bool_literal + { + static bool const lower = + has_modifier >::value; + static bool const upper = + has_modifier >::value; + + typedef literal_bool_generator< + bool + , typename spirit::detail::get_encoding_with_case< + Modifiers, unused_type, lower || upper>::type + , typename detail::get_casetag::type + , bool_policies<>, true + > result_type; + + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/numeric/bool_policies.hpp b/3party/boost/boost/spirit/home/karma/numeric/bool_policies.hpp index d91a65d2a4..5afc0b8a6a 100644 --- a/3party/boost/boost/spirit/home/karma/numeric/bool_policies.hpp +++ b/3party/boost/boost/spirit/home/karma/numeric/bool_policies.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/numeric/detail/bool_utils.hpp b/3party/boost/boost/spirit/home/karma/numeric/detail/bool_utils.hpp index 155f1e2222..7747c753a4 100644 --- a/3party/boost/boost/spirit/home/karma/numeric/detail/bool_utils.hpp +++ b/3party/boost/boost/spirit/home/karma/numeric/detail/bool_utils.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp b/3party/boost/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp index 7b67cc4833..6bb19409a5 100644 --- a/3party/boost/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp +++ b/3party/boost/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/numeric/detail/real_utils.hpp b/3party/boost/boost/spirit/home/karma/numeric/detail/real_utils.hpp index 14e461f6b7..76b00d5ac0 100644 --- a/3party/boost/boost/spirit/home/karma/numeric/detail/real_utils.hpp +++ b/3party/boost/boost/spirit/home/karma/numeric/detail/real_utils.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/numeric/int.hpp b/3party/boost/boost/spirit/home/karma/numeric/int.hpp index dda51bf935..e394bca6e6 100644 --- a/3party/boost/boost/spirit/home/karma/numeric/int.hpp +++ b/3party/boost/boost/spirit/home/karma/numeric/int.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -11,9 +11,13 @@ #endif #include +#include +#include +#include #include #include +#include #include #include #include @@ -23,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -35,7 +40,7 @@ namespace boost { namespace spirit namespace tag { template - struct int_tag {}; + struct int_generator {}; } namespace karma @@ -45,7 +50,7 @@ namespace boost { namespace spirit // order to create a customized int generator template struct int_generator - : spirit::terminal > + : spirit::terminal > {}; } @@ -72,7 +77,7 @@ namespace boost { namespace spirit /////////////////////////////////////////////////////////////////////////// template <> - struct use_terminal // enables lit(short(0)) + struct use_terminal // enables lit(short(0)) : mpl::true_ {}; template <> @@ -134,23 +139,30 @@ namespace boost { namespace spirit /////////////////////////////////////////////////////////////////////////// // enables any custom int_generator template - struct use_terminal > + struct use_terminal > : mpl::true_ {}; // enables any custom int_generator(...) template struct use_terminal, fusion::vector1 > + , terminal_ex + , fusion::vector1 > > : mpl::true_ {}; // enables *lazy* custom int_generator template struct use_lazy_terminal< karma::domain - , tag::int_tag + , tag::int_generator , 1 // arity > : mpl::true_ {}; + // enables lit(int) + template + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; }} /////////////////////////////////////////////////////////////////////////////// @@ -168,6 +180,7 @@ namespace boost { namespace spirit { namespace karma #endif using spirit::lit; // lit(1) is equivalent to 1 + using spirit::lit_type; /////////////////////////////////////////////////////////////////////////// // This specialization is used for int generators not having a direct @@ -364,7 +377,7 @@ namespace boost { namespace spirit { namespace karma #endif template - struct make_primitive, Modifiers> + struct make_primitive, Modifiers> : detail::make_int {}; /////////////////////////////////////////////////////////////////////////// @@ -421,8 +434,8 @@ namespace boost { namespace spirit { namespace karma template struct make_primitive< - terminal_ex, fusion::vector1 > - , Modifiers> + terminal_ex + , fusion::vector1 >, Modifiers> : detail::make_int_direct {}; /////////////////////////////////////////////////////////////////////////// @@ -454,7 +467,7 @@ namespace boost { namespace spirit { namespace karma template struct make_primitive - : detail::basic_int_literal {}; + : detail::basic_int_literal {}; template struct make_primitive @@ -470,6 +483,33 @@ namespace boost { namespace spirit { namespace karma : detail::basic_int_literal {}; #endif + // lit(int) + template + struct make_primitive< + terminal_ex > + , Modifiers + , typename enable_if >::type> + : detail::basic_int_literal + { + static bool const lower = + has_modifier >::value; + static bool const upper = + has_modifier >::value; + + typedef literal_int_generator< + A0 + , typename spirit::detail::get_encoding_with_case< + Modifiers, unused_type, lower || upper>::type + , typename detail::get_casetag::type + , 10, false, true + > result_type; + + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/numeric/real.hpp b/3party/boost/boost/spirit/home/karma/numeric/real.hpp index 2fc50d7598..5df512773f 100644 --- a/3party/boost/boost/spirit/home/karma/numeric/real.hpp +++ b/3party/boost/boost/spirit/home/karma/numeric/real.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -11,8 +11,12 @@ #endif #include +#include +#include +#include #include #include +#include #include #include #include @@ -23,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -40,7 +45,7 @@ namespace boost { namespace spirit struct real_policies; /////////////////////////////////////////////////////////////////////// - // This one is the class that the user can instantiate directly in + // This is the class that the user can instantiate directly in // order to create a customized real generator template > struct real_generator @@ -71,7 +76,7 @@ namespace boost { namespace spirit /////////////////////////////////////////////////////////////////////////// template <> - struct use_terminal // enables lit(1.of) + struct use_terminal // enables lit(1.0f) : mpl::true_ {}; template <> @@ -132,6 +137,12 @@ namespace boost { namespace spirit , 1 // arity > : mpl::true_ {}; + // enables lit(double) + template + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; }} /////////////////////////////////////////////////////////////////////////////// @@ -406,6 +417,33 @@ namespace boost { namespace spirit { namespace karma struct make_primitive : detail::basic_real_literal {}; + // lit(double) + template + struct make_primitive< + terminal_ex > + , Modifiers + , typename enable_if >::type> + : detail::basic_real_literal + { + static bool const lower = + has_modifier >::value; + static bool const upper = + has_modifier >::value; + + typedef literal_real_generator< + A0, real_policies + , typename spirit::detail::get_encoding_with_case< + Modifiers, unused_type, lower || upper>::type + , typename detail::get_casetag::type + , true + > result_type; + + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; }}} #endif // defined(BOOST_SPIRIT_KARMA_REAL_FEB_26_2007_0512PM) diff --git a/3party/boost/boost/spirit/home/karma/numeric/real_policies.hpp b/3party/boost/boost/spirit/home/karma/numeric/real_policies.hpp index 1fdd41ee3b..1f3ebd1b3c 100644 --- a/3party/boost/boost/spirit/home/karma/numeric/real_policies.hpp +++ b/3party/boost/boost/spirit/home/karma/numeric/real_policies.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/numeric/uint.hpp b/3party/boost/boost/spirit/home/karma/numeric/uint.hpp index 4e58f6dc3e..2a6437f13d 100644 --- a/3party/boost/boost/spirit/home/karma/numeric/uint.hpp +++ b/3party/boost/boost/spirit/home/karma/numeric/uint.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -13,10 +13,11 @@ #include #include #include -#include +#include #include #include +#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -37,7 +39,7 @@ namespace boost { namespace spirit namespace tag { template - struct uint_tag {}; + struct uint_generator {}; } namespace karma @@ -47,7 +49,7 @@ namespace boost { namespace spirit // order to create a customized int generator template struct uint_generator - : spirit::terminal > + : spirit::terminal > {}; } @@ -177,23 +179,29 @@ namespace boost { namespace spirit /////////////////////////////////////////////////////////////////////////// // enables any custom uint_generator template - struct use_terminal > + struct use_terminal > : mpl::true_ {}; // enables any custom uint_generator(...) template struct use_terminal, fusion::vector1 > + , terminal_ex, fusion::vector1 > > : mpl::true_ {}; // enables *lazy* custom uint_generator template struct use_lazy_terminal< karma::domain - , tag::uint_tag + , tag::uint_generator , 1 // arity > : mpl::true_ {}; + // enables lit(uint) + template + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; }} /////////////////////////////////////////////////////////////////////////////// @@ -217,6 +225,7 @@ namespace boost { namespace spirit { namespace karma using spirit::hex_type; using spirit::lit; // lit(1U) is equivalent to 1U + using spirit::lit_type; /////////////////////////////////////////////////////////////////////////// // This specialization is used for unsigned int generators not having a @@ -407,7 +416,7 @@ namespace boost { namespace spirit { namespace karma #endif template - struct make_primitive, Modifiers> + struct make_primitive, Modifiers> : detail::make_uint {}; /////////////////////////////////////////////////////////////////////////// @@ -476,10 +485,11 @@ namespace boost { namespace spirit { namespace karma template struct make_primitive< - terminal_ex, fusion::vector1 > + terminal_ex, fusion::vector1 > , Modifiers> : detail::make_uint_direct {}; + /////////////////////////////////////////////////////////////////////////// namespace detail { template @@ -526,6 +536,33 @@ namespace boost { namespace spirit { namespace karma : detail::basic_uint_literal {}; #endif + // lit(uint) + template + struct make_primitive< + terminal_ex > + , Modifiers + , typename enable_if >::type> + : detail::basic_uint_literal + { + static bool const lower = + has_modifier >::value; + static bool const upper = + has_modifier >::value; + + typedef literal_uint_generator< + A0 + , typename spirit::detail::get_encoding_with_case< + Modifiers, unused_type, lower || upper>::type + , typename detail::get_casetag::type + , 10, true + > result_type; + + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/operator.hpp b/3party/boost/boost/spirit/home/karma/operator.hpp index b9f611f24a..0f76299af9 100644 --- a/3party/boost/boost/spirit/home/karma/operator.hpp +++ b/3party/boost/boost/spirit/home/karma/operator.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/operator/alternative.hpp b/3party/boost/boost/spirit/home/karma/operator/alternative.hpp index 691f92f12e..7babd0b29a 100644 --- a/3party/boost/boost/spirit/home/karma/operator/alternative.hpp +++ b/3party/boost/boost/spirit/home/karma/operator/alternative.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include #include #include @@ -87,7 +89,8 @@ namespace boost { namespace spirit { namespace karma { // Put all the element attributes in a tuple typedef typename traits::build_attribute_sequence< - Elements, Context, mpl::identity, Iterator + Elements, Context, traits::alternative_attribute_transform + , Iterator, karma::domain >::type all_attributes; // Ok, now make a variant over the attribute sequence. Note that @@ -176,6 +179,7 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : nary_has_semantic_action {}; @@ -183,6 +187,19 @@ namespace boost { namespace spirit { namespace traits template struct has_semantic_action > : nary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : nary_handles_container {}; + + template + struct handles_container, Attribute + , Context, Iterator> + : nary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/operator/and_predicate.hpp b/3party/boost/boost/spirit/home/karma/operator/and_predicate.hpp index 96a68c51a7..dc821f14b2 100644 --- a/3party/boost/boost/spirit/home/karma/operator/and_predicate.hpp +++ b/3party/boost/boost/spirit/home/karma/operator/and_predicate.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,6 +17,8 @@ #include #include #include +#include +#include namespace boost { namespace spirit { @@ -77,10 +79,17 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/operator/kleene.hpp b/3party/boost/boost/spirit/home/karma/operator/kleene.hpp index e2aac1314e..6c75381155 100644 --- a/3party/boost/boost/spirit/home/karma/operator/kleene.hpp +++ b/3party/boost/boost/spirit/home/karma/operator/kleene.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Joel de Guzman -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -156,6 +157,7 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; @@ -163,6 +165,19 @@ namespace boost { namespace spirit { namespace traits template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : mpl::true_ {}; + + template + struct handles_container, Attribute + , Context, Iterator> + : mpl::true_ {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/operator/list.hpp b/3party/boost/boost/spirit/home/karma/operator/list.hpp index f4cfce2f82..6fe688204a 100644 --- a/3party/boost/boost/spirit/home/karma/operator/list.hpp +++ b/3party/boost/boost/spirit/home/karma/operator/list.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,7 @@ #include #include #include +#include #include namespace boost { namespace spirit @@ -189,6 +190,7 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : binary_has_semantic_action {}; @@ -196,6 +198,19 @@ namespace boost { namespace spirit { namespace traits template struct has_semantic_action > : binary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : mpl::true_ {}; + + template + struct handles_container, Attribute + , Context, Iterator> + : mpl::true_ {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/operator/not_predicate.hpp b/3party/boost/boost/spirit/home/karma/operator/not_predicate.hpp index 295023f87a..01c97f29c8 100644 --- a/3party/boost/boost/spirit/home/karma/operator/not_predicate.hpp +++ b/3party/boost/boost/spirit/home/karma/operator/not_predicate.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,6 +17,8 @@ #include #include #include +#include +#include namespace boost { namespace spirit { @@ -78,10 +80,17 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/operator/optional.hpp b/3party/boost/boost/spirit/home/karma/operator/optional.hpp index f3ad5fe009..bfa39fc7d4 100644 --- a/3party/boost/boost/spirit/home/karma/operator/optional.hpp +++ b/3party/boost/boost/spirit/home/karma/operator/optional.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Joel de Guzman -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include #include #include @@ -87,10 +89,17 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/operator/plus.hpp b/3party/boost/boost/spirit/home/karma/operator/plus.hpp index 5847251a8c..9674ecd435 100644 --- a/3party/boost/boost/spirit/home/karma/operator/plus.hpp +++ b/3party/boost/boost/spirit/home/karma/operator/plus.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Joel de Guzman -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #include @@ -169,6 +171,7 @@ namespace boost { namespace spirit { namespace karma namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; @@ -176,6 +179,19 @@ namespace boost { namespace spirit { namespace traits template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; + + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/operator/sequence.hpp b/3party/boost/boost/spirit/home/karma/operator/sequence.hpp index 5d7d999c7a..0133554f1f 100644 --- a/3party/boost/boost/spirit/home/karma/operator/sequence.hpp +++ b/3party/boost/boost/spirit/home/karma/operator/sequence.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -23,6 +23,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -88,41 +91,6 @@ namespace boost { namespace spirit { namespace karma { namespace detail { - template - struct attribute_size - : fusion::result_of::size - {}; - - template <> - struct attribute_size - : mpl::int_<0> - {}; - - template - inline typename enable_if< - mpl::and_< - fusion::traits::is_sequence - , mpl::not_ > > - , std::size_t - >::type - attr_size(Attribute const& attr) - { - return fusion::size(attr); - } - - template - inline typename enable_if< - traits::is_container, std::size_t - >::type - attr_size(Attribute const& attr) - { - return attr.size(); - } - - inline std::size_t attr_size(unused_type) - { - return 0; - } /////////////////////////////////////////////////////////////////////// // This is a wrapper for any iterator allowing to pass a reference of it @@ -147,6 +115,9 @@ namespace boost { namespace spirit { namespace karma indirect_iterator(Iterator& iter) : iter_(&iter) {} + indirect_iterator(indirect_iterator const& iter) + : iter_(iter.iter_) + {} private: friend class boost::iterator_core_access; @@ -176,6 +147,12 @@ namespace boost { namespace spirit { namespace karma typedef indirect_iterator type; }; + template + struct make_indirect_iterator > + { + typedef indirect_iterator type; + }; + template <> struct make_indirect_iterator { @@ -199,8 +176,9 @@ namespace boost { namespace spirit { namespace karma { // Put all the element attributes in a tuple typedef typename traits::build_attribute_sequence< - Elements, Context, mpl::identity, Iterator>::type - all_attributes; + Elements, Context, traits::sequence_attribute_transform + , Iterator, karma::domain + >::type all_attributes; // Now, build a fusion vector over the attributes. Note // that build_fusion_vector 1) removes all unused attributes @@ -242,6 +220,8 @@ namespace boost { namespace spirit { namespace karma bool r = spirit::any_if(elements, attr , fail_function(sink, ctx, d), predicate()); + typedef typename traits::attribute_size::type size_type; + // fail generating if sequences have not the same (logical) length return !r && (!Strict::value || // This ignores container element count (which is not good), @@ -252,7 +232,7 @@ namespace boost { namespace spirit { namespace karma // is not optimal but much better than letting _all_ repetitive // components fail. Pred1::value || - std::size_t(detail::attribute_size::value) == detail::attr_size(attr_)); + size_type(traits::sequence_size::value) == traits::size(attr_)); } // Special case when Attribute is an stl container and the sequence's @@ -359,10 +339,20 @@ namespace boost { namespace spirit { namespace karma struct make_composite : detail::make_sequence::value> {}; + + /////////////////////////////////////////////////////////////////////////// + // Helper template allowing to get the required container type for a rule + // attribute, which is part of a sequence. + template + struct make_sequence_iterator_range + { + typedef iterator_range > type; + }; }}} namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : nary_has_semantic_action {}; @@ -370,6 +360,19 @@ namespace boost { namespace spirit { namespace traits template struct has_semantic_action > : nary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : nary_handles_container {}; + + template + struct handles_container, Attribute + , Context, Iterator> + : nary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/phoenix_attributes.hpp b/3party/boost/boost/spirit/home/karma/phoenix_attributes.hpp index 4c0aa6a6b3..dd1869678c 100644 --- a/3party/boost/boost/spirit/home/karma/phoenix_attributes.hpp +++ b/3party/boost/boost/spirit/home/karma/phoenix_attributes.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/reference.hpp b/3party/boost/boost/spirit/home/karma/reference.hpp index 87e55ed229..4ee5a78659 100644 --- a/3party/boost/boost/spirit/home/karma/reference.hpp +++ b/3party/boost/boost/spirit/home/karma/reference.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Joel de Guzman -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include namespace boost { namespace spirit { namespace karma @@ -72,7 +74,18 @@ namespace boost { namespace spirit { namespace karma boost::reference_wrapper ref; }; +}}} +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : handles_container::type, Attribute + , Context, Iterator> + {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/karma/stream.hpp b/3party/boost/boost/spirit/home/karma/stream.hpp index a2d7ff217b..77636f8296 100644 --- a/3party/boost/boost/spirit/home/karma/stream.hpp +++ b/3party/boost/boost/spirit/home/karma/stream.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/stream/detail/format_manip.hpp b/3party/boost/boost/spirit/home/karma/stream/detail/format_manip.hpp index 204818fe59..0c771fc554 100644 --- a/3party/boost/boost/spirit/home/karma/stream/detail/format_manip.hpp +++ b/3party/boost/boost/spirit/home/karma/stream/detail/format_manip.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/stream/detail/format_manip_auto.hpp b/3party/boost/boost/spirit/home/karma/stream/detail/format_manip_auto.hpp index e7691aab95..9fd4ff5af1 100644 --- a/3party/boost/boost/spirit/home/karma/stream/detail/format_manip_auto.hpp +++ b/3party/boost/boost/spirit/home/karma/stream/detail/format_manip_auto.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/stream/detail/iterator_sink.hpp b/3party/boost/boost/spirit/home/karma/stream/detail/iterator_sink.hpp index 0fba3d39e7..95a57d42f1 100644 --- a/3party/boost/boost/spirit/home/karma/stream/detail/iterator_sink.hpp +++ b/3party/boost/boost/spirit/home/karma/stream/detail/iterator_sink.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boist.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/stream/format_manip.hpp b/3party/boost/boost/spirit/home/karma/stream/format_manip.hpp index 7e3bd78d93..2f6c29e7ce 100644 --- a/3party/boost/boost/spirit/home/karma/stream/format_manip.hpp +++ b/3party/boost/boost/spirit/home/karma/stream/format_manip.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/stream/format_manip_attr.hpp b/3party/boost/boost/spirit/home/karma/stream/format_manip_attr.hpp index 1d89b2d17a..08d53a6d4f 100644 --- a/3party/boost/boost/spirit/home/karma/stream/format_manip_attr.hpp +++ b/3party/boost/boost/spirit/home/karma/stream/format_manip_attr.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/stream/ostream_iterator.hpp b/3party/boost/boost/spirit/home/karma/stream/ostream_iterator.hpp index cd509b6286..8a517287a7 100644 --- a/3party/boost/boost/spirit/home/karma/stream/ostream_iterator.hpp +++ b/3party/boost/boost/spirit/home/karma/stream/ostream_iterator.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/stream/stream.hpp b/3party/boost/boost/spirit/home/karma/stream/stream.hpp index 27de760229..3ecfe5f187 100644 --- a/3party/boost/boost/spirit/home/karma/stream/stream.hpp +++ b/3party/boost/boost/spirit/home/karma/stream/stream.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/string.hpp b/3party/boost/boost/spirit/home/karma/string.hpp index 3e2c454922..8326a149bd 100644 --- a/3party/boost/boost/spirit/home/karma/string.hpp +++ b/3party/boost/boost/spirit/home/karma/string.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/karma/string/lit.hpp b/3party/boost/boost/spirit/home/karma/string/lit.hpp index 706874e60c..89e4ca5473 100644 --- a/3party/boost/boost/spirit/home/karma/string/lit.hpp +++ b/3party/boost/boost/spirit/home/karma/string/lit.hpp @@ -1,4 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2010 Bryce Lelbach // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -15,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -31,6 +34,7 @@ #include #include #include +#include #include /////////////////////////////////////////////////////////////////////////////// @@ -63,11 +67,20 @@ namespace boost { namespace spirit , 1 /*arity*/ > : mpl::true_ {}; + // enables lit(str) + template + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; }} /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { namespace karma { + using spirit::lit; + using spirit::lit_type; + /////////////////////////////////////////////////////////////////////////// // generate literal strings from a given parameter /////////////////////////////////////////////////////////////////////////// @@ -98,7 +111,7 @@ namespace boost { namespace spirit { namespace karma return karma::detail::string_generate(sink , traits::extract_from(attr, context) - , char_encoding(), Tag()) && + , char_encoding(), Tag()) && karma::delimit_out(sink, d); // always do post-delimiting } @@ -160,9 +173,13 @@ namespace boost { namespace spirit { namespace karma // fail if attribute isn't matched by immediate literal typedef typename attribute::type attribute_type; + typedef typename spirit::result_of::extract_from::type + extracted_string_type; + using spirit::traits::get_c_string; if (!detail::string_compare( - get_c_string(traits::extract_from(attr, context)) + get_c_string( + traits::extract_from(attr, context)) , get_c_string(str_), char_encoding(), Tag())) { return false; @@ -244,34 +261,72 @@ namespace boost { namespace spirit { namespace karma } }; + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + template + struct make_string_direct + { + static bool const lower = + has_modifier >::value; + static bool const upper = + has_modifier >::value; + + typedef typename add_const::type const_string; + typedef literal_string< + const_string + , typename spirit::detail::get_encoding_with_case< + Modifiers, unused_type, lower || upper>::type + , typename detail::get_casetag::type + , no_attribute + > result_type; + + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; + } + + // string("..."), lit("...") template struct make_primitive< - terminal_ex< - tag::char_code - , fusion::vector1 > - , Modifiers> - { - static bool const lower = - has_modifier >::value; - static bool const upper = - has_modifier >::value; - - typedef typename add_const::type const_string; - typedef literal_string< - const_string - , typename spirit::detail::get_encoding_with_case< - Modifiers, unused_type, lower || upper>::type - , typename detail::get_casetag::type - , false - > result_type; - - template - result_type operator()(Terminal const& term, unused_type) const - { - return result_type(fusion::at_c<0>(term.args)); - } - }; + terminal_ex< + tag::char_code + , fusion::vector1 > + , Modifiers> + : detail::make_string_direct + {}; + template + struct make_primitive< + terminal_ex > + , Modifiers + , typename enable_if >::type> + : detail::make_string_direct< + typename traits::char_encoding_from_char< + typename traits::char_type_of::type>::type + , Modifiers, A0, true> + {}; }}} // namespace boost::spirit::karma +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : mpl::false_ {}; + + template + struct handles_container, Attribute, Context, Iterator> + : mpl::false_ {}; +}}} + #endif diff --git a/3party/boost/boost/spirit/home/karma/string/symbols.hpp b/3party/boost/boost/spirit/home/karma/string/symbols.hpp index 278515cd65..04dcbfcdd2 100644 --- a/3party/boost/boost/spirit/home/karma/string/symbols.hpp +++ b/3party/boost/boost/spirit/home/karma/string/symbols.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -9,7 +9,10 @@ #include #include #include +#include +#include #include +#include #include #include #include @@ -31,12 +34,12 @@ /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { namespace traits { - template + template struct symbols_lookup { typedef mpl::eval_if - , detail::value_at_c + , traits::detail::value_at_c , detail::add_const_ref > sequence_type; typedef typename mpl::eval_if @@ -84,12 +87,12 @@ namespace boost { namespace spirit { namespace traits } }; - template + template struct symbols_value { typedef mpl::eval_if - , detail::value_at_c + , traits::detail::value_at_c , mpl::identity > sequence_type; typedef typename mpl::eval_if @@ -208,11 +211,12 @@ namespace boost { namespace spirit { namespace karma typedef Attribute type; }; - symbols() + symbols(std::string const& name = "symbols") : base_type(terminal::make(reference_(*this))) , add(*this) , remove(*this) , lookup(new Lookup()) + , name_(name) {} symbols(symbols const& syms) @@ -220,6 +224,7 @@ namespace boost { namespace spirit { namespace karma , add(*this) , remove(*this) , lookup(syms.lookup) + , name_(syms.name_) {} template @@ -228,14 +233,17 @@ namespace boost { namespace spirit { namespace karma , add(*this) , remove(*this) , lookup(syms.lookup) + , name_(syms.name_) {} template - symbols(Symbols const& syms, Data const& data) + symbols(Symbols const& syms, Data const& data + , std::string const& name = "symbols") : base_type(terminal::make(reference_(*this))) , add(*this) , remove(*this) , lookup(new Lookup()) + , name_(name) { typename range_const_iterator::type si = boost::begin(syms); typename range_const_iterator::type di = boost::begin(data); @@ -247,6 +255,7 @@ namespace boost { namespace spirit { namespace karma operator=(symbols const& rhs) { *lookup = *rhs.lookup; + name_ = rhs.name_; return *this; } @@ -255,6 +264,7 @@ namespace boost { namespace spirit { namespace karma operator=(symbols const& rhs) { *lookup = *rhs.lookup; + name_ = rhs.name_; return *this; } @@ -343,7 +353,16 @@ namespace boost { namespace spirit { namespace karma template info what(Context&) const { - return info("symbols"); + return info(name_); + } + + void name(std::string const &str) + { + name_ = str; + } + std::string const &name() const + { + return name_; } /////////////////////////////////////////////////////////////////////// @@ -416,6 +435,7 @@ namespace boost { namespace spirit { namespace karma adder add; remover remove; shared_ptr lookup; + std::string name_; }; /////////////////////////////////////////////////////////////////////////// @@ -446,11 +466,12 @@ namespace boost { namespace spirit { namespace karma typedef Attribute type; }; - symbols() + symbols(std::string const& name = "symbols") : base_type(terminal::make(reference_(*this))) , add(*this) , remove(*this) , lookup(new Lookup()) + , name_(name) {} symbols(symbols const& syms) @@ -458,6 +479,7 @@ namespace boost { namespace spirit { namespace karma , add(*this) , remove(*this) , lookup(syms.lookup) + , name_(syms.name_) {} template @@ -466,14 +488,17 @@ namespace boost { namespace spirit { namespace karma , add(*this) , remove(*this) , lookup(syms.lookup) + , name_(syms.name_) {} template - symbols(Symbols const& syms, Data const& data) + symbols(Symbols const& syms, Data const& data + , std::string const& name = "symbols") : base_type(terminal::make(reference_(*this))) , add(*this) , remove(*this) , lookup(new Lookup()) + , name_(name) { typename range_const_iterator::type si = boost::begin(syms); typename range_const_iterator::type di = boost::begin(data); @@ -485,6 +510,7 @@ namespace boost { namespace spirit { namespace karma operator=(symbols const& rhs) { *lookup = *rhs.lookup; + name_ = rhs.name_; return *this; } @@ -493,6 +519,7 @@ namespace boost { namespace spirit { namespace karma operator=(symbols const& rhs) { *lookup = *rhs.lookup; + name_ = rhs.name_; return *this; } @@ -585,7 +612,16 @@ namespace boost { namespace spirit { namespace karma template info what(Context&) const { - return info("symbols"); + return info(name_); + } + + void name(std::string const &str) + { + name_ = str; + } + std::string const &name() const + { + return name_; } /////////////////////////////////////////////////////////////////////// @@ -658,6 +694,7 @@ namespace boost { namespace spirit { namespace karma adder add; remover remove; shared_ptr lookup; + std::string name_; }; /////////////////////////////////////////////////////////////////////////// diff --git a/3party/boost/boost/spirit/home/karma/what.hpp b/3party/boost/boost/spirit/home/karma/what.hpp index 9c0efe324b..c65937e454 100644 --- a/3party/boost/boost/spirit/home/karma/what.hpp +++ b/3party/boost/boost/spirit/home/karma/what.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex.hpp b/3party/boost/boost/spirit/home/lex.hpp index 997d6d44bc..5d95f5bfc8 100644 --- a/3party/boost/boost/spirit/home/lex.hpp +++ b/3party/boost/boost/spirit/home/lex.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex/argument.hpp b/3party/boost/boost/spirit/home/lex/argument.hpp index bbd6cc6fdc..f7f6675ccb 100644 --- a/3party/boost/boost/spirit/home/lex/argument.hpp +++ b/3party/boost/boost/spirit/home/lex/argument.hpp @@ -1,5 +1,6 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2010 Bryce Lelbach // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -91,6 +92,14 @@ namespace boost { namespace spirit { namespace lex template void eval(Env const& env) const { + typedef typename + remove_const< + typename mpl::at_c::type + >::type + context_type; + + typedef typename context_type::state_name_type string; + fusion::at_c<4>(env.args()).set_state_name( traits::get_c_string(actor_.eval(env))); } diff --git a/3party/boost/boost/spirit/home/lex/detail/sequence_function.hpp b/3party/boost/boost/spirit/home/lex/detail/sequence_function.hpp index 8d154d85f0..0f52da8413 100644 --- a/3party/boost/boost/spirit/home/lex/detail/sequence_function.hpp +++ b/3party/boost/boost/spirit/home/lex/detail/sequence_function.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -18,18 +18,20 @@ namespace boost { namespace spirit { namespace lex { namespace detail template struct sequence_collect_function { - sequence_collect_function(LexerDef& def_, String const& state_) - : def(def_), state(state_) {} + sequence_collect_function(LexerDef& def_, String const& state_ + , String const& targetstate_) + : def(def_), state(state_), targetstate(targetstate_) {} template bool operator()(Component const& component) const { - component.collect(def, state); + component.collect(def, state, targetstate); return false; // execute for all sequence elements } LexerDef& def; String const& state; + String const& targetstate; private: // silence MSVC warning C4512: assignment operator could not be generated diff --git a/3party/boost/boost/spirit/home/lex/domain.hpp b/3party/boost/boost/spirit/home/lex/domain.hpp index aa32c64570..e5aec86abd 100644 --- a/3party/boost/boost/spirit/home/lex/domain.hpp +++ b/3party/boost/boost/spirit/home/lex/domain.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Joel de Guzman -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex/lexer.hpp b/3party/boost/boost/spirit/home/lex/lexer.hpp index c34fcfb92f..535ec284ea 100644 --- a/3party/boost/boost/spirit/home/lex/lexer.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex/lexer/action.hpp b/3party/boost/boost/spirit/home/lex/lexer/action.hpp index d99c80b6e8..8de0c87b71 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/action.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/action.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -29,11 +29,12 @@ namespace boost { namespace spirit { namespace lex : subject(subject), f(f) {} template - void collect(LexerDef& lexdef, String const& state) const + void collect(LexerDef& lexdef, String const& state + , String const& targetstate) const { // collect the token definition information for the token_def // this action is attached to - subject.collect(lexdef, state); + subject.collect(lexdef, state, targetstate); } template diff --git a/3party/boost/boost/spirit/home/lex/lexer/char_token_def.hpp b/3party/boost/boost/spirit/home/lex/lexer/char_token_def.hpp index 9c8f5950e4..7d341002ed 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/char_token_def.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/char_token_def.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -44,13 +44,10 @@ namespace boost { namespace spirit , fusion::vector1 > > : mpl::true_ {}; - }} namespace boost { namespace spirit { namespace lex { - using spirit::lit; // lit('x') is equivalent to 'x' - // use char_ from standard character set by default using spirit::standard::char_type; using spirit::standard::char_; @@ -68,13 +65,31 @@ namespace boost { namespace spirit { namespace lex typedef typename CharEncoding::char_type char_type; char_token_def(char_type ch) - : ch(ch), unique_id_(std::size_t(~0)) {} + : ch(ch), unique_id_(std::size_t(~0)), token_state_(std::size_t(~0)) + {} template - void collect(LexerDef& lexdef, String const& state) const + void collect(LexerDef& lexdef, String const& state + , String const& targetstate) const { + std::size_t state_id = lexdef.add_state(state.c_str()); + + // If the following assertion fires you are probably trying to use + // a single char_token_def instance in more than one lexer state. + // This is not possible. Please create a separate token_def instance + // from the same regular expression for each lexer state it needs + // to be associated with. + BOOST_ASSERT( + (std::size_t(~0) == token_state_ || state_id == token_state_) && + "Can't use single char_token_def with more than one lexer state"); + + char_type const* target = targetstate.empty() ? 0 : targetstate.c_str(); + if (target) + lexdef.add_state(target); + + token_state_ = state_id; unique_id_ = lexdef.add_token (state.c_str(), ch - , static_cast(ch)); + , static_cast(ch), target); } template @@ -82,9 +97,11 @@ namespace boost { namespace spirit { namespace lex std::size_t id() const { return static_cast(ch); } std::size_t unique_id() const { return unique_id_; } + std::size_t state() const { return token_state_; } char_type ch; mutable std::size_t unique_id_; + mutable std::size_t token_state_; }; /////////////////////////////////////////////////////////////////////////// @@ -164,7 +181,6 @@ namespace boost { namespace spirit { namespace lex return result_type(fusion::at_c<0>(term.args)[0]); } }; - }}} // namespace boost::spirit::lex #endif diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexer.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexer.hpp index 8de5d030ca..f69cd23608 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexer.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexer.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -121,7 +121,8 @@ namespace boost { namespace spirit { namespace lex { if (id_type() == token_id) token_id = static_cast(c); - def.def.add_token (def.state.c_str(), c, token_id); + def.def.add_token (def.state.c_str(), c, token_id + , def.targetstate.empty() ? 0 : def.targetstate.c_str()); return *this; } @@ -135,7 +136,8 @@ namespace boost { namespace spirit { namespace lex { if (id_type() == token_id) token_id = def.def.get_next_id(); - def.def.add_token (def.state.c_str(), s, token_id); + def.def.add_token (def.state.c_str(), s, token_id + , def.targetstate.empty() ? 0 : def.targetstate.c_str()); return *this; } @@ -213,7 +215,7 @@ namespace boost { namespace spirit { namespace lex template void compile2pass(TokenExpr const& expr) { - expr.collect(def, state); + expr.collect(def, state, targetstate); expr.add_actions(def); } @@ -225,9 +227,11 @@ namespace boost { namespace spirit { namespace lex compile2pass(compile(expr)); } - lexer_def_(LexerDef& def_, string_type const& state_) + lexer_def_(LexerDef& def_, string_type const& state_ + , string_type const& targetstate_ = string_type()) : proto_base_type(terminal_type::make(alias())) - , add(this_()), add_pattern(this_()), def(def_), state(state_) + , add(this_()), add_pattern(this_()), def(def_) + , state(state_), targetstate(targetstate_) {} // allow to switch states @@ -235,9 +239,15 @@ namespace boost { namespace spirit { namespace lex { return lexer_def_(def, state); } - lexer_def_ operator()(string_type const& state) const + lexer_def_ operator()(char_type const* state + , char_type const* targetstate) const { - return lexer_def_(def, state); + return lexer_def_(def, state, targetstate); + } + lexer_def_ operator()(string_type const& state + , string_type const& targetstate = string_type()) const + { + return lexer_def_(def, state, targetstate); } // allow to assign a token definition expression @@ -261,6 +271,7 @@ namespace boost { namespace spirit { namespace lex private: LexerDef& def; string_type state; + string_type targetstate; private: // silence MSVC warning C4512: assignment operator could not be generated @@ -329,7 +340,7 @@ namespace boost { namespace spirit { namespace lex // avoid warnings about using 'this' in constructor lexer& this_() { return *this; } - typename Lexer::id_type next_token_id; + std::size_t next_token_id; // has to be an integral type public: typedef Lexer lexer_type; @@ -342,7 +353,7 @@ namespace boost { namespace spirit { namespace lex typedef std::basic_string string_type; lexer(unsigned int flags = match_flags::match_default - , id_type first_id = min_token_id) + , id_type first_id = id_type(min_token_id)) : lexer_type(flags) , next_token_id(first_id) , self(this_(), lexer_type::initial_state()) @@ -360,7 +371,7 @@ namespace boost { namespace spirit { namespace lex { return this->lexer_type::add_state(state); } // create a unique token id - id_type get_next_id() { return next_token_id++; } + id_type get_next_id() { return id_type(next_token_id++); } lexer_def self; // allow for easy token definition }; diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexertl/functor.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexertl/functor.hpp index 4f8d206023..530bc26788 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexertl/functor.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexertl/functor.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -134,6 +134,8 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl template static result_type& get_next(MultiPass& mp, result_type& result) { + typedef typename result_type::id_type id_type; + shared& data = mp.shared()->ftor; for(;;) { @@ -147,7 +149,11 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl data.reset_value(); Iterator end = data.get_first(); std::size_t unique_id = boost::lexer::npos; - std::size_t id = data.next(end, unique_id); + bool prev_bol = false; + + // lexer matching might change state + std::size_t state = data.get_state(); + std::size_t id = data.next(end, unique_id, prev_bol); if (boost::lexer::npos == id) { // no match #if defined(BOOST_SPIRIT_LEXERTL_DEBUG) @@ -156,7 +162,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl for (std::size_t i = 0; i < 10 && it != data.get_last(); ++it, ++i) next += *it; - std::cerr << "Not matched, in state: " << data.get_state() + std::cerr << "Not matched, in state: " << state << ", lookahead: >" << next << "<" << std::endl; #endif return result = result_type(0); @@ -177,19 +183,21 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl next += *it; std::cerr << "Matched: " << id << ", in state: " - << data.get_state() << ", string: >" + << state << ", string: >" << std::basic_string(data.get_first(), end) << "<" << ", lookahead: >" << next << "<" << std::endl; + if (data.get_state() != state) { + std::cerr << "Switched to state: " + << data.get_state() << std::endl; + } } #endif - // invoke_actions might change state, id, data.first_, and/or end - std::size_t state = data.get_state(); - // account for a possibly pending lex::more(), i.e. moving // data.first_ back to the start of the previously matched token. bool adjusted = data.adjust_start(); - // invoke attached semantic actions, if defined + // invoke attached semantic actions, if defined, might change + // state, id, data.first_, and/or end BOOST_SCOPED_ENUM(pass_flags) pass = data.invoke_actions(state, id, unique_id, end); @@ -198,23 +206,35 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // using data.set_value(), advancing 'data.first_' past the // matched sequence assign_on_exit on_exit(data.get_first(), end); - return result = result_type(id, state, data.get_value()); + return result = result_type(id_type(id), state, data.get_value()); } else if (pass_flags::pass_normal == pass) { // return matched token, advancing 'data.first_' past the // matched sequence assign_on_exit on_exit(data.get_first(), end); - return result = result_type(id, state, data.get_first(), end); + return result = result_type(id_type(id), state, data.get_first(), end); } else if (pass_flags::pass_fail == pass) { +#if defined(BOOST_SPIRIT_LEXERTL_DEBUG) + std::cerr << "Matching forced to fail" << std::endl; +#endif // if the data.first_ got adjusted above, revert this adjustment if (adjusted) data.revert_adjust_start(); // one of the semantic actions signaled no-match - return result = result_type(0); + data.reset_bol(prev_bol); + if (state != data.get_state()) + continue; // retry matching if state has changed + + // if the state is unchanged repeating the match wouldn't + // move the input forward, causing an infinite loop + return result = result_type(0); } +#if defined(BOOST_SPIRIT_LEXERTL_DEBUG) + std::cerr << "Token ignored, continuing matching" << std::endl; +#endif // if this token needs to be ignored, just repeat the matching, // while starting right after the current match data.get_first() = end; diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexertl/functor_data.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexertl/functor_data.hpp index 786d6fad06..f611cc6db8 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexertl/functor_data.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexertl/functor_data.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -25,12 +25,12 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl /////////////////////////////////////////////////////////////////////// template - struct data; // no default specialization + class data; // no default specialization /////////////////////////////////////////////////////////////////////// // neither supports state, nor actors template - struct data + class data { protected: typedef typename @@ -98,7 +98,9 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // The following assertion fires most likely because you are // using lexer semantic actions without using the actor_lexer // as the base class for your token definition class. - BOOST_ASSERT(false); + BOOST_ASSERT(false && + "Are you using lexer semantic actions without using the " + "actor_lexer base?"); return it; } @@ -115,7 +117,9 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // The following assertion fires most likely because you are // using lexer semantic actions without using the actor_lexer // as the base class for your token definition class. - BOOST_ASSERT(false); + BOOST_ASSERT(false && + "Are you using lexer semantic actions without using the " + "actor_lexer base?"); } bool adjust_start() { return false; } void revert_adjust_start() {} @@ -127,12 +131,14 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // // This function does nothing as long as no semantic actions are // used. - bool lookahead(std::size_t id) + bool lookahead(std::size_t id, std::size_t state = std::size_t(~0)) { // The following assertion fires most likely because you are // using lexer semantic actions without using the actor_lexer // as the base class for your token definition class. - BOOST_ASSERT(false); + BOOST_ASSERT(false && + "Are you using lexer semantic actions without using the " + "actor_lexer base?"); return false; } @@ -141,8 +147,10 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // The function next() tries to match the next token from the // underlying input sequence. - std::size_t next(Iterator& end, std::size_t& unique_id) + std::size_t next(Iterator& end, std::size_t& unique_id, bool& prev_bol) { + prev_bol = bol_; + typedef basic_iterator_tokeniser tokenizer; return tokenizer::next(state_machine_, bol_, end, last_ , unique_id); @@ -169,6 +177,8 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl bool has_value() const { return false; } void reset_value() {} + void reset_bol(bool bol) { bol_ = bol; } + protected: Iterator& first_; Iterator last_; @@ -184,10 +194,10 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl }; /////////////////////////////////////////////////////////////////////// - // doesn't support lexer semantic actions + // doesn't support lexer semantic actions, but supports state template - struct data - : data + class data + : public data { protected: typedef data base_type; @@ -236,8 +246,10 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // The function next() tries to match the next token from the // underlying input sequence. - std::size_t next(Iterator& end, std::size_t& unique_id) + std::size_t next(Iterator& end, std::size_t& unique_id, bool& prev_bol) { + prev_bol = this->bol_; + typedef basic_iterator_tokeniser tokenizer; return tokenizer::next(this->state_machine_, state_, this->bol_, end, this->get_eoi(), unique_id); @@ -257,8 +269,8 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl /////////////////////////////////////////////////////////////////////// // does support lexer semantic actions, may support state template - struct data - : data + class data + : public data { public: typedef semantic_actions @@ -285,7 +297,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl : base_type(data_, first, last) , actions_(data_.actions_), hold_() , value_(iterator_range(first, last)) - , has_hold_(false), has_value_(false) {} + , has_value_(false), has_hold_(false) {} // invoke attached semantic actions, if defined BOOST_SCOPED_ENUM(pass_flags) invoke_actions(std::size_t state @@ -323,11 +335,18 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // support function lex::lookahead. It can be used to implement // lookahead for lexer engines not supporting constructs like flex' // a/b (match a, but only when followed by b) - bool lookahead(std::size_t id) + bool lookahead(std::size_t id, std::size_t state = std::size_t(~0)) { - Iterator end = this->get_first(); + Iterator end = end_; std::size_t unique_id = boost::lexer::npos; - return id == this->next(end, unique_id); + bool bol = this->bol_; + + if (std::size_t(~0) == state) + state = this->state_; + + typedef basic_iterator_tokeniser tokenizer; + return id == tokenizer::next(this->state_machine_, state, + bol, end, this->get_eoi(), unique_id); } // The adjust_start() and revert_adjust_start() are helper @@ -383,7 +402,6 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl data& operator= (data const&); }; } - }}}} #endif diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexertl/generate_static.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexertl/generate_static.hpp index 63679005d8..c44c23dcef 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexertl/generate_static.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexertl/generate_static.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2008-2009 Ben Hanson -// Copyright (c) 2008-2010 Hartmut Kaiser +// Copyright (c) 2008-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -830,7 +830,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl std::size_t const lookups_ = sm_.data()._lookup->front()->size(); os_ << "// Copyright (c) 2008-2009 Ben Hanson\n"; - os_ << "// Copyright (c) 2008-2010 Hartmut Kaiser\n"; + os_ << "// Copyright (c) 2008-2011 Hartmut Kaiser\n"; os_ << "//\n"; os_ << "// Distributed under the Boost Software License, " "Version 1.0. (See accompanying\n"; diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexertl/iterator.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexertl/iterator.hpp index 01d2a73fd0..f2793ba802 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexertl/iterator.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexertl/iterator.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -89,6 +89,11 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // create an end iterator usable for end of range checking iterator() {} + // (wash): < mgaunard> T it; T it2 = ++it; doesn't ocmpile + // < mgaunard> this gets fixed by adding + iterator(const base_type& base) + : base_type(base) { } + // set the new required state for the underlying lexer object std::size_t set_state(std::size_t state) { diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexertl/iterator_tokenizer.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexertl/iterator_tokenizer.hpp index d4709c125e..131cf6684c 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexertl/iterator_tokenizer.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexertl/iterator_tokenizer.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexertl/lexer.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexertl/lexer.hpp index 7073f462fb..06501d9053 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexertl/lexer.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexertl/lexer.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -25,6 +25,8 @@ #include #endif +#include + namespace boost { namespace spirit { namespace lex { namespace lexertl { /////////////////////////////////////////////////////////////////////////// @@ -145,9 +147,11 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl class lexer { private: - struct dummy { void true_() {}; }; + struct dummy { void true_() {} }; typedef void (dummy::*safe_bool)(); + static std::size_t const all_states_id = static_cast(-2); + public: operator safe_bool() const { return initialized_dfa_ ? &dummy::true_ : 0; } @@ -156,6 +160,8 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl char_type; typedef std::basic_string string_type; + typedef boost::lexer::basic_rules basic_rules_type; + // Every lexer type to be used as a lexer for Spirit has to conform to // a public interface . typedef Token token_type; @@ -215,18 +221,32 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl public: // interface for token definition management std::size_t add_token(char_type const* state, char_type tokendef, - std::size_t token_id) + std::size_t token_id, char_type const* targetstate) { add_state(state); initialized_dfa_ = false; - return rules_.add(state, detail::escape(tokendef), token_id, state); + if (state == all_states()) + return rules_.add(state, detail::escape(tokendef), token_id, rules_.dot()); + + if (0 == targetstate) + targetstate = state; + else + add_state(targetstate); + return rules_.add(state, detail::escape(tokendef), token_id, targetstate); } std::size_t add_token(char_type const* state, string_type const& tokendef, - std::size_t token_id) + std::size_t token_id, char_type const* targetstate) { add_state(state); initialized_dfa_ = false; - return rules_.add(state, tokendef, token_id, state); + if (state == all_states()) + return rules_.add(state, tokendef, token_id, rules_.dot()); + + if (0 == targetstate) + targetstate = state; + else + add_state(targetstate); + return rules_.add(state, tokendef, token_id, targetstate); } // interface for pattern definition management @@ -249,6 +269,9 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl } std::size_t add_state(char_type const* state) { + if (state == all_states()) + return all_states_id; + std::size_t stateid = rules_.state(state); if (boost::lexer::npos == stateid) { stateid = rules_.add_state(state); @@ -260,20 +283,34 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl { return string_type(rules_.initial()); } + string_type all_states() const + { + return string_type(rules_.all_states()); + } // Register a semantic action with the given id template - void add_action(id_type unique_id, std::size_t state, F act) + void add_action(std::size_t unique_id, std::size_t state, F act) { // If you see an error here stating add_action is not a member of - // fusion::unused_type the you are probably having semantic actions + // fusion::unused_type then you are probably having semantic actions // attached to at least one token in the lexer definition without // using the lex::lexertl::actor_lexer<> as its base class. typedef typename Functor::wrap_action_type wrapper_type; - actions_.add_action(unique_id, state, wrapper_type::call(act)); + if (state == all_states_id) { + // add the action to all known states + typedef typename + basic_rules_type::string_size_t_map::value_type + state_type; + BOOST_FOREACH(state_type const& s, rules_.statemap()) + actions_.add_action(unique_id, s.second, wrapper_type::call(act)); + } + else { + actions_.add_action(unique_id, state, wrapper_type::call(act)); + } } // template -// void add_action(id_type unique_id, char_type const* state, F act) +// void add_action(std::size_t unique_id, char_type const* state, F act) // { // typedef typename Functor::wrap_action_type wrapper_type; // actions_.add_action(unique_id, add_state(state), wrapper_type::call(act)); @@ -304,7 +341,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // lexertl specific data mutable boost::lexer::basic_state_machine state_machine_; boost::lexer::regex_flags flags_; - boost::lexer::basic_rules rules_; + basic_rules_type rules_; typename Functor::semantic_actions_type actions_; mutable bool initialized_dfa_; diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexertl/semantic_action_data.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexertl/semantic_action_data.hpp index 1bb84b7c15..30748c574d 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexertl/semantic_action_data.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexertl/semantic_action_data.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -35,8 +35,8 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl typedef boost::function functor_wrapper_type; // add a semantic action function object - template - void add_action(Idtype unique_id, std::size_t, F act) + template + void add_action(std::size_t unique_id, std::size_t, F act) { if (actions_.size() <= unique_id) actions_.resize(unique_id + 1); @@ -75,8 +75,8 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl typedef boost::function functor_wrapper_type; // add a semantic action function object - template - void add_action(Idtype unique_id, std::size_t state, F act) + template + void add_action(std::size_t unique_id, std::size_t state, F act) { if (actions_.size() <= state) actions_.resize(state + 1); diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexertl/static_functor_data.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexertl/static_functor_data.hpp index 130b39fd57..efa854fdc1 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexertl/static_functor_data.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexertl/static_functor_data.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -39,12 +39,12 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl /////////////////////////////////////////////////////////////////////// template - struct static_data; // no default specialization + class static_data; // no default specialization /////////////////////////////////////////////////////////////////////// // doesn't support no state and no actors template - struct static_data + class static_data { protected: typedef typename @@ -117,7 +117,9 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // The following assertion fires most likely because you are // using lexer semantic actions without using the actor_lexer // as the base class for your token definition class. - BOOST_ASSERT(false); + BOOST_ASSERT(false && + "Are you using lexer semantic actions without using the " + "actor_lexer base?"); return it; } @@ -134,7 +136,9 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // The following assertion fires most likely because you are // using lexer semantic actions without using the actor_lexer // as the base class for your token definition class. - BOOST_ASSERT(false); + BOOST_ASSERT(false && + "Are you using lexer semantic actions without using the " + "actor_lexer base?"); } bool adjust_start() { return false; } void revert_adjust_start() {} @@ -146,12 +150,14 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // // This function does nothing as long as no semantic actions are // used. - bool lookahead(std::size_t id) + bool lookahead(std::size_t id, std::size_t state = std::size_t(~0)) { // The following assertion fires most likely because you are // using lexer semantic actions without using the actor_lexer // as the base class for your token definition class. - BOOST_ASSERT(false); + BOOST_ASSERT(false && + "Are you using lexer semantic actions without using the " + "actor_lexer base?"); return false; } @@ -160,9 +166,11 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // The function next() tries to match the next token from the // underlying input sequence. - std::size_t next(Iterator& end, std::size_t& unique_id) + std::size_t next(Iterator& end, std::size_t& unique_id, bool& prev_bol) { - std::size_t state; + prev_bol = bol_; + + std::size_t state = 0; return next_token_(state, bol_, end, last_, unique_id); } @@ -187,6 +195,8 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl bool has_value() const { return false; } void reset_value() {} + void reset_bol(bool bol) { bol_ = bol; } + protected: Iterator& first_; Iterator last_; @@ -202,10 +212,10 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl }; /////////////////////////////////////////////////////////////////////// - // doesn't support no actors + // doesn't support no actors, but does support states template - struct static_data - : static_data + class static_data + : public static_data { protected: typedef static_data base_type; @@ -257,8 +267,9 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // The function next() tries to match the next token from the // underlying input sequence. - std::size_t next(Iterator& end, std::size_t& unique_id) + std::size_t next(Iterator& end, std::size_t& unique_id, bool& prev_bol) { + prev_bol = this->bol_; return this->next_token_(state_, this->bol_, end, this->last_ , unique_id); } @@ -278,8 +289,8 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl /////////////////////////////////////////////////////////////////////// // does support actors, but may have no state template - struct static_data - : static_data + class static_data + : public static_data { public: typedef semantic_actions @@ -345,11 +356,17 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // support function lex::lookahead. It can be used to implement // lookahead for lexer engines not supporting constructs like flex' // a/b (match a, but only when followed by b) - bool lookahead(std::size_t id) + bool lookahead(std::size_t id, std::size_t state = std::size_t(~0)) { - Iterator end = this->first_; + Iterator end = end_; std::size_t unique_id = boost::lexer::npos; - return id == this->next(end, unique_id); + bool bol = this->bol_; + + if (std::size_t(~0) == state) + state = this->state_; + + return id == this->next_token_( + state, bol, end, this->last_, unique_id); } // The adjust_start() and revert_adjust_start() are helper @@ -405,7 +422,6 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl static_data& operator= (static_data const&); }; } - }}}} #endif diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexertl/static_lexer.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexertl/static_lexer.hpp index 7b06169366..d6deffc886 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexertl/static_lexer.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexertl/static_lexer.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -112,7 +112,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl class static_lexer { private: - struct dummy { void true_() {}; }; + struct dummy { void true_() {} }; typedef void (dummy::*safe_bool)(); public: @@ -195,12 +195,13 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl public: // interface for token definition management - std::size_t add_token (char_type const*, char_type, std::size_t) + std::size_t add_token (char_type const*, char_type, std::size_t + , char_type const*) { return unique_id_++; } std::size_t add_token (char_type const*, string_type const& - , std::size_t) + , std::size_t, char_type const*) { return unique_id_++; } diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexertl/static_version.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexertl/static_version.hpp index ee49ab6aa4..8163dc53c5 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexertl/static_version.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexertl/static_version.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexertl/token.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexertl/token.hpp index fb9538fb9c..a1b4a9005d 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexertl/token.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexertl/token.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -53,6 +53,8 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // by this token type. // HasState A mpl::bool_ indicating, whether this token type // should support lexer states. + // Idtype The type to use for the token id (defaults to + // std::size_t). // // It is possible to use other token types with the spirit::lex // framework as well. If you plan to use a different type as your token @@ -82,7 +84,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // // and: // - // token(std::size_t id, std::size_t state, + // token(Idtype id, std::size_t state, // iterator_type first, iterator_type last); // // where: id: token id @@ -101,31 +103,33 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // Additionally, you will have to implement a couple of helper functions // in the same namespace as the token type: a comparison operator==() to // compare your token instances, a token_is_valid() function and different - // construct() function overloads as described below. + // specializations of the Spirit customization point + // assign_to_attribute_from_value as shown below. // /////////////////////////////////////////////////////////////////////////// template - , typename HasState = mpl::true_> + , typename HasState = mpl::true_ + , typename Idtype = std::size_t> struct token; /////////////////////////////////////////////////////////////////////////// // This specialization of the token type doesn't contain any item data and // doesn't support working with lexer states. /////////////////////////////////////////////////////////////////////////// - template - struct token + template + struct token { typedef Iterator iterator_type; typedef mpl::false_ has_state; - typedef std::size_t id_type; + typedef Idtype id_type; typedef unused_type token_value_type; // default constructed tokens correspond to EOI tokens - token() : id_(boost::lexer::npos) {} + token() : id_(id_type(boost::lexer::npos)) {} // construct an invalid token - explicit token(int) : id_(0) {} + explicit token(int) : id_(id_type(0)) {} token(id_type id, std::size_t) : id_(id) {} @@ -135,8 +139,8 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl #if defined(BOOST_SPIRIT_DEBUG) token(id_type id, std::size_t, Iterator const& first , Iterator const& last) - : id_(id) - , matched_(first, last) + : matched_(first, last) + , id_(id) {} #else token(id_type id, std::size_t, Iterator const&, Iterator const&) @@ -166,34 +170,29 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // constructed iterator_range token& operator= (token const& rhs) { + if (this != &rhs) + { + id_ = rhs.id_; + matched_ = rhs.matched_; + } return *this; } #endif std::pair matched_; #endif -// works only starting MSVC V8 -#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1400) - private: - struct dummy { void true_() {}; }; - typedef void (dummy::*safe_bool)(); - - public: - operator safe_bool() const { return is_valid() ? &dummy::true_ : 0; } -#endif - protected: id_type id_; // token id, 0 if nothing has been matched }; #if defined(BOOST_SPIRIT_DEBUG) template + , typename AttributeTypes, typename HasState, typename Idtype> inline std::basic_ostream& operator<< (std::basic_ostream& os - , token const& t) + , token const& t) { - if (t) { + if (t.is_valid()) { Iterator end = t.matched_.second; for (Iterator it = t.matched_.first; it != end; ++it) os << *it; @@ -209,12 +208,12 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // This specialization of the token type doesn't contain any item data but // supports working with lexer states. /////////////////////////////////////////////////////////////////////////// - template - struct token - : token + template + struct token + : token { private: - typedef token base_type; + typedef token base_type; public: typedef typename base_type::id_type id_type; @@ -242,6 +241,20 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl std::size_t state() const { return state_; } +#if defined(BOOST_SPIRIT_DEBUG) && BOOST_WORKAROUND(BOOST_MSVC, == 1600) + // workaround for MSVC10 which has problems copying a default + // constructed iterator_range + token& operator= (token const& rhs) + { + if (this != &rhs) + { + this->base_type::operator=(static_cast(rhs)); + state_ = rhs.state_; + } + return *this; + } +#endif + protected: std::size_t state_; // lexer state this token was matched in }; @@ -254,7 +267,7 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl namespace detail { /////////////////////////////////////////////////////////////////////// - // Metafunction to calculate the type of the variant data item to be + // Meta-function to calculate the type of the variant data item to be // stored with each token instance. // // Note: The iterator pair needs to be the first type in the list of @@ -305,15 +318,16 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl {}; } - template - struct token : token + template + struct token : token { private: // precondition assertions #if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) BOOST_STATIC_ASSERT((mpl::is_sequence::value || is_same::value)); #endif - typedef token base_type; + typedef token base_type; protected: // If no additional token value types are given, the the token will @@ -374,10 +388,11 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl /////////////////////////////////////////////////////////////////////////// // tokens are considered equal, if their id's match (these are unique) - template + template inline bool - operator== (token const& lhs, - token const& rhs) + operator== (token const& lhs, + token const& rhs) { return lhs.id() == rhs.id(); } @@ -387,13 +402,13 @@ namespace boost { namespace spirit { namespace lex { namespace lexertl // validate a token instance. It has to be defined in the same namespace // as the token class itself to allow ADL to find it. /////////////////////////////////////////////////////////////////////////// - template + template inline bool - token_is_valid(token const& t) + token_is_valid(token const& t) { return t.is_valid(); } - }}}} namespace boost { namespace spirit { namespace traits @@ -407,12 +422,12 @@ namespace boost { namespace spirit { namespace traits // This is called from the parse function of token_def if the token_def // has been defined to carry a special attribute type template + , typename HasState, typename Idtype> struct assign_to_attribute_from_value > + , lex::lexertl::token > { static void - call(lex::lexertl::token const& t + call(lex::lexertl::token const& t , Attribute& attr) { // The goal of this function is to avoid the conversion of the pair of @@ -462,7 +477,7 @@ namespace boost { namespace spirit { namespace traits // tokenization. typedef lex::lexertl::token< - Iterator, AttributeTypes, HasState> token_type; + Iterator, AttributeTypes, HasState, Idtype> token_type; const_cast(t).value() = attr; // re-assign value } else { @@ -472,14 +487,34 @@ namespace boost { namespace spirit { namespace traits } }; - // These are called from the parse function of token_def if the token type - // has no special attribute type assigned - template - struct assign_to_attribute_from_value< - Attribute, lex::lexertl::token, HasState> > + template + struct assign_to_container_from_value > + : assign_to_attribute_from_value > + {}; + + template + struct assign_to_container_from_value< + iterator_range, iterator_range > { static void - call(lex::lexertl::token, HasState> const& t + call(iterator_range const& val, iterator_range& attr) + { + attr = val; + } + }; + + // These are called from the parse function of token_def if the token type + // has no special attribute type assigned + template + struct assign_to_attribute_from_value, HasState, Idtype> > + { + static void + call(lex::lexertl::token, HasState, Idtype> const& t , Attribute& attr) { // The default type returned by the token_def parser component (if @@ -489,13 +524,22 @@ namespace boost { namespace spirit { namespace traits } }; + template + struct assign_to_container_from_value, HasState, Idtype> > + : assign_to_attribute_from_value, HasState, Idtype> > + {}; + // same as above but using mpl::vector<> instead of mpl::vector0<> - template - struct assign_to_attribute_from_value< - Attribute, lex::lexertl::token, HasState> > + template + struct assign_to_attribute_from_value, HasState, Idtype> > { static void - call(lex::lexertl::token, HasState> const& t + call(lex::lexertl::token, HasState, Idtype> const& t , Attribute& attr) { // The default type returned by the token_def parser component (if @@ -505,37 +549,55 @@ namespace boost { namespace spirit { namespace traits } }; + template + struct assign_to_container_from_value, HasState, Idtype> > + : assign_to_attribute_from_value, HasState, Idtype> > + {}; + // This is called from the parse function of token_def if the token type // has been explicitly omitted (i.e. no attribute value is used), which // essentially means that every attribute gets initialized using default // constructed values. - template - struct assign_to_attribute_from_value< - Attribute, lex::lexertl::token > + template + struct assign_to_attribute_from_value > { static void - call(lex::lexertl::token const& t + call(lex::lexertl::token const& t , Attribute& attr) { // do nothing } }; + template + struct assign_to_container_from_value > + : assign_to_attribute_from_value > + {}; + // This is called from the parse function of lexer_def_ - template + template struct assign_to_attribute_from_value< - fusion::vector2 > - , lex::lexertl::token > + fusion::vector2 > + , lex::lexertl::token > { static void - call(lex::lexertl::token const& t - , fusion::vector2 >& attr) + call(lex::lexertl::token const& t + , fusion::vector2 >& attr) { // The type returned by the lexer_def_ parser components is a // fusion::vector containing the token id of the matched token // and the pair of iterators to the matched character sequence. typedef iterator_range iterpair_type; - typedef fusion::vector2 > + typedef fusion::vector2 > attribute_type; iterpair_type const& ip = get(t.value()); @@ -543,23 +605,34 @@ namespace boost { namespace spirit { namespace traits } }; + template + struct assign_to_container_from_value< + fusion::vector2 > + , lex::lexertl::token > + : assign_to_attribute_from_value< + fusion::vector2 > + , lex::lexertl::token > + {}; + /////////////////////////////////////////////////////////////////////////// // Overload debug output for a single token, this integrates lexer tokens // with Qi's simple_trace debug facilities - template - struct token_printer_debug > + template + struct token_printer_debug< + lex::lexertl::token > { - typedef lex::lexertl::token token_type; + typedef lex::lexertl::token token_type; template static void print(Out& out, token_type const& val) { - out << '<'; + out << '['; spirit::traits::print_token(out, val.value()); - out << '>'; + out << ']'; } }; - }}} #endif diff --git a/3party/boost/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp b/3party/boost/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp index ecf32c6816..1ef3914ad4 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/lex/lexer/pass_flags.hpp b/3party/boost/boost/spirit/home/lex/lexer/pass_flags.hpp index bdef7cc231..6cda3badd3 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/pass_flags.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/pass_flags.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex/lexer/sequence.hpp b/3party/boost/boost/spirit/home/lex/lexer/sequence.hpp index 0c8cfaf1fa..b7fad619ec 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/sequence.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/sequence.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -40,9 +40,12 @@ namespace boost { namespace spirit { namespace lex : elements(elements) {} template - void collect(LexerDef& lexdef, String const& state) const + void collect(LexerDef& lexdef, String const& state + , String const& targetstate) const { - detail::sequence_collect_function f (lexdef, state); + typedef detail::sequence_collect_function + collect_function_type; + collect_function_type f (lexdef, state, targetstate); fusion::any(elements, f); } diff --git a/3party/boost/boost/spirit/home/lex/lexer/string_token_def.hpp b/3party/boost/boost/spirit/home/lex/lexer/string_token_def.hpp index ea9913b27f..36529584ce 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/string_token_def.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/string_token_def.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -62,15 +62,36 @@ namespace boost { namespace spirit { namespace lex typedef std::basic_string string_type; string_token_def(typename add_reference::type str) - : str_(str), id_(std::size_t(~0)) {} + : str_(str), id_(std::size_t(~0)), unique_id_(std::size_t(~0)) + , token_state_(std::size_t(~0)) + {} - template - void collect(LexerDef& lexdef, State const& state) const + template + void collect(LexerDef& lexdef, String_ const& state + , String_ const& targetstate) const { + std::size_t state_id = lexdef.add_state(state.c_str()); + + // If the following assertion fires you are probably trying to use + // a single string_token_def instance in more than one lexer state. + // This is not possible. Please create a separate token_def instance + // from the same regular expression for each lexer state it needs + // to be associated with. + BOOST_ASSERT( + (std::size_t(~0) == token_state_ || state_id == token_state_) && + "Can't use single string_token_def with more than one lexer state"); + + char_type const* target = targetstate.empty() ? 0 : targetstate.c_str(); + if (target) + lexdef.add_state(target); + + token_state_ = state_id; + typedef typename LexerDef::id_type id_type; if (std::size_t(~0) == id_) id_ = lexdef.get_next_id(); - unique_id_ = lexdef.add_token (state.c_str(), str_, id_); + + unique_id_ = lexdef.add_token (state.c_str(), str_, id_, target); } template @@ -78,10 +99,12 @@ namespace boost { namespace spirit { namespace lex std::size_t id() const { return id_; } std::size_t unique_id() const { return unique_id_; } + std::size_t state() const { return token_state_; } string_type str_; mutable std::size_t id_; mutable std::size_t unique_id_; + mutable std::size_t token_state_; }; /////////////////////////////////////////////////////////////////////////// diff --git a/3party/boost/boost/spirit/home/lex/lexer/support_functions.hpp b/3party/boost/boost/spirit/home/lex/lexer/support_functions.hpp index 4630080e55..eeae6c1fe5 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/support_functions.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/support_functions.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -22,12 +22,12 @@ namespace boost { namespace spirit { namespace lex { /////////////////////////////////////////////////////////////////////////// - // The function less() is used by the implementation of the support - // function lex::less(). Its functionality is equivalent to flex' function - // yyless(): it returns an iterator positioned to the nth input character - // beyond the current start iterator (i.e. by assigning the return value to - // the placeholder '_end' it is possible to return all but the first n - // characters of the current token back to the input stream. + // The function object less_type is used by the implementation of the + // support function lex::less(). Its functionality is equivalent to flex' + // function yyless(): it returns an iterator positioned to the nth input + // character beyond the current start iterator (i.e. by assigning the + // return value to the placeholder '_end' it is possible to return all but + // the first n characters of the current token back to the input stream. // // This Phoenix actor is invoked whenever the function lex::less(n) is // used inside a lexer semantic action: @@ -82,13 +82,13 @@ namespace boost { namespace spirit { namespace lex } /////////////////////////////////////////////////////////////////////////// - // The function more() is used by the implemention of the support function - // lex::more(). Its functionality is equivalent to flex' function yymore(): - // it tells the lexer that the next time it matches a rule, the - // corresponding token should be appended onto the current token value - // rather than replacing it. + // The function object more_type is used by the implementation of the + // support function lex::more(). Its functionality is equivalent to flex' + // function yymore(): it tells the lexer that the next time it matches a + // rule, the corresponding token should be appended onto the current token + // value rather than replacing it. // - // This Phoenix actor is invoked whenever the function lex::less(n) is + // This Phoenix actor is invoked whenever the function lex::more(n) is // used inside a lexer semantic action: // // lex::token_def<> identifier = "[a-zA-Z_][a-zA-Z0-9_]*"; @@ -122,7 +122,14 @@ namespace boost { namespace spirit { namespace lex } /////////////////////////////////////////////////////////////////////////// - template + // The function object lookahead_type is used by the implementation of the + // support function lex::lookahead(). Its functionality is needed to + // emulate the flex' lookahead operator a/b. Use lex::lookahead() inside + // of lexer semantic actions to test whether the argument to this function + // matches the current look ahead input. lex::lookahead() can be used with + // either a token id or a token_def instance as its argument. It returns + // a bool indicating whether the look ahead has been matched. + template struct lookahead_type { typedef mpl::true_ no_nullary; @@ -136,32 +143,56 @@ namespace boost { namespace spirit { namespace lex template bool eval(Env const& env) const { - return fusion::at_c<4>(env.args()).lookahead(actor_()); + return fusion::at_c<4>(env.args()). + lookahead(id_actor_(), state_actor_()); } - lookahead_type(Actor const& actor) - : actor_(actor) {} + lookahead_type(IdActor const& id_actor, StateActor const& state_actor) + : id_actor_(id_actor), state_actor_(state_actor) {} - Actor actor_; + IdActor id_actor_; + StateActor state_actor_; }; + // The function lex::lookahead() is used to create a Phoenix actor + // allowing to implement functionality similar to flex' lookahead operator + // a/b. template inline phoenix::actor< - lookahead_type::type> > + lookahead_type< + typename phoenix::as_actor::type + , typename phoenix::as_actor::type> > lookahead(T const& id) { - typedef typename phoenix::as_actor::type actor_type; - return lookahead_type(phoenix::as_actor::convert(id)); + typedef typename phoenix::as_actor::type id_actor_type; + typedef typename phoenix::as_actor::type state_actor_type; + + return lookahead_type( + phoenix::as_actor::convert(id), + phoenix::as_actor::convert(std::size_t(~0))); } template inline phoenix::actor< - lookahead_type::type> > + lookahead_type< + typename phoenix::as_actor::type + , typename phoenix::as_actor::type> > lookahead(token_def const& tok) { - typedef typename phoenix::as_actor::type actor_type; - return lookahead_type( - phoenix::as_actor::convert(tok.id())); + typedef typename phoenix::as_actor::type id_actor_type; + typedef typename phoenix::as_actor::type state_actor_type; + + std::size_t state = tok.state(); + + // The following assertion fires if you pass a token_def instance to + // lex::lookahead without first associating this instance with the + // lexer. + BOOST_ASSERT(std::size_t(~0) != state && + "token_def instance not associated with lexer yet"); + + return lookahead_type( + phoenix::as_actor::convert(tok.id()), + phoenix::as_actor::convert(state)); } /////////////////////////////////////////////////////////////////////////// diff --git a/3party/boost/boost/spirit/home/lex/lexer/terminals.hpp b/3party/boost/boost/spirit/home/lex/lexer/terminals.hpp index 106936b7f2..379423a9d5 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/terminals.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/terminals.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex/lexer/token_def.hpp b/3party/boost/boost/spirit/home/lex/lexer/token_def.hpp index eb3208c5ba..bb416d22e6 100644 --- a/3party/boost/boost/spirit/home/lex/lexer/token_def.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer/token_def.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -58,8 +59,10 @@ namespace boost { namespace spirit { namespace lex typedef typename proto::terminal::type terminal_type; typedef proto::extends proto_base_type; + static std::size_t const all_states_id = static_cast(-2); + public: - // Qi interface: metafunction calculating parser return type + // Qi interface: meta-function calculating parser return type template struct attribute { @@ -97,7 +100,9 @@ namespace boost { namespace spirit { namespace lex BOOST_ASSERT(std::size_t(~0) != token_state_); token_type const& t = *first; - if (token_id_ == t.id() && token_state_ == t.state()) { + if (token_id_ == t.id() && + (all_states_id == token_state_ || token_state_ == t.state())) + { spirit::traits::assign_to(t, attr); ++first; return true; @@ -119,7 +124,8 @@ namespace boost { namespace spirit { namespace lex // Lex interface: collect token definitions and put it into the // provided lexer def template - void collect(LexerDef& lexdef, String const& state) const + void collect(LexerDef& lexdef, String const& state + , String const& targetstate) const { std::size_t state_id = lexdef.add_state(state.c_str()); @@ -128,7 +134,13 @@ namespace boost { namespace spirit { namespace lex // is not possible. Please create a separate token_def instance // from the same regular expression for each lexer state it needs // to be associated with. - BOOST_ASSERT(std::size_t(~0) == token_state_ || state_id == token_state_); + BOOST_ASSERT( + (std::size_t(~0) == token_state_ || state_id == token_state_) && + "Can't use single token_def with more than one lexer state"); + + char_type const* target = targetstate.empty() ? 0 : targetstate.c_str(); + if (target) + lexdef.add_state(target); token_state_ = state_id; if (0 == token_id_) @@ -136,11 +148,11 @@ namespace boost { namespace spirit { namespace lex if (0 == def_.which()) { unique_id_ = lexdef.add_token(state.c_str() - , get(def_), token_id_); + , get(def_), token_id_, target); } else { unique_id_ = lexdef.add_token(state.c_str() - , get(def_), token_id_); + , get(def_), token_id_, target); } } @@ -166,7 +178,7 @@ namespace boost { namespace spirit { namespace lex explicit token_def(char_type def_, Idtype id_ = Idtype()) : proto_base_type(terminal_type::make(reference_(*this))) , def_(def_) - , token_id_(std::size_t(Idtype() == id_ ? def_ : id_)) + , token_id_(Idtype() == id_ ? Idtype(def_) : id_) , unique_id_(std::size_t(~0)), token_state_(std::size_t(~0)) {} explicit token_def(string_type const& def_, Idtype id_ = Idtype()) @@ -210,7 +222,20 @@ namespace boost { namespace spirit { namespace lex mutable std::size_t unique_id_; mutable std::size_t token_state_; }; +}}} +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container< + lex::token_def, Attr, Context, Iterator> + : traits::is_container< + typename attribute_of< + lex::token_def, Context, Iterator + >::type> + {}; }}} #if defined(BOOST_MSVC) diff --git a/3party/boost/boost/spirit/home/lex/lexer_lexertl.hpp b/3party/boost/boost/spirit/home/lex/lexer_lexertl.hpp index e842548e03..0706bd99c2 100644 --- a/3party/boost/boost/spirit/home/lex/lexer_lexertl.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer_lexertl.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex/lexer_static_lexertl.hpp b/3party/boost/boost/spirit/home/lex/lexer_static_lexertl.hpp index eb93eb299e..e95976093b 100644 --- a/3party/boost/boost/spirit/home/lex/lexer_static_lexertl.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer_static_lexertl.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex/lexer_type.hpp b/3party/boost/boost/spirit/home/lex/lexer_type.hpp index 7ae46ffa12..e58bce0de1 100644 --- a/3party/boost/boost/spirit/home/lex/lexer_type.hpp +++ b/3party/boost/boost/spirit/home/lex/lexer_type.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -23,11 +23,13 @@ namespace boost { namespace spirit { namespace lex typedef Derived derived_type; typedef lex::domain domain; - // Requirement: l.collect(def, state) -> void + // Requirement: l.collect(def, state, targetstate) -> void // - // l: a lexer component - // def: token definition container - // state: lexer state this token definition needs to be added to + // l: a lexer component + // def: token definition container + // state: lexer state this token definition needs to be added to + // targetstate: an optional lexer state the lexer should be switched + // into after matching this token Derived const& derived() const { diff --git a/3party/boost/boost/spirit/home/lex/meta_compiler.hpp b/3party/boost/boost/spirit/home/lex/meta_compiler.hpp index ff77109e17..6e13d37854 100644 --- a/3party/boost/boost/spirit/home/lex/meta_compiler.hpp +++ b/3party/boost/boost/spirit/home/lex/meta_compiler.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex/qi.hpp b/3party/boost/boost/spirit/home/lex/qi.hpp index d67fc4260e..e5beee173c 100644 --- a/3party/boost/boost/spirit/home/lex/qi.hpp +++ b/3party/boost/boost/spirit/home/lex/qi.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -13,5 +13,6 @@ #include #include #include +#include #endif diff --git a/3party/boost/boost/spirit/home/lex/qi/in_state.hpp b/3party/boost/boost/spirit/home/lex/qi/in_state.hpp index 4ee8d02af0..566d0b009f 100644 --- a/3party/boost/boost/spirit/home/lex/qi/in_state.hpp +++ b/3party/boost/boost/spirit/home/lex/qi/in_state.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex/qi/plain_token.hpp b/3party/boost/boost/spirit/home/lex/qi/plain_token.hpp index 85dacc7525..7ee0b96084 100644 --- a/3party/boost/boost/spirit/home/lex/qi/plain_token.hpp +++ b/3party/boost/boost/spirit/home/lex/qi/plain_token.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -31,6 +31,11 @@ namespace boost { namespace spirit // Enablers /////////////////////////////////////////////////////////////////////////// + // enables token + template <> + struct use_terminal + : mpl::true_ {}; + // enables token(id) template struct use_terminal + struct make_primitive + { + typedef plain_token result_type; + + result_type operator()(unused_type, unused_type) const + { + return result_type(std::size_t(~0)); + } + }; + template struct make_primitive > , Modifiers> @@ -115,7 +131,6 @@ namespace boost { namespace spirit { namespace qi return result_type(fusion::at_c<0>(term.args)); } }; - }}} #endif diff --git a/3party/boost/boost/spirit/home/lex/qi/plain_tokenid.hpp b/3party/boost/boost/spirit/home/lex/qi/plain_tokenid.hpp new file mode 100644 index 0000000000..245defdce1 --- /dev/null +++ b/3party/boost/boost/spirit/home/lex/qi/plain_tokenid.hpp @@ -0,0 +1,137 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_SPIRIT_LEX_PLAIN_TOKENID_NOV_26_2010_0944AM) +#define BOOST_SPIRIT_LEX_PLAIN_TOKENID_NOV_26_2010_0944AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // Enablers + /////////////////////////////////////////////////////////////////////////// + + // enables tokenid + template <> + struct use_terminal + : mpl::true_ {}; + + // enables tokenid(id) + template + struct use_terminal > + > : mpl::or_, is_enum > {}; + + // enables *lazy* tokenid(id) + template <> + struct use_lazy_terminal< + qi::domain, tag::tokenid, 1 + > : mpl::true_ {}; +}} + +namespace boost { namespace spirit { namespace qi +{ + using spirit::tokenid; + + /////////////////////////////////////////////////////////////////////////// + // The plain_tokenid represents a simple token defined by the lexer inside + // a Qi grammar. The difference to plain_token is that it exposes the + // matched token id instead of the iterator_range of the matched input. + template + struct plain_tokenid + : primitive_parser > + { + template + struct attribute + { + typedef TokenId type; + }; + + plain_tokenid(TokenId const& id) + : id(id) {} + + template + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute& attr) const + { + qi::skip_over(first, last, skipper); // always do a pre-skip + + if (first != last) { + // simply match the token id with the id this component has + // been initialized with + + typedef typename + boost::detail::iterator_traits::value_type + token_type; + typedef typename token_type::id_type id_type; + + token_type const& t = *first; + if (std::size_t(~0) == t.id() || id_type(id) == t.id()) { + spirit::traits::assign_to(id, attr); + ++first; + return true; + } + } + return false; + } + + template + info what(Context& /*context*/) const + { + return info("tokenid"); + } + + TokenId id; + }; + + /////////////////////////////////////////////////////////////////////////// + // Parser generators: make_xxx function (objects) + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive + { + typedef plain_token result_type; + + result_type operator()(unused_type, unused_type) const + { + return result_type(std::size_t(~0)); + } + }; + + template + struct make_primitive > + , Modifiers> + { + typedef plain_tokenid result_type; + + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; +}}} + +#endif diff --git a/3party/boost/boost/spirit/home/lex/qi/state_switcher.hpp b/3party/boost/boost/spirit/home/lex/qi/state_switcher.hpp index bd9335db2f..29bb9786a6 100644 --- a/3party/boost/boost/spirit/home/lex/qi/state_switcher.hpp +++ b/3party/boost/boost/spirit/home/lex/qi/state_switcher.hpp @@ -1,4 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2010 Bryce Lelbach // // Distributed under the 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,6 +15,8 @@ #include #include #include +#include +#include #include #include #include @@ -243,7 +246,21 @@ namespace boost { namespace spirit { namespace qi return result_type(subject, fusion::at_c<0>(term.args)); } }; +}}} +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template + struct has_semantic_action > + : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container + , Attribute, Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/lex/reference.hpp b/3party/boost/boost/spirit/home/lex/reference.hpp index b1af25e69b..d1aaabf19f 100644 --- a/3party/boost/boost/spirit/home/lex/reference.hpp +++ b/3party/boost/boost/spirit/home/lex/reference.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -15,6 +15,7 @@ #include #include #include +#include #include namespace boost { namespace spirit { namespace lex @@ -35,9 +36,10 @@ namespace boost { namespace spirit { namespace lex : qi::reference(subject) {} template - void collect(LexerDef& lexdef, String const& state) const + void collect(LexerDef& lexdef, String const& state + , String const& targetstate) const { - this->ref.get().collect(lexdef, state); + this->ref.get().collect(lexdef, state, targetstate); } template @@ -66,7 +68,18 @@ namespace boost { namespace spirit { namespace lex return this->ref.get().state(); } }; +}}} +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container + , Attribute, Context, Iterator> + : handles_container< + typename remove_const::type, Attribute, Context, Iterator> + {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/lex/tokenize_and_parse.hpp b/3party/boost/boost/spirit/home/lex/tokenize_and_parse.hpp index c3530ac0d4..2948abd1b4 100644 --- a/3party/boost/boost/spirit/home/lex/tokenize_and_parse.hpp +++ b/3party/boost/boost/spirit/home/lex/tokenize_and_parse.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/lex/tokenize_and_parse_attr.hpp b/3party/boost/boost/spirit/home/lex/tokenize_and_parse_attr.hpp index 3c7f09787e..60d9aacfaf 100644 --- a/3party/boost/boost/spirit/home/lex/tokenize_and_parse_attr.hpp +++ b/3party/boost/boost/spirit/home/lex/tokenize_and_parse_attr.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // Copyright (c) 2009 Carl Barron // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/phoenix/detail/type_deduction.hpp b/3party/boost/boost/spirit/home/phoenix/detail/type_deduction.hpp index 5ee8d94c53..b99ea1e86c 100644 --- a/3party/boost/boost/spirit/home/phoenix/detail/type_deduction.hpp +++ b/3party/boost/boost/spirit/home/phoenix/detail/type_deduction.hpp @@ -242,6 +242,10 @@ namespace boost { namespace type_deduction_detail typedef typename C::reference type; }; + template + struct reference_type + : reference_type {}; + template struct reference_type { @@ -254,6 +258,12 @@ namespace boost { namespace type_deduction_detail typedef T& type; }; + template + struct reference_type + { + typedef T const& type; + }; + template struct const_reference_type { diff --git a/3party/boost/boost/spirit/home/qi.hpp b/3party/boost/boost/spirit/home/qi.hpp index a59b0a8153..afdf1cb97c 100644 --- a/3party/boost/boost/spirit/home/qi.hpp +++ b/3party/boost/boost/spirit/home/qi.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/action.hpp b/3party/boost/boost/spirit/home/qi/action.hpp index ef5e693eec..d963b75771 100644 --- a/3party/boost/boost/spirit/home/qi/action.hpp +++ b/3party/boost/boost/spirit/home/qi/action.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/action/action.hpp b/3party/boost/boost/spirit/home/qi/action/action.hpp index 4f8a9fb8e0..7e4244e036 100644 --- a/3party/boost/boost/spirit/home/qi/action/action.hpp +++ b/3party/boost/boost/spirit/home/qi/action/action.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -126,10 +127,17 @@ namespace boost { namespace spirit namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : mpl::true_ {}; + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/auto.hpp b/3party/boost/boost/spirit/home/qi/auto.hpp index 1beb19508c..afc7667b8f 100644 --- a/3party/boost/boost/spirit/home/qi/auto.hpp +++ b/3party/boost/boost/spirit/home/qi/auto.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/auto/auto.hpp b/3party/boost/boost/spirit/home/qi/auto/auto.hpp index 660196b479..20faa4de9f 100644 --- a/3party/boost/boost/spirit/home/qi/auto/auto.hpp +++ b/3party/boost/boost/spirit/home/qi/auto/auto.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/auto/create_parser.hpp b/3party/boost/boost/spirit/home/qi/auto/create_parser.hpp index 994c45aa04..bca492f713 100644 --- a/3party/boost/boost/spirit/home/qi/auto/create_parser.hpp +++ b/3party/boost/boost/spirit/home/qi/auto/create_parser.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/auto/meta_create.hpp b/3party/boost/boost/spirit/home/qi/auto/meta_create.hpp index f09c478bb6..e6a655ce57 100644 --- a/3party/boost/boost/spirit/home/qi/auto/meta_create.hpp +++ b/3party/boost/boost/spirit/home/qi/auto/meta_create.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -89,8 +89,9 @@ namespace boost { namespace spirit { namespace qi : meta_create_container {}; template - struct meta_create_impl >::type> + struct meta_create_impl + >::type> : meta_create_sequence {}; template diff --git a/3party/boost/boost/spirit/home/qi/auxiliary.hpp b/3party/boost/boost/spirit/home/qi/auxiliary.hpp index 7516c6a402..0f972b58c0 100644 --- a/3party/boost/boost/spirit/home/qi/auxiliary.hpp +++ b/3party/boost/boost/spirit/home/qi/auxiliary.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/auxiliary/attr.hpp b/3party/boost/boost/spirit/home/qi/auxiliary/attr.hpp index d314efed79..cc2444765b 100644 --- a/3party/boost/boost/spirit/home/qi/auxiliary/attr.hpp +++ b/3party/boost/boost/spirit/home/qi/auxiliary/attr.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/auxiliary/attr_cast.hpp b/3party/boost/boost/spirit/home/qi/auxiliary/attr_cast.hpp index 2ef6ed0ce6..a8fc6880e0 100644 --- a/3party/boost/boost/spirit/home/qi/auxiliary/attr_cast.hpp +++ b/3party/boost/boost/spirit/home/qi/auxiliary/attr_cast.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/auxiliary/eoi.hpp b/3party/boost/boost/spirit/home/qi/auxiliary/eoi.hpp index 2f46b6c22a..fad34e9221 100644 --- a/3party/boost/boost/spirit/home/qi/auxiliary/eoi.hpp +++ b/3party/boost/boost/spirit/home/qi/auxiliary/eoi.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/auxiliary/eol.hpp b/3party/boost/boost/spirit/home/qi/auxiliary/eol.hpp index ba637c8b73..fd902767a6 100644 --- a/3party/boost/boost/spirit/home/qi/auxiliary/eol.hpp +++ b/3party/boost/boost/spirit/home/qi/auxiliary/eol.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/auxiliary/eps.hpp b/3party/boost/boost/spirit/home/qi/auxiliary/eps.hpp index 4485f53ae4..3bacf64fcc 100644 --- a/3party/boost/boost/spirit/home/qi/auxiliary/eps.hpp +++ b/3party/boost/boost/spirit/home/qi/auxiliary/eps.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/auxiliary/lazy.hpp b/3party/boost/boost/spirit/home/qi/auxiliary/lazy.hpp index f3d16f4780..80c06eb37a 100644 --- a/3party/boost/boost/spirit/home/qi/auxiliary/lazy.hpp +++ b/3party/boost/boost/spirit/home/qi/auxiliary/lazy.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -220,4 +220,29 @@ namespace boost { namespace spirit { namespace qi }; }}} +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container< + qi::lazy_parser, Attribute, Context, Iterator> + : handles_container< + typename qi::lazy_parser::template + attribute::parser_type + , Attribute, Context, Iterator> + {}; + + template + struct handles_container< + qi::lazy_directive, Attribute + , Context, Iterator> + : handles_container< + typename qi::lazy_directive::template + attribute::parser_type + , Attribute, Context, Iterator> + {}; +}}} + #endif diff --git a/3party/boost/boost/spirit/home/qi/binary.hpp b/3party/boost/boost/spirit/home/qi/binary.hpp index 8a3fd554fe..f930a6025b 100644 --- a/3party/boost/boost/spirit/home/qi/binary.hpp +++ b/3party/boost/boost/spirit/home/qi/binary.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/binary/binary.hpp b/3party/boost/boost/spirit/home/qi/binary/binary.hpp index 783739feba..a0069fd5f9 100644 --- a/3party/boost/boost/spirit/home/qi/binary/binary.hpp +++ b/3party/boost/boost/spirit/home/qi/binary/binary.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/char.hpp b/3party/boost/boost/spirit/home/qi/char.hpp index c11db151ce..66739db354 100644 --- a/3party/boost/boost/spirit/home/qi/char.hpp +++ b/3party/boost/boost/spirit/home/qi/char.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/char/char.hpp b/3party/boost/boost/spirit/home/qi/char/char.hpp index cfa020534d..cb2dabd524 100644 --- a/3party/boost/boost/spirit/home/qi/char/char.hpp +++ b/3party/boost/boost/spirit/home/qi/char/char.hpp @@ -1,5 +1,7 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2010 Bryce Lelbach Distributed under the 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,9 +22,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -88,11 +92,19 @@ namespace boost { namespace spirit template <> struct use_terminal // enables L"x" : mpl::true_ {}; + + // enables lit(...) + template + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; }} namespace boost { namespace spirit { namespace qi { using spirit::lit; // lit('x') is equivalent to 'x' + using spirit::lit_type; /////////////////////////////////////////////////////////////////////////// // Parser for a single character @@ -253,9 +265,11 @@ namespace boost { namespace spirit { namespace qi /////////////////////////////////////////////////////////////////////////// // Parser for a character set /////////////////////////////////////////////////////////////////////////// - template + template struct char_set - : char_parser, typename CharEncoding::char_type> + : char_parser + , typename mpl::if_c::type> { typedef typename CharEncoding::char_type char_type; typedef CharEncoding char_encoding; @@ -319,9 +333,11 @@ namespace boost { namespace spirit { namespace qi support::detail::basic_chset chset; }; - template - struct char_set // case insensitive - : char_parser, typename CharEncoding::char_type> + template + struct char_set // case insensitive + : char_parser + , typename mpl::if_c::type> { typedef typename CharEncoding::char_type char_type; typedef CharEncoding char_encoding; @@ -454,12 +470,13 @@ namespace boost { namespace spirit { namespace qi } }; + /////////////////////////////////////////////////////////////////////////// + // char_('x') template struct make_primitive< terminal_ex< tag::char_code - , fusion::vector1 - > + , fusion::vector1 > , Modifiers> { static bool const no_case = @@ -472,7 +489,7 @@ namespace boost { namespace spirit { namespace qi typedef typename mpl::if_< traits::is_string - , char_set + , char_set , literal_char >::type result_type; @@ -484,6 +501,36 @@ namespace boost { namespace spirit { namespace qi } }; + // lit('x') + template + struct make_primitive< + terminal_ex > + , Modifiers + , typename enable_if >::type> + { + static bool const no_case = + has_modifier< + Modifiers + , tag::char_code_base + >::value; + + typedef typename traits::char_encoding_from_char< + typename traits::char_type_of::type>::type encoding; + + typedef literal_char< + typename spirit::detail::get_encoding_with_case< + Modifiers, encoding, no_case>::type + , true, no_case> + result_type; + + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; + + /////////////////////////////////////////////////////////////////////////// template struct make_primitive< terminal_ex< diff --git a/3party/boost/boost/spirit/home/qi/char/char_class.hpp b/3party/boost/boost/spirit/home/qi/char/char_class.hpp index 5dcfdc31b3..9b77b7d54a 100644 --- a/3party/boost/boost/spirit/home/qi/char/char_class.hpp +++ b/3party/boost/boost/spirit/home/qi/char/char_class.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/char/char_parser.hpp b/3party/boost/boost/spirit/home/qi/char/char_parser.hpp index cfc7d196c4..b896f73774 100644 --- a/3party/boost/boost/spirit/home/qi/char/char_parser.hpp +++ b/3party/boost/boost/spirit/home/qi/char/char_parser.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/detail/alternative_function.hpp b/3party/boost/boost/spirit/home/qi/detail/alternative_function.hpp index 143cc372bd..cd6af26a74 100644 --- a/3party/boost/boost/spirit/home/qi/detail/alternative_function.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/alternative_function.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/detail/assign_to.hpp b/3party/boost/boost/spirit/home/qi/detail/assign_to.hpp index b852483b67..73d3617379 100644 --- a/3party/boost/boost/spirit/home/qi/detail/assign_to.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/assign_to.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -158,11 +158,103 @@ namespace boost { namespace spirit { namespace traits }; /////////////////////////////////////////////////////////////////////////// + template + struct assign_to_container_from_value + { + // T is not a container and not a string + template + static void call(T_ const& val, Attribute& attr, mpl::false_, mpl::false_) + { + traits::push_back(attr, val); + } + + // T is a container (but not a string) + template + static void call(T_ const& val, Attribute& attr, mpl::true_, mpl::false_) + { + typedef typename traits::container_iterator::type + iterator_type; + iterator_type end = traits::end(val); + for (iterator_type i = traits::begin(val); i != end; traits::next(i)) + push_back(attr, traits::deref(i)); + } + + // T is a string + template + static void append_to_string(Attribute& attr, Iterator begin, Iterator end) + { + for (Iterator i = begin; i != end; ++i) + push_back(attr, *i); + } + + template + static void call(T_ const& val, Attribute& attr, Pred, mpl::true_) + { + typedef typename char_type_of::type char_type; + append_to_string(attr, traits::get_begin(val) + , traits::get_end(val)); + } + + static void call(T const& val, Attribute& attr) + { + typedef typename traits::is_container::type is_container; + typedef typename traits::is_string::type is_string; + + call(val, attr, is_container(), is_string()); + } + }; + + template + struct assign_to_container_from_value, T> + { + static void + call(T const& val, reference_wrapper attr) + { + assign_to(val.get(), attr); + } + }; + + template + struct assign_to_container_from_value, unused_type> + { + static void + call(unused_type, optional const&) + { + } + }; + + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + // overload for non-container attributes + template + inline void + assign_to(T const& val, Attribute& attr, P1, P2) + { + assign_to_attribute_from_value::call(val, attr); + } + + // overload for containers (but not for variants or optionals + // holding containers) + template + inline void + assign_to(T const& val, Attribute& attr, mpl::true_, mpl::true_) + { + assign_to_container_from_value::call(val, attr); + } + } + template inline void assign_to(T const& val, Attribute& attr) { - assign_to_attribute_from_value::call(val, attr); + typedef typename traits::is_container::type is_container; + typedef typename mpl::and_< + traits::not_is_variant + , traits::not_is_optional + >::type is_not_wrapped_container; + + detail::assign_to(val, attr, is_container(), is_not_wrapped_container()); } template diff --git a/3party/boost/boost/spirit/home/qi/detail/attributes.hpp b/3party/boost/boost/spirit/home/qi/detail/attributes.hpp index 8adf242b8d..ea0f74c5cb 100644 --- a/3party/boost/boost/spirit/home/qi/detail/attributes.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/attributes.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -76,18 +76,18 @@ namespace boost { namespace spirit { namespace qi {}; template - struct transform_attribute, Transformed - , typename disable_if, Transformed> >::type> + struct transform_attribute, Transformed + , typename disable_if, Transformed> >::type> { typedef Transformed& type; - static Transformed& pre(boost::optional& val) + static Transformed& pre(optional& val) { if (!val) val = Transformed(); return boost::get(val); } - static void post(boost::optional&, Transformed const&) {} - static void fail(boost::optional& val) + static void post(optional&, Transformed const&) {} + static void fail(optional& val) { val = none_t(); // leave optional uninitialized if rhs failed } diff --git a/3party/boost/boost/spirit/home/qi/detail/construct.hpp b/3party/boost/boost/spirit/home/qi/detail/construct.hpp index bd5ed10fae..b6ae3b19dc 100644 --- a/3party/boost/boost/spirit/home/qi/detail/construct.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/construct.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -33,6 +33,26 @@ namespace boost { namespace spirit { namespace traits } }; + template + struct assign_to_attribute_from_iterators + { + static void + call(Iterator const& first, Iterator const& last, signed char& attr) + { + attr = *first; + } + }; + + template + struct assign_to_attribute_from_iterators + { + static void + call(Iterator const& first, Iterator const& last, unsigned char& attr) + { + attr = *first; + } + }; + // wchar_t is intrinsic template struct assign_to_attribute_from_iterators @@ -61,7 +81,7 @@ namespace boost { namespace spirit { namespace traits struct assign_to_attribute_from_iterators { static void - call(Iterator const& first, Iterator const& last, char& attr) + call(Iterator const& first, Iterator const& last, bool& attr) { Iterator first_ = first; qi::parse(first_, last, bool_, attr); diff --git a/3party/boost/boost/spirit/home/qi/detail/enable_lit.hpp b/3party/boost/boost/spirit/home/qi/detail/enable_lit.hpp new file mode 100644 index 0000000000..8bf2518297 --- /dev/null +++ b/3party/boost/boost/spirit/home/qi/detail/enable_lit.hpp @@ -0,0 +1,30 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_SPIRIT_QI_DETAIL_ENABLE_LIT_JAN_06_2011_0945PM) +#define BOOST_SPIRIT_QI_DETAIL_ENABLE_LIT_JAN_06_2011_0945PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace spirit +{ + // enables lazy lit(...) for qi + template <> + struct use_lazy_terminal + : mpl::true_ {}; +}} + +#endif + diff --git a/3party/boost/boost/spirit/home/qi/detail/expect_function.hpp b/3party/boost/boost/spirit/home/qi/detail/expect_function.hpp index 2f39327197..34dd910744 100644 --- a/3party/boost/boost/spirit/home/qi/detail/expect_function.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/expect_function.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/detail/fail_function.hpp b/3party/boost/boost/spirit/home/qi/detail/fail_function.hpp index f43638645e..fca03b33f9 100644 --- a/3party/boost/boost/spirit/home/qi/detail/fail_function.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/fail_function.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/detail/parse.hpp b/3party/boost/boost/spirit/home/qi/detail/parse.hpp index aff13587e5..b81f1e76a0 100644 --- a/3party/boost/boost/spirit/home/qi/detail/parse.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/parse.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/detail/parse_auto.hpp b/3party/boost/boost/spirit/home/qi/detail/parse_auto.hpp index 61bb2e76ee..a61a0b48ae 100644 --- a/3party/boost/boost/spirit/home/qi/detail/parse_auto.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/parse_auto.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/detail/pass_container.hpp b/3party/boost/boost/spirit/home/qi/detail/pass_container.hpp index a4a72b313e..dc98104bbd 100644 --- a/3party/boost/boost/spirit/home/qi/detail/pass_container.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/pass_container.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -99,10 +100,13 @@ namespace boost { namespace spirit { namespace qi { namespace detail template bool dispatch_attribute(Component const& component, mpl::true_) const { - typedef traits::is_container< - typename traits::attribute_of< - Component, context_type, iterator_type - >::type + typedef typename traits::attribute_of< + Component, context_type, iterator_type>::type attribute_type; + + typedef mpl::and_< + traits::is_container + , traits::handles_container > predicate; return dispatch_attribute_element(component, predicate()); @@ -153,8 +157,13 @@ namespace boost { namespace spirit { namespace qi { namespace detail Component, context_type, iterator_type>::type rhs_attribute; - return dispatch_main(component - , has_same_elements()); + typedef mpl::and_< + has_same_elements + , traits::handles_container + > predicate; + + return dispatch_main(component, predicate()); } F f; @@ -175,3 +184,4 @@ namespace boost { namespace spirit { namespace qi { namespace detail }}}} #endif + diff --git a/3party/boost/boost/spirit/home/qi/detail/pass_function.hpp b/3party/boost/boost/spirit/home/qi/detail/pass_function.hpp index 0fe8a96cfd..2d9e6bab26 100644 --- a/3party/boost/boost/spirit/home/qi/detail/pass_function.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/pass_function.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/detail/permute_function.hpp b/3party/boost/boost/spirit/home/qi/detail/permute_function.hpp index da9db87420..13c1b8c123 100644 --- a/3party/boost/boost/spirit/home/qi/detail/permute_function.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/permute_function.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/detail/string_parse.hpp b/3party/boost/boost/spirit/home/qi/detail/string_parse.hpp index fd6b031c4d..4025df550d 100644 --- a/3party/boost/boost/spirit/home/qi/detail/string_parse.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/string_parse.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/detail/unused_skipper.hpp b/3party/boost/boost/spirit/home/qi/detail/unused_skipper.hpp index de3a60a63d..c1405d67c7 100644 --- a/3party/boost/boost/spirit/home/qi/detail/unused_skipper.hpp +++ b/3party/boost/boost/spirit/home/qi/detail/unused_skipper.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/directive.hpp b/3party/boost/boost/spirit/home/qi/directive.hpp index 7a320079bd..6d97ce491d 100644 --- a/3party/boost/boost/spirit/home/qi/directive.hpp +++ b/3party/boost/boost/spirit/home/qi/directive.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -11,6 +11,7 @@ #pragma once #endif +#include #include #include #include diff --git a/3party/boost/boost/spirit/home/qi/directive/as.hpp b/3party/boost/boost/spirit/home/qi/directive/as.hpp new file mode 100644 index 0000000000..6df1563ca9 --- /dev/null +++ b/3party/boost/boost/spirit/home/qi/directive/as.hpp @@ -0,0 +1,163 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2010 Bryce Lelbach + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(SPIRIT_AS_DECEMBER_6_2010_1013AM) +#define SPIRIT_AS_DECEMBER_6_2010_1013AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace spirit { namespace qi +{ + template + struct as + : stateful_tag_type + { + BOOST_SPIRIT_ASSERT_MSG( + (traits::is_container::type::value), + error_type_must_be_a_container, + (T)); + }; +}}} + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // Enablers + /////////////////////////////////////////////////////////////////////////// + // enables as_string[...] + template <> + struct use_directive + : mpl::true_ {}; + + // enables as_wstring[...] + template <> + struct use_directive + : mpl::true_ {}; + + // enables as[...] + template + struct use_directive > + : mpl::true_ + {}; +}} + +namespace boost { namespace spirit { namespace qi +{ + using spirit::as_string; + using spirit::as_string_type; + using spirit::as_wstring; + using spirit::as_wstring_type; + + template + struct as_directive : unary_parser > + { + typedef Subject subject_type; + as_directive(Subject const& subject) + : subject(subject) {} + + template + struct attribute + { + typedef T type; + }; + + template + bool parse(Iterator& first, Iterator const& last + , Context& context, Skipper const& skipper, Attribute& attr) const + { + Iterator i = first; + T as_attr; + if (subject.parse(i, last, context, skipper, as_attr)) + { + spirit::traits::assign_to(as_attr, attr); + first = i; + return true; + } + return false; + } + + template + info what(Context& context) const + { + return info("as", subject.what(context)); + } + + Subject subject; + }; + + /////////////////////////////////////////////////////////////////////////// + // Parser generators: make_xxx function (objects) + /////////////////////////////////////////////////////////////////////////// + template + struct make_directive + { + typedef as_directive result_type; + result_type operator()(unused_type, Subject const& subject + , unused_type) const + { + return result_type(subject); + } + }; + + template + struct make_directive + { + typedef as_directive result_type; + result_type operator()(unused_type, Subject const& subject + , unused_type) const + { + return result_type(subject); + } + }; + + template + struct make_directive, Subject, Modifiers> + { + typedef as_directive result_type; + result_type operator()(unused_type, Subject const& subject + , unused_type) const + { + return result_type(subject); + } + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template + struct has_semantic_action > + : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : mpl::false_ {}; +}}} + +#endif diff --git a/3party/boost/boost/spirit/home/qi/directive/encoding.hpp b/3party/boost/boost/spirit/home/qi/directive/encoding.hpp index 18be82eeff..5eaf0f6b50 100644 --- a/3party/boost/boost/spirit/home/qi/directive/encoding.hpp +++ b/3party/boost/boost/spirit/home/qi/directive/encoding.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/directive/hold.hpp b/3party/boost/boost/spirit/home/qi/directive/hold.hpp index 608a4ebb48..640a149dce 100644 --- a/3party/boost/boost/spirit/home/qi/directive/hold.hpp +++ b/3party/boost/boost/spirit/home/qi/directive/hold.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,7 @@ #include #include #include +#include namespace boost { namespace spirit { @@ -90,9 +91,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/directive/lexeme.hpp b/3party/boost/boost/spirit/home/qi/directive/lexeme.hpp index eda0f05da1..58c1a5effa 100644 --- a/3party/boost/boost/spirit/home/qi/directive/lexeme.hpp +++ b/3party/boost/boost/spirit/home/qi/directive/lexeme.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,7 @@ #include #include #include +#include namespace boost { namespace spirit { @@ -87,9 +88,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/directive/matches.hpp b/3party/boost/boost/spirit/home/qi/directive/matches.hpp index 80b6af80cf..a9e2ab341e 100644 --- a/3party/boost/boost/spirit/home/qi/directive/matches.hpp +++ b/3party/boost/boost/spirit/home/qi/directive/matches.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -18,6 +18,7 @@ #include #include #include +#include namespace boost { namespace spirit { @@ -89,9 +90,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/directive/no_case.hpp b/3party/boost/boost/spirit/home/qi/directive/no_case.hpp index 3221b19b07..1bd8b62a79 100644 --- a/3party/boost/boost/spirit/home/qi/directive/no_case.hpp +++ b/3party/boost/boost/spirit/home/qi/directive/no_case.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/directive/no_skip.hpp b/3party/boost/boost/spirit/home/qi/directive/no_skip.hpp index c6873d1b57..acc84a08e0 100644 --- a/3party/boost/boost/spirit/home/qi/directive/no_skip.hpp +++ b/3party/boost/boost/spirit/home/qi/directive/no_skip.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -20,6 +20,8 @@ #include #include #include +#include +#include namespace boost { namespace spirit { @@ -88,9 +90,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/directive/omit.hpp b/3party/boost/boost/spirit/home/qi/directive/omit.hpp index c4971edee2..bf7baa651b 100644 --- a/3party/boost/boost/spirit/home/qi/directive/omit.hpp +++ b/3party/boost/boost/spirit/home/qi/directive/omit.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -18,6 +18,7 @@ #include #include #include +#include namespace boost { namespace spirit { @@ -88,9 +89,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : mpl::false_ {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/directive/raw.hpp b/3party/boost/boost/spirit/home/qi/directive/raw.hpp index 535cd6e33f..fac1434e18 100644 --- a/3party/boost/boost/spirit/home/qi/directive/raw.hpp +++ b/3party/boost/boost/spirit/home/qi/directive/raw.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -20,6 +20,7 @@ #include #include #include +#include #include namespace boost { namespace spirit @@ -92,9 +93,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/directive/repeat.hpp b/3party/boost/boost/spirit/home/qi/directive/repeat.hpp index 5907938a18..436cd1bc11 100644 --- a/3party/boost/boost/spirit/home/qi/directive/repeat.hpp +++ b/3party/boost/boost/spirit/home/qi/directive/repeat.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #include #include @@ -216,6 +218,9 @@ namespace boost { namespace spirit { namespace qi value_type val = value_type(); typename LoopIter::type i = iter.start(); + // ensure the attribute is actually a container type + traits::make_container(attr); + // parse the minimum required Iterator save = first; if (!iter.got_min(i) && @@ -320,9 +325,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container + , Attribute, Context, Iterator> + : mpl::true_ {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/directive/skip.hpp b/3party/boost/boost/spirit/home/qi/directive/skip.hpp index 2dd8c4a664..e3d62ec171 100644 --- a/3party/boost/boost/spirit/home/qi/directive/skip.hpp +++ b/3party/boost/boost/spirit/home/qi/directive/skip.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include #include @@ -160,6 +162,7 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; @@ -167,6 +170,19 @@ namespace boost { namespace spirit { namespace traits template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; + + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/domain.hpp b/3party/boost/boost/spirit/home/qi/domain.hpp index f3a36349d6..ce1accb1e1 100644 --- a/3party/boost/boost/spirit/home/qi/domain.hpp +++ b/3party/boost/boost/spirit/home/qi/domain.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/match.hpp b/3party/boost/boost/spirit/home/qi/match.hpp index f678b54cf8..2e47d718e0 100644 --- a/3party/boost/boost/spirit/home/qi/match.hpp +++ b/3party/boost/boost/spirit/home/qi/match.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/match_auto.hpp b/3party/boost/boost/spirit/home/qi/match_auto.hpp index 81d632ad55..a50c9d69dd 100644 --- a/3party/boost/boost/spirit/home/qi/match_auto.hpp +++ b/3party/boost/boost/spirit/home/qi/match_auto.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/meta_compiler.hpp b/3party/boost/boost/spirit/home/qi/meta_compiler.hpp index e44268bd77..68649c0f04 100644 --- a/3party/boost/boost/spirit/home/qi/meta_compiler.hpp +++ b/3party/boost/boost/spirit/home/qi/meta_compiler.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/nonterminal.hpp b/3party/boost/boost/spirit/home/qi/nonterminal.hpp index 06b99312ec..2c0409e991 100644 --- a/3party/boost/boost/spirit/home/qi/nonterminal.hpp +++ b/3party/boost/boost/spirit/home/qi/nonterminal.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/nonterminal/debug_handler.hpp b/3party/boost/boost/spirit/home/qi/nonterminal/debug_handler.hpp index efb3762536..389cf55c00 100644 --- a/3party/boost/boost/spirit/home/qi/nonterminal/debug_handler.hpp +++ b/3party/boost/boost/spirit/home/qi/nonterminal/debug_handler.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/nonterminal/debug_handler_state.hpp b/3party/boost/boost/spirit/home/qi/nonterminal/debug_handler_state.hpp index 51d140a591..cb24c01f47 100644 --- a/3party/boost/boost/spirit/home/qi/nonterminal/debug_handler_state.hpp +++ b/3party/boost/boost/spirit/home/qi/nonterminal/debug_handler_state.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/nonterminal/detail/fcall.hpp b/3party/boost/boost/spirit/home/qi/nonterminal/detail/fcall.hpp index 4ab1ea8fde..e4fa17f985 100644 --- a/3party/boost/boost/spirit/home/qi/nonterminal/detail/fcall.hpp +++ b/3party/boost/boost/spirit/home/qi/nonterminal/detail/fcall.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/nonterminal/detail/parameterized.hpp b/3party/boost/boost/spirit/home/qi/nonterminal/detail/parameterized.hpp index 0f894b5555..8577a09f6e 100644 --- a/3party/boost/boost/spirit/home/qi/nonterminal/detail/parameterized.hpp +++ b/3party/boost/boost/spirit/home/qi/nonterminal/detail/parameterized.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2009 Francois Barel Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/qi/nonterminal/detail/parser_binder.hpp b/3party/boost/boost/spirit/home/qi/nonterminal/detail/parser_binder.hpp index e75b7258bc..91bceba88e 100644 --- a/3party/boost/boost/spirit/home/qi/nonterminal/detail/parser_binder.hpp +++ b/3party/boost/boost/spirit/home/qi/nonterminal/detail/parser_binder.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/nonterminal/error_handler.hpp b/3party/boost/boost/spirit/home/qi/nonterminal/error_handler.hpp index 57137c709f..b31aad1758 100644 --- a/3party/boost/boost/spirit/home/qi/nonterminal/error_handler.hpp +++ b/3party/boost/boost/spirit/home/qi/nonterminal/error_handler.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/nonterminal/grammar.hpp b/3party/boost/boost/spirit/home/qi/nonterminal/grammar.hpp index 861e0c6255..7a24586f02 100644 --- a/3party/boost/boost/spirit/home/qi/nonterminal/grammar.hpp +++ b/3party/boost/boost/spirit/home/qi/nonterminal/grammar.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -23,12 +24,8 @@ namespace boost { namespace spirit { namespace qi { template < - typename Iterator - , typename T1 = unused_type - , typename T2 = unused_type - , typename T3 = unused_type - , typename T4 = unused_type - > + typename Iterator, typename T1, typename T2, typename T3 + , typename T4> struct grammar : proto::extends< typename proto::terminal< @@ -116,4 +113,20 @@ namespace boost { namespace spirit { namespace qi }; }}} +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template < + typename IteratorA, typename IteratorB, typename Attribute + , typename Context, typename T1, typename T2, typename T3, typename T4> + struct handles_container< + qi::grammar, Attribute, Context, IteratorB> + : traits::is_container< + typename attribute_of< + qi::grammar, Context, IteratorB + >::type + > + {}; +}}} + #endif diff --git a/3party/boost/boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp b/3party/boost/boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp new file mode 100644 index 0000000000..9e393452ac --- /dev/null +++ b/3party/boost/boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp @@ -0,0 +1,31 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_SPIRIT_QI_NONTERMINAL_FWD_DEC_24_2010_1105PM) +#define BOOST_SPIRIT_QI_NONTERMINAL_FWD_DEC_24_2010_1105PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include + +namespace boost { namespace spirit { namespace qi +{ + // forward declaration only + template < + typename Iterator, typename T1 = unused_type + , typename T2 = unused_type, typename T3 = unused_type + , typename T4 = unused_type> + struct rule; + + template < + typename Iterator, typename T1 = unused_type + , typename T2 = unused_type, typename T3 = unused_type + , typename T4 = unused_type> + struct grammar; +}}} + +#endif diff --git a/3party/boost/boost/spirit/home/qi/nonterminal/rule.hpp b/3party/boost/boost/spirit/home/qi/nonterminal/rule.hpp index dd4cddbcb0..321907a73e 100644 --- a/3party/boost/boost/spirit/home/qi/nonterminal/rule.hpp +++ b/3party/boost/boost/spirit/home/qi/nonterminal/rule.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -35,6 +35,7 @@ #include #include #include +#include #include #if defined(BOOST_MSVC) @@ -63,12 +64,8 @@ namespace boost { namespace spirit { namespace qi using spirit::locals; template < - typename Iterator - , typename T1 = unused_type - , typename T2 = unused_type - , typename T3 = unused_type - , typename T4 = unused_type - > + typename Iterator, typename T1, typename T2, typename T3 + , typename T4> struct rule : proto::extends< typename proto::terminal< @@ -173,7 +170,7 @@ namespace boost { namespace spirit { namespace qi // from an uninitialized one. Did you mean to refer to the right // hand side rule instead of assigning from it? In this case you // should write lhs = rhs.alias(); - BOOST_ASSERT(rhs.f); + BOOST_ASSERT(rhs.f && "Did you mean rhs.alias() instead of rhs?"); f = rhs.f; name_ = rhs.name_; @@ -393,6 +390,22 @@ namespace boost { namespace spirit { namespace qi #endif }}} +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template < + typename IteratorA, typename IteratorB, typename Attribute + , typename Context, typename T1, typename T2, typename T3, typename T4> + struct handles_container< + qi::rule, Attribute, Context, IteratorB> + : traits::is_container< + typename attribute_of< + qi::rule, Context, IteratorB + >::type + > + {}; +}}} + #if defined(BOOST_MSVC) # pragma warning(pop) #endif diff --git a/3party/boost/boost/spirit/home/qi/nonterminal/simple_trace.hpp b/3party/boost/boost/spirit/home/qi/nonterminal/simple_trace.hpp index 59d34ddb7a..bdb4e2c322 100644 --- a/3party/boost/boost/spirit/home/qi/nonterminal/simple_trace.hpp +++ b/3party/boost/boost/spirit/home/qi/nonterminal/simple_trace.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/numeric.hpp b/3party/boost/boost/spirit/home/qi/numeric.hpp index c9b14498f5..7e1ef2691a 100644 --- a/3party/boost/boost/spirit/home/qi/numeric.hpp +++ b/3party/boost/boost/spirit/home/qi/numeric.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/numeric/bool.hpp b/3party/boost/boost/spirit/home/qi/numeric/bool.hpp index 987e4f7f81..0a7d508fc0 100644 --- a/3party/boost/boost/spirit/home/qi/numeric/bool.hpp +++ b/3party/boost/boost/spirit/home/qi/numeric/bool.hpp @@ -1,5 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2011 Bryce Lelbach Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -12,30 +13,92 @@ #endif #include +#include #include #include #include #include -#include #include #include +#include namespace boost { namespace spirit { + namespace qi + { + /////////////////////////////////////////////////////////////////////// + // forward declaration only + template + struct bool_policies; + + /////////////////////////////////////////////////////////////////////// + // This is the class that the user can instantiate directly in + // order to create a customized bool parser + template > + struct bool_parser + : spirit::terminal > + { + typedef tag::stateful_tag tag_type; + + bool_parser() {} + bool_parser(BoolPolicies const& data) + : spirit::terminal(data) {} + }; + } + /////////////////////////////////////////////////////////////////////////// // Enablers /////////////////////////////////////////////////////////////////////////// - template <> - struct use_terminal // enables bool_ + template <> // enables bool_ + struct use_terminal : mpl::true_ {}; - template <> - struct use_terminal // enables true_ + template <> // enables true_ + struct use_terminal : mpl::true_ {}; - template <> - struct use_terminal // enables false_ + template <> // enables false_ + struct use_terminal : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + template // enables lit(...) + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + template // enables bool_(...) + struct use_terminal > + > : mpl::true_ {}; + + template <> // enables *lazy* bool_(...) + struct use_lazy_terminal + : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + // enables any custom bool_parser + template + struct use_terminal > + : mpl::true_ {}; + + // enables any custom bool_parser(...) + template + struct use_terminal + , fusion::vector1 > > + : mpl::true_ {}; + + // enables *lazy* custom bool_parser(...) + template + struct use_lazy_terminal< + qi::domain + , tag::stateful_tag + , 1 // arity + > : mpl::true_ {}; }} namespace boost { namespace spirit { namespace qi @@ -47,14 +110,17 @@ namespace boost { namespace spirit { namespace qi using spirit::false_; using spirit::false__type; + using spirit::lit; // lit(true) is equivalent to true + using spirit::lit_type; + namespace detail { - template + template struct bool_impl { template static bool parse(Iterator& first, Iterator const& last - , Attribute& attr, Policies const& p, bool allow_true = true + , Attribute& attr, BoolPolicies const& p, bool allow_true = true , bool disallow_false = false) { if (first == last) @@ -72,11 +138,9 @@ namespace boost { namespace spirit { namespace qi /////////////////////////////////////////////////////////////////////////// // This actual boolean parser /////////////////////////////////////////////////////////////////////////// - template < - typename T = bool - , typename Policies = bool_policies > - struct bool_parser_impl - : primitive_parser > + template > + struct any_bool_parser + : primitive_parser > { template struct attribute @@ -90,9 +154,9 @@ namespace boost { namespace spirit { namespace qi , Context& /*context*/, Skipper const& skipper , Attribute& attr) const { + typedef detail::bool_impl extract; qi::skip_over(first, last, skipper); - return detail::bool_impl:: - parse(first, last, attr, Policies()); + return extract::parse(first, last, attr, BoolPolicies()); } template @@ -102,21 +166,18 @@ namespace boost { namespace spirit { namespace qi } }; - template < - typename T = bool - , typename Policies = bool_policies > - struct bool_parser_literal_impl - : primitive_parser > + template + , bool no_attribute = true> + struct literal_bool_parser + : primitive_parser > { + template + literal_bool_parser(Value const& n) : n_(n) {} + template struct attribute - { - typedef T type; - }; - - bool_parser_literal_impl(typename add_const::type n) - : n_(n) - {} + : mpl::if_c + {}; template @@ -124,9 +185,9 @@ namespace boost { namespace spirit { namespace qi , Context& /*context*/, Skipper const& skipper , Attribute& attr) const { + typedef detail::bool_impl extract; qi::skip_over(first, last, skipper); - return detail::bool_impl:: - parse(first, last, attr, Policies(), n_, n_); + return extract::parse(first, last, attr, BoolPolicies(), n_, n_); } template @@ -138,28 +199,23 @@ namespace boost { namespace spirit { namespace qi T n_; }; - /////////////////////////////////////////////////////////////////////////// - // bool_parser is the class that the user can instantiate directly - /////////////////////////////////////////////////////////////////////////// - template < - typename T - , typename Policies = bool_policies > - struct bool_parser - : proto::terminal >::type - {}; - /////////////////////////////////////////////////////////////////////////// // Parser generators: make_xxx function (objects) /////////////////////////////////////////////////////////////////////////// - template - struct make_primitive + template > + struct make_bool { - typedef has_modifier > no_case; + typedef has_modifier > + no_case; typedef typename mpl::if_< - no_case - , bool_parser_impl > - , bool_parser_impl<> >::type + mpl::and_< + no_case + , is_same, Policies> + > + , any_bool_parser > + , any_bool_parser >::type result_type; result_type operator()(unused_type, unused_type) const @@ -168,36 +224,114 @@ namespace boost { namespace spirit { namespace qi } }; - namespace detail + template > + struct make_direct_bool { - template - struct make_literal_bool - { - typedef has_modifier > no_case; + typedef has_modifier > + no_case; - typedef typename mpl::if_< + typedef typename mpl::if_< + mpl::and_< no_case - , bool_parser_literal_impl > - , bool_parser_literal_impl<> >::type - result_type; + , is_same, Policies> + > + , literal_bool_parser, false> + , literal_bool_parser >::type + result_type; - result_type operator()(unused_type, unused_type) const - { - return result_type(b); - } - }; - } + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; + template > + struct make_predefined_direct_bool + { + typedef has_modifier > + no_case; + + typedef typename mpl::if_< + mpl::and_< + no_case + , is_same, Policies> + > + , literal_bool_parser, false> + , literal_bool_parser >::type + result_type; + + result_type operator()(unused_type, unused_type) const + { + return result_type(b); + } + }; + + template > + struct make_literal_bool + { + typedef has_modifier > + no_case; + + typedef typename mpl::if_< + mpl::and_< + no_case + , is_same, Policies> + > + , literal_bool_parser > + , literal_bool_parser >::type + result_type; + + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; + + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive< + terminal_ex > + , Modifiers, typename enable_if >::type> + : make_literal_bool {}; + + /////////////////////////////////////////////////////////////////////////// template struct make_primitive - : detail::make_literal_bool + : make_predefined_direct_bool {}; template struct make_primitive - : detail::make_literal_bool + : make_predefined_direct_bool {}; + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive< + tag::stateful_tag, Modifiers> + : make_bool {}; + + template + struct make_primitive< + terminal_ex + , fusion::vector1 >, Modifiers> + : make_direct_bool {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive + : make_bool {}; + + template + struct make_primitive< + terminal_ex >, Modifiers> + : make_direct_bool {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/numeric/bool_policies.hpp b/3party/boost/boost/spirit/home/qi/numeric/bool_policies.hpp index 151aa21aba..1e7c6e5164 100644 --- a/3party/boost/boost/spirit/home/qi/numeric/bool_policies.hpp +++ b/3party/boost/boost/spirit/home/qi/numeric/bool_policies.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp b/3party/boost/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp index 8e279ddc48..86dcd28c88 100644 --- a/3party/boost/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp +++ b/3party/boost/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Copyright (c) 2006 Stephen Nutt Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -60,13 +60,13 @@ namespace boost { namespace spirit { namespace qi { namespace detail struct radix_traits<2> { template - static bool is_valid(Char ch) + inline static bool is_valid(Char ch) { return ('0' == ch || '1' == ch); } template - static unsigned digit(Char ch) + inline static unsigned digit(Char ch) { return ch - '0'; } @@ -84,13 +84,13 @@ namespace boost { namespace spirit { namespace qi { namespace detail struct radix_traits<8> { template - static bool is_valid(Char ch) + inline static bool is_valid(Char ch) { return ch >= '0' && ch <= '7'; } template - static unsigned digit(Char ch) + inline static unsigned digit(Char ch) { return ch - '0'; } @@ -108,13 +108,13 @@ namespace boost { namespace spirit { namespace qi { namespace detail struct radix_traits<10> { template - static bool is_valid(Char ch) + inline static bool is_valid(Char ch) { return ch >= '0' && ch <= '9'; } template - static unsigned digit(Char ch) + inline static unsigned digit(Char ch) { return ch - '0'; } @@ -132,7 +132,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail struct radix_traits<16> { template - static bool is_valid(Char ch) + inline static bool is_valid(Char ch) { return (ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'f') @@ -140,7 +140,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail } template - static unsigned digit(Char ch) + inline static unsigned digit(Char ch) { if (ch >= '0' && ch <= '9') return ch - '0'; @@ -164,14 +164,14 @@ namespace boost { namespace spirit { namespace qi { namespace detail struct positive_accumulator { template - static void add(T& n, Char ch, mpl::false_) // unchecked add + inline static void add(T& n, Char ch, mpl::false_) // unchecked add { const int digit = radix_traits::digit(ch); n = n * T(Radix) + T(digit); } template - static bool add(T& n, Char ch, mpl::true_) // checked add + inline static bool add(T& n, Char ch, mpl::true_) // checked add { // Ensure n *= Radix will not overflow static T const max = (std::numeric_limits::max)(); @@ -195,14 +195,14 @@ namespace boost { namespace spirit { namespace qi { namespace detail struct negative_accumulator { template - static void add(T& n, Char ch, mpl::false_) // unchecked subtract + inline static void add(T& n, Char ch, mpl::false_) // unchecked subtract { const int digit = radix_traits::digit(ch); n = n * T(Radix) - T(digit); } template - static bool add(T& n, Char ch, mpl::true_) // checked subtract + inline static bool add(T& n, Char ch, mpl::true_) // checked subtract { // Ensure n *= Radix will not underflow static T const min = (std::numeric_limits::min)(); @@ -229,7 +229,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail struct int_extractor { template - static bool + inline static bool call(Char ch, std::size_t count, T& n, mpl::true_) { static std::size_t const @@ -248,7 +248,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail } template - static bool + inline static bool call(Char ch, std::size_t /*count*/, T& n, mpl::false_) { // no need to check for overflow @@ -257,14 +257,14 @@ namespace boost { namespace spirit { namespace qi { namespace detail } template - static bool + inline static bool call(Char /*ch*/, std::size_t /*count*/, unused_type, mpl::false_) { return true; } template - static bool + inline static bool call(Char ch, std::size_t count, T& n) { return call(ch, count, n @@ -286,7 +286,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail template struct check_max_digits { - static bool + inline static bool call(std::size_t count) { return count < MaxDigits; // bounded @@ -296,7 +296,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail template <> struct check_max_digits<-1> { - static bool + inline static bool call(std::size_t /*count*/) { return true; // unbounded @@ -329,7 +329,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail # pragma warning(disable: 4127) // conditional expression is constant #endif template - static bool + inline static bool parse_main( Iterator& first , Iterator const& last @@ -381,7 +381,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail #endif template - static bool + inline static bool parse( Iterator& first , Iterator const& last @@ -392,7 +392,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail } template - static bool + inline static bool parse( Iterator& first , Iterator const& last @@ -427,7 +427,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail # pragma warning(disable: 4127) // conditional expression is constant #endif template - static bool + inline static bool parse_main( Iterator& first , Iterator const& last @@ -494,7 +494,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail #endif template - static bool + inline static bool parse( Iterator& first , Iterator const& last @@ -505,7 +505,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail } template - static bool + inline static bool parse( Iterator& first , Iterator const& last @@ -531,7 +531,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail typedef typename make_unsigned::type unsigned_type; typedef typename make_unsigned::type& unsigned_type_ref; - static unsigned_type_ref call(T& n) + inline static unsigned_type_ref call(T& n) { return unsigned_type_ref(n); } @@ -540,7 +540,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail template struct cast_unsigned { - static T& call(T& n) + inline static T& call(T& n) { return n; } diff --git a/3party/boost/boost/spirit/home/qi/numeric/detail/real_impl.hpp b/3party/boost/boost/spirit/home/qi/numeric/detail/real_impl.hpp index 96835d4da8..00745b7a24 100644 --- a/3party/boost/boost/spirit/home/qi/numeric/detail/real_impl.hpp +++ b/3party/boost/boost/spirit/home/qi/numeric/detail/real_impl.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -76,7 +76,7 @@ namespace boost { namespace spirit { namespace traits // no-op for unused_type } - inline float + inline float negate(bool neg, float n) { return neg ? spirit::detail::changesign(n) : n; diff --git a/3party/boost/boost/spirit/home/qi/numeric/int.hpp b/3party/boost/boost/spirit/home/qi/numeric/int.hpp index 0ceb08eba5..08bb2645e5 100644 --- a/3party/boost/boost/spirit/home/qi/numeric/int.hpp +++ b/3party/boost/boost/spirit/home/qi/numeric/int.hpp @@ -1,5 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2011 Bryce Lelbach Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -12,43 +13,142 @@ #endif #include +#include #include #include #include #include #include #include +#include namespace boost { namespace spirit { + namespace tag + { + template + struct int_parser {}; + } + + namespace qi + { + /////////////////////////////////////////////////////////////////////// + // This one is the class that the user can instantiate directly in + // order to create a customized int parser + template + struct int_parser + : spirit::terminal > + {}; + } + /////////////////////////////////////////////////////////////////////////// // Enablers /////////////////////////////////////////////////////////////////////////// - //[primitive_parsers_enable_short_ - template <> - struct use_terminal // enables short_ - : mpl::true_ {}; + //[primitive_parsers_enable_short + template <> // enables short_ + struct use_terminal : mpl::true_ {}; //] - //[primitive_parsers_enable_int_ - template <> - struct use_terminal // enables int_ + template // enables lit(n) + struct use_terminal > + , typename enable_if >::type> : mpl::true_ {}; - //] + + template // enables short_(n) + struct use_terminal > > + : is_arithmetic {}; - //[primitive_parsers_enable_long_ - template <> - struct use_terminal // enables long_ + template <> // enables *lazy* short_(n) + struct use_lazy_terminal : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + //[primitive_parsers_enable_int + template <> // enables int_ + struct use_terminal : mpl::true_ {}; + //] + + template // enables lit(n) + struct use_terminal > + , typename enable_if >::type> : mpl::true_ {}; - //] + template // enables int_(n) + struct use_terminal > > + : is_arithmetic {}; + + template <> // enables *lazy* int_(n) + struct use_lazy_terminal : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + //[primitive_parsers_enable_long + template <> // enables long_ + struct use_terminal : mpl::true_ {}; + //] + + template // enables lit(n) + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; + + template // enables long_(n) + struct use_terminal > > + : is_arithmetic {}; + + template <> // enables *lazy* long_(n) + struct use_lazy_terminal : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// #ifdef BOOST_HAS_LONG_LONG - //[primitive_parsers_enable_long_long_ - template <> - struct use_terminal // enables long_long - : mpl::true_ {}; + //[primitive_parsers_enable_long_long + template <> // enables long_long + struct use_terminal : mpl::true_ {}; //] + + template // enables lit(n) + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; + + template // enables long_long(n) + struct use_terminal > > + : is_arithmetic {}; + + template <> // enables *lazy* long_long(n) + struct use_lazy_terminal : mpl::true_ {}; #endif + + /////////////////////////////////////////////////////////////////////////// + // enables any custom int_parser + template + struct use_terminal > + : mpl::true_ {}; + + // enables any custom int_parser(n) + template + struct use_terminal + , fusion::vector1 > + > : mpl::true_ {}; + + // enables *lazy* custom int_parser(n) + template + struct use_lazy_terminal, 1 + > : mpl::true_ {}; }} namespace boost { namespace spirit { namespace qi @@ -64,17 +164,20 @@ namespace boost { namespace spirit { namespace qi using spirit::long_long_type; #endif + using spirit::lit; // lit(1) is equivalent to 1 + using spirit::lit_type; + /////////////////////////////////////////////////////////////////////////// // This is the actual int parser /////////////////////////////////////////////////////////////////////////// - //[primitive_parsers_int + //[primitive_parsers_int_parser template < typename T , unsigned Radix = 10 , unsigned MinDigits = 1 , int MaxDigits = -1> - struct int_parser_impl - : primitive_parser > + struct any_int_parser + : primitive_parser > { // check template parameter 'Radix' for validity BOOST_SPIRIT_ASSERT_MSG( @@ -93,9 +196,9 @@ namespace boost { namespace spirit { namespace qi , Context& /*context*/, Skipper const& skipper , Attribute& attr) const { + typedef extract_int extract; qi::skip_over(first, last, skipper); - return extract_int - ::call(first, last, attr); + return extract::call(first, last, attr); } template @@ -106,57 +209,193 @@ namespace boost { namespace spirit { namespace qi }; //] - /////////////////////////////////////////////////////////////////////////// - // This one is the class that the user can instantiate directly - /////////////////////////////////////////////////////////////////////////// - template < - typename T - , unsigned Radix = 10 - , unsigned MinDigits = 1 - , int MaxDigits = -1> - struct int_parser - : proto::terminal >::type + template + struct literal_int_parser + : primitive_parser > { + // check template parameter 'Radix' for validity + BOOST_SPIRIT_ASSERT_MSG( + Radix == 2 || Radix == 8 || Radix == 10 || Radix == 16, + not_supported_radix, ()); + + template + literal_int_parser(Value const& n) : n_(n) {} + + template + struct attribute + : mpl::if_c + {}; + + template + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute& attr) const + { + typedef extract_int extract; + qi::skip_over(first, last, skipper); + + T attr_; + + if (extract::call(first, last, attr_) && (attr_ == n_)) + { + traits::assign_to(attr_, attr); + return true; + } + + return false; + } + + template + info what(Context& /*context*/) const + { + return info("integer"); + } + + T n_; }; /////////////////////////////////////////////////////////////////////////// // Parser generators: make_xxx function (objects) /////////////////////////////////////////////////////////////////////////// //[primitive_parsers_make_int - template + template < + typename T + , unsigned Radix = 10 + , unsigned MinDigits = 1 + , int MaxDigits = -1> struct make_int { - typedef int_parser_impl result_type; + typedef any_int_parser result_type; result_type operator()(unused_type, unused_type) const { return result_type(); } }; //] + + template + struct make_direct_int + { + typedef literal_int_parser + result_type; + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; + + template + struct make_literal_int + { + typedef literal_int_parser result_type; + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; + + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive< + terminal_ex > + , Modifiers, typename enable_if >::type> + : make_literal_int {}; - //[primitive_parsers_short_ - template - struct make_primitive : make_int {}; - //] + template + struct make_primitive< + terminal_ex > + , Modifiers, typename enable_if >::type> + : make_literal_int {}; - //[primitive_parsers_int_ - template - struct make_primitive : make_int {}; - //] - - //[primitive_parsers_long_ - template - struct make_primitive : make_int {}; - //] + template + struct make_primitive< + terminal_ex > + , Modifiers, typename enable_if >::type> + : make_literal_int {}; #ifdef BOOST_HAS_LONG_LONG - //[primitive_parsers_long_long_ - template - struct make_primitive - : make_int {}; - //] + template + struct make_primitive< + terminal_ex > + , Modifiers, typename enable_if >::type> + : make_literal_int {}; #endif + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive< + tag::int_parser + , Modifiers> + : make_int {}; + + template + struct make_primitive< + terminal_ex + , fusion::vector1 >, Modifiers> + : make_direct_int {}; + + /////////////////////////////////////////////////////////////////////////// + //[primitive_parsers_short_primitive + template + struct make_primitive + : make_int {}; + //] + + template + struct make_primitive< + terminal_ex > , Modifiers> + : make_direct_int {}; + + /////////////////////////////////////////////////////////////////////////// + //[primitive_parsers_int_primitive + template + struct make_primitive + : make_int {}; + //] + + template + struct make_primitive< + terminal_ex > , Modifiers> + : make_direct_int {}; + + /////////////////////////////////////////////////////////////////////////// + //[primitive_parsers_long_primitive + template + struct make_primitive + : make_int {}; + //] + + template + struct make_primitive< + terminal_ex > , Modifiers> + : make_direct_int {}; + + /////////////////////////////////////////////////////////////////////////// +#ifdef BOOST_HAS_LONG_LONG + //[primitive_parsers_long_long_primitive + template + struct make_primitive + : make_int {}; + //] + + template + struct make_primitive< + terminal_ex > , Modifiers> + : make_direct_int {}; +#endif }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/numeric/numeric_utils.hpp b/3party/boost/boost/spirit/home/qi/numeric/numeric_utils.hpp index c268dcea16..b195b301cb 100644 --- a/3party/boost/boost/spirit/home/qi/numeric/numeric_utils.hpp +++ b/3party/boost/boost/spirit/home/qi/numeric/numeric_utils.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -52,7 +52,7 @@ namespace boost { namespace spirit { namespace qi not_supported_radix, ()); template - static bool call(Iterator& first, Iterator const& last, T& attr) + inline static bool call(Iterator& first, Iterator const& last, T& attr) { if (first == last) return false; @@ -77,7 +77,7 @@ namespace boost { namespace spirit { namespace qi } template - static bool call(Iterator& first, Iterator const& last, Attribute& attr_) + inline static bool call(Iterator& first, Iterator const& last, Attribute& attr_) { // this case is called when Attribute is not T T attr; @@ -102,7 +102,7 @@ namespace boost { namespace spirit { namespace qi not_supported_radix, ()); template - static bool call(Iterator& first, Iterator const& last, T& attr) + inline static bool call(Iterator& first, Iterator const& last, T& attr) { if (first == last) return false; @@ -131,7 +131,7 @@ namespace boost { namespace spirit { namespace qi } template - static bool call(Iterator& first, Iterator const& last, Attribute& attr_) + inline static bool call(Iterator& first, Iterator const& last, Attribute& attr_) { // this case is called when Attribute is not T T attr; diff --git a/3party/boost/boost/spirit/home/qi/numeric/real.hpp b/3party/boost/boost/spirit/home/qi/numeric/real.hpp index 6506c5f3bb..5cd479c231 100644 --- a/3party/boost/boost/spirit/home/qi/numeric/real.hpp +++ b/3party/boost/boost/spirit/home/qi/numeric/real.hpp @@ -1,5 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2011 Bryce Lelbach Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -12,29 +13,122 @@ #endif #include +#include +#include +#include #include #include #include -#include -#include #include +#include namespace boost { namespace spirit { + namespace qi + { + /////////////////////////////////////////////////////////////////////// + // forward declaration only + template + struct real_policies; + + /////////////////////////////////////////////////////////////////////// + // This is the class that the user can instantiate directly in + // order to create a customized real parser + template > + struct real_parser + : spirit::terminal > + { + typedef tag::stateful_tag tag_type; + + real_parser() {} + real_parser(Policies const& p) + : spirit::terminal(p) {} + }; + } + /////////////////////////////////////////////////////////////////////////// // Enablers /////////////////////////////////////////////////////////////////////////// - template <> - struct use_terminal // enables float_ + template <> // enables float_ + struct use_terminal : mpl::true_ {}; - template <> - struct use_terminal // enables double_ + template <> // enables double_ + struct use_terminal : mpl::true_ {}; - template <> - struct use_terminal // enables long_double + template <> // enables long_double + struct use_terminal : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + template // enables lit(n) + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; + + template // enables lit(n) + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; + + template // enables lit(n) + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + template // enables float_(...) + struct use_terminal > + > : mpl::true_ {}; + + template // enables double_(...) + struct use_terminal > + > : mpl::true_ {}; + + template // enables long_double(...) + struct use_terminal > + > : mpl::true_ {}; + + template <> // enables *lazy* float_(...) + struct use_lazy_terminal + : mpl::true_ {}; + + template <> // enables *lazy* double_(...) + struct use_lazy_terminal + : mpl::true_ {}; + + template <> // enables *lazy* double_(...) + struct use_lazy_terminal + : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + // enables custom real_parser + template + struct use_terminal > + : mpl::true_ {}; + + // enables custom real_parser(...) + template + struct use_terminal + , fusion::vector1 > > + : mpl::true_ {}; + + // enables *lazy* custom real_parser(...) + template + struct use_lazy_terminal< + qi::domain + , tag::stateful_tag + , 1 // arity + > : mpl::true_ {}; }} namespace boost { namespace spirit { namespace qi @@ -46,15 +140,14 @@ namespace boost { namespace spirit { namespace qi using spirit::long_double; using spirit::long_double_type; + using spirit::lit; // lit(1.0) is equivalent to 1.0 + /////////////////////////////////////////////////////////////////////////// // This is the actual real number parser /////////////////////////////////////////////////////////////////////////// - template < - typename T = double, - typename RealPolicies = real_policies - > - struct real_parser_impl - : primitive_parser > + template > + struct any_real_parser + : primitive_parser > { template struct attribute @@ -67,22 +160,22 @@ namespace boost { namespace spirit { namespace qi , Context& /*context*/, Skipper const& skipper , T& attr) const { + typedef detail::real_impl extract; qi::skip_over(first, last, skipper); - return detail::real_impl:: - parse(first, last, attr, RealPolicies()); + return extract::parse(first, last, attr, RealPolicies()); } template bool parse(Iterator& first, Iterator const& last , Context& context, Skipper const& skipper - , Attribute& attr_) const + , Attribute& attr) const { // this case is called when Attribute is not T - T attr; - if (parse(first, last, context, skipper, attr)) + T attr_; + if (parse(first, last, context, skipper, attr_)) { - traits::assign_to(attr, attr_); + traits::assign_to(attr_, attr); return true; } return false; @@ -91,43 +184,154 @@ namespace boost { namespace spirit { namespace qi template info what(Context& /*context*/) const { - return info("real-number"); + return info("real"); } }; - /////////////////////////////////////////////////////////////////////////// - // This one is the class that the user can instantiate directly - /////////////////////////////////////////////////////////////////////////// - template < - typename T, - typename RealPolicies = real_policies - > - struct real_parser - : proto::terminal >::type + template + , bool no_attribute = true> + struct literal_real_parser + : primitive_parser > { + template + literal_real_parser(Value const& n) : n_(n) {} + + template + struct attribute + : mpl::if_c + {}; + + template + bool parse(Iterator& first, Iterator const& last + , Context& context, Skipper const& skipper + , Attribute& attr) const + { + typedef detail::real_impl extract; + qi::skip_over(first, last, skipper); + + T attr_; + + if (extract::parse(first, last, attr_, RealPolicies()) && + (attr_ == n_)) + { + traits::assign_to(attr_, attr); + return true; + } + + return false; + } + + template + info what(Context& /*context*/) const + { + return info("real"); + } + + T n_; }; /////////////////////////////////////////////////////////////////////////// // Parser generators: make_xxx function (objects) /////////////////////////////////////////////////////////////////////////// - template + template > struct make_real { - typedef real_parser_impl > result_type; + typedef any_real_parser result_type; + result_type operator()(unused_type, unused_type) const { return result_type(); } }; - template - struct make_primitive : make_real {}; + template > + struct make_direct_real + { + typedef literal_real_parser result_type; - template - struct make_primitive : make_real {}; + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(T(fusion::at_c<0>(term.args))); + } + }; + template > + struct make_literal_real + { + typedef literal_real_parser result_type; + + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; + + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive< + terminal_ex > + , Modifiers, typename enable_if >::type> + : make_literal_real {}; + + template + struct make_primitive< + terminal_ex > + , Modifiers, typename enable_if >::type> + : make_literal_real {}; + + template + struct make_primitive< + terminal_ex > + , Modifiers, typename enable_if >::type> + : make_literal_real {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive< + tag::stateful_tag, Modifiers> + : make_real {}; + + template + struct make_primitive< + terminal_ex + , fusion::vector1 >, Modifiers> + : make_direct_real {}; + + /////////////////////////////////////////////////////////////////////////// template - struct make_primitive : make_real {}; + struct make_primitive + : make_real {}; + + template + struct make_primitive< + terminal_ex >, Modifiers> + : make_direct_real {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive + : make_real {}; + + template + struct make_primitive< + terminal_ex >, Modifiers> + : make_direct_real {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive + : make_real {}; + + template + struct make_primitive< + terminal_ex >, Modifiers> + : make_direct_real {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/numeric/real_policies.hpp b/3party/boost/boost/spirit/home/qi/numeric/real_policies.hpp index 126fe63b2b..6512d6f3f7 100644 --- a/3party/boost/boost/spirit/home/qi/numeric/real_policies.hpp +++ b/3party/boost/boost/spirit/home/qi/numeric/real_policies.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/numeric/uint.hpp b/3party/boost/boost/spirit/home/qi/numeric/uint.hpp index 8527e65e7c..33d923e6d4 100644 --- a/3party/boost/boost/spirit/home/qi/numeric/uint.hpp +++ b/3party/boost/boost/spirit/home/qi/numeric/uint.hpp @@ -1,5 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2011 Bryce Lelbach Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -12,78 +13,198 @@ #endif #include +#include #include #include #include #include #include #include +#include namespace boost { namespace spirit { + namespace tag + { + template + struct uint_parser {}; + } + + namespace qi + { + /////////////////////////////////////////////////////////////////////// + // This one is the class that the user can instantiate directly in + // order to create a customized int parser + template + struct uint_parser + : spirit::terminal > + {}; + } + /////////////////////////////////////////////////////////////////////////// // Enablers /////////////////////////////////////////////////////////////////////////// - template <> - struct use_terminal // enables bin + template <> // enables ushort_ + struct use_terminal : mpl::true_ {}; + + template // enables lit(n) + struct use_terminal > + , typename enable_if >::type> : mpl::true_ {}; - template <> - struct use_terminal // enables oct + template // enables ushort_(n) + struct use_terminal > > + : is_arithmetic {}; + + template <> // enables *lazy* ushort_(n) + struct use_lazy_terminal : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + template <> // enables uint_ + struct use_terminal : mpl::true_ {}; + + template // enables lit(n) + struct use_terminal > + , typename enable_if >::type> : mpl::true_ {}; - template <> - struct use_terminal // enables hex + template // enables uint_(n) + struct use_terminal > > + : is_arithmetic {}; + + template <> // enables *lazy* uint_(n) + struct use_lazy_terminal : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + template <> // enables ulong_ + struct use_terminal : mpl::true_ {}; + + template // enables lit(n) + struct use_terminal > + , typename enable_if >::type> : mpl::true_ {}; - template <> - struct use_terminal // enables ushort_ - : mpl::true_ {}; + template // enables ulong_(n) + struct use_terminal > > + : is_arithmetic {}; - template <> - struct use_terminal // enables ulong_ - : mpl::true_ {}; - - template <> - struct use_terminal // enables uint_ - : mpl::true_ {}; + template <> // enables *lazy* ulong_(n) + struct use_lazy_terminal : mpl::true_ {}; + /////////////////////////////////////////////////////////////////////////// #ifdef BOOST_HAS_LONG_LONG - template <> - struct use_terminal // enables ulong_long + template <> // enables ulong_long + struct use_terminal : mpl::true_ {}; + + template // enables lit(n) + struct use_terminal > + , typename enable_if >::type> : mpl::true_ {}; + + template // enables ulong_long(n) + struct use_terminal > > + : is_arithmetic {}; + + template <> // enables *lazy* ulong_long(n) + struct use_lazy_terminal : mpl::true_ {}; #endif + + /////////////////////////////////////////////////////////////////////////// + template <> // enables bin + struct use_terminal : mpl::true_ {}; + + template // enables bin(n) + struct use_terminal > > + : is_arithmetic {}; + + template <> // enables *lazy* bin(n) + struct use_lazy_terminal : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + template <> // enables oct + struct use_terminal : mpl::true_ {}; + + template // enables oct(n) + struct use_terminal > > + : is_arithmetic {}; + + template <> // enables *lazy* oct(n) + struct use_lazy_terminal : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + template <> // enables hex + struct use_terminal : mpl::true_ {}; + + template // enables hex(n) + struct use_terminal > > + : is_arithmetic {}; + + template <> // enables *lazy* hex(n) + struct use_lazy_terminal : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + // enables any custom uint_parser + template + struct use_terminal > + : mpl::true_ {}; + + // enables any custom uint_parser(n) + template + struct use_terminal + , fusion::vector1 > + > : mpl::true_ {}; + + // enables *lazy* custom uint_parser(n) + template + struct use_lazy_terminal, 1 + > : mpl::true_ {}; }} namespace boost { namespace spirit { namespace qi { using spirit::bin; - using spirit::bin_type; using spirit::oct; - using spirit::oct_type; using spirit::hex; - using spirit::hex_type; + using spirit::ushort_; using spirit::ushort__type; - using spirit::ulong_; - using spirit::ulong__type; using spirit::uint_; using spirit::uint__type; + using spirit::ulong_; + using spirit::ulong__type; #ifdef BOOST_HAS_LONG_LONG using spirit::ulong_long; using spirit::ulong_long_type; #endif + using spirit::lit; // lit(1) is equivalent to 1 + /////////////////////////////////////////////////////////////////////////// - // This actual unsigned int parser + // This is the actual uint parser /////////////////////////////////////////////////////////////////////////// - template < - typename T - , unsigned Radix = 10 - , unsigned MinDigits = 1 - , int MaxDigits = -1> - struct uint_parser_impl - : primitive_parser > + template + struct any_uint_parser + : primitive_parser > { // check template parameter 'Radix' for validity BOOST_SPIRIT_ASSERT_MSG( @@ -102,9 +223,9 @@ namespace boost { namespace spirit { namespace qi , Context& /*context*/, Skipper const& skipper , Attribute& attr) const { + typedef extract_uint extract; qi::skip_over(first, last, skipper); - return extract_uint - ::call(first, last, attr); + return extract::call(first, last, attr); } template @@ -113,65 +234,214 @@ namespace boost { namespace spirit { namespace qi return info("unsigned-integer"); } }; + //] - /////////////////////////////////////////////////////////////////////////// - // uint_parser is the class that the user can instantiate directly - /////////////////////////////////////////////////////////////////////////// - template < - typename T - , unsigned Radix = 10 - , unsigned MinDigits = 1 - , int MaxDigits = -1> - struct uint_parser - : proto::terminal >::type + template + struct literal_uint_parser + : primitive_parser > { + // check template parameter 'Radix' for validity + BOOST_SPIRIT_ASSERT_MSG( + Radix == 2 || Radix == 8 || Radix == 10 || Radix == 16, + not_supported_radix, ()); + + template + literal_uint_parser(Value const& n) : n_(n) {} + + template + struct attribute + : mpl::if_c + {}; + + template + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute& attr) const + { + typedef extract_uint extract; + qi::skip_over(first, last, skipper); + + T attr_; + + if (extract::call(first, last, attr_) && (attr_ == n_)) + { + traits::assign_to(attr_, attr); + return true; + } + + return false; + } + + template + info what(Context& /*context*/) const + { + return info("unsigned-integer"); + } + + T n_; }; /////////////////////////////////////////////////////////////////////////// // Parser generators: make_xxx function (objects) /////////////////////////////////////////////////////////////////////////// - template < - typename T - , unsigned Radix = 10 - , unsigned MinDigits = 1 - , int MaxDigits = -1> + template struct make_uint { - typedef uint_parser_impl result_type; + typedef any_uint_parser result_type; result_type operator()(unused_type, unused_type) const { return result_type(); } }; + template + struct make_direct_uint + { + typedef literal_uint_parser + result_type; + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; + + template + struct make_literal_uint + { + typedef literal_uint_parser result_type; + template + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; + + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive< + terminal_ex > + , Modifiers, typename enable_if >::type> + : make_literal_uint {}; + + template + struct make_primitive< + terminal_ex > + , Modifiers, typename enable_if >::type> + : make_literal_uint {}; + + template + struct make_primitive< + terminal_ex > + , Modifiers, typename enable_if >::type> + : make_literal_uint {}; + +#ifdef BOOST_HAS_LONG_LONG + template + struct make_primitive< + terminal_ex > + , Modifiers, typename enable_if >::type> + : make_literal_uint {}; +#endif + + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive< + tag::uint_parser + , Modifiers> + : make_uint {}; + + template + struct make_primitive< + terminal_ex + , fusion::vector1 >, Modifiers> + : make_direct_uint {}; + + /////////////////////////////////////////////////////////////////////////// template struct make_primitive - : make_uint {}; + : make_uint {}; + template + struct make_primitive< + terminal_ex > , Modifiers> + : make_direct_uint {}; + + /////////////////////////////////////////////////////////////////////////// template struct make_primitive - : make_uint {}; + : make_uint {}; + template + struct make_primitive< + terminal_ex > , Modifiers> + : make_direct_uint {}; + + /////////////////////////////////////////////////////////////////////////// template struct make_primitive - : make_uint {}; + : make_uint {}; + template + struct make_primitive< + terminal_ex > , Modifiers> + : make_direct_uint {}; + + /////////////////////////////////////////////////////////////////////////// template struct make_primitive : make_uint {}; + template + struct make_primitive< + terminal_ex > , Modifiers> + : make_direct_uint {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct make_primitive + : make_uint {}; + + template + struct make_primitive< + terminal_ex > , Modifiers> + : make_direct_uint {}; + + /////////////////////////////////////////////////////////////////////////// template struct make_primitive : make_uint {}; - template - struct make_primitive - : make_uint {}; + template + struct make_primitive< + terminal_ex > , Modifiers> + : make_direct_uint {}; + /////////////////////////////////////////////////////////////////////////// #ifdef BOOST_HAS_LONG_LONG template struct make_primitive : make_uint {}; + + template + struct make_primitive< + terminal_ex > , Modifiers> + : make_direct_uint {}; #endif }}} diff --git a/3party/boost/boost/spirit/home/qi/operator.hpp b/3party/boost/boost/spirit/home/qi/operator.hpp index 345c1267ca..de44f5eef3 100644 --- a/3party/boost/boost/spirit/home/qi/operator.hpp +++ b/3party/boost/boost/spirit/home/qi/operator.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/operator/alternative.hpp b/3party/boost/boost/spirit/home/qi/operator/alternative.hpp index ecc65ecc2d..9785d45101 100644 --- a/3party/boost/boost/spirit/home/qi/operator/alternative.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/alternative.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include #include #include @@ -47,8 +49,9 @@ namespace boost { namespace spirit { namespace qi { // Put all the element attributes in a tuple typedef typename traits::build_attribute_sequence< - Elements, Context, mpl::identity, Iterator>::type - all_attributes; + Elements, Context, traits::alternative_attribute_transform + , Iterator, qi::domain + >::type all_attributes; // Ok, now make a variant over the attribute sequence. Note that // build_variant makes sure that 1) all attributes in the variant @@ -99,9 +102,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : nary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : nary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/operator/and_predicate.hpp b/3party/boost/boost/spirit/home/qi/operator/and_predicate.hpp index a25f3a01b0..031ce1df01 100644 --- a/3party/boost/boost/spirit/home/qi/operator/and_predicate.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/and_predicate.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include namespace boost { namespace spirit @@ -74,9 +76,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/operator/difference.hpp b/3party/boost/boost/spirit/home/qi/operator/difference.hpp index 38a749238b..5f8c4c90cc 100644 --- a/3party/boost/boost/spirit/home/qi/operator/difference.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/difference.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include namespace boost { namespace spirit @@ -94,9 +96,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : binary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : binary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/operator/expect.hpp b/3party/boost/boost/spirit/home/qi/operator/expect.hpp index da3ed8d88b..4df1dd0000 100644 --- a/3party/boost/boost/spirit/home/qi/operator/expect.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/expect.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include #include @@ -84,9 +86,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : nary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : nary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/operator/kleene.hpp b/3party/boost/boost/spirit/home/qi/operator/kleene.hpp index e8f2836732..b106c92453 100644 --- a/3party/boost/boost/spirit/home/qi/operator/kleene.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/kleene.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include namespace boost { namespace spirit @@ -66,6 +68,9 @@ namespace boost { namespace spirit { namespace qi value_type; value_type val = value_type(); + // ensure the attribute is actually a container type + traits::make_container(attr); + // Repeat while subject parses ok Iterator save = first; while (subject.parse(save, last, context, skipper, val) && @@ -108,9 +113,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : mpl::true_ {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/operator/list.hpp b/3party/boost/boost/spirit/home/qi/operator/list.hpp index 194be824dc..65904aa287 100644 --- a/3party/boost/boost/spirit/home/qi/operator/list.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/list.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include #include @@ -64,6 +66,9 @@ namespace boost { namespace spirit { namespace qi value_type; value_type val = value_type(); + // ensure the attribute is actually a container type + traits::make_container(attr); + Iterator save = first; if (!left.parse(save, last, context, skipper, val) || !traits::push_back(attr, val)) @@ -105,9 +110,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : binary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : mpl::true_ {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/operator/not_predicate.hpp b/3party/boost/boost/spirit/home/qi/operator/not_predicate.hpp index 3c32375eb3..57cbb0db4a 100644 --- a/3party/boost/boost/spirit/home/qi/operator/not_predicate.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/not_predicate.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include namespace boost { namespace spirit @@ -73,9 +75,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/operator/optional.hpp b/3party/boost/boost/spirit/home/qi/operator/optional.hpp index d4ea5cfa36..883a955526 100644 --- a/3party/boost/boost/spirit/home/qi/operator/optional.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/optional.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -13,6 +13,8 @@ #include #include +#include +#include #include #include #include @@ -91,9 +93,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute + , Context, Iterator> + : unary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/operator/permutation.hpp b/3party/boost/boost/spirit/home/qi/operator/permutation.hpp index dfbc9c2752..1dcad89e10 100644 --- a/3party/boost/boost/spirit/home/qi/operator/permutation.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/permutation.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include #include #include @@ -47,8 +49,9 @@ namespace boost { namespace spirit { namespace qi // Put all the element attributes in a tuple, // wrapping each element in a boost::optional typedef typename traits::build_attribute_sequence< - Elements, Context, traits::build_optional, Iterator>::type - all_attributes; + Elements, Context, traits::permutation_attribute_transform + , Iterator, qi::domain + >::type all_attributes; // Now, build a fusion vector over the attributes. Note // that build_fusion_vector 1) removes all unused attributes @@ -119,6 +122,7 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// // We specialize this for permutation (see support/attributes.hpp). // For permutation, we only wrap the attribute in a tuple IFF // it is not already a fusion tuple. @@ -126,9 +130,17 @@ namespace boost { namespace spirit { namespace traits struct pass_attribute, Attribute> : wrap_if_not_tuple {}; + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : nary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : nary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/operator/plus.hpp b/3party/boost/boost/spirit/home/qi/operator/plus.hpp index d5568386bc..2b9b5b2894 100644 --- a/3party/boost/boost/spirit/home/qi/operator/plus.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/plus.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include namespace boost { namespace spirit @@ -62,6 +64,9 @@ namespace boost { namespace spirit { namespace qi value_type; value_type val = value_type(); + // ensure the attribute is actually a container type + traits::make_container(attr); + Iterator save = first; if (!subject.parse(save, last, context, skipper, val) || !traits::push_back(attr, val)) @@ -102,9 +107,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : unary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : mpl::true_ {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/operator/sequence.hpp b/3party/boost/boost/spirit/home/qi/operator/sequence.hpp index 324498e886..843f4ec7e2 100644 --- a/3party/boost/boost/spirit/home/qi/operator/sequence.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/sequence.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -79,9 +79,17 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : nary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : nary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/operator/sequence_base.hpp b/3party/boost/boost/spirit/home/qi/operator/sequence_base.hpp index be991fd9a1..03b022c4a9 100644 --- a/3party/boost/boost/spirit/home/qi/operator/sequence_base.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/sequence_base.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -39,8 +40,9 @@ namespace boost { namespace spirit { namespace qi { // Put all the element attributes in a tuple typedef typename traits::build_attribute_sequence< - Elements, Context, mpl::identity, Iterator>::type - all_attributes; + Elements, Context, traits::sequence_attribute_transform + , Iterator, qi::domain + >::type all_attributes; // Now, build a fusion vector over the attributes. Note // that build_fusion_vector 1) removes all unused attributes @@ -95,6 +97,9 @@ namespace boost { namespace spirit { namespace qi , Context& context, Skipper const& skipper , Attribute& attr_, mpl::true_) const { + // ensure the attribute is actually a container type + traits::make_container(attr_); + Iterator iter = first; // return false if *any* of the parsers fail if (fusion::any(elements diff --git a/3party/boost/boost/spirit/home/qi/operator/sequential_or.hpp b/3party/boost/boost/spirit/home/qi/operator/sequential_or.hpp index e3bb29e037..80b86f38e4 100644 --- a/3party/boost/boost/spirit/home/qi/operator/sequential_or.hpp +++ b/3party/boost/boost/spirit/home/qi/operator/sequential_or.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -44,8 +44,9 @@ namespace boost { namespace spirit { namespace qi // Put all the element attributes in a tuple, // wrapping each element in a boost::optional typedef typename traits::build_attribute_sequence< - Elements, Context, traits::build_optional, Iterator>::type - all_attributes; + Elements, Context, traits::sequential_or_attribute_transform + , Iterator, qi::domain + >::type all_attributes; // Now, build a fusion vector over the attributes. Note // that build_fusion_vector 1) removes all unused attributes @@ -101,6 +102,7 @@ namespace boost { namespace spirit { namespace qi namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// // We specialize this for sequential_or (see support/attributes.hpp). // For sequential_or, we only wrap the attribute in a tuple IFF // it is not already a fusion tuple. @@ -108,9 +110,17 @@ namespace boost { namespace spirit { namespace traits struct pass_attribute, Attribute> : wrap_if_not_tuple {}; + /////////////////////////////////////////////////////////////////////////// template struct has_semantic_action > : nary_has_semantic_action {}; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : nary_handles_container {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/parse.hpp b/3party/boost/boost/spirit/home/qi/parse.hpp index a5408cde6a..8806fdbb2d 100644 --- a/3party/boost/boost/spirit/home/qi/parse.hpp +++ b/3party/boost/boost/spirit/home/qi/parse.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/parse_attr.hpp b/3party/boost/boost/spirit/home/qi/parse_attr.hpp index dce670a389..1933ffb09c 100644 --- a/3party/boost/boost/spirit/home/qi/parse_attr.hpp +++ b/3party/boost/boost/spirit/home/qi/parse_attr.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // Copyright (c) 2009 Carl Barron // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -168,7 +168,6 @@ namespace boost { namespace spirit { namespace qi return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip , BOOST_PP_ENUM_PARAMS(N, attr)); } - }}} #undef BOOST_SPIRIT_QI_ATTRIBUTE_REFERENCE diff --git a/3party/boost/boost/spirit/home/qi/parser.hpp b/3party/boost/boost/spirit/home/qi/parser.hpp index 79aabf1e5b..ffd8bc913f 100644 --- a/3party/boost/boost/spirit/home/qi/parser.hpp +++ b/3party/boost/boost/spirit/home/qi/parser.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/reference.hpp b/3party/boost/boost/spirit/home/qi/reference.hpp index 73f4b8835e..f6fcabcee1 100644 --- a/3party/boost/boost/spirit/home/qi/reference.hpp +++ b/3party/boost/boost/spirit/home/qi/reference.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include namespace boost { namespace spirit { namespace qi @@ -52,4 +54,16 @@ namespace boost { namespace spirit { namespace qi }; }}} +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container, Attribute, Context + , Iterator> + : handles_container::type + , Attribute, Context, Iterator> + {}; +}}} + #endif diff --git a/3party/boost/boost/spirit/home/qi/skip_flag.hpp b/3party/boost/boost/spirit/home/qi/skip_flag.hpp index 429112ff61..28fd856e05 100644 --- a/3party/boost/boost/spirit/home/qi/skip_flag.hpp +++ b/3party/boost/boost/spirit/home/qi/skip_flag.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/skip_over.hpp b/3party/boost/boost/spirit/home/qi/skip_over.hpp index ee8b97a3eb..f46b304404 100644 --- a/3party/boost/boost/spirit/home/qi/skip_over.hpp +++ b/3party/boost/boost/spirit/home/qi/skip_over.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/stream.hpp b/3party/boost/boost/spirit/home/qi/stream.hpp index b5e0cf6324..59bc7d4ed4 100644 --- a/3party/boost/boost/spirit/home/qi/stream.hpp +++ b/3party/boost/boost/spirit/home/qi/stream.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/stream/detail/iterator_source.hpp b/3party/boost/boost/spirit/home/qi/stream/detail/iterator_source.hpp index 6f89969485..7e437c436c 100644 --- a/3party/boost/boost/spirit/home/qi/stream/detail/iterator_source.hpp +++ b/3party/boost/boost/spirit/home/qi/stream/detail/iterator_source.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/stream/detail/match_manip.hpp b/3party/boost/boost/spirit/home/qi/stream/detail/match_manip.hpp index 547cc14317..e74bdcfc91 100644 --- a/3party/boost/boost/spirit/home/qi/stream/detail/match_manip.hpp +++ b/3party/boost/boost/spirit/home/qi/stream/detail/match_manip.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/stream/detail/match_manip_auto.hpp b/3party/boost/boost/spirit/home/qi/stream/detail/match_manip_auto.hpp index e6621161c5..f50eda8a17 100644 --- a/3party/boost/boost/spirit/home/qi/stream/detail/match_manip_auto.hpp +++ b/3party/boost/boost/spirit/home/qi/stream/detail/match_manip_auto.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/stream/match_manip.hpp b/3party/boost/boost/spirit/home/qi/stream/match_manip.hpp index 2cff032949..83c70703de 100644 --- a/3party/boost/boost/spirit/home/qi/stream/match_manip.hpp +++ b/3party/boost/boost/spirit/home/qi/stream/match_manip.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/stream/match_manip_attr.hpp b/3party/boost/boost/spirit/home/qi/stream/match_manip_attr.hpp index 7e1aa57759..4f5cd0f373 100644 --- a/3party/boost/boost/spirit/home/qi/stream/match_manip_attr.hpp +++ b/3party/boost/boost/spirit/home/qi/stream/match_manip_attr.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/stream/stream.hpp b/3party/boost/boost/spirit/home/qi/stream/stream.hpp index 3bc11e9ec3..dc17fe6fac 100644 --- a/3party/boost/boost/spirit/home/qi/stream/stream.hpp +++ b/3party/boost/boost/spirit/home/qi/stream/stream.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/string.hpp b/3party/boost/boost/spirit/home/qi/string.hpp index 77ec04774b..70de51bdc5 100644 --- a/3party/boost/boost/spirit/home/qi/string.hpp +++ b/3party/boost/boost/spirit/home/qi/string.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/string/detail/tst.hpp b/3party/boost/boost/spirit/home/qi/string/detail/tst.hpp index 4dbc3f9828..989477d27b 100644 --- a/3party/boost/boost/spirit/home/qi/string/detail/tst.hpp +++ b/3party/boost/boost/spirit/home/qi/string/detail/tst.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -66,7 +66,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail find(tst_node* start, Iterator& first, Iterator last, Filter filter) { if (first == last) - return false; + return 0; Iterator i = first; Iterator latest = first; diff --git a/3party/boost/boost/spirit/home/qi/string/lit.hpp b/3party/boost/boost/spirit/home/qi/string/lit.hpp index 64ce4e0fe8..85efbb52bc 100644 --- a/3party/boost/boost/spirit/home/qi/string/lit.hpp +++ b/3party/boost/boost/spirit/home/qi/string/lit.hpp @@ -1,5 +1,7 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2010 Bryce Lelbach Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -31,6 +35,7 @@ #include #include #include +#include #include namespace boost { namespace spirit @@ -57,11 +62,18 @@ namespace boost { namespace spirit , 1 /*arity*/ > : mpl::true_ {}; + // enables lit(...) + template + struct use_terminal > + , typename enable_if >::type> + : mpl::true_ {}; }} namespace boost { namespace spirit { namespace qi { using spirit::lit; + using spirit::lit_type; /////////////////////////////////////////////////////////////////////////// // Parse for literal strings @@ -201,7 +213,48 @@ namespace boost { namespace spirit { namespace qi } }; - template + // lit("...") + template + struct make_primitive< + terminal_ex > + , Modifiers + , typename enable_if >::type> + { + typedef has_modifier > no_case; + + typedef typename add_const::type const_string; + typedef typename mpl::if_< + no_case + , no_case_literal_string + , literal_string >::type + result_type; + + template + result_type operator()(Terminal const& term, unused_type) const + { + return op(fusion::at_c<0>(term.args), no_case()); + } + + template + result_type op(String const& str, mpl::false_) const + { + return result_type(str); + } + + template + result_type op(String const& str, mpl::true_) const + { + typedef typename traits::char_encoding_from_char< + typename traits::char_type_of::type>::type encoding_type; + typename spirit::detail::get_encoding::type encoding; + return result_type(traits::get_c_string(str), encoding); + } + }; + + /////////////////////////////////////////////////////////////////////////// + // string("...") + template struct make_primitive< terminal_ex< tag::char_code @@ -236,7 +289,22 @@ namespace boost { namespace spirit { namespace qi return result_type(traits::get_c_string(str), encoding()); } }; +}}} +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container + , Attribute, Context, Iterator> + : mpl::true_ {}; + + template + struct handles_container + , Attribute, Context, Iterator> + : mpl::true_ {}; }}} #endif diff --git a/3party/boost/boost/spirit/home/qi/string/symbols.hpp b/3party/boost/boost/spirit/home/qi/string/symbols.hpp index b961d55827..7abc8c519f 100644 --- a/3party/boost/boost/spirit/home/qi/string/symbols.hpp +++ b/3party/boost/boost/spirit/home/qi/string/symbols.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -63,11 +63,12 @@ namespace boost { namespace spirit { namespace qi typedef value_type type; }; - symbols() + symbols(std::string const& name = "symbols") : base_type(terminal::make(reference_(*this))) , add(*this) , remove(*this) , lookup(new Lookup()) + , name_(name) { } @@ -76,6 +77,7 @@ namespace boost { namespace spirit { namespace qi , add(*this) , remove(*this) , lookup(syms.lookup) + , name_(syms.name_) { } @@ -85,15 +87,17 @@ namespace boost { namespace spirit { namespace qi , add(*this) , remove(*this) , lookup(syms.lookup) + , name_(syms.name_) { } template - symbols(Symbols const& syms) + symbols(Symbols const& syms, std::string const& name = "symbols") : base_type(terminal::make(reference_(*this))) , add(*this) , remove(*this) , lookup(new Lookup()) + , name_(name) { typename range_const_iterator::type si = boost::begin(syms); while (si != boost::end(syms)) @@ -101,11 +105,13 @@ namespace boost { namespace spirit { namespace qi } template - symbols(Symbols const& syms, Data const& data) + symbols(Symbols const& syms, Data const& data + , std::string const& name = "symbols") : base_type(terminal::make(reference_(*this))) , add(*this) , remove(*this) , lookup(new Lookup()) + , name_(name) { typename range_const_iterator::type si = boost::begin(syms); typename range_const_iterator::type di = boost::begin(data); @@ -116,6 +122,7 @@ namespace boost { namespace spirit { namespace qi symbols& operator=(symbols const& rhs) { + name_ = rhs.name_; *lookup = *rhs.lookup; return *this; } @@ -124,6 +131,7 @@ namespace boost { namespace spirit { namespace qi symbols& operator=(symbols const& rhs) { + name_ = rhs.name_; *lookup = *rhs.lookup; return *this; } @@ -248,7 +256,16 @@ public: template info what(Context& /*context*/) const { - return info("symbols"); // $$$ for now! give symbols a name $$$ + return info(name_); + } + + void name(std::string const &str) + { + name_ = str; + } + std::string const &name() const + { + return name_; } struct adder @@ -340,6 +357,7 @@ public: adder add; remover remove; shared_ptr lookup; + std::string name_; }; /////////////////////////////////////////////////////////////////////////// diff --git a/3party/boost/boost/spirit/home/qi/string/tst.hpp b/3party/boost/boost/spirit/home/qi/string/tst.hpp index 0e4443ae94..200894fdc1 100644 --- a/3party/boost/boost/spirit/home/qi/string/tst.hpp +++ b/3party/boost/boost/spirit/home/qi/string/tst.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/string/tst_map.hpp b/3party/boost/boost/spirit/home/qi/string/tst_map.hpp index 250a778bc2..0ea838c42e 100644 --- a/3party/boost/boost/spirit/home/qi/string/tst_map.hpp +++ b/3party/boost/boost/spirit/home/qi/string/tst_map.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/qi/what.hpp b/3party/boost/boost/spirit/home/qi/what.hpp index 3ed85f9416..ae26b7bed1 100644 --- a/3party/boost/boost/spirit/home/qi/what.hpp +++ b/3party/boost/boost/spirit/home/qi/what.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support.hpp b/3party/boost/boost/spirit/home/support.hpp index 27c21dd1a1..5c341fdf2b 100644 --- a/3party/boost/boost/spirit/home/support.hpp +++ b/3party/boost/boost/spirit/home/support.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/action_dispatch.hpp b/3party/boost/boost/spirit/home/support/action_dispatch.hpp index f6f112ff80..0a2a56513b 100644 --- a/3party/boost/boost/spirit/home/support/action_dispatch.hpp +++ b/3party/boost/boost/spirit/home/support/action_dispatch.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/support/adapt_adt_attributes.hpp b/3party/boost/boost/spirit/home/support/adapt_adt_attributes.hpp index 8360ac880c..99dc4c680e 100644 --- a/3party/boost/boost/spirit/home/support/adapt_adt_attributes.hpp +++ b/3party/boost/boost/spirit/home/support/adapt_adt_attributes.hpp @@ -30,7 +30,7 @@ namespace boost { namespace spirit { namespace traits template struct container_value > : container_value< - typename fusion::extension::access::adt_attribute_proxy< + typename fusion::extension::adt_attribute_proxy< T, N, Const >::type > @@ -63,7 +63,7 @@ namespace boost { namespace spirit { namespace traits {}; /////////////////////////////////////////////////////////////////////////// - template + template struct assign_to_attribute_from_value< fusion::extension::adt_attribute_proxy , Val> @@ -83,8 +83,7 @@ namespace boost { namespace spirit { namespace traits {}; /////////////////////////////////////////////////////////////////////////// - template < - typename T, int N, bool Const, typename Attribute, typename Domain> + template struct transform_attribute< fusion::extension::adt_attribute_proxy , Attribute @@ -108,7 +107,7 @@ namespace boost { namespace spirit { namespace traits val = attr; } static void - fail(fusion::extension::access::adt_attribute_proxy&) + fail(fusion::extension::adt_attribute_proxy&) { } }; diff --git a/3party/boost/boost/spirit/home/support/algorithm/any.hpp b/3party/boost/boost/spirit/home/support/algorithm/any.hpp index 247b8c2b02..a62201f781 100644 --- a/3party/boost/boost/spirit/home/support/algorithm/any.hpp +++ b/3party/boost/boost/spirit/home/support/algorithm/any.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/algorithm/any_if.hpp b/3party/boost/boost/spirit/home/support/algorithm/any_if.hpp index 545c731578..48e6fae6fa 100644 --- a/3party/boost/boost/spirit/home/support/algorithm/any_if.hpp +++ b/3party/boost/boost/spirit/home/support/algorithm/any_if.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/algorithm/any_if_ns.hpp b/3party/boost/boost/spirit/home/support/algorithm/any_if_ns.hpp index 8d5659ff7b..394f365b28 100644 --- a/3party/boost/boost/spirit/home/support/algorithm/any_if_ns.hpp +++ b/3party/boost/boost/spirit/home/support/algorithm/any_if_ns.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/algorithm/any_ns.hpp b/3party/boost/boost/spirit/home/support/algorithm/any_ns.hpp index 42ab44b1f9..63b95267ae 100644 --- a/3party/boost/boost/spirit/home/support/algorithm/any_ns.hpp +++ b/3party/boost/boost/spirit/home/support/algorithm/any_ns.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/argument.hpp b/3party/boost/boost/spirit/home/support/argument.hpp index d038834722..39b087fa05 100644 --- a/3party/boost/boost/spirit/home/support/argument.hpp +++ b/3party/boost/boost/spirit/home/support/argument.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/assert_msg.hpp b/3party/boost/boost/spirit/home/support/assert_msg.hpp index 3b4204c58f..db36072917 100644 --- a/3party/boost/boost/spirit/home/support/assert_msg.hpp +++ b/3party/boost/boost/spirit/home/support/assert_msg.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/attributes.hpp b/3party/boost/boost/spirit/home/support/attributes.hpp index 5bdc52d56c..fc8cd338ca 100644 --- a/3party/boost/boost/spirit/home/support/attributes.hpp +++ b/3party/boost/boost/spirit/home/support/attributes.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -69,7 +68,7 @@ namespace boost { namespace spirit { namespace traits >::type> : mpl::true_ {}; - template + template struct not_is_variant : mpl::true_ {}; @@ -204,7 +203,7 @@ namespace boost { namespace spirit { namespace traits } /////////////////////////////////////////////////////////////////////////// - template + template struct not_is_optional : mpl::true_ {}; @@ -252,6 +251,98 @@ namespace boost { namespace spirit { namespace traits template struct attribute_type : mpl::identity {}; + + /////////////////////////////////////////////////////////////////////////// + // Retrieve the size of a fusion sequence (compile time) + /////////////////////////////////////////////////////////////////////////// + template + struct sequence_size + : fusion::result_of::size + {}; + + template <> + struct sequence_size + : mpl::int_<0> + {}; + + /////////////////////////////////////////////////////////////////////////// + // Retrieve the size of an attribute (runtime) + /////////////////////////////////////////////////////////////////////////// + template + struct attribute_size + { + typedef std::size_t type; + + static type call(Attribute const&) + { + return 1; + } + }; + + template + struct attribute_size + , mpl::not_ > + > + >::type + > { + typedef typename fusion::result_of::size::value_type type; + + static type call(Attribute const& attr) + { + return fusion::size(attr); + } + }; + + template + struct attribute_size + , mpl::not_ > + > + >::type + > { + typedef typename Attribute::size_type type; + + static type call(Attribute const& attr) + { + return attr.size(); + } + }; + + template + struct attribute_size > + { + typedef typename boost::detail::iterator_traits:: + difference_type type; + + static type call(iterator_range const& r) + { + return boost::detail::distance(r.begin(), r.end()); + } + }; + + template <> + struct attribute_size + { + typedef std::size_t type; + + static type call(unused_type) + { + return 0; + } + }; + + template + typename attribute_size::type + size(Attribute const& attr) + { + return attribute_size::call(attr); + } + /////////////////////////////////////////////////////////////////////////// // pass_attribute // @@ -343,6 +434,44 @@ namespace boost { namespace spirit { namespace traits : fusion::result_of::filter_if > {}; + /////////////////////////////////////////////////////////////////////////// + // sequence_attribute_transform + // + // This transform is invoked for every attribute in a sequence allowing + // to modify the attribute type exposed by a component to the enclosing + // sequence component. By default no transformation is performed. + /////////////////////////////////////////////////////////////////////////// + template + struct sequence_attribute_transform + : mpl::identity + {}; + + /////////////////////////////////////////////////////////////////////////// + // permutation_attribute_transform + // + // This transform is invoked for every attribute in a sequence allowing + // to modify the attribute type exposed by a component to the enclosing + // permutation component. By default a build_optional transformation is + // performed. + /////////////////////////////////////////////////////////////////////////// + template + struct permutation_attribute_transform + : traits::build_optional + {}; + + /////////////////////////////////////////////////////////////////////////// + // sequential_or_attribute_transform + // + // This transform is invoked for every attribute in a sequential_or allowing + // to modify the attribute type exposed by a component to the enclosing + // sequential_or component. By default a build_optional transformation is + // performed. + /////////////////////////////////////////////////////////////////////////// + template + struct sequential_or_attribute_transform + : traits::build_optional + {}; + /////////////////////////////////////////////////////////////////////////// // build_fusion_vector // @@ -385,7 +514,8 @@ namespace boost { namespace spirit { namespace traits // components. Transform::type is called on each element. /////////////////////////////////////////////////////////////////////////// template class Transform, typename Iterator = unused_type> + , template class Transform + , typename Iterator = unused_type, typename Domain = unused_type> struct build_attribute_sequence { struct element_attribute @@ -399,6 +529,7 @@ namespace boost { namespace spirit { namespace traits typedef typename Transform< typename attribute_of::type + , Domain >::type type; }; @@ -479,6 +610,18 @@ namespace boost { namespace spirit { namespace traits }; } + /////////////////////////////////////////////////////////////////////////// + // alternative_attribute_transform + // + // This transform is invoked for every attribute in an alternative allowing + // to modify the attribute type exposed by a component to the enclosing + // alternative component. By default no transformation is performed. + /////////////////////////////////////////////////////////////////////////// + template + struct alternative_attribute_transform + : mpl::identity + {}; + /////////////////////////////////////////////////////////////////////////// // build_variant // @@ -570,24 +713,25 @@ namespace boost { namespace spirit { namespace traits template struct make_attribute { + typedef typename remove_const::type attribute_type; typedef typename mpl::if_< is_same::type, unused_type> - , typename remove_const::type + , attribute_type , ActualAttribute&>::type type; typedef typename mpl::if_< is_same::type, unused_type> - , typename remove_const::type + , attribute_type , ActualAttribute>::type value_type; static Attribute call(unused_type) { // synthesize the attribute/parameter - return boost::get(value_initialized()); + return boost::get(value_initialized()); } template @@ -604,7 +748,7 @@ namespace boost { namespace spirit { namespace traits template struct make_attribute - : make_attribute + : make_attribute {}; template @@ -678,13 +822,15 @@ namespace boost { namespace spirit { namespace traits // meta function to return whether the argument is a one element fusion // sequence /////////////////////////////////////////////////////////////////////////// - template ::value> + template ::value + , bool IsProtoExpr = proto::is_expr::value> struct one_element_sequence : mpl::false_ {}; template - struct one_element_sequence + struct one_element_sequence : mpl::bool_::value == 1> {}; diff --git a/3party/boost/boost/spirit/home/support/attributes_fwd.hpp b/3party/boost/boost/spirit/home/support/attributes_fwd.hpp index 7e89949741..601ed762f4 100644 --- a/3party/boost/boost/spirit/home/support/attributes_fwd.hpp +++ b/3party/boost/boost/spirit/home/support/attributes_fwd.hpp @@ -1,6 +1,7 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2010 Bryce Lelbach Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -17,6 +18,7 @@ (defined(__APPLE__) && defined(__INTEL_COMPILER)) #include #endif +#include /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { namespace result_of @@ -25,6 +27,9 @@ namespace boost { namespace spirit { namespace result_of template struct extract_from; + template + struct attribute_as; + template struct pre_transform; @@ -58,6 +63,22 @@ namespace boost { namespace spirit { namespace traits /////////////////////////////////////////////////////////////////////////// template struct attribute_type; + + /////////////////////////////////////////////////////////////////////////// + // Retrieve the size of a fusion sequence (compile time) + /////////////////////////////////////////////////////////////////////////// + template + struct sequence_size; + + /////////////////////////////////////////////////////////////////////////// + // Retrieve the size of an attribute (runtime) + /////////////////////////////////////////////////////////////////////////// + template + struct attribute_size; + + template + typename attribute_size::type + size(Attribute const& attr); /////////////////////////////////////////////////////////////////////////// // Determines how we pass attributes to semantic actions. This @@ -97,6 +118,9 @@ namespace boost { namespace spirit { namespace traits template struct assign_to_attribute_from_value; + template + struct assign_to_container_from_value; + template void assign_to(T const& val, Attribute& attr); @@ -117,18 +141,39 @@ namespace boost { namespace spirit { namespace traits #endif ); + /////////////////////////////////////////////////////////////////////////// + // Karma only + template + struct attribute_as; + + template + typename spirit::result_of::attribute_as::type + as(Attribute const& attr); + + template + bool valid_as(Attribute const& attr); + /////////////////////////////////////////////////////////////////////////// // return the type currently stored in the given variant /////////////////////////////////////////////////////////////////////////// template struct variant_which; + template + int which(T const& v); + /////////////////////////////////////////////////////////////////////////// // Determine, whether T is a variant like type /////////////////////////////////////////////////////////////////////////// - template + template struct not_is_variant; + /////////////////////////////////////////////////////////////////////////// + // Determine, whether T is a variant like type + /////////////////////////////////////////////////////////////////////////// + template + struct not_is_optional; + /////////////////////////////////////////////////////////////////////////// // Clear data efficiently /////////////////////////////////////////////////////////////////////////// @@ -146,6 +191,14 @@ namespace boost { namespace spirit { namespace traits template struct is_container; + + template + struct is_iterator_range; + + /////////////////////////////////////////////////////////////////////////// + template + struct handles_container; /////////////////////////////////////////////////////////////////////////// // Qi only @@ -155,6 +208,9 @@ namespace boost { namespace spirit { namespace traits template struct is_empty_container; + template + struct make_container_attribute; + /////////////////////////////////////////////////////////////////////// // Determine the iterator type of the given container type // Karma only @@ -193,6 +249,29 @@ namespace boost { namespace spirit { namespace traits template void print_token(Out&, T const&); + /////////////////////////////////////////////////////////////////////////// + // Access attributes from a karma symbol table + /////////////////////////////////////////////////////////////////////////// + template + struct symbols_lookup; + + template + struct symbols_value; + + /////////////////////////////////////////////////////////////////////////// + // transform attribute types exposed from compound operator components + /////////////////////////////////////////////////////////////////////////// + template + struct alternative_attribute_transform; + + template + struct sequence_attribute_transform; + + template + struct permutation_attribute_transform; + + template + struct sequential_or_attribute_transform; }}} #endif diff --git a/3party/boost/boost/spirit/home/support/auto/meta_create.hpp b/3party/boost/boost/spirit/home/support/auto/meta_create.hpp index 0e39830245..ab4ec4758b 100644 --- a/3party/boost/boost/spirit/home/support/auto/meta_create.hpp +++ b/3party/boost/boost/spirit/home/support/auto/meta_create.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -20,6 +20,8 @@ #include #include #include +#include +#include // needed for workaround below #if defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ < 3)) @@ -189,6 +191,21 @@ namespace boost { namespace spirit return fusion::fold(Sequence(), unused, make_proto_expr()); } }; + + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + // Starting with newer versions of Proto, all Proto expressions are at + // the same time Fusion sequences. This is the correct behavior, but + // we need to distinguish between Fusion sequences and Proto + // expressions. This meta-function does exactly that. + template + struct is_fusion_sequence_but_not_proto_expr + : mpl::and_< + fusion::traits::is_sequence + , mpl::not_ > > + {}; + } }} #endif diff --git a/3party/boost/boost/spirit/home/support/auxiliary/attr_cast.hpp b/3party/boost/boost/spirit/home/support/auxiliary/attr_cast.hpp index 3f465b2d51..89b52cd237 100644 --- a/3party/boost/boost/spirit/home/support/auxiliary/attr_cast.hpp +++ b/3party/boost/boost/spirit/home/support/auxiliary/attr_cast.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_class.hpp b/3party/boost/boost/spirit/home/support/char_class.hpp index 594769d09a..ff7033a2fa 100644 --- a/3party/boost/boost/spirit/home/support/char_class.hpp +++ b/3party/boost/boost/spirit/home/support/char_class.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_encoding/ascii.hpp b/3party/boost/boost/spirit/home/support/char_encoding/ascii.hpp index 9b8627c3e7..9b8a72fc38 100644 --- a/3party/boost/boost/spirit/home/support/char_encoding/ascii.hpp +++ b/3party/boost/boost/spirit/home/support/char_encoding/ascii.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_encoding/iso8859_1.hpp b/3party/boost/boost/spirit/home/support/char_encoding/iso8859_1.hpp index ae4a23302b..37d2e6f98f 100644 --- a/3party/boost/boost/spirit/home/support/char_encoding/iso8859_1.hpp +++ b/3party/boost/boost/spirit/home/support/char_encoding/iso8859_1.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_encoding/standard.hpp b/3party/boost/boost/spirit/home/support/char_encoding/standard.hpp index 38c925190d..c32a9e73d8 100644 --- a/3party/boost/boost/spirit/home/support/char_encoding/standard.hpp +++ b/3party/boost/boost/spirit/home/support/char_encoding/standard.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_encoding/standard_wide.hpp b/3party/boost/boost/spirit/home/support/char_encoding/standard_wide.hpp index 19fde68c3a..99c918ce56 100644 --- a/3party/boost/boost/spirit/home/support/char_encoding/standard_wide.hpp +++ b/3party/boost/boost/spirit/home/support/char_encoding/standard_wide.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_encoding/unicode.hpp b/3party/boost/boost/spirit/home/support/char_encoding/unicode.hpp index 7b79698d71..9febf7e2a4 100644 --- a/3party/boost/boost/spirit/home/support/char_encoding/unicode.hpp +++ b/3party/boost/boost/spirit/home/support/char_encoding/unicode.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_encoding/unicode/category_table.hpp b/3party/boost/boost/spirit/home/support/char_encoding/unicode/category_table.hpp index edb14dcd76..1b262a1454 100644 --- a/3party/boost/boost/spirit/home/support/char_encoding/unicode/category_table.hpp +++ b/3party/boost/boost/spirit/home/support/char_encoding/unicode/category_table.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_encoding/unicode/create_tables.cpp b/3party/boost/boost/spirit/home/support/char_encoding/unicode/create_tables.cpp index 96e6a51d39..aa36fb4d93 100644 --- a/3party/boost/boost/spirit/home/support/char_encoding/unicode/create_tables.cpp +++ b/3party/boost/boost/spirit/home/support/char_encoding/unicode/create_tables.cpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -446,7 +446,7 @@ void print_head(Out& out) { out << "/*=============================================================================\n" - << " Copyright (c) 2001-2010 Joel de Guzman\n" + << " Copyright (c) 2001-2011 Joel de Guzman\n" << "\n" << " Distributed under the Boost Software License, Version 1.0. (See accompanying\n" << " file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\n" diff --git a/3party/boost/boost/spirit/home/support/char_encoding/unicode/lowercase_table.hpp b/3party/boost/boost/spirit/home/support/char_encoding/unicode/lowercase_table.hpp index 0bc1319473..8ccf635ec9 100644 --- a/3party/boost/boost/spirit/home/support/char_encoding/unicode/lowercase_table.hpp +++ b/3party/boost/boost/spirit/home/support/char_encoding/unicode/lowercase_table.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_encoding/unicode/query.hpp b/3party/boost/boost/spirit/home/support/char_encoding/unicode/query.hpp index 8434a51d0e..3a0526cd75 100644 --- a/3party/boost/boost/spirit/home/support/char_encoding/unicode/query.hpp +++ b/3party/boost/boost/spirit/home/support/char_encoding/unicode/query.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_encoding/unicode/script_table.hpp b/3party/boost/boost/spirit/home/support/char_encoding/unicode/script_table.hpp index e04bdfb250..a4c117c3ee 100644 --- a/3party/boost/boost/spirit/home/support/char_encoding/unicode/script_table.hpp +++ b/3party/boost/boost/spirit/home/support/char_encoding/unicode/script_table.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_encoding/unicode/uppercase_table.hpp b/3party/boost/boost/spirit/home/support/char_encoding/unicode/uppercase_table.hpp index f1db9c685a..5ecae7c5c7 100644 --- a/3party/boost/boost/spirit/home/support/char_encoding/unicode/uppercase_table.hpp +++ b/3party/boost/boost/spirit/home/support/char_encoding/unicode/uppercase_table.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_set/basic_chset.hpp b/3party/boost/boost/spirit/home/support/char_set/basic_chset.hpp index b16240f23b..f716ad03db 100644 --- a/3party/boost/boost/spirit/home/support/char_set/basic_chset.hpp +++ b/3party/boost/boost/spirit/home/support/char_set/basic_chset.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2001-2009 Daniel Nuffer http://spirit.sourceforge.net/ diff --git a/3party/boost/boost/spirit/home/support/char_set/range.hpp b/3party/boost/boost/spirit/home/support/char_set/range.hpp index 4f48b2d030..6d1f661996 100644 --- a/3party/boost/boost/spirit/home/support/char_set/range.hpp +++ b/3party/boost/boost/spirit/home/support/char_set/range.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_set/range_functions.hpp b/3party/boost/boost/spirit/home/support/char_set/range_functions.hpp index a2d274d36b..9afde6f482 100644 --- a/3party/boost/boost/spirit/home/support/char_set/range_functions.hpp +++ b/3party/boost/boost/spirit/home/support/char_set/range_functions.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_set/range_run.hpp b/3party/boost/boost/spirit/home/support/char_set/range_run.hpp index 2cdcd17ab9..8c1bb590a4 100644 --- a/3party/boost/boost/spirit/home/support/char_set/range_run.hpp +++ b/3party/boost/boost/spirit/home/support/char_set/range_run.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/char_set/range_run_impl.hpp b/3party/boost/boost/spirit/home/support/char_set/range_run_impl.hpp index da6a86ee4f..fe91ad8f0d 100644 --- a/3party/boost/boost/spirit/home/support/char_set/range_run_impl.hpp +++ b/3party/boost/boost/spirit/home/support/char_set/range_run_impl.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/common_terminals.hpp b/3party/boost/boost/spirit/home/support/common_terminals.hpp index 165e069f5e..1b4f6645ec 100644 --- a/3party/boost/boost/spirit/home/support/common_terminals.hpp +++ b/3party/boost/boost/spirit/home/support/common_terminals.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -60,8 +60,7 @@ namespace boost { namespace spirit template struct encoding : proto::terminal >::type - { - }; + {}; // Our basic terminals BOOST_SPIRIT_DEFINE_TERMINALS( @@ -71,6 +70,8 @@ namespace boost { namespace spirit ( no_skip ) ( omit ) ( raw ) + ( as_string ) + ( as_wstring ) ( inf ) ( eol ) ( eoi ) @@ -84,11 +85,9 @@ namespace boost { namespace spirit ( duplicate ) ) - // Here we are reusing proto::lit - using proto::lit; - // Our extended terminals BOOST_SPIRIT_DEFINE_TERMINALS_EX( + ( lit ) ( bin ) ( oct ) ( hex ) @@ -128,6 +127,7 @@ namespace boost { namespace spirit ( set_state ) ( in_state ) ( token ) + ( tokenid ) ( attr ) ( columns ) ( auto_ ) @@ -137,8 +137,8 @@ namespace boost { namespace spirit namespace tag { struct attr_cast {}; + struct as {}; } - }} /////////////////////////////////////////////////////////////////////////////// @@ -205,6 +205,27 @@ BOOST_SPIRIT_DEFINE_CHAR_CODES(iso8859_1) BOOST_SPIRIT_DEFINE_CHAR_CODES(standard) BOOST_SPIRIT_DEFINE_CHAR_CODES(standard_wide) +namespace boost { namespace spirit { namespace traits +{ + template + struct char_encoding_from_char; + + template <> + struct char_encoding_from_char + : mpl::identity + {}; + + template <> + struct char_encoding_from_char + : mpl::identity + {}; + + template + struct char_encoding_from_char + : char_encoding_from_char + {}; +}}} + #if defined(BOOST_SPIRIT_UNICODE) BOOST_SPIRIT_DEFINE_CHAR_CODES(unicode) diff --git a/3party/boost/boost/spirit/home/support/container.hpp b/3party/boost/boost/spirit/home/support/container.hpp index 543bcfdf24..f18372147c 100644 --- a/3party/boost/boost/spirit/home/support/container.hpp +++ b/3party/boost/boost/spirit/home/support/container.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -70,6 +70,16 @@ namespace boost { namespace spirit { namespace traits {}; #undef BOOST_SPIRIT_IS_CONTAINER + + template + struct is_iterator_range + : mpl::false_ + {}; + + template + struct is_iterator_range > + : mpl::true_ + {}; /////////////////////////////////////////////////////////////////////////// namespace detail @@ -285,7 +295,7 @@ namespace boost { namespace spirit { namespace traits bool push_back_impl(T_&, mpl::false_) const { // this variant doesn't hold a container - BOOST_ASSERT(false); + BOOST_ASSERT(false && "This variant doesn't hold a container"); return false; } @@ -349,12 +359,32 @@ namespace boost { namespace spirit { namespace traits return is_empty_container::call(c); } - template - bool is_empty(unused_type) + inline bool is_empty(unused_type) { return true; } + /////////////////////////////////////////////////////////////////////////// + // Ensure the attribute is actually a container type + template + struct make_container_attribute + { + static void call(Container& c) + { + // for static types this function does nothing + } + }; + + template + void make_container(T& t) + { + make_container_attribute::call(t); + } + + inline void make_container(unused_type) + { + } + /////////////////////////////////////////////////////////////////////////// template struct begin_container diff --git a/3party/boost/boost/spirit/home/support/context.hpp b/3party/boost/boost/spirit/home/support/context.hpp index bd62cf57c6..7c0ef3897e 100644 --- a/3party/boost/boost/spirit/home/support/context.hpp +++ b/3party/boost/boost/spirit/home/support/context.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/detail/as_variant.hpp b/3party/boost/boost/spirit/home/support/detail/as_variant.hpp index af42b1afab..e2fe18d68e 100644 --- a/3party/boost/boost/spirit/home/support/detail/as_variant.hpp +++ b/3party/boost/boost/spirit/home/support/detail/as_variant.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/detail/endian.hpp b/3party/boost/boost/spirit/home/support/detail/endian.hpp index cbff962421..9dafa2c66a 100644 --- a/3party/boost/boost/spirit/home/support/detail/endian.hpp +++ b/3party/boost/boost/spirit/home/support/detail/endian.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // http://spirit.sourceforge.net/ // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -18,7 +18,7 @@ // If Boost has the endian library, use it, otherwise use an adapted version // included with Spirit -#if BOOST_VERSION >= 104600 +#if BOOST_VERSION >= 104700 #include #else #include diff --git a/3party/boost/boost/spirit/home/support/detail/get_encoding.hpp b/3party/boost/boost/spirit/home/support/detail/get_encoding.hpp index 3a98962608..ac514a918d 100644 --- a/3party/boost/boost/spirit/home/support/detail/get_encoding.hpp +++ b/3party/boost/boost/spirit/home/support/detail/get_encoding.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/detail/hold_any.hpp b/3party/boost/boost/spirit/home/support/detail/hold_any.hpp index dac91dd9ec..ed2756d7cb 100644 --- a/3party/boost/boost/spirit/home/support/detail/hold_any.hpp +++ b/3party/boost/boost/spirit/home/support/detail/hold_any.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2007-2010 Hartmut Kaiser + Copyright (c) 2007-2011 Hartmut Kaiser Copyright (c) Christopher Diggins 2005 Copyright (c) Pablo Aguilar 2005 Copyright (c) Kevlin Henney 2001 @@ -193,7 +193,9 @@ namespace boost { namespace spirit // value of the required type to the hold_any instance you want to // stream to. This assignment has to be executed before the actual // call to the operator>>(). - BOOST_ASSERT(false); + BOOST_ASSERT(false && + "Tried to insert from a std istream into an empty " + "hold_any instance"); return i; } @@ -210,7 +212,7 @@ namespace boost { namespace spirit public: // constructors template - hold_any(T const& x) + explicit hold_any(T const& x) : table(spirit::detail::get_table::get()), object(0) { if (spirit::detail::get_table::is_small::value) diff --git a/3party/boost/boost/spirit/home/support/detail/lexer/parser/parser.hpp b/3party/boost/boost/spirit/home/support/detail/lexer/parser/parser.hpp index ca2eac62be..5c3c650f71 100644 --- a/3party/boost/boost/spirit/home/support/detail/lexer/parser/parser.hpp +++ b/3party/boost/boost/spirit/home/support/detail/lexer/parser/parser.hpp @@ -6,7 +6,7 @@ #ifndef BOOST_LEXER_PARSER_HPP #define BOOST_LEXER_PARSER_HPP -#include +#include #include "tree/end_node.hpp" #include "tree/iteration_node.hpp" #include "tree/leaf_node.hpp" @@ -101,7 +101,7 @@ Grammar: throw runtime_error ("Empty rules are not allowed."); } - assert (tree_node_stack_.size () == 1); + BOOST_ASSERT(tree_node_stack_.size () == 1); node *lhs_node_ = tree_node_stack_.top (); @@ -161,7 +161,7 @@ private: } } while (!token_stack_.empty () && action_ == '='); - assert (token_stack_.empty () || action_ == '<'); + BOOST_ASSERT(token_stack_.empty () || action_ == '<'); switch (rhs_._type) { @@ -231,7 +231,7 @@ private: static void orexp (token_stack &handle_, token_stack &token_stack_, node_ptr_vector &node_ptr_vector_, tree_node_stack &tree_node_stack_) { - assert (handle_.top ()._type == token::OREXP && + BOOST_ASSERT(handle_.top ()._type == token::OREXP && (handle_.size () == 1 || handle_.size () == 3)); if (handle_.size () == 1) @@ -241,9 +241,9 @@ private: else { handle_.pop (); - assert (handle_.top ()._type == token::OR); + BOOST_ASSERT(handle_.top ()._type == token::OR); handle_.pop (); - assert (handle_.top ()._type == token::SEQUENCE); + BOOST_ASSERT(handle_.top ()._type == token::SEQUENCE); perform_or (node_ptr_vector_, tree_node_stack_); token_stack_.push (token::OREXP); } @@ -252,7 +252,7 @@ private: static void sub (token_stack &handle_, token_stack &token_stack_, node_ptr_vector &node_ptr_vector_, tree_node_stack &tree_node_stack_) { - assert (handle_.top ()._type == token::SUB && + BOOST_ASSERT(handle_.top ()._type == token::SUB && (handle_.size () == 1 || handle_.size () == 2)); if (handle_.size () == 1) @@ -262,7 +262,7 @@ private: else { handle_.pop (); - assert (handle_.top ()._type == token::EXPRESSION); + BOOST_ASSERT(handle_.top ()._type == token::EXPRESSION); // perform join sequence (node_ptr_vector_, tree_node_stack_); token_stack_.push (token::SUB); @@ -271,7 +271,7 @@ private: static void repeat (token_stack &handle_, token_stack &token_stack_) { - assert (handle_.top ()._type == token::REPEAT && + BOOST_ASSERT(handle_.top ()._type == token::REPEAT && handle_.size () >= 1 && handle_.size () <= 3); if (handle_.size () == 1) @@ -281,7 +281,7 @@ private: else { handle_.pop (); - assert (handle_.top ()._type == token::DUP); + BOOST_ASSERT(handle_.top ()._type == token::DUP); token_stack_.push (token::REPEAT); } } @@ -289,7 +289,7 @@ private: static void charset (token_stack &handle_, token_stack &token_stack_, node_ptr_vector &node_ptr_vector_, tree_node_stack &tree_node_stack_) { - assert (handle_.top ()._type == token::CHARSET && + BOOST_ASSERT(handle_.top ()._type == token::CHARSET && handle_.size () == 1); // store charset node_ptr_vector_->push_back (static_cast(0)); @@ -307,7 +307,7 @@ private: { token &top_ = handle_.top (); - assert (top_._type == token::MACRO && handle_.size () == 1); + BOOST_ASSERT(top_._type == token::MACRO && handle_.size () == 1); typename macro_map::const_iterator iter_ = macromap_.find (top_._macro); @@ -335,12 +335,12 @@ private: static void openparen (token_stack &handle_, token_stack &token_stack_) { - assert (handle_.top ()._type == token::OPENPAREN && + BOOST_ASSERT(handle_.top ()._type == token::OPENPAREN && handle_.size () == 3); handle_.pop (); - assert (handle_.top ()._type == token::REGEX); + BOOST_ASSERT(handle_.top ()._type == token::REGEX); handle_.pop (); - assert (handle_.top ()._type == token::CLOSEPAREN); + BOOST_ASSERT(handle_.top ()._type == token::CLOSEPAREN); token_stack_.push (token::REPEAT); } diff --git a/3party/boost/boost/spirit/home/support/detail/lexer/parser/tree/node.hpp b/3party/boost/boost/spirit/home/support/detail/lexer/parser/tree/node.hpp index 03e7e5e0bc..1e36ccb6e3 100644 --- a/3party/boost/boost/spirit/home/support/detail/lexer/parser/tree/node.hpp +++ b/3party/boost/boost/spirit/home/support/detail/lexer/parser/tree/node.hpp @@ -6,7 +6,7 @@ #ifndef BOOST_LEXER_NODE_HPP #define BOOST_LEXER_NODE_HPP -#include +#include #include "../../containers/ptr_vector.hpp" #include "../../runtime_error.hpp" #include "../../size_t.hpp" @@ -96,7 +96,7 @@ public: } } - assert (new_node_stack_.size () == 1); + BOOST_ASSERT(new_node_stack_.size () == 1); new_root_ = new_node_stack_.top (); new_node_stack_.pop (); return new_root_; diff --git a/3party/boost/boost/spirit/home/support/detail/lexer/rules.hpp b/3party/boost/boost/spirit/home/support/detail/lexer/rules.hpp index 7a3d246dbc..730af74e7c 100644 --- a/3party/boost/boost/spirit/home/support/detail/lexer/rules.hpp +++ b/3party/boost/boost/spirit/home/support/detail/lexer/rules.hpp @@ -39,6 +39,11 @@ namespace detail { return "."; } + + static const char *all_states () + { + return "*"; + } }; template <> @@ -53,6 +58,11 @@ namespace detail { return L"."; } + + static const wchar_t *all_states () + { + return L"*"; + } }; } @@ -526,6 +536,16 @@ public: return detail::strings::initial (); } + static const CharT *all_states () + { + return detail::strings::all_states (); + } + + static const CharT *dot () + { + return detail::strings::dot (); + } + private: string_size_t_map _statemap; string_pair_deque _macrodeque; diff --git a/3party/boost/boost/spirit/home/support/detail/make_cons.hpp b/3party/boost/boost/spirit/home/support/detail/make_cons.hpp index f4cc8e8ee6..5f3420fc0b 100644 --- a/3party/boost/boost/spirit/home/support/detail/make_cons.hpp +++ b/3party/boost/boost/spirit/home/support/detail/make_cons.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/support/detail/math/detail/fp_traits.hpp b/3party/boost/boost/spirit/home/support/detail/math/detail/fp_traits.hpp index 04e45ad8e0..199712a3b9 100644 --- a/3party/boost/boost/spirit/home/support/detail/math/detail/fp_traits.hpp +++ b/3party/boost/boost/spirit/home/support/detail/math/detail/fp_traits.hpp @@ -193,7 +193,8 @@ template void fp_traits_impl::do_init_() // If we do get here, then we have failed to detect the Motorola // processor at compile time. - BOOST_ASSERT(false); + BOOST_ASSERT(false && + "Failed to detect the Motorola processor at compile time"); return; case 0x3ffe8000: // IEEE extended double precision format diff --git a/3party/boost/boost/spirit/home/support/detail/pow10.hpp b/3party/boost/boost/spirit/home/support/detail/pow10.hpp index 29027f8c07..d61ae367be 100644 --- a/3party/boost/boost/spirit/home/support/detail/pow10.hpp +++ b/3party/boost/boost/spirit/home/support/detail/pow10.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/support/detail/scoped_enum_emulation.hpp b/3party/boost/boost/spirit/home/support/detail/scoped_enum_emulation.hpp index 02a6d2f3df..70979a6d2d 100644 --- a/3party/boost/boost/spirit/home/support/detail/scoped_enum_emulation.hpp +++ b/3party/boost/boost/spirit/home/support/detail/scoped_enum_emulation.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // http://spirit.sourceforge.net/ // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/support/detail/sign.hpp b/3party/boost/boost/spirit/home/support/detail/sign.hpp index 02529f2adb..7c1bfb06c7 100644 --- a/3party/boost/boost/spirit/home/support/detail/sign.hpp +++ b/3party/boost/boost/spirit/home/support/detail/sign.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/support/detail/what_function.hpp b/3party/boost/boost/spirit/home/support/detail/what_function.hpp index ecd5646d76..b02f240931 100644 --- a/3party/boost/boost/spirit/home/support/detail/what_function.hpp +++ b/3party/boost/boost/spirit/home/support/detail/what_function.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/handles_container.hpp b/3party/boost/boost/spirit/home/support/handles_container.hpp new file mode 100644 index 0000000000..876c9a9217 --- /dev/null +++ b/3party/boost/boost/spirit/home/support/handles_container.hpp @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_SPIRIT_HANDLES_CONTAINER_DEC_18_2010_0920AM) +#define BOOST_SPIRIT_HANDLES_CONTAINER_DEC_18_2010_0920AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace spirit { namespace traits +{ + // Finds out whether a component handles container attributes intrinsically + // (or whether container attributes need to be split up separately). + template + struct handles_container : mpl::false_ {}; + + template + struct unary_handles_container + : handles_container {}; + + template + struct binary_handles_container + : mpl::or_< + handles_container + , handles_container > + {}; + + template + struct nary_handles_container + : mpl::not_< + is_same< + typename mpl::find_if< + Elements, handles_container + >::type + , typename mpl::end::type> > + {}; +}}} + +#endif diff --git a/3party/boost/boost/spirit/home/support/has_semantic_action.hpp b/3party/boost/boost/spirit/home/support/has_semantic_action.hpp index 6f0556306d..b4cb4e7c54 100644 --- a/3party/boost/boost/spirit/home/support/has_semantic_action.hpp +++ b/3party/boost/boost/spirit/home/support/has_semantic_action.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -42,7 +42,6 @@ namespace boost { namespace spirit { namespace traits , typename mpl::end::type > > {}; - }}} #endif diff --git a/3party/boost/boost/spirit/home/support/info.hpp b/3party/boost/boost/spirit/home/support/info.hpp index 4afef8e2ff..07018886b5 100644 --- a/3party/boost/boost/spirit/home/support/info.hpp +++ b/3party/boost/boost/spirit/home/support/info.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/buf_id_check_policy.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/buf_id_check_policy.hpp index ffbaefaa0a..9df2d9c151 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/buf_id_check_policy.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/buf_id_check_policy.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001, Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/buffering_input_iterator_policy.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/buffering_input_iterator_policy.hpp index 728f463ef0..e70af081bc 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/buffering_input_iterator_policy.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/buffering_input_iterator_policy.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001 Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/combine_policies.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/combine_policies.hpp index 35b59840d5..28e33dfea5 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/combine_policies.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/combine_policies.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/first_owner_policy.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/first_owner_policy.hpp index 7be6862673..73d6ee1a8e 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/first_owner_policy.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/first_owner_policy.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001, Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/fixed_size_queue.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/fixed_size_queue.hpp index 5b7a3d8474..1ba6fc02b6 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/fixed_size_queue.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/fixed_size_queue.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001 Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp index 6582f2cd62..283c7479d9 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/fixed_size_queue_policy.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001 Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/functor_input_policy.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/functor_input_policy.hpp index 7c1dcb0769..0b37511d9a 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/functor_input_policy.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/functor_input_policy.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp index 80ea9a8469..f2e81e85ac 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/input_iterator_policy.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001 Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/istream_policy.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/istream_policy.hpp index c7ef3876a3..1726525977 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/istream_policy.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/istream_policy.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001 Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp index 52f9c2aece..9fece3730d 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/lex_input_policy.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001 Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/multi_pass.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/multi_pass.hpp index a638efb3ec..088b39ae42 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/multi_pass.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/multi_pass.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001 Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/no_check_policy.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/no_check_policy.hpp index f4c8ae7239..8f4a26d9c3 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/no_check_policy.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/no_check_policy.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001 Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp index 93ba28beeb..723bbee458 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001 Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp index 0ca484fffd..711ae90394 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp b/3party/boost/boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp index 91488a2ca7..402956b87d 100644 --- a/3party/boost/boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001 Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/istream_iterator.hpp b/3party/boost/boost/spirit/home/support/iterators/istream_iterator.hpp index bef527fee5..b232be50b7 100644 --- a/3party/boost/boost/spirit/home/support/iterators/istream_iterator.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/istream_iterator.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/iterators/line_pos_iterator.hpp b/3party/boost/boost/spirit/home/support/iterators/line_pos_iterator.hpp new file mode 100644 index 0000000000..68a98dd0ce --- /dev/null +++ b/3party/boost/boost/spirit/home/support/iterators/line_pos_iterator.hpp @@ -0,0 +1,185 @@ +/*============================================================================== + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2010 Bryce Lelbach + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#if !defined(BOOST_SPIRIT_SUPPORT_LINE_POS_ITERATOR) +#define BOOST_SPIRIT_SUPPORT_LINE_POS_ITERATOR + +#include +#include + +namespace boost { namespace spirit +{ + + //////////////////////////////////////////////////////////////////////////// + // line_pos_iterator: a lightweight line position iterator. This iterator + // adapter only stores the current line number, nothing else. Unlike spirit + // classic's position_iterator, it does not store the column number and does + // not need an end iterator. The current column can be computed, if needed. + // Some line oriented utilities are provided including computation of the + // current column. + //////////////////////////////////////////////////////////////////////////// + + //[line_pos_iterator + template + class line_pos_iterator : public boost::iterator_adaptor< + line_pos_iterator // Derived + , Iterator // Base + , boost::use_default // Value + , boost::forward_traversal_tag // CategoryOrTraversal + > { + public: + line_pos_iterator(); + + explicit line_pos_iterator(Iterator); + + std::size_t position() const; + + private: + friend class boost::iterator_core_access; + + void increment(); + + std::size_t line; /*< The line position. >*/ + typename std::iterator_traits::value_type prev; + }; + //] + + template + line_pos_iterator::line_pos_iterator() : + line_pos_iterator::iterator_adaptor_(), line(1), prev(0) { } + + template + line_pos_iterator::line_pos_iterator(Iterator base) : + line_pos_iterator::iterator_adaptor_(base), line(1), prev(0) { } + + template + std::size_t line_pos_iterator::position() const + { + return line; + } + + template + void line_pos_iterator::increment() + { + typename std::iterator_traits::reference + ref = *(this->base()); + + switch (ref) { + case '\r': + if (prev != '\n') + ++line; + break; + case '\n': + if (prev != '\r') + ++line; + break; + default: + break; + } + + prev = ref; + ++this->base_reference(); + } + + //[line_pos_iterator_utilities + template + inline std::size_t get_line(Iterator); /*< Get the line position. Returns -1 + if Iterator is not a + line_pos_iterator. >*/ + + template + inline Iterator get_line_start(Iterator lower_bound, + Iterator current); /*< Get an iterator to + the beginning of the + line. Applicable to any + iterator. >*/ + + template + inline iterator_range + get_current_line(Iterator lower_bound, + Iterator current, + Iterator upper_bound); /*< Get the iterator range + containing the current line. + Applicable to any iterator. >*/ + + template + inline std::size_t get_column(Iterator lower_bound, + Iterator current, + std::size_t tabs = 4); /*< Get the current + column. Applicable to + any iterator. >*/ + //] + + template + inline std::size_t get_line(Iterator) + { + return -1; + } + + template + inline std::size_t get_line(line_pos_iterator i) + { + return i.position(); + } + + template + inline Iterator get_line_start(Iterator lower_bound, Iterator current) + { + Iterator latest = lower_bound; + + for (Iterator i = lower_bound; i != current; ++i) { + switch (*i) { + case '\r': + case '\n': + latest = i; + } + } + + return latest; + } + + template + inline iterator_range + get_current_line(Iterator lower_bound, + Iterator current, + Iterator upper_bound) + { + Iterator first = get_line_start(lower_bound, current); + Iterator last = get_line_start(current, upper_bound); + + if (last == current) + last = upper_bound; + + return iterator_range(first, last); + } + + template + inline std::size_t get_column(Iterator lower_bound, + Iterator current, + std::size_t tabs) + { + std::size_t column = 1; + Iterator first = get_line_start(lower_bound, current); + + for (Iterator i = first; i != current; ++i) { + switch (*i) { + case '\t': + column += tabs - (column - 1) % tabs; + break; + default: + ++column; + } + } + + return column; + } + +}} + +#endif // BOOST_SPIRIT_SUPPORT_LINE_POS_ITERATOR + diff --git a/3party/boost/boost/spirit/home/support/iterators/look_ahead.hpp b/3party/boost/boost/spirit/home/support/iterators/look_ahead.hpp index 98d09e1e42..039dfe261f 100644 --- a/3party/boost/boost/spirit/home/support/iterators/look_ahead.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/look_ahead.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001, Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // http://spirit.sourceforge.net/ // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/support/iterators/multi_pass.hpp b/3party/boost/boost/spirit/home/support/iterators/multi_pass.hpp index 81fe68fc81..a1ebb6d60d 100644 --- a/3party/boost/boost/spirit/home/support/iterators/multi_pass.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/multi_pass.hpp @@ -1,5 +1,5 @@ // Copyright (c) 2001, Daniel C. Nuffer -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // http://spirit.sourceforge.net/ // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/support/iterators/multi_pass_fwd.hpp b/3party/boost/boost/spirit/home/support/iterators/multi_pass_fwd.hpp index 6ee0679159..4724d11cd7 100644 --- a/3party/boost/boost/spirit/home/support/iterators/multi_pass_fwd.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/multi_pass_fwd.hpp @@ -1,6 +1,6 @@ /*============================================================================= Copyright (c) 2007 Tobias Schwinger - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/support/iterators/ostream_iterator.hpp b/3party/boost/boost/spirit/home/support/iterators/ostream_iterator.hpp index 2242fcf4ba..b51e8caa6a 100644 --- a/3party/boost/boost/spirit/home/support/iterators/ostream_iterator.hpp +++ b/3party/boost/boost/spirit/home/support/iterators/ostream_iterator.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/lazy.hpp b/3party/boost/boost/spirit/home/support/lazy.hpp index 4e1d000b20..c4ce883b67 100644 --- a/3party/boost/boost/spirit/home/support/lazy.hpp +++ b/3party/boost/boost/spirit/home/support/lazy.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/make_component.hpp b/3party/boost/boost/spirit/home/support/make_component.hpp index 4a6ec56832..8ece2cf138 100644 --- a/3party/boost/boost/spirit/home/support/make_component.hpp +++ b/3party/boost/boost/spirit/home/support/make_component.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/support/meta_compiler.hpp b/3party/boost/boost/spirit/home/support/meta_compiler.hpp index 9e54fb43e2..042ebf8030 100644 --- a/3party/boost/boost/spirit/home/support/meta_compiler.hpp +++ b/3party/boost/boost/spirit/home/support/meta_compiler.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/support/modify.hpp b/3party/boost/boost/spirit/home/support/modify.hpp index 6f727fc621..e68d726af7 100644 --- a/3party/boost/boost/spirit/home/support/modify.hpp +++ b/3party/boost/boost/spirit/home/support/modify.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/support/multi_pass_wrapper.hpp b/3party/boost/boost/spirit/home/support/multi_pass_wrapper.hpp index 323e338637..ec5fa36f45 100644 --- a/3party/boost/boost/spirit/home/support/multi_pass_wrapper.hpp +++ b/3party/boost/boost/spirit/home/support/multi_pass_wrapper.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/nonterminal/expand_arg.hpp b/3party/boost/boost/spirit/home/support/nonterminal/expand_arg.hpp index 49ac93895a..f037acce24 100644 --- a/3party/boost/boost/spirit/home/support/nonterminal/expand_arg.hpp +++ b/3party/boost/boost/spirit/home/support/nonterminal/expand_arg.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/nonterminal/extract_param.hpp b/3party/boost/boost/spirit/home/support/nonterminal/extract_param.hpp index 33e22b0689..61499327a0 100644 --- a/3party/boost/boost/spirit/home/support/nonterminal/extract_param.hpp +++ b/3party/boost/boost/spirit/home/support/nonterminal/extract_param.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Copyright (c) 2009 Francois Barel Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/home/support/nonterminal/locals.hpp b/3party/boost/boost/spirit/home/support/nonterminal/locals.hpp index 5f2e8526ff..4db0349053 100644 --- a/3party/boost/boost/spirit/home/support/nonterminal/locals.hpp +++ b/3party/boost/boost/spirit/home/support/nonterminal/locals.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/numeric_traits.hpp b/3party/boost/boost/spirit/home/support/numeric_traits.hpp new file mode 100644 index 0000000000..5bd2c07779 --- /dev/null +++ b/3party/boost/boost/spirit/home/support/numeric_traits.hpp @@ -0,0 +1,97 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#if !defined(BOOST_SPIRIT_NUMERIC_TRAITS_JAN_07_2011_0722AM) +#define BOOST_SPIRIT_NUMERIC_TRAITS_JAN_07_2011_0722AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include +#include + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + // Determine if T is a boolean type + /////////////////////////////////////////////////////////////////////////// + template + struct is_bool : mpl::false_ {}; + + template + struct is_bool : is_bool {}; + + template <> + struct is_bool : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + // Determine if T is a signed integer type + /////////////////////////////////////////////////////////////////////////// + template + struct is_int : mpl::false_ {}; + + template + struct is_int : is_int {}; + + template <> + struct is_int : mpl::true_ {}; + + template <> + struct is_int : mpl::true_ {}; + + template <> + struct is_int : mpl::true_ {}; + +#ifdef BOOST_HAS_LONG_LONG + template <> + struct is_int : mpl::true_ {}; +#endif + + /////////////////////////////////////////////////////////////////////////// + // Determine if T is an unsigned integer type + /////////////////////////////////////////////////////////////////////////// + template + struct is_uint : mpl::false_ {}; + + template + struct is_uint : is_uint {}; + +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) + template <> + struct is_uint : mpl::true_ {}; +#endif + + template <> + struct is_uint : mpl::true_ {}; + + template <> + struct is_uint : mpl::true_ {}; + +#ifdef BOOST_HAS_LONG_LONG + template <> + struct is_uint : mpl::true_ {}; +#endif + + /////////////////////////////////////////////////////////////////////////// + // Determine if T is a floating point type + /////////////////////////////////////////////////////////////////////////// + template + struct is_real : mpl::false_ {}; + + template + struct is_real : is_uint {}; + + template <> + struct is_real : mpl::true_ {}; + + template <> + struct is_real : mpl::true_ {}; + + template <> + struct is_real : mpl::true_ {}; +}}} + +#endif diff --git a/3party/boost/boost/spirit/home/support/sequence_base_id.hpp b/3party/boost/boost/spirit/home/support/sequence_base_id.hpp index bd6f7a2139..df9c177698 100644 --- a/3party/boost/boost/spirit/home/support/sequence_base_id.hpp +++ b/3party/boost/boost/spirit/home/support/sequence_base_id.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/home/support/string_traits.hpp b/3party/boost/boost/spirit/home/support/string_traits.hpp index ab56e7c74a..eaaeafcaa9 100644 --- a/3party/boost/boost/spirit/home/support/string_traits.hpp +++ b/3party/boost/boost/spirit/home/support/string_traits.hpp @@ -1,5 +1,7 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2010 Bryce Lelbach Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -15,13 +17,30 @@ #include #include #include +#include #include +#include #if defined(__GNUC__) && (__GNUC__ < 4) #include #endif namespace boost { namespace spirit { namespace traits { + /////////////////////////////////////////////////////////////////////////// + // Determine if T is a character type + /////////////////////////////////////////////////////////////////////////// + template + struct is_char : mpl::false_ {}; + + template + struct is_char : is_char {}; + + template <> + struct is_char : mpl::true_ {}; + + template <> + struct is_char : mpl::true_ {}; + /////////////////////////////////////////////////////////////////////////// // Determine if T is a string /////////////////////////////////////////////////////////////////////////// @@ -79,6 +98,12 @@ namespace boost { namespace spirit { namespace traits template struct char_type_of : char_type_of {}; + template <> + struct char_type_of : mpl::identity {}; + + template <> + struct char_type_of : mpl::identity {}; + template <> struct char_type_of : mpl::identity {}; @@ -122,19 +147,102 @@ namespace boost { namespace spirit { namespace traits /////////////////////////////////////////////////////////////////////////// // Get the C string from a string /////////////////////////////////////////////////////////////////////////// - template - inline T* get_c_string(T* str) { return str; } + template + struct extract_c_string; + template + struct extract_c_string + { + typedef typename char_type_of::type char_type; + + template + static T const* call (T* str) + { + return (T const*)str; + } + + template + static T const* call (T const* str) + { + return str; + } + }; + + // Forwarder that strips const template - inline T const* get_c_string(T const* str) { return str; } + struct extract_c_string + { + static typename extract_c_string::char_type const* call (T const str) + { + return extract_c_string::call(str); + } + }; + + // Forwarder that strips references + template + struct extract_c_string + { + static typename extract_c_string::char_type const* call (T& str) + { + return extract_c_string::call(str); + } + }; + + // Forwarder that strips const references + template + struct extract_c_string + { + static typename extract_c_string::char_type const* call (T const& str) + { + return extract_c_string::call(str); + } + }; template - inline T const* get_c_string(std::basic_string& str) - { return str.c_str(); } + struct extract_c_string > + { + typedef T char_type; - template - inline T const* get_c_string(std::basic_string const& str) - { return str.c_str(); } + typedef std::basic_string string; + + static T const* call (string& str) + { + return str.c_str(); + } + + static T const* call (string const& str) + { + return str.c_str(); + } + }; + + template + typename extract_c_string::char_type const* + get_c_string (T* str) + { + return extract_c_string::call(str); + } + + template + typename extract_c_string::char_type const* + get_c_string (T const* str) + { + return extract_c_string::call(str); + } + + template + typename extract_c_string::char_type const* + get_c_string (String& str) + { + return extract_c_string::call(str); + } + + template + typename extract_c_string::char_type const* + get_c_string (String const& str) + { + return extract_c_string::call(str); + } /////////////////////////////////////////////////////////////////////////// // Get the begin/end iterators from a string @@ -187,7 +295,7 @@ namespace boost { namespace spirit { namespace traits { return str.begin(); } template - inline typename Str::iterator + inline typename Str::iterator get_begin(Str& str BOOST_PROTO_DISABLE_IF_IS_CONST(Str)) { return str.begin(); } @@ -196,7 +304,7 @@ namespace boost { namespace spirit { namespace traits { return str.end(); } template - inline typename Str::iterator + inline typename Str::iterator get_end(Str& str BOOST_PROTO_DISABLE_IF_IS_CONST(Str)) { return str.end(); } @@ -213,6 +321,37 @@ namespace boost { namespace spirit { namespace traits inline typename disable_if , T const*>::type get_end(Str const& str) { return get_end(get_begin(str)); } -}}} +} + +namespace result_of +{ + template + struct get_begin + { + typedef typename traits::char_type_of::type char_type; + + typedef typename mpl::if_< + is_const + , char_type const + , char_type + >::type* type; + }; + + template + struct get_begin >::type> + { + typedef typename mpl::if_< + is_const + , typename Str::const_iterator + , typename Str::iterator + >::type type; + }; + + template + struct get_end : get_begin {}; +} + +}} #endif diff --git a/3party/boost/boost/spirit/home/support/terminal.hpp b/3party/boost/boost/spirit/home/support/terminal.hpp index b42fa62f1e..09267720e9 100644 --- a/3party/boost/boost/spirit/home/support/terminal.hpp +++ b/3party/boost/boost/spirit/home/support/terminal.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -12,12 +12,12 @@ #endif #include -#include #include #include #include #include #include +#include namespace boost { namespace spirit { diff --git a/3party/boost/boost/spirit/home/support/unused.hpp b/3party/boost/boost/spirit/home/support/unused.hpp index 37838ce17a..4197d6af57 100644 --- a/3party/boost/boost/spirit/home/support/unused.hpp +++ b/3party/boost/boost/spirit/home/support/unused.hpp @@ -1,5 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -11,14 +12,63 @@ #pragma once #endif -#include +#include #include +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4522) // multiple assignment operators specified warning +#endif + /////////////////////////////////////////////////////////////////////////////// -// implement streaming operators for unused_type for older versions of Fusion -#if !defined(BOOST_FUSION_UNUSED_HAS_IO) -namespace boost { namespace fusion +namespace boost { namespace spirit { + /////////////////////////////////////////////////////////////////////////// + // We do not import fusion ::unused_type anymore to avoid boost::fusion + // being turned into an associate namespace for boost::spirit, as this + // interferes with ADL in unexpected ways. We rather copy the full + // unused_type implementation from boost::fusion. + /////////////////////////////////////////////////////////////////////////// + struct unused_type + { + unused_type() + { + } + + template + unused_type(T const&) + { + } + + template + unused_type const& + operator=(T const&) const + { + return *this; + } + + template + unused_type& + operator=(T const&) + { + return *this; + } + + unused_type const& + operator=(unused_type const&) const + { + return *this; + } + + unused_type& + operator=(unused_type const&) + { + return *this; + } + }; + + unused_type const unused = unused_type(); + namespace detail { struct unused_only @@ -38,18 +88,6 @@ namespace boost { namespace fusion { return in; } -}} -#endif - -/////////////////////////////////////////////////////////////////////////////// -namespace boost { namespace spirit -{ - /////////////////////////////////////////////////////////////////////////// - // since boost::fusion now supports exactly what we need, unused is simply - // imported from the fusion namespace - /////////////////////////////////////////////////////////////////////////// - using boost::fusion::unused_type; - using boost::fusion::unused; /////////////////////////////////////////////////////////////////////////// namespace traits @@ -60,4 +98,8 @@ namespace boost { namespace spirit } }} +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + #endif diff --git a/3party/boost/boost/spirit/home/support/utf8.hpp b/3party/boost/boost/spirit/home/support/utf8.hpp index 8f48e3611a..c4883428b1 100644 --- a/3party/boost/boost/spirit/home/support/utf8.hpp +++ b/3party/boost/boost/spirit/home/support/utf8.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/include/karma.hpp b/3party/boost/boost/spirit/include/karma.hpp index fde5626baf..281250b869 100644 --- a/3party/boost/boost/spirit/include/karma.hpp +++ b/3party/boost/boost/spirit/include/karma.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_action.hpp b/3party/boost/boost/spirit/include/karma_action.hpp index f8826eb76c..690017c673 100644 --- a/3party/boost/boost/spirit/include/karma_action.hpp +++ b/3party/boost/boost/spirit/include/karma_action.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_alternative.hpp b/3party/boost/boost/spirit/include/karma_alternative.hpp index 32cd15112d..c8708a00aa 100644 --- a/3party/boost/boost/spirit/include/karma_alternative.hpp +++ b/3party/boost/boost/spirit/include/karma_alternative.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_and_predicate.hpp b/3party/boost/boost/spirit/include/karma_and_predicate.hpp index 0a3a94a6c7..ee81faac38 100644 --- a/3party/boost/boost/spirit/include/karma_and_predicate.hpp +++ b/3party/boost/boost/spirit/include/karma_and_predicate.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_as.hpp b/3party/boost/boost/spirit/include/karma_as.hpp new file mode 100644 index 0000000000..48b7372f5f --- /dev/null +++ b/3party/boost/boost/spirit/include/karma_as.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2010 Bryce Lelbach + http://spirit.sourceforge.net/ + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef BOOST_SPIRIT_INCLUDE_KARMA_AS +#define BOOST_SPIRIT_INCLUDE_KARMA_AS + +#if defined(_MSC_VER) +#pragma once +#endif + +#include + +#endif diff --git a/3party/boost/boost/spirit/include/karma_attr_cast.hpp b/3party/boost/boost/spirit/include/karma_attr_cast.hpp index 7c8a2b8bb7..0699f2cab3 100644 --- a/3party/boost/boost/spirit/include/karma_attr_cast.hpp +++ b/3party/boost/boost/spirit/include/karma_attr_cast.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_auto.hpp b/3party/boost/boost/spirit/include/karma_auto.hpp index af3cf42694..c71779316d 100644 --- a/3party/boost/boost/spirit/include/karma_auto.hpp +++ b/3party/boost/boost/spirit/include/karma_auto.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_auxiliary.hpp b/3party/boost/boost/spirit/include/karma_auxiliary.hpp index b0cec826f8..94b9976875 100644 --- a/3party/boost/boost/spirit/include/karma_auxiliary.hpp +++ b/3party/boost/boost/spirit/include/karma_auxiliary.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_binary.hpp b/3party/boost/boost/spirit/include/karma_binary.hpp index 16de10dbfc..85679a8651 100644 --- a/3party/boost/boost/spirit/include/karma_binary.hpp +++ b/3party/boost/boost/spirit/include/karma_binary.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_bool.hpp b/3party/boost/boost/spirit/include/karma_bool.hpp index 3b85d71054..e76de1bd77 100644 --- a/3party/boost/boost/spirit/include/karma_bool.hpp +++ b/3party/boost/boost/spirit/include/karma_bool.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_buffer.hpp b/3party/boost/boost/spirit/include/karma_buffer.hpp index 105a43fe17..c4252a28c8 100644 --- a/3party/boost/boost/spirit/include/karma_buffer.hpp +++ b/3party/boost/boost/spirit/include/karma_buffer.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_center_alignment.hpp b/3party/boost/boost/spirit/include/karma_center_alignment.hpp index 98b6512829..77fc006596 100644 --- a/3party/boost/boost/spirit/include/karma_center_alignment.hpp +++ b/3party/boost/boost/spirit/include/karma_center_alignment.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_char.hpp b/3party/boost/boost/spirit/include/karma_char.hpp index b3c91357ae..e129f3e08f 100644 --- a/3party/boost/boost/spirit/include/karma_char.hpp +++ b/3party/boost/boost/spirit/include/karma_char.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_char_.hpp b/3party/boost/boost/spirit/include/karma_char_.hpp index 2ede1a0a5f..018a097775 100644 --- a/3party/boost/boost/spirit/include/karma_char_.hpp +++ b/3party/boost/boost/spirit/include/karma_char_.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_char_class.hpp b/3party/boost/boost/spirit/include/karma_char_class.hpp index 36fdda6006..a26ceb98d8 100644 --- a/3party/boost/boost/spirit/include/karma_char_class.hpp +++ b/3party/boost/boost/spirit/include/karma_char_class.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_columns.hpp b/3party/boost/boost/spirit/include/karma_columns.hpp index 94160eb2ff..87feb2fa6b 100644 --- a/3party/boost/boost/spirit/include/karma_columns.hpp +++ b/3party/boost/boost/spirit/include/karma_columns.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_delimit.hpp b/3party/boost/boost/spirit/include/karma_delimit.hpp index ef64837750..177925f964 100644 --- a/3party/boost/boost/spirit/include/karma_delimit.hpp +++ b/3party/boost/boost/spirit/include/karma_delimit.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_directive.hpp b/3party/boost/boost/spirit/include/karma_directive.hpp index 8443821489..bfc4b3f7f7 100644 --- a/3party/boost/boost/spirit/include/karma_directive.hpp +++ b/3party/boost/boost/spirit/include/karma_directive.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_domain.hpp b/3party/boost/boost/spirit/include/karma_domain.hpp index 23eceea273..cb33991328 100644 --- a/3party/boost/boost/spirit/include/karma_domain.hpp +++ b/3party/boost/boost/spirit/include/karma_domain.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_eol.hpp b/3party/boost/boost/spirit/include/karma_eol.hpp index 91299ae3eb..b720bc285c 100644 --- a/3party/boost/boost/spirit/include/karma_eol.hpp +++ b/3party/boost/boost/spirit/include/karma_eol.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_eps.hpp b/3party/boost/boost/spirit/include/karma_eps.hpp index 5e6c69650f..82d4cceb7f 100644 --- a/3party/boost/boost/spirit/include/karma_eps.hpp +++ b/3party/boost/boost/spirit/include/karma_eps.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_format.hpp b/3party/boost/boost/spirit/include/karma_format.hpp index 3638bdf53a..3fb071a7b9 100644 --- a/3party/boost/boost/spirit/include/karma_format.hpp +++ b/3party/boost/boost/spirit/include/karma_format.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_format_attr.hpp b/3party/boost/boost/spirit/include/karma_format_attr.hpp index a099a4b7d6..88fbd60578 100644 --- a/3party/boost/boost/spirit/include/karma_format_attr.hpp +++ b/3party/boost/boost/spirit/include/karma_format_attr.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_format_auto.hpp b/3party/boost/boost/spirit/include/karma_format_auto.hpp index 2a891d68b4..fffa730acd 100644 --- a/3party/boost/boost/spirit/include/karma_format_auto.hpp +++ b/3party/boost/boost/spirit/include/karma_format_auto.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_generate.hpp b/3party/boost/boost/spirit/include/karma_generate.hpp index 2f0eeb1dc8..4ad2f15272 100644 --- a/3party/boost/boost/spirit/include/karma_generate.hpp +++ b/3party/boost/boost/spirit/include/karma_generate.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_generate_attr.hpp b/3party/boost/boost/spirit/include/karma_generate_attr.hpp index 304153dc63..09e0e18112 100644 --- a/3party/boost/boost/spirit/include/karma_generate_attr.hpp +++ b/3party/boost/boost/spirit/include/karma_generate_attr.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_generate_auto.hpp b/3party/boost/boost/spirit/include/karma_generate_auto.hpp index 1a771d7a01..97abd8161f 100644 --- a/3party/boost/boost/spirit/include/karma_generate_auto.hpp +++ b/3party/boost/boost/spirit/include/karma_generate_auto.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_int.hpp b/3party/boost/boost/spirit/include/karma_int.hpp index f0a4b0a381..79b7bb12b8 100644 --- a/3party/boost/boost/spirit/include/karma_int.hpp +++ b/3party/boost/boost/spirit/include/karma_int.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_kleene.hpp b/3party/boost/boost/spirit/include/karma_kleene.hpp index c7ca126edb..344b84b32f 100644 --- a/3party/boost/boost/spirit/include/karma_kleene.hpp +++ b/3party/boost/boost/spirit/include/karma_kleene.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_lazy.hpp b/3party/boost/boost/spirit/include/karma_lazy.hpp index 67dbe22138..1b7f638579 100644 --- a/3party/boost/boost/spirit/include/karma_lazy.hpp +++ b/3party/boost/boost/spirit/include/karma_lazy.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_left_alignment.hpp b/3party/boost/boost/spirit/include/karma_left_alignment.hpp index df7d34857a..59c022ded4 100644 --- a/3party/boost/boost/spirit/include/karma_left_alignment.hpp +++ b/3party/boost/boost/spirit/include/karma_left_alignment.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_list.hpp b/3party/boost/boost/spirit/include/karma_list.hpp index 76ed52c6bd..c5e235bf09 100644 --- a/3party/boost/boost/spirit/include/karma_list.hpp +++ b/3party/boost/boost/spirit/include/karma_list.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_maxwidth.hpp b/3party/boost/boost/spirit/include/karma_maxwidth.hpp index 72d3eb77ee..f7a27414b0 100644 --- a/3party/boost/boost/spirit/include/karma_maxwidth.hpp +++ b/3party/boost/boost/spirit/include/karma_maxwidth.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_no_delimit.hpp b/3party/boost/boost/spirit/include/karma_no_delimit.hpp index 88512e66d5..4d31b22e3d 100644 --- a/3party/boost/boost/spirit/include/karma_no_delimit.hpp +++ b/3party/boost/boost/spirit/include/karma_no_delimit.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_nonterminal.hpp b/3party/boost/boost/spirit/include/karma_nonterminal.hpp index 4a4285b1c5..1b77e3481b 100644 --- a/3party/boost/boost/spirit/include/karma_nonterminal.hpp +++ b/3party/boost/boost/spirit/include/karma_nonterminal.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_not_predicate.hpp b/3party/boost/boost/spirit/include/karma_not_predicate.hpp index 3a1c05f702..924b911b25 100644 --- a/3party/boost/boost/spirit/include/karma_not_predicate.hpp +++ b/3party/boost/boost/spirit/include/karma_not_predicate.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_numeric.hpp b/3party/boost/boost/spirit/include/karma_numeric.hpp index e12ffb1f9b..c76dcd1916 100644 --- a/3party/boost/boost/spirit/include/karma_numeric.hpp +++ b/3party/boost/boost/spirit/include/karma_numeric.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_omit.hpp b/3party/boost/boost/spirit/include/karma_omit.hpp index 9ffb94e22c..8d54c62633 100644 --- a/3party/boost/boost/spirit/include/karma_omit.hpp +++ b/3party/boost/boost/spirit/include/karma_omit.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_operator.hpp b/3party/boost/boost/spirit/include/karma_operator.hpp index 161434678d..5aece79b05 100644 --- a/3party/boost/boost/spirit/include/karma_operator.hpp +++ b/3party/boost/boost/spirit/include/karma_operator.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_optional.hpp b/3party/boost/boost/spirit/include/karma_optional.hpp index c97a3d41a2..85143714d4 100644 --- a/3party/boost/boost/spirit/include/karma_optional.hpp +++ b/3party/boost/boost/spirit/include/karma_optional.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_phoenix_attributes.hpp b/3party/boost/boost/spirit/include/karma_phoenix_attributes.hpp index a9eb2a9b8e..f7f88f9938 100644 --- a/3party/boost/boost/spirit/include/karma_phoenix_attributes.hpp +++ b/3party/boost/boost/spirit/include/karma_phoenix_attributes.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_plus.hpp b/3party/boost/boost/spirit/include/karma_plus.hpp index aa8eaa43fc..925a25e32a 100644 --- a/3party/boost/boost/spirit/include/karma_plus.hpp +++ b/3party/boost/boost/spirit/include/karma_plus.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_real.hpp b/3party/boost/boost/spirit/include/karma_real.hpp index e4bc770c85..e6f55856c2 100644 --- a/3party/boost/boost/spirit/include/karma_real.hpp +++ b/3party/boost/boost/spirit/include/karma_real.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_repeat.hpp b/3party/boost/boost/spirit/include/karma_repeat.hpp index 721d92a975..b1723403ae 100644 --- a/3party/boost/boost/spirit/include/karma_repeat.hpp +++ b/3party/boost/boost/spirit/include/karma_repeat.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_right_alignment.hpp b/3party/boost/boost/spirit/include/karma_right_alignment.hpp index d117c57975..15bc145e25 100644 --- a/3party/boost/boost/spirit/include/karma_right_alignment.hpp +++ b/3party/boost/boost/spirit/include/karma_right_alignment.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_sequence.hpp b/3party/boost/boost/spirit/include/karma_sequence.hpp index e267c9cdbc..8f49f91799 100644 --- a/3party/boost/boost/spirit/include/karma_sequence.hpp +++ b/3party/boost/boost/spirit/include/karma_sequence.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_stream.hpp b/3party/boost/boost/spirit/include/karma_stream.hpp index 463dabc2ad..3b3bd9d49d 100644 --- a/3party/boost/boost/spirit/include/karma_stream.hpp +++ b/3party/boost/boost/spirit/include/karma_stream.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_strict_relaxed.hpp b/3party/boost/boost/spirit/include/karma_strict_relaxed.hpp index 168a127c6f..6b901d8f47 100644 --- a/3party/boost/boost/spirit/include/karma_strict_relaxed.hpp +++ b/3party/boost/boost/spirit/include/karma_strict_relaxed.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_string.hpp b/3party/boost/boost/spirit/include/karma_string.hpp index 632fdf13eb..08ff0858d4 100644 --- a/3party/boost/boost/spirit/include/karma_string.hpp +++ b/3party/boost/boost/spirit/include/karma_string.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_symbols.hpp b/3party/boost/boost/spirit/include/karma_symbols.hpp index 896fa634e5..f51a5fc859 100644 --- a/3party/boost/boost/spirit/include/karma_symbols.hpp +++ b/3party/boost/boost/spirit/include/karma_symbols.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_uint.hpp b/3party/boost/boost/spirit/include/karma_uint.hpp index c19b145da4..ca66c26081 100644 --- a/3party/boost/boost/spirit/include/karma_uint.hpp +++ b/3party/boost/boost/spirit/include/karma_uint.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_upper_lower_case.hpp b/3party/boost/boost/spirit/include/karma_upper_lower_case.hpp index f02ebfd534..07e2617e5f 100644 --- a/3party/boost/boost/spirit/include/karma_upper_lower_case.hpp +++ b/3party/boost/boost/spirit/include/karma_upper_lower_case.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_verbatim.hpp b/3party/boost/boost/spirit/include/karma_verbatim.hpp index 9f9fdbef98..87977a4832 100644 --- a/3party/boost/boost/spirit/include/karma_verbatim.hpp +++ b/3party/boost/boost/spirit/include/karma_verbatim.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/karma_what.hpp b/3party/boost/boost/spirit/include/karma_what.hpp index b20890f6d6..f81d18032c 100644 --- a/3party/boost/boost/spirit/include/karma_what.hpp +++ b/3party/boost/boost/spirit/include/karma_what.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/lex.hpp b/3party/boost/boost/spirit/include/lex.hpp index 56ea462d14..e0759c8299 100644 --- a/3party/boost/boost/spirit/include/lex.hpp +++ b/3party/boost/boost/spirit/include/lex.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/lex_domain.hpp b/3party/boost/boost/spirit/include/lex_domain.hpp index a0d5ac0824..f5f8a9a3cc 100644 --- a/3party/boost/boost/spirit/include/lex_domain.hpp +++ b/3party/boost/boost/spirit/include/lex_domain.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/lex_lexer.hpp b/3party/boost/boost/spirit/include/lex_lexer.hpp index 94d5cf6445..051d08a59c 100644 --- a/3party/boost/boost/spirit/include/lex_lexer.hpp +++ b/3party/boost/boost/spirit/include/lex_lexer.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/lex_lexertl.hpp b/3party/boost/boost/spirit/include/lex_lexertl.hpp index b7c6a169a6..8c0e17d387 100644 --- a/3party/boost/boost/spirit/include/lex_lexertl.hpp +++ b/3party/boost/boost/spirit/include/lex_lexertl.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/lex_static_lexertl.hpp b/3party/boost/boost/spirit/include/lex_static_lexertl.hpp index ca811cb7e1..ce06d5db7f 100644 --- a/3party/boost/boost/spirit/include/lex_static_lexertl.hpp +++ b/3party/boost/boost/spirit/include/lex_static_lexertl.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/lex_tokenize_and_parse.hpp b/3party/boost/boost/spirit/include/lex_tokenize_and_parse.hpp index d7a921d609..9223594cb4 100644 --- a/3party/boost/boost/spirit/include/lex_tokenize_and_parse.hpp +++ b/3party/boost/boost/spirit/include/lex_tokenize_and_parse.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix.hpp b/3party/boost/boost/spirit/include/phoenix.hpp index 81a0af3c4f..3c61098be0 100644 --- a/3party/boost/boost/spirit/include/phoenix.hpp +++ b/3party/boost/boost/spirit/include/phoenix.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix_algorithm.hpp b/3party/boost/boost/spirit/include/phoenix_algorithm.hpp index 98b442047a..980ac83f0c 100644 --- a/3party/boost/boost/spirit/include/phoenix_algorithm.hpp +++ b/3party/boost/boost/spirit/include/phoenix_algorithm.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix_bind.hpp b/3party/boost/boost/spirit/include/phoenix_bind.hpp index e555c0f84d..0f4d0ee2e1 100644 --- a/3party/boost/boost/spirit/include/phoenix_bind.hpp +++ b/3party/boost/boost/spirit/include/phoenix_bind.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix_container.hpp b/3party/boost/boost/spirit/include/phoenix_container.hpp index 900682bed7..a06405ef09 100644 --- a/3party/boost/boost/spirit/include/phoenix_container.hpp +++ b/3party/boost/boost/spirit/include/phoenix_container.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix_core.hpp b/3party/boost/boost/spirit/include/phoenix_core.hpp index fc7afda3ce..b807833ec3 100644 --- a/3party/boost/boost/spirit/include/phoenix_core.hpp +++ b/3party/boost/boost/spirit/include/phoenix_core.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix_function.hpp b/3party/boost/boost/spirit/include/phoenix_function.hpp index 14aaf41f46..a7a29e9541 100644 --- a/3party/boost/boost/spirit/include/phoenix_function.hpp +++ b/3party/boost/boost/spirit/include/phoenix_function.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix_fusion.hpp b/3party/boost/boost/spirit/include/phoenix_fusion.hpp index f203f8cebd..2b825c6b6d 100644 --- a/3party/boost/boost/spirit/include/phoenix_fusion.hpp +++ b/3party/boost/boost/spirit/include/phoenix_fusion.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix_object.hpp b/3party/boost/boost/spirit/include/phoenix_object.hpp index b660fde5f8..ae95f541e9 100644 --- a/3party/boost/boost/spirit/include/phoenix_object.hpp +++ b/3party/boost/boost/spirit/include/phoenix_object.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix_operator.hpp b/3party/boost/boost/spirit/include/phoenix_operator.hpp index 3b65784b6b..2895387703 100644 --- a/3party/boost/boost/spirit/include/phoenix_operator.hpp +++ b/3party/boost/boost/spirit/include/phoenix_operator.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix_scope.hpp b/3party/boost/boost/spirit/include/phoenix_scope.hpp index 5a5eb86c67..b4ed4bd92b 100644 --- a/3party/boost/boost/spirit/include/phoenix_scope.hpp +++ b/3party/boost/boost/spirit/include/phoenix_scope.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix_statement.hpp b/3party/boost/boost/spirit/include/phoenix_statement.hpp index 33eb39285d..7014589768 100644 --- a/3party/boost/boost/spirit/include/phoenix_statement.hpp +++ b/3party/boost/boost/spirit/include/phoenix_statement.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix_stl.hpp b/3party/boost/boost/spirit/include/phoenix_stl.hpp index 3d231ef9e0..c987001770 100644 --- a/3party/boost/boost/spirit/include/phoenix_stl.hpp +++ b/3party/boost/boost/spirit/include/phoenix_stl.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/phoenix_version.hpp b/3party/boost/boost/spirit/include/phoenix_version.hpp index 0369265f12..acc3fdf192 100644 --- a/3party/boost/boost/spirit/include/phoenix_version.hpp +++ b/3party/boost/boost/spirit/include/phoenix_version.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi.hpp b/3party/boost/boost/spirit/include/qi.hpp index 11cab8ded4..58da629666 100644 --- a/3party/boost/boost/spirit/include/qi.hpp +++ b/3party/boost/boost/spirit/include/qi.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_action.hpp b/3party/boost/boost/spirit/include/qi_action.hpp index 8e9be4cac1..27a7c30cd8 100644 --- a/3party/boost/boost/spirit/include/qi_action.hpp +++ b/3party/boost/boost/spirit/include/qi_action.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_alternative.hpp b/3party/boost/boost/spirit/include/qi_alternative.hpp index a21eb792e7..c7979c2318 100644 --- a/3party/boost/boost/spirit/include/qi_alternative.hpp +++ b/3party/boost/boost/spirit/include/qi_alternative.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_and_predicate.hpp b/3party/boost/boost/spirit/include/qi_and_predicate.hpp index 80a624c6ba..3718353e91 100644 --- a/3party/boost/boost/spirit/include/qi_and_predicate.hpp +++ b/3party/boost/boost/spirit/include/qi_and_predicate.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_as.hpp b/3party/boost/boost/spirit/include/qi_as.hpp new file mode 100644 index 0000000000..ef8ec31f98 --- /dev/null +++ b/3party/boost/boost/spirit/include/qi_as.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2010 Bryce Lelbach + http://spirit.sourceforge.net/ + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef BOOST_SPIRIT_INCLUDE_QI_AS +#define BOOST_SPIRIT_INCLUDE_QI_AS + +#if defined(_MSC_VER) +#pragma once +#endif + +#include + +#endif diff --git a/3party/boost/boost/spirit/include/qi_attr.hpp b/3party/boost/boost/spirit/include/qi_attr.hpp index ffe4c7bf67..c7f8b8a331 100644 --- a/3party/boost/boost/spirit/include/qi_attr.hpp +++ b/3party/boost/boost/spirit/include/qi_attr.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_attr_cast.hpp b/3party/boost/boost/spirit/include/qi_attr_cast.hpp index 755805b3c4..bf89a2192b 100644 --- a/3party/boost/boost/spirit/include/qi_attr_cast.hpp +++ b/3party/boost/boost/spirit/include/qi_attr_cast.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_auto.hpp b/3party/boost/boost/spirit/include/qi_auto.hpp index 9ed306a0f7..c0a0a42529 100644 --- a/3party/boost/boost/spirit/include/qi_auto.hpp +++ b/3party/boost/boost/spirit/include/qi_auto.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_auxiliary.hpp b/3party/boost/boost/spirit/include/qi_auxiliary.hpp index 5ed137fa28..7f3972822e 100644 --- a/3party/boost/boost/spirit/include/qi_auxiliary.hpp +++ b/3party/boost/boost/spirit/include/qi_auxiliary.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_binary.hpp b/3party/boost/boost/spirit/include/qi_binary.hpp index a59b2ddcc5..4920a4a2d2 100644 --- a/3party/boost/boost/spirit/include/qi_binary.hpp +++ b/3party/boost/boost/spirit/include/qi_binary.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_bool.hpp b/3party/boost/boost/spirit/include/qi_bool.hpp index 1f40c27ab5..a70ad4ff6c 100644 --- a/3party/boost/boost/spirit/include/qi_bool.hpp +++ b/3party/boost/boost/spirit/include/qi_bool.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_char.hpp b/3party/boost/boost/spirit/include/qi_char.hpp index e5c9e785cd..c5197f5b33 100644 --- a/3party/boost/boost/spirit/include/qi_char.hpp +++ b/3party/boost/boost/spirit/include/qi_char.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_char_.hpp b/3party/boost/boost/spirit/include/qi_char_.hpp index d506b0c422..ea4fc5757b 100644 --- a/3party/boost/boost/spirit/include/qi_char_.hpp +++ b/3party/boost/boost/spirit/include/qi_char_.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_char_class.hpp b/3party/boost/boost/spirit/include/qi_char_class.hpp index 44910e02bd..f062d5d28b 100644 --- a/3party/boost/boost/spirit/include/qi_char_class.hpp +++ b/3party/boost/boost/spirit/include/qi_char_class.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_core.hpp b/3party/boost/boost/spirit/include/qi_core.hpp index 481ab0218e..0cf618106d 100644 --- a/3party/boost/boost/spirit/include/qi_core.hpp +++ b/3party/boost/boost/spirit/include/qi_core.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_difference.hpp b/3party/boost/boost/spirit/include/qi_difference.hpp index a242ee6623..2ad5f25447 100644 --- a/3party/boost/boost/spirit/include/qi_difference.hpp +++ b/3party/boost/boost/spirit/include/qi_difference.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_directive.hpp b/3party/boost/boost/spirit/include/qi_directive.hpp index c8e2c4f55b..7cb06af877 100644 --- a/3party/boost/boost/spirit/include/qi_directive.hpp +++ b/3party/boost/boost/spirit/include/qi_directive.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_domain.hpp b/3party/boost/boost/spirit/include/qi_domain.hpp index 7a6bc7c680..ed1eaaa1a0 100644 --- a/3party/boost/boost/spirit/include/qi_domain.hpp +++ b/3party/boost/boost/spirit/include/qi_domain.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_eoi.hpp b/3party/boost/boost/spirit/include/qi_eoi.hpp index 58e8629692..017c57419b 100644 --- a/3party/boost/boost/spirit/include/qi_eoi.hpp +++ b/3party/boost/boost/spirit/include/qi_eoi.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_eol.hpp b/3party/boost/boost/spirit/include/qi_eol.hpp index ec91b6a8b5..94a262e7ae 100644 --- a/3party/boost/boost/spirit/include/qi_eol.hpp +++ b/3party/boost/boost/spirit/include/qi_eol.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_eps.hpp b/3party/boost/boost/spirit/include/qi_eps.hpp index ca213c985c..3bb2dcc7aa 100644 --- a/3party/boost/boost/spirit/include/qi_eps.hpp +++ b/3party/boost/boost/spirit/include/qi_eps.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_expect.hpp b/3party/boost/boost/spirit/include/qi_expect.hpp index 4aaae59eea..bfcd7396f7 100644 --- a/3party/boost/boost/spirit/include/qi_expect.hpp +++ b/3party/boost/boost/spirit/include/qi_expect.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_grammar.hpp b/3party/boost/boost/spirit/include/qi_grammar.hpp index 30844c710c..7289842c84 100644 --- a/3party/boost/boost/spirit/include/qi_grammar.hpp +++ b/3party/boost/boost/spirit/include/qi_grammar.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_hold.hpp b/3party/boost/boost/spirit/include/qi_hold.hpp new file mode 100644 index 0000000000..78a4bb56a3 --- /dev/null +++ b/3party/boost/boost/spirit/include/qi_hold.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + http://spirit.sourceforge.net/ + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef BOOST_SPIRIT_INCLUDE_QI_HOLD +#define BOOST_SPIRIT_INCLUDE_QI_HOLD + +#if defined(_MSC_VER) +#pragma once +#endif + +#include + +#endif diff --git a/3party/boost/boost/spirit/include/qi_int.hpp b/3party/boost/boost/spirit/include/qi_int.hpp index e7f6c3987f..a2bbd6606a 100644 --- a/3party/boost/boost/spirit/include/qi_int.hpp +++ b/3party/boost/boost/spirit/include/qi_int.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_kleene.hpp b/3party/boost/boost/spirit/include/qi_kleene.hpp index 455e8455d6..64360d6aae 100644 --- a/3party/boost/boost/spirit/include/qi_kleene.hpp +++ b/3party/boost/boost/spirit/include/qi_kleene.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_lazy.hpp b/3party/boost/boost/spirit/include/qi_lazy.hpp index 129bbbdfff..bfb2bcb080 100644 --- a/3party/boost/boost/spirit/include/qi_lazy.hpp +++ b/3party/boost/boost/spirit/include/qi_lazy.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_lexeme.hpp b/3party/boost/boost/spirit/include/qi_lexeme.hpp index 97716517a9..bfda35de8c 100644 --- a/3party/boost/boost/spirit/include/qi_lexeme.hpp +++ b/3party/boost/boost/spirit/include/qi_lexeme.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_list.hpp b/3party/boost/boost/spirit/include/qi_list.hpp index 035fbfc528..2e5977a680 100644 --- a/3party/boost/boost/spirit/include/qi_list.hpp +++ b/3party/boost/boost/spirit/include/qi_list.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_lit.hpp b/3party/boost/boost/spirit/include/qi_lit.hpp index a62ff42228..89b2fbd222 100644 --- a/3party/boost/boost/spirit/include/qi_lit.hpp +++ b/3party/boost/boost/spirit/include/qi_lit.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_match.hpp b/3party/boost/boost/spirit/include/qi_match.hpp index 144df5f685..34d3de551b 100644 --- a/3party/boost/boost/spirit/include/qi_match.hpp +++ b/3party/boost/boost/spirit/include/qi_match.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_match_attr.hpp b/3party/boost/boost/spirit/include/qi_match_attr.hpp index c862614eed..ad34bd03e6 100644 --- a/3party/boost/boost/spirit/include/qi_match_attr.hpp +++ b/3party/boost/boost/spirit/include/qi_match_attr.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_match_auto.hpp b/3party/boost/boost/spirit/include/qi_match_auto.hpp index 7844056682..c21f2176ed 100644 --- a/3party/boost/boost/spirit/include/qi_match_auto.hpp +++ b/3party/boost/boost/spirit/include/qi_match_auto.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_no_case.hpp b/3party/boost/boost/spirit/include/qi_no_case.hpp index f033038747..78a7a6e3eb 100644 --- a/3party/boost/boost/spirit/include/qi_no_case.hpp +++ b/3party/boost/boost/spirit/include/qi_no_case.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_nonterminal.hpp b/3party/boost/boost/spirit/include/qi_nonterminal.hpp index 7e6b148923..d8f4a02f7f 100644 --- a/3party/boost/boost/spirit/include/qi_nonterminal.hpp +++ b/3party/boost/boost/spirit/include/qi_nonterminal.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_not_predicate.hpp b/3party/boost/boost/spirit/include/qi_not_predicate.hpp index 35bc46acf7..6ea2414dff 100644 --- a/3party/boost/boost/spirit/include/qi_not_predicate.hpp +++ b/3party/boost/boost/spirit/include/qi_not_predicate.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_numeric.hpp b/3party/boost/boost/spirit/include/qi_numeric.hpp index d547326bff..dfe2c8d1e6 100644 --- a/3party/boost/boost/spirit/include/qi_numeric.hpp +++ b/3party/boost/boost/spirit/include/qi_numeric.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_omit.hpp b/3party/boost/boost/spirit/include/qi_omit.hpp index 38b546c13a..0ff74d34cc 100644 --- a/3party/boost/boost/spirit/include/qi_omit.hpp +++ b/3party/boost/boost/spirit/include/qi_omit.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_operator.hpp b/3party/boost/boost/spirit/include/qi_operator.hpp index 4234fd3bea..d58ca0ada8 100644 --- a/3party/boost/boost/spirit/include/qi_operator.hpp +++ b/3party/boost/boost/spirit/include/qi_operator.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_optional.hpp b/3party/boost/boost/spirit/include/qi_optional.hpp index bcd8a195d8..da76e70709 100644 --- a/3party/boost/boost/spirit/include/qi_optional.hpp +++ b/3party/boost/boost/spirit/include/qi_optional.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_parse.hpp b/3party/boost/boost/spirit/include/qi_parse.hpp index 2b015e9020..79e5e039dd 100644 --- a/3party/boost/boost/spirit/include/qi_parse.hpp +++ b/3party/boost/boost/spirit/include/qi_parse.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_parse_attr.hpp b/3party/boost/boost/spirit/include/qi_parse_attr.hpp index e3a37503d9..51058ce139 100644 --- a/3party/boost/boost/spirit/include/qi_parse_attr.hpp +++ b/3party/boost/boost/spirit/include/qi_parse_attr.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_parse_auto.hpp b/3party/boost/boost/spirit/include/qi_parse_auto.hpp index c0b5505701..21f784d6a2 100644 --- a/3party/boost/boost/spirit/include/qi_parse_auto.hpp +++ b/3party/boost/boost/spirit/include/qi_parse_auto.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_permutation.hpp b/3party/boost/boost/spirit/include/qi_permutation.hpp index b9b170b648..59917916b4 100644 --- a/3party/boost/boost/spirit/include/qi_permutation.hpp +++ b/3party/boost/boost/spirit/include/qi_permutation.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_plus.hpp b/3party/boost/boost/spirit/include/qi_plus.hpp index 60d69fe2a4..7f7a144852 100644 --- a/3party/boost/boost/spirit/include/qi_plus.hpp +++ b/3party/boost/boost/spirit/include/qi_plus.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_raw.hpp b/3party/boost/boost/spirit/include/qi_raw.hpp index 2e5c42f092..cf9a419463 100644 --- a/3party/boost/boost/spirit/include/qi_raw.hpp +++ b/3party/boost/boost/spirit/include/qi_raw.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_real.hpp b/3party/boost/boost/spirit/include/qi_real.hpp index 1d0a706912..d8c63470e0 100644 --- a/3party/boost/boost/spirit/include/qi_real.hpp +++ b/3party/boost/boost/spirit/include/qi_real.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_repeat.hpp b/3party/boost/boost/spirit/include/qi_repeat.hpp index 39a819da79..e42dff61d8 100644 --- a/3party/boost/boost/spirit/include/qi_repeat.hpp +++ b/3party/boost/boost/spirit/include/qi_repeat.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_rule.hpp b/3party/boost/boost/spirit/include/qi_rule.hpp index 15ec6aeca7..f407da5047 100644 --- a/3party/boost/boost/spirit/include/qi_rule.hpp +++ b/3party/boost/boost/spirit/include/qi_rule.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_sequence.hpp b/3party/boost/boost/spirit/include/qi_sequence.hpp index 6dc322ad35..515ebcbb31 100644 --- a/3party/boost/boost/spirit/include/qi_sequence.hpp +++ b/3party/boost/boost/spirit/include/qi_sequence.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_sequential_or.hpp b/3party/boost/boost/spirit/include/qi_sequential_or.hpp index 21c433acaf..e048716110 100644 --- a/3party/boost/boost/spirit/include/qi_sequential_or.hpp +++ b/3party/boost/boost/spirit/include/qi_sequential_or.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_skip.hpp b/3party/boost/boost/spirit/include/qi_skip.hpp index c5998229b1..aa14070c5d 100644 --- a/3party/boost/boost/spirit/include/qi_skip.hpp +++ b/3party/boost/boost/spirit/include/qi_skip.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_stream.hpp b/3party/boost/boost/spirit/include/qi_stream.hpp index 36d6bac0d9..3a5f6c5fbc 100644 --- a/3party/boost/boost/spirit/include/qi_stream.hpp +++ b/3party/boost/boost/spirit/include/qi_stream.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_string.hpp b/3party/boost/boost/spirit/include/qi_string.hpp index 5b90ddf85a..74bcfe161a 100644 --- a/3party/boost/boost/spirit/include/qi_string.hpp +++ b/3party/boost/boost/spirit/include/qi_string.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_symbols.hpp b/3party/boost/boost/spirit/include/qi_symbols.hpp index 89bf3c173b..34558ea708 100644 --- a/3party/boost/boost/spirit/include/qi_symbols.hpp +++ b/3party/boost/boost/spirit/include/qi_symbols.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_uint.hpp b/3party/boost/boost/spirit/include/qi_uint.hpp index 0beeacca89..e70295e489 100644 --- a/3party/boost/boost/spirit/include/qi_uint.hpp +++ b/3party/boost/boost/spirit/include/qi_uint.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/qi_what.hpp b/3party/boost/boost/spirit/include/qi_what.hpp index 9a6a868beb..2b08cddf56 100644 --- a/3party/boost/boost/spirit/include/qi_what.hpp +++ b/3party/boost/boost/spirit/include/qi_what.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support.hpp b/3party/boost/boost/spirit/include/support.hpp index af6712741d..8089bb8856 100644 --- a/3party/boost/boost/spirit/include/support.hpp +++ b/3party/boost/boost/spirit/include/support.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_any.hpp b/3party/boost/boost/spirit/include/support_any.hpp index cfe8b6e348..a1979d96e0 100644 --- a/3party/boost/boost/spirit/include/support_any.hpp +++ b/3party/boost/boost/spirit/include/support_any.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_any_if.hpp b/3party/boost/boost/spirit/include/support_any_if.hpp index 9a93a5e5bb..5fa9a58d42 100644 --- a/3party/boost/boost/spirit/include/support_any_if.hpp +++ b/3party/boost/boost/spirit/include/support_any_if.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_any_if_ns.hpp b/3party/boost/boost/spirit/include/support_any_if_ns.hpp index 65a54b7992..26c6a7fc38 100644 --- a/3party/boost/boost/spirit/include/support_any_if_ns.hpp +++ b/3party/boost/boost/spirit/include/support_any_if_ns.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_any_ns.hpp b/3party/boost/boost/spirit/include/support_any_ns.hpp index d31b91d313..3826aff6b9 100644 --- a/3party/boost/boost/spirit/include/support_any_ns.hpp +++ b/3party/boost/boost/spirit/include/support_any_ns.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_argument.hpp b/3party/boost/boost/spirit/include/support_argument.hpp index b152f28c9c..f45b766837 100644 --- a/3party/boost/boost/spirit/include/support_argument.hpp +++ b/3party/boost/boost/spirit/include/support_argument.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_ascii.hpp b/3party/boost/boost/spirit/include/support_ascii.hpp index 5a29359b85..5c08036c4f 100644 --- a/3party/boost/boost/spirit/include/support_ascii.hpp +++ b/3party/boost/boost/spirit/include/support_ascii.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_attributes.hpp b/3party/boost/boost/spirit/include/support_attributes.hpp index 59a2862c65..ecb68ff321 100644 --- a/3party/boost/boost/spirit/include/support_attributes.hpp +++ b/3party/boost/boost/spirit/include/support_attributes.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_char_class.hpp b/3party/boost/boost/spirit/include/support_char_class.hpp index 2ca999ab11..b88346ec81 100644 --- a/3party/boost/boost/spirit/include/support_char_class.hpp +++ b/3party/boost/boost/spirit/include/support_char_class.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_iso8859_1.hpp b/3party/boost/boost/spirit/include/support_iso8859_1.hpp index bcb532275d..d781cd3d0f 100644 --- a/3party/boost/boost/spirit/include/support_iso8859_1.hpp +++ b/3party/boost/boost/spirit/include/support_iso8859_1.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_istream_iterator.hpp b/3party/boost/boost/spirit/include/support_istream_iterator.hpp index 0627b18818..d1bafedd35 100644 --- a/3party/boost/boost/spirit/include/support_istream_iterator.hpp +++ b/3party/boost/boost/spirit/include/support_istream_iterator.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_line_pos_iterator.hpp b/3party/boost/boost/spirit/include/support_line_pos_iterator.hpp new file mode 100644 index 0000000000..d5ed04536e --- /dev/null +++ b/3party/boost/boost/spirit/include/support_line_pos_iterator.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2010 Bryce Lelbach + http://spirit.sourceforge.net/ + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef BOOST_SPIRIT_INCLUDE_SUPPORT_LINE_POS_ITERATOR +#define BOOST_SPIRIT_INCLUDE_SUPPORT_LINE_POS_ITERATOR + +#if defined(_MSC_VER) +#pragma once +#endif + +#include + +#endif diff --git a/3party/boost/boost/spirit/include/support_locals.hpp b/3party/boost/boost/spirit/include/support_locals.hpp index 901a7ddb68..d5a88ab393 100644 --- a/3party/boost/boost/spirit/include/support_locals.hpp +++ b/3party/boost/boost/spirit/include/support_locals.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_look_ahead.hpp b/3party/boost/boost/spirit/include/support_look_ahead.hpp index 445893887b..71dabdfec7 100644 --- a/3party/boost/boost/spirit/include/support_look_ahead.hpp +++ b/3party/boost/boost/spirit/include/support_look_ahead.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_modify.hpp b/3party/boost/boost/spirit/include/support_modify.hpp index 89eeb506ee..c51f4b64e7 100644 --- a/3party/boost/boost/spirit/include/support_modify.hpp +++ b/3party/boost/boost/spirit/include/support_modify.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_multi_pass.hpp b/3party/boost/boost/spirit/include/support_multi_pass.hpp index 2f799629e2..7888320f23 100644 --- a/3party/boost/boost/spirit/include/support_multi_pass.hpp +++ b/3party/boost/boost/spirit/include/support_multi_pass.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_multi_pass_fwd.hpp b/3party/boost/boost/spirit/include/support_multi_pass_fwd.hpp index 47b992752f..9aebbeb423 100644 --- a/3party/boost/boost/spirit/include/support_multi_pass_fwd.hpp +++ b/3party/boost/boost/spirit/include/support_multi_pass_fwd.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_standard.hpp b/3party/boost/boost/spirit/include/support_standard.hpp index 537244836d..24ea6a7977 100644 --- a/3party/boost/boost/spirit/include/support_standard.hpp +++ b/3party/boost/boost/spirit/include/support_standard.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_standard_wide.hpp b/3party/boost/boost/spirit/include/support_standard_wide.hpp index 740d98ef5f..74c85b06e9 100644 --- a/3party/boost/boost/spirit/include/support_standard_wide.hpp +++ b/3party/boost/boost/spirit/include/support_standard_wide.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_string_traits.hpp b/3party/boost/boost/spirit/include/support_string_traits.hpp index 55e0d4da77..e2bf0d9776 100644 --- a/3party/boost/boost/spirit/include/support_string_traits.hpp +++ b/3party/boost/boost/spirit/include/support_string_traits.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/support_unused.hpp b/3party/boost/boost/spirit/include/support_unused.hpp index 342c6ebc2e..d5cedc2a26 100644 --- a/3party/boost/boost/spirit/include/support_unused.hpp +++ b/3party/boost/boost/spirit/include/support_unused.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/include/version.hpp b/3party/boost/boost/spirit/include/version.hpp index 7da73d59be..da04a42b43 100644 --- a/3party/boost/boost/spirit/include/version.hpp +++ b/3party/boost/boost/spirit/include/version.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -14,7 +14,7 @@ // This is the version of the current Spirit distribution // /////////////////////////////////////////////////////////////////////////////// -#define SPIRIT_VERSION 0x2041 -#define SPIRIT_PIZZA_VERSION IANS_MEATZA // :-) +#define SPIRIT_VERSION 0x2042 +#define SPIRIT_PIZZA_VERSION WASHS_CHEESE // :-O #endif diff --git a/3party/boost/boost/spirit/repository/home/karma.hpp b/3party/boost/boost/spirit/repository/home/karma.hpp index 66d145a704..11e1543e79 100644 --- a/3party/boost/boost/spirit/repository/home/karma.hpp +++ b/3party/boost/boost/spirit/repository/home/karma.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/home/karma/directive.hpp b/3party/boost/boost/spirit/repository/home/karma/directive.hpp index 5fe5e42307..716c3a2c23 100644 --- a/3party/boost/boost/spirit/repository/home/karma/directive.hpp +++ b/3party/boost/boost/spirit/repository/home/karma/directive.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/home/karma/directive/confix.hpp b/3party/boost/boost/spirit/repository/home/karma/directive/confix.hpp index efa09cceab..cc7bd99898 100644 --- a/3party/boost/boost/spirit/repository/home/karma/directive/confix.hpp +++ b/3party/boost/boost/spirit/repository/home/karma/directive/confix.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/home/karma/nonterminal.hpp b/3party/boost/boost/spirit/repository/home/karma/nonterminal.hpp index 44ad5bf585..85c836f080 100644 --- a/3party/boost/boost/spirit/repository/home/karma/nonterminal.hpp +++ b/3party/boost/boost/spirit/repository/home/karma/nonterminal.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // Copyright (c) 2009 Francois Barel // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/home/karma/nonterminal/subrule.hpp b/3party/boost/boost/spirit/repository/home/karma/nonterminal/subrule.hpp index ca844b59aa..90dbd852f8 100644 --- a/3party/boost/boost/spirit/repository/home/karma/nonterminal/subrule.hpp +++ b/3party/boost/boost/spirit/repository/home/karma/nonterminal/subrule.hpp @@ -1,6 +1,6 @@ // Copyright (c) 2009 Francois Barel -// Copyright (c) 2001-2010 Joel de Guzman -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/home/qi.hpp b/3party/boost/boost/spirit/repository/home/qi.hpp index 92148cc358..ae58460bb3 100644 --- a/3party/boost/boost/spirit/repository/home/qi.hpp +++ b/3party/boost/boost/spirit/repository/home/qi.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/home/qi/directive.hpp b/3party/boost/boost/spirit/repository/home/qi/directive.hpp index 5f20a8e535..3d93e617d7 100644 --- a/3party/boost/boost/spirit/repository/home/qi/directive.hpp +++ b/3party/boost/boost/spirit/repository/home/qi/directive.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/home/qi/directive/distinct.hpp b/3party/boost/boost/spirit/repository/home/qi/directive/distinct.hpp index 976d16d2cb..740694559e 100644 --- a/3party/boost/boost/spirit/repository/home/qi/directive/distinct.hpp +++ b/3party/boost/boost/spirit/repository/home/qi/directive/distinct.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // Copyright (c) 2003 Vaclav Vesely // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/home/qi/nonterminal.hpp b/3party/boost/boost/spirit/repository/home/qi/nonterminal.hpp index 201b30b894..6b2dbb8fcb 100644 --- a/3party/boost/boost/spirit/repository/home/qi/nonterminal.hpp +++ b/3party/boost/boost/spirit/repository/home/qi/nonterminal.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // Copyright (c) 2009 Francois Barel // // Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/home/qi/nonterminal/subrule.hpp b/3party/boost/boost/spirit/repository/home/qi/nonterminal/subrule.hpp index b97d23c131..38a19c3d80 100644 --- a/3party/boost/boost/spirit/repository/home/qi/nonterminal/subrule.hpp +++ b/3party/boost/boost/spirit/repository/home/qi/nonterminal/subrule.hpp @@ -1,6 +1,6 @@ /*============================================================================= Copyright (c) 2009 Francois Barel - Copyright (c) 2001-2010 Joel de Guzman + Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/home/qi/primitive.hpp b/3party/boost/boost/spirit/repository/home/qi/primitive.hpp index 952ea86c7f..7198ab1378 100644 --- a/3party/boost/boost/spirit/repository/home/qi/primitive.hpp +++ b/3party/boost/boost/spirit/repository/home/qi/primitive.hpp @@ -1,5 +1,5 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser -// Copyright (c) 2001-2010 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/home/qi/primitive/flush_multi_pass.hpp b/3party/boost/boost/spirit/repository/home/qi/primitive/flush_multi_pass.hpp index 1c1a47ed75..cd4ab0c0ca 100644 --- a/3party/boost/boost/spirit/repository/home/qi/primitive/flush_multi_pass.hpp +++ b/3party/boost/boost/spirit/repository/home/qi/primitive/flush_multi_pass.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/home/qi/primitive/iter_pos.hpp b/3party/boost/boost/spirit/repository/home/qi/primitive/iter_pos.hpp index 8045decef0..6925ac2241 100644 --- a/3party/boost/boost/spirit/repository/home/qi/primitive/iter_pos.hpp +++ b/3party/boost/boost/spirit/repository/home/qi/primitive/iter_pos.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/home/support/confix.hpp b/3party/boost/boost/spirit/repository/home/support/confix.hpp index bef96cd81d..3fb467a523 100644 --- a/3party/boost/boost/spirit/repository/home/support/confix.hpp +++ b/3party/boost/boost/spirit/repository/home/support/confix.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/home/support/distinct.hpp b/3party/boost/boost/spirit/repository/home/support/distinct.hpp index 2c3d4d52f0..d248c78751 100644 --- a/3party/boost/boost/spirit/repository/home/support/distinct.hpp +++ b/3party/boost/boost/spirit/repository/home/support/distinct.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/home/support/flush_multi_pass.hpp b/3party/boost/boost/spirit/repository/home/support/flush_multi_pass.hpp index 31f9101a4b..d85ad4c9d8 100644 --- a/3party/boost/boost/spirit/repository/home/support/flush_multi_pass.hpp +++ b/3party/boost/boost/spirit/repository/home/support/flush_multi_pass.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2010 Hartmut Kaiser +// Copyright (c) 2001-2011 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3party/boost/boost/spirit/repository/include/karma.hpp b/3party/boost/boost/spirit/repository/include/karma.hpp index 48577b9a00..29b626fea7 100644 --- a/3party/boost/boost/spirit/repository/include/karma.hpp +++ b/3party/boost/boost/spirit/repository/include/karma.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/include/karma_confix.hpp b/3party/boost/boost/spirit/repository/include/karma_confix.hpp index cbb85a1787..1f4b577450 100644 --- a/3party/boost/boost/spirit/repository/include/karma_confix.hpp +++ b/3party/boost/boost/spirit/repository/include/karma_confix.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/include/karma_directive.hpp b/3party/boost/boost/spirit/repository/include/karma_directive.hpp index 6e4d31f22a..f77f18a1a1 100644 --- a/3party/boost/boost/spirit/repository/include/karma_directive.hpp +++ b/3party/boost/boost/spirit/repository/include/karma_directive.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/include/karma_nonterminal.hpp b/3party/boost/boost/spirit/repository/include/karma_nonterminal.hpp index 6200cbdc65..778dd574cc 100644 --- a/3party/boost/boost/spirit/repository/include/karma_nonterminal.hpp +++ b/3party/boost/boost/spirit/repository/include/karma_nonterminal.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Copyright (c) 2009 Francois Barel http://spirit.sourceforge.net/ diff --git a/3party/boost/boost/spirit/repository/include/karma_subrule.hpp b/3party/boost/boost/spirit/repository/include/karma_subrule.hpp index 8bc47e5a3a..54ef3aa2d4 100644 --- a/3party/boost/boost/spirit/repository/include/karma_subrule.hpp +++ b/3party/boost/boost/spirit/repository/include/karma_subrule.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Copyright (c) 2009 Francois Barel http://spirit.sourceforge.net/ diff --git a/3party/boost/boost/spirit/repository/include/qi.hpp b/3party/boost/boost/spirit/repository/include/qi.hpp index 8452b876ad..be2fa32a65 100644 --- a/3party/boost/boost/spirit/repository/include/qi.hpp +++ b/3party/boost/boost/spirit/repository/include/qi.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/include/qi_confix.hpp b/3party/boost/boost/spirit/repository/include/qi_confix.hpp index b4a901162a..d71d4e2484 100644 --- a/3party/boost/boost/spirit/repository/include/qi_confix.hpp +++ b/3party/boost/boost/spirit/repository/include/qi_confix.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/include/qi_directive.hpp b/3party/boost/boost/spirit/repository/include/qi_directive.hpp index 428c9ee8a5..fcc0816ab0 100644 --- a/3party/boost/boost/spirit/repository/include/qi_directive.hpp +++ b/3party/boost/boost/spirit/repository/include/qi_directive.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/include/qi_distinct.hpp b/3party/boost/boost/spirit/repository/include/qi_distinct.hpp index 4c24f6e5d8..57add2f8de 100644 --- a/3party/boost/boost/spirit/repository/include/qi_distinct.hpp +++ b/3party/boost/boost/spirit/repository/include/qi_distinct.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/include/qi_flush_multi_pass.hpp b/3party/boost/boost/spirit/repository/include/qi_flush_multi_pass.hpp index 158250bbe1..c612dd0c21 100644 --- a/3party/boost/boost/spirit/repository/include/qi_flush_multi_pass.hpp +++ b/3party/boost/boost/spirit/repository/include/qi_flush_multi_pass.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/include/qi_iter_pos.hpp b/3party/boost/boost/spirit/repository/include/qi_iter_pos.hpp index 3069b0cfea..48fb8d3ddc 100644 --- a/3party/boost/boost/spirit/repository/include/qi_iter_pos.hpp +++ b/3party/boost/boost/spirit/repository/include/qi_iter_pos.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/include/qi_primitive.hpp b/3party/boost/boost/spirit/repository/include/qi_primitive.hpp index 9ae37d940c..88e3837edb 100644 --- a/3party/boost/boost/spirit/repository/include/qi_primitive.hpp +++ b/3party/boost/boost/spirit/repository/include/qi_primitive.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying diff --git a/3party/boost/boost/spirit/repository/include/qi_subrule.hpp b/3party/boost/boost/spirit/repository/include/qi_subrule.hpp index 26f4d1db9f..a146d6985b 100644 --- a/3party/boost/boost/spirit/repository/include/qi_subrule.hpp +++ b/3party/boost/boost/spirit/repository/include/qi_subrule.hpp @@ -1,6 +1,6 @@ /*============================================================================= - Copyright (c) 2001-2010 Joel de Guzman - Copyright (c) 2001-2010 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser Copyright (c) 2009 Francois Barel http://spirit.sourceforge.net/ diff --git a/3party/boost/boost/statechart/event.hpp b/3party/boost/boost/statechart/event.hpp index 55419b59e7..2a15c22d45 100644 --- a/3party/boost/boost/statechart/event.hpp +++ b/3party/boost/boost/statechart/event.hpp @@ -50,6 +50,10 @@ class event : public detail::rtti_policy::rtti_derived_type< detail::deallocate< MostDerived, Allocator >( pEvent ); } + void operator delete( void * pEvent, void * p ) + { + } + protected: ////////////////////////////////////////////////////////////////////////// event() {} diff --git a/3party/boost/boost/statechart/simple_state.hpp b/3party/boost/boost/statechart/simple_state.hpp index cd53f870d6..77330f6207 100644 --- a/3party/boost/boost/statechart/simple_state.hpp +++ b/3party/boost/boost/statechart/simple_state.hpp @@ -365,7 +365,7 @@ class simple_state : public detail::simple_state_base_type< MostDerived, { if ( this->deferred_events() ) { - outermost_context_base().release_events( this ); + outermost_context_base().release_events(); } pContext_->remove_inner_state( orthogonal_position::value ); @@ -490,19 +490,12 @@ class simple_state : public detail::simple_state_base_type< MostDerived, // At this point we can only safely access pContext_ if the handler did // not return do_discard_event! - switch ( reactionResult ) + if ( reactionResult == detail::do_forward_event ) { - case detail::do_forward_event: - // TODO: The following call to react_impl of our outer state should - // be made with a context_type:: prefix to call directly instead of - // virtually. For some reason the compiler complains... - reactionResult = pContext_->react_impl( evt, eventType ); - break; - case detail::do_defer_event: - outermost_context_base().defer_event( evt, this ); - break; - default: - break; + // TODO: The following call to react_impl of our outer state should + // be made with a context_type:: prefix to call directly instead of + // virtually. For some reason the compiler complains... + reactionResult = pContext_->react_impl( evt, eventType ); } return reactionResult; diff --git a/3party/boost/boost/statechart/state_machine.hpp b/3party/boost/boost/statechart/state_machine.hpp index 1dd785de73..960cbaa770 100644 --- a/3party/boost/boost/statechart/state_machine.hpp +++ b/3party/boost/boost/statechart/state_machine.hpp @@ -1,7 +1,7 @@ #ifndef BOOST_STATECHART_STATE_MACHINE_HPP_INCLUDED #define BOOST_STATECHART_STATE_MACHINE_HPP_INCLUDED ////////////////////////////////////////////////////////////////////////////// -// Copyright 2002-2008 Andreas Huber Doenni +// Copyright 2002-2010 Andreas Huber Doenni // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ////////////////////////////////////////////////////////////////////////////// @@ -272,7 +272,11 @@ class state_machine : noncopyable void process_event( const event_base_type & evt ) { - send_event( evt ); + if ( send_event( evt ) == detail::do_defer_event ) + { + deferredEventQueue_.push_back( evt.intrusive_from_this() ); + } + process_queued_events(); } @@ -638,26 +642,9 @@ class state_machine : noncopyable } - void defer_event( - const event_base_type & evt, - const state_base_type * pForState ) + void release_events() { - deferredMap_[ pForState ].push_back( evt.intrusive_from_this() ); - } - - void release_events( const state_base_type * pForState ) - { - const typename deferred_map_type::iterator pFound = - deferredMap_.find( pForState ); - - // We are not guaranteed to find an entry because a state is marked for - // having deferred events _before_ the event is actually deferred. An - // exception might be thrown during deferral. - if ( pFound != deferredMap_.end() ) - { - eventQueue_.splice( eventQueue_.end(), pFound->second ); - deferredMap_.erase( pFound ); - } + eventQueue_.splice( eventQueue_.begin(), deferredEventQueue_ ); } @@ -880,7 +867,7 @@ class state_machine : noncopyable friend class terminator; - void send_event( const event_base_type & evt ) + detail::reaction_result send_event( const event_base_type & evt ) { terminator guard( *this, &evt ); BOOST_ASSERT( get_pointer( pOutermostUnstableState_ ) == 0 ); @@ -908,6 +895,8 @@ class state_machine : noncopyable { polymorphic_downcast< MostDerived * >( this )->unconsumed_event( evt ); } + + return reactionResult; } @@ -915,9 +904,13 @@ class state_machine : noncopyable { while ( !eventQueue_.empty() ) { - const event_base_ptr_type pCurrentEvent( eventQueue_.front() ); + event_base_ptr_type pEvent = eventQueue_.front(); eventQueue_.pop_front(); - send_event( *pCurrentEvent ); + + if ( send_event( *pEvent ) == detail::do_defer_event ) + { + deferredEventQueue_.push_back( pEvent ); + } } } @@ -928,11 +921,11 @@ class state_machine : noncopyable if ( !terminated() ) { - // this also empties deferredMap_ terminate_impl( *pOutermostState_, performFullExit ); } eventQueue_.clear(); + deferredEventQueue_.clear(); shallowHistoryMap_.clear(); deepHistoryMap_.clear(); } @@ -1075,7 +1068,7 @@ class state_machine : noncopyable event_queue_type eventQueue_; - deferred_map_type deferredMap_; + event_queue_type deferredEventQueue_; state_list_type currentStates_; typename state_list_type::iterator currentStatesEnd_; state_base_type * pOutermostState_; diff --git a/3party/boost/boost/static_assert.hpp b/3party/boost/boost/static_assert.hpp index 5bded5ea28..9fe9bc0c0f 100644 --- a/3party/boost/boost/static_assert.hpp +++ b/3party/boost/boost/static_assert.hpp @@ -17,6 +17,12 @@ #include #include +#ifndef BOOST_NO_STATIC_ASSERT +# define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert(B, Msg) +#else +# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) +#endif + #ifdef __BORLANDC__ // // workaround for buggy integral-constant expression support: @@ -38,7 +44,7 @@ # define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x) #endif -#ifdef BOOST_HAS_STATIC_ASSERT +#ifndef BOOST_NO_STATIC_ASSERT # define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) #else @@ -125,7 +131,7 @@ template struct static_assert_test{}; enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) } #endif -#endif // ndef BOOST_HAS_STATIC_ASSERT +#endif // defined(BOOST_NO_STATIC_ASSERT) #endif // BOOST_STATIC_ASSERT_HPP diff --git a/3party/boost/boost/thread/win32/thread_heap_alloc.hpp b/3party/boost/boost/thread/win32/thread_heap_alloc.hpp index b70623aaa9..c210a91098 100644 --- a/3party/boost/boost/thread/win32/thread_heap_alloc.hpp +++ b/3party/boost/boost/thread/win32/thread_heap_alloc.hpp @@ -56,7 +56,7 @@ namespace boost { namespace detail { - inline BOOST_THREAD_DECL void* allocate_raw_heap_memory(unsigned size) + inline /*BOOST_THREAD_DECL*/ void* allocate_raw_heap_memory(unsigned size) { void* const heap_memory=detail::win32::HeapAlloc(detail::win32::GetProcessHeap(),0,size); if(!heap_memory) @@ -66,7 +66,7 @@ namespace boost return heap_memory; } - inline BOOST_THREAD_DECL void free_raw_heap_memory(void* heap_memory) + inline /*BOOST_THREAD_DECL*/ void free_raw_heap_memory(void* heap_memory) { BOOST_VERIFY(detail::win32::HeapFree(detail::win32::GetProcessHeap(),0,heap_memory)!=0); } diff --git a/3party/boost/boost/throw_exception.hpp b/3party/boost/boost/throw_exception.hpp index a38405400e..a73acb671b 100644 --- a/3party/boost/boost/throw_exception.hpp +++ b/3party/boost/boost/throw_exception.hpp @@ -79,7 +79,7 @@ template BOOST_ATTRIBUTE_NORETURN inline void throw_exception( E const set_info( set_info( set_info( - enable_error_info(x), + boost::enable_error_info(x), throw_function(current_function)), throw_file(file)), throw_line(line))); diff --git a/3party/boost/boost/token_functions.hpp b/3party/boost/boost/token_functions.hpp index 4e2d745008..50f8330258 100644 --- a/3party/boost/boost/token_functions.hpp +++ b/3party/boost/boost/token_functions.hpp @@ -218,9 +218,9 @@ namespace boost{ { #if !defined(BOOST_NO_CWCTYPE) if (sizeof(char_type) == 1) - return std::isspace(c) != 0; + return std::isspace(static_cast(c)) != 0; else - return std::iswspace(c) != 0; + return std::iswspace(static_cast(c)) != 0; #else return static_cast< unsigned >(c) <= 255 && std::isspace(c) != 0; #endif @@ -230,9 +230,9 @@ namespace boost{ { #if !defined(BOOST_NO_CWCTYPE) if (sizeof(char_type) == 1) - return std::ispunct(c) != 0; + return std::ispunct(static_cast(c)) != 0; else - return std::iswpunct(c) != 0; + return std::iswpunct(static_cast(c)) != 0; #else return static_cast< unsigned >(c) <= 255 && std::ispunct(c) != 0; #endif diff --git a/3party/boost/boost/tuple/detail/tuple_basic.hpp b/3party/boost/boost/tuple/detail/tuple_basic.hpp index 348fd80894..88f0d9023f 100644 --- a/3party/boost/boost/tuple/detail/tuple_basic.hpp +++ b/3party/boost/boost/tuple/detail/tuple_basic.hpp @@ -37,6 +37,7 @@ #include "boost/type_traits/cv_traits.hpp" #include "boost/type_traits/function_traits.hpp" +#include "boost/utility/swap.hpp" #include "boost/detail/workaround.hpp" // needed for BOOST_WORKAROUND @@ -86,45 +87,28 @@ namespace detail { template class generate_error; -// - cons getters -------------------------------------------------------- -// called: get_class::get(aTuple) - -template< int N > -struct get_class { - template - inline static RET get(const cons& t) - { -#if BOOST_WORKAROUND(__IBMCPP__,==600) - // vacpp 6.0 is not very consistent regarding the member template keyword - // Here it generates an error when the template keyword is used. - return get_class::get(t.tail); -#else - return get_class::BOOST_NESTED_TEMPLATE get(t.tail); -#endif - } - template - inline static RET get(cons& t) - { -#if BOOST_WORKAROUND(__IBMCPP__,==600) - return get_class::get(t.tail); -#else - return get_class::BOOST_NESTED_TEMPLATE get(t.tail); -#endif - } +template +struct drop_front { + template + struct apply { + typedef BOOST_DEDUCED_TYPENAME drop_front::BOOST_NESTED_TEMPLATE + apply next; + typedef BOOST_DEDUCED_TYPENAME next::type::tail_type type; + static const type& call(const Tuple& tup) { + return next::call(tup).tail; + } + }; }; template<> -struct get_class<0> { - template - inline static RET get(const cons& t) - { - return t.head; - } - template - inline static RET get(cons& t) - { - return t.head; - } +struct drop_front<0> { + template + struct apply { + typedef Tuple type; + static const type& call(const Tuple& tup) { + return tup; + } + }; }; } // end of namespace detail @@ -140,41 +124,23 @@ struct get_class<0> { template struct element { -private: - typedef typename T::tail_type Next; -public: - typedef typename element::type type; -}; -template -struct element<0,T> -{ - typedef typename T::head_type type; + typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE + apply::type::head_type type; }; template struct element { private: - typedef typename T::tail_type Next; - typedef typename element::type unqualified_type; + typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE + apply::type::head_type unqualified_type; public: #if BOOST_WORKAROUND(__BORLANDC__,<0x600) typedef const unqualified_type type; #else - typedef typename boost::add_const::type type; -#endif - -}; -template -struct element<0,const T> -{ -#if BOOST_WORKAROUND(__BORLANDC__,<0x600) - typedef const typename T::head_type type; -#else - typedef typename boost::add_const::type type; + typedef BOOST_DEDUCED_TYPENAME boost::add_const::type type; #endif }; - #else // def BOOST_NO_CV_SPECIALIZATIONS namespace detail { @@ -182,31 +148,16 @@ namespace detail { template struct element_impl { -private: - typedef typename T::tail_type Next; -public: - typedef typename element_impl::type type; + typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE + apply::type::head_type type; }; template struct element_impl { -private: - typedef typename T::tail_type Next; -public: - typedef const typename element_impl::type type; -}; - -template -struct element_impl<0, T, false /* IsConst */> -{ - typedef typename T::head_type type; -}; - -template -struct element_impl<0, T, true /* IsConst */> -{ - typedef const typename T::head_type type; + typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE + apply::type::head_type unqualified_type; + typedef const unqualified_type type; }; } // end of namespace detail @@ -258,17 +209,10 @@ inline typename access_traits< typename element >::type >::non_const_type get(cons& c BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) { -#if BOOST_WORKAROUND(__IBMCPP__,==600 ) - return detail::get_class:: -#else - return detail::get_class::BOOST_NESTED_TEMPLATE -#endif - get< - typename access_traits< - typename element >::type - >::non_const_type, - HT,TT - >(c); + typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE + apply > impl; + typedef BOOST_DEDUCED_TYPENAME impl::type cons_element; + return const_cast(impl::call(c)).head; } // get function for const cons-lists, returns a const reference to @@ -279,17 +223,10 @@ inline typename access_traits< typename element >::type >::const_type get(const cons& c BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) { -#if BOOST_WORKAROUND(__IBMCPP__,==600) - return detail::get_class:: -#else - return detail::get_class::BOOST_NESTED_TEMPLATE -#endif - get< - typename access_traits< - typename element >::type - >::const_type, - HT,TT - >(c); + typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE + apply > impl; + typedef BOOST_DEDUCED_TYPENAME impl::type cons_element; + return impl::call(c).head; } // -- the cons template -------------------------------------------------- @@ -663,18 +600,21 @@ public: // Swallows any assignment (by Doug Gregor) namespace detail { +struct swallow_assign; +typedef void (detail::swallow_assign::*ignore_t)(); struct swallow_assign { - + swallow_assign(ignore_t(*)(ignore_t)) {} template swallow_assign const& operator=(const T&) const { return *this; } }; + } // namespace detail // "ignore" allows tuple positions to be ignored when using "tie". -detail::swallow_assign const ignore = detail::swallow_assign(); +inline detail::ignore_t ignore(detail::ignore_t) { return 0; } // --------------------------------------------------------------------------- // The call_traits for make_tuple @@ -756,6 +696,10 @@ struct make_tuple_traits >{ typedef T& type; }; +template<> +struct make_tuple_traits { + typedef detail::swallow_assign type; +}; @@ -877,71 +821,154 @@ make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); } +namespace detail { +template +struct tie_traits { + typedef T& type; +}; + +template<> +struct tie_traits { + typedef swallow_assign type; +}; + +template<> +struct tie_traits { + typedef null_type type; +}; + +template < + class T0 = void, class T1 = void, class T2 = void, + class T3 = void, class T4 = void, class T5 = void, + class T6 = void, class T7 = void, class T8 = void, + class T9 = void +> +struct tie_mapper { + typedef + tuple::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type> type; +}; + +} // Tie function templates ------------------------------------------------- -template -inline tuple tie(T1& t1) { - return tuple (t1); +template +inline typename detail::tie_mapper::type +tie(T0& t0) { + typedef typename detail::tie_mapper::type t; + return t(t0); } -template -inline tuple tie(T1& t1, T2& t2) { - return tuple (t1, t2); +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1) { + typedef typename detail::tie_mapper::type t; + return t(t0, t1); } -template -inline tuple tie(T1& t1, T2& t2, T3& t3) { - return tuple (t1, t2, t3); +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1, T2& t2) { + typedef typename detail::tie_mapper::type t; + return t(t0, t1, t2); } -template -inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4) { - return tuple (t1, t2, t3, t4); +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1, T2& t2, T3& t3) { + typedef typename detail::tie_mapper::type t; + return t(t0, t1, t2, t3); } -template -inline tuple -tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5) { - return tuple (t1, t2, t3, t4, t5); +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1, T2& t2, T3& t3, + T4& t4) { + typedef typename detail::tie_mapper::type t; + return t(t0, t1, t2, t3, t4); } -template -inline tuple -tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6) { - return tuple (t1, t2, t3, t4, t5, t6); +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1, T2& t2, T3& t3, + T4& t4, T5& t5) { + typedef typename detail::tie_mapper::type t; + return t(t0, t1, t2, t3, t4, t5); } -template -inline tuple -tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7) { - return tuple (t1, t2, t3, t4, t5, t6, t7); +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1, T2& t2, T3& t3, + T4& t4, T5& t5, T6& t6) { + typedef typename detail::tie_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6); } -template -inline tuple -tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8) { - return tuple - (t1, t2, t3, t4, t5, t6, t7, t8); +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1, T2& t2, T3& t3, + T4& t4, T5& t5, T6& t6, T7& t7) { + typedef typename detail::tie_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7); } -template -inline tuple -tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, - T9& t9) { - return tuple - (t1, t2, t3, t4, t5, t6, t7, t8, t9); +template +inline typename detail::tie_mapper + ::type +tie(T0& t0, T1& t1, T2& t2, T3& t3, + T4& t4, T5& t5, T6& t6, T7& t7, + T8& t8) { + typedef typename detail::tie_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7, t8); } -template -inline tuple -tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, - T9& t9, T10& t10) { - return tuple - (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); +template +inline typename detail::tie_mapper + ::type +tie(T0& t0, T1& t1, T2& t2, T3& t3, + T4& t4, T5& t5, T6& t6, T7& t7, + T8& t8, T9& t9) { + typedef typename detail::tie_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); +} + +template +void swap(tuple& lhs, + tuple& rhs); +inline void swap(null_type&, null_type&) {} +template +inline void swap(cons& lhs, cons& rhs) { + ::boost::swap(lhs.head, rhs.head); +} +template +inline void swap(cons& lhs, cons& rhs) { + ::boost::swap(lhs.head, rhs.head); + ::boost::tuples::swap(lhs.tail, rhs.tail); +} +template +inline void swap(tuple& lhs, + tuple& rhs) { + typedef tuple tuple_type; + typedef typename tuple_type::inherited base; + ::boost::tuples::swap(static_cast(lhs), static_cast(rhs)); } } // end of namespace tuples diff --git a/3party/boost/boost/tuple/detail/tuple_basic_no_partial_spec.hpp b/3party/boost/boost/tuple/detail/tuple_basic_no_partial_spec.hpp index bb38662c4a..7379bf8182 100644 --- a/3party/boost/boost/tuple/detail/tuple_basic_no_partial_spec.hpp +++ b/3party/boost/boost/tuple/detail/tuple_basic_no_partial_spec.hpp @@ -27,6 +27,7 @@ #define BOOST_TUPLE_BASIC_NO_PARTIAL_SPEC_HPP #include "boost/type_traits.hpp" +#include "boost/utility/swap.hpp" #include #if defined BOOST_MSVC @@ -836,6 +837,29 @@ namespace tuples { detail::swallow_assign const ignore = detail::swallow_assign(); +template +void swap(tuple& lhs, + tuple& rhs); +inline void swap(null_type&, null_type&) {} +template +inline void swap(cons& lhs, cons& rhs) { + ::boost::swap(lhs.head, rhs.head); +} +template +inline void swap(cons& lhs, cons& rhs) { + ::boost::swap(lhs.head, rhs.head); + ::boost::tuples::swap(lhs.tail, rhs.tail); +} +template +inline void swap(tuple& lhs, + tuple& rhs) { + typedef tuple tuple_type; + typedef typename tuple_type::inherited base; + ::boost::tuples::swap(static_cast(lhs), static_cast(rhs)); +} + } // namespace tuples } // namespace boost #endif // BOOST_TUPLE_BASIC_NO_PARTIAL_SPEC_HPP diff --git a/3party/boost/boost/tuple/tuple_io.hpp b/3party/boost/boost/tuple/tuple_io.hpp index 10cdb1cc26..06a2339297 100644 --- a/3party/boost/boost/tuple/tuple_io.hpp +++ b/3party/boost/boost/tuple/tuple_io.hpp @@ -384,6 +384,8 @@ extract_and_check_delimiter( if (is.good() && c!=d) { is.setstate(std::ios::failbit); } + } else { + is >> std::ws; } return is; } @@ -478,6 +480,8 @@ extract_and_check_delimiter( if (is.good() && c!=d) { is.setstate(std::ios::failbit); } + } else { + is >> std::ws; } return is; } diff --git a/3party/boost/boost/type_traits/common_type.hpp b/3party/boost/boost/type_traits/common_type.hpp index 58525fda02..74b036369f 100644 --- a/3party/boost/boost/type_traits/common_type.hpp +++ b/3party/boost/boost/type_traits/common_type.hpp @@ -120,6 +120,11 @@ namespace type_traits_detail { public: typedef BOOST_TYPEOF_TPL(declval_b() ? declval_T() : declval_U()) type; #endif + +#if defined(__GNUC__) && __GNUC__ == 3 && (__GNUC_MINOR__ == 2 || __GNUC_MINOR__ == 3) + public: + void public_dummy_function_just_to_silence_warning(); +#endif }; template diff --git a/3party/boost/boost/type_traits/function_traits.hpp b/3party/boost/boost/type_traits/function_traits.hpp index 6d708cd0cb..d71534572c 100644 --- a/3party/boost/boost/type_traits/function_traits.hpp +++ b/3party/boost/boost/type_traits/function_traits.hpp @@ -166,7 +166,7 @@ struct function_traits_helper template struct function_traits : - public boost::detail::function_traits_helper::type> + public boost::detail::function_traits_helper::type> { }; diff --git a/3party/boost/boost/type_traits/is_const.hpp b/3party/boost/boost/type_traits/is_const.hpp index 812ed1515f..99b0f3643a 100644 --- a/3party/boost/boost/type_traits/is_const.hpp +++ b/3party/boost/boost/type_traits/is_const.hpp @@ -59,16 +59,16 @@ template struct is_const_rvalue_filter { #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) - BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_const); + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_const); #else - BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_const); + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_const); #endif }; #ifndef BOOST_NO_RVALUE_REFERENCES template struct is_const_rvalue_filter { - BOOST_STATIC_CONSTANT(bool, value = false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #endif } diff --git a/3party/boost/boost/type_traits/is_virtual_base_of.hpp b/3party/boost/boost/type_traits/is_virtual_base_of.hpp index 98ab159799..8dcd988edd 100644 --- a/3party/boost/boost/type_traits/is_virtual_base_of.hpp +++ b/3party/boost/boost/type_traits/is_virtual_base_of.hpp @@ -22,7 +22,7 @@ namespace detail { #ifdef BOOST_MSVC #pragma warning( push ) -#pragma warning( disable : 4584 ) +#pragma warning( disable : 4584 4250) #elif defined __GNUC__ #pragma GCC system_header #endif diff --git a/3party/boost/boost/type_traits/is_volatile.hpp b/3party/boost/boost/type_traits/is_volatile.hpp index e531263200..43c3a8b65f 100644 --- a/3party/boost/boost/type_traits/is_volatile.hpp +++ b/3party/boost/boost/type_traits/is_volatile.hpp @@ -46,9 +46,9 @@ template struct is_volatile_rval_filter { #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) - BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_volatile); + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_volatile); #else - BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_volatile); + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_volatile); #endif }; #ifndef BOOST_NO_RVALUE_REFERENCES @@ -59,7 +59,7 @@ struct is_volatile_rval_filter template struct is_volatile_rval_filter { - BOOST_STATIC_CONSTANT(bool, value = false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #endif } diff --git a/3party/boost/boost/type_traits/remove_cv.hpp b/3party/boost/boost/type_traits/remove_cv.hpp index 668e755604..4061fd2b4c 100644 --- a/3party/boost/boost/type_traits/remove_cv.hpp +++ b/3party/boost/boost/type_traits/remove_cv.hpp @@ -32,7 +32,7 @@ namespace detail{ template struct rvalue_ref_filter_rem_cv { - typedef typename boost::detail::cv_traits_imp::unqualified_type type; + typedef typename boost::detail::cv_traits_imp::unqualified_type type; }; #ifndef BOOST_NO_RVALUE_REFERENCES @@ -43,7 +43,7 @@ struct rvalue_ref_filter_rem_cv template struct rvalue_ref_filter_rem_cv { - typedef T&& type; + typedef T&& type; }; #endif diff --git a/3party/boost/boost/type_traits/remove_reference.hpp b/3party/boost/boost/type_traits/remove_reference.hpp index a87db3395a..f4530861c1 100644 --- a/3party/boost/boost/type_traits/remove_reference.hpp +++ b/3party/boost/boost/type_traits/remove_reference.hpp @@ -32,13 +32,13 @@ namespace detail{ template struct remove_rvalue_ref { - typedef T type; + typedef T type; }; #ifndef BOOST_NO_RVALUE_REFERENCES template struct remove_rvalue_ref { - typedef T type; + typedef T type; }; #endif diff --git a/3party/boost/boost/typeof/msvc/typeof_impl.hpp b/3party/boost/boost/typeof/msvc/typeof_impl.hpp index 2f58c18062..74ebc70738 100644 --- a/3party/boost/boost/typeof/msvc/typeof_impl.hpp +++ b/3party/boost/boost/typeof/msvc/typeof_impl.hpp @@ -153,7 +153,9 @@ namespace boost }; }; # endif -# if BOOST_WORKAROUND(BOOST_MSVC,==1310) +// EAN: preprocess this block out on advice of Peder Holt +// to eliminate errors in type_traits/common_type.hpp +# if 0 //BOOST_WORKAROUND(BOOST_MSVC,==1310) template struct msvc_typeid_wrapper { typedef typename msvc_extract_type::id2type id2type; diff --git a/3party/boost/boost/unordered/detail/buckets.hpp b/3party/boost/boost/unordered/detail/buckets.hpp index b1dee5cfa5..913dbcd237 100644 --- a/3party/boost/boost/unordered/detail/buckets.hpp +++ b/3party/boost/boost/unordered/detail/buckets.hpp @@ -64,7 +64,7 @@ namespace boost { namespace unordered_detail { inline void hash_buckets::delete_node(node_ptr b) { node* raw_ptr = static_cast(&*b); - boost::unordered_detail::destroy(&raw_ptr->value()); + boost::unordered_detail::destroy(raw_ptr->value_ptr()); real_node_ptr n(node_alloc().address(*raw_ptr)); node_alloc().destroy(n); node_alloc().deallocate(n, 1); diff --git a/3party/boost/boost/unordered/detail/fwd.hpp b/3party/boost/boost/unordered/detail/fwd.hpp index be4d5e1a63..471d1d2e60 100644 --- a/3party/boost/boost/unordered/detail/fwd.hpp +++ b/3party/boost/boost/unordered/detail/fwd.hpp @@ -21,14 +21,14 @@ // This header defines most of the classes used to implement the unordered // containers. It doesn't include the insert methods as they require a lot -// of preprocessor metaprogramming - they are in insert.hpp +// of preprocessor metaprogramming - they are in unique.hpp and equivalent.hpp. // Template parameters: // // H = Hash Function // P = Predicate // A = Value Allocator -// G = Grouped/Ungrouped +// G = Bucket group policy, 'grouped' or 'ungrouped' // E = Key Extractor #if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_VARIADIC_TEMPLATES) @@ -90,7 +90,37 @@ namespace boost { namespace unordered_detail { #pragma warning(pop) #endif + //////////////////////////////////////////////////////////////////////////// + // + // This section implements buckets and nodes. Here's a rough + // inheritance diagram, to show how they pull together. + // + // For unordered_set/unordered_map: + // + // hash_bucket + // | + // ungrouped_node_base value_base + // | | + // +--------------+-------------+ + // | + // hash_node + // + // For unordered_multiset/unordered_multimap: + // + // hash_bucket + // | + // grouped_node_base value_base + // | | + // +--------------+-------------+ + // | + // hash_node + // hash_bucket + // + // hash_bucket is used for both the buckets and as a base class for + // nodes. By using 'bucket_ptr' for 'node_ptr', 'next_' can point + // to either a bucket or a node. This is used later to implement a + // sentinel at the end of the bucket array. template class hash_bucket @@ -109,6 +139,16 @@ namespace boost { namespace unordered_detail { hash_bucket() : next_() {} }; + // In containers with equivalent keys (unordered_multimap and + // unordered_multiset) equivalent nodes are grouped together, in + // containers with unique keys (unordered_map and unordered_set) + // individual nodes are treated as groups of one. The following two + // classes implement the data structure. + + // This is used for containers with unique keys. There are no groups + // so it doesn't add any extra members, and just treats individual + // nodes as groups of one. + template struct ungrouped_node_base : hash_bucket { typedef hash_bucket bucket; @@ -125,6 +165,10 @@ namespace boost { namespace unordered_detail { static void unlink_nodes(bucket& b, node_ptr end); }; + // This is used for containers with equivalent keys. It implements a + // circular list running in the opposite direction to the linked + // list through the nodes. + template struct grouped_node_base : hash_bucket { @@ -151,6 +195,10 @@ namespace boost { namespace unordered_detail { } }; + // These two classes implement an easy way to pass around the node + // group policy classes without the messy template parameters. + // Whenever you see the template parameter 'G' it's one of these. + struct ungrouped { template @@ -167,6 +215,8 @@ namespace boost { namespace unordered_detail { }; }; + // The space used to store values in a node. + template struct value_base { @@ -181,6 +231,9 @@ namespace boost { namespace unordered_detail { value_type& value() { return *(ValueType*) this; } + value_type* value_ptr() { + return (ValueType*) this; + } private: value_base& operator=(value_base const&); }; @@ -199,11 +252,20 @@ namespace boost { namespace unordered_detail { static value_type& get_value(node_ptr p) { return static_cast(*p).value(); } + static value_type* get_value_ptr(node_ptr p) { + return static_cast(*p).value_ptr(); + } private: hash_node& operator=(hash_node const&); }; + //////////////////////////////////////////////////////////////////////////// + // // Iterator Base + // + // This is the iterator used internally, the external iterators are + // provided by lightweight wrappers (hash_iterator and + // hast_const_iterator) which provide the full iterator interface. template class hash_iterator_base @@ -248,12 +310,24 @@ namespace boost { namespace unordered_detail { } }; + //////////////////////////////////////////////////////////////////////////// + // + // Now the main data structure: + // + // hash_buckets hash_buffered_functions + // | | + // +-------------+--------------+ + // | + // hash_table + // + // T is a class which contains typedefs for all the types we need. + // hash_buckets // // This is responsible for allocating and deallocating buckets and nodes. // // Notes: - // 1. For the sake exception safety the allocators themselves don't allocate + // 1. For the sake exception safety the consturctors don't allocate // anything. // 2. It's the callers responsibility to allocate the buckets before calling // any of the methods (other than getters and setters). @@ -327,6 +401,17 @@ namespace boost { namespace unordered_detail { std::size_t delete_to_bucket_end(node_ptr begin); }; + // Assigning and swapping the equality and hash function objects + // needs strong exception safety. To implement that normally we'd + // require one of them to be known to not throw and the other to + // guarantee strong exception safety. Unfortunately they both only + // have basic exception safety. So to acheive strong exception + // safety we have storage space for two copies, and assign the new + // copies to the unused space. Then switch to using that to use + // them. This is implemented in 'set_hash_functions' which + // atomically assigns the new function objects in a strongly + // exception safe manner. + template class set_hash_functions; template @@ -429,6 +514,12 @@ namespace boost { namespace unordered_detail { } }; + // This implements almost all of the required functionality, apart + // from some things that are specific to containers with unique and + // equivalent keys which is implemented in hash_unique_table and + // hash_equivalent_table. See unique.hpp and equivalent.hpp for + // their declaration and implementation. + template class hash_table : public T::buckets, public T::buffered_functions { @@ -569,9 +660,13 @@ namespace boost { namespace unordered_detail { node_constructor&, std::size_t); }; - // Iterator Access + /////////////////////////////////////////////////////////////////// + // + // Iterators + + // iterator_access is used to access the internal iterator without + // making it publicly available. -#if !defined(__clang__) class iterator_access { public: @@ -582,30 +677,6 @@ namespace boost { namespace unordered_detail { return it.base_; } }; -#else - class iterator_access - { - public: - // Note: we access Iterator::base here, rather than in the function - // signature to work around a bug in the friend support of an - // early version of clang. - - template - struct base - { - typedef BOOST_DEDUCED_TYPENAME Iterator::base type; - }; - - template - static BOOST_DEDUCED_TYPENAME base::type const& - get(Iterator const& it) - { - return it.base_; - } - }; -#endif - - // Iterators template class hash_iterator; template class hash_const_iterator; @@ -644,7 +715,7 @@ namespace boost { namespace unordered_detail { return node::get_value(ptr_); } value_type* operator->() const { - return &node::get_value(ptr_); + return node::get_value_ptr(ptr_); } hash_local_iterator& operator++() { ptr_ = ptr_->next_; return *this; @@ -694,7 +765,7 @@ namespace boost { namespace unordered_detail { return node::get_value(ptr_); } value_type const* operator->() const { - return &node::get_value(ptr_); + return node::get_value_ptr(ptr_); } hash_const_local_iterator& operator++() { ptr_ = ptr_->next_; return *this; @@ -716,7 +787,7 @@ namespace boost { namespace unordered_detail { } }; - // iterators + // Iterators // // all no throw @@ -823,7 +894,12 @@ namespace boost { namespace unordered_detail { } }; + //////////////////////////////////////////////////////////////////////////// + // // types + // + // This is used to convieniently pass around a container's typedefs + // without having 7 template parameters. template struct types diff --git a/3party/boost/boost/unordered/detail/util.hpp b/3party/boost/boost/unordered/detail/util.hpp index 55409651fc..989883e0f8 100644 --- a/3party/boost/boost/unordered/detail/util.hpp +++ b/3party/boost/boost/unordered/detail/util.hpp @@ -299,7 +299,7 @@ namespace boost { namespace unordered_detail { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { hash_node x; }; #endif - boost::unordered_detail::destroy(&node_->value()); + boost::unordered_detail::destroy(node_->value_ptr()); } if (node_constructed_) @@ -322,7 +322,7 @@ namespace boost { namespace unordered_detail { } else { BOOST_ASSERT(node_constructed_ && value_constructed_); - boost::unordered_detail::destroy(&node_->value()); + boost::unordered_detail::destroy(node_->value_ptr()); value_constructed_ = false; } } diff --git a/3party/boost/boost/unordered/unordered_map_fwd.hpp b/3party/boost/boost/unordered/unordered_map_fwd.hpp index 5e9bb07645..edecc5d9ec 100644 --- a/3party/boost/boost/unordered/unordered_map_fwd.hpp +++ b/3party/boost/boost/unordered/unordered_map_fwd.hpp @@ -24,13 +24,13 @@ namespace boost class A = std::allocator > > class unordered_map; template - bool operator==(unordered_map const&, + inline bool operator==(unordered_map const&, unordered_map const&); template - bool operator!=(unordered_map const&, + inline bool operator!=(unordered_map const&, unordered_map const&); template - void swap(unordered_map&, + inline void swap(unordered_map&, unordered_map&); template > > class unordered_multimap; template - bool operator==(unordered_multimap const&, + inline bool operator==(unordered_multimap const&, unordered_multimap const&); template - bool operator!=(unordered_multimap const&, + inline bool operator!=(unordered_multimap const&, unordered_multimap const&); template - void swap(unordered_multimap&, + inline void swap(unordered_multimap&, unordered_multimap&); } diff --git a/3party/boost/boost/unordered/unordered_set_fwd.hpp b/3party/boost/boost/unordered/unordered_set_fwd.hpp index 8000eb1420..fead124300 100644 --- a/3party/boost/boost/unordered/unordered_set_fwd.hpp +++ b/3party/boost/boost/unordered/unordered_set_fwd.hpp @@ -23,13 +23,13 @@ namespace boost class A = std::allocator > class unordered_set; template - bool operator==(unordered_set const&, + inline bool operator==(unordered_set const&, unordered_set const&); template - bool operator!=(unordered_set const&, + inline bool operator!=(unordered_set const&, unordered_set const&); template - void swap(unordered_set &m1, + inline void swap(unordered_set &m1, unordered_set &m2); template > class unordered_multiset; template - bool operator==(unordered_multiset const&, + inline bool operator==(unordered_multiset const&, unordered_multiset const&); template - bool operator!=(unordered_multiset const&, + inline bool operator!=(unordered_multiset const&, unordered_multiset const&); template - void swap(unordered_multiset &m1, + inline void swap(unordered_multiset &m1, unordered_multiset &m2); } diff --git a/3party/boost/boost/version.hpp b/3party/boost/boost/version.hpp index bdb68d44a5..b031f6fc3c 100644 --- a/3party/boost/boost/version.hpp +++ b/3party/boost/boost/version.hpp @@ -19,7 +19,7 @@ // BOOST_VERSION / 100 % 1000 is the minor version // BOOST_VERSION / 100000 is the major version -#define BOOST_VERSION 104500 +#define BOOST_VERSION 104600 // // BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION @@ -27,7 +27,7 @@ // number, y is the minor version number, and z is the patch level if not 0. // This is used by to select which library version to link to. -#define BOOST_LIB_VERSION "1_45" +#define BOOST_LIB_VERSION "1_46" #endif diff --git a/3party/boost/boost/wave.hpp b/3party/boost/boost/wave.hpp index a965cc0b68..14842e3637 100644 --- a/3party/boost/boost/wave.hpp +++ b/3party/boost/boost/wave.hpp @@ -5,7 +5,7 @@ See http://www.boost.org/libs/wave for documentation - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpp_context.hpp b/3party/boost/boost/wave/cpp_context.hpp index 980110dfa5..2a2d6d31a8 100644 --- a/3party/boost/boost/wave/cpp_context.hpp +++ b/3party/boost/boost/wave/cpp_context.hpp @@ -4,7 +4,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -165,7 +165,7 @@ public: std::string fname(filename); if (filename != "" && filename != "") { using namespace boost::filesystem; - path fpath(complete(path(filename))); + path fpath(util::complete_path(path(filename))); fname = fpath.string(); } return iterator_type(*this, first, last, position_type(fname.c_str())); @@ -177,7 +177,7 @@ public: std::string fname(filename); if (filename != "" && filename != "") { using namespace boost::filesystem; - path fpath(complete(path(filename))); + path fpath(util::complete_path(path(filename))); fname = fpath.string(); } return iterator_type(*this, first_, last_, position_type(fname.c_str())); @@ -324,7 +324,7 @@ protected: std::string fname(filename); if (filename != "" && filename != "") { using namespace boost::filesystem; - path fpath(complete(path(filename))); + path fpath(util::complete_path(path(filename))); fname = fpath.string(); includes.set_current_directory(fname.c_str()); } diff --git a/3party/boost/boost/wave/cpp_exceptions.hpp b/3party/boost/boost/wave/cpp_exceptions.hpp index 187aa288b9..3fbd61af96 100644 --- a/3party/boost/boost/wave/cpp_exceptions.hpp +++ b/3party/boost/boost/wave/cpp_exceptions.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpp_iteration_context.hpp b/3party/boost/boost/wave/cpp_iteration_context.hpp index 549417d75a..bf9f734cdb 100644 --- a/3party/boost/boost/wave/cpp_iteration_context.hpp +++ b/3party/boost/boost/wave/cpp_iteration_context.hpp @@ -4,7 +4,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpp_throw.hpp b/3party/boost/boost/wave/cpp_throw.hpp index f5434d12f7..010e5719db 100644 --- a/3party/boost/boost/wave/cpp_throw.hpp +++ b/3party/boost/boost/wave/cpp_throw.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpplexer/convert_trigraphs.hpp b/3party/boost/boost/wave/cpplexer/convert_trigraphs.hpp index 167bbae2fb..8f80cfba49 100644 --- a/3party/boost/boost/wave/cpplexer/convert_trigraphs.hpp +++ b/3party/boost/boost/wave/cpplexer/convert_trigraphs.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpplexer/cpp_lex_interface.hpp b/3party/boost/boost/wave/cpplexer/cpp_lex_interface.hpp index 262671972d..c69f8aaa53 100644 --- a/3party/boost/boost/wave/cpplexer/cpp_lex_interface.hpp +++ b/3party/boost/boost/wave/cpplexer/cpp_lex_interface.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpplexer/cpp_lex_interface_generator.hpp b/3party/boost/boost/wave/cpplexer/cpp_lex_interface_generator.hpp index d0abbbe6f8..8e1bd7726c 100644 --- a/3party/boost/boost/wave/cpplexer/cpp_lex_interface_generator.hpp +++ b/3party/boost/boost/wave/cpplexer/cpp_lex_interface_generator.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpplexer/cpp_lex_iterator.hpp b/3party/boost/boost/wave/cpplexer/cpp_lex_iterator.hpp index dbcdc6b9d7..fe93888af5 100644 --- a/3party/boost/boost/wave/cpplexer/cpp_lex_iterator.hpp +++ b/3party/boost/boost/wave/cpplexer/cpp_lex_iterator.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpplexer/cpp_lex_token.hpp b/3party/boost/boost/wave/cpplexer/cpp_lex_token.hpp index b7d09cb403..81e589539f 100644 --- a/3party/boost/boost/wave/cpplexer/cpp_lex_token.hpp +++ b/3party/boost/boost/wave/cpplexer/cpp_lex_token.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpplexer/cpplexer_exceptions.hpp b/3party/boost/boost/wave/cpplexer/cpplexer_exceptions.hpp index 038003fc8e..5ef0ca26e6 100644 --- a/3party/boost/boost/wave/cpplexer/cpplexer_exceptions.hpp +++ b/3party/boost/boost/wave/cpplexer/cpplexer_exceptions.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpplexer/detect_include_guards.hpp b/3party/boost/boost/wave/cpplexer/detect_include_guards.hpp index 76fdabe054..09463ff8ea 100644 --- a/3party/boost/boost/wave/cpplexer/detect_include_guards.hpp +++ b/3party/boost/boost/wave/cpplexer/detect_include_guards.hpp @@ -22,7 +22,7 @@ will work as well). The code allows for any whitespace, newline and single '#' tokens before the #if/#ifndef and after the final #endif. - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpplexer/re2clex/aq.hpp b/3party/boost/boost/wave/cpplexer/re2clex/aq.hpp index daa7333a0a..7b24359a48 100644 --- a/3party/boost/boost/wave/cpplexer/re2clex/aq.hpp +++ b/3party/boost/boost/wave/cpplexer/re2clex/aq.hpp @@ -4,7 +4,7 @@ http://www.boost.org/ Copyright (c) 2001 Daniel C. Nuffer. - Copyright (c) 2001-2010 Hartmut Kaiser. + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpplexer/re2clex/cpp_re.hpp b/3party/boost/boost/wave/cpplexer/re2clex/cpp_re.hpp index 302887d51a..5febbb4a20 100644 --- a/3party/boost/boost/wave/cpplexer/re2clex/cpp_re.hpp +++ b/3party/boost/boost/wave/cpplexer/re2clex/cpp_re.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp b/3party/boost/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp index 3590a4bd58..748738544b 100644 --- a/3party/boost/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp +++ b/3party/boost/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -152,6 +152,12 @@ lexer::lexer(IteratorT const &first, scanner.detect_pp_numbers = boost::wave::need_prefer_pp_numbers(language_); scanner.single_line_only = boost::wave::need_single_line(language_); + +#if BOOST_WAVE_SUPPORT_CPP0X != 0 + scanner.act_in_cpp0x_mode = boost::wave::need_cpp0x(language_); +#else + scanner.act_in_cpp0x_mode = false; +#endif } template @@ -186,6 +192,7 @@ lexer::get(TokenT& result) case T_STRINGLIT: case T_CHARLIT: + case T_RAWSTRINGLIT: // test literal characters for validity (throws if invalid chars found) value = string_type((char const *)scanner.tok, scanner.cur-scanner.tok); @@ -212,7 +219,7 @@ lexer::get(TokenT& result) } #endif - case T_LONGINTLIT: // supported in C99 and long_long mode + case T_LONGINTLIT: // supported in C++0x, C99 and long_long mode value = string_type((char const *)scanner.tok, scanner.cur-scanner.tok); if (!boost::wave::need_long_long(language)) { diff --git a/3party/boost/boost/wave/cpplexer/re2clex/scanner.hpp b/3party/boost/boost/wave/cpplexer/re2clex/scanner.hpp index 6aee2168ce..e052558e6d 100644 --- a/3party/boost/boost/wave/cpplexer/re2clex/scanner.hpp +++ b/3party/boost/boost/wave/cpplexer/re2clex/scanner.hpp @@ -4,7 +4,7 @@ http://www.boost.org/ Copyright (c) 2001 Daniel C. Nuffer. - Copyright (c) 2001-2010 Hartmut Kaiser. + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -57,6 +57,7 @@ typedef struct Scanner { bool detect_pp_numbers; /* lexer should prefer to detect pp-numbers */ bool enable_import_keyword; /* recognize import as a keyword */ bool single_line_only; /* don't report missing eol's in C++ comments */ + bool act_in_cpp0x_mode; /* lexer works in C++0x mode */ } Scanner; /////////////////////////////////////////////////////////////////////////////// diff --git a/3party/boost/boost/wave/cpplexer/token_cache.hpp b/3party/boost/boost/wave/cpplexer/token_cache.hpp index e53b2b4f02..4dedb48f24 100644 --- a/3party/boost/boost/wave/cpplexer/token_cache.hpp +++ b/3party/boost/boost/wave/cpplexer/token_cache.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/cpplexer/validate_universal_char.hpp b/3party/boost/boost/wave/cpplexer/validate_universal_char.hpp index 1b8ac9b1a1..09b0a06c92 100644 --- a/3party/boost/boost/wave/cpplexer/validate_universal_char.hpp +++ b/3party/boost/boost/wave/cpplexer/validate_universal_char.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_chlit_grammar.hpp b/3party/boost/boost/wave/grammars/cpp_chlit_grammar.hpp index 6573f47766..f0af6e06d0 100644 --- a/3party/boost/boost/wave/grammars/cpp_chlit_grammar.hpp +++ b/3party/boost/boost/wave/grammars/cpp_chlit_grammar.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_defined_grammar.hpp b/3party/boost/boost/wave/grammars/cpp_defined_grammar.hpp index 3c77527263..d6d3422fe8 100644 --- a/3party/boost/boost/wave/grammars/cpp_defined_grammar.hpp +++ b/3party/boost/boost/wave/grammars/cpp_defined_grammar.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_defined_grammar_gen.hpp b/3party/boost/boost/wave/grammars/cpp_defined_grammar_gen.hpp index 0bdf821f29..3da519e917 100644 --- a/3party/boost/boost/wave/grammars/cpp_defined_grammar_gen.hpp +++ b/3party/boost/boost/wave/grammars/cpp_defined_grammar_gen.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_expression_grammar.hpp b/3party/boost/boost/wave/grammars/cpp_expression_grammar.hpp index db2937f50a..6f69de2fac 100644 --- a/3party/boost/boost/wave/grammars/cpp_expression_grammar.hpp +++ b/3party/boost/boost/wave/grammars/cpp_expression_grammar.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_expression_grammar_gen.hpp b/3party/boost/boost/wave/grammars/cpp_expression_grammar_gen.hpp index 67f1a945ee..593c97786b 100644 --- a/3party/boost/boost/wave/grammars/cpp_expression_grammar_gen.hpp +++ b/3party/boost/boost/wave/grammars/cpp_expression_grammar_gen.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_expression_value.hpp b/3party/boost/boost/wave/grammars/cpp_expression_value.hpp index 3d4e815edf..0cd6e13bc1 100644 --- a/3party/boost/boost/wave/grammars/cpp_expression_value.hpp +++ b/3party/boost/boost/wave/grammars/cpp_expression_value.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_grammar.hpp b/3party/boost/boost/wave/grammars/cpp_grammar.hpp index c7dea870a1..d309e2e39b 100644 --- a/3party/boost/boost/wave/grammars/cpp_grammar.hpp +++ b/3party/boost/boost/wave/grammars/cpp_grammar.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_grammar_gen.hpp b/3party/boost/boost/wave/grammars/cpp_grammar_gen.hpp index f4449f5e6a..d582a07144 100644 --- a/3party/boost/boost/wave/grammars/cpp_grammar_gen.hpp +++ b/3party/boost/boost/wave/grammars/cpp_grammar_gen.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_intlit_grammar.hpp b/3party/boost/boost/wave/grammars/cpp_intlit_grammar.hpp index 175d6439c1..96ac8f62c1 100644 --- a/3party/boost/boost/wave/grammars/cpp_intlit_grammar.hpp +++ b/3party/boost/boost/wave/grammars/cpp_intlit_grammar.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_literal_grammar_gen.hpp b/3party/boost/boost/wave/grammars/cpp_literal_grammar_gen.hpp index 2291e9548e..9492daac6f 100644 --- a/3party/boost/boost/wave/grammars/cpp_literal_grammar_gen.hpp +++ b/3party/boost/boost/wave/grammars/cpp_literal_grammar_gen.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_predef_macros_gen.hpp b/3party/boost/boost/wave/grammars/cpp_predef_macros_gen.hpp index cd2633d2c8..4e66a53cbd 100644 --- a/3party/boost/boost/wave/grammars/cpp_predef_macros_gen.hpp +++ b/3party/boost/boost/wave/grammars/cpp_predef_macros_gen.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_predef_macros_grammar.hpp b/3party/boost/boost/wave/grammars/cpp_predef_macros_grammar.hpp index a77081aec9..9d35a2f461 100644 --- a/3party/boost/boost/wave/grammars/cpp_predef_macros_grammar.hpp +++ b/3party/boost/boost/wave/grammars/cpp_predef_macros_grammar.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/grammars/cpp_value_error.hpp b/3party/boost/boost/wave/grammars/cpp_value_error.hpp index 9650c2fcad..9cba99a264 100644 --- a/3party/boost/boost/wave/grammars/cpp_value_error.hpp +++ b/3party/boost/boost/wave/grammars/cpp_value_error.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/language_support.hpp b/3party/boost/boost/wave/language_support.hpp index b0fbe33d77..7e0c60e067 100644 --- a/3party/boost/boost/wave/language_support.hpp +++ b/3party/boost/boost/wave/language_support.hpp @@ -4,7 +4,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -34,6 +34,9 @@ enum language_support { support_option_variadics = 0x04, support_c99 = support_option_variadics | support_option_long_long | 0x08, #endif +#if BOOST_WAVE_SUPPORT_CPP0X != 0 + support_cpp0x = support_option_variadics | support_option_long_long | 0x10, +#endif support_option_mask = 0xFF80, support_option_insert_whitespace = 0x0080, @@ -60,6 +63,31 @@ need_cpp(language_support language) return (language & ~support_option_mask) == support_cpp; } +/////////////////////////////////////////////////////////////////////////////// +// +// need_cpp0x +// +// Extract, if the language to support is C++0x +// +/////////////////////////////////////////////////////////////////////////////// +#if BOOST_WAVE_SUPPORT_CPP0X != 0 + +inline bool +need_cpp0x(language_support language) +{ + return (language & ~support_option_mask) == support_cpp0x; +} + +#else + +inline bool +need_cpp0x(language_support language) +{ + return false; +} + +#endif + #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 /////////////////////////////////////////////////////////////////////////////// // diff --git a/3party/boost/boost/wave/preprocessing_hooks.hpp b/3party/boost/boost/wave/preprocessing_hooks.hpp index 72fc458443..fb6b75ac23 100644 --- a/3party/boost/boost/wave/preprocessing_hooks.hpp +++ b/3party/boost/boost/wave/preprocessing_hooks.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/token_ids.hpp b/3party/boost/boost/wave/token_ids.hpp index 0fc6d2b43d..37d5d581eb 100644 --- a/3party/boost/boost/wave/token_ids.hpp +++ b/3party/boost/boost/wave/token_ids.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -287,6 +287,19 @@ enum token_id { // import is needed to be a keyword for the C++ module Standards proposal T_IMPORT = TOKEN_FROM_ID(421, KeywordTokenType), +// C++0x keywords + T_ALIGNAS = TOKEN_FROM_ID(422, KeywordTokenType), + T_ALIGNOF = TOKEN_FROM_ID(423, KeywordTokenType), + T_CHAR16_T = TOKEN_FROM_ID(424, KeywordTokenType), + T_CHAR32_T = TOKEN_FROM_ID(425, KeywordTokenType), + T_CONSTEXPR = TOKEN_FROM_ID(426, KeywordTokenType), + T_DECLTYPE = TOKEN_FROM_ID(427, KeywordTokenType), + T_NOEXCEPT = TOKEN_FROM_ID(428, KeywordTokenType), + T_NULLPTR = TOKEN_FROM_ID(429, KeywordTokenType), + T_STATICASSERT = TOKEN_FROM_ID(430, KeywordTokenType), + T_THREADLOCAL = TOKEN_FROM_ID(431, KeywordTokenType), + T_RAWSTRINGLIT = TOKEN_FROM_ID(432, StringLiteralTokenType), + T_LAST_TOKEN_ID, T_LAST_TOKEN = ID_FROM_TOKEN(T_LAST_TOKEN_ID & ~PPTokenFlag), diff --git a/3party/boost/boost/wave/util/cpp_ifblock.hpp b/3party/boost/boost/wave/util/cpp_ifblock.hpp index a56b8a1d5c..f89f9eaf66 100644 --- a/3party/boost/boost/wave/util/cpp_ifblock.hpp +++ b/3party/boost/boost/wave/util/cpp_ifblock.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/util/cpp_include_paths.hpp b/3party/boost/boost/wave/util/cpp_include_paths.hpp index 65357d67ec..28afbf7ff5 100644 --- a/3party/boost/boost/wave/util/cpp_include_paths.hpp +++ b/3party/boost/boost/wave/util/cpp_include_paths.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -273,7 +273,7 @@ bool include_paths::add_include_path ( { namespace fs = boost::filesystem; if (path_) { - fs::path newpath = fs::complete(create_path(path_), current_dir); + fs::path newpath = util::complete_path(create_path(path_), current_dir); if (!fs::exists(newpath) || !fs::is_directory(newpath)) { // the given path does not form a name of a valid file system directory @@ -441,7 +441,7 @@ void include_paths::set_current_directory(char const *path_) namespace fs = boost::filesystem; fs::path filepath (create_path(path_)); - fs::path filename = fs::complete(filepath, current_dir); + fs::path filename = util::complete_path(filepath, current_dir); if (fs::exists(filename) && fs::is_directory(filename)) { current_rel_dir.clear(); if (!as_relative_to(filepath, current_dir, current_rel_dir)) diff --git a/3party/boost/boost/wave/util/cpp_iterator.hpp b/3party/boost/boost/wave/util/cpp_iterator.hpp index 787351a2a5..c463658156 100644 --- a/3party/boost/boost/wave/util/cpp_iterator.hpp +++ b/3party/boost/boost/wave/util/cpp_iterator.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -550,6 +550,13 @@ pp_iterator_functor::operator()() ++iter_ctx->emitted_lines; break; +#if BOOST_WAVE_SUPPORT_CPP0X != 0 + case T_RAWSTRINGLIT: + iter_ctx->emitted_lines += + context_policies::util::rawstring_count_newlines(act_token); + break; +#endif + case T_CCOMMENT: // will come here only if whitespace is preserved iter_ctx->emitted_lines += context_policies::util::ccomment_count_newlines(act_token); @@ -576,7 +583,7 @@ pp_iterator_functor::operator()() pending_queue.pop_front(); } break; - + case T_EOF: seen_newline = true; break; @@ -663,7 +670,7 @@ bool returned_from_include_file = returned_from_include(); if (!ctx.get_if_block_status()) { // skip this token because of the disabled #if block whitespace.shift_tokens(id); // whitespace controller - util::call_skipped_token_hook(ctx, act_token); + util::impl::call_skipped_token_hook(ctx, act_token); continue; } return act_token; @@ -695,7 +702,7 @@ bool returned_from_include_file = returned_from_include(); } // next token - util::call_skipped_token_hook(ctx, act_token); + util::impl::call_skipped_token_hook(ctx, act_token); ++iter_ctx->first; } @@ -875,17 +882,17 @@ namespace impl { return false; } - // call 'skipped_token' preprocessing hook - template - void call_skipped_token_hook(ContextT& ctx, - typename ContextT::token_type const& skipped) - { -#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0 - ctx.get_hooks().skipped_token(skipped); -#else - ctx.get_hooks().skipped_token(ctx.derived(), skipped); -#endif - } +// // call 'skipped_token' preprocessing hook +// template +// void call_skipped_token_hook(ContextT& ctx, +// typename ContextT::token_type const& skipped) +// { +// #if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0 +// ctx.get_hooks().skipped_token(skipped); +// #else +// ctx.get_hooks().skipped_token(ctx.derived(), skipped); +// #endif +// } template bool next_token_is_pp_directive(ContextT &ctx, IteratorT &it, IteratorT const &end) @@ -906,7 +913,7 @@ namespace impl { } // this token gets skipped - util::call_skipped_token_hook(ctx, *it); + util::impl::call_skipped_token_hook(ctx, *it); } BOOST_ASSERT(it == end || id != T_UNKNOWN); return it != end && IS_CATEGORY(id, PPTokenType); @@ -921,7 +928,7 @@ namespace impl { // this token gets skipped if (call_hook) - util::call_skipped_token_hook(ctx, *it); + util::impl::call_skipped_token_hook(ctx, *it); for (++it; it != end; ++it) { token_id id = token_id(*it); @@ -930,7 +937,7 @@ namespace impl { context_policies::util::ccomment_has_newline(*it)) { if (call_hook) - util::call_skipped_token_hook(ctx, *it); + util::impl::call_skipped_token_hook(ctx, *it); ++it; // skip eol/C/C++ comment return true; // no more significant tokens on this line } @@ -940,7 +947,7 @@ namespace impl { // this token gets skipped if (call_hook) - util::call_skipped_token_hook(ctx, *it); + util::impl::call_skipped_token_hook(ctx, *it); } return false; } @@ -959,13 +966,13 @@ namespace impl { context_policies::util::ccomment_has_newline(*it)) { // always call hook for eol - util::call_skipped_token_hook(ctx, *it); + util::impl::call_skipped_token_hook(ctx, *it); ++it; // skip eol/C/C++ comment return true; // found eol } if (call_hook) - util::call_skipped_token_hook(ctx, *it); + util::impl::call_skipped_token_hook(ctx, *it); } return false; } @@ -979,7 +986,7 @@ namespace impl { while (IS_CATEGORY(*it, WhiteSpaceTokenType)) { typename ContainerT::iterator save = it++; if (call_hook) - util::call_skipped_token_hook(ctx, *save); + util::impl::call_skipped_token_hook(ctx, *save); c.erase(save); } } @@ -1135,7 +1142,7 @@ pp_iterator_functor::handle_pp_directive(IteratorT &it) } } else { - util::call_skipped_token_hook(ctx, *it); + util::impl::call_skipped_token_hook(ctx, *it); ++it; } } diff --git a/3party/boost/boost/wave/util/cpp_macromap.hpp b/3party/boost/boost/wave/util/cpp_macromap.hpp index 31bf4c22cd..e518ba3f6f 100644 --- a/3party/boost/boost/wave/util/cpp_macromap.hpp +++ b/3party/boost/boost/wave/util/cpp_macromap.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -574,7 +574,7 @@ macromap::expand_tokensequence_worker( // return the next one from there if (!pending.empty()) { on_exit::pop_front pop_front_token(pending); - + return act_token = pending.front(); } @@ -582,20 +582,20 @@ macromap::expand_tokensequence_worker( // T_IDENTIFIER token, try to replace this as a macro etc. using namespace boost::wave; typedef unput_queue_iterator iterator_type; - + if (first != last) { token_id id = token_id(*first); // ignore placeholder tokens if (T_PLACEHOLDER == id) { token_type placeholder = *first; - + ++first; if (first == last) return act_token = placeholder; id = token_id(*first); } - + if (T_IDENTIFIER == id || IS_CATEGORY(id, KeywordTokenType) || IS_EXTCATEGORY(id, OperatorTokenType|AltExtTokenType) || IS_CATEGORY(id, BoolLiteralTokenType)) @@ -610,7 +610,7 @@ macromap::expand_tokensequence_worker( { // in C99 mode only: resolve the operator _Pragma token_type curr_token = *first; - + if (!resolve_operator_pragma(first, last, pending, seen_newline) || pending.size() > 0) { @@ -620,7 +620,7 @@ macromap::expand_tokensequence_worker( return act_token = pending.front(); } - + // the operator _Pragma() was eaten completely, continue return act_token = token_type(T_PLACEHOLDER, "_", curr_token.get_position()); @@ -628,7 +628,7 @@ macromap::expand_tokensequence_worker( token_type name_token (*first); typename defined_macros_type::iterator it; - + if (is_defined(name_token.get_value(), it)) { // the current token contains an identifier, which is currently // defined as a macro @@ -640,12 +640,12 @@ macromap::expand_tokensequence_worker( if (first != last) { // splice the last token back into the input queue typename ContainerT::reverse_iterator rit = pending.rbegin(); - + first.get_unput_queue().splice( first.get_unput_queue().begin(), pending, (++rit).base(), pending.end()); } - + // fall through ... } else if (!pending.empty()) { @@ -719,7 +719,7 @@ macromap::collect_arguments (token_type const curr_token, using namespace boost::wave; arguments.push_back(ContainerT()); - + // collect the actual arguments typename std::vector::size_type count_arguments = 0; int nested_parenthesis_level = 1; @@ -740,14 +740,14 @@ token_type startof_argument_list = *next; main_pos); return 0; } - + switch (static_cast(id)) { case T_LEFTPAREN: ++nested_parenthesis_level; argument->push_back(*next); was_whitespace = false; break; - + case T_RIGHTPAREN: { if (--nested_parenthesis_level >= 1) @@ -779,7 +779,7 @@ token_type startof_argument_list = *next; was_whitespace = false; } break; - + case T_COMMA: if (1 == nested_parenthesis_level) { // next parameter @@ -822,7 +822,7 @@ token_type startof_argument_list = *next; case T_PLACEHOLDER: break; // ignore placeholder - + default: argument->push_back(*next); was_whitespace = false; @@ -844,7 +844,7 @@ token_type startof_argument_list = *next; arguments.clear(); } return count_arguments; -} +} /////////////////////////////////////////////////////////////////////////////// // @@ -902,17 +902,17 @@ macromap::expand_argument ( // expand the argument only once typedef typename std::vector::value_type::iterator argument_iterator_type; - + argument_iterator_type begin_it = arguments[arg].begin(); argument_iterator_type end_it = arguments[arg].end(); - + expand_whole_tokensequence(expanded_args[arg], begin_it, end_it, expand_operator_defined); impl::remove_placeholders(expanded_args[arg]); has_expanded_args[arg] = true; } } - + /////////////////////////////////////////////////////////////////////////////// // // expand_replacement_list @@ -992,7 +992,7 @@ bool adjacent_stringize = false; position_type const &pos = (*cit).get_position(); BOOST_ASSERT(boost::wave::need_variadics(ctx.get_language())); - + // ensure all variadic arguments to be expanded for (typename vector::size_type arg = i; arg < expanded_args.size(); ++arg) @@ -1008,7 +1008,7 @@ bool adjacent_stringize = false; // ensure argument i to be expanded expand_argument(i, arguments, expanded_args, expand_operator_defined, has_expanded_args); - + // replace argument ContainerT const &arg = expanded_args[i]; @@ -1021,7 +1021,7 @@ bool adjacent_stringize = false; { // stringize the current argument BOOST_ASSERT(!arguments[i].empty()); - + // safe a copy of the first tokens position (not a reference!) position_type pos ((*arguments[i].begin()).get_position()); @@ -1075,7 +1075,7 @@ bool adjacent_stringize = false; "stringize ('#')", main_pos); return; } - + // handle the cpp.concat operator if (seen_concat) concat_tokensequence(expanded); @@ -1103,12 +1103,12 @@ macromap::rescan_replacement_list(token_type const &curr_token, if (boost::wave::need_variadics(ctx.get_language())) { typename ContainerT::iterator end = replacement_list.end(); typename ContainerT::iterator it = replacement_list.begin(); - + while (it != end) { using namespace boost::wave; if (T_PLACEMARKER == token_id(*it)) { typename ContainerT::iterator placemarker = it; - + ++it; replacement_list.erase(placemarker); } @@ -1124,14 +1124,14 @@ macromap::rescan_replacement_list(token_type const &curr_token, on_exit::reset on_exit(macro_def.is_available_for_replacement, false); typename ContainerT::iterator begin_it = replacement_list.begin(); typename ContainerT::iterator end_it = replacement_list.end(); - + expand_whole_tokensequence(expanded, begin_it, end_it, expand_operator_defined); - + // trim replacement list, leave placeholder tokens untouched impl::trim_replacement_list(expanded); } - + if (expanded.empty()) { // the resulting replacement list should contain at least a placeholder // token @@ -1158,9 +1158,9 @@ macromap::expand_macro(ContainerT &expanded, defined_macros_type *scope, ContainerT *queue_symbol) { using namespace boost::wave; - + if (0 == scope) scope = current_macros; - + BOOST_ASSERT(T_IDENTIFIER == token_id(curr_token) || IS_CATEGORY(token_id(curr_token), KeywordTokenType) || IS_EXTCATEGORY(token_id(curr_token), OperatorTokenType|AltExtTokenType) || @@ -1172,7 +1172,7 @@ macromap::expand_macro(ContainerT &expanded, // try to expand a predefined macro (__FILE__, __LINE__ or __INCLUDE_LEVEL__) if (expand_predefined_macro(curr_token, expanded)) return false; - + // not defined as a macro if (0 != queue_symbol) { expanded.splice(expanded.end(), *queue_symbol); @@ -1210,8 +1210,8 @@ ContainerT replacement_list; if (T_LEFTPAREN == impl::next_token::peek(first, last)) { // called as a function-like macro - impl::skip_to_token(first, last, T_LEFTPAREN, seen_newline); - + impl::skip_to_token(ctx, first, last, T_LEFTPAREN, seen_newline); + #if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS == 0 IteratorT seqstart = first; IteratorT seqend = first; @@ -1219,7 +1219,7 @@ ContainerT replacement_list; if (macro_def.is_functionlike) { // defined as a function-like macro - + // collect the arguments std::vector arguments; #if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0 @@ -1250,7 +1250,7 @@ ContainerT replacement_list; } return false; } - + if (count_args > macro_def.macroparameters.size() || arguments.size() > macro_def.macroparameters.size()) { @@ -1265,7 +1265,7 @@ ContainerT replacement_list; return false; } } - + // inject tracing support #if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0 ctx.get_hooks().expanding_function_like_macro( @@ -1300,19 +1300,18 @@ ContainerT replacement_list; { // do not expand this macro, just copy the whole sequence expanded.push_back(curr_token); - ++first; // skip macro name return false; // no further preprocessing required } #endif bool found = false; impl::find_concat_operator concat_tag(found); - + std::remove_copy_if(macro_def.macrodefinition.begin(), macro_def.macrodefinition.end(), std::inserter(replacement_list, replacement_list.end()), concat_tag); - + // handle concatenation operators if (found && !concat_tokensequence(replacement_list)) return false; @@ -1350,7 +1349,7 @@ ContainerT replacement_list; bool found = false; impl::find_concat_operator concat_tag(found); - + std::remove_copy_if(macro_def.macrodefinition.begin(), macro_def.macrodefinition.end(), std::inserter(replacement_list, replacement_list.end()), @@ -1372,10 +1371,10 @@ ContainerT expanded_list; #else ctx.get_hooks().expanded_macro(ctx.derived(), replacement_list); #endif - + rescan_replacement_list(curr_token, macro_def, replacement_list, expanded_list, expand_operator_defined, first, last); - + #if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0 ctx.get_hooks().rescanned_macro(expanded_list); #else @@ -1503,7 +1502,7 @@ macromap::resolve_operator_pragma(IteratorT &first, // isolate the parameter of the operator _Pragma token_type pragma_token = *first; - if (!impl::skip_to_token(first, last, T_LEFTPAREN, seen_newline)) { + if (!impl::skip_to_token(ctx, first, last, T_LEFTPAREN, seen_newline)) { // illformed operator _Pragma BOOST_WAVE_THROW_CTX(ctx, preprocess_exception, ill_formed_expression, "operator _Pragma()", pragma_token.get_position()); @@ -1845,20 +1844,33 @@ position_type pos(""); else #endif { - // define C++ specifics - for (int i = 0; 0 != predef.static_data_cpp(i).name; ++i) { - predefined_macros::static_macros const& m = predef.static_data_cpp(i); - predefine_macro(current_scope, m.name, - token_type(m.token_id, m.value, pos)); +#if BOOST_WAVE_SUPPORT_CPP0X != 0 + if (boost::wave::need_cpp0x(ctx.get_language())) { + // define C++0x specifics + for (int i = 0; 0 != predef.static_data_cpp0x(i).name; ++i) { + predefined_macros::static_macros const& m = predef.static_data_cpp0x(i); + predefine_macro(current_scope, m.name, + token_type(m.token_id, m.value, pos)); + } } + else +#endif + { + // define C++ specifics + for (int i = 0; 0 != predef.static_data_cpp(i).name; ++i) { + predefined_macros::static_macros const& m = predef.static_data_cpp(i); + predefine_macro(current_scope, m.name, + token_type(m.token_id, m.value, pos)); + } #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 - // define __WAVE_HAS_VARIADICS__, if appropriate - if (boost::wave::need_variadics(ctx.get_language())) { - predefine_macro(current_scope, "__WAVE_HAS_VARIADICS__", - token_type(T_INTLIT, "1", pos)); - } + // define __WAVE_HAS_VARIADICS__, if appropriate + if (boost::wave::need_variadics(ctx.get_language())) { + predefine_macro(current_scope, "__WAVE_HAS_VARIADICS__", + token_type(T_INTLIT, "1", pos)); + } #endif + } } // predefine the __BASE_FILE__ macro which contains the main file name diff --git a/3party/boost/boost/wave/util/cpp_macromap_predef.hpp b/3party/boost/boost/wave/util/cpp_macromap_predef.hpp index 4415694bd4..07d3b1b4e0 100644 --- a/3party/boost/boost/wave/util/cpp_macromap_predef.hpp +++ b/3party/boost/boost/wave/util/cpp_macromap_predef.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -75,9 +75,9 @@ namespace util { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; - + // for some systems sprintf, time_t etc. is in namespace std - using namespace std; + using namespace std; time_t tt = time(0); struct tm *tb = 0; @@ -98,7 +98,7 @@ namespace util { void reset_timestr() { // for some systems sprintf, time_t etc. is in namespace std - using namespace std; + using namespace std; time_t tt = time(0); struct tm *tb = 0; @@ -119,9 +119,9 @@ namespace util { void reset_version() { char buffer[sizeof("0x00000000")+1]; - + // for some systems sprintf, time_t etc. is in namespace std - using namespace std; + using namespace std; // calculate the number of days since Dec 13 2001 // (the day the Wave project was started) @@ -140,13 +140,13 @@ namespace util { seconds/(3600*24)); version_ = buffer; } - + void reset_versionstr() { char buffer[sizeof("\"00.00.00.0000 \"")+sizeof(BOOST_PLATFORM)+sizeof(BOOST_COMPILER)+4]; // for some systems sprintf, time_t etc. is in namespace std - using namespace std; + using namespace std; // calculate the number of days since Dec 13 2001 // (the day the Wave project was started) @@ -164,11 +164,11 @@ namespace util { seconds/(3600*24), BOOST_PLATFORM, BOOST_COMPILER); versionstr_ = buffer; } - + // dynamic predefined macros string_type get_date() const { return datestr_; } // __DATE__ string_type get_time() const { return timestr_; } // __TIME__ - + // __SPIRIT_PP__/__WAVE__ string_type get_version() const { @@ -179,7 +179,7 @@ namespace util { BOOST_WAVE_VERSION_MINOR, BOOST_WAVE_VERSION_SUBMINOR); return buffer; } - + // __WAVE_CONFIG__ string_type get_config() const { @@ -189,7 +189,7 @@ namespace util { sprintf(buffer, "0x%08x", BOOST_WAVE_CONFIG); return buffer; } - + public: predefined_macros() : compilation_time_(__DATE__ " " __TIME__) @@ -198,19 +198,19 @@ namespace util { reset_version(); reset_versionstr(); } - + void reset() { reset_datestr(); reset_timestr(); } - + // __SPIRIT_PP_VERSION__/__WAVE_VERSION__ string_type get_fullversion() const { return version_; } - + // __SPIRIT_PP_VERSION_STR__/__WAVE_VERSION_STR__ string_type get_versionstr() const { return versionstr_; } - + // C++ mode static_macros const& static_data_cpp(std::size_t i) const { @@ -222,7 +222,24 @@ namespace util { BOOST_ASSERT(i < sizeof(data)/sizeof(data[0])); return data[i]; } - + +#if BOOST_WAVE_SUPPORT_CPP0X != 0 + // C++0x mode + static_macros const& static_data_cpp0x(std::size_t i) const + { + static static_macros data[] = { + { "__STDC__", T_INTLIT, "1" }, + { "__cplusplus", T_INTLIT, "201101L" }, + { "__STDC_VERSION__", T_INTLIT, "199901L" }, + { "__STDC_HOSTED__", T_INTLIT, "0" }, + { "__WAVE_HAS_VARIADICS__", T_INTLIT, "1" }, + { 0, T_EOF, 0 } + }; + BOOST_ASSERT(i < sizeof(data)/sizeof(data[0])); + return data[i]; + } +#endif + #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0 // C99 mode static_macros const& static_data_c99(std::size_t i) const @@ -256,7 +273,6 @@ namespace util { BOOST_ASSERT(i < sizeof(data)/sizeof(data[0])); return data[i]; } - }; // predefined_macros /////////////////////////////////////////////////////////////////////////////// diff --git a/3party/boost/boost/wave/util/cpp_macromap_utils.hpp b/3party/boost/boost/wave/util/cpp_macromap_utils.hpp index fe8b17ddb5..805f33d3bc 100644 --- a/3party/boost/boost/wave/util/cpp_macromap_utils.hpp +++ b/3party/boost/boost/wave/util/cpp_macromap_utils.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -426,19 +426,34 @@ is_whitespace_only (ContainerT const &argument) return true; } +/////////////////////////////////////////////////////////////////////////////// +// call 'skipped_token' preprocessing hook +template +void call_skipped_token_hook(ContextT& ctx, + typename ContextT::token_type const& skipped) +{ +#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0 + ctx.get_hooks().skipped_token(skipped); +#else + ctx.get_hooks().skipped_token(ctx.derived(), skipped); +#endif +} + /////////////////////////////////////////////////////////////////////////////// // // Skip forward to a given token // /////////////////////////////////////////////////////////////////////////////// -template +template inline bool -skip_to_token(IteratorT &it, IteratorT const &end, token_id id, - bool& seen_newline) +skip_to_token(ContextT& ctx, IteratorT &it, IteratorT const &end, + token_id id, bool& seen_newline) { using namespace boost::wave; if (token_id(*it) == id) return true; + +// call_skipped_token_hook(ctx, *it); if (++it == end) return false; @@ -447,6 +462,8 @@ skip_to_token(IteratorT &it, IteratorT const &end, token_id id, { if (T_NEWLINE == token_id(*it)) seen_newline = true; + +// call_skipped_token_hook(ctx, *it); if (++it == end) return false; } @@ -541,19 +558,6 @@ to_string(Src const& src) return impl::to_string_helper::call(src); } -/////////////////////////////////////////////////////////////////////////////// -// call 'skipped_token' preprocessing hook -template -void call_skipped_token_hook(ContextT& ctx, - typename ContextT::token_type const& skipped) -{ -#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0 - ctx.get_hooks().skipped_token(skipped); -#else - ctx.get_hooks().skipped_token(ctx.derived(), skipped); -#endif -} - /////////////////////////////////////////////////////////////////////////////// } // namespace util } // namespace wave diff --git a/3party/boost/boost/wave/util/file_position.hpp b/3party/boost/boost/wave/util/file_position.hpp index 0e97df66e7..a3d1084bbe 100644 --- a/3party/boost/boost/wave/util/file_position.hpp +++ b/3party/boost/boost/wave/util/file_position.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -82,8 +82,8 @@ public: file_position() : file(), line(1), column(1) {} - explicit file_position(string_type const& file_, unsigned int line_ = 1, - unsigned int column_ = 1) + explicit file_position(string_type const& file_, std::size_t line_ = 1, + std::size_t column_ = 1) : file(file_), line(line_), column(column_) { BOOST_ASSERT(!debug::is_escaped_lit(file)); @@ -91,16 +91,16 @@ public: // accessors string_type const &get_file() const { return file; } - unsigned int get_line() const { return line; } - unsigned int get_column() const { return column; } + std::size_t get_line() const { return line; } + std::size_t get_column() const { return column; } void set_file(string_type const &file_) { file = file_; BOOST_ASSERT(!debug::is_escaped_lit(file)); } - void set_line(unsigned int line_) { line = line_; } - void set_column(unsigned int column_) { column = column_; } + void set_line(std::size_t line_) { line = line_; } + void set_column(std::size_t column_) { column = column_; } private: #if BOOST_WAVE_SERIALIZATION != 0 @@ -116,8 +116,8 @@ private: #endif string_type file; - unsigned int line; - unsigned int column; + std::size_t line; + std::size_t column; }; template diff --git a/3party/boost/boost/wave/util/filesystem_compatibility.hpp b/3party/boost/boost/wave/util/filesystem_compatibility.hpp index 7a7d445e3f..5bd924af72 100644 --- a/3party/boost/boost/wave/util/filesystem_compatibility.hpp +++ b/3party/boost/boost/wave/util/filesystem_compatibility.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -13,6 +13,7 @@ #include +#include #include #include @@ -35,12 +36,20 @@ namespace boost { namespace wave { namespace util template inline boost::filesystem::path create_path(String const& p) { +#if BOOST_FILESYSTEM_VERSION >= 3 + return boost::filesystem::path(p); +#else return boost::filesystem::path(p, boost::filesystem::native); +#endif } inline std::string leaf(boost::filesystem::path const& p) { +#if BOOST_FILESYSTEM_VERSION >= 3 + return p.leaf().string(); +#else return p.leaf(); +#endif } inline boost::filesystem::path branch_path(boost::filesystem::path const& p) @@ -55,19 +64,52 @@ namespace boost { namespace wave { namespace util inline std::string native_file_string(boost::filesystem::path const& p) { +#if BOOST_FILESYSTEM_VERSION >= 3 + return p.string(); +#else return p.native_file_string(); +#endif + } + + inline boost::filesystem::path complete_path( + boost::filesystem::path const& p) + { +#if BOOST_FILESYSTEM_VERSION >= 3 + return boost::filesystem3::complete(p, initial_path()); +#else + return boost::filesystem::complete(p, initial_path()); +#endif + } + + inline boost::filesystem::path complete_path( + boost::filesystem::path const& p, boost::filesystem::path const& base) + { +#if BOOST_FILESYSTEM_VERSION >= 3 + return boost::filesystem3::complete(p, base); +#else + return boost::filesystem::complete(p, base); +#endif } #else + // interface wrappers if deprecated functions do not exist inline boost::filesystem::path initial_path() { +#if BOOST_FILESYSTEM_VERSION >= 3 + return boost::filesystem3::detail::initial_path(); +#else return boost::filesystem::initial_path(); +#endif } inline boost::filesystem::path current_path() { +#if BOOST_FILESYSTEM_VERSION >= 3 + return boost::filesystem3::current_path(); +#else return boost::filesystem::current_path(); +#endif } template @@ -78,7 +120,11 @@ namespace boost { namespace wave { namespace util inline std::string leaf(boost::filesystem::path const& p) { +#if BOOST_VERSION >= 104600 && BOOST_FILESYSTEM_VERSION >= 3 + return p.filename().string(); +#else return p.filename(); +#endif } inline boost::filesystem::path branch_path(boost::filesystem::path const& p) @@ -93,9 +139,32 @@ namespace boost { namespace wave { namespace util inline std::string native_file_string(boost::filesystem::path const& p) { +#if BOOST_VERSION >= 104600 + return p.string(); +#else return p.file_string(); +#endif } + inline boost::filesystem::path complete_path( + boost::filesystem::path const& p) + { +#if BOOST_VERSION >= 104600 && BOOST_FILESYSTEM_VERSION >= 3 + return boost::filesystem::absolute(p, initial_path()); +#else + return boost::filesystem::complete(p, initial_path()); +#endif + } + + inline boost::filesystem::path complete_path( + boost::filesystem::path const& p, boost::filesystem::path const& base) + { +#if BOOST_VERSION >= 104600 && BOOST_FILESYSTEM_VERSION >= 3 + return boost::filesystem::absolute(p, base); +#else + return boost::filesystem::complete(p, base); +#endif + } #endif }}} diff --git a/3party/boost/boost/wave/util/flex_string.hpp b/3party/boost/boost/wave/util/flex_string.hpp index cee861a376..d4558bdf53 100644 --- a/3party/boost/boost/wave/util/flex_string.hpp +++ b/3party/boost/boost/wave/util/flex_string.hpp @@ -102,7 +102,13 @@ class StoragePolicy #include #include #include -#include + +#if defined(__PATHSCALE__) + #include +#else + #include +#endif + #include #include #include @@ -1818,7 +1824,7 @@ private: #ifndef NDEBUG Invariant checker(*this); #endif - assert(begin() <= p && p <= end()); + BOOST_ASSERT(begin() <= p && p <= end()); const size_type insertOffset(p - begin()); const size_type originalSize(size()); if(n < originalSize - insertOffset) @@ -1884,16 +1890,16 @@ private: const typename std::iterator_traits::difference_type n2 = std::distance(s1, s2); - assert(n2 >= 0); + BOOST_ASSERT(n2 >= 0); using namespace flex_string_details; - assert(pos <= size()); + BOOST_ASSERT(pos <= size()); const typename std::iterator_traits::difference_type maxn2 = capacity() - size(); if (maxn2 < n2) { // Reallocate the string. - assert(!IsAliasedRange(s1, s2)); + BOOST_ASSERT(!IsAliasedRange(s1, s2)); reserve(size() + n2); i = begin() + pos; } @@ -1910,7 +1916,7 @@ private: FwdIterator t = s1; const size_type old_size = size(); std::advance(t, old_size - pos); - assert(std::distance(t, s2) >= 0); + BOOST_ASSERT(std::distance(t, s2) >= 0); Storage::append(t, s2); Storage::append(data() + pos, data() + old_size); std::copy(s1, t, i); @@ -2011,9 +2017,9 @@ private: flex_string& ReplaceImplDiscr(iterator i1, iterator i2, const value_type* s, size_type n, Selector<2>) { - assert(i1 <= i2); - assert(begin() <= i1 && i1 <= end()); - assert(begin() <= i2 && i2 <= end()); + BOOST_ASSERT(i1 <= i2); + BOOST_ASSERT(begin() <= i1 && i1 <= end()); + BOOST_ASSERT(begin() <= i2 && i2 <= end()); return replace(i1, i2, s, s + n); } @@ -2052,10 +2058,10 @@ private: #endif const typename std::iterator_traits::difference_type n1 = i2 - i1; - assert(n1 >= 0); + BOOST_ASSERT(n1 >= 0); const typename std::iterator_traits::difference_type n2 = std::distance(s1, s2); - assert(n2 >= 0); + BOOST_ASSERT(n2 >= 0); if (IsAliasedRange(s1, s2)) { diff --git a/3party/boost/boost/wave/util/functor_input.hpp b/3party/boost/boost/wave/util/functor_input.hpp index 72666a890e..d30a090a1a 100644 --- a/3party/boost/boost/wave/util/functor_input.hpp +++ b/3party/boost/boost/wave/util/functor_input.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/util/insert_whitespace_detection.hpp b/3party/boost/boost/wave/util/insert_whitespace_detection.hpp index 8e85ae687e..8485e9c1d1 100644 --- a/3party/boost/boost/wave/util/insert_whitespace_detection.hpp +++ b/3party/boost/boost/wave/util/insert_whitespace_detection.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/util/interpret_pragma.hpp b/3party/boost/boost/wave/util/interpret_pragma.hpp index 57f9aeb194..e787040b1a 100644 --- a/3party/boost/boost/wave/util/interpret_pragma.hpp +++ b/3party/boost/boost/wave/util/interpret_pragma.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/util/iteration_context.hpp b/3party/boost/boost/wave/util/iteration_context.hpp index 6a3ebd0b7f..8673f46639 100644 --- a/3party/boost/boost/wave/util/iteration_context.hpp +++ b/3party/boost/boost/wave/util/iteration_context.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/util/macro_definition.hpp b/3party/boost/boost/wave/util/macro_definition.hpp index 249bcacace..16be858704 100644 --- a/3party/boost/boost/wave/util/macro_definition.hpp +++ b/3party/boost/boost/wave/util/macro_definition.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/util/macro_helpers.hpp b/3party/boost/boost/wave/util/macro_helpers.hpp index 2cdfc173a3..8b7519e358 100644 --- a/3party/boost/boost/wave/util/macro_helpers.hpp +++ b/3party/boost/boost/wave/util/macro_helpers.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/util/pattern_parser.hpp b/3party/boost/boost/wave/util/pattern_parser.hpp index df07ea1901..876726fe4e 100644 --- a/3party/boost/boost/wave/util/pattern_parser.hpp +++ b/3party/boost/boost/wave/util/pattern_parser.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/util/symbol_table.hpp b/3party/boost/boost/wave/util/symbol_table.hpp index 6835c1ccae..0eda557fba 100644 --- a/3party/boost/boost/wave/util/symbol_table.hpp +++ b/3party/boost/boost/wave/util/symbol_table.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/util/time_conversion_helper.hpp b/3party/boost/boost/wave/util/time_conversion_helper.hpp index 05ea54e2f1..a477607b95 100644 --- a/3party/boost/boost/wave/util/time_conversion_helper.hpp +++ b/3party/boost/boost/wave/util/time_conversion_helper.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/util/transform_iterator.hpp b/3party/boost/boost/wave/util/transform_iterator.hpp index bb0dd02ef0..7477bfedbd 100644 --- a/3party/boost/boost/wave/util/transform_iterator.hpp +++ b/3party/boost/boost/wave/util/transform_iterator.hpp @@ -3,7 +3,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/util/unput_queue_iterator.hpp b/3party/boost/boost/wave/util/unput_queue_iterator.hpp index 32bed4d824..7a7562e2f6 100644 --- a/3party/boost/boost/wave/util/unput_queue_iterator.hpp +++ b/3party/boost/boost/wave/util/unput_queue_iterator.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/wave_config.hpp b/3party/boost/boost/wave/wave_config.hpp index 95a1f768ee..13b1d1c3a9 100644 --- a/3party/boost/boost/wave/wave_config.hpp +++ b/3party/boost/boost/wave/wave_config.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -82,6 +82,18 @@ #define BOOST_WAVE_SUPPORT_INCLUDE_NEXT 1 #endif +/////////////////////////////////////////////////////////////////////////////// +// Decide, whether to support C++0x +// +// To implement C++0x keywords and preprocessor semantics define the following +// to something not equal to zero. +// +#if !defined(BOOST_WAVE_SUPPORT_CPP0X) +#define BOOST_WAVE_SUPPORT_CPP0X 1 +#undef BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS +#define BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS 1 +#endif + /////////////////////////////////////////////////////////////////////////////// // Undefine the following, to enable some MS specific language extensions: // __int8, __int16, __int32, __int64, __based, __declspec, __cdecl, diff --git a/3party/boost/boost/wave/wave_config_constant.hpp b/3party/boost/boost/wave/wave_config_constant.hpp index 22da5fb1b7..68bdf74c42 100644 --- a/3party/boost/boost/wave/wave_config_constant.hpp +++ b/3party/boost/boost/wave/wave_config_constant.hpp @@ -4,7 +4,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ diff --git a/3party/boost/boost/wave/wave_version.hpp b/3party/boost/boost/wave/wave_version.hpp index b9ea780aab..debe7045c2 100644 --- a/3party/boost/boost/wave/wave_version.hpp +++ b/3party/boost/boost/wave/wave_version.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ - Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -16,11 +16,11 @@ // BOOST_WAVE_VERSION & 0x0000FF is the sub-minor version // BOOST_WAVE_VERSION & 0x00FF00 is the minor version // BOOST_WAVE_VERSION & 0xFF0000 is the major version -#define BOOST_WAVE_VERSION 0x020100 +#define BOOST_WAVE_VERSION 0x020200 // The following defines contain the same information as above #define BOOST_WAVE_VERSION_MAJOR 2 -#define BOOST_WAVE_VERSION_MINOR 1 +#define BOOST_WAVE_VERSION_MINOR 2 #define BOOST_WAVE_VERSION_SUBMINOR 0 #endif // !defined(WAVE_VERSION_H_9D79ABDB_AC54_4C0A_89B1_F70A2DCFE21E_INCLUDED) diff --git a/3party/boost/boost/wave/whitespace_handling.hpp b/3party/boost/boost/wave/whitespace_handling.hpp index c3c8580eb6..be9725fd8d 100644 --- a/3party/boost/boost/wave/whitespace_handling.hpp +++ b/3party/boost/boost/wave/whitespace_handling.hpp @@ -5,7 +5,7 @@ http://www.boost.org/ Copyright (c) 2003 Paul Mensonides - Copyright (c) 2001-2010 Hartmut Kaiser. + Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ @@ -64,6 +64,28 @@ namespace util { } return newlines; } + +#if BOOST_WAVE_SUPPORT_CPP0X != 0 + /////////////////////////////////////////////////////////////////////////// + // This function returns the number of newlines in the given C++0x style + // raw string + template + int rawstring_count_newlines(TokenT const& token) + { + using namespace boost::wave; + int newlines = 0; + if (T_RAWSTRINGLIT == token_id(token)) { + typename TokenT::string_type const& value = token.get_value(); + typename TokenT::string_type::size_type p = value.find_first_of("\n"); + + while (TokenT::string_type::npos != p) { + ++newlines; + p = value.find_first_of("\n", p+1); + } + } + return newlines; + } +#endif } /////////////////////////////////////////////////////////////////////////////// @@ -77,6 +99,10 @@ public: template bool may_skip_whitespace(ContextT const& ctx, TokenT &token, bool &skipped_newline); + template + bool may_skip_whitespace(ContextT const& ctx, TokenT &token, + bool preserve_comments_, bool preserve_bol_whitespace_, + bool &skipped_newline); protected: bool skip_cppcomment(boost::wave::token_id id) @@ -87,14 +113,16 @@ protected: private: typedef bool state_t(TokenT &token, bool &skipped_newline); state_t eat_whitespace::* state; - state_t general, newline, newline_2nd, whitespace; + state_t general, newline, newline_2nd, whitespace, bol_whitespace; bool preserve_comments; + bool preserve_bol_whitespace; }; template inline eat_whitespace::eat_whitespace() -: state(&eat_whitespace::newline), preserve_comments(false) +: state(&eat_whitespace::newline), preserve_comments(false), + preserve_bol_whitespace(false) { } @@ -109,6 +137,19 @@ eat_whitespace::may_skip_whitespace(ContextT const& ctx, TokenT &token, return (this->*state)(token, skipped_newline); } +template +template +inline bool +eat_whitespace::may_skip_whitespace(ContextT const& ctx, TokenT &token, + bool preserve_comments_, bool preserve_bol_whitespace_, + bool &skipped_newline) +{ + // re-initialize the preserve comments state + preserve_comments = preserve_comments_; + preserve_bol_whitespace = preserve_bol_whitespace_; + return (this->*state)(token, skipped_newline); +} + template inline bool eat_whitespace::general(TokenT &token, bool &skipped_newline) @@ -142,16 +183,16 @@ inline bool eat_whitespace::newline(TokenT &token, bool &skipped_newline) { using namespace boost::wave; - + token_id id = token_id(token); if (T_NEWLINE == id || T_CPPCOMMENT == id) { skipped_newline = true; state = &eat_whitespace::newline_2nd; return T_NEWLINE == id || skip_cppcomment(id); } - else if (T_SPACE != id && T_SPACE2 != id && T_CCOMMENT != id) { + + if (T_SPACE != id && T_SPACE2 != id && T_CCOMMENT != id) return general(token, skipped_newline); - } if (T_CCOMMENT == id) { if (util::ccomment_has_newline(token)) { @@ -162,8 +203,14 @@ eat_whitespace::newline(TokenT &token, bool &skipped_newline) state = &eat_whitespace::general; return false; } - // fall through... + return true; } + + if (preserve_bol_whitespace) { + state = &eat_whitespace::bol_whitespace; + return false; + } + return true; } @@ -174,8 +221,14 @@ eat_whitespace::newline_2nd(TokenT &token, bool &skipped_newline) using namespace boost::wave; token_id id = token_id(token); - if (T_SPACE == id || T_SPACE2 == id) + if (T_SPACE == id || T_SPACE2 == id) { + if (preserve_bol_whitespace) { + state = &eat_whitespace::bol_whitespace; + return false; + } return true; + } + if (T_CCOMMENT == id) { if (util::ccomment_has_newline(token)) skipped_newline = true; @@ -186,6 +239,7 @@ eat_whitespace::newline_2nd(TokenT &token, bool &skipped_newline) } return true; } + if (T_NEWLINE != id && T_CPPCOMMENT != id) return general(token, skipped_newline); @@ -193,6 +247,19 @@ eat_whitespace::newline_2nd(TokenT &token, bool &skipped_newline) return T_NEWLINE == id || skip_cppcomment(id); } +template +inline bool +eat_whitespace::bol_whitespace(TokenT &token, bool &skipped_newline) +{ + using namespace boost::wave; + + token_id id = token_id(token); + if (T_SPACE == id || T_SPACE2 == id) + return !preserve_bol_whitespace; + + return general(token, skipped_newline); +} + template inline bool eat_whitespace::whitespace(TokenT &token, bool &skipped_newline) diff --git a/3party/boost/boost/xpressive/match_results.hpp b/3party/boost/boost/xpressive/match_results.hpp index 197fb4dcc9..d93c1547bb 100644 --- a/3party/boost/boost/xpressive/match_results.hpp +++ b/3party/boost/boost/xpressive/match_results.hpp @@ -660,9 +660,9 @@ public: using std::swap; swap(this->regex_id_, that.regex_id_); this->sub_matches_.swap(that.sub_matches_); - swap(this->base_, that.base_); - swap(this->prefix_, that.prefix_); - swap(this->suffix_, that.suffix_); + this->base_.swap(that.base_); + this->prefix_.swap(that.prefix_); + this->suffix_.swap(that.suffix_); this->nested_results_.swap(that.nested_results_); this->extras_ptr_.swap(that.extras_ptr_); this->traits_.swap(that.traits_);